From e70c87616eefbdc7ff0dbdc155f1bf711592dd44 Mon Sep 17 00:00:00 2001 From: David Burg <12040431+daviburg@users.noreply.github.com> Date: Thu, 30 Jul 2026 12:01:00 -0700 Subject: [PATCH 1/2] Regenerate all connector clients from the type-identity generator fix Brings the checked-in clients back into sync with the generator. 75 clients change. Four of them - AzureAD, Office365, Pipedrive and Planner - change because of the type-identity fix, which stops two definitions differing only by a version affix from collapsing onto one emitted type and silently dropping one shape. AzureIoTCentral, the fifth affected client, already landed in #225. The remaining 71 carry accumulated output from generator fixes that merged after those files were last regenerated, rather than new behaviour introduced here. ConnectorNames.cs and ManagedConnectors.cs are deliberately untouched. Regenerating them from the catalogue snapshot used here would have dropped 25 existing constants, including docusign and jira, because those registries are built from the connectors actually processed and the snapshot was short 24 of 1619 catalogue entries. Syncing them needs a complete catalogue fetch. Depends on AzureUX-BPM PR 16618864. Validation: dotnet build succeeds across all 97 clients, 912 tests pass. --- CHANGELOG.md | 6 + .../Generated/ArmExtensions.cs | 80 +- .../Generated/AzureADExtensions.cs | 16 +- .../Generated/AzureAutomationExtensions.cs | 276 +- .../Generated/AzureBlobExtensions.cs | 169 +- .../Generated/AzureDataFactoryExtensions.cs | 450 +-- .../Generated/AzureEventGridExtensions.cs | 88 +- .../Generated/AzureMonitorLogsExtensions.cs | 454 ++- .../Generated/AzureVMExtensions.cs | 514 ++-- .../Generated/AzurequeuesExtensions.cs | 148 +- .../Generated/AzuretablesExtensions.cs | 160 +- .../Generated/BoxExtensions.cs | 53 +- .../Generated/CampfireExtensions.cs | 170 +- .../CloudmersiveConvertExtensions.cs | 216 +- .../Generated/CommondataserviceExtensions.cs | 30 +- .../Generated/DocuSignExtensions.cs | 1957 ++++++------ .../Generated/DocumentdbExtensions.cs | 404 +-- .../Generated/DropboxExtensions.cs | 53 +- .../Generated/DynamicsAXExtensions.cs | 1291 ++++---- .../Generated/ElfsquadDataExtensions.cs | 268 +- .../Generated/EtsyExtensions.cs | 102 +- .../Generated/EventbriteExtensions.cs | 398 +-- .../Generated/EventhubsExtensions.cs | 134 +- .../ExcelOnlineBusinessExtensions.cs | 443 +-- .../Generated/ExcelOnlineExtensions.cs | 54 +- .../Generated/FormstackFormsExtensions.cs | 26 + .../Generated/FtpExtensions.cs | 53 +- .../Generated/GitHubExtensions.cs | 66 +- .../Generated/GoogleCalendarExtensions.cs | 131 +- .../Generated/GoogleDriveExtensions.cs | 90 +- .../Generated/GoogleTasksExtensions.cs | 66 +- .../Generated/ImpexiumExtensions.cs | 4 +- .../Generated/InsightlyExtensions.cs | 42 +- .../Generated/JedoxOdataHubExtensions.cs | 68 +- .../Generated/JiraExtensions.cs | 124 +- .../Generated/KeyVaultExtensions.cs | 18 +- .../Generated/KustoExtensions.cs | 76 +- .../Generated/MailChimpExtensions.cs | 72 +- .../Generated/MicrosoftBookingsExtensions.cs | 54 + .../Generated/MicrosoftFormsExtensions.cs | 4 +- .../Generated/MondayExtensions.cs | 1020 +++---- .../Generated/Office365Extensions.cs | 127 +- .../Generated/Office365GroupsExtensions.cs | 14 + .../Office365GroupsMailExtensions.cs | 131 +- .../Generated/Office365UsersExtensions.cs | 26 +- .../Generated/OneDriveExtensions.cs | 8 +- .../OneDriveForBusinessExtensions.cs | 6 +- .../Generated/OnenoteExtensions.cs | 14 +- .../Generated/OutlookExtensions.cs | 73 +- .../Generated/PdfCoExtensions.cs | 12 +- .../Generated/PipedriveExtensions.cs | 264 +- .../Generated/PlannerExtensions.cs | 270 +- .../Generated/PowerBIExtensions.cs | 768 +++-- .../Generated/RssExtensions.cs | 4 +- .../Generated/SalesforceExtensions.cs | 1090 +++---- .../Generated/SeismicPlannerExtensions.cs | 6 +- .../Generated/SendGridExtensions.cs | 236 +- .../Generated/ServicebusExtensions.cs | 438 +-- .../Generated/SharePointOnlineExtensions.cs | 2136 +++++++------ .../Generated/ShiftsExtensions.cs | 244 +- .../Generated/SlackExtensions.cs | 6 +- .../Generated/SmtpExtensions.cs | 4 +- .../Generated/StarmindExtensions.cs | 2 +- .../Generated/TallyfyExtensions.cs | 202 +- .../Generated/TeamsExtensions.cs | 2656 +++++++++-------- .../Generated/TextRequestExtensions.cs | 26 + .../Generated/TodoExtensions.cs | 50 +- .../Generated/TrelloExtensions.cs | 71 +- .../Generated/TwitterExtensions.cs | 16 +- .../Generated/TypeformExtensions.cs | 129 +- .../Generated/UniversalPrintExtensions.cs | 50 +- .../Generated/WaywedoExtensions.cs | 192 +- .../Generated/WdatpExtensions.cs | 18 +- .../Generated/WordOnlineBusinessExtensions.cs | 146 +- .../Generated/WordPressExtensions.cs | 6 +- .../Generated/YammerExtensions.cs | 25 +- 76 files changed, 10562 insertions(+), 8752 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 013b2c7..9365203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking Changes +- **All connector clients regenerated; version-affixed models are no longer collapsed onto one name** — the generator stripped a version affix from a definition name without knowing which definitions a connector retains, so `FooV1` and `FooV2` both claimed `Foo` and only one type was emitted. The dropped one produced a model that compiled and looked complete while omitting fields the service returns. Names are now decided against the retained definition set: a single claimant still strips the affix, several claimants describing the same wire shape still collapse to one type, and claimants with differing shapes keep their affixes so no shape is lost. + + `AzureIoTCentral` is the clearest case and shipped separately in #225: `Device` became `DeviceV1` and `DeviceV2`, making the `organizations` property reachable. In this regeneration the same fix reaches `AzureAD`, `Office365`, `Pipedrive` and `Planner`. Callers referencing a previously collapsed model name on those clients must move to the affixed name. + + The remaining 71 regenerated clients carry accumulated output from generator fixes that merged after their last regeneration, rather than new behaviour introduced here. (AzureUX-BPM PR 16618864) + - **SQL Server metadata methods now address the default dataset; the server- and database-scoped forms moved to `V2` names** — the unversioned operation owns the unversioned method name, matching the Python SDK. Existing callers must rename: | Before | After | diff --git a/src/Azure.Connectors.Sdk/Generated/ArmExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ArmExtensions.cs index 4bf036f..06aea91 100644 --- a/src/Azure.Connectors.Sdk/Generated/ArmExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ArmExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Arm.Models #region Types /// - /// Response for Lists the subscription locations + /// Location list operation response. /// public class LocationListResult { @@ -40,7 +40,7 @@ public class LocationListResult } /// - /// Item in The locations. + /// Location information. /// public class Location { @@ -76,7 +76,7 @@ public class Location } /// - /// Response for Read a subscription + /// Subscription information. /// public class Subscription { @@ -115,7 +115,7 @@ public class Subscription } /// - /// subscriptionPolicies + /// Subscription policies. /// public class SubscriptionPolicies { @@ -136,7 +136,7 @@ public class SubscriptionPolicies } /// - /// Response for List subscriptions + /// Subscription list operation response. /// public class SubscriptionListResult : IPageable { @@ -150,7 +150,7 @@ public class SubscriptionListResult : IPageable } /// - /// Response for Read a template deployment + /// Deployment information. /// public class DeploymentExtended { @@ -169,7 +169,7 @@ public class DeploymentExtended } /// - /// properties + /// Deployment properties with additional details. /// public class DeploymentPropertiesExtended { @@ -229,7 +229,7 @@ public class DeploymentPropertiesExtended } /// - /// Item in The list of resource providers needed for the deployment. + /// Resource provider information. /// public class Provider { @@ -254,7 +254,7 @@ public class Provider } /// - /// Item in The collection of provider resource types. + /// Resource type managed by the resource provider. /// public class ProviderResourceType { @@ -292,7 +292,7 @@ public class ObjectWithoutType } /// - /// Item in The aliases that are supported by this resource type. + /// The alias type. /// public class AliasType { @@ -306,7 +306,7 @@ public class AliasType } /// - /// Item in The paths for an alias. + /// The type of the paths for alias. /// public class AliasPathType { @@ -320,7 +320,7 @@ public class AliasPathType } /// - /// Item in The list of deployment dependencies. + /// Deployment dependency information. /// public class Dependency { @@ -342,7 +342,7 @@ public class Dependency } /// - /// Item in The list of dependencies. + /// Deployment dependency information. /// public class BasicDependency { @@ -360,7 +360,7 @@ public class BasicDependency } /// - /// templateLink + /// Entity representing the reference to the template. /// public class TemplateLink { @@ -374,7 +374,7 @@ public class TemplateLink } /// - /// parametersLink + /// Entity representing the reference to the deployment paramaters. /// public class ParametersLink { @@ -398,7 +398,7 @@ public class DebugSetting } /// - /// Response for Validate a template deployment + /// Information from validate template deployment response. /// public class DeploymentValidateResult { @@ -438,7 +438,7 @@ public class ResourceManagementErrorWithDetails } /// - /// Response for Export deployment template + /// The deployment export result. /// public class DeploymentExportResult { @@ -448,7 +448,7 @@ public class DeploymentExportResult } /// - /// Response for List template deployments + /// List of deployments. /// public class DeploymentListResult : IPageable { @@ -463,7 +463,7 @@ public class DeploymentListResult : IPageable } /// - /// Response for Read a template deployment operation + /// Deployment operation information. /// public class DeploymentOperation { @@ -483,7 +483,7 @@ public class DeploymentOperation } /// - /// properties + /// Deployment operation properties. /// public class DeploymentOperationProperties { @@ -526,7 +526,7 @@ public class DeploymentOperationProperties } /// - /// targetResource + /// Target resource. /// public class TargetResource { @@ -554,7 +554,7 @@ public class HttpMessage } /// - /// Response for Lists template deployment operations + /// List of deployment operations. /// public class DeploymentOperationsListResult : IPageable { @@ -569,7 +569,7 @@ public class DeploymentOperationsListResult : IPageable } /// - /// Response for List resource providers + /// List of resource providers. /// public class ProviderListResult : IPageable { @@ -584,7 +584,7 @@ public class ProviderListResult : IPageable } /// - /// Response for List resources by resource group + /// List of resources. /// public class ResourceListResult : IPageable { @@ -599,7 +599,7 @@ public class ResourceListResult : IPageable } /// - /// Item in The list of resources. + /// Resource information. /// public class GenericResource { @@ -653,7 +653,7 @@ public class GenericResource } /// - /// plan + /// Plan for the resource. /// public class Plan { @@ -675,7 +675,7 @@ public class Plan } /// - /// sku + /// Sku for the resource. /// public class Sku { @@ -705,7 +705,7 @@ public class Sku } /// - /// identity + /// Identity for the resource. /// public class Identity { @@ -725,7 +725,7 @@ public class Identity } /// - /// Response for Read a resource group + /// Resource group information. /// public class ResourceGroup { @@ -758,7 +758,7 @@ public class ResourceGroup } /// - /// properties + /// The resource group properties. /// public class ResourceGroupProperties { @@ -783,7 +783,7 @@ public class ResourceGroupExportResult } /// - /// Response for List resource groups + /// List of resource groups. /// public class ResourceGroupListResult : IPageable { @@ -810,7 +810,7 @@ public class ResourcesInvokeInput } /// - /// Response for Invoke resource operation + /// The response from the action operation. /// public class ResourcesInvokeResponse { @@ -834,7 +834,7 @@ public class ProviderResourcesInvokeInput } /// - /// Response for Invoke resource operation in provider + /// The response from the operation. /// public class ProviderResourcesInvokeResponse { @@ -846,7 +846,7 @@ public class ProviderResourcesInvokeResponse } /// - /// Response for Create or update a subscription resource tag value + /// Tag information. /// public class TagValue { @@ -864,7 +864,7 @@ public class TagValue } /// - /// count + /// Tag count. /// public class TagCount { @@ -878,7 +878,7 @@ public class TagCount } /// - /// Response for Create or update a subscription resource tag name + /// Tag details. /// public class TagDetails { @@ -900,7 +900,7 @@ public class TagDetails } /// - /// Response for List subscription resource tags + /// List of subscription tags. /// public class TagsListResult : IPageable { @@ -915,7 +915,7 @@ public class TagsListResult : IPageable } /// - /// DeploymentProperties + /// Deployment properties. /// public class DeploymentProperties { @@ -945,7 +945,7 @@ public class DeploymentProperties } /// - /// Deployment + /// Deployment operation parameters. /// public class Deployment { @@ -955,7 +955,7 @@ public class Deployment } /// - /// ExportTemplateRequest + /// Export resource group template request parameters. /// public class ExportTemplateRequest { diff --git a/src/Azure.Connectors.Sdk/Generated/AzureADExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureADExtensions.cs index 9c49380..d75d6ab 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureADExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureADExtensions.cs @@ -317,7 +317,7 @@ public class CreateGroupInput /// /// Response for Check group membership (V2) /// - public class GetMemberGroupsResponse + public class GetMemberGroupsResponseV2 { /// value [JsonPropertyName("value")] @@ -688,12 +688,12 @@ public static CreateGroupInput CreateGroupInput( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetMemberGroupsResponse GetMemberGroupsResponse( + public static GetMemberGroupsResponseV2 GetMemberGroupsResponseV2( List value = default) { - return new GetMemberGroupsResponse + return new GetMemberGroupsResponseV2 { Value = value, }; @@ -1217,7 +1217,7 @@ public virtual async Task CreateGroupAsync(CreateGroupInput /// The request body. /// Cancellation token. /// The Check group membership (V2) response. - public virtual async Task CheckMemberGroupsAsync(string userIdOrPrincipalName, CheckMemberGroupsRequest input, CancellationToken cancellationToken = default) + public virtual async Task CheckMemberGroupsAsync(string userIdOrPrincipalName, CheckMemberGroupsRequest input, CancellationToken cancellationToken = default) { using var activity = AzureADClient.ConnectorActivitySource.StartActivity("AzureADClient.CheckMemberGroupsAsync"); try @@ -1226,7 +1226,7 @@ public virtual async Task CheckMemberGroupsAsync(string throw new ArgumentNullException(nameof(userIdOrPrincipalName)); var path = $"/v2/v1.0/users/{Uri.EscapeDataString(userIdOrPrincipalName.ToString())}/checkMemberGroups"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1245,7 +1245,7 @@ public virtual async Task CheckMemberGroupsAsync(string /// The request body. /// Cancellation token. /// The Get groups of a user (V2) response. - public virtual async Task GetMemberGroupsAsync(string userIdOrPrincipalName, GetMemberGroupsRequest input, CancellationToken cancellationToken = default) + public virtual async Task GetMemberGroupsAsync(string userIdOrPrincipalName, GetMemberGroupsRequest input, CancellationToken cancellationToken = default) { using var activity = AzureADClient.ConnectorActivitySource.StartActivity("AzureADClient.GetMemberGroupsAsync"); try @@ -1254,7 +1254,7 @@ public virtual async Task GetMemberGroupsAsync(string u throw new ArgumentNullException(nameof(userIdOrPrincipalName)); var path = $"/v2/v1.0/users/{Uri.EscapeDataString(userIdOrPrincipalName.ToString())}/getMemberGroups"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/AzureAutomationExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureAutomationExtensions.cs index ed54b28..91c8c06 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureAutomationExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureAutomationExtensions.cs @@ -30,7 +30,31 @@ namespace Azure.Connectors.Sdk.AzureAutomation.Models #region Types /// - /// Response for List subscriptions + /// Response for Get status of job + /// + public class CreateJobResponse + { + /// Resource ID of the Job + [JsonPropertyName("id")] + public string ResourceId { get; set; } + + /// properties + [JsonPropertyName("properties")] + public JsonElement? Properties { get; set; } + } + + /// + /// Create job + /// + public class CreateJobInput + { + /// properties + [JsonPropertyName("properties")] + public JsonElement? Properties { get; set; } + } + + /// + /// Subscription list operation response. /// public class SubscriptionListResult : IPageable { @@ -44,7 +68,7 @@ public class SubscriptionListResult : IPageable } /// - /// Item in The subscriptions. + /// Subscription information. /// public class Subscription { @@ -79,7 +103,7 @@ public class Subscription } /// - /// Response for List resource groups + /// List of resource groups. /// public class ResourceGroupListResult : IPageable { @@ -94,7 +118,7 @@ public class ResourceGroupListResult : IPageable } /// - /// Item in The list of resource groups. + /// Resource group information. /// public class ResourceGroup { @@ -124,20 +148,6 @@ public class AutomationAccountResponse public List Value { get; set; } } - /// - /// Response for Get status of job - /// - public class CreateJobResponse - { - /// Resource ID of the Job - [JsonPropertyName("id")] - public string ResourceId { get; set; } - - /// properties - [JsonPropertyName("properties")] - public JsonElement? Properties { get; set; } - } - /// /// Response for List runbooks /// @@ -148,16 +158,6 @@ public class RunbookListResults public List Value { get; set; } } - /// - /// Create job - /// - public class CreateJobInput - { - /// properties - [JsonPropertyName("properties")] - public JsonElement? Properties { get; set; } - } - /// /// Extensible enum for known State values. /// @@ -230,6 +230,32 @@ public StateJsonConverter() { } /// public static class AzureAutomationModelFactory { + /// + /// Creates a new instance of . + /// + public static CreateJobResponse CreateJobResponse( + string resourceId = default, + JsonElement? properties = default) + { + return new CreateJobResponse + { + ResourceId = resourceId, + Properties = properties, + }; + } + + /// + /// Creates a new instance of . + /// + public static CreateJobInput CreateJobInput( + JsonElement? properties = default) + { + return new CreateJobInput + { + Properties = properties, + }; + } + /// /// Creates a new instance of . /// @@ -308,20 +334,6 @@ public static AutomationAccountResponse AutomationAccountResponse( }; } - /// - /// Creates a new instance of . - /// - public static CreateJobResponse CreateJobResponse( - string resourceId = default, - JsonElement? properties = default) - { - return new CreateJobResponse - { - ResourceId = resourceId, - Properties = properties, - }; - } - /// /// Creates a new instance of . /// @@ -333,18 +345,6 @@ public static RunbookListResults RunbookListResults( Value = value, }; } - - /// - /// Creates a new instance of . - /// - public static CreateJobInput CreateJobInput( - JsonElement? properties = default) - { - return new CreateJobInput - { - Properties = properties, - }; - } } #endregion Model Factory @@ -421,64 +421,33 @@ protected AzureAutomationClient() : base() { } public override string ToString() => base.ToString(); /// - /// List subscriptions - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable SubscriptionsListAsync(CancellationToken cancellationToken = default) - { - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2015-11-01"); - var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List resource groups - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ResourceGroupsListAsync([DynamicValues("Subscriptions_List")] string subscription, CancellationToken cancellationToken = default) - { - if (subscription is null) - throw new ArgumentNullException(nameof(subscription)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2015-10-31"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List Automation accounts + /// Get job output /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Get outputs of an Azure Automation job. /// Subscription /// Resource Group + /// Automation Account + /// Job ID /// Cancellation token. - /// The List Automation accounts response. - public virtual async Task AutomationAccountsListAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) + /// The Get job output response. + public virtual async Task GetJobOutputAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, string jobId, CancellationToken cancellationToken = default) { - using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.AutomationAccountsListAsync"); + using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.GetJobOutputAsync"); try { if (subscription is null) throw new ArgumentNullException(nameof(subscription)); if (resourceGroup is null) throw new ArgumentNullException(nameof(resourceGroup)); + if (automationAccount is null) + throw new ArgumentNullException(nameof(automationAccount)); + if (jobId is null) + throw new ArgumentNullException(nameof(jobId)); var queryParams = new List(); queryParams.Add("x-ms-api-version=2015-10-31"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs/{Uri.EscapeDataString(jobId.ToString())}/output" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -490,18 +459,18 @@ public virtual async Task AutomationAccountsListAsync } /// - /// Get job output + /// Get status of job /// - /// Get outputs of an Azure Automation job. + /// Get Status of a Job /// Subscription /// Resource Group /// Automation Account /// Job ID /// Cancellation token. - /// The Get job output response. - public virtual async Task GetJobOutputAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, string jobId, CancellationToken cancellationToken = default) + /// The Get status of job response. + public virtual async Task GetStatusOfJobAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, string jobId, CancellationToken cancellationToken = default) { - using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.GetJobOutputAsync"); + using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.GetStatusOfJobAsync"); try { if (subscription is null) @@ -514,9 +483,9 @@ public virtual async Task GetJobOutputAsync([DynamicValues("Subscription throw new ArgumentNullException(nameof(jobId)); var queryParams = new List(); queryParams.Add("x-ms-api-version=2015-10-31"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs/{Uri.EscapeDataString(jobId.ToString())}/output" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs/{Uri.EscapeDataString(jobId.ToString())}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -528,18 +497,20 @@ public virtual async Task GetJobOutputAsync([DynamicValues("Subscription } /// - /// Get status of job + /// Create job /// - /// Get Status of a Job + /// Create Job to run on hybrid worker /// Subscription /// Resource Group /// Automation Account - /// Job ID + /// The request body. + /// Runbook Name + /// Wait for Job /// Cancellation token. - /// The Get status of job response. - public virtual async Task GetStatusOfJobAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, string jobId, CancellationToken cancellationToken = default) + /// The Create job response. + public virtual async Task CreateJobAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, CreateJobInput input, [DynamicValues("Runbooks_List")] string runbookName = default, bool? waitForJob = default, CancellationToken cancellationToken = default) { - using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.GetStatusOfJobAsync"); + using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.CreateJobAsync"); try { if (subscription is null) @@ -548,13 +519,15 @@ public virtual async Task GetStatusOfJobAsync([DynamicValues( throw new ArgumentNullException(nameof(resourceGroup)); if (automationAccount is null) throw new ArgumentNullException(nameof(automationAccount)); - if (jobId is null) - throw new ArgumentNullException(nameof(jobId)); var queryParams = new List(); queryParams.Add("x-ms-api-version=2015-10-31"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs/{Uri.EscapeDataString(jobId.ToString())}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (runbookName != default) + queryParams.Add($"runbookName={Uri.EscapeDataString(runbookName.ToString())}"); + if (waitForJob.HasValue) + queryParams.Add($"wait={Uri.EscapeDataString(waitForJob.Value.ToString())}"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -566,30 +539,64 @@ public virtual async Task GetStatusOfJobAsync([DynamicValues( } /// - /// List runbooks + /// List subscriptions + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable SubscriptionsListAsync(CancellationToken cancellationToken = default) + { + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2015-11-01"); + var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List resource groups + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable ResourceGroupsListAsync([DynamicValues("Subscriptions_List")] string subscription, CancellationToken cancellationToken = default) + { + if (subscription is null) + throw new ArgumentNullException(nameof(subscription)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2015-10-31"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List Automation accounts /// /// Discovery method used to populate dynamic parameter values at design time. /// Subscription /// Resource Group - /// Automation Account /// Cancellation token. - /// The List runbooks response. - public virtual async Task RunbooksListAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, CancellationToken cancellationToken = default) + /// The List Automation accounts response. + public virtual async Task AutomationAccountsListAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) { - using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.RunbooksListAsync"); + using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.AutomationAccountsListAsync"); try { if (subscription is null) throw new ArgumentNullException(nameof(subscription)); if (resourceGroup is null) throw new ArgumentNullException(nameof(resourceGroup)); - if (automationAccount is null) - throw new ArgumentNullException(nameof(automationAccount)); var queryParams = new List(); queryParams.Add("x-ms-api-version=2015-10-31"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/runbooks" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -601,20 +608,17 @@ public virtual async Task RunbooksListAsync([DynamicValues(" } /// - /// Create job + /// List runbooks /// - /// Create Job to run on hybrid worker + /// Discovery method used to populate dynamic parameter values at design time. /// Subscription /// Resource Group /// Automation Account - /// The request body. - /// Runbook Name - /// Wait for Job /// Cancellation token. - /// The Create job response. - public virtual async Task CreateJobAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, CreateJobInput input, [DynamicValues("Runbooks_List")] string runbookName = default, bool? waitForJob = default, CancellationToken cancellationToken = default) + /// The List runbooks response. + public virtual async Task RunbooksListAsync([DynamicValues("Subscriptions_List")] string subscription, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("AutomationAccounts_List")] string automationAccount, CancellationToken cancellationToken = default) { - using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.CreateJobAsync"); + using var activity = AzureAutomationClient.ConnectorActivitySource.StartActivity("AzureAutomationClient.RunbooksListAsync"); try { if (subscription is null) @@ -625,13 +629,9 @@ public virtual async Task CreateJobAsync([DynamicValues("Subs throw new ArgumentNullException(nameof(automationAccount)); var queryParams = new List(); queryParams.Add("x-ms-api-version=2015-10-31"); - if (runbookName != default) - queryParams.Add($"runbookName={Uri.EscapeDataString(runbookName.ToString())}"); - if (waitForJob.HasValue) - queryParams.Add($"wait={Uri.EscapeDataString(waitForJob.Value.ToString())}"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/jobs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourceGroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Automation/automationAccounts/{Uri.EscapeDataString(automationAccount.ToString())}/runbooks" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/AzureBlobExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureBlobExtensions.cs index 74ebdac..fb5cfdc 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureBlobExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureBlobExtensions.cs @@ -31,31 +31,7 @@ namespace Azure.Connectors.Sdk.AzureBlob.Models #region Types /// - /// Response for Get storage accounts - /// - public class StorageAccountList - { - /// List of storage account names - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of storage account names - /// - public class StorageAccount - { - /// The name of the storage account. - [JsonPropertyName("Name")] - public string StorageAccountName { get; set; } - - /// The display name of the storage account. - [JsonPropertyName("DisplayName")] - public string StorageAccountDisplayName { get; set; } - } - - /// - /// Response for Copy blob (V2) + /// Blob metadata /// public class BlobMetadata { @@ -103,7 +79,7 @@ public class BlobMetadata } /// - /// Response for Create SAS URI by path (V2) + /// Shared access signature /// public class SharedAccessSignature { @@ -113,7 +89,7 @@ public class SharedAccessSignature } /// - /// Response for Get available access policies (V2) + /// The set of parameters to generate a SAS link. /// public class SharedAccessSignatureBlobPolicy { @@ -143,7 +119,7 @@ public class SharedAccessSignatureBlobPolicy } /// - /// Response for Get Blob Metadata (V2) + /// Data with sensitivity label info /// public class DataWithSensitivityLabelInfo { @@ -195,7 +171,7 @@ public class DataWithSensitivityLabelInfo } /// - /// Item in Sensitivity label metadata info list + /// SensitivityLabel metadata info /// public class SensitivityLabelMetadata { @@ -241,7 +217,7 @@ public class SensitivityLabelMetadata } /// - /// Response for Lists blobs (V2) + /// Represents a list of blobs alongside their respective sensitivity label metadata. /// public class ListOfBlobsWithSensitivityLabels { @@ -251,7 +227,7 @@ public class ListOfBlobsWithSensitivityLabels } /// - /// Response for Lists blobs in the root folder (V2) + /// Represents a page of blob metadata. /// public class BlobMetadataPage : IPageable { @@ -269,6 +245,30 @@ public class BlobMetadataPage : IPageable public string NextPageMarker { get; set; } } + /// + /// List of storage account names + /// + public class StorageAccountList + { + /// List of storage account names + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Storage account + /// + public class StorageAccount + { + /// The name of the storage account. + [JsonPropertyName("Name")] + public string StorageAccountName { get; set; } + + /// The display name of the storage account. + [JsonPropertyName("DisplayName")] + public string StorageAccountDisplayName { get; set; } + } + /// /// Extensible enum for known AccessProtocol values. /// @@ -405,32 +405,6 @@ public PermissionsJsonConverter() { } /// public static class AzureBlobModelFactory { - /// - /// Creates a new instance of . - /// - public static StorageAccountList StorageAccountList( - List value = default) - { - return new StorageAccountList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static StorageAccount StorageAccount( - string storageAccountName = default, - string storageAccountDisplayName = default) - { - return new StorageAccount - { - StorageAccountName = storageAccountName, - StorageAccountDisplayName = storageAccountDisplayName, - }; - } - /// /// Creates a new instance of . /// @@ -584,6 +558,32 @@ public static BlobMetadataPage BlobMetadataPage( NextPageMarker = nextPageMarker, }; } + + /// + /// Creates a new instance of . + /// + public static StorageAccountList StorageAccountList( + List value = default) + { + return new StorageAccountList + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static StorageAccount StorageAccount( + string storageAccountName = default, + string storageAccountDisplayName = default) + { + return new StorageAccount + { + StorageAccountName = storageAccountName, + StorageAccountDisplayName = storageAccountDisplayName, + }; + } } #endregion Model Factory @@ -657,6 +657,13 @@ public static class AzureBlobTriggerParameters /// public static class OnUpdatedFiles { + /// + /// Azure Storage account name or blob endpoint. + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + /// /// Select a container. /// Required. @@ -747,30 +754,6 @@ protected AzureBlobClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get storage accounts - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get storage accounts response. - public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) - { - using var activity = AzureBlobClient.ConnectorActivitySource.StartActivity("AzureBlobClient.GetDataSetsAsync"); - try - { - var path = $"/v2/codeless/GetDataSets"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Copy blob (V2) /// @@ -1309,6 +1292,30 @@ public virtual async Task UpdateFileAsync([DynamicValues("GetDataS } } + /// + /// Get storage accounts + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get storage accounts response. + public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) + { + using var activity = AzureBlobClient.ConnectorActivitySource.StartActivity("AzureBlobClient.GetDataSetsAsync"); + try + { + var path = $"/v2/codeless/GetDataSets"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/AzureDataFactoryExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureDataFactoryExtensions.cs index 36ee16d..282d45e 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureDataFactoryExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureDataFactoryExtensions.cs @@ -29,47 +29,6 @@ namespace Azure.Connectors.Sdk.AzureDataFactory.Models #region Types - /// - /// Response for List pipelines - /// - public class PipelineListResult : IPageable - { - /// The list of Data Factories. - [JsonPropertyName("value")] - public List Value { get; set; } - - /// The URL to get the next set of results. - [JsonPropertyName("nextLink")] - [JsonInclude] - public string NextLink { get; init; } - } - - /// - /// Item in The list of Data Factories. - /// - public class Pipeline - { - /// The resource identifier. - [JsonPropertyName("id")] - [JsonInclude] - public string Id { get; init; } - - /// The resource name of the pipeline. - [JsonPropertyName("name")] - [JsonInclude] - public string Name { get; init; } - - /// The pipeline properties. - [JsonPropertyName("properties")] - [JsonInclude] - public JsonElement? Properties { get; init; } - - /// Etag identifies change in the resource. - [JsonPropertyName("etag")] - [JsonInclude] - public string Etag { get; init; } - } - /// /// Response for Create a pipeline run /// @@ -81,63 +40,7 @@ public class CreatePipelineRunResponse } /// - /// Response for List Factories - /// - public class DataFactoryListResult : IPageable - { - /// The list of Data Factories. - [JsonPropertyName("value")] - public List Value { get; set; } - - /// The URL to get the next set of results. - [JsonPropertyName("nextLink")] - [JsonInclude] - public string NextLink { get; init; } - } - - /// - /// Item in The list of Data Factories. - /// - public class DataFactory - { - /// The resource name. - [JsonPropertyName("name")] - [JsonInclude] - public string Name { get; init; } - - /// The resource tags. - [JsonPropertyName("tags")] - [JsonInclude] - public JsonElement? Tags { get; init; } - - /// Data Factory additional properties. - [JsonPropertyName("properties")] - [JsonInclude] - public JsonElement? Properties { get; init; } - - /// Managed service identity of the factory. - [JsonPropertyName("identity")] - [JsonInclude] - public JsonElement? Identity { get; init; } - - /// The resource identitfier. - [JsonPropertyName("id")] - [JsonInclude] - public string Id { get; init; } - - /// The resource type. - [JsonPropertyName("type")] - [JsonInclude] - public string Type { get; init; } - - /// The resource location - [JsonPropertyName("location")] - [JsonInclude] - public string Location { get; init; } - } - - /// - /// Response for Get a pipeline run + /// Information about a pipeline run. /// public class PipelineRun { @@ -198,7 +101,7 @@ public class PipelineRun } /// - /// Response for List subscriptions + /// Subscription list operation response. /// public class SubscriptionListResult : IPageable { @@ -212,7 +115,7 @@ public class SubscriptionListResult : IPageable } /// - /// Item in The subscriptions. + /// Subscription information. /// public class Subscription { @@ -251,7 +154,7 @@ public class Subscription } /// - /// subscriptionPolicies + /// Subscription policies. /// public class SubscriptionPolicies { @@ -272,7 +175,7 @@ public class SubscriptionPolicies } /// - /// Response for List resource groups + /// List of resource groups. /// public class ResourceGroupListResult : IPageable { @@ -287,7 +190,7 @@ public class ResourceGroupListResult : IPageable } /// - /// Item in The list of resource groups. + /// Resource group information. /// public class ResourceGroup { @@ -320,7 +223,7 @@ public class ResourceGroup } /// - /// properties + /// The resource group properties. /// public class ResourceGroupProperties { @@ -331,7 +234,104 @@ public class ResourceGroupProperties } /// - /// Activity + /// List of Data Factories. + /// + public class DataFactoryListResult : IPageable + { + /// The list of Data Factories. + [JsonPropertyName("value")] + public List Value { get; set; } + + /// The URL to get the next set of results. + [JsonPropertyName("nextLink")] + [JsonInclude] + public string NextLink { get; init; } + } + + /// + /// DataFactory information. + /// + public class DataFactory + { + /// The resource name. + [JsonPropertyName("name")] + [JsonInclude] + public string Name { get; init; } + + /// The resource tags. + [JsonPropertyName("tags")] + [JsonInclude] + public JsonElement? Tags { get; init; } + + /// Data Factory additional properties. + [JsonPropertyName("properties")] + [JsonInclude] + public JsonElement? Properties { get; init; } + + /// Managed service identity of the factory. + [JsonPropertyName("identity")] + [JsonInclude] + public JsonElement? Identity { get; init; } + + /// The resource identitfier. + [JsonPropertyName("id")] + [JsonInclude] + public string Id { get; init; } + + /// The resource type. + [JsonPropertyName("type")] + [JsonInclude] + public string Type { get; init; } + + /// The resource location + [JsonPropertyName("location")] + [JsonInclude] + public string Location { get; init; } + } + + /// + /// List of pipelines. + /// + public class PipelineListResult : IPageable + { + /// The list of Data Factories. + [JsonPropertyName("value")] + public List Value { get; set; } + + /// The URL to get the next set of results. + [JsonPropertyName("nextLink")] + [JsonInclude] + public string NextLink { get; init; } + } + + /// + /// Pipeline information. + /// + public class Pipeline + { + /// The resource identifier. + [JsonPropertyName("id")] + [JsonInclude] + public string Id { get; init; } + + /// The resource name of the pipeline. + [JsonPropertyName("name")] + [JsonInclude] + public string Name { get; init; } + + /// The pipeline properties. + [JsonPropertyName("properties")] + [JsonInclude] + public JsonElement? Properties { get; init; } + + /// Etag identifies change in the resource. + [JsonPropertyName("etag")] + [JsonInclude] + public string Etag { get; init; } + } + + /// + /// Pipeline activity. /// public class Activity { @@ -343,7 +343,7 @@ public class Activity } /// - /// ParameterValueSpecification + /// An object mapping parameter names to argument values. /// public class ParameterValueSpecification { @@ -481,38 +481,6 @@ public StateJsonConverter() { } /// public static class AzureDataFactoryModelFactory { - /// - /// Creates a new instance of . - /// - public static PipelineListResult PipelineListResult( - List value = default, - string nextLink = default) - { - return new PipelineListResult - { - Value = value, - NextLink = nextLink, - }; - } - - /// - /// Creates a new instance of . - /// - public static Pipeline Pipeline( - string id = default, - string name = default, - JsonElement? properties = default, - string etag = default) - { - return new Pipeline - { - Id = id, - Name = name, - Properties = properties, - Etag = etag, - }; - } - /// /// Creates a new instance of . /// @@ -525,44 +493,6 @@ public static CreatePipelineRunResponse CreatePipelineRunResponse( }; } - /// - /// Creates a new instance of . - /// - public static DataFactoryListResult DataFactoryListResult( - List value = default, - string nextLink = default) - { - return new DataFactoryListResult - { - Value = value, - NextLink = nextLink, - }; - } - - /// - /// Creates a new instance of . - /// - public static DataFactory DataFactory( - string name = default, - JsonElement? tags = default, - JsonElement? properties = default, - JsonElement? identity = default, - string id = default, - string type = default, - string location = default) - { - return new DataFactory - { - Name = name, - Tags = tags, - Properties = properties, - Identity = identity, - Id = id, - Type = type, - Location = location, - }; - } - /// /// Creates a new instance of . /// @@ -696,6 +626,76 @@ public static ResourceGroupProperties ResourceGroupProperties( ProvisioningState = provisioningState, }; } + + /// + /// Creates a new instance of . + /// + public static DataFactoryListResult DataFactoryListResult( + List value = default, + string nextLink = default) + { + return new DataFactoryListResult + { + Value = value, + NextLink = nextLink, + }; + } + + /// + /// Creates a new instance of . + /// + public static DataFactory DataFactory( + string name = default, + JsonElement? tags = default, + JsonElement? properties = default, + JsonElement? identity = default, + string id = default, + string type = default, + string location = default) + { + return new DataFactory + { + Name = name, + Tags = tags, + Properties = properties, + Identity = identity, + Id = id, + Type = type, + Location = location, + }; + } + + /// + /// Creates a new instance of . + /// + public static PipelineListResult PipelineListResult( + List value = default, + string nextLink = default) + { + return new PipelineListResult + { + Value = value, + NextLink = nextLink, + }; + } + + /// + /// Creates a new instance of . + /// + public static Pipeline Pipeline( + string id = default, + string name = default, + JsonElement? properties = default, + string etag = default) + { + return new Pipeline + { + Id = id, + Name = name, + Properties = properties, + Etag = etag, + }; + } } #endregion Model Factory @@ -771,32 +771,6 @@ protected AzureDataFactoryClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// List pipelines - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription - /// Resource Group - /// Data Factory Name - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ListPipelinesAsync([DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, [DynamicValues("ListDataFactories")] string dataFactoryName, CancellationToken cancellationToken = default) - { - if (subscription is null) - throw new ArgumentNullException(nameof(subscription)); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - if (dataFactoryName is null) - throw new ArgumentNullException(nameof(dataFactoryName)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2017-09-01-preview"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.DataFactory/factories/{Uri.EscapeDataString(dataFactoryName.ToString())}/pipelines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - /// /// Create a pipeline run /// @@ -876,29 +850,6 @@ await this } } - /// - /// List Factories - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription - /// Resource Group - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ListDataFactoriesAsync([DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, CancellationToken cancellationToken = default) - { - if (subscription is null) - throw new ArgumentNullException(nameof(subscription)); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2017-09-01-preview"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.DataFactory/factories" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - /// /// Get a pipeline run /// @@ -980,6 +931,55 @@ public virtual AsyncPageable ListResourceGroupsAsync([DynamicValu cancellationToken); } + /// + /// List Factories + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription + /// Resource Group + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable ListDataFactoriesAsync([DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, CancellationToken cancellationToken = default) + { + if (subscription is null) + throw new ArgumentNullException(nameof(subscription)); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2017-09-01-preview"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.DataFactory/factories" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List pipelines + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription + /// Resource Group + /// Data Factory Name + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable ListPipelinesAsync([DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, [DynamicValues("ListDataFactories")] string dataFactoryName, CancellationToken cancellationToken = default) + { + if (subscription is null) + throw new ArgumentNullException(nameof(subscription)); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + if (dataFactoryName is null) + throw new ArgumentNullException(nameof(dataFactoryName)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2017-09-01-preview"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscription.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.DataFactory/factories/{Uri.EscapeDataString(dataFactoryName.ToString())}/pipelines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/AzureEventGridExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureEventGridExtensions.cs index 98ddd4b..d7f1e72 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureEventGridExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureEventGridExtensions.cs @@ -29,17 +29,7 @@ namespace Azure.Connectors.Sdk.AzureEventGrid.Models #region Types /// - /// Response for TopicTypes_List - /// - public class TopicTypesResponse - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Response for List subscriptions + /// Subscription list operation response. /// public class SubscriptionListResult { @@ -69,6 +59,16 @@ public class Subscription public string DisplayName { get; init; } } + /// + /// Response for TopicTypes_List + /// + public class TopicTypesResponse + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + /// /// EventRequest /// @@ -90,18 +90,6 @@ public class EventRequest /// public static class AzureEventGridModelFactory { - /// - /// Creates a new instance of . - /// - public static TopicTypesResponse TopicTypesResponse( - List value = default) - { - return new TopicTypesResponse - { - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -130,6 +118,18 @@ public static Subscription Subscription( }; } + /// + /// Creates a new instance of . + /// + public static TopicTypesResponse TopicTypesResponse( + List value = default) + { + return new TopicTypesResponse + { + Value = value, + }; + } + /// /// Creates a new instance of . /// @@ -188,6 +188,20 @@ public static class OnCreateSubscription /// public const string XMsApiVersion = "x-ms-api-version"; + /// + /// The unique identifier for the Microsoft Azure subscription. The subscription ID forms part of the ID for every Azure resource. + /// Required. + /// Dynamic values from: Subscriptions_List. + /// + public const string SubscriptionId = "subscriptionId"; + + /// + /// Type of resource to create event subscription on. + /// Required. + /// Dynamic values from: TopicTypes_List. + /// + public const string ResourceType = "resourceType"; + /// /// Name to use for the new Event Grid subscription. /// @@ -266,21 +280,21 @@ protected AzureEventGridClient() : base() { } public override string ToString() => base.ToString(); /// - /// TopicTypes_List + /// List subscriptions /// /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The TopicTypes_List response. - public virtual async Task TopicTypesListAsync(CancellationToken cancellationToken = default) + /// The List subscriptions response. + public virtual async Task SubscriptionsListAsync(CancellationToken cancellationToken = default) { - using var activity = AzureEventGridClient.ConnectorActivitySource.StartActivity("AzureEventGridClient.TopicTypesListAsync"); + using var activity = AzureEventGridClient.ConnectorActivitySource.StartActivity("AzureEventGridClient.SubscriptionsListAsync"); try { var queryParams = new List(); - queryParams.Add("x-ms-api-version=2017-09-15-preview"); - var path = $"/providers/Microsoft.EventGrid/topicTypes" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + queryParams.Add("x-ms-api-version=2015-11-01"); + var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -292,21 +306,21 @@ public virtual async Task TopicTypesListAsync(CancellationTo } /// - /// List subscriptions + /// TopicTypes_List /// /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The List subscriptions response. - public virtual async Task SubscriptionsListAsync(CancellationToken cancellationToken = default) + /// The TopicTypes_List response. + public virtual async Task TopicTypesListAsync(CancellationToken cancellationToken = default) { - using var activity = AzureEventGridClient.ConnectorActivitySource.StartActivity("AzureEventGridClient.SubscriptionsListAsync"); + using var activity = AzureEventGridClient.ConnectorActivitySource.StartActivity("AzureEventGridClient.TopicTypesListAsync"); try { var queryParams = new List(); - queryParams.Add("x-ms-api-version=2015-11-01"); - var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + queryParams.Add("x-ms-api-version=2017-09-15-preview"); + var path = $"/providers/Microsoft.EventGrid/topicTypes" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/AzureMonitorLogsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureMonitorLogsExtensions.cs index 01cf5e6..6b86eff 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureMonitorLogsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureMonitorLogsExtensions.cs @@ -30,7 +30,85 @@ namespace Azure.Connectors.Sdk.AzureMonitorLogs.Models #region Types /// - /// Response for List subscriptions + /// Time range selection parameters. + /// + public class QueryDataInput + { + /// Specify the query you would like to run. + [JsonPropertyName("query")] + public string Query { get; set; } + + /// Select Time Range type. + [JsonPropertyName("timerangetype")] + public string TimeRangeType { get; set; } + + /// Time Range + [JsonPropertyName("timerange")] + public JsonElement? TimeRange { get; set; } + } + + /// + /// Response for Run query and list results V2 + /// + public class Table + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Row + /// + [DynamicSchema("QuerySchemaV2")] + public class Row + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// Time range selection parameters. + /// + public class VisualizeQueryInput + { + /// Specify the query you would like to run. + [JsonPropertyName("query")] + public string Query { get; set; } + + /// Select Time Range type. + [JsonPropertyName("timerangetype")] + public string TimeRangeType { get; set; } + + /// Time Range + [JsonPropertyName("timerange")] + public JsonElement? TimeRange { get; set; } + } + + /// + /// Response for Run query and visualize results V2 + /// + public class VisualizeResults + { + /// body + [JsonPropertyName("body")] + public string Body { get; set; } + + /// attachmentContent + [JsonPropertyName("attachmentContent")] + public string AttachmentContent { get; set; } + + /// attachmentName + [JsonPropertyName("attachmentName")] + public string AttachmentName { get; set; } + } + + /// + /// Subscription list operation response. /// public class SubscriptionListResult : IPageable { @@ -44,7 +122,7 @@ public class SubscriptionListResult : IPageable } /// - /// Item in The subscriptions . + /// Subscription information. /// public class Subscription { @@ -64,7 +142,7 @@ public class Subscription } /// - /// Response for List resource groups + /// List of resource groups. /// public class ResourceGroupListResult : IPageable { @@ -79,7 +157,7 @@ public class ResourceGroupListResult : IPageable } /// - /// Item in The list of resource groups. + /// Resource group information. /// public class ResourceGroup { @@ -95,7 +173,7 @@ public class ResourceGroup } /// - /// Response for List resources + /// List of resource items. /// public class ResourceItemListResult : IPageable { @@ -110,7 +188,7 @@ public class ResourceItemListResult : IPageable } /// - /// Item in The list of resource items. + /// Resource item. /// public class ResourceItem { @@ -125,48 +203,6 @@ public class ResourceItem public string Name { get; init; } } - /// - /// Run query and list results V2 - /// - public class QueryDataInput - { - /// Specify the query you would like to run. - [JsonPropertyName("query")] - public string Query { get; set; } - - /// Select Time Range type. - [JsonPropertyName("timerangetype")] - public string TimeRangeType { get; set; } - - /// Time Range - [JsonPropertyName("timerange")] - public JsonElement? TimeRange { get; set; } - } - - /// - /// Response for Run query and list results V2 - /// - public class Table - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in value - /// - [DynamicSchema("QuerySchemaV2")] - public class Row - { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - /// /// Response for Get query schema /// @@ -180,39 +216,34 @@ public class ObjectEntity } /// - /// Run query and visualize results V2 + /// List of time range types. /// - public class VisualizeQueryInput + public class TimeRangeListResult : IPageable { - /// Specify the query you would like to run. - [JsonPropertyName("query")] - public string Query { get; set; } - - /// Select Time Range type. - [JsonPropertyName("timerangetype")] - public string TimeRangeType { get; set; } + /// The list of time range. + [JsonPropertyName("value")] + public List Value { get; set; } - /// Time Range - [JsonPropertyName("timerange")] - public JsonElement? TimeRange { get; set; } + /// The URL to get the next set of results. + [JsonPropertyName("nextLink")] + [JsonInclude] + public string NextLink { get; init; } } /// - /// Response for Run query and visualize results V2 + /// Time range item. /// - public class VisualizeResults + public class TimeRangeItem { - /// body - [JsonPropertyName("body")] - public string Body { get; set; } - - /// attachmentContent - [JsonPropertyName("attachmentContent")] - public string AttachmentContent { get; set; } + /// The ID of the item. + [JsonPropertyName("id")] + [JsonInclude] + public int? Id { get; init; } - /// attachmentName - [JsonPropertyName("attachmentName")] - public string AttachmentName { get; set; } + /// The Name of the item. + [JsonPropertyName("name")] + [JsonInclude] + public string Name { get; init; } } #endregion Types @@ -226,6 +257,66 @@ public class VisualizeResults /// public static class AzureMonitorLogsModelFactory { + /// + /// Creates a new instance of . + /// + public static QueryDataInput QueryDataInput( + string query = default, + string timeRangeType = default, + JsonElement? timeRange = default) + { + return new QueryDataInput + { + Query = query, + TimeRangeType = timeRangeType, + TimeRange = timeRange, + }; + } + + /// + /// Creates a new instance of . + /// + public static Table Table( + List value = default) + { + return new Table + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static VisualizeQueryInput VisualizeQueryInput( + string query = default, + string timeRangeType = default, + JsonElement? timeRange = default) + { + return new VisualizeQueryInput + { + Query = query, + TimeRangeType = timeRangeType, + TimeRange = timeRange, + }; + } + + /// + /// Creates a new instance of . + /// + public static VisualizeResults VisualizeResults( + string body = default, + string attachmentContent = default, + string attachmentName = default) + { + return new VisualizeResults + { + Body = body, + AttachmentContent = attachmentContent, + AttachmentName = attachmentName, + }; + } + /// /// Creates a new instance of . /// @@ -313,62 +404,30 @@ public static ResourceItem ResourceItem( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static QueryDataInput QueryDataInput( - string query = default, - string timeRangeType = default, - JsonElement? timeRange = default) + public static TimeRangeListResult TimeRangeListResult( + List value = default, + string nextLink = default) { - return new QueryDataInput - { - Query = query, - TimeRangeType = timeRangeType, - TimeRange = timeRange, - }; - } - - /// - /// Creates a new instance of . - /// - public static Table Table( - List value = default) - { - return new Table + return new TimeRangeListResult { Value = value, + NextLink = nextLink, }; } /// - /// Creates a new instance of . - /// - public static VisualizeQueryInput VisualizeQueryInput( - string query = default, - string timeRangeType = default, - JsonElement? timeRange = default) - { - return new VisualizeQueryInput - { - Query = query, - TimeRangeType = timeRangeType, - TimeRange = timeRange, - }; - } - - /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static VisualizeResults VisualizeResults( - string body = default, - string attachmentContent = default, - string attachmentName = default) + public static TimeRangeItem TimeRangeItem( + int? id = default, + string name = default) { - return new VisualizeResults + return new TimeRangeItem { - Body = body, - AttachmentContent = attachmentContent, - AttachmentName = attachmentName, + Id = id, + Name = name, }; } } @@ -446,6 +505,94 @@ protected AzureMonitorLogsClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); + /// + /// Run query and list results V2 + /// + /// Returns each row as its own object. Use this action when you want to work with each row separately in the rest of the workflow. + /// The request body. + /// Subscription + /// Resource Group + /// Resource Type + /// Resource Name + /// Cancellation token. + /// The Run query and list results V2 response. + public virtual async Task QueryDataAsync(QueryDataInput input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, CancellationToken cancellationToken = default) + { + using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.QueryDataAsync"); + try + { + var queryParams = new List(); + if (subscription is null) + throw new ArgumentNullException(nameof(subscription)); + queryParams.Add($"subscriptions={Uri.EscapeDataString(subscription.ToString())}"); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + queryParams.Add($"resourcegroups={Uri.EscapeDataString(resourceGroup.ToString())}"); + if (resourceType is null) + throw new ArgumentNullException(nameof(resourceType)); + queryParams.Add($"resourcetype={Uri.EscapeDataString(resourceType.ToString())}"); + if (resourceName is null) + throw new ArgumentNullException(nameof(resourceName)); + queryParams.Add($"resourcename={Uri.EscapeDataString(resourceName.ToString())}"); + var path = $"/queryDataV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync
(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Run query and visualize results V2 + /// + /// Returns all rows in the result set as a single formatted object. Use this action when you want to use the result set together in the rest of the workflow. + /// The request body. + /// Subscription + /// Resource Group + /// Resource Type + /// Resource Name + /// Chart Type + /// Cancellation token. + /// The Run query and visualize results V2 response. + public virtual async Task VisualizeQueryAsync(VisualizeQueryInput input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, string chartType, CancellationToken cancellationToken = default) + { + using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.VisualizeQueryAsync"); + try + { + var queryParams = new List(); + if (subscription is null) + throw new ArgumentNullException(nameof(subscription)); + queryParams.Add($"subscriptions={Uri.EscapeDataString(subscription.ToString())}"); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + queryParams.Add($"resourcegroups={Uri.EscapeDataString(resourceGroup.ToString())}"); + if (resourceType is null) + throw new ArgumentNullException(nameof(resourceType)); + queryParams.Add($"resourcetype={Uri.EscapeDataString(resourceType.ToString())}"); + if (resourceName is null) + throw new ArgumentNullException(nameof(resourceName)); + queryParams.Add($"resourcename={Uri.EscapeDataString(resourceName.ToString())}"); + if (chartType is null) + throw new ArgumentNullException(nameof(chartType)); + queryParams.Add($"visType={Uri.EscapeDataString(chartType.ToString())}"); + var path = $"/visualizeQueryV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// List subscriptions /// @@ -510,19 +657,19 @@ public virtual AsyncPageable ListResourcesAsync([DynamicValues("Li } /// - /// Run query and list results V2 + /// Get query schema /// - /// Returns each row as its own object. Use this action when you want to work with each row separately in the rest of the workflow. + /// Discovery method used to populate dynamic parameter values at design time. /// The request body. /// Subscription /// Resource Group /// Resource Type /// Resource Name /// Cancellation token. - /// The Run query and list results V2 response. - public virtual async Task
QueryDataAsync(QueryDataInput input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, CancellationToken cancellationToken = default) + /// The Get query schema response. + public virtual async Task QuerySchemaV2Async(string input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, CancellationToken cancellationToken = default) { - using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.QueryDataAsync"); + using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.QuerySchemaV2Async"); try { var queryParams = new List(); @@ -538,9 +685,9 @@ public virtual async Task
QueryDataAsync(QueryDataInput input, [DynamicVa if (resourceName is null) throw new ArgumentNullException(nameof(resourceName)); queryParams.Add($"resourcename={Uri.EscapeDataString(resourceName.ToString())}"); - var path = $"/queryDataV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/querySchemaV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync
(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -560,9 +707,10 @@ public virtual async Task
QueryDataAsync(QueryDataInput input, [DynamicVa /// Resource Group /// Resource Type /// Resource Name + /// Time Range /// Cancellation token. /// The Get query schema response. - public virtual async Task QuerySchemaAsync(string input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, CancellationToken cancellationToken = default) + public virtual async Task QuerySchemaAsync(string input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, [DynamicValues("ListTimeRangeTypes")] string timeRange, CancellationToken cancellationToken = default) { using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.QuerySchemaAsync"); try @@ -580,7 +728,10 @@ public virtual async Task QuerySchemaAsync(string input, [DynamicV if (resourceName is null) throw new ArgumentNullException(nameof(resourceName)); queryParams.Add($"resourcename={Uri.EscapeDataString(resourceName.ToString())}"); - var path = $"/querySchemaV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (timeRange is null) + throw new ArgumentNullException(nameof(timeRange)); + queryParams.Add($"timerange={Uri.EscapeDataString(timeRange.ToString())}"); + var path = $"/querySchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -594,49 +745,24 @@ public virtual async Task QuerySchemaAsync(string input, [DynamicV } /// - /// Run query and visualize results V2 + /// List time range types /// - /// Returns all rows in the result set as a single formatted object. Use this action when you want to use the result set together in the rest of the workflow. + /// Discovery method used to populate dynamic parameter values at design time. /// The request body. - /// Subscription - /// Resource Group /// Resource Type - /// Resource Name - /// Chart Type /// Cancellation token. - /// The Run query and visualize results V2 response. - public virtual async Task VisualizeQueryAsync(VisualizeQueryInput input, [DynamicValues("ListSubscriptions")] string subscription, [DynamicValues("ListResourceGroups")] string resourceGroup, string resourceType, [DynamicValues("ListResources")] string resourceName, string chartType, CancellationToken cancellationToken = default) + /// An async enumerable of items across all pages. + public virtual AsyncPageable ListTimeRangeTypesAsync(string input, string resourceType, CancellationToken cancellationToken = default) { - using var activity = AzureMonitorLogsClient.ConnectorActivitySource.StartActivity("AzureMonitorLogsClient.VisualizeQueryAsync"); - try - { - var queryParams = new List(); - if (subscription is null) - throw new ArgumentNullException(nameof(subscription)); - queryParams.Add($"subscriptions={Uri.EscapeDataString(subscription.ToString())}"); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - queryParams.Add($"resourcegroups={Uri.EscapeDataString(resourceGroup.ToString())}"); - if (resourceType is null) - throw new ArgumentNullException(nameof(resourceType)); - queryParams.Add($"resourcetype={Uri.EscapeDataString(resourceType.ToString())}"); - if (resourceName is null) - throw new ArgumentNullException(nameof(resourceName)); - queryParams.Add($"resourcename={Uri.EscapeDataString(resourceName.ToString())}"); - if (chartType is null) - throw new ArgumentNullException(nameof(chartType)); - queryParams.Add($"visType={Uri.EscapeDataString(chartType.ToString())}"); - var path = $"/visualizeQueryV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } + var queryParams = new List(); + if (resourceType is null) + throw new ArgumentNullException(nameof(resourceType)); + queryParams.Add($"resourcetype={Uri.EscapeDataString(resourceType.ToString())}"); + var path = $"/listTimeRangeTypes" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Post, path, input, ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Post, nextLink, input, cancellationToken: ct), + cancellationToken); } } diff --git a/src/Azure.Connectors.Sdk/Generated/AzureVMExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzureVMExtensions.cs index b557d17..d6b5c42 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzureVMExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzureVMExtensions.cs @@ -30,7 +30,74 @@ namespace Azure.Connectors.Sdk.AzureVM.Models #region Types /// - /// Response for List subscriptions + /// Virtual Machine information. + /// + public class VirtualMachineInScaleSet + { + /// The ID of the virtual machine. + [JsonPropertyName("id")] + [JsonInclude] + public string Id { get; init; } + + /// The Name of the virtual machine. + [JsonPropertyName("name")] + [JsonInclude] + public string Name { get; init; } + + /// The instance Id of the virtual machine. + [JsonPropertyName("instanceId")] + [JsonInclude] + public string InstanceId { get; init; } + + /// properties + [JsonPropertyName("properties")] + public VirtualMachineInScaleSetProperties Properties { get; set; } + } + + /// + /// Virtual Machine properties. + /// + public class VirtualMachineInScaleSetProperties + { + /// The state of the virtual machine. + [JsonPropertyName("provisioningState")] + [JsonInclude] + public string ProvisioningState { get; init; } + } + + /// + /// Virtual Machine information. + /// + public class VirtualMachine + { + /// The ID of the virtual machine. + [JsonPropertyName("id")] + [JsonInclude] + public string Id { get; init; } + + /// The Name of the virtual machine. + [JsonPropertyName("name")] + [JsonInclude] + public string Name { get; init; } + + /// properties + [JsonPropertyName("properties")] + public VirtualMachineProperties Properties { get; set; } + } + + /// + /// Virtual Machine properties. + /// + public class VirtualMachineProperties + { + /// The state of the virtual machine. + [JsonPropertyName("provisioningState")] + [JsonInclude] + public string ProvisioningState { get; init; } + } + + /// + /// Subscription list operation response. /// public class SubscriptionListResult : IPageable { @@ -44,7 +111,7 @@ public class SubscriptionListResult : IPageable } /// - /// Item in The subscriptions. + /// Subscription information. /// public class Subscription { @@ -79,7 +146,7 @@ public class Subscription } /// - /// Response for List resource groups + /// List of resource groups. /// public class ResourceGroupListResult : IPageable { @@ -94,7 +161,7 @@ public class ResourceGroupListResult : IPageable } /// - /// Item in The list of resource groups. + /// Resource group information. /// public class ResourceGroup { @@ -115,53 +182,7 @@ public class ResourceGroup } /// - /// Response for List virtual machines - /// - public class VirtualMachineListResult : IPageable - { - /// The list of virtual machines. - [JsonPropertyName("value")] - public List Value { get; set; } - - /// The URL to get the next set of results. - [JsonPropertyName("nextLink")] - [JsonInclude] - public string NextLink { get; init; } - } - - /// - /// Item in The list of virtual machines. - /// - public class VirtualMachine - { - /// The ID of the virtual machine. - [JsonPropertyName("id")] - [JsonInclude] - public string Id { get; init; } - - /// The Name of the virtual machine. - [JsonPropertyName("name")] - [JsonInclude] - public string Name { get; init; } - - /// properties - [JsonPropertyName("properties")] - public VirtualMachineProperties Properties { get; set; } - } - - /// - /// properties - /// - public class VirtualMachineProperties - { - /// The state of the virtual machine. - [JsonPropertyName("provisioningState")] - [JsonInclude] - public string ProvisioningState { get; init; } - } - - /// - /// Response for List virtual machine scale sets + /// List of virtual machine scale sets. /// public class VirtualMachineScaleSetListResult : IPageable { @@ -176,7 +197,7 @@ public class VirtualMachineScaleSetListResult : IPageable - /// Item in The list of virtual machine scale sets. + /// Virtual Machine scale set information. /// public class VirtualMachineScaleSet { @@ -196,7 +217,7 @@ public class VirtualMachineScaleSet } /// - /// properties + /// Virtual Machine scale set properties. /// public class VirtualMachineScaleSetProperties { @@ -207,7 +228,7 @@ public class VirtualMachineScaleSetProperties } /// - /// Response for List virtual machines in a VM scale set + /// List of virtual machines in a VM scale set. /// public class VirtualMachineInScaleSetListResult : IPageable { @@ -222,39 +243,18 @@ public class VirtualMachineInScaleSetListResult : IPageable - /// Item in The list of virtual machines in a VM scale set. + /// List of virtual machines. /// - public class VirtualMachineInScaleSet + public class VirtualMachineListResult : IPageable { - /// The ID of the virtual machine. - [JsonPropertyName("id")] - [JsonInclude] - public string Id { get; init; } - - /// The Name of the virtual machine. - [JsonPropertyName("name")] - [JsonInclude] - public string Name { get; init; } - - /// The instance Id of the virtual machine. - [JsonPropertyName("instanceId")] - [JsonInclude] - public string InstanceId { get; init; } - - /// properties - [JsonPropertyName("properties")] - public VirtualMachineInScaleSetProperties Properties { get; set; } - } + /// The list of virtual machines. + [JsonPropertyName("value")] + public List Value { get; set; } - /// - /// properties - /// - public class VirtualMachineInScaleSetProperties - { - /// The state of the virtual machine. - [JsonPropertyName("provisioningState")] + /// The URL to get the next set of results. + [JsonPropertyName("nextLink")] [JsonInclude] - public string ProvisioningState { get; init; } + public string NextLink { get; init; } } /// @@ -329,6 +329,64 @@ public StateJsonConverter() { } /// public static class AzureVMModelFactory { + /// + /// Creates a new instance of . + /// + public static VirtualMachineInScaleSet VirtualMachineInScaleSet( + string id = default, + string name = default, + string instanceId = default, + VirtualMachineInScaleSetProperties properties = default) + { + return new VirtualMachineInScaleSet + { + Id = id, + Name = name, + InstanceId = instanceId, + Properties = properties, + }; + } + + /// + /// Creates a new instance of . + /// + public static VirtualMachineInScaleSetProperties VirtualMachineInScaleSetProperties( + string provisioningState = default) + { + return new VirtualMachineInScaleSetProperties + { + ProvisioningState = provisioningState, + }; + } + + /// + /// Creates a new instance of . + /// + public static VirtualMachine VirtualMachine( + string id = default, + string name = default, + VirtualMachineProperties properties = default) + { + return new VirtualMachine + { + Id = id, + Name = name, + Properties = properties, + }; + } + + /// + /// Creates a new instance of . + /// + public static VirtualMachineProperties VirtualMachineProperties( + string provisioningState = default) + { + return new VirtualMachineProperties + { + ProvisioningState = provisioningState, + }; + } + /// /// Creates a new instance of . /// @@ -395,48 +453,6 @@ public static ResourceGroup ResourceGroup( }; } - /// - /// Creates a new instance of . - /// - public static VirtualMachineListResult VirtualMachineListResult( - List value = default, - string nextLink = default) - { - return new VirtualMachineListResult - { - Value = value, - NextLink = nextLink, - }; - } - - /// - /// Creates a new instance of . - /// - public static VirtualMachine VirtualMachine( - string id = default, - string name = default, - VirtualMachineProperties properties = default) - { - return new VirtualMachine - { - Id = id, - Name = name, - Properties = properties, - }; - } - - /// - /// Creates a new instance of . - /// - public static VirtualMachineProperties VirtualMachineProperties( - string provisioningState = default) - { - return new VirtualMachineProperties - { - ProvisioningState = provisioningState, - }; - } - /// /// Creates a new instance of . /// @@ -494,32 +510,16 @@ public static VirtualMachineInScaleSetListResult VirtualMachineInScaleSetListRes } /// - /// Creates a new instance of . - /// - public static VirtualMachineInScaleSet VirtualMachineInScaleSet( - string id = default, - string name = default, - string instanceId = default, - VirtualMachineInScaleSetProperties properties = default) - { - return new VirtualMachineInScaleSet - { - Id = id, - Name = name, - InstanceId = instanceId, - Properties = properties, - }; - } - - /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static VirtualMachineInScaleSetProperties VirtualMachineInScaleSetProperties( - string provisioningState = default) + public static VirtualMachineListResult VirtualMachineListResult( + List value = default, + string nextLink = default) { - return new VirtualMachineInScaleSetProperties + return new VirtualMachineListResult { - ProvisioningState = provisioningState, + Value = value, + NextLink = nextLink, }; } } @@ -597,115 +597,6 @@ protected AzureVMClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// List subscriptions - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable SubscriptionsListAsync(CancellationToken cancellationToken = default) - { - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2020-01-01"); - var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List resource groups - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription Id - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ResourceGroupsListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, CancellationToken cancellationToken = default) - { - if (subscriptionId is null) - throw new ArgumentNullException(nameof(subscriptionId)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2020-01-01"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List virtual machines - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription Id - /// Resource Group - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable VirtualMachinesListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) - { - if (subscriptionId is null) - throw new ArgumentNullException(nameof(subscriptionId)); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2019-12-01"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List virtual machine scale sets - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription Id - /// Resource Group - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable VirtualMachineScaleSetsListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) - { - if (subscriptionId is null) - throw new ArgumentNullException(nameof(subscriptionId)); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2019-12-01"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachineScaleSets" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// List virtual machines in a VM scale set - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Subscription Id - /// Resource Group - /// Virtual Machine Scale Set - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable VirtualMachinesInScaleSetListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("VirtualMachineScaleSets_List")] string virtualMachineScaleSet, CancellationToken cancellationToken = default) - { - if (subscriptionId is null) - throw new ArgumentNullException(nameof(subscriptionId)); - if (resourceGroup is null) - throw new ArgumentNullException(nameof(resourceGroup)); - if (virtualMachineScaleSet is null) - throw new ArgumentNullException(nameof(virtualMachineScaleSet)); - var queryParams = new List(); - queryParams.Add("x-ms-api-version=2019-12-01"); - var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachineScaleSets/{Uri.EscapeDataString(virtualMachineScaleSet.ToString())}/virtualMachines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - /// /// Get virtual machine in a VM scale set /// @@ -1205,6 +1096,115 @@ await this } } + /// + /// List subscriptions + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable SubscriptionsListAsync(CancellationToken cancellationToken = default) + { + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2020-01-01"); + var path = $"/subscriptions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List resource groups + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription Id + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable ResourceGroupsListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, CancellationToken cancellationToken = default) + { + if (subscriptionId is null) + throw new ArgumentNullException(nameof(subscriptionId)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2020-01-01"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List virtual machine scale sets + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription Id + /// Resource Group + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable VirtualMachineScaleSetsListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) + { + if (subscriptionId is null) + throw new ArgumentNullException(nameof(subscriptionId)); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2019-12-01"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachineScaleSets" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List virtual machines in a VM scale set + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription Id + /// Resource Group + /// Virtual Machine Scale Set + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable VirtualMachinesInScaleSetListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, [DynamicValues("VirtualMachineScaleSets_List")] string virtualMachineScaleSet, CancellationToken cancellationToken = default) + { + if (subscriptionId is null) + throw new ArgumentNullException(nameof(subscriptionId)); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + if (virtualMachineScaleSet is null) + throw new ArgumentNullException(nameof(virtualMachineScaleSet)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2019-12-01"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachineScaleSets/{Uri.EscapeDataString(virtualMachineScaleSet.ToString())}/virtualMachines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// List virtual machines + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Subscription Id + /// Resource Group + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable VirtualMachinesListAsync([DynamicValues("Subscriptions_List")] string subscriptionId, [DynamicValues("ResourceGroups_List")] string resourceGroup, CancellationToken cancellationToken = default) + { + if (subscriptionId is null) + throw new ArgumentNullException(nameof(subscriptionId)); + if (resourceGroup is null) + throw new ArgumentNullException(nameof(resourceGroup)); + var queryParams = new List(); + queryParams.Add("x-ms-api-version=2019-12-01"); + var path = $"/subscriptions/{Uri.EscapeDataString(subscriptionId.ToString())}/resourcegroups/{Uri.EscapeDataString(resourceGroup.ToString())}/providers/Microsoft.Compute/virtualMachines" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/AzurequeuesExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzurequeuesExtensions.cs index 3fd39b5..b0e0afb 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzurequeuesExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzurequeuesExtensions.cs @@ -28,30 +28,6 @@ namespace Azure.Connectors.Sdk.Azurequeues.Models #region Types - /// - /// Response for Get storage accounts - /// - public class StorageAccountList - { - /// List of storage account names - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of storage account names - /// - public class StorageAccount - { - /// The name or queue endpoint of the storage account. - [JsonPropertyName("Name")] - public string StorageAccountNameOrQueueEndpoint { get; set; } - - /// The display name of the storage account. - [JsonPropertyName("DisplayName")] - public string StorageAccountDisplayName { get; set; } - } - /// /// Response for Get messages (V2) /// @@ -116,6 +92,30 @@ public class QueueInfo public string Name { get; set; } } + /// + /// List of storage account names + /// + public class StorageAccountList + { + /// List of storage account names + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Storage account + /// + public class StorageAccount + { + /// The name or queue endpoint of the storage account. + [JsonPropertyName("Name")] + public string StorageAccountNameOrQueueEndpoint { get; set; } + + /// The display name of the storage account. + [JsonPropertyName("DisplayName")] + public string StorageAccountDisplayName { get; set; } + } + #endregion Types #region Model Factory @@ -127,32 +127,6 @@ public class QueueInfo /// public static class AzureQueuesModelFactory { - /// - /// Creates a new instance of . - /// - public static StorageAccountList StorageAccountList( - List value = default) - { - return new StorageAccountList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static StorageAccount StorageAccount( - string storageAccountNameOrQueueEndpoint = default, - string storageAccountDisplayName = default) - { - return new StorageAccount - { - StorageAccountNameOrQueueEndpoint = storageAccountNameOrQueueEndpoint, - StorageAccountDisplayName = storageAccountDisplayName, - }; - } - /// /// Creates a new instance of . /// @@ -188,6 +162,32 @@ public static QueueInfo QueueInfo( Name = name, }; } + + /// + /// Creates a new instance of . + /// + public static StorageAccountList StorageAccountList( + List value = default) + { + return new StorageAccountList + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static StorageAccount StorageAccount( + string storageAccountNameOrQueueEndpoint = default, + string storageAccountDisplayName = default) + { + return new StorageAccount + { + StorageAccountNameOrQueueEndpoint = storageAccountNameOrQueueEndpoint, + StorageAccountDisplayName = storageAccountDisplayName, + }; + } } #endregion Model Factory @@ -351,30 +351,6 @@ protected AzureQueuesClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get storage accounts - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get storage accounts response. - public virtual async Task GetStorageAccountsAsync(CancellationToken cancellationToken = default) - { - using var activity = AzureQueuesClient.ConnectorActivitySource.StartActivity("AzureQueuesClient.GetStorageAccountsAsync"); - try - { - var path = $"/v2/GetStorageAccounts"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Delete message (V2) /// @@ -538,6 +514,30 @@ public virtual async Task PutQueueAsync([DynamicValues("GetStorageAccoun } } + /// + /// Get storage accounts + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get storage accounts response. + public virtual async Task GetStorageAccountsAsync(CancellationToken cancellationToken = default) + { + using var activity = AzureQueuesClient.ConnectorActivitySource.StartActivity("AzureQueuesClient.GetStorageAccountsAsync"); + try + { + var path = $"/v2/GetStorageAccounts"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/AzuretablesExtensions.cs b/src/Azure.Connectors.Sdk/Generated/AzuretablesExtensions.cs index 176cc25..d49f133 100644 --- a/src/Azure.Connectors.Sdk/Generated/AzuretablesExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/AzuretablesExtensions.cs @@ -28,30 +28,6 @@ namespace Azure.Connectors.Sdk.Azuretables.Models #region Types - /// - /// Response for Get storage accounts - /// - public class StorageAccountList - { - /// List of storage account names - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of storage account names - /// - public class StorageAccount - { - /// The name of the storage account. - [JsonPropertyName("Name")] - public string StorageAccountNameOrTableEndpoint { get; set; } - - /// The display name of the storage account. - [JsonPropertyName("DisplayName")] - public string StorageAccountDisplayName { get; set; } - } - /// /// Insert Entity (V2) /// @@ -65,7 +41,7 @@ public class CreateEntityInput } /// - /// Response for Insert Entity (V2) + /// Data for a single entity /// public class InsertEntityResponse { @@ -87,7 +63,7 @@ public class InsertEntityResponse } /// - /// Response for Create table (V2) + /// The metadata for the table /// public class GetTableResponse { @@ -101,7 +77,7 @@ public class GetTableResponse } /// - /// Response for Get entities (V2) + /// Entity Response Object /// public class GetEntitiesResponse { @@ -115,7 +91,7 @@ public class GetEntitiesResponse } /// - /// Item in List of Entities + /// An entity /// public class EntityItem { @@ -133,7 +109,7 @@ public class EntityItem } /// - /// Response for Get entity (V2) + /// An entity /// public class GetEntityResponse { @@ -155,7 +131,7 @@ public class GetEntityResponse } /// - /// Response for List tables (V2) + /// Table query response object /// public class GetTablesResponse { @@ -216,6 +192,30 @@ public class ReplaceEntityInput public Dictionary AdditionalProperties { get; set; } = new(); } + /// + /// List of storage account names + /// + public class StorageAccountList + { + /// List of storage account names + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Storage account + /// + public class StorageAccount + { + /// The name of the storage account. + [JsonPropertyName("Name")] + public string StorageAccountNameOrTableEndpoint { get; set; } + + /// The display name of the storage account. + [JsonPropertyName("DisplayName")] + public string StorageAccountDisplayName { get; set; } + } + #endregion Types #region Model Factory @@ -227,32 +227,6 @@ public class ReplaceEntityInput /// public static class AzureTablesModelFactory { - /// - /// Creates a new instance of . - /// - public static StorageAccountList StorageAccountList( - List value = default) - { - return new StorageAccountList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static StorageAccount StorageAccount( - string storageAccountNameOrTableEndpoint = default, - string storageAccountDisplayName = default) - { - return new StorageAccount - { - StorageAccountNameOrTableEndpoint = storageAccountNameOrTableEndpoint, - StorageAccountDisplayName = storageAccountDisplayName, - }; - } - /// /// Creates a new instance of . /// @@ -346,6 +320,32 @@ public static GetTablesResponse GetTablesResponse( ListOfTables = listOfTables, }; } + + /// + /// Creates a new instance of . + /// + public static StorageAccountList StorageAccountList( + List value = default) + { + return new StorageAccountList + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static StorageAccount StorageAccount( + string storageAccountNameOrTableEndpoint = default, + string storageAccountDisplayName = default) + { + return new StorageAccount + { + StorageAccountNameOrTableEndpoint = storageAccountNameOrTableEndpoint, + StorageAccountDisplayName = storageAccountDisplayName, + }; + } } #endregion Model Factory @@ -421,30 +421,6 @@ protected AzureTablesClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get storage accounts - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get storage accounts response. - public virtual async Task GetStorageAccountsAsync(CancellationToken cancellationToken = default) - { - using var activity = AzureTablesClient.ConnectorActivitySource.StartActivity("AzureTablesClient.GetStorageAccountsAsync"); - try - { - var path = $"/v2/GetStorageAccounts"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Insert Entity (V2) /// @@ -846,6 +822,30 @@ await this } } + /// + /// Get storage accounts + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get storage accounts response. + public virtual async Task GetStorageAccountsAsync(CancellationToken cancellationToken = default) + { + using var activity = AzureTablesClient.ConnectorActivitySource.StartActivity("AzureTablesClient.GetStorageAccountsAsync"); + try + { + var path = $"/v2/GetStorageAccounts"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/BoxExtensions.cs b/src/Azure.Connectors.Sdk/Generated/BoxExtensions.cs index 82e149d..ac36091 100644 --- a/src/Azure.Connectors.Sdk/Generated/BoxExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/BoxExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Box.Models #region Types /// - /// Response for Get file metadata using id + /// Blob metadata /// public class BlobMetadata { @@ -561,6 +561,57 @@ public virtual async Task CopyFileAsync(string sourceUrl, string d } } + /// + /// List files and folders in folder + /// + /// Lists the files and folders in a Box folder. + /// Folder Id + /// Cancellation token. + /// The List files and folders in folder response. + public virtual async Task> ListFolderAsync(string folderId, CancellationToken cancellationToken = default) + { + using var activity = BoxClient.ConnectorActivitySource.StartActivity("BoxClient.ListFolderAsync"); + try + { + if (folderId is null) + throw new ArgumentNullException(nameof(folderId)); + var path = $"/datasets/default/folders/{Uri.EscapeDataString(Uri.EscapeDataString(folderId.ToString()))}"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// List files and folders in root folder + /// + /// Lists the files and folders in the Box root folder. + /// Cancellation token. + /// The List files and folders in root folder response. + public virtual async Task> ListRootFolderAsync(CancellationToken cancellationToken = default) + { + using var activity = BoxClient.ConnectorActivitySource.StartActivity("BoxClient.ListRootFolderAsync"); + try + { + var path = $"/datasets/default/folders"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Extract archive to folder /// diff --git a/src/Azure.Connectors.Sdk/Generated/CampfireExtensions.cs b/src/Azure.Connectors.Sdk/Generated/CampfireExtensions.cs index 5e38f2d..b467fab 100644 --- a/src/Azure.Connectors.Sdk/Generated/CampfireExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/CampfireExtensions.cs @@ -29,17 +29,17 @@ namespace Azure.Connectors.Sdk.Campfire.Models #region Types /// - /// Response for List accounts + /// A message /// - public class AccountsResponse + public class CreateMessageResponse { - /// Collection Of Accounts - [JsonPropertyName("accounts")] - public List Accounts { get; set; } + /// A Campfire message + [JsonPropertyName("message")] + public JsonElement? Message { get; set; } } /// - /// Response for List Rooms + /// Collection of Room Data /// public class RoomsResponse { @@ -49,17 +49,7 @@ public class RoomsResponse } /// - /// Response for Create a message - /// - public class CreateMessageResponse - { - /// A Campfire message - [JsonPropertyName("message")] - public JsonElement? Message { get; set; } - } - - /// - /// Response for When a new message is received + /// A collection of message data in Campfire /// public class MessagesResponse { @@ -69,7 +59,7 @@ public class MessagesResponse } /// - /// Response for When a file is uploaded + /// Data for uploaded files in Campfire /// public class UploadResponse { @@ -88,6 +78,16 @@ public class UserResponse public JsonElement? User { get; set; } } + /// + /// Account data for an account in Campfire + /// + public class AccountsResponse + { + /// Collection Of Accounts + [JsonPropertyName("accounts")] + public List Accounts { get; set; } + } + #endregion Types #region Model Factory @@ -100,14 +100,14 @@ public class UserResponse public static class CampfireModelFactory { /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static AccountsResponse AccountsResponse( - List accounts = default) + public static CreateMessageResponse CreateMessageResponse( + JsonElement? message = default) { - return new AccountsResponse + return new CreateMessageResponse { - Accounts = accounts, + Message = message, }; } @@ -123,18 +123,6 @@ public static RoomsResponse RoomsResponse( }; } - /// - /// Creates a new instance of . - /// - public static CreateMessageResponse CreateMessageResponse( - JsonElement? message = default) - { - return new CreateMessageResponse - { - Message = message, - }; - } - /// /// Creates a new instance of . /// @@ -170,6 +158,18 @@ public static UserResponse UserResponse( User = user, }; } + + /// + /// Creates a new instance of . + /// + public static AccountsResponse AccountsResponse( + List accounts = default) + { + return new AccountsResponse + { + Accounts = accounts, + }; + } } #endregion Model Factory @@ -241,6 +241,13 @@ public static class OnNewMessage /// public const string Account = "account"; + /// + /// A room associated with the account + /// Required. + /// Dynamic values from: ListRooms. + /// + public const string RoomId = "roomId"; + } /// @@ -255,6 +262,13 @@ public static class OnNewUpload /// public const string Account = "account"; + /// + /// A room associated with the account + /// Required. + /// Dynamic values from: ListRooms. + /// + public const string RoomId = "roomId"; + } } @@ -328,23 +342,31 @@ protected CampfireClient() : base() { } public override string ToString() => base.ToString(); /// - /// List accounts + /// Create a message /// - /// Discovery method used to populate dynamic parameter values at design time. - /// parentOperation + /// Sends a message to the given room. + /// RoomId + /// Account + /// Message text to be created /// Cancellation token. - /// The List accounts response. - public virtual async Task ListAccountsAsync(string parentOperation = default, CancellationToken cancellationToken = default) + /// The Create a message response. + public virtual async Task CreateMessageAsync([DynamicValues("ListRooms")] string roomId, [DynamicValues("ListAccounts")] string account, string messageTextToBeCreated, CancellationToken cancellationToken = default) { - using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.ListAccountsAsync"); + using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.CreateMessageAsync"); try { + if (roomId is null) + throw new ArgumentNullException(nameof(roomId)); var queryParams = new List(); - if (parentOperation != default) - queryParams.Add($"parentOperation={Uri.EscapeDataString(parentOperation.ToString())}"); - var path = $"/authorization.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (account is null) + throw new ArgumentNullException(nameof(account)); + queryParams.Add($"account={Uri.EscapeDataString(account.ToString())}"); + if (messageTextToBeCreated is null) + throw new ArgumentNullException(nameof(messageTextToBeCreated)); + queryParams.Add($"message={Uri.EscapeDataString(messageTextToBeCreated.ToString())}"); + var path = $"/room/{Uri.EscapeDataString(roomId.ToString())}/speak.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -356,24 +378,25 @@ public virtual async Task ListAccountsAsync(string parentOpera } /// - /// List Rooms + /// Get user by ID /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Retrieves information about a user by given ID + /// User ID /// Account /// Cancellation token. - /// The List Rooms response. - public virtual async Task ListRoomsAsync([DynamicValues("ListAccounts")] string account, CancellationToken cancellationToken = default) + /// The Get user by ID response. + public virtual async Task GetUserAsync(int userId, [DynamicValues("ListAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.ListRoomsAsync"); + using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.GetUserAsync"); try { var queryParams = new List(); if (account is null) throw new ArgumentNullException(nameof(account)); queryParams.Add($"account={Uri.EscapeDataString(account.ToString())}"); - var path = $"/rooms.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/users/{Uri.EscapeDataString(userId.ToString())}.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -385,31 +408,23 @@ public virtual async Task ListRoomsAsync([DynamicValues("ListAcco } /// - /// Create a message + /// List accounts /// - /// Sends a message to the given room. - /// RoomId - /// Account - /// Message text to be created + /// Discovery method used to populate dynamic parameter values at design time. + /// parentOperation /// Cancellation token. - /// The Create a message response. - public virtual async Task CreateMessageAsync([DynamicValues("ListRooms")] string roomId, [DynamicValues("ListAccounts")] string account, string messageTextToBeCreated, CancellationToken cancellationToken = default) + /// The List accounts response. + public virtual async Task ListAccountsAsync(string parentOperation = default, CancellationToken cancellationToken = default) { - using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.CreateMessageAsync"); + using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.ListAccountsAsync"); try { - if (roomId is null) - throw new ArgumentNullException(nameof(roomId)); var queryParams = new List(); - if (account is null) - throw new ArgumentNullException(nameof(account)); - queryParams.Add($"account={Uri.EscapeDataString(account.ToString())}"); - if (messageTextToBeCreated is null) - throw new ArgumentNullException(nameof(messageTextToBeCreated)); - queryParams.Add($"message={Uri.EscapeDataString(messageTextToBeCreated.ToString())}"); - var path = $"/room/{Uri.EscapeDataString(roomId.ToString())}/speak.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (parentOperation != default) + queryParams.Add($"parentOperation={Uri.EscapeDataString(parentOperation.ToString())}"); + var path = $"/authorization.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -421,25 +436,24 @@ public virtual async Task CreateMessageAsync([DynamicValu } /// - /// Get user by ID + /// List Rooms /// - /// Retrieves information about a user by given ID - /// User ID + /// Discovery method used to populate dynamic parameter values at design time. /// Account /// Cancellation token. - /// The Get user by ID response. - public virtual async Task GetUserAsync(int userId, [DynamicValues("ListAccounts")] string account, CancellationToken cancellationToken = default) + /// The List Rooms response. + public virtual async Task ListRoomsAsync([DynamicValues("ListAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.GetUserAsync"); + using var activity = CampfireClient.ConnectorActivitySource.StartActivity("CampfireClient.ListRoomsAsync"); try { var queryParams = new List(); if (account is null) throw new ArgumentNullException(nameof(account)); queryParams.Add($"account={Uri.EscapeDataString(account.ToString())}"); - var path = $"/users/{Uri.EscapeDataString(userId.ToString())}.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/rooms.json" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/CloudmersiveConvertExtensions.cs b/src/Azure.Connectors.Sdk/Generated/CloudmersiveConvertExtensions.cs index 0af8251..dfe1622 100644 --- a/src/Azure.Connectors.Sdk/Generated/CloudmersiveConvertExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/CloudmersiveConvertExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.CloudmersiveConvert.Models #region Types /// - /// Response for Create a blank Word DOCX document + /// Result of creating a blank Word document /// public class CreateBlankDocxResponse { @@ -43,7 +43,7 @@ public class CreateBlankDocxResponse } /// - /// Response for Deletes a table row in an existing table in a Word DOCX document + /// Result of running an Delete Table Row command /// public class DeleteDocxTableRowResponse { @@ -57,7 +57,7 @@ public class DeleteDocxTableRowResponse } /// - /// Response for Deletes a range of multiple table rows in an existing table in a Word + /// Result of running an Delete Table Row Range command /// public class DeleteDocxTableRowRangeResponse { @@ -71,7 +71,7 @@ public class DeleteDocxTableRowRangeResponse } /// - /// Response for Get body from a Word DOCX document + /// Result of running a Get-Body command /// public class GetDocxBodyResponse { @@ -103,7 +103,7 @@ public class DocxBody } /// - /// Item in All paragraphs anywhere in the document; these objects are not sequentially placed but are scatted across document + /// A paragraph in a Word Document (DOCX) file; there is where text, content and formatting are stored - similar to the paragraph tag in HTML /// public class DocxParagraph { @@ -125,7 +125,7 @@ public class DocxParagraph } /// - /// Item in The content runs in the paragraph - this is where text is stored; similar to a span in HTML + /// A content run in a Word Document (DOCX) file /// public class DocxRun { @@ -163,7 +163,7 @@ public class DocxRun } /// - /// Item in Text items inside the run; this is where the actual text content is stored + /// Unit of text content in a Word Document (DOCX) file /// public class DocxText { @@ -181,7 +181,7 @@ public class DocxText } /// - /// Item in All tables anywhere in the document; these objects are not sequentially placed but are scatted across the document + /// A table in a Word Document (DOCX) file /// public class DocxTable { @@ -343,7 +343,7 @@ public class DocxTable } /// - /// Item in Rows in the table; this is where the contents is located + /// A row in a Word Document (DOCX) file /// public class DocxTableRow { @@ -361,7 +361,7 @@ public class DocxTableRow } /// - /// Item in Cells in the row; this is where the contents of the row is stored + /// A cell in a Word Document (DOCX) file /// public class DocxTableCell { @@ -399,7 +399,7 @@ public class DocxTableCell } /// - /// Response for Get comments from a Word DOCX document hierarchically + /// Result of getting comments hierarchically from a Word Document DOCX /// public class GetDocxCommentsHierarchicalResponse { @@ -417,7 +417,7 @@ public class GetDocxCommentsHierarchicalResponse } /// - /// Item in Comments in the document + /// Top-level Comment in a Word Document /// public class DocxTopLevelComment { @@ -451,7 +451,7 @@ public class DocxTopLevelComment } /// - /// Item in Child comments, that are replies to this one + /// Comment in a Word Document /// public class DocxComment { @@ -493,7 +493,7 @@ public class DocxComment } /// - /// Response for Get content of a footer from a Word DOCX document + /// Result of running a Get-Tables command /// public class GetDocxHeadersAndFootersResponse { @@ -511,7 +511,7 @@ public class GetDocxHeadersAndFootersResponse } /// - /// Item in Footers + /// Footer in a Word Document (DOCX) /// public class DocxFooter { @@ -529,7 +529,7 @@ public class DocxFooter } /// - /// Item in Sections that the footer is applied to + /// Section of a Word Document (DOCX) /// public class DocxSection { @@ -543,7 +543,7 @@ public class DocxSection } /// - /// Item in Headers + /// Header of a Word Document (DOCX) /// public class DocxHeader { @@ -561,7 +561,7 @@ public class DocxHeader } /// - /// Response for Get images from a Word DOCX document + /// Result of running a Get-Images command /// public class GetDocxImagesResponse { @@ -633,7 +633,7 @@ public class DocxImage } /// - /// Response for Get pages and content from a Word DOCX document + /// Result of getting pages from a Word Document DOCX /// public class GetDocxPagesResponse { @@ -651,7 +651,7 @@ public class GetDocxPagesResponse } /// - /// Item in Pages in the document + /// One page in a Word Document DOCX /// public class DocxPage { @@ -665,7 +665,7 @@ public class DocxPage } /// - /// Response for Get sections from a Word DOCX document + /// Result of running a Get-Sections command /// public class GetDocxSectionsResponse { @@ -679,7 +679,7 @@ public class GetDocxSectionsResponse } /// - /// Response for Get styles from a Word DOCX document + /// Result of running a Get-Tables command /// public class GetDocxStylesResponse { @@ -693,7 +693,7 @@ public class GetDocxStylesResponse } /// - /// Item in Styles in the DOCX document + /// Style in a DOCX Word Document /// public class DocxStyle { @@ -727,7 +727,7 @@ public class DocxStyle } /// - /// Response for Gets the contents of an existing table row in an existing table in a W + /// Result of running an Get Table Row command /// public class GetDocxTableRowResponse { @@ -741,7 +741,7 @@ public class GetDocxTableRowResponse } /// - /// Response for Get a specific table by index in a Word DOCX document + /// Result of running a Get-Tables by Index command /// public class GetDocxTableByIndexResponse { @@ -755,7 +755,7 @@ public class GetDocxTableByIndexResponse } /// - /// Response for Get all tables in Word DOCX document + /// Result of running a Get-Tables command /// public class GetDocxTablesResponse { @@ -769,7 +769,7 @@ public class GetDocxTablesResponse } /// - /// Response for Insert a new comment into a Word DOCX document attached to a paragraph + /// Result of running an Insert-Comment-on-Paragraph command /// public class InsertDocxCommentOnParagraphResponse { @@ -783,7 +783,7 @@ public class InsertDocxCommentOnParagraphResponse } /// - /// Response for Insert image into a Word DOCX document + /// Result of running a set-footer command /// public class DocxInsertImageResponse { @@ -797,7 +797,7 @@ public class DocxInsertImageResponse } /// - /// Response for Insert a new paragraph into a Word DOCX document + /// Result of running an Insert-Paragraph command /// public class InsertDocxInsertParagraphResponse { @@ -811,7 +811,7 @@ public class InsertDocxInsertParagraphResponse } /// - /// Response for Insert a new table into a Word DOCX document + /// Result of running an Insert-Tables command /// public class InsertDocxTablesResponse { @@ -825,7 +825,7 @@ public class InsertDocxTablesResponse } /// - /// Response for Insert a new row into an existing table in a Word DOCX document + /// Result of running an Insert-Table Row command /// public class InsertDocxTableRowResponse { @@ -839,7 +839,7 @@ public class InsertDocxTableRowResponse } /// - /// Response for Remove headers and footers from Word DOCX document + /// Result of running a Remove Headers and Footers command /// public class RemoveDocxHeadersAndFootersResponse { @@ -853,7 +853,7 @@ public class RemoveDocxHeadersAndFootersResponse } /// - /// Response for Delete any object in a Word DOCX document + /// Result of running an Remove-Object command /// public class DocxRemoveObjectResponse { @@ -867,7 +867,7 @@ public class DocxRemoveObjectResponse } /// - /// Response for Set the footer in a Word DOCX document + /// Result of running a set-footer command /// public class DocxSetFooterResponse { @@ -881,7 +881,7 @@ public class DocxSetFooterResponse } /// - /// Response for Set the header in a Word DOCX document + /// Result of running a set-header command /// public class DocxSetHeaderResponse { @@ -895,7 +895,7 @@ public class DocxSetHeaderResponse } /// - /// Response for Update, set contents of a table cell in an existing table in a Word DO + /// Result of running an Update Table Cell command /// public class UpdateDocxTableCellResponse { @@ -909,7 +909,7 @@ public class UpdateDocxTableCellResponse } /// - /// Response for Update, set contents of a table row in an existing table in a Word DOCX document + /// Result of running an Update Table Row command /// public class UpdateDocxTableRowResponse { @@ -923,7 +923,7 @@ public class UpdateDocxTableRowResponse } /// - /// Response for Clear cell contents in an Excel XLSX spreadsheet, worksheet by index + /// Result of running a Clear XLSX Cell command /// public class ClearXlsxCellResponse { @@ -937,7 +937,7 @@ public class ClearXlsxCellResponse } /// - /// Response for Create a blank Excel XLSX spreadsheet + /// Result of creating a blank worksheet /// public class CreateBlankSpreadsheetResponse { @@ -951,7 +951,7 @@ public class CreateBlankSpreadsheetResponse } /// - /// Response for Create a new Excel XLSX spreadsheet from column and row data + /// Result of creating a new worksheet from rows and cells /// public class CreateSpreadsheetFromDataResponse { @@ -977,7 +977,7 @@ public class EditDocumentXlsxDeleteWorksheetResponse } /// - /// Response for Get cell from an Excel XLSX spreadsheet, worksheet by cell identifier + /// Result of running a Get-Cell command /// public class GetXlsxCellByIdentifierResponse { @@ -991,7 +991,7 @@ public class GetXlsxCellByIdentifierResponse } /// - /// Requested Cell in the Excel XLSX document + /// Cell in an Excel Spreadsheet worksheet /// public class XlsxSpreadsheetCell { @@ -1017,7 +1017,7 @@ public class XlsxSpreadsheetCell } /// - /// Response for Get cell from an Excel XLSX spreadsheet, worksheet by index + /// Result of running a Get-Cell command /// public class GetXlsxCellResponse { @@ -1031,7 +1031,7 @@ public class GetXlsxCellResponse } /// - /// Response for Get rows and cells from a Excel XLSX spreadsheet, worksheet + /// Result of running a Get-Columns command /// public class GetXlsxColumnsResponse { @@ -1045,7 +1045,7 @@ public class GetXlsxColumnsResponse } /// - /// Item in Spreadsheet Columns in the XLSX document + /// Column in an Excel spreadsheet worksheet /// public class XlsxSpreadsheetColumn { @@ -1059,7 +1059,7 @@ public class XlsxSpreadsheetColumn } /// - /// Response for Get images from a Excel XLSX spreadsheet, worksheet + /// Result of running a Get-Images command /// public class GetXlsxImagesResponse { @@ -1099,7 +1099,7 @@ public class XlsxImage } /// - /// Response for Get rows and cells from a Excel XLSX spreadsheet, worksheet + /// Result of running a Get-Worksheets command /// public class GetXlsxRowsAndCellsResponse { @@ -1113,7 +1113,7 @@ public class GetXlsxRowsAndCellsResponse } /// - /// Item in Spreadsheet Rows in the Excel XLSX document + /// Row in an Excel spreadsheet worksheet /// public class XlsxSpreadsheetRow { @@ -1127,7 +1127,7 @@ public class XlsxSpreadsheetRow } /// - /// Response for Get styles from a Excel XLSX spreadsheet, worksheet + /// Result of running a Get-Worksheets command /// public class GetXlsxStylesResponse { @@ -1141,7 +1141,7 @@ public class GetXlsxStylesResponse } /// - /// Item in Cell styles + /// Style in an Excel spreadsheet /// public class DocxCellStyle { @@ -1163,7 +1163,7 @@ public class DocxCellStyle } /// - /// Response for Get worksheets from a Excel XLSX spreadsheet + /// Result of running a Get-Worksheets command /// public class GetXlsxWorksheetsResponse { @@ -1177,7 +1177,7 @@ public class GetXlsxWorksheetsResponse } /// - /// Item in Worksheets in the Excel XLSX spreadsheet + /// A worksheet (tab) in an Excel (XLSX) spreadsheet /// public class XlsxWorksheet { @@ -1191,7 +1191,7 @@ public class XlsxWorksheet } /// - /// Response for Insert a new worksheet into an Excel XLSX spreadsheet + /// Result of running a Get-Worksheets command /// public class InsertXlsxWorksheetResponse { @@ -1205,7 +1205,7 @@ public class InsertXlsxWorksheetResponse } /// - /// Response for Set, update cell contents in an Excel XLSX spreadsheet, worksheet by c + /// Result of running a Set Cell by identifier in XLSX Worksheets command /// public class SetXlsxCellByIdentifierResponse { @@ -1219,7 +1219,7 @@ public class SetXlsxCellByIdentifierResponse } /// - /// Response for Set, update cell contents in an Excel XLSX spreadsheet, worksheet by index + /// Result of running a Set Cell in XLSX Worksheets command /// public class SetXlsxCellResponse { @@ -1245,7 +1245,7 @@ public class ConvertDataJsonToXmlInput } /// - /// Response for Apply HTML template + /// Response from an HTML template application /// public class HtmlTemplateApplicationResponse { @@ -1271,7 +1271,7 @@ public class ConvertWebHtmlToPngResponse } /// - /// Response for Convert HTML string to text (txt) + /// Result of running the HTML to Text operation /// public class HtmlToTextResponse { @@ -1285,7 +1285,7 @@ public class HtmlToTextResponse } /// - /// Response for Convert website URL page to text (txt) + /// Result of running the URL website to Text operation /// public class UrlToTextResponse { @@ -1299,7 +1299,7 @@ public class UrlToTextResponse } /// - /// ClearXlsxCellRequest + /// Input to a Clear Cell in XLSX Worksheet request /// public class ClearXlsxCellRequest { @@ -1325,7 +1325,7 @@ public class ClearXlsxCellRequest } /// - /// CreateBlankDocxRequest + /// Input to a Create Blank Word Document request /// public class CreateBlankDocxRequest { @@ -1335,7 +1335,7 @@ public class CreateBlankDocxRequest } /// - /// CreateBlankSpreadsheetRequest + /// Input to a Create Blank Spreadsheet request /// public class CreateBlankSpreadsheetRequest { @@ -1345,7 +1345,7 @@ public class CreateBlankSpreadsheetRequest } /// - /// CreateSpreadsheetFromDataRequest + /// Input to Create a new Spreadsheet request /// public class CreateSpreadsheetFromDataRequest { @@ -1359,7 +1359,7 @@ public class CreateSpreadsheetFromDataRequest } /// - /// DeleteDocxTableRowRangeRequest + /// Input to a delete DOCX table row range request /// public class DeleteDocxTableRowRangeRequest { @@ -1385,7 +1385,7 @@ public class DeleteDocxTableRowRangeRequest } /// - /// DeleteDocxTableRowRequest + /// Input to a delete DOCX table row request /// public class DeleteDocxTableRowRequest { @@ -1407,7 +1407,7 @@ public class DeleteDocxTableRowRequest } /// - /// DocxInsertCommentOnParagraphRequest + /// Input to a Insert Comment on Paragraph request /// public class DocxInsertCommentOnParagraphRequest { @@ -1429,7 +1429,7 @@ public class DocxInsertCommentOnParagraphRequest } /// - /// DocxInsertImageRequest + /// Input to set-footer command /// public class DocxInsertImageRequest { @@ -1471,7 +1471,7 @@ public class DocxInsertImageRequest } /// - /// DocxRemoveObjectRequest + /// Input to a Insert Paragraph request /// public class DocxRemoveObjectRequest { @@ -1489,7 +1489,7 @@ public class DocxRemoveObjectRequest } /// - /// DocxSetFooterAddPageNumberRequest + /// Input to set-footer/add-page-number command /// public class DocxSetFooterAddPageNumberRequest { @@ -1507,7 +1507,7 @@ public class DocxSetFooterAddPageNumberRequest } /// - /// DocxSetFooterRequest + /// Input to set-footer command /// public class DocxSetFooterRequest { @@ -1525,7 +1525,7 @@ public class DocxSetFooterRequest } /// - /// DocxSetHeaderRequest + /// Input to a set-header command /// public class DocxSetHeaderRequest { @@ -1543,7 +1543,7 @@ public class DocxSetHeaderRequest } /// - /// FinishEditingRequest + /// Input to a Finish Editing request /// public class FinishEditingRequest { @@ -1553,7 +1553,7 @@ public class FinishEditingRequest } /// - /// GetDocxBodyRequest + /// Input to a Get Body request /// public class GetDocxBodyRequest { @@ -1567,7 +1567,7 @@ public class GetDocxBodyRequest } /// - /// GetDocxGetCommentsHierarchicalRequest + /// Input to a Get Word DOCX Document comments hierarchically request /// public class GetDocxGetCommentsHierarchicalRequest { @@ -1581,7 +1581,7 @@ public class GetDocxGetCommentsHierarchicalRequest } /// - /// GetDocxHeadersAndFootersRequest + /// Input to a Get Tables request /// public class GetDocxHeadersAndFootersRequest { @@ -1595,7 +1595,7 @@ public class GetDocxHeadersAndFootersRequest } /// - /// GetDocxImagesRequest + /// Input to a Get Images request /// public class GetDocxImagesRequest { @@ -1609,7 +1609,7 @@ public class GetDocxImagesRequest } /// - /// GetDocxPagesRequest + /// Input to a Get Word DOCX Document Pages request /// public class GetDocxPagesRequest { @@ -1623,7 +1623,7 @@ public class GetDocxPagesRequest } /// - /// GetDocxSectionsRequest + /// Input to a Get Sections request /// public class GetDocxSectionsRequest { @@ -1637,7 +1637,7 @@ public class GetDocxSectionsRequest } /// - /// GetDocxStylesRequest + /// Input to a Get Tables request /// public class GetDocxStylesRequest { @@ -1651,7 +1651,7 @@ public class GetDocxStylesRequest } /// - /// GetDocxTableByIndexRequest + /// Input to a Get Tables by Index request /// public class GetDocxTableByIndexRequest { @@ -1669,7 +1669,7 @@ public class GetDocxTableByIndexRequest } /// - /// GetDocxTableRowRequest + /// Input to a get DOCX table row request /// public class GetDocxTableRowRequest { @@ -1691,7 +1691,7 @@ public class GetDocxTableRowRequest } /// - /// GetDocxTablesRequest + /// Input to a Get Tables request /// public class GetDocxTablesRequest { @@ -1705,7 +1705,7 @@ public class GetDocxTablesRequest } /// - /// GetXlsxCellByIdentifierRequest + /// Input to a Get Cell by cell identifier request /// public class GetXlsxCellByIdentifierRequest { @@ -1727,7 +1727,7 @@ public class GetXlsxCellByIdentifierRequest } /// - /// GetXlsxCellRequest + /// Input to a Get Cell request /// public class GetXlsxCellRequest { @@ -1753,7 +1753,7 @@ public class GetXlsxCellRequest } /// - /// GetXlsxColumnsRequest + /// Input to a Get Columns request /// public class GetXlsxColumnsRequest { @@ -1771,7 +1771,7 @@ public class GetXlsxColumnsRequest } /// - /// GetXlsxImagesRequest + /// Input to a Get Images request /// public class GetXlsxImagesRequest { @@ -1789,7 +1789,7 @@ public class GetXlsxImagesRequest } /// - /// GetXlsxRowsAndCellsRequest + /// Input to a Get Worksheets request /// public class GetXlsxRowsAndCellsRequest { @@ -1807,7 +1807,7 @@ public class GetXlsxRowsAndCellsRequest } /// - /// GetXlsxStylesRequest + /// Input to a Get Worksheets request /// public class GetXlsxStylesRequest { @@ -1821,7 +1821,7 @@ public class GetXlsxStylesRequest } /// - /// GetXlsxWorksheetsRequest + /// Input to a Get Worksheets request /// public class GetXlsxWorksheetsRequest { @@ -1835,7 +1835,7 @@ public class GetXlsxWorksheetsRequest } /// - /// HtmlTemplateApplicationRequest + /// HTML template application request /// public class HtmlTemplateApplicationRequest { @@ -1871,7 +1871,7 @@ public class HtmlTemplateOperation } /// - /// HtmlToOfficeRequest + /// Details of the HTML to Office request /// public class HtmlToOfficeRequest { @@ -1881,7 +1881,7 @@ public class HtmlToOfficeRequest } /// - /// HtmlToPdfRequest + /// Details of the HTML to PDF request /// public class HtmlToPdfRequest { @@ -1895,7 +1895,7 @@ public class HtmlToPdfRequest } /// - /// HtmlToPngRequest + /// Details of the HTML to PNG request /// public class HtmlToPngRequest { @@ -1917,7 +1917,7 @@ public class HtmlToPngRequest } /// - /// HtmlToTextRequest + /// Details of the HTML to Text request /// public class HtmlToTextRequest { @@ -1927,7 +1927,7 @@ public class HtmlToTextRequest } /// - /// InsertDocxInsertParagraphRequest + /// Input to a Insert Paragraph request /// public class InsertDocxInsertParagraphRequest { @@ -1953,7 +1953,7 @@ public class InsertDocxInsertParagraphRequest } /// - /// InsertDocxTableRowRequest + /// Input to a Insert Table Row request /// public class InsertDocxTableRowRequest { @@ -1979,7 +1979,7 @@ public class InsertDocxTableRowRequest } /// - /// InsertDocxTablesRequest + /// Input to a Insert Tables request /// public class InsertDocxTablesRequest { @@ -2005,7 +2005,7 @@ public class InsertDocxTablesRequest } /// - /// InsertXlsxWorksheetRequest + /// Input to a Get Worksheets request /// public class InsertXlsxWorksheetRequest { @@ -2023,7 +2023,7 @@ public class InsertXlsxWorksheetRequest } /// - /// RemoveDocxHeadersAndFootersRequest + /// Input to a Remove Headers and Footers request /// public class RemoveDocxHeadersAndFootersRequest { @@ -2045,7 +2045,7 @@ public class RemoveDocxHeadersAndFootersRequest } /// - /// RemoveDocxPagesRequest + /// Input to a Remove Word DOCX Document Pages request /// public class RemoveDocxPagesRequest { @@ -2067,7 +2067,7 @@ public class RemoveDocxPagesRequest } /// - /// RemovePptxSlidesRequest + /// Input to a Remove PowerPoint PPTX Presentation Slides request /// public class RemovePptxSlidesRequest { @@ -2089,7 +2089,7 @@ public class RemovePptxSlidesRequest } /// - /// RemoveXlsxWorksheetRequest + /// Input to a Remove Excel XLSX Spreadsheet worksheet request /// public class RemoveXlsxWorksheetRequest { @@ -2107,7 +2107,7 @@ public class RemoveXlsxWorksheetRequest } /// - /// ReplaceStringRequest + /// Input to a string replacement request /// public class ReplaceStringRequest { @@ -2133,7 +2133,7 @@ public class ReplaceStringRequest } /// - /// ScreenshotRequest + /// Details of the screenshot request /// public class ScreenshotRequest { @@ -2155,7 +2155,7 @@ public class ScreenshotRequest } /// - /// SetXlsxCellByIdentifierRequest + /// Input to a Set Cell by identifier in XLSX Worksheets request /// public class SetXlsxCellByIdentifierRequest { @@ -2181,7 +2181,7 @@ public class SetXlsxCellByIdentifierRequest } /// - /// SetXlsxCellRequest + /// Input to a Set Cell in XLSX Worksheets request /// public class SetXlsxCellRequest { @@ -2211,7 +2211,7 @@ public class SetXlsxCellRequest } /// - /// UpdateDocxTableCellRequest + /// Input to a Update Table Cell request /// public class UpdateDocxTableCellRequest { @@ -2241,7 +2241,7 @@ public class UpdateDocxTableCellRequest } /// - /// UpdateDocxTableRowRequest + /// Input to a Update Table Row request /// public class UpdateDocxTableRowRequest { @@ -2267,7 +2267,7 @@ public class UpdateDocxTableRowRequest } /// - /// UrlToTextRequest + /// Details of the URL website to Text request /// public class UrlToTextRequest { diff --git a/src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs b/src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs index 0130cb5..0caed86 100644 --- a/src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/CommondataserviceExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Commondataservice.Models #region Types /// - /// Response for GetDataSetsMetadata + /// Dataset metadata /// public class DataSetsMetadata { @@ -44,7 +44,7 @@ public class DataSetsMetadata } /// - /// tabular + /// Tabular dataset metadata /// public class TabularDataSetsMetadata { @@ -70,7 +70,7 @@ public class TabularDataSetsMetadata } /// - /// blob + /// Blob dataset metadata /// public class BlobDataSetsMetadata { @@ -102,7 +102,7 @@ public class AssociateRecordsPatchItemInput } /// - /// Response for Associates one row to another on the provided relationship + /// Table item table /// [DynamicSchema("GetTable")] public class Item @@ -120,7 +120,7 @@ public class Item } /// - /// Response for Retrieves all collection valued relationship items as an expand would + /// List of Items /// public class ItemsList { @@ -130,7 +130,7 @@ public class ItemsList } /// - /// Response for GetDataSets_V2 + /// List of datasets /// public class DataSetsList { @@ -140,7 +140,7 @@ public class DataSetsList } /// - /// Item in List of datasets + /// Dataset /// public class DataSet { @@ -159,7 +159,7 @@ public class DataSet } /// - /// Item in Pass-through Native Queries + /// static schema for pass-through native query execution /// public class PassThroughNativeQuery { @@ -183,7 +183,7 @@ public class GetItemResponse } /// - /// Response for Get table metadata - Patch + /// Table metadata /// public class TableMetadata { @@ -217,7 +217,7 @@ public class TableMetadata } /// - /// x-ms-capabilities + /// Metadata for a table (capabilities) /// public class TableCapabilitiesMetadata { @@ -247,7 +247,7 @@ public class TableCapabilitiesMetadata } /// - /// sortRestrictions + /// Metadata for a table (sort restrictions) /// public class TableSortRestrictionsMetadata { @@ -265,7 +265,7 @@ public class TableSortRestrictionsMetadata } /// - /// filterRestrictions + /// Metadata for a table (filter restrictions) /// public class TableFilterRestrictionsMetadata { @@ -283,7 +283,7 @@ public class TableFilterRestrictionsMetadata } /// - /// selectRestrictions + /// Metadata for a table (select restrictions) /// public class TableSelectRestrictionsMetadata { @@ -305,7 +305,7 @@ public class ObjectEntity } /// - /// Response for GetTables_V2 + /// Represents a list of tables. /// public class TablesList { @@ -315,7 +315,7 @@ public class TablesList } /// - /// Item in List of Tables + /// Represents a table. /// public class Table { diff --git a/src/Azure.Connectors.Sdk/Generated/DocuSignExtensions.cs b/src/Azure.Connectors.Sdk/Generated/DocuSignExtensions.cs index 728291b..12ffe74 100644 --- a/src/Azure.Connectors.Sdk/Generated/DocuSignExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/DocuSignExtensions.cs @@ -111,7 +111,7 @@ public class DocGenFormField } /// - /// Response for Get document generation form fields from template (bulk send templates only) + /// Document generation form fields from the template /// public class GetDocGenTemplateTabsResponse { @@ -518,30 +518,6 @@ public class BulkSendListGuid public string BulkSendListGuidValue { get; set; } } - /// - /// Response for Get organizations - /// - public class GetOrganizationsResponse - { - /// list of organizations - [JsonPropertyName("organizations")] - public List Organizations { get; set; } - } - - /// - /// Item in list of organizations - /// - public class Organization - { - /// The id of the organization. - [JsonPropertyName("id")] - public string OrganizationId { get; set; } - - /// The name of the organization. - [JsonPropertyName("name")] - public string Name { get; set; } - } - /// /// Response for Login /// @@ -566,30 +542,6 @@ public class LoginAccount public string AccountIdGuid { get; set; } } - /// - /// Response for Get All Workflow Ids - /// - public class GetWorkFlowIdsResponse - { - /// Workflow ID - [JsonPropertyName("workflowIds")] - public List WorkflowIDs { get; set; } - } - - /// - /// Item in Workflow ID - /// - public class WorkflowId - { - /// The name of workflowID - [JsonPropertyName("name")] - public string Name { get; set; } - - /// The type of workflowID - [JsonPropertyName("type")] - public string Type { get; set; } - } - /// /// Response for List templates /// @@ -614,78 +566,6 @@ public class EnvelopeTemplate public string Name { get; set; } } - /// - /// Response for GetSigningGroups - /// - public class ListSigningGroupResponse - { - /// List of all signing groups - [JsonPropertyName("signingGroups")] - public List SigningGroups { get; set; } - } - - /// - /// Item in List of all signing groups - /// - public class SigningGroup - { - /// The ID of the signing group. - [JsonPropertyName("signingGroupId")] - public string SigningGroupId { get; set; } - - /// The name of the signing group. - [JsonPropertyName("groupName")] - public string SigningGroupName { get; set; } - } - - /// - /// Response for List folders - /// - public class ListFoldersResponse - { - /// Folders - [JsonPropertyName("folders")] - public List Folders { get; set; } - } - - /// - /// Item in Folders - /// - public class Folder - { - /// The name of the folder. - [JsonPropertyName("name")] - public string Name { get; set; } - - /// The id of the folder. - [JsonPropertyName("folderId")] - public string FolderId { get; set; } - } - - /// - /// Response for List envelopes - /// - public class ListEnvelopesResponse - { - /// The envelopes within a folder. - [JsonPropertyName("folderItems")] - public List FolderItems { get; set; } - } - - /// - /// Item in The envelopes within a folder. - /// - public class FolderItem - { - /// The id of the envelope. - [JsonPropertyName("envelopeId")] - public string EnvelopeId { get; set; } - - /// The subject of the envelope. - [JsonPropertyName("subject")] - public string Subject { get; set; } - } - /// /// Add documents to an envelope /// @@ -752,30 +632,6 @@ public class ListDocumentsResponse public List EnvelopeDocuments { get; set; } } - /// - /// Response for Get the signers of a template in dynamic schema format - /// - public class GetDynamicSignersResponse - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - - /// - /// Response for Get the signers of a template in dynamic schema format - /// - public class GetDynamicRecipientsResponse - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - /// /// Response for Add tabs for a recipient on an envelope /// @@ -811,65 +667,67 @@ public class RecipientTabsResponse } /// - /// Response for Get Maestro Workflow Definitions + /// TriggerMaestroFlowResponse /// - public class WorkflowDefinitionsResponse + public class TriggerMaestroFlowResponse { - /// WorkflowDefinitions - [JsonPropertyName("WorkflowDefinitions")] - public List WorkflowDefinitions { get; set; } + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); } /// - /// Item in WorkflowDefinitions + /// Response for Show build Number (For reference only. Do not include in a flow for execution) /// - public class WorkflowDefinition + public class BuildNumberResponse { - /// Id - [JsonPropertyName("Id")] - public string Id { get; set; } - - /// Name - [JsonPropertyName("Name")] - public string Name { get; set; } + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); } /// - /// Response for Get Maestro Workflow Definition + /// When a Docusign Connect event occurs (Account-level) /// - public class WorkflowDefinitionResponse + public class CreateHookEnvelopeInput { - /// Id - [JsonPropertyName("Id")] - public string Id { get; set; } + /// allUsers + [JsonPropertyName("allUsers")] + public string AllUsers { get; set; } - /// Name - [JsonPropertyName("Name")] - public string Name { get; set; } + /// allowEnvelopePublish + [JsonPropertyName("allowEnvelopePublish")] + public string AllowEnvelopePublish { get; set; } - /// PayloadSchema - [JsonPropertyName("PayloadSchema")] - public List PayloadSchema { get; set; } - } + /// includeDocumentFields + [JsonPropertyName("includeDocumentFields")] + public string IncludeDocumentFields { get; set; } - /// - /// Item in PayloadSchema - /// - public class WorkflowDefPayloadSchema - { - /// Name - [JsonPropertyName("PropertyName")] - public string PropertyName { get; set; } + /// requiresAcknowledgement + [JsonPropertyName("requiresAcknowledgement")] + public string RequiresAcknowledgement { get; set; } - /// Type - [JsonPropertyName("Type")] - public string Type { get; set; } + /// urlToPublishTo + [JsonPropertyName("urlToPublishTo")] + public string UrlToPublishTo { get; set; } + + /// Name your Connect configuration (for example, "Envelope Events"). + [JsonPropertyName("name")] + public string ConnectConfigurationName { get; set; } + + /// Select an event. To include another event, select "Add new item." + [JsonPropertyName("events")] + public List TriggerEvents { get; set; } } /// - /// Response for Start Docusign workflow + /// Response for When a Docusign Connect event occurs (Account-level) /// - public class TriggerMaestroFlowResponse + public class CreateHookEnvelopeResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -879,37 +737,95 @@ public class TriggerMaestroFlowResponse } /// - /// Response for StaticResponseForTabTypes + /// Response for Generate Embedded Signing URL (V2) /// - public class TabTypesResponse + public class EmbeddedSigningResponse { - /// Tab types - [JsonPropertyName("tabTypes")] - public List TabTypes { get; set; } + /// The url of embedded signing view. + [JsonPropertyName("url")] + public string URL { get; set; } } /// - /// Item in Tab types + /// Response for Get organizations /// - public class TabType + public class GetOrganizationsResponse { - /// Display name of the tab. - [JsonPropertyName("name")] - public string Name { get; set; } - - /// Type of the tab. - [JsonPropertyName("type")] - public string Type { get; set; } + /// list of organizations + [JsonPropertyName("organizations")] + public List Organizations { get; set; } } /// - /// Response for StaticResponseForRecipientTypes + /// Item in list of organizations /// - public class RecipientTypesResponse + public class Organization { - /// Recipient types - [JsonPropertyName("tabTypes")] - public List RecipientTypes { get; set; } + /// The id of the organization. + [JsonPropertyName("id")] + public string OrganizationId { get; set; } + + /// The name of the organization. + [JsonPropertyName("name")] + public string Name { get; set; } + } + + /// + /// Response for List folders + /// + public class ListFoldersResponse + { + /// Folders + [JsonPropertyName("folders")] + public List Folders { get; set; } + } + + /// + /// Item in Folders + /// + public class Folder + { + /// The name of the folder. + [JsonPropertyName("name")] + public string Name { get; set; } + + /// The id of the folder. + [JsonPropertyName("folderId")] + public string FolderId { get; set; } + } + + /// + /// Response for List envelopes + /// + public class ListEnvelopesResponse + { + /// The envelopes within a folder. + [JsonPropertyName("folderItems")] + public List FolderItems { get; set; } + } + + /// + /// Item in The envelopes within a folder. + /// + public class FolderItem + { + /// The id of the envelope. + [JsonPropertyName("envelopeId")] + public string EnvelopeId { get; set; } + + /// The subject of the envelope. + [JsonPropertyName("subject")] + public string Subject { get; set; } + } + + /// + /// Response for StaticResponseForRecipientTypes + /// + public class RecipientTypesResponse + { + /// Recipient types + [JsonPropertyName("tabTypes")] + public List RecipientTypes { get; set; } } /// @@ -951,9 +867,137 @@ public class SignatureType } /// - /// Response for StaticResponseForAnchorTabSchema + /// Response for GetSigningGroups /// - public class StaticResponseForAnchorTabSchemaResponse + public class ListSigningGroupResponse + { + /// List of all signing groups + [JsonPropertyName("signingGroups")] + public List SigningGroups { get; set; } + } + + /// + /// Item in List of all signing groups + /// + public class SigningGroup + { + /// The ID of the signing group. + [JsonPropertyName("signingGroupId")] + public string SigningGroupId { get; set; } + + /// The name of the signing group. + [JsonPropertyName("groupName")] + public string SigningGroupName { get; set; } + } + + /// + /// Response for StaticResponseForTabTypes + /// + public class TabTypesResponse + { + /// Tab types + [JsonPropertyName("tabTypes")] + public List TabTypes { get; set; } + } + + /// + /// Item in Tab types + /// + public class TabType + { + /// Display name of the tab. + [JsonPropertyName("name")] + public string Name { get; set; } + + /// Type of the tab. + [JsonPropertyName("type")] + public string Type { get; set; } + } + + /// + /// WorkflowDefinitions Response + /// + public class WorkflowDefinitionsResponse + { + /// WorkflowDefinitions + [JsonPropertyName("WorkflowDefinitions")] + public List WorkflowDefinitions { get; set; } + } + + /// + /// WorkflowDefinition + /// + public class WorkflowDefinition + { + /// Id + [JsonPropertyName("Id")] + public string Id { get; set; } + + /// Name + [JsonPropertyName("Name")] + public string Name { get; set; } + } + + /// + /// Response for Get All Workflow Ids + /// + public class GetWorkFlowIdsResponse + { + /// Workflow ID + [JsonPropertyName("workflowIds")] + public List WorkflowIDs { get; set; } + } + + /// + /// Item in Workflow ID + /// + public class WorkflowId + { + /// The name of workflowID + [JsonPropertyName("name")] + public string Name { get; set; } + + /// The type of workflowID + [JsonPropertyName("type")] + public string Type { get; set; } + } + + /// + /// WorkflowDefinitionResponse + /// + public class WorkflowDefinitionResponse + { + /// Id + [JsonPropertyName("Id")] + public string Id { get; set; } + + /// Name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// PayloadSchema + [JsonPropertyName("PayloadSchema")] + public List PayloadSchema { get; set; } + } + + /// + /// WorkflowDefPayloadSchema + /// + public class WorkflowDefPayloadSchema + { + /// Name + [JsonPropertyName("PropertyName")] + public string PropertyName { get; set; } + + /// Type + [JsonPropertyName("Type")] + public string Type { get; set; } + } + + /// + /// Response for Get the signers of a template in dynamic schema format + /// + public class GetDynamicSignersResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -963,9 +1007,9 @@ public class StaticResponseForAnchorTabSchemaResponse } /// - /// Response for StaticResponseForCompositeTemplates + /// Response for Get the signers of a template in dynamic schema format /// - public class StaticResponseForCompositeTemplatesResponse + public class GetDynamicRecipientsResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -987,9 +1031,9 @@ public class StaticResponseForRecipientTypeSchemaResponse } /// - /// Response for StaticResponseForEmbeddedSenderSchema + /// Response for StaticResponseForVerificationTypeSchema /// - public class StaticResponseForEmbeddedSenderSchemaResponse + public class StaticResponseForVerificationTypeSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -999,9 +1043,9 @@ public class StaticResponseForEmbeddedSenderSchemaResponse } /// - /// Response for StaticResponseForVerificationTypeSchema + /// Response for StaticResponseForEmbeddedSenderSchema /// - public class StaticResponseForVerificationTypeSchemaResponse + public class StaticResponseForEmbeddedSenderSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -1011,9 +1055,9 @@ public class StaticResponseForVerificationTypeSchemaResponse } /// - /// Response for Show build Number (For reference only. Do not include in a flow for execution) + /// Response for StaticResponseForEmbeddedSigningSchema /// - public class BuildNumberResponse + public class StaticResponseForEmbeddedSigningSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -1035,43 +1079,9 @@ public class StaticResponseForBuildNumberSchemaResponse } /// - /// When a Docusign Connect event occurs (Account-level) - /// - public class CreateHookEnvelopeInput - { - /// allUsers - [JsonPropertyName("allUsers")] - public string AllUsers { get; set; } - - /// allowEnvelopePublish - [JsonPropertyName("allowEnvelopePublish")] - public string AllowEnvelopePublish { get; set; } - - /// includeDocumentFields - [JsonPropertyName("includeDocumentFields")] - public string IncludeDocumentFields { get; set; } - - /// requiresAcknowledgement - [JsonPropertyName("requiresAcknowledgement")] - public string RequiresAcknowledgement { get; set; } - - /// urlToPublishTo - [JsonPropertyName("urlToPublishTo")] - public string UrlToPublishTo { get; set; } - - /// Name your Connect configuration (for example, "Envelope Events"). - [JsonPropertyName("name")] - public string ConnectConfigurationName { get; set; } - - /// Select an event. To include another event, select "Add new item." - [JsonPropertyName("events")] - public List TriggerEvents { get; set; } - } - - /// - /// Response for When a Docusign Connect event occurs (Account-level) + /// Response for StaticResponseForAnchorTabSchema /// - public class CreateHookEnvelopeResponse + public class StaticResponseForAnchorTabSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -1081,19 +1091,9 @@ public class CreateHookEnvelopeResponse } /// - /// Response for Generate Embedded Signing URL (V2) - /// - public class EmbeddedSigningResponse - { - /// The url of embedded signing view. - [JsonPropertyName("url")] - public string URL { get; set; } - } - - /// - /// Response for StaticResponseForEmbeddedSigningSchemaV2 + /// Response for StaticResponseForCompositeTemplates /// - public class StaticResponseForEmbeddedSigningSchemaResponse + public class StaticResponseForCompositeTemplatesResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -1103,7 +1103,7 @@ public class StaticResponseForEmbeddedSigningSchemaResponse } /// - /// MaestroInputVariables + /// An object that represents input variables based on a workflow. /// [DynamicSchema("GetMaestroWorkflowDefinition")] public class MaestroInputVariables @@ -1117,7 +1117,7 @@ public class MaestroInputVariables } /// - /// DynamicSigners + /// An object that represents signers based on a template. /// [DynamicSchema("GetDynamicSigners")] public class DynamicSigners @@ -1131,7 +1131,7 @@ public class DynamicSigners } /// - /// DynamicRecipients + /// An object that represents recipients based on a template. /// [DynamicSchema("GetDynamicRecipients")] public class DynamicRecipients @@ -1145,7 +1145,7 @@ public class DynamicRecipients } /// - /// AdditionalRecipientParamsSchema + /// An object that represents the parameters for a specific recipient type. /// [DynamicSchema("StaticResponseForRecipientTypeSchema")] public class AdditionalRecipientParamsSchema @@ -1159,7 +1159,7 @@ public class AdditionalRecipientParamsSchema } /// - /// AdditionalRecipientData + /// An object that represents additional parameters of a recipient. /// [DynamicSchema("StaticResponseForVerificationTypeSchema")] public class AdditionalRecipientData @@ -1173,7 +1173,7 @@ public class AdditionalRecipientData } /// - /// AdditionalURLForSenderView + /// Addtional Return URL /// [DynamicSchema("StaticResponseForEmbeddedSenderSchema")] public class AdditionalURLForSenderView @@ -1187,7 +1187,7 @@ public class AdditionalURLForSenderView } /// - /// DynamicSigningUrlFields + /// Addtional Return URL /// [DynamicSchema("StaticResponseForEmbeddedSigningSchemaV2")] public class DynamicSigningUrlFields @@ -1201,7 +1201,7 @@ public class DynamicSigningUrlFields } /// - /// BuildNumberSchema + /// Build number schema /// [DynamicSchema("StaticResponseForBuildNumberSchema")] public class BuildNumberSchema @@ -1215,7 +1215,7 @@ public class BuildNumberSchema } /// - /// AccountCustomFields + /// An object that represents custom fields. /// [DynamicSchema("GetCustomFields")] public class AccountCustomFields @@ -1229,7 +1229,7 @@ public class AccountCustomFields } /// - /// AnchorTabSchema + /// An object that represents the schema for a specific anchor tab. /// [DynamicSchema("StaticResponseForAnchorTabSchema")] public class AnchorTabSchema @@ -1243,7 +1243,7 @@ public class AnchorTabSchema } /// - /// CompositeTemplateSchema + /// An object that represents the schema for composite templates. /// [DynamicSchema("StaticResponseForCompositeTemplates")] public class CompositeTemplateSchema @@ -1624,33 +1624,7 @@ public static BulkSendListGuid BulkSendListGuid( } /// - /// Creates a new instance of . - /// - public static GetOrganizationsResponse GetOrganizationsResponse( - List organizations = default) - { - return new GetOrganizationsResponse - { - Organizations = organizations, - }; - } - - /// - /// Creates a new instance of . - /// - public static Organization Organization( - string organizationId = default, - string name = default) - { - return new Organization - { - OrganizationId = organizationId, - Name = name, - }; - } - - /// - /// Creates a new instance of . + /// Creates a new instance of . /// public static GetLoginAccountsResponse GetLoginAccountsResponse( List loginAccounts = default) @@ -1675,32 +1649,6 @@ public static LoginAccount LoginAccount( }; } - /// - /// Creates a new instance of . - /// - public static GetWorkFlowIdsResponse GetWorkFlowIdsResponse( - List workflowIDs = default) - { - return new GetWorkFlowIdsResponse - { - WorkflowIDs = workflowIDs, - }; - } - - /// - /// Creates a new instance of . - /// - public static WorkflowId WorkflowId( - string name = default, - string type = default) - { - return new WorkflowId - { - Name = name, - Type = type, - }; - } - /// /// Creates a new instance of . /// @@ -1727,84 +1675,6 @@ public static EnvelopeTemplate EnvelopeTemplate( }; } - /// - /// Creates a new instance of . - /// - public static ListSigningGroupResponse ListSigningGroupResponse( - List signingGroups = default) - { - return new ListSigningGroupResponse - { - SigningGroups = signingGroups, - }; - } - - /// - /// Creates a new instance of . - /// - public static SigningGroup SigningGroup( - string signingGroupId = default, - string signingGroupName = default) - { - return new SigningGroup - { - SigningGroupId = signingGroupId, - SigningGroupName = signingGroupName, - }; - } - - /// - /// Creates a new instance of . - /// - public static ListFoldersResponse ListFoldersResponse( - List folders = default) - { - return new ListFoldersResponse - { - Folders = folders, - }; - } - - /// - /// Creates a new instance of . - /// - public static Folder Folder( - string name = default, - string folderId = default) - { - return new Folder - { - Name = name, - FolderId = folderId, - }; - } - - /// - /// Creates a new instance of . - /// - public static ListEnvelopesResponse ListEnvelopesResponse( - List folderItems = default) - { - return new ListEnvelopesResponse - { - FolderItems = folderItems, - }; - } - - /// - /// Creates a new instance of . - /// - public static FolderItem FolderItem( - string envelopeId = default, - string subject = default) - { - return new FolderItem - { - EnvelopeId = envelopeId, - Subject = subject, - }; - } - /// /// Creates a new instance of . /// @@ -1912,84 +1782,116 @@ public static RecipientTabsResponse RecipientTabsResponse( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static WorkflowDefinitionsResponse WorkflowDefinitionsResponse( - List workflowDefinitions = default) + public static CreateHookEnvelopeInput CreateHookEnvelopeInput( + string allUsers = default, + string allowEnvelopePublish = default, + string includeDocumentFields = default, + string requiresAcknowledgement = default, + string urlToPublishTo = default, + string connectConfigurationName = default, + List triggerEvents = default) { - return new WorkflowDefinitionsResponse + return new CreateHookEnvelopeInput { - WorkflowDefinitions = workflowDefinitions, + AllUsers = allUsers, + AllowEnvelopePublish = allowEnvelopePublish, + IncludeDocumentFields = includeDocumentFields, + RequiresAcknowledgement = requiresAcknowledgement, + UrlToPublishTo = urlToPublishTo, + ConnectConfigurationName = connectConfigurationName, + TriggerEvents = triggerEvents, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static WorkflowDefinition WorkflowDefinition( - string id = default, - string name = default) + public static EmbeddedSigningResponse EmbeddedSigningResponse( + string url = default) { - return new WorkflowDefinition + return new EmbeddedSigningResponse { - Id = id, - Name = name, + URL = url, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static WorkflowDefinitionResponse WorkflowDefinitionResponse( - string id = default, - string name = default, - List payloadSchema = default) + public static GetOrganizationsResponse GetOrganizationsResponse( + List organizations = default) { - return new WorkflowDefinitionResponse + return new GetOrganizationsResponse { - Id = id, - Name = name, - PayloadSchema = payloadSchema, + Organizations = organizations, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static WorkflowDefPayloadSchema WorkflowDefPayloadSchema( - string propertyName = default, - string type = default) + public static Organization Organization( + string organizationId = default, + string name = default) { - return new WorkflowDefPayloadSchema + return new Organization { - PropertyName = propertyName, - Type = type, + OrganizationId = organizationId, + Name = name, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TabTypesResponse TabTypesResponse( - List tabTypes = default) + public static ListFoldersResponse ListFoldersResponse( + List folders = default) { - return new TabTypesResponse + return new ListFoldersResponse { - TabTypes = tabTypes, + Folders = folders, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TabType TabType( + public static Folder Folder( string name = default, - string type = default) + string folderId = default) { - return new TabType + return new Folder { Name = name, - Type = type, + FolderId = folderId, + }; + } + + /// + /// Creates a new instance of . + /// + public static ListEnvelopesResponse ListEnvelopesResponse( + List folderItems = default) + { + return new ListEnvelopesResponse + { + FolderItems = folderItems, + }; + } + + /// + /// Creates a new instance of . + /// + public static FolderItem FolderItem( + string envelopeId = default, + string subject = default) + { + return new FolderItem + { + EnvelopeId = envelopeId, + Subject = subject, }; } @@ -2046,38 +1948,136 @@ public static SignatureType SignatureType( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static CreateHookEnvelopeInput CreateHookEnvelopeInput( - string allUsers = default, - string allowEnvelopePublish = default, - string includeDocumentFields = default, - string requiresAcknowledgement = default, - string urlToPublishTo = default, - string connectConfigurationName = default, - List triggerEvents = default) + public static ListSigningGroupResponse ListSigningGroupResponse( + List signingGroups = default) { - return new CreateHookEnvelopeInput + return new ListSigningGroupResponse { - AllUsers = allUsers, - AllowEnvelopePublish = allowEnvelopePublish, - IncludeDocumentFields = includeDocumentFields, - RequiresAcknowledgement = requiresAcknowledgement, - UrlToPublishTo = urlToPublishTo, - ConnectConfigurationName = connectConfigurationName, - TriggerEvents = triggerEvents, + SigningGroups = signingGroups, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static EmbeddedSigningResponse EmbeddedSigningResponse( - string url = default) + public static SigningGroup SigningGroup( + string signingGroupId = default, + string signingGroupName = default) { - return new EmbeddedSigningResponse + return new SigningGroup { - URL = url, + SigningGroupId = signingGroupId, + SigningGroupName = signingGroupName, + }; + } + + /// + /// Creates a new instance of . + /// + public static TabTypesResponse TabTypesResponse( + List tabTypes = default) + { + return new TabTypesResponse + { + TabTypes = tabTypes, + }; + } + + /// + /// Creates a new instance of . + /// + public static TabType TabType( + string name = default, + string type = default) + { + return new TabType + { + Name = name, + Type = type, + }; + } + + /// + /// Creates a new instance of . + /// + public static WorkflowDefinitionsResponse WorkflowDefinitionsResponse( + List workflowDefinitions = default) + { + return new WorkflowDefinitionsResponse + { + WorkflowDefinitions = workflowDefinitions, + }; + } + + /// + /// Creates a new instance of . + /// + public static WorkflowDefinition WorkflowDefinition( + string id = default, + string name = default) + { + return new WorkflowDefinition + { + Id = id, + Name = name, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetWorkFlowIdsResponse GetWorkFlowIdsResponse( + List workflowIDs = default) + { + return new GetWorkFlowIdsResponse + { + WorkflowIDs = workflowIDs, + }; + } + + /// + /// Creates a new instance of . + /// + public static WorkflowId WorkflowId( + string name = default, + string type = default) + { + return new WorkflowId + { + Name = name, + Type = type, + }; + } + + /// + /// Creates a new instance of . + /// + public static WorkflowDefinitionResponse WorkflowDefinitionResponse( + string id = default, + string name = default, + List payloadSchema = default) + { + return new WorkflowDefinitionResponse + { + Id = id, + Name = name, + PayloadSchema = payloadSchema, + }; + } + + /// + /// Creates a new instance of . + /// + public static WorkflowDefPayloadSchema WorkflowDefPayloadSchema( + string propertyName = default, + string type = default) + { + return new WorkflowDefPayloadSchema + { + PropertyName = propertyName, + Type = type, }; } @@ -2126,6 +2126,46 @@ public static class DocuSignTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the DocuSign connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class DocuSignTriggerParameters + { + /// + /// Input parameters for the OnCreateOrgHookEnvelope trigger operation (operationId: CreateOrgHookEnvelope). + /// + public static class OnCreateOrgHookEnvelope + { + /// + /// Enter or select an organization ID. + /// Required. + /// Dynamic values from: GetOrganizations. + /// + public const string OrganizationId = "organizationId"; + + } + + /// + /// Input parameters for the OnCreateHookEnvelope trigger operation (operationId: CreateHookEnvelopeV4). + /// + public static class OnCreateHookEnvelope + { + /// + /// Enter an account ID, or select an account from the dropdown list. + /// Required. + /// Dynamic values from: GetLoginAccounts. + /// + public const string AccountId = "accountId"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// @@ -3273,32 +3313,6 @@ public virtual async Task BulkSendAsync([DynamicValues("GetLog } } - /// - /// Get organizations - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get organizations response. - public virtual async Task GetOrganizationsAsync(CancellationToken cancellationToken = default) - { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetOrganizationsAsync"); - try - { - var queryParams = new List(); - queryParams.Add("mode=org_admin"); - var path = $"/Management/v2/organizations" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Login /// @@ -3324,22 +3338,22 @@ public virtual async Task GetLoginAccountsAsync(Cancel } /// - /// Get All Workflow Ids + /// List templates /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account + /// List templates for a specific account. + /// Account ID /// Cancellation token. - /// The Get All Workflow Ids response. - public virtual async Task GetAllWorkflowIDsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) + /// The List templates response. + public virtual async Task GetEnvelopeTemplatesAsync([DynamicValues("GetLoginAccounts")] string accountId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetAllWorkflowIDsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeTemplatesAsync"); try { - if (account is null) - throw new ArgumentNullException(nameof(account)); - var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/all_identity_verification"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3351,21 +3365,26 @@ public virtual async Task GetAllWorkflowIDsAsync([Dynami } /// - /// Get custom fields from an account + /// Add documents to an envelope /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account + /// Add documents to an envelope. + /// Account ID + /// Envelope ID + /// The request body. /// Cancellation token. - public virtual async Task GetCustomFieldsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) + /// The Add documents to an envelope response. + public virtual async Task AddDocumentsToEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, AddDocumentsToEnvelopeInput input, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetCustomFieldsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddDocumentsToEnvelopeAsync"); try { - if (account is null) - throw new ArgumentNullException(nameof(account)); - var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/custom_fields"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/documents"; + return await this + .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3377,22 +3396,25 @@ await this } /// - /// List templates + /// List documents from a template /// - /// List templates for a specific account. + /// List documents from a template /// Account ID + /// Template ID /// Cancellation token. - /// The List templates response. - public virtual async Task GetEnvelopeTemplatesAsync([DynamicValues("GetLoginAccounts")] string accountId, CancellationToken cancellationToken = default) + /// The List documents from a template response. + public virtual async Task ListTemplateDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetEnvelopeTemplates")] string templateId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeTemplatesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.ListTemplateDocumentsAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates"; + if (templateId is null) + throw new ArgumentNullException(nameof(templateId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}/documents"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3404,22 +3426,25 @@ public virtual async Task GetEnvelopeTemplatesAsync([Dyna } /// - /// GetSigningGroups + /// List documents from an envelope /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account + /// List documents from an envelope + /// Account ID + /// Envelope ID /// Cancellation token. - /// The GetSigningGroups response. - public virtual async Task GetSigningGroupsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) + /// The List documents from an envelope response. + public virtual async Task ListEnvelopeDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetSigningGroupsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.ListEnvelopeDocumentsAsync"); try { - if (account is null) - throw new ArgumentNullException(nameof(account)); - var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/signing_groups"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/envelopeDocuments"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3431,21 +3456,30 @@ public virtual async Task GetSigningGroupsAsync([Dynam } /// - /// Get account custom fields + /// Get document info from envelope /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account + /// Get document info from envelope + /// Account ID + /// Envelope ID + /// Document name /// Cancellation token. - public virtual async Task GetAccountCustomFieldsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) + /// The Get document info from envelope response. + public virtual async Task GetEnvelopeDocumentInfoAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string documentName, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetAccountCustomFieldsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeDocumentInfoAsync"); try { - if (account is null) - throw new ArgumentNullException(nameof(account)); - var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/account_custom_fields"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + var queryParams = new List(); + if (documentName is null) + throw new ArgumentNullException(nameof(documentName)); + queryParams.Add($"documentName={Uri.EscapeDataString(documentName.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/get_document_info" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3457,22 +3491,33 @@ await this } /// - /// List folders + /// Get info for recipient tab /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account + /// Returns the value of the tab for the given recipient + /// Account ID + /// Envelope ID + /// Recipient ID + /// Tab label /// Cancellation token. - /// The List folders response. - public virtual async Task GetFolderListAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) + /// The Get info for recipient tab response. + public virtual async Task GetTabInfoAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, string tabLabel, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetFolderListAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetTabInfoAsync"); try { - if (account is null) - throw new ArgumentNullException(nameof(account)); - var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/folders"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + if (recipientId is null) + throw new ArgumentNullException(nameof(recipientId)); + var queryParams = new List(); + if (tabLabel is null) + throw new ArgumentNullException(nameof(tabLabel)); + queryParams.Add($"tabLabel={Uri.EscapeDataString(tabLabel.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3484,25 +3529,34 @@ public virtual async Task GetFolderListAsync([DynamicValues } /// - /// List envelopes + /// Add tabs for a recipient on an envelope /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Add tabs for a recipient on an envelope /// Account ID - /// Folder + /// Envelope ID + /// Recipient ID + /// The request body. + /// Tab type /// Cancellation token. - /// The List envelopes response. - public virtual async Task GetFolderEnvelopeListAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetFolderList")] string folder, CancellationToken cancellationToken = default) + /// The Add tabs for a recipient on an envelope response. + public virtual async Task AddRecipientTabsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, AnchorTabSchema input, [DynamicValues("StaticResponseForTabTypes")] string tabType, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetFolderEnvelopeListAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddRecipientTabsAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); - if (folder is null) - throw new ArgumentNullException(nameof(folder)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/folders/{Uri.EscapeDataString(folder.ToString())}"; + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + if (recipientId is null) + throw new ArgumentNullException(nameof(recipientId)); + var queryParams = new List(); + if (tabType is null) + throw new ArgumentNullException(nameof(tabType)); + queryParams.Add($"tabType={Uri.EscapeDataString(tabType.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3514,26 +3568,61 @@ public virtual async Task GetFolderEnvelopeListAsync([Dyn } /// - /// Add documents to an envelope + /// Update recipient tab values on an envelope /// - /// Add documents to an envelope. + /// Update recipient tab values on an envelope /// Account ID /// Envelope ID + /// Recipient ID /// The request body. /// Cancellation token. - /// The Add documents to an envelope response. - public virtual async Task AddDocumentsToEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, AddDocumentsToEnvelopeInput input, CancellationToken cancellationToken = default) + public virtual async Task UpdateRecipientTabsValuesAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, List input, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddDocumentsToEnvelopeAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.UpdateRecipientTabsValuesAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); if (envelopeId is null) throw new ArgumentNullException(nameof(envelopeId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/documents"; + if (recipientId is null) + throw new ArgumentNullException(nameof(recipientId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs"; + await this + .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get recipient tabs from envelope + /// + /// Get recipient tabs from envelope + /// Account ID + /// Envelope ID + /// Recipient ID + /// Cancellation token. + /// The Get recipient tabs from envelope response. + public virtual async Task GetEnvelopeRecipientTabsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, CancellationToken cancellationToken = default) + { + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeRecipientTabsAsync"); + try + { + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + if (recipientId is null) + throw new ArgumentNullException(nameof(recipientId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/recipientTabs"; return await this - .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3545,25 +3634,31 @@ public virtual async Task AddDocumentsToEnvelopeAsync([Dyn } /// - /// List documents from a template + /// Start Docusign workflow /// - /// List documents from a template + /// Start Docusign workflow /// Account ID - /// Template ID + /// workflow + /// The request body. + /// instance Name /// Cancellation token. - /// The List documents from a template response. - public virtual async Task ListTemplateDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetEnvelopeTemplates")] string templateId, CancellationToken cancellationToken = default) + /// The Start Docusign workflow response. + public virtual async Task TriggerMaestroFlowAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetMaestroWorkflowDefinitions")] string workflow, MaestroInputVariables input, string instanceName, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.ListTemplateDocumentsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.TriggerMaestroFlowAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); - if (templateId is null) - throw new ArgumentNullException(nameof(templateId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}/documents"; + if (workflow is null) + throw new ArgumentNullException(nameof(workflow)); + var queryParams = new List(); + if (instanceName is null) + throw new ArgumentNullException(nameof(instanceName)); + queryParams.Add($"instanceName={Uri.EscapeDataString(instanceName.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows/trigger/{Uri.EscapeDataString(workflow.ToString())}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3575,25 +3670,98 @@ public virtual async Task ListTemplateDocumentsAs } /// - /// List documents from an envelope + /// Show build Number (For reference only. Do not include in a flow for execution) /// - /// List documents from an envelope + /// Identifier for the currently deployed build. + /// The request body. + /// Cancellation token. + /// The Show build Number (For reference only. Do not include in a flow for execution) response. + public virtual async Task BuildNumberAsync(BuildNumberSchema input, CancellationToken cancellationToken = default) + { + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.BuildNumberAsync"); + try + { + var path = $"/build_number"; + return await this + .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Add recipient to an envelope (V2) + /// + /// Add recipient to an envelope. /// Account ID /// Envelope ID + /// The request body. + /// Recipient type + /// Client User ID + /// Recipient ID + /// Embedded recipient start URL + /// Signing order + /// Email notification language + /// Email notification subject + /// Email notification body + /// Note + /// Role name + /// SMS Country Code + /// SMS Phone Number + /// Signing Group + /// Signature type + /// Verification workflow /// Cancellation token. - /// The List documents from an envelope response. - public virtual async Task ListEnvelopeDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, CancellationToken cancellationToken = default) + /// The Add recipient to an envelope (V2) response. + public virtual async Task AddRecipientToEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, AdditionalRecipientParamsSchema input, [DynamicValues("StaticResponseForRecipientTypes")] string recipientType, string clientUserId = default, string recipientId = default, string embeddedRecipientStartURL = default, string signingOrder = default, string emailNotificationLanguage = default, string emailNotificationSubject = default, string emailNotificationBody = default, string note = default, string roleName = default, string sMSCountryCode = default, string sMSPhoneNumber = default, [DynamicValues("GetSigningGroups")] string signingGroup = default, [DynamicValues("StaticResponseForSignatureTypes")] string signatureType = default, [DynamicValues("GetAllWorkflowIDs")] string verificationWorkflow = default, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.ListEnvelopeDocumentsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddRecipientToEnvelopeAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); if (envelopeId is null) throw new ArgumentNullException(nameof(envelopeId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/envelopeDocuments"; + var queryParams = new List(); + if (recipientType is null) + throw new ArgumentNullException(nameof(recipientType)); + queryParams.Add($"recipientType={Uri.EscapeDataString(recipientType.ToString())}"); + if (clientUserId != default) + queryParams.Add($"clientUserId={Uri.EscapeDataString(clientUserId.ToString())}"); + if (recipientId != default) + queryParams.Add($"recipientId={Uri.EscapeDataString(recipientId.ToString())}"); + if (embeddedRecipientStartURL != default) + queryParams.Add($"embeddedRecipientStartURL={Uri.EscapeDataString(embeddedRecipientStartURL.ToString())}"); + if (signingOrder != default) + queryParams.Add($"routingOrder={Uri.EscapeDataString(signingOrder.ToString())}"); + if (emailNotificationLanguage != default) + queryParams.Add($"emailNotificationLanguage={Uri.EscapeDataString(emailNotificationLanguage.ToString())}"); + if (emailNotificationSubject != default) + queryParams.Add($"emailNotificationSubject={Uri.EscapeDataString(emailNotificationSubject.ToString())}"); + if (emailNotificationBody != default) + queryParams.Add($"emailNotificationBody={Uri.EscapeDataString(emailNotificationBody.ToString())}"); + if (note != default) + queryParams.Add($"note={Uri.EscapeDataString(note.ToString())}"); + if (roleName != default) + queryParams.Add($"roleName={Uri.EscapeDataString(roleName.ToString())}"); + if (sMSCountryCode != default) + queryParams.Add($"countryCode={Uri.EscapeDataString(sMSCountryCode.ToString())}"); + if (sMSPhoneNumber != default) + queryParams.Add($"phoneNumber={Uri.EscapeDataString(sMSPhoneNumber.ToString())}"); + if (signingGroup != default) + queryParams.Add($"signingGroupId={Uri.EscapeDataString(signingGroup.ToString())}"); + if (signatureType != default) + queryParams.Add($"signatureType={Uri.EscapeDataString(signatureType.ToString())}"); + if (verificationWorkflow != default) + queryParams.Add($"workflowId={Uri.EscapeDataString(verificationWorkflow.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/addRecipientV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3605,17 +3773,53 @@ public virtual async Task ListEnvelopeDocumentsAsync([Dyn } /// - /// Get document info from envelope + /// Create envelope (V2) /// - /// Get document info from envelope + /// Create a new blank envelope. + /// Account ID + /// The request body. + /// Email subject + /// Cancellation token. + /// The Create envelope (V2) response. + public virtual async Task CreateBlankEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, CombinedEmailBodyAndCustomFields input, string emailSubject, CancellationToken cancellationToken = default) + { + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.CreateBlankEnvelopeAsync"); + try + { + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + var queryParams = new List(); + if (emailSubject is null) + throw new ArgumentNullException(nameof(emailSubject)); + queryParams.Add($"emailSubject={Uri.EscapeDataString(emailSubject.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/createBlankEnvelopeV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Generate Embedded Signing URL (V2) + /// + /// Generate Embedded Signing URL (V2) /// Account ID /// Envelope ID - /// Document name + /// The request body. + /// Is this an in-person signer? + /// Authentication Method + /// Return URL /// Cancellation token. - /// The Get document info from envelope response. - public virtual async Task GetEnvelopeDocumentInfoAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string documentName, CancellationToken cancellationToken = default) + /// The Generate Embedded Signing URL (V2) response. + public virtual async Task GenerateEmbeddedSigningURLAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, DynamicSigningUrlFields input, string isThisAnInPersonSigner, string authenticationMethod, string returnURL, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeDocumentInfoAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GenerateEmbeddedSigningURLAsync"); try { if (accountId is null) @@ -3623,12 +3827,18 @@ public virtual async Task GetEnvelopeDocumentInfoAsync([Dynami if (envelopeId is null) throw new ArgumentNullException(nameof(envelopeId)); var queryParams = new List(); - if (documentName is null) - throw new ArgumentNullException(nameof(documentName)); - queryParams.Add($"documentName={Uri.EscapeDataString(documentName.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/get_document_info" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (isThisAnInPersonSigner is null) + throw new ArgumentNullException(nameof(isThisAnInPersonSigner)); + queryParams.Add($"isInPersonSigner={Uri.EscapeDataString(isThisAnInPersonSigner.ToString())}"); + if (authenticationMethod is null) + throw new ArgumentNullException(nameof(authenticationMethod)); + queryParams.Add($"authenticationMethod={Uri.EscapeDataString(authenticationMethod.ToString())}"); + if (returnURL is null) + throw new ArgumentNullException(nameof(returnURL)); + queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/views/recipientV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3640,25 +3850,32 @@ public virtual async Task GetEnvelopeDocumentInfoAsync([Dynami } /// - /// Get the signers of a template in dynamic schema format + /// Get documents from an envelope /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Account Id - /// Template Id + /// Get documents from an envelope + /// Account ID + /// Envelope ID + /// Output format + /// Certificate of Completion language (optional) /// Cancellation token. - /// The Get the signers of a template in dynamic schema format response. - public virtual async Task GetDynamicSignersAsync(string accountId, string templateId, CancellationToken cancellationToken = default) + /// The Get documents from an envelope response. + public virtual async Task GetDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string outputFormat, string certificateOfCompletionLanguageOptional = default, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDynamicSignersAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDocumentsAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); - if (templateId is null) - throw new ArgumentNullException(nameof(templateId)); - var path = $"/signers/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}/recipients"; + if (envelopeId is null) + throw new ArgumentNullException(nameof(envelopeId)); + if (outputFormat is null) + throw new ArgumentNullException(nameof(outputFormat)); + var queryParams = new List(); + if (certificateOfCompletionLanguageOptional != default) + queryParams.Add($"language={Uri.EscapeDataString(certificateOfCompletionLanguageOptional.ToString())}"); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/documents/{Uri.EscapeDataString(outputFormat.ToString())}/documentsDownload" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3670,25 +3887,21 @@ public virtual async Task GetDynamicSignersAsync(stri } /// - /// Get the signers of a template in dynamic schema format + /// Get organizations /// /// Discovery method used to populate dynamic parameter values at design time. - /// Account Id - /// Template Id /// Cancellation token. - /// The Get the signers of a template in dynamic schema format response. - public virtual async Task GetDynamicRecipientsAsync(string accountId, string templateId, CancellationToken cancellationToken = default) + /// The Get organizations response. + public virtual async Task GetOrganizationsAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDynamicRecipientsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetOrganizationsAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (templateId is null) - throw new ArgumentNullException(nameof(templateId)); - var path = $"/signers/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}"; + var queryParams = new List(); + queryParams.Add("mode=org_admin"); + var path = $"/Management/v2/organizations" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3700,33 +3913,21 @@ public virtual async Task GetDynamicRecipientsAsyn } /// - /// Get info for recipient tab + /// Get account custom fields /// - /// Returns the value of the tab for the given recipient - /// Account ID - /// Envelope ID - /// Recipient ID - /// Tab label + /// Discovery method used to populate dynamic parameter values at design time. + /// Account /// Cancellation token. - /// The Get info for recipient tab response. - public virtual async Task GetTabInfoAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, string tabLabel, CancellationToken cancellationToken = default) + public virtual async Task GetAccountCustomFieldsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetTabInfoAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetAccountCustomFieldsAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - if (recipientId is null) - throw new ArgumentNullException(nameof(recipientId)); - var queryParams = new List(); - if (tabLabel is null) - throw new ArgumentNullException(nameof(tabLabel)); - queryParams.Add($"tabLabel={Uri.EscapeDataString(tabLabel.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (account is null) + throw new ArgumentNullException(nameof(account)); + var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/account_custom_fields"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3738,34 +3939,22 @@ public virtual async Task GetTabInfoAsync([DynamicValues("GetLoginAccounts" } /// - /// Add tabs for a recipient on an envelope + /// List folders /// - /// Add tabs for a recipient on an envelope - /// Account ID - /// Envelope ID - /// Recipient ID - /// The request body. - /// Tab type + /// Discovery method used to populate dynamic parameter values at design time. + /// Account /// Cancellation token. - /// The Add tabs for a recipient on an envelope response. - public virtual async Task AddRecipientTabsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, AnchorTabSchema input, [DynamicValues("StaticResponseForTabTypes")] string tabType, CancellationToken cancellationToken = default) + /// The List folders response. + public virtual async Task GetFolderListAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddRecipientTabsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetFolderListAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - if (recipientId is null) - throw new ArgumentNullException(nameof(recipientId)); - var queryParams = new List(); - if (tabType is null) - throw new ArgumentNullException(nameof(tabType)); - queryParams.Add($"tabType={Uri.EscapeDataString(tabType.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (account is null) + throw new ArgumentNullException(nameof(account)); + var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/folders"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3777,28 +3966,25 @@ public virtual async Task AddRecipientTabsAsync([Dynam } /// - /// Update recipient tab values on an envelope + /// List envelopes /// - /// Update recipient tab values on an envelope + /// Discovery method used to populate dynamic parameter values at design time. /// Account ID - /// Envelope ID - /// Recipient ID - /// The request body. + /// Folder /// Cancellation token. - public virtual async Task UpdateRecipientTabsValuesAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, List input, CancellationToken cancellationToken = default) + /// The List envelopes response. + public virtual async Task GetFolderEnvelopeListAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetFolderList")] string folder, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.UpdateRecipientTabsValuesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetFolderEnvelopeListAsync"); try { if (accountId is null) throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - if (recipientId is null) - throw new ArgumentNullException(nameof(recipientId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/tabs"; - await this - .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + if (folder is null) + throw new ArgumentNullException(nameof(folder)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/folders/{Uri.EscapeDataString(folder.ToString())}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3810,28 +3996,19 @@ await this } /// - /// Get recipient tabs from envelope + /// StaticResponseForRecipientTypes /// - /// Get recipient tabs from envelope - /// Account ID - /// Envelope ID - /// Recipient ID + /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Get recipient tabs from envelope response. - public virtual async Task GetEnvelopeRecipientTabsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string recipientId, CancellationToken cancellationToken = default) + /// The StaticResponseForRecipientTypes response. + public virtual async Task StaticResponseForRecipientTypesAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetEnvelopeRecipientTabsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForRecipientTypesAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - if (recipientId is null) - throw new ArgumentNullException(nameof(recipientId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/{Uri.EscapeDataString(recipientId.ToString())}/recipientTabs"; + var path = $"/recipient_types"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3843,22 +4020,19 @@ public virtual async Task GetEnvelopeRecipientTabsAsync([ } /// - /// Get Maestro Workflow Definitions + /// StaticResponseForSignatureTypes /// /// Discovery method used to populate dynamic parameter values at design time. - /// accountId /// Cancellation token. - /// The Get Maestro Workflow Definitions response. - public virtual async Task GetMaestroWorkflowDefinitionsAsync(string accountId, CancellationToken cancellationToken = default) + /// The StaticResponseForSignatureTypes response. + public virtual async Task StaticResponseForSignatureTypesAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetMaestroWorkflowDefinitionsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForSignatureTypesAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows"; + var path = $"/signature_types"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3870,25 +4044,22 @@ public virtual async Task GetMaestroWorkflowDefinit } /// - /// Get Maestro Workflow Definition + /// GetSigningGroups /// /// Discovery method used to populate dynamic parameter values at design time. - /// accountId - /// workflowId + /// Account /// Cancellation token. - /// The Get Maestro Workflow Definition response. - public virtual async Task GetMaestroWorkflowDefinitionAsync(string accountId, string workflowId, CancellationToken cancellationToken = default) + /// The GetSigningGroups response. + public virtual async Task GetSigningGroupsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetMaestroWorkflowDefinitionAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetSigningGroupsAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (workflowId is null) - throw new ArgumentNullException(nameof(workflowId)); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows/{Uri.EscapeDataString(workflowId.ToString())}"; + if (account is null) + throw new ArgumentNullException(nameof(account)); + var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/signing_groups"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3900,31 +4071,19 @@ public virtual async Task GetMaestroWorkflowDefiniti } /// - /// Start Docusign workflow + /// StaticResponseForTabTypes /// - /// Start Docusign workflow - /// Account ID - /// workflow - /// The request body. - /// instance Name + /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Start Docusign workflow response. - public virtual async Task TriggerMaestroFlowAsync([DynamicValues("GetLoginAccounts")] string accountId, [DynamicValues("GetMaestroWorkflowDefinitions")] string workflow, MaestroInputVariables input, string instanceName, CancellationToken cancellationToken = default) + /// The StaticResponseForTabTypes response. + public virtual async Task StaticResponseForTabTypesAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.TriggerMaestroFlowAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForTabTypesAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (workflow is null) - throw new ArgumentNullException(nameof(workflow)); - var queryParams = new List(); - if (instanceName is null) - throw new ArgumentNullException(nameof(instanceName)); - queryParams.Add($"instanceName={Uri.EscapeDataString(instanceName.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows/trigger/{Uri.EscapeDataString(workflow.ToString())}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/tab_types"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3936,19 +4095,22 @@ public virtual async Task TriggerMaestroFlowAsync([D } /// - /// StaticResponseForTabTypes + /// Get Maestro Workflow Definitions /// /// Discovery method used to populate dynamic parameter values at design time. + /// accountId /// Cancellation token. - /// The StaticResponseForTabTypes response. - public virtual async Task StaticResponseForTabTypesAsync(CancellationToken cancellationToken = default) + /// The Get Maestro Workflow Definitions response. + public virtual async Task GetMaestroWorkflowDefinitionsAsync(string accountId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForTabTypesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetMaestroWorkflowDefinitionsAsync"); try { - var path = $"/tab_types"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3960,19 +4122,22 @@ public virtual async Task StaticResponseForTabTypesAsync(Cance } /// - /// StaticResponseForRecipientTypes + /// Get All Workflow Ids /// /// Discovery method used to populate dynamic parameter values at design time. + /// Account /// Cancellation token. - /// The StaticResponseForRecipientTypes response. - public virtual async Task StaticResponseForRecipientTypesAsync(CancellationToken cancellationToken = default) + /// The Get All Workflow Ids response. + public virtual async Task GetAllWorkflowIDsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForRecipientTypesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetAllWorkflowIDsAsync"); try { - var path = $"/recipient_types"; + if (account is null) + throw new ArgumentNullException(nameof(account)); + var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/all_identity_verification"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3984,19 +4149,25 @@ public virtual async Task StaticResponseForRecipientType } /// - /// StaticResponseForSignatureTypes + /// Get Maestro Workflow Definition /// /// Discovery method used to populate dynamic parameter values at design time. + /// accountId + /// workflowId /// Cancellation token. - /// The StaticResponseForSignatureTypes response. - public virtual async Task StaticResponseForSignatureTypesAsync(CancellationToken cancellationToken = default) + /// The Get Maestro Workflow Definition response. + public virtual async Task GetMaestroWorkflowDefinitionAsync(string accountId, string workflowId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForSignatureTypesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetMaestroWorkflowDefinitionAsync"); try { - var path = $"/signature_types"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (workflowId is null) + throw new ArgumentNullException(nameof(workflowId)); + var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/maestro-workflows/{Uri.EscapeDataString(workflowId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4008,24 +4179,25 @@ public virtual async Task StaticResponseForSignatureType } /// - /// StaticResponseForAnchorTabSchema + /// Get the signers of a template in dynamic schema format /// /// Discovery method used to populate dynamic parameter values at design time. - /// tab type + /// Account Id + /// Template Id /// Cancellation token. - /// The StaticResponseForAnchorTabSchema response. - public virtual async Task StaticResponseForAnchorTabSchemaAsync(string tabType, CancellationToken cancellationToken = default) + /// The Get the signers of a template in dynamic schema format response. + public virtual async Task GetDynamicSignersAsync(string accountId, string templateId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForAnchorTabSchemaAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDynamicSignersAsync"); try { - var queryParams = new List(); - if (tabType is null) - throw new ArgumentNullException(nameof(tabType)); - queryParams.Add($"tabType={Uri.EscapeDataString(tabType.ToString())}"); - var path = $"/anchortab_schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (templateId is null) + throw new ArgumentNullException(nameof(templateId)); + var path = $"/signers/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}/recipients"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4037,19 +4209,25 @@ public virtual async Task StaticRespon } /// - /// StaticResponseForCompositeTemplates + /// Get the signers of a template in dynamic schema format /// /// Discovery method used to populate dynamic parameter values at design time. + /// Account Id + /// Template Id /// Cancellation token. - /// The StaticResponseForCompositeTemplates response. - public virtual async Task StaticResponseForCompositeTemplatesAsync(CancellationToken cancellationToken = default) + /// The Get the signers of a template in dynamic schema format response. + public virtual async Task GetDynamicRecipientsAsync(string accountId, string templateId, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForCompositeTemplatesAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDynamicRecipientsAsync"); try { - var path = $"/composite_templates_schema"; + if (accountId is null) + throw new ArgumentNullException(nameof(accountId)); + if (templateId is null) + throw new ArgumentNullException(nameof(templateId)); + var path = $"/signers/accounts/{Uri.EscapeDataString(accountId.ToString())}/templates/{Uri.EscapeDataString(templateId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4092,35 +4270,6 @@ public virtual async Task StaticRe } } - /// - /// StaticResponseForEmbeddedSenderSchema - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Return URL - /// Cancellation token. - /// The StaticResponseForEmbeddedSenderSchema response. - public virtual async Task StaticResponseForEmbeddedSenderSchemaAsync(string returnURL, CancellationToken cancellationToken = default) - { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForEmbeddedSenderSchemaAsync"); - try - { - var queryParams = new List(); - if (returnURL is null) - throw new ArgumentNullException(nameof(returnURL)); - queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); - var path = $"/embeddedSender_schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// StaticResponseForVerificationTypeSchema /// @@ -4151,20 +4300,24 @@ public virtual async Task Stati } /// - /// Show build Number (For reference only. Do not include in a flow for execution) + /// StaticResponseForEmbeddedSenderSchema /// - /// Identifier for the currently deployed build. - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// Return URL /// Cancellation token. - /// The Show build Number (For reference only. Do not include in a flow for execution) response. - public virtual async Task BuildNumberAsync(BuildNumberSchema input, CancellationToken cancellationToken = default) + /// The StaticResponseForEmbeddedSenderSchema response. + public virtual async Task StaticResponseForEmbeddedSenderSchemaAsync(string returnURL, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.BuildNumberAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForEmbeddedSenderSchemaAsync"); try { - var path = $"/build_number"; + var queryParams = new List(); + if (returnURL is null) + throw new ArgumentNullException(nameof(returnURL)); + queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); + var path = $"/embeddedSender_schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4176,19 +4329,24 @@ public virtual async Task BuildNumberAsync(BuildNumberSchem } /// - /// StaticResponseForBuildNumberSchema + /// StaticResponseForEmbeddedSigningSchema /// /// Discovery method used to populate dynamic parameter values at design time. + /// Return URL /// Cancellation token. - /// The StaticResponseForBuildNumberSchema response. - public virtual async Task StaticResponseForBuildNumberSchemaAsync(CancellationToken cancellationToken = default) + /// The StaticResponseForEmbeddedSigningSchema response. + public virtual async Task StaticResponseForEmbeddedSigningSchemaAsync(string returnURL, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForBuildNumberSchemaAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForEmbeddedSigningSchemaAsync"); try { - var path = $"/build_number_schema"; + var queryParams = new List(); + if (returnURL is null) + throw new ArgumentNullException(nameof(returnURL)); + queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); + var path = $"/embeddedSigning_schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4200,73 +4358,28 @@ public virtual async Task StaticResp } /// - /// Add recipient to an envelope (V2) + /// StaticResponseForEmbeddedSigningSchemaV2 /// - /// Add recipient to an envelope. - /// Account ID - /// Envelope ID - /// The request body. - /// Recipient type - /// Client User ID - /// Recipient ID - /// Embedded recipient start URL - /// Signing order - /// Email notification language - /// Email notification subject - /// Email notification body - /// Note - /// Role name - /// SMS Country Code - /// SMS Phone Number - /// Signing Group - /// Signature type - /// Verification workflow + /// Discovery method used to populate dynamic parameter values at design time. + /// Return URL + /// Is This an Person Signer? /// Cancellation token. - /// The Add recipient to an envelope (V2) response. - public virtual async Task AddRecipientToEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, AdditionalRecipientParamsSchema input, [DynamicValues("StaticResponseForRecipientTypes")] string recipientType, string clientUserId = default, string recipientId = default, string embeddedRecipientStartURL = default, string signingOrder = default, string emailNotificationLanguage = default, string emailNotificationSubject = default, string emailNotificationBody = default, string note = default, string roleName = default, string sMSCountryCode = default, string sMSPhoneNumber = default, [DynamicValues("GetSigningGroups")] string signingGroup = default, [DynamicValues("StaticResponseForSignatureTypes")] string signatureType = default, [DynamicValues("GetAllWorkflowIDs")] string verificationWorkflow = default, CancellationToken cancellationToken = default) + /// The StaticResponseForEmbeddedSigningSchemaV2 response. + public virtual async Task StaticResponseForEmbeddedSigningSchemaV2Async(string returnURL, string isThisAnPersonSigner, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.AddRecipientToEnvelopeAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForEmbeddedSigningSchemaV2Async"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); var queryParams = new List(); - if (recipientType is null) - throw new ArgumentNullException(nameof(recipientType)); - queryParams.Add($"recipientType={Uri.EscapeDataString(recipientType.ToString())}"); - if (clientUserId != default) - queryParams.Add($"clientUserId={Uri.EscapeDataString(clientUserId.ToString())}"); - if (recipientId != default) - queryParams.Add($"recipientId={Uri.EscapeDataString(recipientId.ToString())}"); - if (embeddedRecipientStartURL != default) - queryParams.Add($"embeddedRecipientStartURL={Uri.EscapeDataString(embeddedRecipientStartURL.ToString())}"); - if (signingOrder != default) - queryParams.Add($"routingOrder={Uri.EscapeDataString(signingOrder.ToString())}"); - if (emailNotificationLanguage != default) - queryParams.Add($"emailNotificationLanguage={Uri.EscapeDataString(emailNotificationLanguage.ToString())}"); - if (emailNotificationSubject != default) - queryParams.Add($"emailNotificationSubject={Uri.EscapeDataString(emailNotificationSubject.ToString())}"); - if (emailNotificationBody != default) - queryParams.Add($"emailNotificationBody={Uri.EscapeDataString(emailNotificationBody.ToString())}"); - if (note != default) - queryParams.Add($"note={Uri.EscapeDataString(note.ToString())}"); - if (roleName != default) - queryParams.Add($"roleName={Uri.EscapeDataString(roleName.ToString())}"); - if (sMSCountryCode != default) - queryParams.Add($"countryCode={Uri.EscapeDataString(sMSCountryCode.ToString())}"); - if (sMSPhoneNumber != default) - queryParams.Add($"phoneNumber={Uri.EscapeDataString(sMSPhoneNumber.ToString())}"); - if (signingGroup != default) - queryParams.Add($"signingGroupId={Uri.EscapeDataString(signingGroup.ToString())}"); - if (signatureType != default) - queryParams.Add($"signatureType={Uri.EscapeDataString(signatureType.ToString())}"); - if (verificationWorkflow != default) - queryParams.Add($"workflowId={Uri.EscapeDataString(verificationWorkflow.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/recipients/addRecipientV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (returnURL is null) + throw new ArgumentNullException(nameof(returnURL)); + queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); + if (isThisAnPersonSigner is null) + throw new ArgumentNullException(nameof(isThisAnPersonSigner)); + queryParams.Add($"isInPersonSigner={Uri.EscapeDataString(isThisAnPersonSigner.ToString())}"); + var path = $"/embeddedSigning_schema_v2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4278,28 +4391,19 @@ public virtual async Task AddRecipientToEnvelopeAsync([DynamicValues("Ge } /// - /// Create envelope (V2) + /// StaticResponseForBuildNumberSchema /// - /// Create a new blank envelope. - /// Account ID - /// The request body. - /// Email subject + /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Create envelope (V2) response. - public virtual async Task CreateBlankEnvelopeAsync([DynamicValues("GetLoginAccounts")] string accountId, CombinedEmailBodyAndCustomFields input, string emailSubject, CancellationToken cancellationToken = default) + /// The StaticResponseForBuildNumberSchema response. + public virtual async Task StaticResponseForBuildNumberSchemaAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.CreateBlankEnvelopeAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForBuildNumberSchemaAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - var queryParams = new List(); - if (emailSubject is null) - throw new ArgumentNullException(nameof(emailSubject)); - queryParams.Add($"emailSubject={Uri.EscapeDataString(emailSubject.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/createBlankEnvelopeV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/build_number_schema"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4311,39 +4415,21 @@ public virtual async Task CreateBlankEnvelopeAsync([Dyna } /// - /// Generate Embedded Signing URL (V2) + /// Get custom fields from an account /// - /// Generate Embedded Signing URL (V2) - /// Account ID - /// Envelope ID - /// The request body. - /// Is this an in-person signer? - /// Authentication Method - /// Return URL + /// Discovery method used to populate dynamic parameter values at design time. + /// Account /// Cancellation token. - /// The Generate Embedded Signing URL (V2) response. - public virtual async Task GenerateEmbeddedSigningURLAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, DynamicSigningUrlFields input, string isThisAnInPersonSigner, string authenticationMethod, string returnURL, CancellationToken cancellationToken = default) + public virtual async Task GetCustomFieldsAsync([DynamicValues("GetLoginAccounts")] string account, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GenerateEmbeddedSigningURLAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetCustomFieldsAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - var queryParams = new List(); - if (isThisAnInPersonSigner is null) - throw new ArgumentNullException(nameof(isThisAnInPersonSigner)); - queryParams.Add($"isInPersonSigner={Uri.EscapeDataString(isThisAnInPersonSigner.ToString())}"); - if (authenticationMethod is null) - throw new ArgumentNullException(nameof(authenticationMethod)); - queryParams.Add($"authenticationMethod={Uri.EscapeDataString(authenticationMethod.ToString())}"); - if (returnURL is null) - throw new ArgumentNullException(nameof(returnURL)); - queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/views/recipientV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (account is null) + throw new ArgumentNullException(nameof(account)); + var path = $"/accounts/{Uri.EscapeDataString(account.ToString())}/custom_fields"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4355,32 +4441,24 @@ public virtual async Task GenerateEmbeddedSigningURLAsy } /// - /// Get documents from an envelope + /// StaticResponseForAnchorTabSchema /// - /// Get documents from an envelope - /// Account ID - /// Envelope ID - /// Output format - /// Certificate of Completion language (optional) + /// Discovery method used to populate dynamic parameter values at design time. + /// tab type /// Cancellation token. - /// The Get documents from an envelope response. - public virtual async Task GetDocumentsAsync([DynamicValues("GetLoginAccounts")] string accountId, string envelopeId, string outputFormat, string certificateOfCompletionLanguageOptional = default, CancellationToken cancellationToken = default) + /// The StaticResponseForAnchorTabSchema response. + public virtual async Task StaticResponseForAnchorTabSchemaAsync(string tabType, CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.GetDocumentsAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForAnchorTabSchemaAsync"); try { - if (accountId is null) - throw new ArgumentNullException(nameof(accountId)); - if (envelopeId is null) - throw new ArgumentNullException(nameof(envelopeId)); - if (outputFormat is null) - throw new ArgumentNullException(nameof(outputFormat)); var queryParams = new List(); - if (certificateOfCompletionLanguageOptional != default) - queryParams.Add($"language={Uri.EscapeDataString(certificateOfCompletionLanguageOptional.ToString())}"); - var path = $"/accounts/{Uri.EscapeDataString(accountId.ToString())}/envelopes/{Uri.EscapeDataString(envelopeId.ToString())}/documents/{Uri.EscapeDataString(outputFormat.ToString())}/documentsDownload" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (tabType is null) + throw new ArgumentNullException(nameof(tabType)); + queryParams.Add($"tabType={Uri.EscapeDataString(tabType.ToString())}"); + var path = $"/anchortab_schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4392,28 +4470,19 @@ public virtual async Task GetDocumentsAsync([DynamicValues("GetLoginAcco } /// - /// StaticResponseForEmbeddedSigningSchemaV2 + /// StaticResponseForCompositeTemplates /// /// Discovery method used to populate dynamic parameter values at design time. - /// Return URL - /// Is This an Person Signer? /// Cancellation token. - /// The StaticResponseForEmbeddedSigningSchemaV2 response. - public virtual async Task StaticResponseForEmbeddedSigningSchemaAsync(string returnURL, string isThisAnPersonSigner, CancellationToken cancellationToken = default) + /// The StaticResponseForCompositeTemplates response. + public virtual async Task StaticResponseForCompositeTemplatesAsync(CancellationToken cancellationToken = default) { - using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForEmbeddedSigningSchemaAsync"); + using var activity = DocuSignClient.ConnectorActivitySource.StartActivity("DocuSignClient.StaticResponseForCompositeTemplatesAsync"); try { - var queryParams = new List(); - if (returnURL is null) - throw new ArgumentNullException(nameof(returnURL)); - queryParams.Add($"returnUrl={Uri.EscapeDataString(returnURL.ToString())}"); - if (isThisAnPersonSigner is null) - throw new ArgumentNullException(nameof(isThisAnPersonSigner)); - queryParams.Add($"isInPersonSigner={Uri.EscapeDataString(isThisAnPersonSigner.ToString())}"); - var path = $"/embeddedSigning_schema_v2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/composite_templates_schema"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/DocumentdbExtensions.cs b/src/Azure.Connectors.Sdk/Generated/DocumentdbExtensions.cs index a29f6fb..edfd07e 100644 --- a/src/Azure.Connectors.Sdk/Generated/DocumentdbExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/DocumentdbExtensions.cs @@ -28,30 +28,6 @@ namespace Azure.Connectors.Sdk.Documentdb.Models #region Types - /// - /// Response for Get Cosmos DB accounts - /// - public class CosmosDbAccountList - { - /// List of Azure Cosmos DB account names - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of Azure Cosmos DB account names - /// - public class CosmosDbAccount - { - /// The name of the Azure Cosmos DB account. - [JsonPropertyName("Name")] - public string AzureCosmosDBAccountName { get; set; } - - /// The display name of the Azure Cosmos DB account. - [JsonPropertyName("DisplayName")] - public string AzureCosmosDBAccountDisplayName { get; set; } - } - /// /// Response for Create or update document (V3) /// @@ -138,42 +114,6 @@ public class ObjectWithoutType public Dictionary AdditionalProperties { get; set; } = new(); } - /// - /// Response for Get all collections (V2) - /// - public class GetCollectionsResponse - { - /// _rid - [JsonPropertyName("_rid")] - public string Rid { get; set; } - - /// DocumentCollections - [JsonPropertyName("DocumentCollections")] - public List DocumentCollections { get; set; } - - /// _count - [JsonPropertyName("_count")] - public int? Count { get; set; } - } - - /// - /// Response for Get all databases (V2) - /// - public class GetDatabasesResponse - { - /// _rid - [JsonPropertyName("_rid")] - public string Rid { get; set; } - - /// Databases - [JsonPropertyName("Databases")] - public List Databases { get; set; } - - /// _count - [JsonPropertyName("_count")] - public int? Count { get; set; } - } - /// /// Response for Get a document (V2) /// @@ -185,7 +125,7 @@ public class GetDocumentResponse } /// - /// Item in List of columns along with their Sensitivity Labels + /// Data name with sensitivity label info /// public class DataWithSensitivityLabelInfo { @@ -199,7 +139,7 @@ public class DataWithSensitivityLabelInfo } /// - /// Item in List of Sensitivity Label Information + /// SensitivityLabel metadata info /// public class SensitivityLabelMetadata { @@ -281,7 +221,7 @@ public class GetStoredProceduresResponse } /// - /// Response for Query documents V5 + /// Array of documents that match the requested query and the related metadata. /// public class QueryDocumentsResponse { @@ -342,6 +282,66 @@ public class ReplaceStoredProcedureInput public string Id { get; set; } } + /// + /// List of Azure Cosmos DB account names + /// + public class CosmosDbAccountList + { + /// List of Azure Cosmos DB account names + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Azure Cosmos DB account + /// + public class CosmosDbAccount + { + /// The name of the Azure Cosmos DB account. + [JsonPropertyName("Name")] + public string AzureCosmosDBAccountName { get; set; } + + /// The display name of the Azure Cosmos DB account. + [JsonPropertyName("DisplayName")] + public string AzureCosmosDBAccountDisplayName { get; set; } + } + + /// + /// Response for Get all databases (V2) + /// + public class GetDatabasesResponse + { + /// _rid + [JsonPropertyName("_rid")] + public string Rid { get; set; } + + /// Databases + [JsonPropertyName("Databases")] + public List Databases { get; set; } + + /// _count + [JsonPropertyName("_count")] + public int? Count { get; set; } + } + + /// + /// Response for Get all collections (V2) + /// + public class GetCollectionsResponse + { + /// _rid + [JsonPropertyName("_rid")] + public string Rid { get; set; } + + /// DocumentCollections + [JsonPropertyName("DocumentCollections")] + public List DocumentCollections { get; set; } + + /// _count + [JsonPropertyName("_count")] + public int? Count { get; set; } + } + /// /// postDocumentsRequest /// @@ -377,32 +377,6 @@ public class PutDocumentRequest /// public static class DocumentDbModelFactory { - /// - /// Creates a new instance of . - /// - public static CosmosDbAccountList CosmosDbAccountList( - List value = default) - { - return new CosmosDbAccountList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static CosmosDbAccount CosmosDbAccount( - string azureCosmosDBAccountName = default, - string azureCosmosDBAccountDisplayName = default) - { - return new CosmosDbAccount - { - AzureCosmosDBAccountName = azureCosmosDBAccountName, - AzureCosmosDBAccountDisplayName = azureCosmosDBAccountDisplayName, - }; - } - /// /// Creates a new instance of . /// @@ -461,38 +435,6 @@ public static CreateStoredProcedureResponse CreateStoredProcedureResponse( }; } - /// - /// Creates a new instance of . - /// - public static GetCollectionsResponse GetCollectionsResponse( - string rid = default, - List documentCollections = default, - int? count = default) - { - return new GetCollectionsResponse - { - Rid = rid, - DocumentCollections = documentCollections, - Count = count, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetDatabasesResponse GetDatabasesResponse( - string rid = default, - List databases = default, - int? count = default) - { - return new GetDatabasesResponse - { - Rid = rid, - Databases = databases, - Count = count, - }; - } - /// /// Creates a new instance of . /// @@ -632,6 +574,64 @@ public static ReplaceStoredProcedureInput ReplaceStoredProcedureInput( Id = id, }; } + + /// + /// Creates a new instance of . + /// + public static CosmosDbAccountList CosmosDbAccountList( + List value = default) + { + return new CosmosDbAccountList + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static CosmosDbAccount CosmosDbAccount( + string azureCosmosDBAccountName = default, + string azureCosmosDBAccountDisplayName = default) + { + return new CosmosDbAccount + { + AzureCosmosDBAccountName = azureCosmosDBAccountName, + AzureCosmosDBAccountDisplayName = azureCosmosDBAccountDisplayName, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetDatabasesResponse GetDatabasesResponse( + string rid = default, + List databases = default, + int? count = default) + { + return new GetDatabasesResponse + { + Rid = rid, + Databases = databases, + Count = count, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetCollectionsResponse GetCollectionsResponse( + string rid = default, + List documentCollections = default, + int? count = default) + { + return new GetCollectionsResponse + { + Rid = rid, + DocumentCollections = documentCollections, + Count = count, + }; + } } #endregion Model Factory @@ -707,30 +707,6 @@ protected DocumentDbClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get Cosmos DB accounts - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get Cosmos DB accounts response. - public virtual async Task GetCosmosDbAccountsAsync(CancellationToken cancellationToken = default) - { - using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetCosmosDbAccountsAsync"); - try - { - var path = $"/cosmosdbaccounts"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Create or update document (V3) /// @@ -907,63 +883,6 @@ public virtual async Task ExecuteStoredProcedureAsync([Dynami } } - /// - /// Get all collections (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Azure Cosmos DB account name - /// Database ID - /// Cancellation token. - /// The Get all collections (V2) response. - public virtual async Task GetCollectionsAsync([DynamicValues("GetCosmosDbAccounts")] string azureCosmosDBAccountName, [DynamicValues("GetDatabases_V2")] string databaseId, CancellationToken cancellationToken = default) - { - using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetCollectionsAsync"); - try - { - if (azureCosmosDBAccountName is null) - throw new ArgumentNullException(nameof(azureCosmosDBAccountName)); - if (databaseId is null) - throw new ArgumentNullException(nameof(databaseId)); - var path = $"/v2/cosmosdb/{Uri.EscapeDataString(azureCosmosDBAccountName.ToString())}/dbs/{Uri.EscapeDataString(databaseId.ToString())}/colls"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get all databases (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Azure Cosmos DB account name - /// Cancellation token. - /// The Get all databases (V2) response. - public virtual async Task GetDatabasesAsync([DynamicValues("GetCosmosDbAccounts")] string azureCosmosDBAccountName, CancellationToken cancellationToken = default) - { - using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetDatabasesAsync"); - try - { - if (azureCosmosDBAccountName is null) - throw new ArgumentNullException(nameof(azureCosmosDBAccountName)); - var path = $"/v2/cosmosdb/{Uri.EscapeDataString(azureCosmosDBAccountName.ToString())}/dbs"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get a document (V2) /// @@ -1212,6 +1131,87 @@ public virtual async Task ReplaceStoredProcedureA } } + /// + /// Get Cosmos DB accounts + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get Cosmos DB accounts response. + public virtual async Task GetCosmosDbAccountsAsync(CancellationToken cancellationToken = default) + { + using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetCosmosDbAccountsAsync"); + try + { + var path = $"/cosmosdbaccounts"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get all databases (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Azure Cosmos DB account name + /// Cancellation token. + /// The Get all databases (V2) response. + public virtual async Task GetDatabasesAsync([DynamicValues("GetCosmosDbAccounts")] string azureCosmosDBAccountName, CancellationToken cancellationToken = default) + { + using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetDatabasesAsync"); + try + { + if (azureCosmosDBAccountName is null) + throw new ArgumentNullException(nameof(azureCosmosDBAccountName)); + var path = $"/v2/cosmosdb/{Uri.EscapeDataString(azureCosmosDBAccountName.ToString())}/dbs"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get all collections (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Azure Cosmos DB account name + /// Database ID + /// Cancellation token. + /// The Get all collections (V2) response. + public virtual async Task GetCollectionsAsync([DynamicValues("GetCosmosDbAccounts")] string azureCosmosDBAccountName, [DynamicValues("GetDatabases_V2")] string databaseId, CancellationToken cancellationToken = default) + { + using var activity = DocumentDbClient.ConnectorActivitySource.StartActivity("DocumentDbClient.GetCollectionsAsync"); + try + { + if (azureCosmosDBAccountName is null) + throw new ArgumentNullException(nameof(azureCosmosDBAccountName)); + if (databaseId is null) + throw new ArgumentNullException(nameof(databaseId)); + var path = $"/v2/cosmosdb/{Uri.EscapeDataString(azureCosmosDBAccountName.ToString())}/dbs/{Uri.EscapeDataString(databaseId.ToString())}/colls"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/DropboxExtensions.cs b/src/Azure.Connectors.Sdk/Generated/DropboxExtensions.cs index c526dce..ee02c16 100644 --- a/src/Azure.Connectors.Sdk/Generated/DropboxExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/DropboxExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Dropbox.Models #region Types /// - /// Response for Get file metadata + /// Blob metadata /// public class BlobMetadata { @@ -621,6 +621,57 @@ public virtual async Task CopyFileAsync(string sourceURL, string d } } + /// + /// List files in folder + /// + /// This operation gets the list of files and subfolders in a folder. + /// Folder + /// Cancellation token. + /// The List files in folder response. + public virtual async Task> ListFolderAsync(string folder, CancellationToken cancellationToken = default) + { + using var activity = DropboxClient.ConnectorActivitySource.StartActivity("DropboxClient.ListFolderAsync"); + try + { + if (folder is null) + throw new ArgumentNullException(nameof(folder)); + var path = $"/datasets/default/folders/{Uri.EscapeDataString(Uri.EscapeDataString(folder.ToString()))}"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// List files in root folder + /// + /// This operation gets the list of files and subfolders in the root folder. + /// Cancellation token. + /// The List files in root folder response. + public virtual async Task> ListRootFolderAsync(CancellationToken cancellationToken = default) + { + using var activity = DropboxClient.ConnectorActivitySource.StartActivity("DropboxClient.ListRootFolderAsync"); + try + { + var path = $"/datasets/default/folders"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Extract archive to folder /// diff --git a/src/Azure.Connectors.Sdk/Generated/DynamicsAXExtensions.cs b/src/Azure.Connectors.Sdk/Generated/DynamicsAXExtensions.cs index 43c7ada..199516a 100644 --- a/src/Azure.Connectors.Sdk/Generated/DynamicsAXExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/DynamicsAXExtensions.cs @@ -29,147 +29,7 @@ namespace Azure.Connectors.Sdk.DynamicsAX.Models #region Types /// - /// Response for Get actions metadata - /// - public class ProcedureMetadata - { - /// Procedure name - [JsonPropertyName("name")] - public string Name { get; set; } - - /// Procedure title - [JsonPropertyName("title")] - public string Title { get; set; } - - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// schema - /// - public class ObjectEntity - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - - /// - /// Response for Get metadata of a exportable table - /// - public class TableMetadata - { - /// Table name - [JsonPropertyName("name")] - public string Name { get; set; } - - /// Table title - [JsonPropertyName("title")] - public string Title { get; set; } - - /// Table permission - [JsonPropertyName("x-ms-permission")] - public string XMsPermission { get; set; } - - /// x-ms-capabilities - [JsonPropertyName("x-ms-capabilities")] - public TableCapabilitiesMetadata XMsCapabilities { get; set; } - - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - - /// referencedEntities - [JsonPropertyName("referencedEntities")] - public ObjectEntity ReferencedEntities { get; set; } - - /// Url link - [JsonPropertyName("webUrl")] - public string WebUrl { get; set; } - } - - /// - /// x-ms-capabilities - /// - public class TableCapabilitiesMetadata - { - /// sortRestrictions - [JsonPropertyName("sortRestrictions")] - public TableSortRestrictionsMetadata SortRestrictions { get; set; } - - /// filterRestrictions - [JsonPropertyName("filterRestrictions")] - public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } - - /// selectRestrictions - [JsonPropertyName("selectRestrictions")] - public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } - - /// Server paging restrictions - [JsonPropertyName("isOnlyServerPagable")] - public bool? IsOnlyServerPagable { get; set; } - - /// List of supported filter capabilities - [JsonPropertyName("filterFunctionSupport")] - public List FilterFunctionSupport { get; set; } - - /// List of supported server-driven paging capabilities - [JsonPropertyName("serverPagingOptions")] - public List ServerPagingOptions { get; set; } - } - - /// - /// sortRestrictions - /// - public class TableSortRestrictionsMetadata - { - /// Indicates whether this table has sortable columns - [JsonPropertyName("sortable")] - public bool? Sortable { get; set; } - - /// List of unsortable properties - [JsonPropertyName("unsortableProperties")] - public List UnsortableProperties { get; set; } - - /// List of properties which support ascending order only - [JsonPropertyName("ascendingOnlyProperties")] - public List AscendingOnlyProperties { get; set; } - } - - /// - /// filterRestrictions - /// - public class TableFilterRestrictionsMetadata - { - /// Indicates whether this table has filterable columns - [JsonPropertyName("filterable")] - public bool? Filterable { get; set; } - - /// List of non filterable properties - [JsonPropertyName("nonFilterableProperties")] - public List NonFilterableProperties { get; set; } - - /// List of required properties - [JsonPropertyName("requiredProperties")] - public List RequiredProperties { get; set; } - } - - /// - /// selectRestrictions - /// - public class TableSelectRestrictionsMetadata - { - /// Indicates whether this table has selectable columns - [JsonPropertyName("selectable")] - public bool? Selectable { get; set; } - } - - /// - /// Response for When a Business Event occurs + /// Model for Business Events Subscription response /// public class BusinessEventSubscriptionResponse { @@ -190,82 +50,6 @@ public class BusinessEventSubscriptionResponse public string NotificationUrl { get; set; } } - /// - /// Response for Gets legal entities - /// - public class TriggerFieldDataList - { - /// List of business event categories - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of business event categories - /// - public class TriggerFieldData - { - /// Business event data name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Business event data display name - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - } - - /// - /// Response for Gets business events - /// - public class BusinessEventsList - { - /// List of business events - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of business events - /// - public class BusinessEventData - { - /// Business event Id - [JsonPropertyName("Id")] - public string Id { get; set; } - - /// Business event data name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Business event data display name - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - } - - /// - /// Response for Get actions - /// - public class ProceduresList - { - /// List of Procedures - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of Procedures - /// - public class Procedure - { - /// Procedure name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Procedure display name - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - } - /// /// Execute action /// @@ -281,7 +65,7 @@ public class ExecuteProcedureInput } /// - /// Response for Execute action + /// Result of procedure execution /// public class AxOnlineProcedureResult { @@ -296,46 +80,7 @@ public class AxOnlineProcedureResult } /// - /// Response for Get instances - /// - public class DataSetsList - { - /// List of datasets - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of datasets - /// - public class DataSet - { - /// Dataset name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Dataset display name - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - - /// Pass-through Native Queries - [JsonPropertyName("query")] - [JsonInclude] - public List Query { get; init; } - } - - /// - /// Item in Pass-through Native Queries - /// - public class PassThroughNativeQuery - { - /// Query language - [JsonPropertyName("Language")] - public string Language { get; set; } - } - - /// - /// Response for Lists items present in table + /// List of Items /// public class ItemsList { @@ -345,7 +90,7 @@ public class ItemsList } /// - /// Item in List of Items + /// Table item entity /// [DynamicSchema("GetTable")] public class Item @@ -433,7 +178,7 @@ public class PatchItemResponse } /// - /// Response for Lists exportable tables + /// Represents a list of tables. /// public class TablesList { @@ -443,7 +188,7 @@ public class TablesList } /// - /// Item in List of Tables + /// Represents a table. /// public class Table { @@ -462,147 +207,402 @@ public class Table } /// - /// BusinessEventSubscription + /// List of datasets /// - public class BusinessEventSubscription + public class DataSetsList { - /// Callback URL to the flow engine. Expected as part of the request and provided by Flow. - [JsonPropertyName("NotificationUrl")] - public string NotificationUrl { get; set; } + /// List of datasets + [JsonPropertyName("value")] + public List Value { get; set; } } - #endregion Types - - #region Model Factory - /// - /// Model factory for creating instances of DynamicsAX models. - /// Use these factory methods to construct model instances in tests and scenarios - /// where output-only properties (with init-only setters) need to be populated. + /// Dataset /// - public static class DynamicsAXModelFactory + public class DataSet + { + /// Dataset name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// Dataset display name + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + + /// Pass-through Native Queries + [JsonPropertyName("query")] + [JsonInclude] + public List Query { get; init; } + } + + /// + /// static schema for pass-through native query execution + /// + public class PassThroughNativeQuery + { + /// Query language + [JsonPropertyName("Language")] + public string Language { get; set; } + } + + /// + /// Represents a list of Business event categories. + /// + public class TriggerFieldDataList + { + /// List of business event categories + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Business event model + /// + public class TriggerFieldData + { + /// Business event data name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// Business event data display name + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + } + + /// + /// Represents a list of Business events. + /// + public class BusinessEventsList + { + /// List of business events + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Business event model + /// + public class BusinessEventData + { + /// Business event Id + [JsonPropertyName("Id")] + public string Id { get; set; } + + /// Business event data name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// Business event data display name + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + } + + /// + /// Represents a list of procedures. + /// + public class ProceduresList + { + /// List of Procedures + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Procedure + /// + public class Procedure + { + /// Procedure name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// Procedure display name + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + } + + /// + /// Procedure metadata + /// + public class ProcedureMetadata + { + /// Procedure name + [JsonPropertyName("name")] + public string Name { get; set; } + + /// Procedure title + [JsonPropertyName("title")] + public string Title { get; set; } + + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + } + + /// + /// schema + /// + public class ObjectEntity { /// - /// Creates a new instance of . + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. /// - public static ProcedureMetadata ProcedureMetadata( - string name = default, - string title = default, - ObjectEntity schema = default) + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// Table metadata + /// + public class TableMetadata + { + /// Table name + [JsonPropertyName("name")] + public string Name { get; set; } + + /// Table title + [JsonPropertyName("title")] + public string Title { get; set; } + + /// Table permission + [JsonPropertyName("x-ms-permission")] + public string XMsPermission { get; set; } + + /// x-ms-capabilities + [JsonPropertyName("x-ms-capabilities")] + public TableCapabilitiesMetadata XMsCapabilities { get; set; } + + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + + /// referencedEntities + [JsonPropertyName("referencedEntities")] + public ObjectEntity ReferencedEntities { get; set; } + + /// Url link + [JsonPropertyName("webUrl")] + public string WebUrl { get; set; } + } + + /// + /// Metadata for a table (capabilities) + /// + public class TableCapabilitiesMetadata + { + /// sortRestrictions + [JsonPropertyName("sortRestrictions")] + public TableSortRestrictionsMetadata SortRestrictions { get; set; } + + /// filterRestrictions + [JsonPropertyName("filterRestrictions")] + public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } + + /// selectRestrictions + [JsonPropertyName("selectRestrictions")] + public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } + + /// Server paging restrictions + [JsonPropertyName("isOnlyServerPagable")] + public bool? IsOnlyServerPagable { get; set; } + + /// List of supported filter capabilities + [JsonPropertyName("filterFunctionSupport")] + public List FilterFunctionSupport { get; set; } + + /// List of supported server-driven paging capabilities + [JsonPropertyName("serverPagingOptions")] + public List ServerPagingOptions { get; set; } + } + + /// + /// Metadata for a table (sort restrictions) + /// + public class TableSortRestrictionsMetadata + { + /// Indicates whether this table has sortable columns + [JsonPropertyName("sortable")] + public bool? Sortable { get; set; } + + /// List of unsortable properties + [JsonPropertyName("unsortableProperties")] + public List UnsortableProperties { get; set; } + + /// List of properties which support ascending order only + [JsonPropertyName("ascendingOnlyProperties")] + public List AscendingOnlyProperties { get; set; } + } + + /// + /// Metadata for a table (filter restrictions) + /// + public class TableFilterRestrictionsMetadata + { + /// Indicates whether this table has filterable columns + [JsonPropertyName("filterable")] + public bool? Filterable { get; set; } + + /// List of non filterable properties + [JsonPropertyName("nonFilterableProperties")] + public List NonFilterableProperties { get; set; } + + /// List of required properties + [JsonPropertyName("requiredProperties")] + public List RequiredProperties { get; set; } + } + + /// + /// Metadata for a table (select restrictions) + /// + public class TableSelectRestrictionsMetadata + { + /// Indicates whether this table has selectable columns + [JsonPropertyName("selectable")] + public bool? Selectable { get; set; } + } + + /// + /// Described the subscription information for Business events + /// + public class BusinessEventSubscription + { + /// Callback URL to the flow engine. Expected as part of the request and provided by Flow. + [JsonPropertyName("NotificationUrl")] + public string NotificationUrl { get; set; } + } + + #endregion Types + + #region Model Factory + + /// + /// Model factory for creating instances of DynamicsAX models. + /// Use these factory methods to construct model instances in tests and scenarios + /// where output-only properties (with init-only setters) need to be populated. + /// + public static class DynamicsAXModelFactory + { + /// + /// Creates a new instance of . + /// + public static BusinessEventSubscriptionResponse BusinessEventSubscriptionResponse( + string id = default, + string resource = default, + string notificationType = default, + string notificationUrl = default) { - return new ProcedureMetadata + return new BusinessEventSubscriptionResponse { - Name = name, - Title = title, - Schema = schema, + Id = id, + Resource = resource, + NotificationType = notificationType, + NotificationUrl = notificationUrl, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableMetadata TableMetadata( - string name = default, - string title = default, - string xMsPermission = default, - TableCapabilitiesMetadata xMsCapabilities = default, - ObjectEntity schema = default, - ObjectEntity referencedEntities = default, - string webUrl = default) + public static AxOnlineProcedureResult AxOnlineProcedureResult( + string value = default, + JsonElement? outputParameters = default) { - return new TableMetadata + return new AxOnlineProcedureResult { - Name = name, - Title = title, - XMsPermission = xMsPermission, - XMsCapabilities = xMsCapabilities, - Schema = schema, - ReferencedEntities = referencedEntities, - WebUrl = webUrl, + Value = value, + OutputParameters = outputParameters, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableCapabilitiesMetadata TableCapabilitiesMetadata( - TableSortRestrictionsMetadata sortRestrictions = default, - TableFilterRestrictionsMetadata filterRestrictions = default, - TableSelectRestrictionsMetadata selectRestrictions = default, - bool? isOnlyServerPagable = default, - List filterFunctionSupport = default, - List serverPagingOptions = default) + public static ItemsList ItemsList( + List value = default) { - return new TableCapabilitiesMetadata + return new ItemsList { - SortRestrictions = sortRestrictions, - FilterRestrictions = filterRestrictions, - SelectRestrictions = selectRestrictions, - IsOnlyServerPagable = isOnlyServerPagable, - FilterFunctionSupport = filterFunctionSupport, - ServerPagingOptions = serverPagingOptions, + Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( - bool? sortable = default, - List unsortableProperties = default, - List ascendingOnlyProperties = default) + public static Item Item( + JsonElement? dynamicProperties = default) { - return new TableSortRestrictionsMetadata + return new Item { - Sortable = sortable, - UnsortableProperties = unsortableProperties, - AscendingOnlyProperties = ascendingOnlyProperties, + DynamicProperties = dynamicProperties, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( - bool? filterable = default, - List nonFilterableProperties = default, - List requiredProperties = default) + public static TablesList TablesList( + List
value = default) { - return new TableFilterRestrictionsMetadata + return new TablesList { - Filterable = filterable, - NonFilterableProperties = nonFilterableProperties, - RequiredProperties = requiredProperties, + Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( - bool? selectable = default) + public static Table Table( + string name = default, + string displayName = default, + JsonElement? dynamicProperties = default) { - return new TableSelectRestrictionsMetadata + return new Table { - Selectable = selectable, + Name = name, + DisplayName = displayName, + DynamicProperties = dynamicProperties, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static BusinessEventSubscriptionResponse BusinessEventSubscriptionResponse( - string id = default, - string resource = default, - string notificationType = default, - string notificationUrl = default) + public static DataSetsList DataSetsList( + List value = default) { - return new BusinessEventSubscriptionResponse + return new DataSetsList { - Id = id, - Resource = resource, - NotificationType = notificationType, - NotificationUrl = notificationUrl, + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static DataSet DataSet( + string name = default, + string displayName = default, + List query = default) + { + return new DataSet + { + Name = name, + DisplayName = displayName, + Query = query, + }; + } + + /// + /// Creates a new instance of . + /// + public static PassThroughNativeQuery PassThroughNativeQuery( + string language = default) + { + return new PassThroughNativeQuery + { + Language = language, }; } @@ -687,108 +687,108 @@ public static Procedure Procedure( } /// - /// Creates a new instance of . - /// - public static AxOnlineProcedureResult AxOnlineProcedureResult( - string value = default, - JsonElement? outputParameters = default) - { - return new AxOnlineProcedureResult - { - Value = value, - OutputParameters = outputParameters, - }; - } - - /// - /// Creates a new instance of . - /// - public static DataSetsList DataSetsList( - List value = default) - { - return new DataSetsList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static DataSet DataSet( + public static ProcedureMetadata ProcedureMetadata( string name = default, - string displayName = default, - List query = default) + string title = default, + ObjectEntity schema = default) { - return new DataSet + return new ProcedureMetadata { Name = name, - DisplayName = displayName, - Query = query, + Title = title, + Schema = schema, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static PassThroughNativeQuery PassThroughNativeQuery( - string language = default) + public static TableMetadata TableMetadata( + string name = default, + string title = default, + string xMsPermission = default, + TableCapabilitiesMetadata xMsCapabilities = default, + ObjectEntity schema = default, + ObjectEntity referencedEntities = default, + string webUrl = default) { - return new PassThroughNativeQuery + return new TableMetadata { - Language = language, + Name = name, + Title = title, + XMsPermission = xMsPermission, + XMsCapabilities = xMsCapabilities, + Schema = schema, + ReferencedEntities = referencedEntities, + WebUrl = webUrl, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static ItemsList ItemsList( - List value = default) + public static TableCapabilitiesMetadata TableCapabilitiesMetadata( + TableSortRestrictionsMetadata sortRestrictions = default, + TableFilterRestrictionsMetadata filterRestrictions = default, + TableSelectRestrictionsMetadata selectRestrictions = default, + bool? isOnlyServerPagable = default, + List filterFunctionSupport = default, + List serverPagingOptions = default) { - return new ItemsList + return new TableCapabilitiesMetadata { - Value = value, + SortRestrictions = sortRestrictions, + FilterRestrictions = filterRestrictions, + SelectRestrictions = selectRestrictions, + IsOnlyServerPagable = isOnlyServerPagable, + FilterFunctionSupport = filterFunctionSupport, + ServerPagingOptions = serverPagingOptions, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static Item Item( - JsonElement? dynamicProperties = default) + public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( + bool? sortable = default, + List unsortableProperties = default, + List ascendingOnlyProperties = default) { - return new Item + return new TableSortRestrictionsMetadata { - DynamicProperties = dynamicProperties, + Sortable = sortable, + UnsortableProperties = unsortableProperties, + AscendingOnlyProperties = ascendingOnlyProperties, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TablesList TablesList( - List
value = default) + public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( + bool? filterable = default, + List nonFilterableProperties = default, + List requiredProperties = default) { - return new TablesList + return new TableFilterRestrictionsMetadata { - Value = value, + Filterable = filterable, + NonFilterableProperties = nonFilterableProperties, + RequiredProperties = requiredProperties, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static Table Table( - string name = default, - string displayName = default, - JsonElement? dynamicProperties = default) + public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( + bool? selectable = default) { - return new Table + return new TableSelectRestrictionsMetadata { - Name = name, - DisplayName = displayName, - DynamicProperties = dynamicProperties, + Selectable = selectable, }; } @@ -843,6 +843,13 @@ public static class DynamicsAXTriggerParameters /// public static class OnSubscribeOnABusinessEvent { + /// + /// Select an Environment. + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + /// /// Business event category. /// Required. @@ -850,6 +857,13 @@ public static class OnSubscribeOnABusinessEvent /// public const string Businesseventcategory = "businesseventcategory"; + /// + /// Name of the business event. + /// Required. + /// Dynamic values from: GetBusinessEvents. + /// + public const string Businessevent = "businessevent"; + /// /// Name of the legal entity. /// Dynamic values from: GetLegalEntities. @@ -920,223 +934,13 @@ protected DynamicsAXClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => base.Equals(obj); - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => base.GetHashCode(); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - - /// - /// Get actions metadata - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// Action - /// Cancellation token. - /// The Get actions metadata response. - public virtual async Task GetProcedureAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetProcedures")] string action, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetProcedureAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - if (action is null) - throw new ArgumentNullException(nameof(action)); - var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/procedures/{Uri.EscapeDataString(Uri.EscapeDataString(action.ToString()))}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get metadata of a exportable table - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// dataset name - /// table name - /// Cancellation token. - /// The Get metadata of a exportable table response. - public virtual async Task GetExportableTableAsync([DynamicValues("GetDataSets")] string datasetName, [DynamicValues("GetExportableTables")] string tableName, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetExportableTableAsync"); - try - { - if (datasetName is null) - throw new ArgumentNullException(nameof(datasetName)); - if (tableName is null) - throw new ArgumentNullException(nameof(tableName)); - var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(datasetName.ToString()))}/exportabletables/{Uri.EscapeDataString(Uri.EscapeDataString(tableName.ToString()))}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get entity metadata - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// Entity name - /// Cancellation token. - /// The Get entity metadata response. - public virtual async Task GetTableAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetTables")] string entityName, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetTableAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - if (entityName is null) - throw new ArgumentNullException(nameof(entityName)); - var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(entityName.ToString()))}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Gets legal entities - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// Category - /// Business event - /// Cancellation token. - /// The Gets legal entities response. - public virtual async Task GetLegalEntitiesAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetBusinessEventCategories")] string category, [DynamicValues("GetBusinessEvents")] string businessEvent, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetLegalEntitiesAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - var queryParams = new List(); - if (category is null) - throw new ArgumentNullException(nameof(category)); - queryParams.Add($"businesseventcategory={Uri.EscapeDataString(category.ToString())}"); - if (businessEvent is null) - throw new ArgumentNullException(nameof(businessEvent)); - queryParams.Add($"businessevent={Uri.EscapeDataString(businessEvent.ToString())}"); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/legalentities" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Gets business events categories - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// Cancellation token. - /// The Gets business events categories response. - public virtual async Task GetBusinessEventCategoriesAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetBusinessEventCategoriesAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/businesseventcategories"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Gets business events - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// BusinessEventCategory - /// Cancellation token. - /// The Gets business events response. - public virtual async Task GetBusinessEventsAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetBusinessEventCategories")] string businessEventCategory, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetBusinessEventsAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - if (businessEventCategory is null) - throw new ArgumentNullException(nameof(businessEventCategory)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/businesseventcategories/{Uri.EscapeDataString(Uri.EscapeDataString(businessEventCategory.ToString()))}/businessevents"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get actions - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Instance - /// Cancellation token. - /// The Get actions response. - public virtual async Task GetProceduresAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetProceduresAsync"); - try - { - if (instance is null) - throw new ArgumentNullException(nameof(instance)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/procedures"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); /// /// Execute action @@ -1169,30 +973,6 @@ public virtual async Task ExecuteProcedureAsync([Dynami } } - /// - /// Get instances - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get instances response. - public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) - { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetDataSetsAsync"); - try - { - var path = $"/datasets"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Lists items present in table /// @@ -1376,20 +1156,20 @@ public virtual async Task PatchItemAsync([DynamicValues("GetD } /// - /// Lists exportable tables + /// Get list of entities /// - /// Discovery method used to populate dynamic parameter values at design time. - /// dataset name + /// Retrieves a list of entities + /// Instance /// Cancellation token. - /// The Lists exportable tables response. - public virtual async Task GetExportableTablesAsync([DynamicValues("GetDataSets")] string datasetName, CancellationToken cancellationToken = default) + /// The Get list of entities response. + public virtual async Task GetTablesAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetExportableTablesAsync"); + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetTablesAsync"); try { - if (datasetName is null) - throw new ArgumentNullException(nameof(datasetName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(datasetName.ToString()))}/exportabletables"; + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/tables"; return await this .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -1403,22 +1183,199 @@ public virtual async Task GetExportableTablesAsync([DynamicValues("G } /// - /// Get list of entities + /// Get instances /// - /// Retrieves a list of entities + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get instances response. + public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetDataSetsAsync"); + try + { + var path = $"/datasets"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Gets business events categories + /// + /// Discovery method used to populate dynamic parameter values at design time. /// Instance /// Cancellation token. - /// The Get list of entities response. - public virtual async Task GetTablesAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) + /// The Gets business events categories response. + public virtual async Task GetBusinessEventCategoriesAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) { - using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetTablesAsync"); + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetBusinessEventCategoriesAsync"); try { if (instance is null) throw new ArgumentNullException(nameof(instance)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/tables"; + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/businesseventcategories"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Gets business events + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Instance + /// BusinessEventCategory + /// Cancellation token. + /// The Gets business events response. + public virtual async Task GetBusinessEventsAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetBusinessEventCategories")] string businessEventCategory, CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetBusinessEventsAsync"); + try + { + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + if (businessEventCategory is null) + throw new ArgumentNullException(nameof(businessEventCategory)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/businesseventcategories/{Uri.EscapeDataString(Uri.EscapeDataString(businessEventCategory.ToString()))}/businessevents"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Gets legal entities + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Instance + /// Category + /// Business event + /// Cancellation token. + /// The Gets legal entities response. + public virtual async Task GetLegalEntitiesAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetBusinessEventCategories")] string category, [DynamicValues("GetBusinessEvents")] string businessEvent, CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetLegalEntitiesAsync"); + try + { + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + var queryParams = new List(); + if (category is null) + throw new ArgumentNullException(nameof(category)); + queryParams.Add($"businesseventcategory={Uri.EscapeDataString(category.ToString())}"); + if (businessEvent is null) + throw new ArgumentNullException(nameof(businessEvent)); + queryParams.Add($"businessevent={Uri.EscapeDataString(businessEvent.ToString())}"); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/legalentities" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get actions + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Instance + /// Cancellation token. + /// The Get actions response. + public virtual async Task GetProceduresAsync([DynamicValues("GetDataSets")] string instance, CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetProceduresAsync"); + try + { + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/procedures"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get actions metadata + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Instance + /// Action + /// Cancellation token. + /// The Get actions metadata response. + public virtual async Task GetProcedureAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetProcedures")] string action, CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetProcedureAsync"); + try + { + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + if (action is null) + throw new ArgumentNullException(nameof(action)); + var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/procedures/{Uri.EscapeDataString(Uri.EscapeDataString(action.ToString()))}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get entity metadata + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Instance + /// Entity name + /// Cancellation token. + /// The Get entity metadata response. + public virtual async Task GetTableAsync([DynamicValues("GetDataSets")] string instance, [DynamicValues("GetTables")] string entityName, CancellationToken cancellationToken = default) + { + using var activity = DynamicsAXClient.ConnectorActivitySource.StartActivity("DynamicsAXClient.GetTableAsync"); + try + { + if (instance is null) + throw new ArgumentNullException(nameof(instance)); + if (entityName is null) + throw new ArgumentNullException(nameof(entityName)); + var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(instance.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(entityName.ToString()))}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/ElfsquadDataExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ElfsquadDataExtensions.cs index 542d8f8..c64687a 100644 --- a/src/Azure.Connectors.Sdk/Generated/ElfsquadDataExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ElfsquadDataExtensions.cs @@ -200,6 +200,32 @@ public static class ElfsquadDataTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the ElfsquadData connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class ElfsquadDataTriggerParameters + { + /// + /// Input parameters for the OnCreateTrigger trigger operation (operationId: create_trigger). + /// + public static class OnCreateTrigger + { + /// + /// Trigger name + /// Required. + /// Dynamic values from: get_triggers. + /// + public const string TriggerName = "trigger_name"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// @@ -266,127 +292,6 @@ protected ElfsquadDataClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get schemas - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - public virtual async Task GetSchemasAsync(CancellationToken cancellationToken = default) - { - using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetSchemasAsync"); - try - { - var path = $"/data/1"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get triggers - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - public virtual async Task GetTriggersAsync(CancellationToken cancellationToken = default) - { - using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetTriggersAsync"); - try - { - var path = $"/data/1/$triggers"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get function - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - public virtual async Task GetFunctionsAsync(CancellationToken cancellationToken = default) - { - using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetFunctionsAsync"); - try - { - var path = $"/data/1/$functions"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get function definition - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// function_path - /// Cancellation token. - public virtual async Task GetFunctionDefinitionAsync(string functionPath, CancellationToken cancellationToken = default) - { - using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetFunctionDefinitionAsync"); - try - { - if (functionPath is null) - throw new ArgumentNullException(nameof(functionPath)); - var path = $"/data/1/$functions/$schema/{Uri.EscapeDataString(functionPath.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get schema - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// entity_name - /// Cancellation token. - public virtual async Task GetSchemaAsync(string entityName, CancellationToken cancellationToken = default) - { - using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetSchemaAsync"); - try - { - if (entityName is null) - throw new ArgumentNullException(nameof(entityName)); - var path = $"/data/1/{Uri.EscapeDataString(entityName.ToString())}/$schema"; - await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get entities /// @@ -572,6 +477,127 @@ public virtual async Task InvokeFunctionAsync([DynamicVa } } + /// + /// Get triggers + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + public virtual async Task GetTriggersAsync(CancellationToken cancellationToken = default) + { + using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetTriggersAsync"); + try + { + var path = $"/data/1/$triggers"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get schemas + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + public virtual async Task GetSchemasAsync(CancellationToken cancellationToken = default) + { + using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetSchemasAsync"); + try + { + var path = $"/data/1"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get schema + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// entity_name + /// Cancellation token. + public virtual async Task GetSchemaAsync(string entityName, CancellationToken cancellationToken = default) + { + using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetSchemaAsync"); + try + { + if (entityName is null) + throw new ArgumentNullException(nameof(entityName)); + var path = $"/data/1/{Uri.EscapeDataString(entityName.ToString())}/$schema"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get function + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + public virtual async Task GetFunctionsAsync(CancellationToken cancellationToken = default) + { + using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetFunctionsAsync"); + try + { + var path = $"/data/1/$functions"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get function definition + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// function_path + /// Cancellation token. + public virtual async Task GetFunctionDefinitionAsync(string functionPath, CancellationToken cancellationToken = default) + { + using var activity = ElfsquadDataClient.ConnectorActivitySource.StartActivity("ElfsquadDataClient.GetFunctionDefinitionAsync"); + try + { + if (functionPath is null) + throw new ArgumentNullException(nameof(functionPath)); + var path = $"/data/1/$functions/$schema/{Uri.EscapeDataString(functionPath.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/EtsyExtensions.cs b/src/Azure.Connectors.Sdk/Generated/EtsyExtensions.cs index 46c9a08..e4f76fc 100644 --- a/src/Azure.Connectors.Sdk/Generated/EtsyExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/EtsyExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.Etsy.Models #region Types /// - /// Response for Ping + /// A confirmation that the current application has access to the Open API /// public class Pong { @@ -39,7 +39,7 @@ public class Pong } /// - /// Response for Get a shop payment account ledger's entries + /// A set of payment account ledger entry resources /// public class PaymentAccountLedgerEntries { @@ -53,7 +53,7 @@ public class PaymentAccountLedgerEntries } /// - /// Item in The payment account ledger entry resources found. + /// Represents an entry in a shop's ledger. /// public class PaymentAccountLedgerEntry { @@ -91,7 +91,7 @@ public class PaymentAccountLedgerEntry } /// - /// Response for Get a payment from a payment account ledger entry ID + /// Represents several payments made with Etsy Payments. All monetary amounts are in USD pennies unless otherwise specified. /// public class Payments { @@ -105,7 +105,7 @@ public class Payments } /// - /// Item in A list of payments. + /// Represents a payment made with Etsy Payments. All monetary amounts are in USD pennies unless otherwise specified. /// public class Payment { @@ -210,7 +210,7 @@ public class Payment } /// - /// amount_gross + /// A representation of an amount of money. /// public class Money { @@ -228,7 +228,7 @@ public class Money } /// - /// Item in List of refund objects on an Etsy Payments transaction. All monetary amounts are in USD pennies unless otherwise specified. + /// Represents a refund, which applies to a prior Etsy payment. All monetary amounts are in USD pennies unless otherwise specified. /// public class PaymentAdjustment { @@ -280,7 +280,7 @@ public class PaymentAdjustment } /// - /// Response for Get a receipt + /// The record of a purchase from a shop. Shop receipts display monetary values using the shop's currency. /// public class ShopReceipt { @@ -420,7 +420,7 @@ public class ShopReceipt } /// - /// Item in A list of shipment statements for this receipt. + /// The record of one shipment event for a ShopReceipt. A receipt may have many ShopReceiptShipment records. /// public class ShopReceiptShipment { @@ -443,7 +443,7 @@ public class ShopReceiptShipment } /// - /// Response for Get receipts + /// The receipts for a specific Shop. /// public class ShopReceipts { @@ -475,7 +475,7 @@ public class ReceiptCreateShipmentInput } /// - /// Response for Retrieve a listing's transactions + /// A set of shop receipt transaction resources /// public class ShopReceiptTransactions { @@ -489,7 +489,7 @@ public class ShopReceiptTransactions } /// - /// Item in The shop receipt transaction resources found. + /// A transaction object associated with a shop receipt. Etsy generates one transaction per listing purchased as recorded on the order receipt. /// public class ShopReceiptTransaction { @@ -570,7 +570,7 @@ public class ShopReceiptTransaction } /// - /// Response for Get reviews + /// A set of transaction review records left by Users. /// public class TransactionReviews { @@ -584,7 +584,7 @@ public class TransactionReviews } /// - /// Item in The TransactionReview resources found. + /// A transaction review record left by a User. /// public class TransactionReview { @@ -628,7 +628,7 @@ public class TransactionReview } /// - /// Response for Get shipping carriers + /// Represents several ShippingCarriers. /// public class ShippingCarriers { @@ -642,7 +642,7 @@ public class ShippingCarriers } /// - /// Item in results + /// A supported shipping carrier, which is used to calculate an Estimated Delivery Date. /// public class ShippingCarrier { @@ -664,7 +664,7 @@ public class ShippingCarrier } /// - /// Item in Set of domestic mail classes of this shipping carrier. + /// A shipping carrier's mail class, which is used to calculate an Estimated Delivery Date. /// public class ShippingCarrierMailClass { @@ -678,7 +678,7 @@ public class ShippingCarrierMailClass } /// - /// Response for Get shipping profiles + /// Represents a profile used to set a listing's shipping information. Please note that it's not possible to create calculated shipping templates via the API. However, you can associate calculated shipping profiles created from Shop Manager with listings using the API. /// public class ShopShippingProfile { @@ -732,7 +732,7 @@ public class ShopShippingProfile } /// - /// Item in A list of shipping profile destinations available for this shipping profile. + /// Represents a shipping destination assigned to a shipping profile. /// public class ShopShippingProfileDestination { @@ -782,7 +782,7 @@ public class ShopShippingProfileDestination } /// - /// Item in A list of shipping profile upgrades available for this shipping profile. + /// A representation of a shipping profile upgrade option. /// public class ShopShippingProfileUpgrade { @@ -928,7 +928,7 @@ public class ShippingUpdateProfileInput } /// - /// Response for Get profile destinations by shipping profile + /// Represents a list of shipping destination objects. /// public class ShopShippingProfileDestinations { @@ -1018,7 +1018,7 @@ public class ShippingUpdateProfileDestinationInput } /// - /// Response for Get shipping profile upgrades + /// A list of shipping upgrade options. /// public class ShopShippingProfileUpgrades { @@ -1130,7 +1130,7 @@ public class ShopUpdateInput } /// - /// Response for Update a shop + /// A shop created by an Etsy user. /// public class Shop { @@ -1312,7 +1312,7 @@ public class Shop } /// - /// Response for Search shops + /// A set of Shop records. /// public class Shops { @@ -1326,7 +1326,7 @@ public class Shops } /// - /// Response for Get shop sections + /// All the sections in a sprecific Shop. /// public class ShopSections { @@ -1340,7 +1340,7 @@ public class ShopSections } /// - /// Item in The list of requested resources. + /// A section within a shop, into which a user can sort listings. /// public class ShopSection { @@ -1376,7 +1376,7 @@ public class ShopCreateSectionInput } /// - /// Response for Get user + /// Represents a single user of the site /// public class User { @@ -1443,7 +1443,7 @@ public class User } /// - /// Response for Get user's address + /// Represents a user's address. /// public class UserAddress { @@ -1493,7 +1493,7 @@ public class UserAddress } /// - /// Response for Get user addresses + /// Represents several UserAddress records. /// public class UserAddresses { @@ -1507,7 +1507,7 @@ public class UserAddresses } /// - /// Response for Get seller taxonomy nodes + /// A list of taxonomy nodes from the seller taxonomy tree. /// public class SellerTaxonomyNodes { @@ -1521,7 +1521,7 @@ public class SellerTaxonomyNodes } /// - /// Item in The list of requested resources. + /// A taxonomy node in the seller taxonomy tree. /// public class SellerTaxonomyNode { @@ -1551,7 +1551,7 @@ public class SellerTaxonomyNode } /// - /// Response for Get product properties by taxonomy ID + /// A list of product property definitions. /// public class TaxonomyNodeProperties { @@ -1565,7 +1565,7 @@ public class TaxonomyNodeProperties } /// - /// Item in The list of requested resources. + /// A product property definition. /// public class TaxonomyNodeProperty { @@ -1611,7 +1611,7 @@ public class TaxonomyNodeProperty } /// - /// Item in A list of available scales. + /// A scale defnining the assignable increments for the property values available to specific product properties. /// public class TaxonomyPropertyScale { @@ -1629,7 +1629,7 @@ public class TaxonomyPropertyScale } /// - /// Item in A list of supported property value strings for this property. + /// A property value for a specific product property, which may also employ a specific scale. /// public class TaxonomyPropertyValue { @@ -1651,7 +1651,7 @@ public class TaxonomyPropertyValue } /// - /// Response for Get listings by shop + /// A set of shop listing resources. /// public class ShopListings { @@ -1665,7 +1665,7 @@ public class ShopListings } /// - /// Item in The shop listing resources found. + /// A listing from a shop, which contains a product quantity, title, description, price, etc. /// public class ShopListing { @@ -1978,7 +1978,7 @@ public class ListingCreateInput } /// - /// Response for Get listings by ID + /// A set of shop listing resources with associations. /// public class ShopListingsWithAssociations { @@ -2010,7 +2010,7 @@ public class ListingUpdatePropertyInput } /// - /// Response for Update a listing property + /// A representation of structured data values. /// public class ListingPropertyValue { @@ -2040,7 +2040,7 @@ public class ListingPropertyValue } /// - /// Response for Get a listing's properties + /// Represents several listing property values. /// public class ListingPropertyValues { @@ -2184,7 +2184,7 @@ public class ListingUpdateInput } /// - /// Response for Get a file from a listing + /// A file associated with a digital listing. /// public class ShopListingFile { @@ -2223,7 +2223,7 @@ public class ShopListingFile } /// - /// Response for Get all listing files + /// Represents several ShopListingFiles. /// public class ShopListingFiles { @@ -2259,7 +2259,7 @@ public class ListingUploadInput } /// - /// Response for Get a listing image + /// Reference urls and metadata for an image associated with a specific listing. The `url_fullxfull` parameter contains the URL for full-sized binary image file. /// public class ListingImage { @@ -2337,7 +2337,7 @@ public class ListingImage } /// - /// Response for Get a listing's images + /// Represents a list of listing image resources, each of which contains the reference URLs and metadata for an image. /// public class ListingImages { @@ -2377,7 +2377,7 @@ public class ListingUploadImageInput } /// - /// Response for Get a listing's inventory + /// A representation of a single listing's inventory record with associations /// public class ListingInventoryWithAssociations { @@ -2403,7 +2403,7 @@ public class ListingInventoryWithAssociations } /// - /// Item in A JSON array of products available in a listing, even if only one product. All field names in the JSON blobs are lowercase. + /// A representation of a product for a listing. /// public class ListingInventoryProduct { @@ -2429,7 +2429,7 @@ public class ListingInventoryProduct } /// - /// Item in A list of product offering entries for this product. + /// A representation of an offering for a listing. /// public class ListingInventoryProductOffering { @@ -2477,7 +2477,7 @@ public class ListingUpdateInventoryInput } /// - /// Response for Update a listing's inventory + /// A representation of a single listing's inventory record. /// public class ListingInventory { @@ -2499,7 +2499,7 @@ public class ListingInventory } /// - /// Response for Get a listing's translation + /// Represents the translation data for a Listing. /// public class ListingTranslation { @@ -2561,7 +2561,7 @@ public class ListingUpdateTranslationInput } /// - /// Response for Get listing's variation images + /// Represents several listing variation images. /// public class ListingVariationImages { @@ -2575,7 +2575,7 @@ public class ListingVariationImages } /// - /// Item in The variation images results. + /// A representation of the associations of variations and images on a listing. /// public class ListingVariationImage { diff --git a/src/Azure.Connectors.Sdk/Generated/EventbriteExtensions.cs b/src/Azure.Connectors.Sdk/Generated/EventbriteExtensions.cs index 0a0d539..c0c9a8f 100644 --- a/src/Azure.Connectors.Sdk/Generated/EventbriteExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/EventbriteExtensions.cs @@ -29,26 +29,6 @@ namespace Azure.Connectors.Sdk.Eventbrite.Models #region Types - /// - /// Response for Get categories - /// - public class GetCategoriesResponse - { - /// categories - [JsonPropertyName("categories")] - public List Categories { get; set; } - } - - /// - /// Response for Get organization events - /// - public class GetMyEventsResponse - { - /// events - [JsonPropertyName("events")] - public List Events { get; set; } - } - /// /// Response for Create event (V2) /// @@ -109,6 +89,16 @@ public class CreateEventResponse public string CategoryId { get; set; } } + /// + /// Response for Get organizers (V2) + /// + public class GetOrganizersResponse + { + /// organizers + [JsonPropertyName("organizers")] + public List Organizer { get; set; } + } + /// /// Response for Get venues (V2) /// @@ -120,13 +110,23 @@ public class GetMyVenuesResponse } /// - /// Response for Get organizers (V2) + /// Response for Get categories /// - public class GetOrganizersResponse + public class GetCategoriesResponse { - /// organizers - [JsonPropertyName("organizers")] - public List Organizer { get; set; } + /// categories + [JsonPropertyName("categories")] + public List Categories { get; set; } + } + + /// + /// Response for Get organization events + /// + public class GetMyEventsResponse + { + /// events + [JsonPropertyName("events")] + public List Events { get; set; } } #endregion Types @@ -140,30 +140,6 @@ public class GetOrganizersResponse /// public static class EventbriteModelFactory { - /// - /// Creates a new instance of . - /// - public static GetCategoriesResponse GetCategoriesResponse( - List categories = default) - { - return new GetCategoriesResponse - { - Categories = categories, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetMyEventsResponse GetMyEventsResponse( - List events = default) - { - return new GetMyEventsResponse - { - Events = events, - }; - } - /// /// Creates a new instance of . /// @@ -200,6 +176,18 @@ public static CreateEventResponse CreateEventResponse( }; } + /// + /// Creates a new instance of . + /// + public static GetOrganizersResponse GetOrganizersResponse( + List organizer = default) + { + return new GetOrganizersResponse + { + Organizer = organizer, + }; + } + /// /// Creates a new instance of . /// @@ -213,14 +201,26 @@ public static GetMyVenuesResponse GetMyVenuesResponse( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetOrganizersResponse GetOrganizersResponse( - List organizer = default) + public static GetCategoriesResponse GetCategoriesResponse( + List categories = default) { - return new GetOrganizersResponse + return new GetCategoriesResponse { - Organizer = organizer, + Categories = categories, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetMyEventsResponse GetMyEventsResponse( + List events = default) + { + return new GetMyEventsResponse + { + Events = events, }; } } @@ -311,6 +311,13 @@ public static class EventbriteTriggerParameters /// public static class OnNewEvent { + /// + /// Select the organization. + /// Required. + /// Dynamic values from: GetOrganizations. + /// + public const string OrganizationId = "organization_id"; + /// /// The organizer of the event. /// Required. @@ -339,6 +346,13 @@ public static class OnOrderChanged /// public const string OrganizationId = "organization_id"; + /// + /// Event to trigger on changed order. + /// Required. + /// Dynamic values from: GetOrganizationEvents. + /// + public const string Id = "id"; + } } @@ -411,90 +425,6 @@ protected EventbriteClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get categories - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get categories response. - public virtual async Task GetCategoriesAsync(CancellationToken cancellationToken = default) - { - using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetCategoriesAsync"); - try - { - var path = $"/v3/categories/"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// GetOrganizations - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The GetOrganizations response. - public virtual async Task> GetOrganizationsAsync(CancellationToken cancellationToken = default) - { - using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizationsAsync"); - try - { - var path = $"/v3/users/me/organizations/"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get organization events - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Organization - /// Order By - /// Status - /// Cancellation token. - /// The Get organization events response. - public virtual async Task GetOrganizationEventsAsync([DynamicValues("GetOrganizations")] string organization, string orderBy, string status, CancellationToken cancellationToken = default) - { - using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizationEventsAsync"); - try - { - if (organization is null) - throw new ArgumentNullException(nameof(organization)); - var queryParams = new List(); - if (orderBy is null) - throw new ArgumentNullException(nameof(orderBy)); - queryParams.Add($"order_by={Uri.EscapeDataString(orderBy.ToString())}"); - if (status is null) - throw new ArgumentNullException(nameof(status)); - queryParams.Add($"status={Uri.EscapeDataString(status.ToString())}"); - var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/events/" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Create event (V2) /// @@ -587,60 +517,6 @@ public virtual async Task CreateEventAsync([DynamicValues(" } } - /// - /// Get venues (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Organization - /// Cancellation token. - /// The Get venues (V2) response. - public virtual async Task GetMyVenuesAsync([DynamicValues("GetOrganizations")] string organization, CancellationToken cancellationToken = default) - { - using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetMyVenuesAsync"); - try - { - if (organization is null) - throw new ArgumentNullException(nameof(organization)); - var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/venues/"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get organizers (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Organization - /// Cancellation token. - /// The Get organizers (V2) response. - public virtual async Task GetOrganizersAsync([DynamicValues("GetOrganizations")] string organization, CancellationToken cancellationToken = default) - { - using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizersAsync"); - try - { - if (organization is null) - throw new ArgumentNullException(nameof(organization)); - var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/organizers/"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Update event (V2) /// @@ -733,6 +609,144 @@ public virtual async Task UpdateEventAsync([DynamicValues(" } } + /// + /// GetOrganizations + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The GetOrganizations response. + public virtual async Task> GetOrganizationsAsync(CancellationToken cancellationToken = default) + { + using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizationsAsync"); + try + { + var path = $"/v3/users/me/organizations/"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get organizers (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Organization + /// Cancellation token. + /// The Get organizers (V2) response. + public virtual async Task GetOrganizersAsync([DynamicValues("GetOrganizations")] string organization, CancellationToken cancellationToken = default) + { + using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizersAsync"); + try + { + if (organization is null) + throw new ArgumentNullException(nameof(organization)); + var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/organizers/"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get venues (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Organization + /// Cancellation token. + /// The Get venues (V2) response. + public virtual async Task GetMyVenuesAsync([DynamicValues("GetOrganizations")] string organization, CancellationToken cancellationToken = default) + { + using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetMyVenuesAsync"); + try + { + if (organization is null) + throw new ArgumentNullException(nameof(organization)); + var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/venues/"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get categories + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get categories response. + public virtual async Task GetCategoriesAsync(CancellationToken cancellationToken = default) + { + using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetCategoriesAsync"); + try + { + var path = $"/v3/categories/"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get organization events + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Organization + /// Order By + /// Status + /// Cancellation token. + /// The Get organization events response. + public virtual async Task GetOrganizationEventsAsync([DynamicValues("GetOrganizations")] string organization, string orderBy, string status, CancellationToken cancellationToken = default) + { + using var activity = EventbriteClient.ConnectorActivitySource.StartActivity("EventbriteClient.GetOrganizationEventsAsync"); + try + { + if (organization is null) + throw new ArgumentNullException(nameof(organization)); + var queryParams = new List(); + if (orderBy is null) + throw new ArgumentNullException(nameof(orderBy)); + queryParams.Add($"order_by={Uri.EscapeDataString(orderBy.ToString())}"); + if (status is null) + throw new ArgumentNullException(nameof(status)); + queryParams.Add($"status={Uri.EscapeDataString(status.ToString())}"); + var path = $"/v3/organizations/{Uri.EscapeDataString(organization.ToString())}/events/" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/EventhubsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/EventhubsExtensions.cs index e85b4fe..5e9e926 100644 --- a/src/Azure.Connectors.Sdk/Generated/EventhubsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/EventhubsExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Eventhubs.Models #region Types /// - /// Response for When events are available in Event Hub + /// Event data /// [DynamicSchema("GenerateEventSchemaV2")] public class Event @@ -68,7 +68,7 @@ public class ObjectEntity } /// - /// SystemProperties + /// Event Hub's system properties /// public class SystemProperties { @@ -90,7 +90,7 @@ public class SystemProperties } /// - /// SendEvent + /// Send Event data /// public class SendEvent { @@ -351,19 +351,26 @@ protected EventHubsClient() : base() { } public override string ToString() => base.ToString(); /// - /// Get all Event Hubs in a namespace + /// Send event /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Send event. + /// Event Hub name + /// The request body. + /// Partition key /// Cancellation token. - /// The Get all Event Hubs in a namespace response. - public virtual async Task> GetEventHubsAsync(CancellationToken cancellationToken = default) + public virtual async Task SendEventAsync([DynamicValues("GetEventHubs")] string eventHubName, SendEvent input, string partitionKey = default, CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetEventHubsAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.SendEventAsync"); try { - var path = $"/eventhubs"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (eventHubName is null) + throw new ArgumentNullException(nameof(eventHubName)); + var queryParams = new List(); + if (partitionKey != default) + queryParams.Add($"partitionKey={Uri.EscapeDataString(partitionKey.ToString())}"); + var path = $"/{Uri.EscapeDataString(eventHubName.ToString())}/events" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -375,24 +382,27 @@ public virtual async Task> GetEventHubsAsync(CancellationToken canc } /// - /// Get all the consumer groups for an event hub + /// Send one or more events to the Event Hub partition /// - /// Discovery method used to populate dynamic parameter values at design time. - /// The Event Hub name + /// Send one or more events to the Event Hub partition. + /// Event Hub name + /// The request body. + /// Partition key /// Cancellation token. - /// The Get all the consumer groups for an event hub response. - public virtual async Task> GetConsumerGroupsAsync(string theEventHubName, CancellationToken cancellationToken = default) + public virtual async Task SendEventsAsync([DynamicValues("GetEventHubs")] string eventHubName, List input, string partitionKey, CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetConsumerGroupsAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.SendEventsAsync"); try { + if (eventHubName is null) + throw new ArgumentNullException(nameof(eventHubName)); var queryParams = new List(); - if (theEventHubName is null) - throw new ArgumentNullException(nameof(theEventHubName)); - queryParams.Add($"eventHubName={Uri.EscapeDataString(theEventHubName.ToString())}"); - var path = $"/consumergroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (partitionKey is null) + throw new ArgumentNullException(nameof(partitionKey)); + queryParams.Add($"partitionKey={Uri.EscapeDataString(partitionKey.ToString())}"); + var path = $"/{Uri.EscapeDataString(eventHubName.ToString())}/events/batch" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -404,17 +414,17 @@ public virtual async Task> GetConsumerGroupsAsync(string theEventHu } /// - /// Get all content types + /// Get all Event Hubs in a namespace /// /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Get all content types response. - public virtual async Task> GetContentTypesAsync(CancellationToken cancellationToken = default) + /// The Get all Event Hubs in a namespace response. + public virtual async Task> GetEventHubsAsync(CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetContentTypesAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetEventHubsAsync"); try { - var path = $"/contenttypes"; + var path = $"/eventhubs"; return await this .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -428,22 +438,17 @@ public virtual async Task> GetContentTypesAsync(CancellationToken c } /// - /// Get all partition keys in an Event Hub + /// Get all content types /// /// Discovery method used to populate dynamic parameter values at design time. - /// The Event Hub name /// Cancellation token. - /// The Get all partition keys in an Event Hub response. - public virtual async Task> GetPartitionKeysAsync(string theEventHubName, CancellationToken cancellationToken = default) + /// The Get all content types response. + public virtual async Task> GetContentTypesAsync(CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetPartitionKeysAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetContentTypesAsync"); try { - var queryParams = new List(); - if (theEventHubName is null) - throw new ArgumentNullException(nameof(theEventHubName)); - queryParams.Add($"eventHubName={Uri.EscapeDataString(theEventHubName.ToString())}"); - var path = $"/partitions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/contenttypes"; return await this .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -457,26 +462,24 @@ public virtual async Task> GetPartitionKeysAsync(string theEventHub } /// - /// Send event + /// Get all the consumer groups for an event hub /// - /// Send event. - /// Event Hub name - /// The request body. - /// Partition key + /// Discovery method used to populate dynamic parameter values at design time. + /// The Event Hub name /// Cancellation token. - public virtual async Task SendEventAsync([DynamicValues("GetEventHubs")] string eventHubName, SendEvent input, string partitionKey = default, CancellationToken cancellationToken = default) + /// The Get all the consumer groups for an event hub response. + public virtual async Task> GetConsumerGroupsAsync(string theEventHubName, CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.SendEventAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetConsumerGroupsAsync"); try { - if (eventHubName is null) - throw new ArgumentNullException(nameof(eventHubName)); var queryParams = new List(); - if (partitionKey != default) - queryParams.Add($"partitionKey={Uri.EscapeDataString(partitionKey.ToString())}"); - var path = $"/{Uri.EscapeDataString(eventHubName.ToString())}/events" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (theEventHubName is null) + throw new ArgumentNullException(nameof(theEventHubName)); + queryParams.Add($"eventHubName={Uri.EscapeDataString(theEventHubName.ToString())}"); + var path = $"/consumergroups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -488,27 +491,24 @@ await this } /// - /// Send one or more events to the Event Hub partition + /// Get all partition keys in an Event Hub /// - /// Send one or more events to the Event Hub partition. - /// Event Hub name - /// The request body. - /// Partition key + /// Discovery method used to populate dynamic parameter values at design time. + /// The Event Hub name /// Cancellation token. - public virtual async Task SendEventsAsync([DynamicValues("GetEventHubs")] string eventHubName, List input, string partitionKey, CancellationToken cancellationToken = default) + /// The Get all partition keys in an Event Hub response. + public virtual async Task> GetPartitionKeysAsync(string theEventHubName, CancellationToken cancellationToken = default) { - using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.SendEventsAsync"); + using var activity = EventHubsClient.ConnectorActivitySource.StartActivity("EventHubsClient.GetPartitionKeysAsync"); try { - if (eventHubName is null) - throw new ArgumentNullException(nameof(eventHubName)); var queryParams = new List(); - if (partitionKey is null) - throw new ArgumentNullException(nameof(partitionKey)); - queryParams.Add($"partitionKey={Uri.EscapeDataString(partitionKey.ToString())}"); - var path = $"/{Uri.EscapeDataString(eventHubName.ToString())}/events/batch" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (theEventHubName is null) + throw new ArgumentNullException(nameof(theEventHubName)); + queryParams.Add($"eventHubName={Uri.EscapeDataString(theEventHubName.ToString())}"); + var path = $"/partitions" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/ExcelOnlineBusinessExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ExcelOnlineBusinessExtensions.cs index 2b01977..6037953 100644 --- a/src/Azure.Connectors.Sdk/Generated/ExcelOnlineBusinessExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ExcelOnlineBusinessExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.ExcelOnlineBusiness.Models #region Types /// - /// Response for Create table + /// Table metadata /// public class TableMetadata { @@ -63,7 +63,7 @@ public class TableMetadata } /// - /// x-ms-capabilities + /// Metadata for a table (capabilities) /// public class TableCapabilitiesMetadata { @@ -93,7 +93,7 @@ public class TableCapabilitiesMetadata } /// - /// sortRestrictions + /// Metadata for a table (sort restrictions) /// public class TableSortRestrictionsMetadata { @@ -111,7 +111,7 @@ public class TableSortRestrictionsMetadata } /// - /// filterRestrictions + /// Metadata for a table (filter restrictions) /// public class TableFilterRestrictionsMetadata { @@ -129,7 +129,7 @@ public class TableFilterRestrictionsMetadata } /// - /// selectRestrictions + /// Metadata for a table (select restrictions) /// public class TableSelectRestrictionsMetadata { @@ -151,7 +151,7 @@ public class ObjectEntity } /// - /// Response for List rows present in a table + /// List of Items /// public class ItemsList { @@ -165,7 +165,7 @@ public class ItemsList } /// - /// Item in List of Items + /// Table item entity /// [DynamicSchema("GetTable")] public class Item @@ -229,7 +229,7 @@ public class SensitivityLabelMetadata } /// - /// Response for List all comments present in a workbook + /// Details about a comment /// public class CommentsList { @@ -239,7 +239,7 @@ public class CommentsList } /// - /// Item in List of Comments + /// Details about a comment /// public class Comment { @@ -257,7 +257,7 @@ public class Comment } /// - /// Response for Get a row + /// Table item entity /// [DynamicSchema("GetTable")] public class GetItemResponse @@ -278,26 +278,6 @@ public class GetItemResponse public List SensitivityLabelInfo { get; set; } } - /// - /// Response for Get sources - /// - public class GetSourcesResponse - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Response for Get drives - /// - public class GetDrivesResponse - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - /// /// Response for Get worksheets /// @@ -313,7 +293,7 @@ public class GetAllWorksheetsResponse } /// - /// Item in value + /// WorksheetMetadata /// public class WorksheetMetadata { @@ -358,26 +338,6 @@ public class GetTablesResponse public List SensitivityLabelInfo { get; set; } } - /// - /// Response for Get table columns - /// - public class GetColumnsResponse - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Response for Gets one script - /// - public class GetSingleScriptResponse - { - /// parameterInfo - [JsonPropertyName("parameterInfo")] - public JsonElement? ParameterInfo { get; set; } - } - /// /// Run script from SharePoint library /// @@ -393,7 +353,7 @@ public class RunScriptProdInput } /// - /// Response for Run script from SharePoint library + /// Information about a single script's return schema. /// [DynamicSchema("GetSingleScriptV2")] public class RunScriptProdResponse @@ -407,7 +367,47 @@ public class RunScriptProdResponse } /// - /// TableToCreate + /// Response for Get sources + /// + public class GetSourcesResponse + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Response for Get drives + /// + public class GetDrivesResponse + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Response for Get table columns + /// + public class GetColumnsResponse + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Response for Gets one script + /// + public class GetSingleScriptResponse + { + /// parameterInfo + [JsonPropertyName("parameterInfo")] + public JsonElement? ParameterInfo { get; set; } + } + + /// + /// Table to create. /// public class TableToCreate { @@ -425,7 +425,7 @@ public class TableToCreate } /// - /// CommentDetails + /// Details about a comment /// public class CommentDetails { @@ -637,30 +637,6 @@ public static GetItemResponse GetItemResponse( }; } - /// - /// Creates a new instance of . - /// - public static GetSourcesResponse GetSourcesResponse( - List value = default) - { - return new GetSourcesResponse - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetDrivesResponse GetDrivesResponse( - List value = default) - { - return new GetDrivesResponse - { - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -719,6 +695,30 @@ public static GetTablesResponse GetTablesResponse( }; } + /// + /// Creates a new instance of . + /// + public static GetSourcesResponse GetSourcesResponse( + List value = default) + { + return new GetSourcesResponse + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetDrivesResponse GetDrivesResponse( + List value = default) + { + return new GetDrivesResponse + { + Value = value, + }; + } + /// /// Creates a new instance of . /// @@ -1242,63 +1242,6 @@ public virtual async Task PatchItemAsync([DynamicValues("GetDrives")] stri } } - /// - /// Get sources - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Top - /// Cancellation token. - /// The Get sources response. - public virtual async Task GetSourcesAsync(string top = default, CancellationToken cancellationToken = default) - { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetSourcesAsync"); - try - { - var queryParams = new List(); - if (top != default) - queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); - var path = $"/codeless/v1.0/sources" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get drives - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Location - /// Cancellation token. - /// The Get drives response. - public virtual async Task GetDrivesAsync([DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) - { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetDrivesAsync"); - try - { - var queryParams = new List(); - if (location is null) - throw new ArgumentNullException(nameof(location)); - queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); - var path = $"/codeless/v1.0/drives" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get worksheets /// @@ -1418,18 +1361,20 @@ public virtual async Task GetTablesAsync([DynamicValues("GetD } /// - /// Get metadata of a table + /// Add a row into a table /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Add a new row into the Excel table. /// Document Library /// File /// Table + /// The request body. /// Location + /// DateTime Format /// Cancellation token. - /// The Get metadata of a table response. - public virtual async Task GetTableAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, [DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) + /// The Add a row into a table response. + public virtual async Task AddRowAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, Item input, [DynamicValues("GetSources")] string location, string dateTimeFormat = default, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetTableAsync"); + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.AddRowAsync"); try { if (documentLibrary is null) @@ -1442,9 +1387,11 @@ public virtual async Task GetTableAsync([DynamicValues("GetDrives if (location is null) throw new ArgumentNullException(nameof(location)); queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); - var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/metadata" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (dateTimeFormat != default) + queryParams.Add($"dateTimeFormat={Uri.EscapeDataString(dateTimeFormat.ToString())}"); + var path = $"/codeless/v1.2/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rows" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1456,34 +1403,98 @@ public virtual async Task GetTableAsync([DynamicValues("GetDrives } /// - /// Get raw and formatted metadata of a table + /// Run script from SharePoint library + /// + /// Runs an Office Script against an Excel workbook. Use this action when the script is saved outside of the default location. + /// Workbook Library + /// Workbook + /// Script Library + /// Script + /// The request body. + /// Workbook Location + /// Script Location + /// Cancellation token. + /// The Run script from SharePoint library response. + public virtual async Task RunScriptProdAsync([DynamicValues("GetDrives")] string workbookLibrary, string workbook, [DynamicValues("GetDrives")] string scriptLibrary, string script, RunScriptProdInput input, [DynamicValues("GetSources")] string workbookLocation, [DynamicValues("GetSources")] string scriptLocation, CancellationToken cancellationToken = default) + { + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.RunScriptProdAsync"); + try + { + if (workbookLibrary is null) + throw new ArgumentNullException(nameof(workbookLibrary)); + if (workbook is null) + throw new ArgumentNullException(nameof(workbook)); + if (scriptLibrary is null) + throw new ArgumentNullException(nameof(scriptLibrary)); + if (script is null) + throw new ArgumentNullException(nameof(script)); + var queryParams = new List(); + if (workbookLocation is null) + throw new ArgumentNullException(nameof(workbookLocation)); + queryParams.Add($"source={Uri.EscapeDataString(workbookLocation.ToString())}"); + if (scriptLocation is null) + throw new ArgumentNullException(nameof(scriptLocation)); + queryParams.Add($"scriptSource={Uri.EscapeDataString(scriptLocation.ToString())}"); + var path = $"/v2/officescripting/api/unattended/run/{Uri.EscapeDataString(workbookLibrary.ToString())}/{Uri.EscapeDataString(Uri.EscapeDataString(workbook.ToString()))}/{Uri.EscapeDataString(scriptLibrary.ToString())}/{Uri.EscapeDataString(Uri.EscapeDataString(script.ToString()))}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get sources + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Top + /// Cancellation token. + /// The Get sources response. + public virtual async Task GetSourcesAsync(string top = default, CancellationToken cancellationToken = default) + { + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetSourcesAsync"); + try + { + var queryParams = new List(); + if (top != default) + queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); + var path = $"/codeless/v1.0/sources" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get drives /// /// Discovery method used to populate dynamic parameter values at design time. - /// Document Library - /// File - /// Table /// Location /// Cancellation token. - /// The Get raw and formatted metadata of a table response. - public virtual async Task GetRawAndFormattedTableAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, [DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) + /// The Get drives response. + public virtual async Task GetDrivesAsync([DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetRawAndFormattedTableAsync"); + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetDrivesAsync"); try { - if (documentLibrary is null) - throw new ArgumentNullException(nameof(documentLibrary)); - if (@file is null) - throw new ArgumentNullException(nameof(@file)); - if (table is null) - throw new ArgumentNullException(nameof(table)); var queryParams = new List(); - queryParams.Add("formattedPostfix=Formatted"); if (location is null) throw new ArgumentNullException(nameof(location)); queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); - var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rawandformattedtablemetadata" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/codeless/v1.0/drives" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1533,20 +1544,55 @@ public virtual async Task GetColumnsAsync([DynamicValues("Ge } /// - /// Add a row into a table + /// Gets one script /// - /// Add a new row into the Excel table. + /// Discovery method used to populate dynamic parameter values at design time. + /// Chosen script source + /// Chosen script drive + /// Chosen script + /// Cancellation token. + /// The Gets one script response. + public virtual async Task GetSingleScriptV2Async(string chosenScriptSource, string chosenScriptDrive, string chosenScript, CancellationToken cancellationToken = default) + { + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetSingleScriptV2Async"); + try + { + var queryParams = new List(); + if (chosenScriptSource is null) + throw new ArgumentNullException(nameof(chosenScriptSource)); + queryParams.Add($"scriptSource={Uri.EscapeDataString(chosenScriptSource.ToString())}"); + if (chosenScriptDrive is null) + throw new ArgumentNullException(nameof(chosenScriptDrive)); + queryParams.Add($"scriptDrive={Uri.EscapeDataString(chosenScriptDrive.ToString())}"); + if (chosenScript is null) + throw new ArgumentNullException(nameof(chosenScript)); + queryParams.Add($"scriptId={Uri.EscapeDataString(chosenScript.ToString())}"); + var path = $"/v2/officescripting/api/storage/script" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get metadata of a table + /// + /// Discovery method used to populate dynamic parameter values at design time. /// Document Library /// File /// Table - /// The request body. /// Location - /// DateTime Format /// Cancellation token. - /// The Add a row into a table response. - public virtual async Task AddRowAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, Item input, [DynamicValues("GetSources")] string location, string dateTimeFormat = default, CancellationToken cancellationToken = default) + /// The Get metadata of a table response. + public virtual async Task GetTableAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, [DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.AddRowAsync"); + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetTableAsync"); try { if (documentLibrary is null) @@ -1559,11 +1605,9 @@ public virtual async Task AddRowAsync([DynamicValues("GetDrives")] string if (location is null) throw new ArgumentNullException(nameof(location)); queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); - if (dateTimeFormat != default) - queryParams.Add($"dateTimeFormat={Uri.EscapeDataString(dateTimeFormat.ToString())}"); - var path = $"/codeless/v1.2/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rows" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/metadata" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1578,27 +1622,19 @@ public virtual async Task AddRowAsync([DynamicValues("GetDrives")] string /// Gets one script /// /// Discovery method used to populate dynamic parameter values at design time. - /// Chosen script source - /// Chosen script drive /// Chosen script /// Cancellation token. /// The Gets one script response. - public virtual async Task GetSingleScriptAsync(string chosenScriptSource, string chosenScriptDrive, string chosenScript, CancellationToken cancellationToken = default) + public virtual async Task GetSingleScriptAsync(string chosenScript, CancellationToken cancellationToken = default) { using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetSingleScriptAsync"); try { var queryParams = new List(); - if (chosenScriptSource is null) - throw new ArgumentNullException(nameof(chosenScriptSource)); - queryParams.Add($"scriptSource={Uri.EscapeDataString(chosenScriptSource.ToString())}"); - if (chosenScriptDrive is null) - throw new ArgumentNullException(nameof(chosenScriptDrive)); - queryParams.Add($"scriptDrive={Uri.EscapeDataString(chosenScriptDrive.ToString())}"); if (chosenScript is null) throw new ArgumentNullException(nameof(chosenScript)); queryParams.Add($"scriptId={Uri.EscapeDataString(chosenScript.ToString())}"); - var path = $"/v2/officescripting/api/storage/script" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/officescripting/api/storage/script" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -1612,41 +1648,34 @@ public virtual async Task GetSingleScriptAsync(string c } /// - /// Run script from SharePoint library + /// Get raw and formatted metadata of a table /// - /// Runs an Office Script against an Excel workbook. Use this action when the script is saved outside of the default location. - /// Workbook Library - /// Workbook - /// Script Library - /// Script - /// The request body. - /// Workbook Location - /// Script Location + /// Discovery method used to populate dynamic parameter values at design time. + /// Document Library + /// File + /// Table + /// Location /// Cancellation token. - /// The Run script from SharePoint library response. - public virtual async Task RunScriptProdAsync([DynamicValues("GetDrives")] string workbookLibrary, string workbook, [DynamicValues("GetDrives")] string scriptLibrary, string script, RunScriptProdInput input, [DynamicValues("GetSources")] string workbookLocation, [DynamicValues("GetSources")] string scriptLocation, CancellationToken cancellationToken = default) + /// The Get raw and formatted metadata of a table response. + public virtual async Task GetRawAndFormattedTableAsync([DynamicValues("GetDrives")] string documentLibrary, string @file, [DynamicValues("GetTables")] string table, [DynamicValues("GetSources")] string location, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.RunScriptProdAsync"); + using var activity = ExcelOnlineBusinessClient.ConnectorActivitySource.StartActivity("ExcelOnlineBusinessClient.GetRawAndFormattedTableAsync"); try { - if (workbookLibrary is null) - throw new ArgumentNullException(nameof(workbookLibrary)); - if (workbook is null) - throw new ArgumentNullException(nameof(workbook)); - if (scriptLibrary is null) - throw new ArgumentNullException(nameof(scriptLibrary)); - if (script is null) - throw new ArgumentNullException(nameof(script)); + if (documentLibrary is null) + throw new ArgumentNullException(nameof(documentLibrary)); + if (@file is null) + throw new ArgumentNullException(nameof(@file)); + if (table is null) + throw new ArgumentNullException(nameof(table)); var queryParams = new List(); - if (workbookLocation is null) - throw new ArgumentNullException(nameof(workbookLocation)); - queryParams.Add($"source={Uri.EscapeDataString(workbookLocation.ToString())}"); - if (scriptLocation is null) - throw new ArgumentNullException(nameof(scriptLocation)); - queryParams.Add($"scriptSource={Uri.EscapeDataString(scriptLocation.ToString())}"); - var path = $"/v2/officescripting/api/unattended/run/{Uri.EscapeDataString(workbookLibrary.ToString())}/{Uri.EscapeDataString(Uri.EscapeDataString(workbook.ToString()))}/{Uri.EscapeDataString(scriptLibrary.ToString())}/{Uri.EscapeDataString(Uri.EscapeDataString(script.ToString()))}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + queryParams.Add("formattedPostfix=Formatted"); + if (location is null) + throw new ArgumentNullException(nameof(location)); + queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); + var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(Uri.EscapeDataString(@file.ToString()))}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rawandformattedtablemetadata" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/ExcelOnlineExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ExcelOnlineExtensions.cs index c556451..5f649b2 100644 --- a/src/Azure.Connectors.Sdk/Generated/ExcelOnlineExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ExcelOnlineExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.ExcelOnline.Models #region Types /// - /// Response for Create table + /// Table metadata /// public class TableMetadata { @@ -63,7 +63,7 @@ public class TableMetadata } /// - /// x-ms-capabilities + /// Metadata for a table (capabilities) /// public class TableCapabilitiesMetadata { @@ -93,7 +93,7 @@ public class TableCapabilitiesMetadata } /// - /// sortRestrictions + /// Metadata for a table (sort restrictions) /// public class TableSortRestrictionsMetadata { @@ -111,7 +111,7 @@ public class TableSortRestrictionsMetadata } /// - /// filterRestrictions + /// Metadata for a table (filter restrictions) /// public class TableFilterRestrictionsMetadata { @@ -129,7 +129,7 @@ public class TableFilterRestrictionsMetadata } /// - /// selectRestrictions + /// Metadata for a table (select restrictions) /// public class TableSelectRestrictionsMetadata { @@ -151,7 +151,7 @@ public class ObjectEntity } /// - /// Response for List rows present in a table + /// List of Items /// public class ItemsList { @@ -161,7 +161,7 @@ public class ItemsList } /// - /// Item in List of Items + /// Table item entity /// [DynamicSchema("GetTable")] public class Item @@ -189,7 +189,7 @@ public class GetAllWorksheetsResponse } /// - /// Item in value + /// WorksheetMetadata /// public class WorksheetMetadata { @@ -241,7 +241,7 @@ public class GetColumnsResponse } /// - /// TableToCreate + /// Table to create. /// public class TableToCreate { @@ -893,17 +893,19 @@ public virtual async Task GetTablesAsync(string documentLibra } /// - /// Get table columns + /// Add a row into a table /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Add a new row into the Excel table. /// Document Library /// File /// Table + /// The request body. + /// DateTime Format /// Cancellation token. - /// The Get table columns response. - public virtual async Task GetColumnsAsync(string documentLibrary, string @file, [DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + /// The Add a row into a table response. + public virtual async Task AddRowAsync(string documentLibrary, string @file, [DynamicValues("GetTables")] string table, Item input, string dateTimeFormat = default, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineClient.ConnectorActivitySource.StartActivity("ExcelOnlineClient.GetColumnsAsync"); + using var activity = ExcelOnlineClient.ConnectorActivitySource.StartActivity("ExcelOnlineClient.AddRowAsync"); try { if (documentLibrary is null) @@ -914,9 +916,11 @@ public virtual async Task GetColumnsAsync(string documentLib throw new ArgumentNullException(nameof(table)); var queryParams = new List(); queryParams.Add("source=me"); - var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(@file.ToString())}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/columns" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (dateTimeFormat != default) + queryParams.Add($"dateTimeFormat={Uri.EscapeDataString(dateTimeFormat.ToString())}"); + var path = $"/codeless/v1.2/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(@file.ToString())}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rows" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -928,19 +932,17 @@ public virtual async Task GetColumnsAsync(string documentLib } /// - /// Add a row into a table + /// Get table columns /// - /// Add a new row into the Excel table. + /// Discovery method used to populate dynamic parameter values at design time. /// Document Library /// File /// Table - /// The request body. - /// DateTime Format /// Cancellation token. - /// The Add a row into a table response. - public virtual async Task AddRowAsync(string documentLibrary, string @file, [DynamicValues("GetTables")] string table, Item input, string dateTimeFormat = default, CancellationToken cancellationToken = default) + /// The Get table columns response. + public virtual async Task GetColumnsAsync(string documentLibrary, string @file, [DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) { - using var activity = ExcelOnlineClient.ConnectorActivitySource.StartActivity("ExcelOnlineClient.AddRowAsync"); + using var activity = ExcelOnlineClient.ConnectorActivitySource.StartActivity("ExcelOnlineClient.GetColumnsAsync"); try { if (documentLibrary is null) @@ -951,11 +953,9 @@ public virtual async Task AddRowAsync(string documentLibrary, string @file throw new ArgumentNullException(nameof(table)); var queryParams = new List(); queryParams.Add("source=me"); - if (dateTimeFormat != default) - queryParams.Add($"dateTimeFormat={Uri.EscapeDataString(dateTimeFormat.ToString())}"); - var path = $"/codeless/v1.2/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(@file.ToString())}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/rows" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/codeless/v1.0/drives/{Uri.EscapeDataString(documentLibrary.ToString())}/items/{Uri.EscapeDataString(@file.ToString())}/workbook/tables/{Uri.EscapeDataString(table.ToString())}/columns" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/FormstackFormsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/FormstackFormsExtensions.cs index b503c2f..a9226c8 100644 --- a/src/Azure.Connectors.Sdk/Generated/FormstackFormsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/FormstackFormsExtensions.cs @@ -155,6 +155,32 @@ public static class FormstackFormsTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the FormstackForms connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class FormstackFormsTriggerParameters + { + /// + /// Input parameters for the OnFormstackFormSubmitted trigger operation (operationId: FormstackFormSubmitted). + /// + public static class OnFormstackFormSubmitted + { + /// + /// Your Formstack Form + /// Required. + /// Dynamic values from: GetAvailableForms. + /// + public const string FormId = "form_id"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// diff --git a/src/Azure.Connectors.Sdk/Generated/FtpExtensions.cs b/src/Azure.Connectors.Sdk/Generated/FtpExtensions.cs index 4927dca..853e7b5 100644 --- a/src/Azure.Connectors.Sdk/Generated/FtpExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/FtpExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Ftp.Models #region Types /// - /// Response for Create file + /// Blob metadata /// public class BlobMetadata { @@ -527,6 +527,57 @@ public virtual async Task GetFileContentAsync(string @file, bool? inferC } } + /// + /// List files in folder + /// + /// This operation gets the list of files and subfolders in a folder. + /// Folder + /// Cancellation token. + /// The List files in folder response. + public virtual async Task> ListFolderAsync(string folder, CancellationToken cancellationToken = default) + { + using var activity = FtpClient.ConnectorActivitySource.StartActivity("FtpClient.ListFolderAsync"); + try + { + if (folder is null) + throw new ArgumentNullException(nameof(folder)); + var path = $"/datasets/default/folders/{Uri.EscapeDataString(Uri.EscapeDataString(folder.ToString()))}"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// List files in root folder + /// + /// This operation gets the list of files and subfolders in the root folder. + /// Cancellation token. + /// The List files in root folder response. + public virtual async Task> ListRootFolderAsync(CancellationToken cancellationToken = default) + { + using var activity = FtpClient.ConnectorActivitySource.StartActivity("FtpClient.ListRootFolderAsync"); + try + { + var path = $"/datasets/default/folders"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Extract archive to folder /// diff --git a/src/Azure.Connectors.Sdk/Generated/GitHubExtensions.cs b/src/Azure.Connectors.Sdk/Generated/GitHubExtensions.cs index 1d82e91..4a73e77 100644 --- a/src/Azure.Connectors.Sdk/Generated/GitHubExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/GitHubExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.GitHub.Models #region Types /// - /// Response for Create an issue + /// Properties of a GitHub issue. /// public class IssueDetailsModel { @@ -65,7 +65,7 @@ public class IssueDetailsModel } /// - /// assignee + /// Properties of a GitHub user. /// public class UserDetailsModel { @@ -195,7 +195,7 @@ public class UserDetailsModel } /// - /// Response for Get all issues of a repository + /// Model for fetching single API response /// public class GeneralAPIModel { @@ -207,7 +207,7 @@ public class GeneralAPIModel } /// - /// Response for Get a repository public key + /// The public key used for setting Actions Secrets. /// public class ActionsPublicKey { @@ -237,7 +237,7 @@ public class ActionsPublicKey } /// - /// Response for Create a repository using a template + /// A git repository /// public class RepositoryDetails { @@ -591,7 +591,7 @@ public class RepositoryDetails } /// - /// license + /// License Details /// public class LicenseDetails { @@ -621,7 +621,7 @@ public class LicenseDetails } /// - /// Response for Create a reference + /// Git references within a repository /// public class GitReference { @@ -643,7 +643,7 @@ public class GitReference } /// - /// Response for Merge a pull request + /// Pull Request Merge Result. /// public class PullRequestMergeResult { @@ -661,7 +661,7 @@ public class PullRequestMergeResult } /// - /// Response for Get a pull request + /// Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. /// public class PullRequest { @@ -847,7 +847,7 @@ public class PullRequest } /// - /// Item in The list of labels associated with the pull request. + /// Color-coded labels help you categorize and filter your issues (just like labels in Gmail). /// public class Label { @@ -881,7 +881,7 @@ public class Label } /// - /// milestone + /// A collection of related issues and pull requests. /// public class Milestone { @@ -951,7 +951,7 @@ public class Milestone } /// - /// Item in The list of requested teams to this pull request. + /// Groups of organization members that gives permissions on specified repositories. /// public class TeamDetails { @@ -1051,7 +1051,7 @@ public class PullRequestFile } /// - /// Response for Compare two commits + /// Commit Comparison /// public class CommitComparison { @@ -1109,7 +1109,7 @@ public class CommitComparison } /// - /// base_commit + /// Commit /// public class Commit { @@ -1159,7 +1159,7 @@ public class Commit } /// - /// Item in files + /// Diff Entry /// public class DiffEntry { @@ -1209,7 +1209,7 @@ public class DiffEntry } /// - /// Response for When a pull request is created or modified + /// Webhook creation response. /// public class WebhookCreationResponse { @@ -1263,7 +1263,7 @@ public class WebhookCreationResponse } /// - /// Response for Find issues by state and keyword + /// Model for fetching search results /// public class MultipleSearchFetchModel { @@ -1273,7 +1273,7 @@ public class MultipleSearchFetchModel } /// - /// IssueBasicDetailsModel + /// Properties of an issue. /// public class IssueBasicDetailsModel { @@ -1287,7 +1287,7 @@ public class IssueBasicDetailsModel } /// - /// IssueUpdateModel + /// Properties of an issue update. /// public class IssueUpdateModel { @@ -1325,7 +1325,7 @@ public class IssueUpdateModel } /// - /// MilestoneUpdateModel + /// Properties of a milestone update. /// public class MilestoneUpdateModel { @@ -1369,7 +1369,7 @@ public class Verification } /// - /// GitUser + /// Metaproperties for Git author/committer information. /// public class GitUser { @@ -1397,7 +1397,7 @@ public class GraphQlQuery } /// - /// RepositoryDispatchEvent + /// Repository Dispatch Event raised /// public class RepositoryDispatchEvent { @@ -1447,7 +1447,7 @@ public class CreateRepositoryUsingTemplateRequest } /// - /// RepositoryMiniDetails + /// A git repository /// public class RepositoryMiniDetails { @@ -1547,7 +1547,7 @@ public class CreateReferenceRequest } /// - /// PullRequestCreateRequest + /// Pull Request Creation Request. /// public class PullRequestCreateRequest { @@ -1577,7 +1577,7 @@ public class PullRequestCreateRequest } /// - /// PullRequestMergeRequest + /// Pull Request Merge Request. /// public class PullRequestMergeRequest { @@ -1625,7 +1625,7 @@ public class PullRequestUpdateRequest } /// - /// WebhookRequestBody + /// Webhook request body. /// public class WebhookRequestBody { @@ -1647,7 +1647,7 @@ public class WebhookRequestBody } /// - /// RequestReviewersBody + /// Request Reviewers body. /// public class RequestReviewersBody { @@ -2977,6 +2977,18 @@ public static class GitHubTriggerParameters /// public static class OnWebhookPullRequestTrigger { + /// + /// Name of the repository owner. + /// Required. + /// + public const string RepositoryOwner = "repositoryOwner"; + + /// + /// Name of the repository. + /// Required. + /// + public const string RepositoryName = "repositoryName"; + /// /// The 'Accept' parameter. /// Required. diff --git a/src/Azure.Connectors.Sdk/Generated/GoogleCalendarExtensions.cs b/src/Azure.Connectors.Sdk/Generated/GoogleCalendarExtensions.cs index 06fe9ae..019ba7e 100644 --- a/src/Azure.Connectors.Sdk/Generated/GoogleCalendarExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/GoogleCalendarExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.GoogleCalendar.Models #region Types /// - /// Response for List calendars + /// List of one or multiple calendars. /// public class CalendarList { @@ -39,7 +39,7 @@ public class CalendarList } /// - /// Item in Calendars in the list. + /// Details about a single Google calendar. /// public class CalendarListEntry { @@ -65,7 +65,7 @@ public class CalendarListEntry } /// - /// Response for List the events on a calendar + /// List of events in a calendar. /// public class CalendarEventList { @@ -75,7 +75,7 @@ public class CalendarEventList } /// - /// Item in Events in the calendar. + /// Details of a single calendar event. /// public class ResponseEvent { @@ -153,7 +153,7 @@ public class ObjectEntity } /// - /// Response for When an event is added, updated or deleted from a calendar + /// List of events in a calendar. /// public class CalendarEventChangedList { @@ -163,7 +163,7 @@ public class CalendarEventChangedList } /// - /// Item in Changed events in the calendar. + /// Details of a single calendar event and what action changes the event. /// public class ResponseEventWithActionType { @@ -233,7 +233,7 @@ public class ResponseEventWithActionType } /// - /// RequestEvent + /// An event to upload to Google Calendar /// public class RequestEvent { @@ -271,7 +271,7 @@ public class RequestEvent } /// - /// PatchEvent + /// Event changes to upload to Google Calendar. /// public class PatchEvent { @@ -669,11 +669,60 @@ public static class GoogleCalendarTriggerOperations /// public static class GoogleCalendarTriggerParameters { + /// + /// Input parameters for the OnNewEventInCalendar trigger operation (operationId: OnNewEventInCalendar). + /// + public static class OnNewEventInCalendar + { + /// + /// Unique ID of the calendar to fetch events from. + /// Required. + /// Dynamic values from: ListCalendars. + /// + public const string CalendarId = "calendar_id"; + + } + + /// + /// Input parameters for the OnUpdatedEventInCalendar trigger operation (operationId: OnUpdatedEventInCalendar). + /// + public static class OnUpdatedEventInCalendar + { + /// + /// Unique ID of the calendar to fetch events from. + /// Required. + /// Dynamic values from: ListCalendars. + /// + public const string CalendarId = "calendar_id"; + + } + + /// + /// Input parameters for the OnDeletedEventInCalendar trigger operation (operationId: OnDeletedEventInCalendar). + /// + public static class OnDeletedEventInCalendar + { + /// + /// Unique ID of the calendar to fetch events from. + /// Required. + /// Dynamic values from: ListCalendars. + /// + public const string CalendarId = "calendar_id"; + + } + /// /// Input parameters for the OnChangedEventInCalendar trigger operation (operationId: OnChangedEventInCalendar). /// public static class OnChangedEventInCalendar { + /// + /// Unique ID of the calendar to fetch events from. + /// Required. + /// Dynamic values from: ListCalendars. + /// + public const string CalendarId = "calendar_id"; + /// /// Whether to expand recurring events into instances. /// @@ -681,6 +730,20 @@ public static class OnChangedEventInCalendar } + /// + /// Input parameters for the OnEventStarted trigger operation (operationId: OnEventStarted). + /// + public static class OnEventStarted + { + /// + /// Unique ID of the calendar to fetch events from. + /// Required. + /// Dynamic values from: ListCalendars. + /// + public const string CalendarId = "calendar_id"; + + } + } #endregion Trigger Parameter Metadata @@ -779,32 +842,6 @@ public virtual async Task ListCalendarsAsync(string minimumAccessR } } - /// - /// List writable calendars - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List writable calendars response. - public virtual async Task ListWritableCalendarsAsync(CancellationToken cancellationToken = default) - { - using var activity = GoogleCalendarClient.ConnectorActivitySource.StartActivity("GoogleCalendarClient.ListWritableCalendarsAsync"); - try - { - var queryParams = new List(); - queryParams.Add("minAccessRole=writer"); - var path = $"/users/me/calendarList/1" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// List the events on a calendar /// @@ -961,6 +998,32 @@ public virtual async Task UpdateEventAsync([DynamicValues("ListWr } } + /// + /// List writable calendars + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List writable calendars response. + public virtual async Task ListWritableCalendarsAsync(CancellationToken cancellationToken = default) + { + using var activity = GoogleCalendarClient.ConnectorActivitySource.StartActivity("GoogleCalendarClient.ListWritableCalendarsAsync"); + try + { + var queryParams = new List(); + queryParams.Add("minAccessRole=writer"); + var path = $"/users/me/calendarList/1" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/GoogleDriveExtensions.cs b/src/Azure.Connectors.Sdk/Generated/GoogleDriveExtensions.cs index d8cbdb5..a28ddf8 100644 --- a/src/Azure.Connectors.Sdk/Generated/GoogleDriveExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/GoogleDriveExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.GoogleDrive.Models #region Types /// - /// Response for Get file metadata using id + /// Blob metadata /// public class BlobMetadata { @@ -81,7 +81,7 @@ public class BlobMetadata } /// - /// Response for Get sheet metadata + /// Table metadata /// public class TableMetadata { @@ -115,7 +115,7 @@ public class TableMetadata } /// - /// x-ms-capabilities + /// Metadata for a table (capabilities) /// public class TableCapabilitiesMetadata { @@ -145,7 +145,7 @@ public class TableCapabilitiesMetadata } /// - /// sortRestrictions + /// Metadata for a table (sort restrictions) /// public class TableSortRestrictionsMetadata { @@ -163,7 +163,7 @@ public class TableSortRestrictionsMetadata } /// - /// filterRestrictions + /// Metadata for a table (filter restrictions) /// public class TableFilterRestrictionsMetadata { @@ -181,7 +181,7 @@ public class TableFilterRestrictionsMetadata } /// - /// selectRestrictions + /// Metadata for a table (select restrictions) /// public class TableSelectRestrictionsMetadata { @@ -203,7 +203,7 @@ public class ObjectEntity } /// - /// Response for Get sheets + /// Represents a list of tables. /// public class TablesList { @@ -213,7 +213,7 @@ public class TablesList } /// - /// Item in List of Tables + /// Represents a table. /// public class Table { @@ -764,6 +764,43 @@ public virtual async Task> ListRootFolderAsync(CancellationTo } } + /// + /// Extract archive to folder + /// + /// Extracts an archive file into a folder in Google Drive (example: .zip) + /// Source archive file path + /// Destination folder path + /// Overwrite? + /// Cancellation token. + /// The Extract archive to folder response. + public virtual async Task> ExtractFolderAsync(string sourceArchiveFilePath, string destinationFolderPath, bool? overwrite = default, CancellationToken cancellationToken = default) + { + using var activity = GoogleDriveClient.ConnectorActivitySource.StartActivity("GoogleDriveClient.ExtractFolderAsync"); + try + { + var queryParams = new List(); + queryParams.Add("queryParametersSingleEncoded=true"); + if (sourceArchiveFilePath is null) + throw new ArgumentNullException(nameof(sourceArchiveFilePath)); + queryParams.Add($"source={Uri.EscapeDataString(sourceArchiveFilePath.ToString())}"); + if (destinationFolderPath is null) + throw new ArgumentNullException(nameof(destinationFolderPath)); + queryParams.Add($"destination={Uri.EscapeDataString(destinationFolderPath.ToString())}"); + if (overwrite.HasValue) + queryParams.Add($"overwrite={Uri.EscapeDataString(overwrite.Value.ToString())}"); + var path = $"/datasets/default/extractFolderV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Post, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Get sheet metadata /// @@ -821,43 +858,6 @@ public virtual async Task GetTablesAsync(string @file, CancellationT } } - /// - /// Extract archive to folder - /// - /// Extracts an archive file into a folder in Google Drive (example: .zip) - /// Source archive file path - /// Destination folder path - /// Overwrite? - /// Cancellation token. - /// The Extract archive to folder response. - public virtual async Task> ExtractFolderAsync(string sourceArchiveFilePath, string destinationFolderPath, bool? overwrite = default, CancellationToken cancellationToken = default) - { - using var activity = GoogleDriveClient.ConnectorActivitySource.StartActivity("GoogleDriveClient.ExtractFolderAsync"); - try - { - var queryParams = new List(); - queryParams.Add("queryParametersSingleEncoded=true"); - if (sourceArchiveFilePath is null) - throw new ArgumentNullException(nameof(sourceArchiveFilePath)); - queryParams.Add($"source={Uri.EscapeDataString(sourceArchiveFilePath.ToString())}"); - if (destinationFolderPath is null) - throw new ArgumentNullException(nameof(destinationFolderPath)); - queryParams.Add($"destination={Uri.EscapeDataString(destinationFolderPath.ToString())}"); - if (overwrite.HasValue) - queryParams.Add($"overwrite={Uri.EscapeDataString(overwrite.Value.ToString())}"); - var path = $"/datasets/default/extractFolderV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Post, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/GoogleTasksExtensions.cs b/src/Azure.Connectors.Sdk/Generated/GoogleTasksExtensions.cs index c0ca927..5bc4408 100644 --- a/src/Azure.Connectors.Sdk/Generated/GoogleTasksExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/GoogleTasksExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.GoogleTasks.Models #region Types /// - /// Response for List task lists + /// A list of task lists. /// public class TaskListList { @@ -39,7 +39,7 @@ public class TaskListList } /// - /// Item in Task lists in the lists. + /// A task list. /// public class TaskListEntry { @@ -61,7 +61,7 @@ public class TaskListEntry } /// - /// Response for Lists the tasks for a task list + /// A list of tasks. /// public class TaskList { @@ -71,7 +71,7 @@ public class TaskList } /// - /// Item in The tasks in the list. + /// A task. /// public class TaskObject { @@ -117,7 +117,7 @@ public class TaskObject } /// - /// TaskListCreate + /// Object used to create a task list /// public class TaskListCreate { @@ -127,7 +127,7 @@ public class TaskListCreate } /// - /// TaskCreate + /// Represents the values used to create a task. /// public class TaskCreate { @@ -296,6 +296,60 @@ public static class GoogleTasksTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the GoogleTasks connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class GoogleTasksTriggerParameters + { + /// + /// Input parameters for the OnNewTaskInList trigger operation (operationId: OnNewTaskInList). + /// + public static class OnNewTaskInList + { + /// + /// The id of the task list. + /// Required. + /// Dynamic values from: ListTaskLists. + /// + public const string TaskListId = "taskListId"; + + } + + /// + /// Input parameters for the OnDueTaskInList trigger operation (operationId: OnDueTaskInList). + /// + public static class OnDueTaskInList + { + /// + /// The id of the task list. + /// Required. + /// Dynamic values from: ListTaskLists. + /// + public const string TaskListId = "taskListId"; + + } + + /// + /// Input parameters for the OnCompletedTaskInList trigger operation (operationId: OnCompletedTaskInListV2). + /// + public static class OnCompletedTaskInList + { + /// + /// The id of the task list + /// Required. + /// Dynamic values from: ListTaskLists. + /// + public const string TaskListId = "taskListId"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// diff --git a/src/Azure.Connectors.Sdk/Generated/ImpexiumExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ImpexiumExtensions.cs index 3737c29..5ed2a22 100644 --- a/src/Azure.Connectors.Sdk/Generated/ImpexiumExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ImpexiumExtensions.cs @@ -1925,7 +1925,7 @@ public class RelationshipData } /// - /// Response for Add or Update Address to Organization + /// Address Save Data. /// public class AddressSaveData { @@ -2327,7 +2327,7 @@ public class AddEmailToIndividualInput } /// - /// Response for Add Email to Individual + /// Email Data. /// public class EmailData { diff --git a/src/Azure.Connectors.Sdk/Generated/InsightlyExtensions.cs b/src/Azure.Connectors.Sdk/Generated/InsightlyExtensions.cs index d8fbcd0..fc421ba 100644 --- a/src/Azure.Connectors.Sdk/Generated/InsightlyExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/InsightlyExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.Insightly.Models #region Types /// - /// Response for List tasks + /// An Insightly Tasks response object. /// public class ListTasksResponse { @@ -39,7 +39,7 @@ public class ListTasksResponse } /// - /// Item in A collection of tasks + /// An Insightly Task Object /// public class TaskObject { @@ -176,7 +176,7 @@ public class TaskObject } /// - /// Response for List projects + /// A Insightly Project response object /// public class ListProjectsResponse { @@ -186,7 +186,7 @@ public class ListProjectsResponse } /// - /// Item in A collection of projects + /// An Insightly Project Object /// public class Project { @@ -276,7 +276,7 @@ public class Project } /// - /// Response for List leads + /// A Insightly Lead response object /// public class ListLeadsResponse { @@ -286,7 +286,7 @@ public class ListLeadsResponse } /// - /// Item in A collection of leads + /// An Insightly Lead Object /// public class Lead { @@ -443,7 +443,7 @@ public class Lead } /// - /// Response for List contacts + /// A Insightly contact response object /// public class ListContactsResponse { @@ -453,7 +453,7 @@ public class ListContactsResponse } /// - /// Item in A collection of contacts + /// An Insightly Contact Object /// public class Contact { @@ -585,7 +585,7 @@ public class Contact } /// - /// Response for List users + /// A Insightly User response object /// public class ListUsersResponse { @@ -595,7 +595,7 @@ public class ListUsersResponse } /// - /// Item in A collection of users + /// An Insightly User Object /// public class User { @@ -687,7 +687,7 @@ public class ObjectEntity } /// - /// Response for When an event is created + /// A Insightly Event response object /// public class ListEventsResponse { @@ -697,7 +697,7 @@ public class ListEventsResponse } /// - /// Item in A collection of events + /// An Insightly Event Object /// public class Event { @@ -755,7 +755,7 @@ public class Event } /// - /// Response for Add organization + /// An Insightly Organization Object /// public class Organization { @@ -815,7 +815,7 @@ public class Organization } /// - /// Item in Organization Addresses + /// An Insightly Contact Address Object /// public class Address { @@ -849,7 +849,7 @@ public class Address } /// - /// Item in Contact Information + /// An Insightly Contact Information Object /// public class ContactInfo { @@ -875,7 +875,7 @@ public class ContactInfo } /// - /// TaskRequest + /// An Insightly Task Request Object /// public class TaskRequest { @@ -910,7 +910,7 @@ public class TaskRequest } /// - /// Tag + /// A Tag Object /// public class Tag { @@ -920,7 +920,7 @@ public class Tag } /// - /// ProjectRequest + /// An Insightly Project Object /// public class ProjectRequest { @@ -970,7 +970,7 @@ public class ProjectRequest } /// - /// LeadRequest + /// An Insightly LeadRequest Object /// public class LeadRequest { @@ -1057,7 +1057,7 @@ public class LeadRequest } /// - /// ContactRequest + /// An Insightly Contact Request Object /// public class ContactRequest { @@ -1099,7 +1099,7 @@ public class ContactRequest } /// - /// OrganizationRequest + /// An Insightly Organization Request Object /// public class OrganizationRequest { diff --git a/src/Azure.Connectors.Sdk/Generated/JedoxOdataHubExtensions.cs b/src/Azure.Connectors.Sdk/Generated/JedoxOdataHubExtensions.cs index e92c125..0358863 100644 --- a/src/Azure.Connectors.Sdk/Generated/JedoxOdataHubExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/JedoxOdataHubExtensions.cs @@ -437,9 +437,9 @@ public class GetCubeCellResultSchemaResponse } /// - /// Response for Get View Cell Result Schema + /// Response for Get Extract Rows Result Schema /// - public class GetViewCellResultSchemaResponse + public class GetExtractRowsResultSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -449,9 +449,9 @@ public class GetViewCellResultSchemaResponse } /// - /// Response for Get Extract Rows Result Schema + /// Response for Get Transform Rows Result Schema /// - public class GetExtractRowsResultSchemaResponse + public class GetTransformRowsResultSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -461,9 +461,9 @@ public class GetExtractRowsResultSchemaResponse } /// - /// Response for Get Transform Rows Result Schema + /// Response for Get View Cell Result Schema /// - public class GetTransformRowsResultSchemaResponse + public class GetViewCellResultSchemaResponse { /// /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. @@ -2054,34 +2054,6 @@ public virtual async Task GetCubeCellResultSche } } - /// - /// Get View Cell Result Schema - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Database Identifier - /// View Identifier - /// Cancellation token. - /// The Get View Cell Result Schema response. - public virtual async Task GetViewCellResultSchemaAsync(int databaseIdentifier, string viewIdentifier, CancellationToken cancellationToken = default) - { - using var activity = JedoxOdataHubClient.ConnectorActivitySource.StartActivity("JedoxOdataHubClient.GetViewCellResultSchemaAsync"); - try - { - if (viewIdentifier is null) - throw new ArgumentNullException(nameof(viewIdentifier)); - var path = $"/service/powerapps/schema/databases/{Uri.EscapeDataString(databaseIdentifier.ToString())}/views/{Uri.EscapeDataString(viewIdentifier.ToString())}/cells"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get Extract Rows Result Schema /// @@ -2148,6 +2120,34 @@ public virtual async Task GetTransformRows } } + /// + /// Get View Cell Result Schema + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Database Identifier + /// View Identifier + /// Cancellation token. + /// The Get View Cell Result Schema response. + public virtual async Task GetViewCellResultSchemaAsync(int databaseIdentifier, string viewIdentifier, CancellationToken cancellationToken = default) + { + using var activity = JedoxOdataHubClient.ConnectorActivitySource.StartActivity("JedoxOdataHubClient.GetViewCellResultSchemaAsync"); + try + { + if (viewIdentifier is null) + throw new ArgumentNullException(nameof(viewIdentifier)); + var path = $"/service/powerapps/schema/databases/{Uri.EscapeDataString(databaseIdentifier.ToString())}/views/{Uri.EscapeDataString(viewIdentifier.ToString())}/cells"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/JiraExtensions.cs b/src/Azure.Connectors.Sdk/Generated/JiraExtensions.cs index 7feae41..6018dd8 100644 --- a/src/Azure.Connectors.Sdk/Generated/JiraExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/JiraExtensions.cs @@ -1806,68 +1806,6 @@ public virtual async Task ListFiltersAsync(CancellationToke } } - /// - /// Get issue types (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Project - /// Cancellation token. - /// The Get issue types (V2) response. - public virtual async Task> ListIssueTypesAsync([DynamicValues("ListProjects_V3")] string project, CancellationToken cancellationToken = default) - { - using var activity = JiraClient.ConnectorActivitySource.StartActivity("JiraClient.ListIssueTypesAsync"); - try - { - var queryParams = new List(); - if (project is null) - throw new ArgumentNullException(nameof(project)); - queryParams.Add($"projectKey={Uri.EscapeDataString(project.ToString())}"); - var path = $"/v2/types/issue/createmeta" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get issue types fields (V2) - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Project - /// Issue Types - /// Cancellation token. - /// The Get issue types fields (V2) response. - public virtual async Task> ListIssueTypesFieldsAsync(string project, string issueTypes, CancellationToken cancellationToken = default) - { - using var activity = JiraClient.ConnectorActivitySource.StartActivity("JiraClient.ListIssueTypesFieldsAsync"); - try - { - var queryParams = new List(); - if (project is null) - throw new ArgumentNullException(nameof(project)); - queryParams.Add($"projectKey={Uri.EscapeDataString(project.ToString())}"); - if (issueTypes is null) - throw new ArgumentNullException(nameof(issueTypes)); - queryParams.Add($"issuetypeIds={Uri.EscapeDataString(issueTypes.ToString())}"); - var path = $"/v3/issue/createmeta" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get projects (V2) /// @@ -1973,6 +1911,68 @@ public virtual async Task UpdateProjectAsync(string proje } } + /// + /// Get issue types (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Project + /// Cancellation token. + /// The Get issue types (V2) response. + public virtual async Task> ListIssueTypesAsync([DynamicValues("ListProjects_V3")] string project, CancellationToken cancellationToken = default) + { + using var activity = JiraClient.ConnectorActivitySource.StartActivity("JiraClient.ListIssueTypesAsync"); + try + { + var queryParams = new List(); + if (project is null) + throw new ArgumentNullException(nameof(project)); + queryParams.Add($"projectKey={Uri.EscapeDataString(project.ToString())}"); + var path = $"/v2/types/issue/createmeta" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get issue types fields (V2) + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Project + /// Issue Types + /// Cancellation token. + /// The Get issue types fields (V2) response. + public virtual async Task> ListIssueTypesFieldsAsync(string project, string issueTypes, CancellationToken cancellationToken = default) + { + using var activity = JiraClient.ConnectorActivitySource.StartActivity("JiraClient.ListIssueTypesFieldsAsync"); + try + { + var queryParams = new List(); + if (project is null) + throw new ArgumentNullException(nameof(project)); + queryParams.Add($"projectKey={Uri.EscapeDataString(project.ToString())}"); + if (issueTypes is null) + throw new ArgumentNullException(nameof(issueTypes)); + queryParams.Add($"issuetypeIds={Uri.EscapeDataString(issueTypes.ToString())}"); + var path = $"/v3/issue/createmeta" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/KeyVaultExtensions.cs b/src/Azure.Connectors.Sdk/Generated/KeyVaultExtensions.cs index b9f7546..43e112d 100644 --- a/src/Azure.Connectors.Sdk/Generated/KeyVaultExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/KeyVaultExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.KeyVault.Models #region Types /// - /// Response for List keys + /// Collection of keys /// public class KeyMetadataCollection { @@ -43,7 +43,7 @@ public class KeyMetadataCollection } /// - /// Item in The keys + /// Metadata of a key /// public class KeyMetadata { @@ -86,7 +86,7 @@ public class KeyMetadata } /// - /// Response for Encrypt data with key + /// Result of encryption operation /// public class KeyEncryptOutput { @@ -96,7 +96,7 @@ public class KeyEncryptOutput } /// - /// Response for Decrypt data with key + /// Result of decryption operation /// public class KeyDecryptOutput { @@ -106,7 +106,7 @@ public class KeyDecryptOutput } /// - /// Response for List secrets + /// Collection of secrets /// public class SecretMetadataCollection { @@ -120,7 +120,7 @@ public class SecretMetadataCollection } /// - /// Item in The secrets + /// Metadata of a secret /// public class SecretMetadata { @@ -159,7 +159,7 @@ public class SecretMetadata } /// - /// Response for Get secret + /// The secret /// public class Secret { @@ -202,7 +202,7 @@ public class Secret } /// - /// KeyEncryptInput + /// Input for encryption operation /// public class KeyEncryptInput { @@ -216,7 +216,7 @@ public class KeyEncryptInput } /// - /// KeyDecryptInput + /// Input for decryption operation /// public class KeyDecryptInput { diff --git a/src/Azure.Connectors.Sdk/Generated/KustoExtensions.cs b/src/Azure.Connectors.Sdk/Generated/KustoExtensions.cs index 41c074b..ba8724c 100644 --- a/src/Azure.Connectors.Sdk/Generated/KustoExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/KustoExtensions.cs @@ -39,7 +39,7 @@ public class Table } /// - /// Item in value + /// Row /// [DynamicSchema("listKustoResultsSchemaPost")] public class Row @@ -52,18 +52,6 @@ public class Row public Dictionary AdditionalProperties { get; set; } = new(); } - /// - /// Response for Query schema - /// - public class ObjectEntity - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - /// /// Response for Run KQL query and render a chart /// @@ -138,6 +126,18 @@ public class MCPQueryResponse public JsonElement? Error { get; set; } } + /// + /// Response for Query schema + /// + public class ObjectEntity + { + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + /// /// QueryAndVisualizeSchema /// @@ -549,31 +549,6 @@ public virtual async Task
ListKustoShowCommandResultsAsync(ControlCommand } } - /// - /// Query schema - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// The request body. - /// Cancellation token. - /// The Query schema response. - public virtual async Task ListKustoResultsSchemaAsync(QueryAndListSchema input, CancellationToken cancellationToken = default) - { - using var activity = KustoClient.ConnectorActivitySource.StartActivity("KustoClient.ListKustoResultsSchemaAsync"); - try - { - var path = $"/ListKustoResultsSchema"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Run KQL query and render a chart /// @@ -678,6 +653,31 @@ public virtual async Task McpKustoQueryManagementAsync(MCPQuer } } + /// + /// Query schema + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// The request body. + /// Cancellation token. + /// The Query schema response. + public virtual async Task ListKustoResultsSchemaAsync(QueryAndListSchema input, CancellationToken cancellationToken = default) + { + using var activity = KustoClient.ConnectorActivitySource.StartActivity("KustoClient.ListKustoResultsSchemaAsync"); + try + { + var path = $"/ListKustoResultsSchema"; + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/MailChimpExtensions.cs b/src/Azure.Connectors.Sdk/Generated/MailChimpExtensions.cs index 69cd695..1eb5fef 100644 --- a/src/Azure.Connectors.Sdk/Generated/MailChimpExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/MailChimpExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.MailChimp.Models #region Types /// - /// Response for List campaigns + /// Response when getting campaigns /// public class GetCampaignsResponse { @@ -39,7 +39,7 @@ public class GetCampaignsResponse } /// - /// Item in An array of objects, each representing a campaign + /// New Campaign Result Model /// public class CampaignResponseModel { @@ -118,7 +118,7 @@ public class CampaignResponseModel } /// - /// Item in List settings for the campaign + /// Settings for the campaign /// public class Recipient { @@ -132,7 +132,7 @@ public class Recipient } /// - /// segment_opts + /// An object representing all segmentation options /// public class SegmentOpts { @@ -146,7 +146,7 @@ public class SegmentOpts } /// - /// settings + /// Settings for the campaign /// public class Settings { @@ -204,7 +204,7 @@ public class Settings } /// - /// variate_settings + /// Settings for the campaign /// public class VariateSettings { @@ -238,7 +238,7 @@ public class VariateSettings } /// - /// tracking + /// Settings for the campaign /// public class Tracking { @@ -284,7 +284,7 @@ public class Tracking } /// - /// salesforce + /// Salesforce tracking options for a campaign. Must be using MailChimp’s built-in Salesforce integration /// public class Salesforce { @@ -298,7 +298,7 @@ public class Salesforce } /// - /// highrise + /// Highrise tracking options for a campaign. Must be using MailChimp’s built-in Highrise integration /// public class Highrise { @@ -312,7 +312,7 @@ public class Highrise } /// - /// capsule + /// Capsule tracking options for a campaign. Must be using MailChimp’s built-in Capsule integration /// public class Capsule { @@ -322,7 +322,7 @@ public class Capsule } /// - /// rss_opts + /// RSS options for a campaign /// public class RSSOpts { @@ -344,7 +344,7 @@ public class RSSOpts } /// - /// schedule + /// The schedule for sending the RSS Campaign /// public class Schedule { @@ -366,7 +366,7 @@ public class Schedule } /// - /// daily_send + /// The days of the week to send a daily RSS Campaign. /// public class DailySend { @@ -400,7 +400,7 @@ public class DailySend } /// - /// ab_split_opts + /// A/B Testing options for a campaign /// public class ABSplitOpts { @@ -458,7 +458,7 @@ public class ABSplitOpts } /// - /// social_card + /// Settings for the campaign /// public class SocialCard { @@ -476,7 +476,7 @@ public class SocialCard } /// - /// report_summary + /// For sent campaigns, a summary of opens, clicks, and unsubscribes /// public class ReportSummary { @@ -506,7 +506,7 @@ public class ReportSummary } /// - /// delivery_status + /// Updates on campaigns in the process of sending /// public class DeliveryStatus { @@ -532,7 +532,7 @@ public class DeliveryStatus } /// - /// Item in A list of link types and descriptions for the API schema documents + /// Capsule tracking options for a campaign. Must be using MailChimp’s built-in Capsule integration /// public class Link { @@ -558,7 +558,7 @@ public class Link } /// - /// Response for Get all the lists + /// Response when getting lists /// public class GetListsResponseModel { @@ -572,7 +572,7 @@ public class GetListsResponseModel } /// - /// Item in An array of objects, each representing a list + /// Create New List Result Model /// public class CreateNewListResponseModel { @@ -650,7 +650,7 @@ public class CreateNewListResponseModel } /// - /// contact + /// Capsule tracking options for a campaign. Must be using MailChimp’s built-in Capsule integration /// public class Contact { @@ -688,7 +688,7 @@ public class Contact } /// - /// campaign_defaults + /// Capsule tracking options for a campaign. Must be using MailChimp’s built-in Capsule integration /// public class CampaignDefaults { @@ -710,7 +710,7 @@ public class CampaignDefaults } /// - /// stats + /// Stats for the list. Many of these are cached for at least five minutes /// public class Stats { @@ -780,7 +780,7 @@ public class Stats } /// - /// Response for Subscribe or unsubscribe list members + /// Response when subscribing or unsubscribing list members in a batch /// public class GetAddMembersBatchResponseModel { @@ -798,7 +798,7 @@ public class GetAddMembersBatchResponseModel } /// - /// Response for Show list members + /// Response when querying for all members in a list /// public class GetAllMembersResponseModel { @@ -816,7 +816,7 @@ public class GetAllMembersResponseModel } /// - /// Item in An array of objects, each representing a specific list member + /// Member Result Model /// public class MemberResponseModel { @@ -904,7 +904,7 @@ public class MemberResponseModel } /// - /// merge_fields + /// Merged fields containing User First name and last name /// public class FirstAndLastName { @@ -918,7 +918,7 @@ public class FirstAndLastName } /// - /// location + /// Subscriber location information /// public class Location { @@ -932,7 +932,7 @@ public class Location } /// - /// last_note + /// THe most recent Note added about this member /// public class LastNote { @@ -955,7 +955,7 @@ public class LastNote } /// - /// Response for When a Member has been added to a list + /// Response when getting members in a list /// public class GetMembersResponseModel { @@ -973,7 +973,7 @@ public class GetMembersResponseModel } /// - /// Item in An array of objects, each representing a specific list member + /// New Campaign Result Model /// public class AddUserResponseModel { @@ -1061,7 +1061,7 @@ public class AddUserResponseModel } /// - /// NewCampaignRequestV2 + /// Body parameters to create a new campaign (V2) /// public class NewCampaignRequest { @@ -1095,7 +1095,7 @@ public class NewCampaignRequest } /// - /// NewListRequest + /// Body parameters to create a new campaign /// public class NewListRequest { @@ -1137,7 +1137,7 @@ public class NewListRequest } /// - /// NewMembersInListRequest + /// Add new members to the list /// public class NewMembersInListRequest { @@ -1151,7 +1151,7 @@ public class NewMembersInListRequest } /// - /// Item in An array of objects, each representing an email address and the subscription status for a specific list. Up to 500 members may be added or updated with each API call. + /// Add a new member to the list /// public class NewMemberInListRequest { @@ -1185,7 +1185,7 @@ public class NewMemberInListRequest } /// - /// UpdateMemberInListRequest + /// Body parameters to update a member in a list /// public class UpdateMemberInListRequest { diff --git a/src/Azure.Connectors.Sdk/Generated/MicrosoftBookingsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/MicrosoftBookingsExtensions.cs index e0dcbfd..dd6a0e6 100644 --- a/src/Azure.Connectors.Sdk/Generated/MicrosoftBookingsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/MicrosoftBookingsExtensions.cs @@ -213,6 +213,60 @@ public static class MicrosoftBookingsTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the MicrosoftBookings connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class MicrosoftBookingsTriggerParameters + { + /// + /// Input parameters for the OnCreateAppointment trigger operation (operationId: CreateAppointment). + /// + public static class OnCreateAppointment + { + /// + /// Select a booking page + /// Required. + /// Dynamic values from: ListBookingsBusinessUserAsAdmin. + /// + public const string SMTPAddress = "SMTPAddress"; + + } + + /// + /// Input parameters for the OnUpdateAppointment trigger operation (operationId: UpdateAppointment). + /// + public static class OnUpdateAppointment + { + /// + /// Select a booking page + /// Required. + /// Dynamic values from: ListBookingsBusinessUserAsAdmin. + /// + public const string SMTPAddress = "SMTPAddress"; + + } + + /// + /// Input parameters for the OnCancelAppointment trigger operation (operationId: CancelAppointment). + /// + public static class OnCancelAppointment + { + /// + /// Select a booking page + /// Required. + /// Dynamic values from: ListBookingsBusinessUserAsAdmin. + /// + public const string SMTPAddress = "SMTPAddress"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// diff --git a/src/Azure.Connectors.Sdk/Generated/MicrosoftFormsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/MicrosoftFormsExtensions.cs index 8a22c45..5f93b32 100644 --- a/src/Azure.Connectors.Sdk/Generated/MicrosoftFormsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/MicrosoftFormsExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.MicrosoftForms.Models #region Types /// - /// Response for Get response details + /// Form response details /// [DynamicSchema("GetQuestions")] public class GetFormResponseByIdResult @@ -43,7 +43,7 @@ public class GetFormResponseByIdResult } /// - /// Response for Get form details + /// Form details /// public class GetFormDetailsByIdResult { diff --git a/src/Azure.Connectors.Sdk/Generated/MondayExtensions.cs b/src/Azure.Connectors.Sdk/Generated/MondayExtensions.cs index e370e0a..1c0e495 100644 --- a/src/Azure.Connectors.Sdk/Generated/MondayExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/MondayExtensions.cs @@ -272,56 +272,6 @@ public class WebhookSubitemColumnChangesResponse public Dictionary AdditionalProperties { get; set; } = new(); } - /// - /// Response for Get column names for a board ID - /// - public class GetColumnNamesSchemaResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - - /// - /// Response for Gets single column schema for a board ID - /// - public class GetSingleColumnSchemaResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - - /// - /// Response for Get column names for a board ID for a webhook - /// - public class GetColumnNamesSchemaForWebhookResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - - /// - /// Response for Get column names for a board ID for a webhook - /// - public class GetSchemaForGetItemsActionResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - - /// - /// Response for Get column names for a board ID for an update webhook - /// - public class GetColumnNamesSchemaForUpdateWebhookResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - /// /// Create an item /// @@ -686,26 +636,6 @@ public class CreateSubitemResponse public JsonElement? Data { get; set; } } - /// - /// Response for Get subitem column names - /// - public class GetSubitemColumnNamesResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - - /// - /// Response for Get subitem column names - /// - public class GetSubitemSchemaResponse - { - /// Schema of the requested schema type - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } - /// /// Response for Get subitems /// @@ -838,6 +768,76 @@ public class GetWorkspacesResponse public JsonElement? Data { get; set; } } + /// + /// Response for Get column names for a board ID + /// + public class GetColumnNamesSchemaResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Gets single column schema for a board ID + /// + public class GetSingleColumnSchemaResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Get column names for a board ID for a webhook + /// + public class GetColumnNamesSchemaForWebhookResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Get column names for a board ID for a webhook + /// + public class GetSchemaForGetItemsActionResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Get column names for a board ID for an update webhook + /// + public class GetColumnNamesSchemaForUpdateWebhookResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Get subitem column names + /// + public class GetSubitemColumnNamesResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + + /// + /// Response for Get subitem column names + /// + public class GetSubitemSchemaResponse + { + /// Schema of the requested schema type + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } + } + /// /// Extensible enum for known ColumnType values. /// @@ -1170,66 +1170,6 @@ public static WebhookSubitemColumnChangesInput WebhookSubitemColumnChangesInput( }; } - /// - /// Creates a new instance of . - /// - public static GetColumnNamesSchemaResponse GetColumnNamesSchemaResponse( - JsonElement? schema = default) - { - return new GetColumnNamesSchemaResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetSingleColumnSchemaResponse GetSingleColumnSchemaResponse( - JsonElement? schema = default) - { - return new GetSingleColumnSchemaResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetColumnNamesSchemaForWebhookResponse GetColumnNamesSchemaForWebhookResponse( - JsonElement? schema = default) - { - return new GetColumnNamesSchemaForWebhookResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetSchemaForGetItemsActionResponse GetSchemaForGetItemsActionResponse( - JsonElement? schema = default) - { - return new GetSchemaForGetItemsActionResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetColumnNamesSchemaForUpdateWebhookResponse GetColumnNamesSchemaForUpdateWebhookResponse( - JsonElement? schema = default) - { - return new GetColumnNamesSchemaForUpdateWebhookResponse - { - Schema = schema, - }; - } - /// /// Creates a new instance of . /// @@ -1538,30 +1478,6 @@ public static CreateSubitemResponse CreateSubitemResponse( }; } - /// - /// Creates a new instance of . - /// - public static GetSubitemColumnNamesResponse GetSubitemColumnNamesResponse( - JsonElement? schema = default) - { - return new GetSubitemColumnNamesResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetSubitemSchemaResponse GetSubitemSchemaResponse( - JsonElement? schema = default) - { - return new GetSubitemSchemaResponse - { - Schema = schema, - }; - } - /// /// Creates a new instance of . /// @@ -1655,34 +1571,118 @@ public static GetWorkspacesResponse GetWorkspacesResponse( Data = data, }; } - } - - #endregion Model Factory - -} - -namespace Azure.Connectors.Sdk.Monday -{ - #region Trigger Operation Constants - - /// - /// Trigger operation name constants for the Monday connector. - /// Use these constants with the [ConnectorTrigger] attribute's OperationName property - /// and with the Connector Namespace TriggerConfig operationName field. - /// - public static class MondayTriggerOperations - { /// - /// When an item is created. + /// Creates a new instance of . /// - public const string OnWebhookCreateItem = "WebhookCreateItem"; + public static GetColumnNamesSchemaResponse GetColumnNamesSchemaResponse( + JsonElement? schema = default) + { + return new GetColumnNamesSchemaResponse + { + Schema = schema, + }; + } /// - /// When a new update is posted. + /// Creates a new instance of . /// - public const string OnWebhookCreateUpdate = "WebhookCreateUpdate"; - + public static GetSingleColumnSchemaResponse GetSingleColumnSchemaResponse( + JsonElement? schema = default) + { + return new GetSingleColumnSchemaResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetColumnNamesSchemaForWebhookResponse GetColumnNamesSchemaForWebhookResponse( + JsonElement? schema = default) + { + return new GetColumnNamesSchemaForWebhookResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetSchemaForGetItemsActionResponse GetSchemaForGetItemsActionResponse( + JsonElement? schema = default) + { + return new GetSchemaForGetItemsActionResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetColumnNamesSchemaForUpdateWebhookResponse GetColumnNamesSchemaForUpdateWebhookResponse( + JsonElement? schema = default) + { + return new GetColumnNamesSchemaForUpdateWebhookResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetSubitemColumnNamesResponse GetSubitemColumnNamesResponse( + JsonElement? schema = default) + { + return new GetSubitemColumnNamesResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetSubitemSchemaResponse GetSubitemSchemaResponse( + JsonElement? schema = default) + { + return new GetSubitemSchemaResponse + { + Schema = schema, + }; + } + } + + #endregion Model Factory + +} + +namespace Azure.Connectors.Sdk.Monday +{ + + #region Trigger Operation Constants + + /// + /// Trigger operation name constants for the Monday connector. + /// Use these constants with the [ConnectorTrigger] attribute's OperationName property + /// and with the Connector Namespace TriggerConfig operationName field. + /// + public static class MondayTriggerOperations + { + /// + /// When an item is created. + /// + public const string OnWebhookCreateItem = "WebhookCreateItem"; + + /// + /// When a new update is posted. + /// + public const string OnWebhookCreateUpdate = "WebhookCreateUpdate"; + /// /// When an item's name changes. /// @@ -1784,23 +1784,20 @@ protected MondayClient() : base() { } public override string ToString() => base.ToString(); /// - /// Get boards + /// Create an item /// - /// Discovery method used to populate dynamic parameter values at design time. - /// workspaceId + /// Creates an item in the selected monday.com board and group. + /// The request body. /// Cancellation token. - /// The Get boards response. - public virtual async Task> GetBoardsAsync(string workspaceId = default, CancellationToken cancellationToken = default) + /// The Create an item response. + public virtual async Task CreateItemAsync(CreateItemInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetBoardsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateItemAsync"); try { - var queryParams = new List(); - if (workspaceId != default) - queryParams.Add($"workspaceId={Uri.EscapeDataString(workspaceId.ToString())}"); - var path = $"/getData/getBoards" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/CreateItem"; return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1812,24 +1809,20 @@ protected MondayClient() : base() { } } /// - /// Get groups for the Get Items operation + /// Duplicate a board /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Duplicates a board in monday.com. + /// The request body. /// Cancellation token. - /// The Get groups for the Get Items operation response. - public virtual async Task> GetGroupsForGetItemsAsync(string boardId, CancellationToken cancellationToken = default) + /// The Duplicate a board response. + public virtual async Task DuplicateBoardAsync(DuplicateBoardInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetGroupsForGetItemsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.DuplicateBoardAsync"); try { - var queryParams = new List(); - if (boardId is null) - throw new ArgumentNullException(nameof(boardId)); - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getData/getGroupsForGetItems" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/DuplicateBoard"; return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1841,24 +1834,20 @@ protected MondayClient() : base() { } } /// - /// Get columns for item filtering + /// Create a board /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Creates a board in monday.com. + /// The request body. /// Cancellation token. - /// The Get columns for item filtering response. - public virtual async Task> GetColumnsForItemFilteringAsync(string boardId, CancellationToken cancellationToken = default) + /// The Create a board response. + public virtual async Task CreateBoardAsync(CreateBoardInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnsForItemFilteringAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateBoardAsync"); try { - var queryParams = new List(); - if (boardId is null) - throw new ArgumentNullException(nameof(boardId)); - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getData/getColumnsForItemFiltering" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/CreateBoard"; return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1870,27 +1859,20 @@ protected MondayClient() : base() { } } /// - /// Get column filter operator + /// Create a column /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId - /// columnId + /// Creates a column in monday.com for the specified board. + /// The request body. /// Cancellation token. - /// The Get column filter operator response. - public virtual async Task> GetColumnFilterOperatorAsync(string boardId, string columnId = default, CancellationToken cancellationToken = default) + /// The Create a column response. + public virtual async Task CreateColumnAsync(CreateColumnInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnFilterOperatorAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateColumnAsync"); try { - var queryParams = new List(); - if (boardId is null) - throw new ArgumentNullException(nameof(boardId)); - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - if (columnId != default) - queryParams.Add($"columnId={Uri.EscapeDataString(columnId.ToString())}"); - var path = $"/getData/getColumnFilterOperator" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/CreateColumn"; return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1902,23 +1884,20 @@ protected MondayClient() : base() { } } /// - /// Get column names for a board ID + /// Create a group /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Creates a group in monday.com for the specified board. + /// The request body. /// Cancellation token. - /// The Get column names for a board ID response. - public virtual async Task GetColumnNamesSchemaAsync(string boardId = default, CancellationToken cancellationToken = default) + /// The Create a group response. + public virtual async Task CreateGroupAsync(CreateGroupInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateGroupAsync"); try { - var queryParams = new List(); - if (boardId != default) - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getSchema/getColumnNames" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/CreateGroup"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1930,26 +1909,20 @@ public virtual async Task GetColumnNamesSchemaAsyn } /// - /// Gets single column schema for a board ID + /// Update an item's column value /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId - /// columnId + /// Updates a single item's column. If the value is blank, the column value will be cleared. + /// The request body. /// Cancellation token. - /// The Gets single column schema for a board ID response. - public virtual async Task GetSingleColumnSchemaAsync(string boardId = default, string columnId = default, CancellationToken cancellationToken = default) + /// The Update an item's column value response. + public virtual async Task UpdateItemColumnAsync(UpdateItemColumnInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSingleColumnSchemaAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.UpdateItemColumnAsync"); try { - var queryParams = new List(); - if (boardId != default) - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - if (columnId != default) - queryParams.Add($"columnId={Uri.EscapeDataString(columnId.ToString())}"); - var path = $"/getSchema/getSingleColumnSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/UpdateItemColumn"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1961,23 +1934,20 @@ public virtual async Task GetSingleColumnSchemaAs } /// - /// Get column names for a board ID for a webhook + /// Update multiple item column values /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Updates multiple item columns. Leave the column value blank to keep the current value. + /// The request body. /// Cancellation token. - /// The Get column names for a board ID for a webhook response. - public virtual async Task GetColumnNamesSchemaForWebhookAsync(string boardId = default, CancellationToken cancellationToken = default) + /// The Update multiple item column values response. + public virtual async Task UpdateMultipleItemColumnsAsync(UpdateMultipleItemColumnsInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaForWebhookAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.UpdateMultipleItemColumnsAsync"); try { - var queryParams = new List(); - if (boardId != default) - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getSchema/getColumnNamesForWebhook" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/UpdateMultipleItemColumns"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1989,23 +1959,20 @@ public virtual async Task GetColumnNames } /// - /// Get column names for a board ID for a webhook + /// Move an item to a group /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Moves an item to another group on the same board. + /// The request body. /// Cancellation token. - /// The Get column names for a board ID for a webhook response. - public virtual async Task GetSchemaForGetItemsActionAsync(string boardId = default, CancellationToken cancellationToken = default) + /// The Move an item to a group response. + public virtual async Task MoveItemToGroupAsync(MoveItemToGroupInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSchemaForGetItemsActionAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.MoveItemToGroupAsync"); try { - var queryParams = new List(); - if (boardId != default) - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getSchema/getSchemaForGetItemsAction" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/MoveItemToGroup"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2017,23 +1984,20 @@ public virtual async Task GetSchemaForGetIte } /// - /// Get column names for a board ID for an update webhook + /// Create a notification /// - /// Discovery method used to populate dynamic parameter values at design time. - /// boardId + /// Creates a notification in monday.com for a user for either a specific board or item. + /// The request body. /// Cancellation token. - /// The Get column names for a board ID for an update webhook response. - public virtual async Task GetColumnNamesSchemaForUpdateWebhookAsync(string boardId = default, CancellationToken cancellationToken = default) + /// The Create a notification response. + public virtual async Task CreateNotificationAsync(CreateNotificationInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaForUpdateWebhookAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateNotificationAsync"); try { - var queryParams = new List(); - if (boardId != default) - queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); - var path = $"/getSchema/getColumnNamesForUpdateWebhook" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/executePowerAutomateAction/CreateNotification"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2045,20 +2009,20 @@ public virtual async Task GetColum } /// - /// Create an item + /// Create a subitem /// - /// Creates an item in the selected monday.com board and group. + /// Creates a subitem in monday.com for the selected board and parent item. /// The request body. /// Cancellation token. - /// The Create an item response. - public virtual async Task CreateItemAsync(CreateItemInput input, CancellationToken cancellationToken = default) + /// The Create a subitem response. + public virtual async Task CreateSubitemAsync(CreateSubitemInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateItemAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateSubitemAsync"); try { - var path = $"/executePowerAutomateAction/CreateItem"; + var path = $"/executePowerAutomateAction/CreateSubitem"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2070,20 +2034,32 @@ public virtual async Task CreateItemAsync(CreateItemInput in } /// - /// Duplicate a board + /// Get subitems /// - /// Duplicates a board in monday.com. - /// The request body. + /// Gets subitems in monday.com for a specific item in a board. + /// Workspace + /// Board + /// Item ID /// Cancellation token. - /// The Duplicate a board response. - public virtual async Task DuplicateBoardAsync(DuplicateBoardInput input, CancellationToken cancellationToken = default) + /// The Get subitems response. + public virtual async Task GetSubitemsAsync([DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, string itemId, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.DuplicateBoardAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemsAsync"); try { - var path = $"/executePowerAutomateAction/DuplicateBoard"; + var queryParams = new List(); + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); + if (board is null) + throw new ArgumentNullException(nameof(board)); + queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); + if (itemId is null) + throw new ArgumentNullException(nameof(itemId)); + queryParams.Add($"itemId={Uri.EscapeDataString(itemId.ToString())}"); + var path = $"/getData/getSubitems" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2095,20 +2071,20 @@ public virtual async Task DuplicateBoardAsync(DuplicateB } /// - /// Create a board + /// Create an update /// - /// Creates a board in monday.com. + /// Creates an update in monday.com for a specific item. /// The request body. /// Cancellation token. - /// The Create a board response. - public virtual async Task CreateBoardAsync(CreateBoardInput input, CancellationToken cancellationToken = default) + /// The Create an update response. + public virtual async Task CreateUpdateAsync(CreateUpdateInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateBoardAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateUpdateAsync"); try { - var path = $"/executePowerAutomateAction/CreateBoard"; + var path = $"/executePowerAutomateAction/CreateUpdate"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2120,20 +2096,32 @@ public virtual async Task CreateBoardAsync(CreateBoardInput } /// - /// Create a column + /// Get an item by ID /// - /// Creates a column in monday.com for the specified board. - /// The request body. + /// Gets a monday.com item using the specified item ID and board. + /// Item ID + /// Workspace + /// Board /// Cancellation token. - /// The Create a column response. - public virtual async Task CreateColumnAsync(CreateColumnInput input, CancellationToken cancellationToken = default) + /// The Get an item by ID response. + public virtual async Task GetItemByIdAsync(string itemId, [DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateColumnAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetItemByIdAsync"); try { - var path = $"/executePowerAutomateAction/CreateColumn"; + var queryParams = new List(); + if (itemId is null) + throw new ArgumentNullException(nameof(itemId)); + queryParams.Add($"itemId={Uri.EscapeDataString(itemId.ToString())}"); + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); + if (board is null) + throw new ArgumentNullException(nameof(board)); + queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); + var path = $"/getData/getItemById" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2145,20 +2133,20 @@ public virtual async Task CreateColumnAsync(CreateColumnIn } /// - /// Create a group + /// Create a workspace /// - /// Creates a group in monday.com for the specified board. + /// Creates a monday.com workspace with a user-specified name and description. /// The request body. /// Cancellation token. - /// The Create a group response. - public virtual async Task CreateGroupAsync(CreateGroupInput input, CancellationToken cancellationToken = default) + /// The Create a workspace response. + public virtual async Task CreateWorkspaceAsync(CreateWorkspaceInput input, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateGroupAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateWorkspaceAsync"); try { - var path = $"/executePowerAutomateAction/CreateGroup"; + var path = $"/executePowerAutomateAction/CreateWorkspaceV2"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2170,20 +2158,68 @@ public virtual async Task CreateGroupAsync(CreateGroupInput } /// - /// Update an item's column value + /// Get items /// - /// Updates a single item's column. If the value is blank, the column value will be cleared. - /// The request body. + /// Gets items in monday.com for a specific board and group. Filter items by column values using the filters found under advanced options. More info on filtering can be found here: https://plugingenie.com/docs/filtering-items. + /// Workspace + /// Board + /// Group + /// Filter 1 - Column + /// Filter 1 - Operator + /// Filter 1 - Value + /// Filter 2 - Column + /// Filter 2 - Operator + /// Filter 2 - Value + /// Filter 3 - Column + /// Filter 3 - Operator + /// Filter 3 - Value + /// Filter 4 - Column + /// Filter 4 - Operator + /// Filter 4 - Value /// Cancellation token. - /// The Update an item's column value response. - public virtual async Task UpdateItemColumnAsync(UpdateItemColumnInput input, CancellationToken cancellationToken = default) + /// The Get items response. + public virtual async Task GetItemsAsync([DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, [DynamicValues("GetGroupsForGetItems")] string group, [DynamicValues("GetColumnsForItemFiltering")] string filter1Column = default, [DynamicValues("GetColumnFilterOperator")] string filter1Operator = default, string filter1Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter2Column = default, [DynamicValues("GetColumnFilterOperator")] string filter2Operator = default, string filter2Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter3Column = default, [DynamicValues("GetColumnFilterOperator")] string filter3Operator = default, string filter3Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter4Column = default, [DynamicValues("GetColumnFilterOperator")] string filter4Operator = default, string filter4Value = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.UpdateItemColumnAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetItemsAsync"); try { - var path = $"/executePowerAutomateAction/UpdateItemColumn"; + var queryParams = new List(); + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); + if (board is null) + throw new ArgumentNullException(nameof(board)); + queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); + if (group is null) + throw new ArgumentNullException(nameof(group)); + queryParams.Add($"groupId={Uri.EscapeDataString(group.ToString())}"); + if (filter1Column != default) + queryParams.Add($"filter1Column={Uri.EscapeDataString(filter1Column.ToString())}"); + if (filter1Operator != default) + queryParams.Add($"filter1Operator={Uri.EscapeDataString(filter1Operator.ToString())}"); + if (filter1Value != default) + queryParams.Add($"filter1Value={Uri.EscapeDataString(filter1Value.ToString())}"); + if (filter2Column != default) + queryParams.Add($"filter2Column={Uri.EscapeDataString(filter2Column.ToString())}"); + if (filter2Operator != default) + queryParams.Add($"filter2Operator={Uri.EscapeDataString(filter2Operator.ToString())}"); + if (filter2Value != default) + queryParams.Add($"filter2Value={Uri.EscapeDataString(filter2Value.ToString())}"); + if (filter3Column != default) + queryParams.Add($"filter3Column={Uri.EscapeDataString(filter3Column.ToString())}"); + if (filter3Operator != default) + queryParams.Add($"filter3Operator={Uri.EscapeDataString(filter3Operator.ToString())}"); + if (filter3Value != default) + queryParams.Add($"filter3Value={Uri.EscapeDataString(filter3Value.ToString())}"); + if (filter4Column != default) + queryParams.Add($"filter4Column={Uri.EscapeDataString(filter4Column.ToString())}"); + if (filter4Operator != default) + queryParams.Add($"filter4Operator={Uri.EscapeDataString(filter4Operator.ToString())}"); + if (filter4Value != default) + queryParams.Add($"filter4Value={Uri.EscapeDataString(filter4Value.ToString())}"); + var path = $"/getData/getItemsV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2195,20 +2231,19 @@ public virtual async Task UpdateItemColumnAsync(Update } /// - /// Update multiple item column values + /// Get tags /// - /// Updates multiple item columns. Leave the column value blank to keep the current value. - /// The request body. + /// This operation gets monday.com tags. /// Cancellation token. - /// The Update multiple item column values response. - public virtual async Task UpdateMultipleItemColumnsAsync(UpdateMultipleItemColumnsInput input, CancellationToken cancellationToken = default) + /// The Get tags response. + public virtual async Task GetTagsAsync(CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.UpdateMultipleItemColumnsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetTagsAsync"); try { - var path = $"/executePowerAutomateAction/UpdateMultipleItemColumns"; + var path = $"/getData/getTagsV2"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2220,20 +2255,19 @@ public virtual async Task UpdateMultipleItemC } /// - /// Move an item to a group + /// Get users /// - /// Moves an item to another group on the same board. - /// The request body. + /// This operation gets the name, email, and ID of users in your monday.com account. /// Cancellation token. - /// The Move an item to a group response. - public virtual async Task MoveItemToGroupAsync(MoveItemToGroupInput input, CancellationToken cancellationToken = default) + /// The Get users response. + public virtual async Task GetUsersAsync(CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.MoveItemToGroupAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetUsersAsync"); try { - var path = $"/executePowerAutomateAction/MoveItemToGroup"; + var path = $"/getData/getUsersV2"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2245,20 +2279,19 @@ public virtual async Task MoveItemToGroupAsync(MoveItem } /// - /// Create a notification + /// Get workspaces /// - /// Creates a notification in monday.com for a user for either a specific board or item. - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Create a notification response. - public virtual async Task CreateNotificationAsync(CreateNotificationInput input, CancellationToken cancellationToken = default) + /// The Get workspaces response. + public virtual async Task GetWorkspacesAsync(CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateNotificationAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetWorkspacesAsync"); try { - var path = $"/executePowerAutomateAction/CreateNotification"; + var path = $"/getData/getWorkspacesV2"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2270,20 +2303,23 @@ public virtual async Task CreateNotificationAsync(Cr } /// - /// Create a subitem + /// Get boards /// - /// Creates a subitem in monday.com for the selected board and parent item. - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// workspaceId /// Cancellation token. - /// The Create a subitem response. - public virtual async Task CreateSubitemAsync(CreateSubitemInput input, CancellationToken cancellationToken = default) + /// The Get boards response. + public virtual async Task> GetBoardsAsync(string workspaceId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateSubitemAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetBoardsAsync"); try { - var path = $"/executePowerAutomateAction/CreateSubitem"; + var queryParams = new List(); + if (workspaceId != default) + queryParams.Add($"workspaceId={Uri.EscapeDataString(workspaceId.ToString())}"); + var path = $"/getData/getBoards" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2295,24 +2331,24 @@ public virtual async Task CreateSubitemAsync(CreateSubite } /// - /// Get subitem column names + /// Get groups for the Get Items operation /// /// Discovery method used to populate dynamic parameter values at design time. - /// parentBoardId + /// boardId /// Cancellation token. - /// The Get subitem column names response. - public virtual async Task GetSubitemColumnNamesAsync(string parentBoardId, CancellationToken cancellationToken = default) + /// The Get groups for the Get Items operation response. + public virtual async Task> GetGroupsForGetItemsAsync(string boardId, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemColumnNamesAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetGroupsForGetItemsAsync"); try { var queryParams = new List(); - if (parentBoardId is null) - throw new ArgumentNullException(nameof(parentBoardId)); - queryParams.Add($"parentBoardId={Uri.EscapeDataString(parentBoardId.ToString())}"); - var path = $"/getSchema/getSubitemColumnNames" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (boardId is null) + throw new ArgumentNullException(nameof(boardId)); + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getData/getGroupsForGetItems" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2324,24 +2360,24 @@ public virtual async Task GetSubitemColumnNamesAs } /// - /// Get subitem column names + /// Get columns for item filtering /// /// Discovery method used to populate dynamic parameter values at design time. - /// parentBoardId + /// boardId /// Cancellation token. - /// The Get subitem column names response. - public virtual async Task GetSubitemSchemaAsync(string parentBoardId, CancellationToken cancellationToken = default) + /// The Get columns for item filtering response. + public virtual async Task> GetColumnsForItemFilteringAsync(string boardId, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemSchemaAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnsForItemFilteringAsync"); try { var queryParams = new List(); - if (parentBoardId is null) - throw new ArgumentNullException(nameof(parentBoardId)); - queryParams.Add($"parentBoardId={Uri.EscapeDataString(parentBoardId.ToString())}"); - var path = $"/getSchema/getSubitemSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (boardId is null) + throw new ArgumentNullException(nameof(boardId)); + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getData/getColumnsForItemFiltering" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2353,32 +2389,27 @@ public virtual async Task GetSubitemSchemaAsync(string } /// - /// Get subitems + /// Get column filter operator /// - /// Gets subitems in monday.com for a specific item in a board. - /// Workspace - /// Board - /// Item ID + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId + /// columnId /// Cancellation token. - /// The Get subitems response. - public virtual async Task GetSubitemsAsync([DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, string itemId, CancellationToken cancellationToken = default) + /// The Get column filter operator response. + public virtual async Task> GetColumnFilterOperatorAsync(string boardId, string columnId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnFilterOperatorAsync"); try { var queryParams = new List(); - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); - if (board is null) - throw new ArgumentNullException(nameof(board)); - queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); - if (itemId is null) - throw new ArgumentNullException(nameof(itemId)); - queryParams.Add($"itemId={Uri.EscapeDataString(itemId.ToString())}"); - var path = $"/getData/getSubitems" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (boardId is null) + throw new ArgumentNullException(nameof(boardId)); + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + if (columnId != default) + queryParams.Add($"columnId={Uri.EscapeDataString(columnId.ToString())}"); + var path = $"/getData/getColumnFilterOperator" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2390,20 +2421,23 @@ public virtual async Task GetSubitemsAsync( } /// - /// Create an update + /// Get column names for a board ID /// - /// Creates an update in monday.com for a specific item. - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId /// Cancellation token. - /// The Create an update response. - public virtual async Task CreateUpdateAsync(CreateUpdateInput input, CancellationToken cancellationToken = default) + /// The Get column names for a board ID response. + public virtual async Task GetColumnNamesSchemaAsync(string boardId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateUpdateAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaAsync"); try { - var path = $"/executePowerAutomateAction/CreateUpdate"; + var queryParams = new List(); + if (boardId != default) + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getSchema/getColumnNames" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2415,32 +2449,26 @@ public virtual async Task CreateUpdateAsync(CreateUpdateIn } /// - /// Get an item by ID + /// Gets single column schema for a board ID /// - /// Gets a monday.com item using the specified item ID and board. - /// Item ID - /// Workspace - /// Board + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId + /// columnId /// Cancellation token. - /// The Get an item by ID response. - public virtual async Task GetItemByIdAsync(string itemId, [DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, CancellationToken cancellationToken = default) + /// The Gets single column schema for a board ID response. + public virtual async Task GetSingleColumnSchemaAsync(string boardId = default, string columnId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetItemByIdAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSingleColumnSchemaAsync"); try { var queryParams = new List(); - if (itemId is null) - throw new ArgumentNullException(nameof(itemId)); - queryParams.Add($"itemId={Uri.EscapeDataString(itemId.ToString())}"); - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); - if (board is null) - throw new ArgumentNullException(nameof(board)); - queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); - var path = $"/getData/getItemById" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (boardId != default) + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + if (columnId != default) + queryParams.Add($"columnId={Uri.EscapeDataString(columnId.ToString())}"); + var path = $"/getSchema/getSingleColumnSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2452,20 +2480,23 @@ public virtual async Task GetItemByIdAsync(stri } /// - /// Create a workspace + /// Get column names for a board ID for a webhook /// - /// Creates a monday.com workspace with a user-specified name and description. - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId /// Cancellation token. - /// The Create a workspace response. - public virtual async Task CreateWorkspaceAsync(CreateWorkspaceInput input, CancellationToken cancellationToken = default) + /// The Get column names for a board ID for a webhook response. + public virtual async Task GetColumnNamesSchemaForWebhookAsync(string boardId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.CreateWorkspaceAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaForWebhookAsync"); try { - var path = $"/executePowerAutomateAction/CreateWorkspaceV2"; + var queryParams = new List(); + if (boardId != default) + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getSchema/getColumnNamesForWebhook" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2477,68 +2508,23 @@ public virtual async Task CreateWorkspaceAsync(CreateWo } /// - /// Get items + /// Get column names for a board ID for a webhook /// - /// Gets items in monday.com for a specific board and group. Filter items by column values using the filters found under advanced options. More info on filtering can be found here: https://plugingenie.com/docs/filtering-items. - /// Workspace - /// Board - /// Group - /// Filter 1 - Column - /// Filter 1 - Operator - /// Filter 1 - Value - /// Filter 2 - Column - /// Filter 2 - Operator - /// Filter 2 - Value - /// Filter 3 - Column - /// Filter 3 - Operator - /// Filter 3 - Value - /// Filter 4 - Column - /// Filter 4 - Operator - /// Filter 4 - Value + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId /// Cancellation token. - /// The Get items response. - public virtual async Task GetItemsAsync([DynamicValues("GetWorkspaces_V2")] string workspace, [DynamicValues("GetBoards")] string board, [DynamicValues("GetGroupsForGetItems")] string group, [DynamicValues("GetColumnsForItemFiltering")] string filter1Column = default, [DynamicValues("GetColumnFilterOperator")] string filter1Operator = default, string filter1Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter2Column = default, [DynamicValues("GetColumnFilterOperator")] string filter2Operator = default, string filter2Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter3Column = default, [DynamicValues("GetColumnFilterOperator")] string filter3Operator = default, string filter3Value = default, [DynamicValues("GetColumnsForItemFiltering")] string filter4Column = default, [DynamicValues("GetColumnFilterOperator")] string filter4Operator = default, string filter4Value = default, CancellationToken cancellationToken = default) + /// The Get column names for a board ID for a webhook response. + public virtual async Task GetSchemaForGetItemsActionAsync(string boardId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetItemsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSchemaForGetItemsActionAsync"); try { var queryParams = new List(); - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - queryParams.Add($"workspaceId={Uri.EscapeDataString(workspace.ToString())}"); - if (board is null) - throw new ArgumentNullException(nameof(board)); - queryParams.Add($"boardId={Uri.EscapeDataString(board.ToString())}"); - if (group is null) - throw new ArgumentNullException(nameof(group)); - queryParams.Add($"groupId={Uri.EscapeDataString(group.ToString())}"); - if (filter1Column != default) - queryParams.Add($"filter1Column={Uri.EscapeDataString(filter1Column.ToString())}"); - if (filter1Operator != default) - queryParams.Add($"filter1Operator={Uri.EscapeDataString(filter1Operator.ToString())}"); - if (filter1Value != default) - queryParams.Add($"filter1Value={Uri.EscapeDataString(filter1Value.ToString())}"); - if (filter2Column != default) - queryParams.Add($"filter2Column={Uri.EscapeDataString(filter2Column.ToString())}"); - if (filter2Operator != default) - queryParams.Add($"filter2Operator={Uri.EscapeDataString(filter2Operator.ToString())}"); - if (filter2Value != default) - queryParams.Add($"filter2Value={Uri.EscapeDataString(filter2Value.ToString())}"); - if (filter3Column != default) - queryParams.Add($"filter3Column={Uri.EscapeDataString(filter3Column.ToString())}"); - if (filter3Operator != default) - queryParams.Add($"filter3Operator={Uri.EscapeDataString(filter3Operator.ToString())}"); - if (filter3Value != default) - queryParams.Add($"filter3Value={Uri.EscapeDataString(filter3Value.ToString())}"); - if (filter4Column != default) - queryParams.Add($"filter4Column={Uri.EscapeDataString(filter4Column.ToString())}"); - if (filter4Operator != default) - queryParams.Add($"filter4Operator={Uri.EscapeDataString(filter4Operator.ToString())}"); - if (filter4Value != default) - queryParams.Add($"filter4Value={Uri.EscapeDataString(filter4Value.ToString())}"); - var path = $"/getData/getItemsV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (boardId != default) + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getSchema/getSchemaForGetItemsAction" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2550,19 +2536,23 @@ public virtual async Task GetItemsAsync([DynamicValues } /// - /// Get tags + /// Get column names for a board ID for an update webhook /// - /// This operation gets monday.com tags. + /// Discovery method used to populate dynamic parameter values at design time. + /// boardId /// Cancellation token. - /// The Get tags response. - public virtual async Task GetTagsAsync(CancellationToken cancellationToken = default) + /// The Get column names for a board ID for an update webhook response. + public virtual async Task GetColumnNamesSchemaForUpdateWebhookAsync(string boardId = default, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetTagsAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetColumnNamesSchemaForUpdateWebhookAsync"); try { - var path = $"/getData/getTagsV2"; + var queryParams = new List(); + if (boardId != default) + queryParams.Add($"boardId={Uri.EscapeDataString(boardId.ToString())}"); + var path = $"/getSchema/getColumnNamesForUpdateWebhook" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2574,19 +2564,24 @@ public virtual async Task GetTagsAsync(CancellationToken cancel } /// - /// Get users + /// Get subitem column names /// - /// This operation gets the name, email, and ID of users in your monday.com account. + /// Discovery method used to populate dynamic parameter values at design time. + /// parentBoardId /// Cancellation token. - /// The Get users response. - public virtual async Task GetUsersAsync(CancellationToken cancellationToken = default) + /// The Get subitem column names response. + public virtual async Task GetSubitemColumnNamesAsync(string parentBoardId, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetUsersAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemColumnNamesAsync"); try { - var path = $"/getData/getUsersV2"; + var queryParams = new List(); + if (parentBoardId is null) + throw new ArgumentNullException(nameof(parentBoardId)); + queryParams.Add($"parentBoardId={Uri.EscapeDataString(parentBoardId.ToString())}"); + var path = $"/getSchema/getSubitemColumnNames" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -2598,19 +2593,24 @@ public virtual async Task GetUsersAsync(CancellationToken canc } /// - /// Get workspaces + /// Get subitem column names /// /// Discovery method used to populate dynamic parameter values at design time. + /// parentBoardId /// Cancellation token. - /// The Get workspaces response. - public virtual async Task GetWorkspacesAsync(CancellationToken cancellationToken = default) + /// The Get subitem column names response. + public virtual async Task GetSubitemSchemaAsync(string parentBoardId, CancellationToken cancellationToken = default) { - using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetWorkspacesAsync"); + using var activity = MondayClient.ConnectorActivitySource.StartActivity("MondayClient.GetSubitemSchemaAsync"); try { - var path = $"/getData/getWorkspacesV2"; + var queryParams = new List(); + if (parentBoardId is null) + throw new ArgumentNullException(nameof(parentBoardId)); + queryParams.Add($"parentBoardId={Uri.EscapeDataString(parentBoardId.ToString())}"); + var path = $"/getSchema/getSubitemSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/Office365Extensions.cs b/src/Azure.Connectors.Sdk/Generated/Office365Extensions.cs index 9e956f8..408453a 100644 --- a/src/Azure.Connectors.Sdk/Generated/Office365Extensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/Office365Extensions.cs @@ -44,7 +44,7 @@ public class GraphOutlookCategory } /// - /// Response for Draft an email message + /// Received message from outlook rest api /// public class OutlookReceiveMessage { @@ -129,7 +129,7 @@ public class OutlookReceiveMessage } /// - /// Item in Attachments + /// Attachment /// public class OutlookReceiveAttachment { @@ -222,7 +222,7 @@ public class ItemBody } /// - /// Item in Internet message headers + /// Class representing a data structure for an Internet message header which is considered as SMTP header by Exchange /// public class InternetMessageHeader { @@ -264,7 +264,7 @@ public class BatchItemFailureResult } /// - /// Response for Send email with options + /// Base response model that connector returns to LA engine /// public class SubscriptionResponse { @@ -328,7 +328,7 @@ public class MCPQueryResponse } /// - /// Response for Get event (V3) + /// Connector specific calendar event model class for the client with Graph API /// public class GraphCalendarEventClientReceive { @@ -467,7 +467,7 @@ public class GraphCalendarEventClientReceive } /// - /// Response for Get events (V4) + /// The list of calendar items returned by Graph API /// public class GraphCalendarEventListClientReceive { @@ -477,7 +477,7 @@ public class GraphCalendarEventListClientReceive } /// - /// Response for When an event is added, updated or deleted (V3) + /// The list of calendar items with action type /// public class GraphCalendarEventListWithActionType { @@ -487,7 +487,7 @@ public class GraphCalendarEventListWithActionType } /// - /// Item in List of calendar items + /// Graph calendar event model with action type /// public class GraphCalendarEventClientWithActionType { @@ -648,7 +648,7 @@ public class CalendarGetTablesResponse } /// - /// Response for Get contact (V2) + /// Contact /// public class ContactResponse { @@ -702,7 +702,7 @@ public class ContactResponse /// The contact's email addresses [JsonPropertyName("emailAddresses")] - public List EmailAddresses { get; set; } + public List EmailAddresses { get; set; } /// The contact's instant messaging (IM) addresses [JsonPropertyName("imAddresses")] @@ -795,6 +795,20 @@ public class ContactResponse public DateTime? LastModifiedTime { get; init; } } + /// + /// Item in The contact's email addresses + /// + public class EmailAddressV2 + { + /// name + [JsonPropertyName("name")] + public string Name { get; set; } + + /// address + [JsonPropertyName("address")] + public string Address { get; set; } + } + /// /// homeAddress /// @@ -822,7 +836,7 @@ public class PhysicalAddress } /// - /// Response for Get contacts (V2) + /// Entity list response /// public class EntityListResponseContactResponse { @@ -832,7 +846,7 @@ public class EntityListResponseContactResponse } /// - /// Response for Get contact folders (V2) + /// Entity list response /// public class EntityListResponseGraphContactFolder { @@ -842,7 +856,7 @@ public class EntityListResponseGraphContactFolder } /// - /// Item in List of values + /// Contact folder data model returned by Graph API /// public class GraphContactFolder { @@ -1009,7 +1023,7 @@ public class SensitivityLabelMetadata } /// - /// Response for Get email (V2) + /// Graph Client Receive Email Message /// public class GraphClientReceiveMessage { @@ -1087,7 +1101,7 @@ public class GraphClientReceiveMessage } /// - /// Item in The file attachments for the message + /// File Attachment /// public class GraphClientReceiveFileAttachment { @@ -1126,7 +1140,7 @@ public class GraphClientReceiveFileAttachment } /// - /// Response for Get emails (V3) + /// Represents a wrapper object for batch response /// public class BatchResponseGraphClientReceiveMessage { @@ -1137,7 +1151,7 @@ public class BatchResponseGraphClientReceiveMessage } /// - /// Response for Get calendar view of events (V3) + /// Entity list response /// public class EntityListResponseGraphCalendarEventClientReceive { @@ -1171,7 +1185,7 @@ public class GetMailTipsResponse } /// - /// Item in value + /// Mail tips client model returned to the caller /// public class MailTipsClientReceive { @@ -1201,7 +1215,7 @@ public class MailTipsClientReceive } /// - /// automaticReplies + /// Automatic replies as part of mail tips /// public class MailTipsAutomaticReplies { @@ -1251,7 +1265,7 @@ public class MarkAsReadInput } /// - /// Response for When an email is flagged (V4) + /// Represents a wrapper object for batch trigger response /// public class TriggerBatchResponseGraphClientReceiveMessage { @@ -1271,7 +1285,7 @@ public class SetAutomaticRepliesSettingInput } /// - /// automaticRepliesSetting + /// Automatic replies setting model for the connector /// public class AutomaticRepliesSettingClient { @@ -1311,7 +1325,7 @@ public class SetAutomaticRepliesSettingResponse } /// - /// ClientSendAttachment + /// Attachment /// public class ClientSendAttachment { @@ -1325,7 +1339,7 @@ public class ClientSendAttachment } /// - /// ClientSendHtmlMessage + /// Send HTML Email Message /// public class SendEmailInput { @@ -1371,7 +1385,7 @@ public class SendEmailInput } /// - /// ClientDraftHtmlMessage + /// Draft an HTML Email Message /// public class DraftEmailInput { @@ -1417,7 +1431,7 @@ public class DraftEmailInput } /// - /// ReplyHtmlMessage + /// Properties of an HTML email reply message. /// public class ReplyEmailInput { @@ -1455,7 +1469,7 @@ public class ReplyEmailInput } /// - /// OptionsEmailSubscription + /// Model for Options Email Subscription /// public class OptionsEmailSubscription { @@ -1469,7 +1483,7 @@ public class OptionsEmailSubscription } /// - /// Message + /// User Options Email Message. This is the message expected as part of user input /// public class MessageWithOptions { @@ -1523,7 +1537,7 @@ public class MessageWithOptions } /// - /// ApprovalEmailSubscription + /// Model for Approval Email Subscription /// public class ApprovalEmailSubscription { @@ -1537,7 +1551,7 @@ public class ApprovalEmailSubscription } /// - /// Message + /// Approval Email Message. This is the message expected as part of user input /// public class ApprovalMessage { @@ -1587,7 +1601,7 @@ public class ApprovalMessage } /// - /// SharedMailboxClientSendHtmlMessage + /// Shared Mailbox Send HTML Email Message /// public class SharedMailboxSendEmailInput { @@ -1633,7 +1647,7 @@ public class SharedMailboxSendEmailInput } /// - /// GraphCalendarEventClient + /// Connector specific calendar event model class for the client for graph API /// public class GraphCalendarEventClient { @@ -1723,7 +1737,7 @@ public class GraphCalendarEventClient } /// - /// UpdateEmailFlag + /// Update email flag body /// public class UpdateEmailFlag { @@ -1733,7 +1747,7 @@ public class UpdateEmailFlag } /// - /// ResponseToEventInvite + /// Response to an event invite /// public class ResponseToEventInvite { @@ -1747,7 +1761,7 @@ public class ResponseToEventInvite } /// - /// DirectForwardMessage + /// Directly forward message /// public class DirectForwardMessage { @@ -1761,7 +1775,7 @@ public class DirectForwardMessage } /// - /// DateTimeTimeZone_V2 + /// DateTimeTimeZone /// public class DateTimeTimeZone { @@ -1775,7 +1789,7 @@ public class DateTimeTimeZone } /// - /// Contact_V2 + /// Contact /// public class Contact { @@ -1829,7 +1843,7 @@ public class Contact /// The contact's email addresses [JsonPropertyName("emailAddresses")] - public List EmailAddresses { get; set; } + public List EmailAddresses { get; set; } /// The contact's instant messaging (IM) addresses [JsonPropertyName("imAddresses")] @@ -3367,7 +3381,7 @@ public static ContactResponse ContactResponse( string surname = default, string title = default, string generation = default, - List emailAddresses = default, + List emailAddresses = default, List imAddresses = default, string jobTitle = default, string companyName = default, @@ -3431,6 +3445,20 @@ public static ContactResponse ContactResponse( }; } + /// + /// Creates a new instance of . + /// + public static EmailAddressV2 EmailAddressV2( + string name = default, + string address = default) + { + return new EmailAddressV2 + { + Name = name, + Address = address, + }; + } + /// /// Creates a new instance of . /// @@ -4201,7 +4229,7 @@ public static Contact Contact( string surname = default, string title = default, string generation = default, - List emailAddresses = default, + List emailAddresses = default, List imAddresses = default, string jobTitle = default, string companyName = default, @@ -4466,6 +4494,13 @@ public static class Office365TriggerParameters /// public static class OnCalendarChangedItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables_V2. + /// + public const string Table = "table"; + /// /// Number of incoming days in calendar to be tracked /// Default: 300. @@ -4485,6 +4520,13 @@ public static class OnCalendarChangedItems /// public static class OnCalendarNewItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables_V2. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// @@ -4517,6 +4559,13 @@ public static class OnCalendarNewItems /// public static class OnCalendarUpdatedItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables_V2. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// diff --git a/src/Azure.Connectors.Sdk/Generated/Office365GroupsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/Office365GroupsExtensions.cs index bafaa9d..faaef94 100644 --- a/src/Azure.Connectors.Sdk/Generated/Office365GroupsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/Office365GroupsExtensions.cs @@ -616,6 +616,20 @@ public static class OnGroupMembershipChange } + /// + /// Input parameters for the OnNewEvent trigger operation (operationId: OnNewEvent). + /// + public static class OnNewEvent + { + /// + /// Pick a group from the drop down or enter group id. + /// Required. + /// Dynamic values from: ListOwnedGroups_V2. + /// + public const string GroupId = "groupId"; + + } + } #endregion Trigger Parameter Metadata diff --git a/src/Azure.Connectors.Sdk/Generated/Office365GroupsMailExtensions.cs b/src/Azure.Connectors.Sdk/Generated/Office365GroupsMailExtensions.cs index c454b20..03b092c 100644 --- a/src/Azure.Connectors.Sdk/Generated/Office365GroupsMailExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/Office365GroupsMailExtensions.cs @@ -45,7 +45,7 @@ public class ListConversationsResponse : IPageable } /// - /// Item in value + /// Conversation object. /// public class Conversation { @@ -80,7 +80,7 @@ public class Conversation } /// - /// Item in threads + /// Conversation thread object. /// public class ConversationThread { @@ -137,7 +137,7 @@ public class EmailAddress } /// - /// Item in posts + /// Represents an individual Post item within a conversationThread entity. /// public class Post { @@ -202,7 +202,7 @@ public class Post } /// - /// body + /// Represents properties of the body of an item, such as a message, event or group post. /// public class ItemBody { @@ -242,7 +242,7 @@ public class Attachment } /// - /// Response for Create a new conversation in a group + /// The response of with the created conversation details. /// public class CreateConversationResponse { @@ -345,16 +345,6 @@ public class GetAttachmentsResponse : IPageable public List Value { get; set; } } - /// - /// Response for List user groups - /// - public class ListGroupsResponse - { - /// Array with the groups the user is part of. - [JsonPropertyName("value")] - public List Value { get; set; } - } - /// /// Response for When a new email arrives to a group /// @@ -366,7 +356,7 @@ public class OnNewEmailInGroupResponse } /// - /// Item in Response of the trigger. + /// When a new email arrives trigger response. /// public class ConversationTriggerResponse { @@ -385,7 +375,7 @@ public class ConversationTriggerResponse } /// - /// Item in threads + /// Conversation thread object. /// public class ConversationThreadTriggerResponse { @@ -399,7 +389,7 @@ public class ConversationThreadTriggerResponse } /// - /// Item in posts + /// Represents an individual Post item within a conversationThread entity. /// public class PostTriggerResponse { @@ -430,7 +420,17 @@ public class ObjectWithoutType } /// - /// ReplyConversationThreadBody + /// Response for List user groups + /// + public class ListGroupsResponse + { + /// Array with the groups the user is part of. + [JsonPropertyName("value")] + public List Value { get; set; } + } + + /// + /// Reply Conversation Thread body. /// public class ReplyConversationThreadBody { @@ -472,7 +472,7 @@ public class GetUsersGraphAction } /// - /// Item in File attachments to include. + /// File attachment. /// public class ClientSendAttachment { @@ -490,7 +490,7 @@ public class ClientSendAttachment } /// - /// ForwardPost_V2Body + /// New forward post body. /// public class ForwardPostBody { @@ -504,7 +504,7 @@ public class ForwardPostBody } /// - /// CreateConversationBody + /// New Conversation body. /// public class CreateConversationBody { @@ -774,18 +774,6 @@ public static GetAttachmentsResponse GetAttachmentsResponse( }; } - /// - /// Creates a new instance of . - /// - public static ListGroupsResponse ListGroupsResponse( - List value = default) - { - return new ListGroupsResponse - { - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -844,6 +832,18 @@ public static PostTriggerResponse PostTriggerResponse( }; } + /// + /// Creates a new instance of . + /// + public static ListGroupsResponse ListGroupsResponse( + List value = default) + { + return new ListGroupsResponse + { + Value = value, + }; + } + /// /// Creates a new instance of . /// @@ -1002,6 +1002,13 @@ public static class Office365GroupsMailTriggerParameters /// public static class OnNewEmailInGroup { + /// + /// Pick a group from the drop down or enter group id. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string GroupId = "groupId"; + /// /// The '$filter' parameter. /// @@ -1413,34 +1420,6 @@ public virtual AsyncPageable GetAttachmentsAsync([DynamicValues("Lis cancellationToken); } - /// - /// List user groups - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List user groups response. - public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) - { - using var activity = Office365GroupsMailClient.ConnectorActivitySource.StartActivity("Office365GroupsMailClient.ListGroupsAsync"); - try - { - var queryParams = new List(); - queryParams.Add("$filter=groupTypes%2Fany%28c%3Ac%20eq%20%27Unified%27%29"); - queryParams.Add("$select=id%2CdisplayName"); - queryParams.Add("$top=999"); - var path = $"/v1.0/me/memberOf/$/microsoft.graph.group" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Reply to a conversation thread /// @@ -1565,6 +1544,34 @@ await this } } + /// + /// List user groups + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List user groups response. + public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) + { + using var activity = Office365GroupsMailClient.ConnectorActivitySource.StartActivity("Office365GroupsMailClient.ListGroupsAsync"); + try + { + var queryParams = new List(); + queryParams.Add("$filter=groupTypes%2Fany%28c%3Ac%20eq%20%27Unified%27%29"); + queryParams.Add("$select=id%2CdisplayName"); + queryParams.Add("$top=999"); + var path = $"/v1.0/me/memberOf/$/microsoft.graph.group" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/Office365UsersExtensions.cs b/src/Azure.Connectors.Sdk/Generated/Office365UsersExtensions.cs index fe4ae64..a37c2ec 100644 --- a/src/Azure.Connectors.Sdk/Generated/Office365UsersExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/Office365UsersExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Office365Users.Models #region Types /// - /// Response for Get my trending documents + /// List of trending documents /// public class MyTrendingDocumentsResponse { @@ -40,7 +40,7 @@ public class MyTrendingDocumentsResponse } /// - /// Item in value + /// Trending documents from Graph API /// public class GraphTrending { @@ -146,7 +146,7 @@ public class SensitivityLabelMetadata } /// - /// Response for Get relevant people + /// Represents a list from the Graph API /// public class LinklessEntityListResponseListPerson { @@ -156,7 +156,7 @@ public class LinklessEntityListResponseListPerson } /// - /// Item in Value + /// Represents a Person /// public class Person { @@ -226,7 +226,7 @@ public class Person } /// - /// Item in Collection of the person's email addresses with a relevance score + /// Represents a scored email address /// public class ScoredEmailAddress { @@ -240,7 +240,7 @@ public class ScoredEmailAddress } /// - /// Item in The person's phone numbers + /// Represents a phone number /// public class Phone { @@ -254,7 +254,7 @@ public class Phone } /// - /// Response for Get user photo metadata + /// Photo Metadata class /// public class ClientPhotoMetadata { @@ -281,7 +281,7 @@ public class ClientPhotoMetadata } /// - /// Response for Get trending documents + /// List of trending documents /// public class TrendingDocumentsResponse { @@ -303,7 +303,7 @@ public class ObjectWithoutType } /// - /// Response for Get direct reports (V2) + /// List of direct reports /// public class DirectReportsResponse { @@ -313,7 +313,7 @@ public class DirectReportsResponse } /// - /// Item in Value + /// User from Graph API /// public class GraphUser { @@ -443,7 +443,7 @@ public class GraphUser } /// - /// Response for Search for users (V2) + /// Class representing entity list response from an Office API. /// public class EntityListResponseIReadOnlyListUser : IPageable { @@ -457,7 +457,7 @@ public class EntityListResponseIReadOnlyListUser : IPageable } /// - /// Item in Value + /// Represents a User object in the directory /// public class User { @@ -536,7 +536,7 @@ public class User } /// - /// GraphUserUpdateable_V1 + /// Updateable parts of user from Graph API /// public class GraphUserUpdateable { diff --git a/src/Azure.Connectors.Sdk/Generated/OneDriveExtensions.cs b/src/Azure.Connectors.Sdk/Generated/OneDriveExtensions.cs index 65876a1..e8285ec 100644 --- a/src/Azure.Connectors.Sdk/Generated/OneDriveExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/OneDriveExtensions.cs @@ -31,7 +31,7 @@ namespace Azure.Connectors.Sdk.OneDrive.Models #region Types /// - /// Response for Get file metadata + /// Blob metadata /// public class BlobMetadata { @@ -87,7 +87,7 @@ public class BlobMetadata } /// - /// Response for Get file tags + /// Tags /// public class Tags { @@ -97,7 +97,7 @@ public class Tags } /// - /// Response for Get file thumbnail + /// Thumbnail response data /// public class Thumbnail { @@ -125,7 +125,7 @@ public class SharingLink } /// - /// Response for List files in folder + /// Represents a page of blob metadata. /// public class BlobMetadataPage : IPageable { diff --git a/src/Azure.Connectors.Sdk/Generated/OneDriveForBusinessExtensions.cs b/src/Azure.Connectors.Sdk/Generated/OneDriveForBusinessExtensions.cs index 607b182..25ae67e 100644 --- a/src/Azure.Connectors.Sdk/Generated/OneDriveForBusinessExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/OneDriveForBusinessExtensions.cs @@ -31,7 +31,7 @@ namespace Azure.Connectors.Sdk.OneDriveForBusiness.Models #region Types /// - /// Response for Get file metadata + /// Blob metadata /// public class BlobMetadata { @@ -87,7 +87,7 @@ public class BlobMetadata } /// - /// Response for Get file thumbnail + /// Thumbnail response data /// public class Thumbnail { @@ -115,7 +115,7 @@ public class SharingLink } /// - /// Response for List files in folder + /// Represents a page of blob metadata. /// public class BlobMetadataPage : IPageable { diff --git a/src/Azure.Connectors.Sdk/Generated/OnenoteExtensions.cs b/src/Azure.Connectors.Sdk/Generated/OnenoteExtensions.cs index 1deff46..acfdd3a 100644 --- a/src/Azure.Connectors.Sdk/Generated/OnenoteExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/OnenoteExtensions.cs @@ -112,7 +112,7 @@ public class Page } /// - /// links + /// The links associated with the OneNote page. /// public class Link { @@ -184,7 +184,7 @@ public class GetSectionsInNotebookResponse } /// - /// Item in value + /// The fields included in a section list item. /// public class SectionListItem { @@ -202,7 +202,7 @@ public class SectionListItem } /// - /// Response for When a new section is created + /// Response for a new section. /// public class NewSectionResponse { @@ -212,7 +212,7 @@ public class NewSectionResponse } /// - /// Item in An array of objects, each representing a specific section. + /// The fields included in a section. /// public class SectionResponse { @@ -276,7 +276,7 @@ public class ParentNotebook } /// - /// Response for When a new section group is created + /// Response for a new section group. /// public class NewSectionGroupResponse { @@ -286,7 +286,7 @@ public class NewSectionGroupResponse } /// - /// Item in An array of objects, each representing a specific section group. + /// The fields included in a section group. /// public class SectionGroupResponse { @@ -324,7 +324,7 @@ public class SectionGroupResponse } /// - /// Response for When a new page is created in a section + /// Response for a new page. /// public class NewPageResponse { diff --git a/src/Azure.Connectors.Sdk/Generated/OutlookExtensions.cs b/src/Azure.Connectors.Sdk/Generated/OutlookExtensions.cs index 46d4ac7..9e2463f 100644 --- a/src/Azure.Connectors.Sdk/Generated/OutlookExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/OutlookExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Outlook.Models #region Types /// - /// Response for Get email + /// Receive Email Message /// public class ClientReceiveMessage { @@ -104,7 +104,7 @@ public class ClientReceiveMessage } /// - /// Item in The file attachments for the message + /// File Attachment /// public class ClientReceiveFileAttachment { @@ -143,7 +143,7 @@ public class ClientReceiveFileAttachment } /// - /// Response for Move email + /// Receive Email Message /// public class ClientReceiveMessageStringEnums { @@ -217,7 +217,7 @@ public class ClientReceiveMessageStringEnums } /// - /// Response for Send email with options + /// Base response model that connector returns to LA engine /// public class SubscriptionResponse { @@ -239,7 +239,7 @@ public class SubscriptionResponse } /// - /// Response for Get calendars + /// Entity list response /// public class EntityListResponseTable { @@ -249,7 +249,7 @@ public class EntityListResponseTable } /// - /// Item in List of values + /// Represents a table. /// public class Table { @@ -268,7 +268,7 @@ public class Table } /// - /// Response for Get contacts + /// Entity list response /// public class EntityListResponseContactResponse { @@ -278,7 +278,7 @@ public class EntityListResponseContactResponse } /// - /// Item in List of values + /// Contact response /// public class ContactResponse { @@ -466,7 +466,7 @@ public class PhysicalAddress } /// - /// Response for Get event (V2) + /// Connector specific calendar event model class for the client /// public class CalendarEventClientReceiveStringEnums { @@ -587,7 +587,7 @@ public class CalendarEventClientReceiveStringEnums } /// - /// Response for Get events (V3) + /// The list of calendar items /// public class CalendarEventListClientReceive { @@ -597,7 +597,7 @@ public class CalendarEventListClientReceive } /// - /// Item in List of calendar items + /// Connector specific calendar event model class for the client /// public class CalendarEventClientReceive { @@ -718,7 +718,7 @@ public class CalendarEventClientReceive } /// - /// Response for When an event is added, updated or deleted (V2) + /// The list of calendar items with action type /// public class CalendarEventListWithActionType { @@ -728,7 +728,7 @@ public class CalendarEventListWithActionType } /// - /// Item in List of calendar items + /// Calendar event model with action type /// public class CalendarEventClientWithActionType { @@ -861,7 +861,7 @@ public class CalendarEventClientWithActionType } /// - /// Response for Get emails (V2) + /// Represents a wrapper object for batch response /// public class BatchResponseClientReceiveMessage { @@ -872,7 +872,7 @@ public class BatchResponseClientReceiveMessage } /// - /// Response for Get calendar view of events (V2) + /// Entity list response /// public class EntityListResponseCalendarEventClientReceiveStringEnums { @@ -882,7 +882,7 @@ public class EntityListResponseCalendarEventClientReceiveStringEnums } /// - /// Response for When an email is flagged (V2) + /// Represents a wrapper object for batch trigger response /// public class TriggerBatchResponseClientReceiveMessage { @@ -892,7 +892,7 @@ public class TriggerBatchResponseClientReceiveMessage } /// - /// ClientSendAttachment + /// Attachment /// public class ClientSendAttachment { @@ -906,7 +906,7 @@ public class ClientSendAttachment } /// - /// ClientSendHtmlMessage + /// Send HTML Email Message /// public class ClientSendHtmlMessage { @@ -948,7 +948,7 @@ public class ClientSendHtmlMessage } /// - /// ReplyHtmlMessage + /// Properties of an HTML email reply message. /// public class ReplyHtmlMessage { @@ -986,7 +986,7 @@ public class ReplyHtmlMessage } /// - /// OptionsEmailSubscription + /// Model for Options Email Subscription /// public class OptionsEmailSubscription { @@ -1000,7 +1000,7 @@ public class OptionsEmailSubscription } /// - /// Message + /// User Options Email Message. This is the message expected as part of user input /// public class MessageWithOptions { @@ -1050,7 +1050,7 @@ public class MessageWithOptions } /// - /// ApprovalEmailSubscription + /// Model for Approval Email Subscription /// public class ApprovalEmailSubscription { @@ -1064,7 +1064,7 @@ public class ApprovalEmailSubscription } /// - /// Message + /// Approval Email Message. This is the message expected as part of user input /// public class ApprovalMessage { @@ -1114,7 +1114,7 @@ public class ApprovalMessage } /// - /// CalendarEventHtmlClient + /// Connector specific calendar event model class for the html client /// public class CalendarEventHtmlClient { @@ -1336,7 +1336,7 @@ public class Contact } /// - /// ResponseToEventInvite + /// Response to an event invite /// public class ResponseToEventInvite { @@ -1350,7 +1350,7 @@ public class ResponseToEventInvite } /// - /// DirectForwardMessage + /// Directly forward message /// public class DirectForwardMessage { @@ -3151,6 +3151,13 @@ public static class OutlookTriggerParameters /// public static class OnCalendarGetOnChangedItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables. + /// + public const string Table = "table"; + /// /// Number of incoming days in calendar to be tracked /// Default: 300. @@ -3170,6 +3177,13 @@ public static class OnCalendarGetOnChangedItems /// public static class OnCalendarGetOnNewItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// @@ -3197,6 +3211,13 @@ public static class OnCalendarGetOnNewItems /// public static class OnCalendarGetOnUpdatedItems { + /// + /// Select a calendar + /// Required. + /// Dynamic values from: CalendarGetTables. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// diff --git a/src/Azure.Connectors.Sdk/Generated/PdfCoExtensions.cs b/src/Azure.Connectors.Sdk/Generated/PdfCoExtensions.cs index 2fa8ae6..18e001c 100644 --- a/src/Azure.Connectors.Sdk/Generated/PdfCoExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/PdfCoExtensions.cs @@ -645,7 +645,7 @@ public class PDFSerarchTextInput /// /// Response for PDF Search Text /// - public class PDFSerarchTextResponse + public class PDFSearchTextResponse { /// body [JsonPropertyName("body")] @@ -5212,9 +5212,9 @@ public static PDFSerarchTextInput PDFSerarchTextInput( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static PDFSerarchTextResponse PDFSerarchTextResponse( + public static PDFSearchTextResponse PDFSearchTextResponse( List body = default, string url = default, string jobId = default, @@ -5226,7 +5226,7 @@ public static PDFSerarchTextResponse PDFSerarchTextResponse( int? remainingCredits = default, int? duration = default) { - return new PDFSerarchTextResponse + return new PDFSearchTextResponse { Body = body, Url = url, @@ -7893,14 +7893,14 @@ public virtual async Task SplitPdf2Async(SplitPdf2Input input /// The request body. /// Cancellation token. /// The PDF Search Text response. - public virtual async Task PDFSerarchTextAsync(PDFSerarchTextInput input, CancellationToken cancellationToken = default) + public virtual async Task PDFSerarchTextAsync(PDFSerarchTextInput input, CancellationToken cancellationToken = default) { using var activity = PdfCoClient.ConnectorActivitySource.StartActivity("PdfCoClient.PDFSerarchTextAsync"); try { var path = $"/v1/pdf/find"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/PipedriveExtensions.cs b/src/Azure.Connectors.Sdk/Generated/PipedriveExtensions.cs index 4119c68..9d5602c 100644 --- a/src/Azure.Connectors.Sdk/Generated/PipedriveExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/PipedriveExtensions.cs @@ -314,6 +314,172 @@ public class StageResponse public string StageName { get; set; } } + /// + /// Response for Add deal (V2) + /// + public class DealResponseV2 + { + /// Id of the deal. + [JsonPropertyName("id")] + public int? DealId { get; set; } + + /// creator_user_id + [JsonPropertyName("creator_user_id")] + public JsonElement? Creator { get; set; } + + /// user_id + [JsonPropertyName("user_id")] + public JsonElement? User { get; set; } + + /// person_id + [JsonPropertyName("person_id")] + public JsonElement? Contact { get; set; } + + /// org_id + [JsonPropertyName("org_id")] + public JsonElement? Organization { get; set; } + + /// Open, won, lost or deleted. + [JsonPropertyName("status")] + public string Status { get; set; } + + /// Title of the deal. + [JsonPropertyName("title")] + public string DealTitle { get; set; } + + /// Monetary value of the deal. + [JsonPropertyName("value")] + public double? DealValue { get; set; } + + /// Currency associated with the deal value. + [JsonPropertyName("currency")] + public string Currency { get; set; } + + /// yyyy-MM-ddTHH:mm:ss.fffZ + [JsonPropertyName("add_time")] + [JsonInclude] + public DateTime? CreatedDateTime { get; init; } + + /// yyyy-MM-ddTHH:mm:ss.fffZ + [JsonPropertyName("update_time")] + [JsonInclude] + public DateTime? UpdatedDateTime { get; init; } + + /// ID of stage the deal is placed in a pipeline. + [JsonPropertyName("stage_id")] + public int? StageId { get; set; } + + /// yyyy-MM-ddTHH:mm:ss.fffZ + [JsonPropertyName("stage_change_time")] + [JsonInclude] + public DateTime? StageUpdatedDateTime { get; init; } + + /// True if the deal is active. + [JsonPropertyName("active")] + public bool? IsActive { get; set; } + + /// True if the deal has been deleted. + [JsonPropertyName("deleted")] + public bool? IsDeleted { get; set; } + + /// yyyy-MM-dd + [JsonPropertyName("next_activity_date")] + public string NextActivityDate { get; set; } + + /// yyyy-MM-ddTHH:mm:ss.fffZ + [JsonPropertyName("next_activity_time")] + public string NextActivityTime { get; set; } + + /// Id of the next activity. + [JsonPropertyName("next_activity_id")] + public int? NextActivityId { get; set; } + + /// Id of the last activity. + [JsonPropertyName("last_activity_id")] + public int? LastActivityId { get; set; } + + /// yyyy-MM-dd + [JsonPropertyName("last_activity_date")] + public string LastActivityDate { get; set; } + + /// Message about why the deal was lost (to be used when status=lost). + [JsonPropertyName("lost_reason")] + public string LostReason { get; set; } + + /// Owner, followers or entire company. + [JsonPropertyName("visible_to")] + public string Visibility { get; set; } + + /// yyyy-MM-ddTHH:mm:ss.fffZ + [JsonPropertyName("close_time")] + [JsonInclude] + public DateTime? ClosedDateTime { get; init; } + + /// Id of pipeline the deal is associated with. + [JsonPropertyName("pipeline_id")] + public int? PipelineId { get; set; } + + /// Number of products associated with the deal. + [JsonPropertyName("products_count")] + public int? ProductsCount { get; set; } + + /// Number of files associated with the deal. + [JsonPropertyName("files_count")] + public int? FilesCount { get; set; } + + /// Number of notes associated with the deal. + [JsonPropertyName("notes_count")] + public int? NotesCount { get; set; } + + /// Number of followers associated with the deal. + [JsonPropertyName("followers_count")] + public int? FollowersCount { get; set; } + + /// Number of email messages associated with the deal. + [JsonPropertyName("email_messages_count")] + public int? EmailMessageCount { get; set; } + + /// Number of activities associated with the deal. + [JsonPropertyName("activities_count")] + public int? ActivitiesCount { get; set; } + + /// Number of done activities associated with the deal. + [JsonPropertyName("done_activities_count")] + public int? DoneActivitiesCount { get; set; } + + /// Number of undone activities associated with the deals. + [JsonPropertyName("undone_activities_count")] + public int? UndoneActivitiesCount { get; set; } + + /// Number of referenced activities associated with the deal. + [JsonPropertyName("reference_activities_count")] + public int? ReferencedActivitiesCount { get; set; } + + /// Number of participants associated with the deal. + [JsonPropertyName("participants_count")] + public int? ParticipantsCount { get; set; } + + /// yyyy-MM-dd + [JsonPropertyName("expected_close_date")] + public string ExpectedCloseDate { get; set; } + + /// Subject of next activity associated with the deal. + [JsonPropertyName("next_activity_subject")] + public string NextActivitySubject { get; set; } + + /// Type of next activity associated with the deal. + [JsonPropertyName("next_activity_type")] + public string NextActivityType { get; set; } + + /// Duration of next activity associated with the deal. + [JsonPropertyName("next_activity_duration")] + public string NextActivityDuration { get; set; } + + /// Notes for next activity associated with the deal + [JsonPropertyName("next_activity_note")] + public string NextActivityNote { get; set; } + } + /// /// Response for List deals /// @@ -671,6 +837,94 @@ public static StageResponse StageResponse( }; } + /// + /// Creates a new instance of . + /// + public static DealResponseV2 DealResponseV2( + int? dealId = default, + JsonElement? creator = default, + JsonElement? user = default, + JsonElement? contact = default, + JsonElement? organization = default, + string status = default, + string dealTitle = default, + double? dealValue = default, + string currency = default, + DateTime? createdDateTime = default, + DateTime? updatedDateTime = default, + int? stageId = default, + DateTime? stageUpdatedDateTime = default, + bool? isActive = default, + bool? isDeleted = default, + string nextActivityDate = default, + string nextActivityTime = default, + int? nextActivityId = default, + int? lastActivityId = default, + string lastActivityDate = default, + string lostReason = default, + string visibility = default, + DateTime? closedDateTime = default, + int? pipelineId = default, + int? productsCount = default, + int? filesCount = default, + int? notesCount = default, + int? followersCount = default, + int? emailMessageCount = default, + int? activitiesCount = default, + int? doneActivitiesCount = default, + int? undoneActivitiesCount = default, + int? referencedActivitiesCount = default, + int? participantsCount = default, + string expectedCloseDate = default, + string nextActivitySubject = default, + string nextActivityType = default, + string nextActivityDuration = default, + string nextActivityNote = default) + { + return new DealResponseV2 + { + DealId = dealId, + Creator = creator, + User = user, + Contact = contact, + Organization = organization, + Status = status, + DealTitle = dealTitle, + DealValue = dealValue, + Currency = currency, + CreatedDateTime = createdDateTime, + UpdatedDateTime = updatedDateTime, + StageId = stageId, + StageUpdatedDateTime = stageUpdatedDateTime, + IsActive = isActive, + IsDeleted = isDeleted, + NextActivityDate = nextActivityDate, + NextActivityTime = nextActivityTime, + NextActivityId = nextActivityId, + LastActivityId = lastActivityId, + LastActivityDate = lastActivityDate, + LostReason = lostReason, + Visibility = visibility, + ClosedDateTime = closedDateTime, + PipelineId = pipelineId, + ProductsCount = productsCount, + FilesCount = filesCount, + NotesCount = notesCount, + FollowersCount = followersCount, + EmailMessageCount = emailMessageCount, + ActivitiesCount = activitiesCount, + DoneActivitiesCount = doneActivitiesCount, + UndoneActivitiesCount = undoneActivitiesCount, + ReferencedActivitiesCount = referencedActivitiesCount, + ParticipantsCount = participantsCount, + ExpectedCloseDate = expectedCloseDate, + NextActivitySubject = nextActivitySubject, + NextActivityType = nextActivityType, + NextActivityDuration = nextActivityDuration, + NextActivityNote = nextActivityNote, + }; + } + /// /// Creates a new instance of . /// @@ -790,7 +1044,7 @@ public class PipedriveOnTrigNewActivityTriggerPayload : TriggerCallbackPayloadJsonSerializer.Deserialize<PipedriveOnTrigNewDealTriggerPayload>(body). /// - public class PipedriveOnTrigNewDealTriggerPayload : TriggerCallbackPayload + public class PipedriveOnTrigNewDealTriggerPayload : TriggerCallbackPayload { } @@ -1021,14 +1275,14 @@ public virtual async Task GetStageAsync(int stageId, Cancellation /// The request body. /// Cancellation token. /// The Add deal (V2) response. - public virtual async Task AddDealAsync(AddDealRequest input, CancellationToken cancellationToken = default) + public virtual async Task AddDealAsync(AddDealRequest input, CancellationToken cancellationToken = default) { using var activity = PipedriveClient.ConnectorActivitySource.StartActivity("PipedriveClient.AddDealAsync"); try { var path = $"/connector-v2/v1/deals"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1047,14 +1301,14 @@ public virtual async Task AddDealAsync(AddDealRequest input, Cance /// The request body. /// Cancellation token. /// The Update deal stage (V2) response. - public virtual async Task UpdateDealStageAsync([DynamicValues("ListDeals")] int dealId, UpdateDealStageRequest input, CancellationToken cancellationToken = default) + public virtual async Task UpdateDealStageAsync([DynamicValues("ListDeals")] int dealId, UpdateDealStageRequest input, CancellationToken cancellationToken = default) { using var activity = PipedriveClient.ConnectorActivitySource.StartActivity("PipedriveClient.UpdateDealStageAsync"); try { var path = $"/connector-v2/update_stage_deal/v1/deals/{Uri.EscapeDataString(dealId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Put, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/PlannerExtensions.cs b/src/Azure.Connectors.Sdk/Generated/PlannerExtensions.cs index 69c914d..9ae757d 100644 --- a/src/Azure.Connectors.Sdk/Generated/PlannerExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/PlannerExtensions.cs @@ -43,7 +43,7 @@ public class UnassignUsersInput /// /// Response for Remove assignees from a task /// - public class GetTaskResponse + public class GetTaskResponseV2 { /// createdBy [JsonPropertyName("createdBy")] @@ -107,7 +107,7 @@ public class GetTaskResponse } /// - /// appliedCategories + /// The categories to which the task has been applied. /// public class AppliedCategories { @@ -232,16 +232,6 @@ public class ListMyPlansResponse public List Value { get; set; } } - /// - /// Response for List groups that I am member of - /// - public class ListGroupsResponse - { - /// value - [JsonPropertyName("value")] - public List Value { get; set; } - } - /// /// Response for Get plan details /// @@ -296,6 +286,76 @@ public class CreateBucketResponse public string Id { get; set; } } + /// + /// Response for Create a task + /// + public class GetTaskResponseV3 + { + /// createdBy + [JsonPropertyName("createdBy")] + public JsonElement? CreatedBy { get; set; } + + /// The id of the plan this task belongs to. + [JsonPropertyName("planId")] + public string PlanId { get; set; } + + /// The id of the bucket this task belongs to. + [JsonPropertyName("bucketId")] + public string BucketId { get; set; } + + /// The title of the task. + [JsonPropertyName("title")] + public string Title { get; set; } + + /// The completion percentage of the task. + [JsonPropertyName("percentComplete")] + public int? PercentComplete { get; set; } + + /// The start datetime of the task. + [JsonPropertyName("startDateTime")] + [JsonInclude] + public DateTime? StartDateTime { get; init; } + + /// The datetime the task was created. + [JsonPropertyName("createdDateTime")] + [JsonInclude] + public DateTime? CreatedDateTime { get; init; } + + /// The datetime the task is due. + [JsonPropertyName("dueDateTime")] + [JsonInclude] + public DateTime? DueDateTime { get; init; } + + /// Set to true if the task has a description. + [JsonPropertyName("hasDescription")] + public bool? HasDescription { get; set; } + + /// The datetime the task was completed. + [JsonPropertyName("completedDateTime")] + [JsonInclude] + public DateTime? CompletedDateTime { get; init; } + + /// The number of external references that exist on the task. + [JsonPropertyName("referenceCount")] + public int? ReferenceCount { get; set; } + + /// The id of the task. + [JsonPropertyName("id")] + public string Id { get; set; } + + /// appliedCategories + [JsonPropertyName("appliedCategories")] + public AppliedCategories AppliedCategories { get; set; } + + /// Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as "urgent", 2 and 3 and 4 as "important", 5, 6, and 7 as "medium", and 8, 9, and 10 as "low". Currently, Planner sets the value 1 for "urgent", 3 for "important", 5 for "medium", and 9 for "low". + [JsonPropertyName("priority")] + public int? Priority { get; set; } + + /// _assignments + [JsonPropertyName("_assignments")] + public List Assignments { get; set; } + } + /// /// Response for Get task details /// @@ -331,17 +391,27 @@ public class ListBucketsResponse /// /// Response for List my tasks /// - public class ListTasksResponse : IPageable + public class ListTasksResponse : IPageable { /// value [JsonPropertyName("value")] - public List Value { get; set; } + public List Value { get; set; } /// Link to get next page of results [JsonPropertyName("@odata.nextLink")] public string NextLink { get; set; } } + /// + /// Response for List groups that I am member of + /// + public class ListGroupsResponse + { + /// value + [JsonPropertyName("value")] + public List Value { get; set; } + } + /// /// UpdateTaskDetails_Request /// @@ -460,9 +530,9 @@ public static UnassignUsersInput UnassignUsersInput( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetTaskResponse GetTaskResponse( + public static GetTaskResponseV2 GetTaskResponseV2( JsonElement? createdBy = default, string planId = default, string bucketId = default, @@ -478,7 +548,7 @@ public static GetTaskResponse GetTaskResponse( AppliedCategories appliedCategories = default, List assignments = default) { - return new GetTaskResponse + return new GetTaskResponseV2 { CreatedBy = createdBy, PlanId = planId, @@ -581,18 +651,6 @@ public static ListMyPlansResponse ListMyPlansResponse( }; } - /// - /// Creates a new instance of . - /// - public static ListGroupsResponse ListGroupsResponse( - List value = default) - { - return new ListGroupsResponse - { - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -641,6 +699,46 @@ public static CreateBucketResponse CreateBucketResponse( }; } + /// + /// Creates a new instance of . + /// + public static GetTaskResponseV3 GetTaskResponseV3( + JsonElement? createdBy = default, + string planId = default, + string bucketId = default, + string title = default, + int? percentComplete = default, + DateTime? startDateTime = default, + DateTime? createdDateTime = default, + DateTime? dueDateTime = default, + bool? hasDescription = default, + DateTime? completedDateTime = default, + int? referenceCount = default, + string id = default, + AppliedCategories appliedCategories = default, + int? priority = default, + List assignments = default) + { + return new GetTaskResponseV3 + { + CreatedBy = createdBy, + PlanId = planId, + BucketId = bucketId, + Title = title, + PercentComplete = percentComplete, + StartDateTime = startDateTime, + CreatedDateTime = createdDateTime, + DueDateTime = dueDateTime, + HasDescription = hasDescription, + CompletedDateTime = completedDateTime, + ReferenceCount = referenceCount, + Id = id, + AppliedCategories = appliedCategories, + Priority = priority, + Assignments = assignments, + }; + } + /// /// Creates a new instance of . /// @@ -675,7 +773,7 @@ public static ListBucketsResponse ListBucketsResponse( /// Creates a new instance of . /// public static ListTasksResponse ListTasksResponse( - List value = default, + List value = default, string nextLink = default) { return new ListTasksResponse @@ -685,6 +783,18 @@ public static ListTasksResponse ListTasksResponse( }; } + /// + /// Creates a new instance of . + /// + public static ListGroupsResponse ListGroupsResponse( + List value = default) + { + return new ListGroupsResponse + { + Value = value, + }; + } + /// /// Creates a new instance of . /// @@ -760,7 +870,7 @@ public static CreateTaskRequest CreateTaskRequest( /// Typed trigger payload for the OnCompleteTask trigger (Planner "When a task is completed", operationId: OnCompleteTask_V3). /// Deserialize Connector Namespace callbacks directly: JsonSerializer.Deserialize<PlannerOnCompleteTaskTriggerPayload>(body). /// - public class PlannerOnCompleteTaskTriggerPayload : TriggerCallbackPayload + public class PlannerOnCompleteTaskTriggerPayload : TriggerCallbackPayload { } @@ -768,7 +878,7 @@ public class PlannerOnCompleteTaskTriggerPayload : TriggerCallbackPayloadJsonSerializer.Deserialize<PlannerOnNewTaskTriggerPayload>(body). /// - public class PlannerOnNewTaskTriggerPayload : TriggerCallbackPayload + public class PlannerOnNewTaskTriggerPayload : TriggerCallbackPayload { } @@ -776,7 +886,7 @@ public class PlannerOnNewTaskTriggerPayload : TriggerCallbackPayloadJsonSerializer.Deserialize<PlannerOnTaskAssignedToMeTriggerPayload>(body). /// - public class PlannerOnTaskAssignedToMeTriggerPayload : TriggerCallbackPayload + public class PlannerOnTaskAssignedToMeTriggerPayload : TriggerCallbackPayload { } @@ -860,6 +970,13 @@ public static class OnCompleteTask /// public const string GroupId = "groupId"; + /// + /// The unique identifier of the plan. + /// Required. + /// Dynamic values from: ListGroupPlans. + /// + public const string Id = "id"; + } /// @@ -874,6 +991,13 @@ public static class OnNewTask /// public const string GroupId = "groupId"; + /// + /// The unique identifier of the plan. + /// Required. + /// Dynamic values from: ListGroupPlans. + /// + public const string Id = "id"; + } } @@ -980,7 +1104,7 @@ await this /// The request body. /// Cancellation token. /// The Remove assignees from a task response. - public virtual async Task UnassignUsersAsync([DynamicValues("ListMyTasks_V2")] string taskId, UnassignUsersInput input, CancellationToken cancellationToken = default) + public virtual async Task UnassignUsersAsync([DynamicValues("ListMyTasks_V2")] string taskId, UnassignUsersInput input, CancellationToken cancellationToken = default) { using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.UnassignUsersAsync"); try @@ -989,7 +1113,7 @@ public virtual async Task UnassignUsersAsync([DynamicValues("Li throw new ArgumentNullException(nameof(taskId)); var path = $"/v1.0/planner/tasks/{Uri.EscapeDataString(taskId.ToString())}/unassignusers"; return await this - .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1008,7 +1132,7 @@ public virtual async Task UnassignUsersAsync([DynamicValues("Li /// The request body. /// Cancellation token. /// The Add assignees to a task response. - public virtual async Task AssignUsersAsync([DynamicValues("ListMyTasks_V2")] string taskId, AssignUsersInput input, CancellationToken cancellationToken = default) + public virtual async Task AssignUsersAsync([DynamicValues("ListMyTasks_V2")] string taskId, AssignUsersInput input, CancellationToken cancellationToken = default) { using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.AssignUsersAsync"); try @@ -1017,7 +1141,7 @@ public virtual async Task AssignUsersAsync([DynamicValues("List throw new ArgumentNullException(nameof(taskId)); var path = $"/v1.0/planner/tasks/{Uri.EscapeDataString(taskId.ToString())}/assignusers"; return await this - .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1055,30 +1179,6 @@ public virtual async Task ListGroupPlansAsync([DynamicValue } } - /// - /// List groups that I am member of - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List groups that I am member of response. - public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) - { - using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.ListGroupsAsync"); - try - { - var path = $"/v1.0/me/memberOf"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get plan details /// @@ -1138,14 +1238,14 @@ public virtual async Task CreateBucketAsync(CreateBucketIn /// The request body. /// Cancellation token. /// The Create a task response. - public virtual async Task CreateTaskAsync(CreateTaskRequest input, CancellationToken cancellationToken = default) + public virtual async Task CreateTaskAsync(CreateTaskRequest input, CancellationToken cancellationToken = default) { using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.CreateTaskAsync"); try { var path = $"/v2/beta/planner/tasks"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1163,7 +1263,7 @@ public virtual async Task CreateTaskAsync(CreateTaskRequest inp /// Task Id /// Cancellation token. /// The Get a task response. - public virtual async Task GetTaskAsync([DynamicValues("ListMyTasks_V2")] string taskId, CancellationToken cancellationToken = default) + public virtual async Task GetTaskAsync([DynamicValues("ListMyTasks_V2")] string taskId, CancellationToken cancellationToken = default) { using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.GetTaskAsync"); try @@ -1172,7 +1272,7 @@ public virtual async Task GetTaskAsync([DynamicValues("ListMyTa throw new ArgumentNullException(nameof(taskId)); var path = $"/v1.0/planner/tasks/{Uri.EscapeDataString(taskId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1247,11 +1347,11 @@ public virtual async Task ListBucketsAsync([DynamicValues(" /// /// List the tasks assigned to me. /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ListMyTasksAsync(CancellationToken cancellationToken = default) + /// An async enumerable of items across all pages. + public virtual AsyncPageable ListMyTasksAsync(CancellationToken cancellationToken = default) { var path = $"/v1.0/me/planner/tasks"; - return this.CreatePageable( + return this.CreatePageable( ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), cancellationToken); @@ -1264,8 +1364,8 @@ public virtual AsyncPageable ListMyTasksAsync(CancellationToken /// Plan Id /// Group Id /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable ListTasksAsync([DynamicValues("ListGroupPlans")] string planId, [DynamicValues("ListGroups")] string groupId, CancellationToken cancellationToken = default) + /// An async enumerable of items across all pages. + public virtual AsyncPageable ListTasksAsync([DynamicValues("ListGroupPlans")] string planId, [DynamicValues("ListGroups")] string groupId, CancellationToken cancellationToken = default) { if (planId is null) throw new ArgumentNullException(nameof(planId)); @@ -1274,7 +1374,7 @@ public virtual AsyncPageable ListTasksAsync([DynamicValues("Lis throw new ArgumentNullException(nameof(groupId)); queryParams.Add($"groupId={Uri.EscapeDataString(groupId.ToString())}"); var path = $"/v2/v1.0/planner/plans/{Uri.EscapeDataString(planId.ToString())}/tasks" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( + return this.CreatePageable( ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), cancellationToken); @@ -1288,7 +1388,7 @@ public virtual AsyncPageable ListTasksAsync([DynamicValues("Lis /// The request body. /// Cancellation token. /// The Update a task (V2) response. - public virtual async Task UpdateTaskAsync([DynamicValues("ListMyTasks_V2")] string taskId, UpdateTaskRequest input, CancellationToken cancellationToken = default) + public virtual async Task UpdateTaskAsync([DynamicValues("ListMyTasks_V2")] string taskId, UpdateTaskRequest input, CancellationToken cancellationToken = default) { using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.UpdateTaskAsync"); try @@ -1297,7 +1397,7 @@ public virtual async Task UpdateTaskAsync([DynamicValues("ListM throw new ArgumentNullException(nameof(taskId)); var path = $"/v2/v1.0/planner/tasks/{Uri.EscapeDataString(taskId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -1336,6 +1436,30 @@ public virtual async Task UpdateTaskDetailsAsync([Dynami } } + /// + /// List groups that I am member of + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List groups that I am member of response. + public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) + { + using var activity = PlannerClient.ConnectorActivitySource.StartActivity("PlannerClient.ListGroupsAsync"); + try + { + var path = $"/v1.0/me/memberOf"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/PowerBIExtensions.cs b/src/Azure.Connectors.Sdk/Generated/PowerBIExtensions.cs index 1b51ac1..9c2de95 100644 --- a/src/Azure.Connectors.Sdk/Generated/PowerBIExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/PowerBIExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.PowerBI.Models #region Types /// - /// Response for Get scorecards + /// Entire response body. /// public class ListedScorecards { @@ -39,7 +39,7 @@ public class ListedScorecards } /// - /// Item in The list of scorecards. + /// Scorecard. /// public class ListedScorecard { @@ -57,7 +57,7 @@ public class ListedScorecard } /// - /// Response for Create a scorecard + /// Created scorecard. /// public class CreatedScorecard { @@ -67,7 +67,7 @@ public class CreatedScorecard } /// - /// Response for Get multiple goals + /// Entire response body. /// public class FetchedGoals { @@ -77,7 +77,7 @@ public class FetchedGoals } /// - /// Item in The list of the goals. + /// Goal information. /// public class FetchedGoal { @@ -142,7 +142,7 @@ public class FetchedGoal } /// - /// Response for Create a goal + /// Created goal. /// public class CreateGoalResponse { @@ -152,7 +152,7 @@ public class CreateGoalResponse } /// - /// Response for When someone assigns a new owner to a goal + /// Assigned goals info. /// public class GoalsAssigned { @@ -162,7 +162,7 @@ public class GoalsAssigned } /// - /// Response for When a goal changes + /// Changed goal properties. /// public class GoalChanged { @@ -256,7 +256,7 @@ public class GoalChanged } /// - /// Response for When status of a goal changes + /// Changed goal properties. /// public class GoalStatusChanged { @@ -274,7 +274,7 @@ public class GoalStatusChanged } /// - /// Response for When current value of a goal changes + /// Changed goal properties. /// public class GoalValueChanged { @@ -292,7 +292,7 @@ public class GoalValueChanged } /// - /// Response for When a data refresh for a goal fails + /// Goal refresh failure issues. /// public class GoalRefreshIssues { @@ -302,7 +302,7 @@ public class GoalRefreshIssues } /// - /// Item in Goal refresh issues. + /// Goal refresh issue. /// public class GoalRefreshIssue { @@ -321,7 +321,7 @@ public class GoalRefreshIssue } /// - /// Response for When someone adds or edits a goal check-in + /// Added or changed goal check-ins or notes. /// public class GoalValueOrNoteUpserted { @@ -334,24 +334,6 @@ public class GoalValueOrNoteUpserted public List Notes { get; set; } } - /// - /// Response for Get alerts from Power BI - /// - public class Alert - { - /// The ID of the alert. - [JsonPropertyName("alertId")] - public string AlertId { get; set; } - - /// The title of the alert. - [JsonPropertyName("alertTitle")] - public string AlertTitle { get; set; } - - /// The ID of the group. - [JsonPropertyName("groupId")] - public string GroupId { get; set; } - } - /// /// Response for When a data driven alert is triggered /// @@ -379,7 +361,7 @@ public class EvaluatedAlert } /// - /// Response for Run a query against a dataset + /// Results of query execution. /// public class QueryExecutionResults { @@ -412,6 +394,38 @@ public class ExecuteDatasetQueriesJsonResponse public Dictionary AdditionalProperties { get; set; } = new(); } + /// + /// Entire response body. + /// + public class GetGoalCheckinsResponse + { + /// List of check-ins. + [JsonPropertyName("value")] + public List CheckIns { get; set; } + } + + /// + /// Goal check-in + /// + public class GetGoalCheckinResponse + { + /// The date that the check-in was made. + [JsonPropertyName("timestamp")] + public DateTime? Date { get; set; } + + /// The value at the time of check in, if set. + [JsonPropertyName("value")] + public double? Value { get; set; } + + /// The goal status at the time of check in. + [JsonPropertyName("status")] + public string Status { get; set; } + + /// notes + [JsonPropertyName("notes")] + public List Notes { get; set; } + } + /// /// Response for ListGroups /// @@ -422,6 +436,24 @@ public class Groups public List Value { get; set; } } + /// + /// Response for Get alerts from Power BI + /// + public class Alert + { + /// The ID of the alert. + [JsonPropertyName("alertId")] + public string AlertId { get; set; } + + /// The title of the alert. + [JsonPropertyName("alertTitle")] + public string AlertTitle { get; set; } + + /// The ID of the group. + [JsonPropertyName("groupId")] + public string GroupId { get; set; } + } + /// /// Response for ListDatasets /// @@ -443,49 +475,31 @@ public class Tables } /// - /// Response for GetColumns + /// OData response wrapper for a Power BI report collection /// - public class Columns + public class Reports { - /// schema - [JsonPropertyName("schema")] - public JsonElement? Schema { get; set; } - } + /// OData context + [JsonPropertyName("odata.context")] + public string OdataContext { get; set; } - /// - /// Response for Get goal check-ins - /// - public class GetGoalCheckinsResponse - { - /// List of check-ins. + /// The report collection [JsonPropertyName("value")] - public List CheckIns { get; set; } + public List Value { get; set; } } /// - /// Response for Get a goal check-in + /// Response for GetColumns /// - public class GetGoalCheckinResponse + public class Columns { - /// The date that the check-in was made. - [JsonPropertyName("timestamp")] - public DateTime? Date { get; set; } - - /// The value at the time of check in, if set. - [JsonPropertyName("value")] - public double? Value { get; set; } - - /// The goal status at the time of check in. - [JsonPropertyName("status")] - public string Status { get; set; } - - /// notes - [JsonPropertyName("notes")] - public List Notes { get; set; } + /// schema + [JsonPropertyName("schema")] + public JsonElement? Schema { get; set; } } /// - /// Response for Get PowerBi Button Clicked hybrid trigger output + /// Tokens coming from Power Bi input data /// public class PowerBiButtonClickedOutputs { @@ -495,21 +509,7 @@ public class PowerBiButtonClickedOutputs } /// - /// Response for Get Reports in Group - /// - public class Reports - { - /// OData context - [JsonPropertyName("odata.context")] - public string OdataContext { get; set; } - - /// The report collection - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// QuerySpecification + /// Query specification. /// public class QuerySpecification { @@ -527,7 +527,7 @@ public class QuerySpecification } /// - /// CreateScorecardRequest + /// Scorecard definition. /// public class CreateScorecardRequest { @@ -541,7 +541,7 @@ public class CreateScorecardRequest } /// - /// CreateGoalRequest + /// Goal definition. /// public class CreateGoalRequest { @@ -583,7 +583,7 @@ public class CreateGoalRequest } /// - /// UpdateGoalRequest + /// Goal definition. /// public class UpdateGoalRequest { @@ -617,7 +617,7 @@ public class UpdateGoalRequest } /// - /// GoalValueCheckinRequest + /// Goal check-in definition. /// public class GoalValueCheckinRequest { @@ -639,7 +639,7 @@ public class GoalValueCheckinRequest } /// - /// GoalValueCheckinUpdateRequest + /// Goal check-in definition. /// public class GoalValueCheckinUpdateRequest { @@ -695,7 +695,7 @@ public class ExportPayloadPaginatedReport } /// - /// ExportReportSettings + /// Export to file request settings /// public class ExportReportSettings { @@ -709,7 +709,7 @@ public class ExportReportSettings } /// - /// PageBookmark + /// The bookmark to apply on a single page. Provide name or state, but not both. /// public class PageBookmark { @@ -723,7 +723,7 @@ public class PageBookmark } /// - /// ExportFilter + /// A filter to be applied during the export operation /// public class ExportFilter { @@ -733,7 +733,7 @@ public class ExportFilter } /// - /// ExportReportPage + /// A single page configuration for the export request /// public class ExportReportPage { @@ -751,7 +751,7 @@ public class ExportReportPage } /// - /// EffectiveIdentity + /// Defines the user identity and roles, for more details see this [article](https://docs.microsoft.com/power-bi/developer/embedded-row-level-security) /// public class EffectiveIdentity { @@ -1363,22 +1363,6 @@ public static GoalValueOrNoteUpserted GoalValueOrNoteUpserted( }; } - /// - /// Creates a new instance of . - /// - public static Alert Alert( - string alertId = default, - string alertTitle = default, - string groupId = default) - { - return new Alert - { - AlertId = alertId, - AlertTitle = alertTitle, - GroupId = groupId, - }; - } - /// /// Creates a new instance of . /// @@ -1411,6 +1395,36 @@ public static QueryExecutionResults QueryExecutionResults( }; } + /// + /// Creates a new instance of . + /// + public static GetGoalCheckinsResponse GetGoalCheckinsResponse( + List checkIns = default) + { + return new GetGoalCheckinsResponse + { + CheckIns = checkIns, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetGoalCheckinResponse GetGoalCheckinResponse( + DateTime? date = default, + double? value = default, + string status = default, + List notes = default) + { + return new GetGoalCheckinResponse + { + Date = date, + Value = value, + Status = status, + Notes = notes, + }; + } + /// /// Creates a new instance of . /// @@ -1423,6 +1437,22 @@ public static Groups Groups( }; } + /// + /// Creates a new instance of . + /// + public static Alert Alert( + string alertId = default, + string alertTitle = default, + string groupId = default) + { + return new Alert + { + AlertId = alertId, + AlertTitle = alertTitle, + GroupId = groupId, + }; + } + /// /// Creates a new instance of . /// @@ -1448,44 +1478,28 @@ public static Tables Tables( } /// - /// Creates a new instance of . - /// - public static Columns Columns( - JsonElement? schema = default) - { - return new Columns - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetGoalCheckinsResponse GetGoalCheckinsResponse( - List checkIns = default) + public static Reports Reports( + string odataContext = default, + List value = default) { - return new GetGoalCheckinsResponse + return new Reports { - CheckIns = checkIns, + OdataContext = odataContext, + Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetGoalCheckinResponse GetGoalCheckinResponse( - DateTime? date = default, - double? value = default, - string status = default, - List notes = default) + public static Columns Columns( + JsonElement? schema = default) { - return new GetGoalCheckinResponse + return new Columns { - Date = date, - Value = value, - Status = status, - Notes = notes, + Schema = schema, }; } @@ -1501,20 +1515,6 @@ public static PowerBiButtonClickedOutputs PowerBiButtonClickedOutputs( }; } - /// - /// Creates a new instance of . - /// - public static Reports Reports( - string odataContext = default, - List value = default) - { - return new Reports - { - OdataContext = odataContext, - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -1816,6 +1816,20 @@ public static class PowerBITriggerParameters /// public static class OnGoalsAssignedTrigger { + /// + /// The unique identifier of the workspace. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + /// /// E-mail of an owner. Can be yours. Can be empty when tracking any owner. /// @@ -1841,6 +1855,27 @@ public static class OnGoalsAssignedTrigger /// public static class OnGoalChangeTrigger { + /// + /// The unique identifier of the workspace. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + + /// + /// The unique identifier of the goal. + /// Required. + /// Dynamic values from: GetMultipleGoals. + /// + public const string GoalId = "goalId"; + /// /// Number of seconds between checks for new data. Minimum is 300. /// Required. @@ -1862,9 +1897,30 @@ public static class OnGoalChangeTrigger public static class OnGoalStatusChangeTrigger { /// - /// Number of seconds between checks for new data. Minimum is 300. + /// The unique identifier of the workspace. /// Required. - /// Default: 14400. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + + /// + /// The unique identifier of the goal. + /// Required. + /// Dynamic values from: GetMultipleGoals. + /// + public const string GoalId = "goalId"; + + /// + /// Number of seconds between checks for new data. Minimum is 300. + /// Required. + /// Default: 14400. /// public const string PollingInterval = "pollingInterval"; @@ -1881,6 +1937,27 @@ public static class OnGoalStatusChangeTrigger /// public static class OnGoalValueChangeTrigger { + /// + /// The unique identifier of the workspace. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + + /// + /// The unique identifier of the goal. + /// Required. + /// Dynamic values from: GetMultipleGoals. + /// + public const string GoalId = "goalId"; + /// /// Number of seconds between checks for new data. Minimum is 300. /// Required. @@ -1901,6 +1978,27 @@ public static class OnGoalValueChangeTrigger /// public static class OnGoalRefreshFailedTrigger { + /// + /// The unique identifier of the workspace. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + + /// + /// The unique identifier of the goal. + /// Required. + /// Dynamic values from: GetMultipleGoals. + /// + public const string GoalId = "goalId"; + /// /// Will track the link for the goal's target. /// Required. @@ -1937,6 +2035,27 @@ public static class OnGoalRefreshFailedTrigger /// public static class OnGoalValueOrNoteUpsertTrigger { + /// + /// The unique identifier of the workspace. + /// Required. + /// Dynamic values from: ListGroups. + /// + public const string Groupid = "groupid"; + + /// + /// The unique identifier of the scorecard. + /// Required. + /// Dynamic values from: GetScorecards. + /// + public const string ScorecardId = "scorecardId"; + + /// + /// The unique identifier of the goal. + /// Required. + /// Dynamic values from: GetMultipleGoals. + /// + public const string GoalId = "goalId"; + /// /// Number of seconds between checks for new data. Minimum is 300. /// Required. @@ -1957,6 +2076,13 @@ public static class OnGoalValueOrNoteUpsertTrigger /// public static class OnCheckAlertStatus { + /// + /// The alert id to track. + /// Required. + /// Dynamic values from: GetAlerts. + /// + public const string AlertId = "alertId"; + /// /// Source of the call for tracing /// Default: powerAutomate. @@ -2231,32 +2357,6 @@ await this } } - /// - /// Get alerts from Power BI - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get alerts from Power BI response. - public virtual async Task> GetAlertsAsync(CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetAlertsAsync"); - try - { - var queryParams = new List(); - queryParams.Add("pbi_source=powerAutomate"); - var path = $"/metadata/v201606/alerts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Run a query against a dataset /// @@ -2358,128 +2458,6 @@ await this } } - /// - /// ListGroups - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The ListGroups response. - public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListGroupsAsync"); - try - { - var queryParams = new List(); - queryParams.Add("pbi_source=powerAutomate"); - var path = $"/v1.0/myorg/groups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// ListDatasets - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Workspace - /// Cancellation token. - /// The ListDatasets response. - public virtual async Task ListDatasetsAsync([DynamicValues("ListGroups")] string workspace, CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListDatasetsAsync"); - try - { - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - var queryParams = new List(); - queryParams.Add("pbi_source=powerAutomate"); - var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// ListTables - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Workspace - /// Dataset - /// Cancellation token. - /// The ListTables response. - public virtual async Task ListTablesAsync([DynamicValues("ListGroups")] string workspace, [DynamicValues("ListDatasets")] string dataset, CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListTablesAsync"); - try - { - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - var queryParams = new List(); - queryParams.Add("pbi_source=powerAutomate"); - var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets/{Uri.EscapeDataString(dataset.ToString())}/tables" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// GetColumns - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Workspace - /// Dataset - /// Table - /// Cancellation token. - /// The GetColumns response. - public virtual async Task GetColumnsAsync([DynamicValues("ListGroups")] string workspace, [DynamicValues("ListDatasets")] string dataset, [DynamicValues("ListTables")] string table, CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetColumnsAsync"); - try - { - if (workspace is null) - throw new ArgumentNullException(nameof(workspace)); - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - if (table is null) - throw new ArgumentNullException(nameof(table)); - var queryParams = new List(); - queryParams.Add("pbi_source=powerAutomate"); - var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets/{Uri.EscapeDataString(dataset.ToString())}/tables/{Uri.EscapeDataString(table.ToString())}/columns" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Add a note to a check-in /// @@ -2666,31 +2644,6 @@ public virtual async Task GetGoalCheckinAsync([DynamicVa } } - /// - /// Get PowerBi Button Clicked hybrid trigger output - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// The request body. - /// Cancellation token. - /// The Get PowerBi Button Clicked hybrid trigger output response. - public virtual async Task GetPowerBiButtonClickedOutputsAsync(string input, CancellationToken cancellationToken = default) - { - using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetPowerBiButtonClickedOutputsAsync"); - try - { - var path = $"/powerbihybridtriggeroutput/triggers/PowerBiButtonClicked/PowerBiButtonClickedOutputs"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Refresh a dataset /// @@ -2784,6 +2737,119 @@ public virtual async Task InitiateExportToFileForPaginatedReportsAsync([ } } + /// + /// ListGroups + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The ListGroups response. + public virtual async Task ListGroupsAsync(CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListGroupsAsync"); + try + { + var queryParams = new List(); + queryParams.Add("pbi_source=powerAutomate"); + var path = $"/v1.0/myorg/groups" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get alerts from Power BI + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get alerts from Power BI response. + public virtual async Task> GetAlertsAsync(CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetAlertsAsync"); + try + { + var queryParams = new List(); + queryParams.Add("pbi_source=powerAutomate"); + var path = $"/metadata/v201606/alerts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// ListDatasets + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Workspace + /// Cancellation token. + /// The ListDatasets response. + public virtual async Task ListDatasetsAsync([DynamicValues("ListGroups")] string workspace, CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListDatasetsAsync"); + try + { + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + var queryParams = new List(); + queryParams.Add("pbi_source=powerAutomate"); + var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// ListTables + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Workspace + /// Dataset + /// Cancellation token. + /// The ListTables response. + public virtual async Task ListTablesAsync([DynamicValues("ListGroups")] string workspace, [DynamicValues("ListDatasets")] string dataset, CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.ListTablesAsync"); + try + { + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + var queryParams = new List(); + queryParams.Add("pbi_source=powerAutomate"); + var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets/{Uri.EscapeDataString(dataset.ToString())}/tables" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Get Reports in Group /// @@ -2811,6 +2877,66 @@ public virtual async Task GetReportsInGroupAsync([DynamicValues("ListGr } } + /// + /// GetColumns + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Workspace + /// Dataset + /// Table + /// Cancellation token. + /// The GetColumns response. + public virtual async Task GetColumnsAsync([DynamicValues("ListGroups")] string workspace, [DynamicValues("ListDatasets")] string dataset, [DynamicValues("ListTables")] string table, CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetColumnsAsync"); + try + { + if (workspace is null) + throw new ArgumentNullException(nameof(workspace)); + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + if (table is null) + throw new ArgumentNullException(nameof(table)); + var queryParams = new List(); + queryParams.Add("pbi_source=powerAutomate"); + var path = $"/v1.0/myorg/groups/{Uri.EscapeDataString(workspace.ToString())}/datasets/{Uri.EscapeDataString(dataset.ToString())}/tables/{Uri.EscapeDataString(table.ToString())}/columns" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get PowerBi Button Clicked hybrid trigger output + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// The request body. + /// Cancellation token. + /// The Get PowerBi Button Clicked hybrid trigger output response. + public virtual async Task GetPowerBiButtonClickedOutputsAsync(string input, CancellationToken cancellationToken = default) + { + using var activity = PowerBIClient.ConnectorActivitySource.StartActivity("PowerBIClient.GetPowerBiButtonClickedOutputsAsync"); + try + { + var path = $"/powerbihybridtriggeroutput/triggers/PowerBiButtonClicked/PowerBiButtonClickedOutputs"; + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/RssExtensions.cs b/src/Azure.Connectors.Sdk/Generated/RssExtensions.cs index f9db52e..02b9fa8 100644 --- a/src/Azure.Connectors.Sdk/Generated/RssExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/RssExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Rss.Models #region Types /// - /// Response for When a feed item is published + /// Represents a wrapper object for batch trigger response /// public class TriggerBatchResponseFeedItem { @@ -40,7 +40,7 @@ public class TriggerBatchResponseFeedItem } /// - /// Item in A list of the response objects + /// Represents an RSS feed item. /// public class FeedItem { diff --git a/src/Azure.Connectors.Sdk/Generated/SalesforceExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SalesforceExtensions.cs index 5331cb8..e26aae2 100644 --- a/src/Azure.Connectors.Sdk/Generated/SalesforceExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SalesforceExtensions.cs @@ -30,129 +30,7 @@ namespace Azure.Connectors.Sdk.Salesforce.Models #region Types /// - /// Response for Get object metadata - /// - public class TableMetadata - { - /// Table name - [JsonPropertyName("name")] - public string Name { get; set; } - - /// Table title - [JsonPropertyName("title")] - public string Title { get; set; } - - /// Table permission - [JsonPropertyName("x-ms-permission")] - public string XMsPermission { get; set; } - - /// x-ms-capabilities - [JsonPropertyName("x-ms-capabilities")] - public TableCapabilitiesMetadata XMsCapabilities { get; set; } - - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - - /// referencedEntities - [JsonPropertyName("referencedEntities")] - public ObjectEntity ReferencedEntities { get; set; } - - /// URL link - [JsonPropertyName("webUrl")] - public string WebUrl { get; set; } - } - - /// - /// x-ms-capabilities - /// - public class TableCapabilitiesMetadata - { - /// sortRestrictions - [JsonPropertyName("sortRestrictions")] - public TableSortRestrictionsMetadata SortRestrictions { get; set; } - - /// filterRestrictions - [JsonPropertyName("filterRestrictions")] - public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } - - /// selectRestrictions - [JsonPropertyName("selectRestrictions")] - public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } - - /// Server paging restrictions - [JsonPropertyName("isOnlyServerPagable")] - public bool? IsOnlyServerPagable { get; set; } - - /// List of supported filter capabilities - [JsonPropertyName("filterFunctionSupport")] - public List FilterFunctionSupport { get; set; } - - /// List of supported server-driven paging capabilities - [JsonPropertyName("serverPagingOptions")] - public List ServerPagingOptions { get; set; } - } - - /// - /// sortRestrictions - /// - public class TableSortRestrictionsMetadata - { - /// Indicates whether this table has sortable columns - [JsonPropertyName("sortable")] - public bool? Sortable { get; set; } - - /// List of unsortable properties - [JsonPropertyName("unsortableProperties")] - public List UnsortableProperties { get; set; } - - /// List of properties which support ascending order only - [JsonPropertyName("ascendingOnlyProperties")] - public List AscendingOnlyProperties { get; set; } - } - - /// - /// filterRestrictions - /// - public class TableFilterRestrictionsMetadata - { - /// Indicates whether this table has filterable columns - [JsonPropertyName("filterable")] - public bool? Filterable { get; set; } - - /// List of non filterable properties - [JsonPropertyName("nonFilterableProperties")] - public List NonFilterableProperties { get; set; } - - /// List of required properties - [JsonPropertyName("requiredProperties")] - public List RequiredProperties { get; set; } - } - - /// - /// selectRestrictions - /// - public class TableSelectRestrictionsMetadata - { - /// Indicates whether this table has selectable columns - [JsonPropertyName("selectable")] - public bool? Selectable { get; set; } - } - - /// - /// schema - /// - public class ObjectEntity - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - - /// - /// Response for Get object types + /// Represents a list of tables. /// public class TablesList { @@ -162,7 +40,7 @@ public class TablesList } /// - /// Item in List of Tables + /// Represents a table. /// public class Table { @@ -180,30 +58,6 @@ public class Table public JsonElement? DynamicProperties { get; init; } } - /// - /// Response for Get External ID Fields - /// - public class ExternalIdFieldsList - { - /// List of external ID fields. - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of external ID fields. - /// - public class ExternalIdField - { - /// Name of the external ID field, used at runtime. - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Display name of the external ID field. - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - } - /// /// Response for Get a Record by External ID /// @@ -219,7 +73,7 @@ public class GetItemByExternalIdResponse } /// - /// Response for Get records + /// List of Items /// public class ItemsList { @@ -229,7 +83,7 @@ public class ItemsList } /// - /// Item in List of Items + /// Table item entity /// [DynamicSchema("GetTable")] public class Item @@ -246,6 +100,18 @@ public class Item public JsonElement? DynamicProperties { get; set; } } + /// + /// Response for Execute a SOQL query + /// + public class ObjectEntity + { + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + /// /// Response for Get all jobs /// @@ -265,7 +131,7 @@ public class GetAllJobsResponse } /// - /// Item in records + /// JobInfo /// public class JobInfo { @@ -413,7 +279,7 @@ public class CheckJobResponse } /// - /// Response for Execute SOSL search query + /// SOSL search query response /// public class SOSLSearchQueryResponse { @@ -427,7 +293,7 @@ public class SOSLSearchQueryResponse } /// - /// Item in A list of search records returned by an SOSL search query + /// Individual record returned by SOSL query /// public class SearchRecordObject { @@ -483,7 +349,7 @@ public class MCPQueryResponse } /// - /// Response for Create a job (V2) + /// Output for 'CreateJobV2' operation /// public class CreateJobResponse { @@ -647,103 +513,237 @@ public class PostItemResponse } /// - /// CreateJobParameters + /// Represents a list of external ID fields. /// - public class CreateJobParameters + public class ExternalIdFieldsList { - /// The object type for the data being processed. - [JsonPropertyName("object")] - public string ObjectEntity { get; set; } - - /// The processing operation for the job. - [JsonPropertyName("operation")] - public Operation? Operation { get; set; } - - /// The column delimiter used for CSV job data. - [JsonPropertyName("columnDelimiter")] - public string ColumnDelimiter { get; set; } - - /// The external ID field in the object being updated. Only needed for upsert operations. Field values must also exist in CSV job data. - [JsonPropertyName("externalIdFieldName")] - public string ExternalIdFieldName { get; set; } - - /// The line ending used for CSV job data, marking the end of a data row. - [JsonPropertyName("lineEnding")] - public string LineEnding { get; set; } - - /// The content type for the job. - [JsonPropertyName("contentType")] - public string ContentType { get; set; } + /// List of external ID fields. + [JsonPropertyName("value")] + public List Value { get; set; } } /// - /// ExecuteSoqlQueryParameters + /// Represents an external ID field. /// - public class ExecuteSoqlQueryParameters + public class ExternalIdField { - /// SOQL Query text. Dynamic parameters can be specified using '@paramName' syntax. - [JsonPropertyName("query")] - public string SOQLQuery { get; set; } - - /// SOQL Query dynamic parameters. Key is parameter name (without '@' at sign), value is parameter value. - [JsonPropertyName("parameters")] - public JsonElement? QueryParameters { get; set; } - } + /// Name of the external ID field, used at runtime. + [JsonPropertyName("Name")] + public string Name { get; set; } - /// - /// CloseJobRequest - /// - public class CloseJobRequest - { - /// state - [JsonPropertyName("state")] - public string State { get; set; } + /// Display name of the external ID field. + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } } /// - /// MCPQueryRequest + /// Table metadata /// - public class MCPQueryRequest + public class TableMetadata { - /// jsonrpc - [JsonPropertyName("jsonrpc")] - public string Jsonrpc { get; set; } + /// Table name + [JsonPropertyName("name")] + public string Name { get; set; } - /// id - [JsonPropertyName("id")] - public string Id { get; set; } + /// Table title + [JsonPropertyName("title")] + public string Title { get; set; } - /// method - [JsonPropertyName("method")] - public string Method { get; set; } + /// Table permission + [JsonPropertyName("x-ms-permission")] + public string XMsPermission { get; set; } - /// params - [JsonPropertyName("params")] - public JsonElement? Params { get; set; } + /// x-ms-capabilities + [JsonPropertyName("x-ms-capabilities")] + public TableCapabilitiesMetadata XMsCapabilities { get; set; } - /// result - [JsonPropertyName("result")] - public JsonElement? Result { get; set; } + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } - /// error - [JsonPropertyName("error")] - public JsonElement? Error { get; set; } + /// referencedEntities + [JsonPropertyName("referencedEntities")] + public ObjectEntity ReferencedEntities { get; set; } - /// callbackEndpoint - [JsonPropertyName("callbackEndpoint")] - public string CallbackEndpoint { get; set; } + /// URL link + [JsonPropertyName("webUrl")] + public string WebUrl { get; set; } } /// - /// Extensible enum for known ColumnDelimiter values. + /// Metadata for a table (capabilities) /// - [JsonConverter(typeof(ColumnDelimiter.ColumnDelimiterJsonConverter))] - public readonly struct ColumnDelimiter : IEquatable + public class TableCapabilitiesMetadata { - private readonly string _value; + /// sortRestrictions + [JsonPropertyName("sortRestrictions")] + public TableSortRestrictionsMetadata SortRestrictions { get; set; } - /// - /// Initializes a new instance of the struct. + /// filterRestrictions + [JsonPropertyName("filterRestrictions")] + public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } + + /// selectRestrictions + [JsonPropertyName("selectRestrictions")] + public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } + + /// Server paging restrictions + [JsonPropertyName("isOnlyServerPagable")] + public bool? IsOnlyServerPagable { get; set; } + + /// List of supported filter capabilities + [JsonPropertyName("filterFunctionSupport")] + public List FilterFunctionSupport { get; set; } + + /// List of supported server-driven paging capabilities + [JsonPropertyName("serverPagingOptions")] + public List ServerPagingOptions { get; set; } + } + + /// + /// Metadata for a table (sort restrictions) + /// + public class TableSortRestrictionsMetadata + { + /// Indicates whether this table has sortable columns + [JsonPropertyName("sortable")] + public bool? Sortable { get; set; } + + /// List of unsortable properties + [JsonPropertyName("unsortableProperties")] + public List UnsortableProperties { get; set; } + + /// List of properties which support ascending order only + [JsonPropertyName("ascendingOnlyProperties")] + public List AscendingOnlyProperties { get; set; } + } + + /// + /// Metadata for a table (filter restrictions) + /// + public class TableFilterRestrictionsMetadata + { + /// Indicates whether this table has filterable columns + [JsonPropertyName("filterable")] + public bool? Filterable { get; set; } + + /// List of non filterable properties + [JsonPropertyName("nonFilterableProperties")] + public List NonFilterableProperties { get; set; } + + /// List of required properties + [JsonPropertyName("requiredProperties")] + public List RequiredProperties { get; set; } + } + + /// + /// Metadata for a table (select restrictions) + /// + public class TableSelectRestrictionsMetadata + { + /// Indicates whether this table has selectable columns + [JsonPropertyName("selectable")] + public bool? Selectable { get; set; } + } + + /// + /// Parameters for 'CreateJobV2' operation + /// + public class CreateJobParameters + { + /// The object type for the data being processed. + [JsonPropertyName("object")] + public string ObjectEntity { get; set; } + + /// The processing operation for the job. + [JsonPropertyName("operation")] + public Operation? Operation { get; set; } + + /// The column delimiter used for CSV job data. + [JsonPropertyName("columnDelimiter")] + public string ColumnDelimiter { get; set; } + + /// The external ID field in the object being updated. Only needed for upsert operations. Field values must also exist in CSV job data. + [JsonPropertyName("externalIdFieldName")] + public string ExternalIdFieldName { get; set; } + + /// The line ending used for CSV job data, marking the end of a data row. + [JsonPropertyName("lineEnding")] + public string LineEnding { get; set; } + + /// The content type for the job. + [JsonPropertyName("contentType")] + public string ContentType { get; set; } + } + + /// + /// Input body for Execute Soql Query operation + /// + public class ExecuteSoqlQueryParameters + { + /// SOQL Query text. Dynamic parameters can be specified using '@paramName' syntax. + [JsonPropertyName("query")] + public string SOQLQuery { get; set; } + + /// SOQL Query dynamic parameters. Key is parameter name (without '@' at sign), value is parameter value. + [JsonPropertyName("parameters")] + public JsonElement? QueryParameters { get; set; } + } + + /// + /// CloseJobRequest + /// + public class CloseJobRequest + { + /// state + [JsonPropertyName("state")] + public string State { get; set; } + } + + /// + /// MCPQueryRequest + /// + public class MCPQueryRequest + { + /// jsonrpc + [JsonPropertyName("jsonrpc")] + public string Jsonrpc { get; set; } + + /// id + [JsonPropertyName("id")] + public string Id { get; set; } + + /// method + [JsonPropertyName("method")] + public string Method { get; set; } + + /// params + [JsonPropertyName("params")] + public JsonElement? Params { get; set; } + + /// result + [JsonPropertyName("result")] + public JsonElement? Result { get; set; } + + /// error + [JsonPropertyName("error")] + public JsonElement? Error { get; set; } + + /// callbackEndpoint + [JsonPropertyName("callbackEndpoint")] + public string CallbackEndpoint { get; set; } + } + + /// + /// Extensible enum for known ColumnDelimiter values. + /// + [JsonConverter(typeof(ColumnDelimiter.ColumnDelimiterJsonConverter))] + public readonly struct ColumnDelimiter : IEquatable + { + private readonly string _value; + + /// + /// Initializes a new instance of the struct. /// /// The string value. public ColumnDelimiter(string value) => this._value = value ?? throw new ArgumentNullException(nameof(value)); @@ -1026,147 +1026,31 @@ public OperationJsonConverter() { } /// public static class SalesforceModelFactory { - /// - /// Creates a new instance of . - /// - public static TableMetadata TableMetadata( - string name = default, - string title = default, - string xMsPermission = default, - TableCapabilitiesMetadata xMsCapabilities = default, - ObjectEntity schema = default, - ObjectEntity referencedEntities = default, - string webUrl = default) - { - return new TableMetadata - { - Name = name, - Title = title, - XMsPermission = xMsPermission, - XMsCapabilities = xMsCapabilities, - Schema = schema, - ReferencedEntities = referencedEntities, - WebUrl = webUrl, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableCapabilitiesMetadata TableCapabilitiesMetadata( - TableSortRestrictionsMetadata sortRestrictions = default, - TableFilterRestrictionsMetadata filterRestrictions = default, - TableSelectRestrictionsMetadata selectRestrictions = default, - bool? isOnlyServerPagable = default, - List filterFunctionSupport = default, - List serverPagingOptions = default) - { - return new TableCapabilitiesMetadata - { - SortRestrictions = sortRestrictions, - FilterRestrictions = filterRestrictions, - SelectRestrictions = selectRestrictions, - IsOnlyServerPagable = isOnlyServerPagable, - FilterFunctionSupport = filterFunctionSupport, - ServerPagingOptions = serverPagingOptions, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( - bool? sortable = default, - List unsortableProperties = default, - List ascendingOnlyProperties = default) - { - return new TableSortRestrictionsMetadata - { - Sortable = sortable, - UnsortableProperties = unsortableProperties, - AscendingOnlyProperties = ascendingOnlyProperties, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( - bool? filterable = default, - List nonFilterableProperties = default, - List requiredProperties = default) - { - return new TableFilterRestrictionsMetadata - { - Filterable = filterable, - NonFilterableProperties = nonFilterableProperties, - RequiredProperties = requiredProperties, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( - bool? selectable = default) - { - return new TableSelectRestrictionsMetadata - { - Selectable = selectable, - }; - } - /// /// Creates a new instance of . /// - public static TablesList TablesList( - List
value = default) - { - return new TablesList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static Table Table( - string name = default, - string displayName = default, - JsonElement? dynamicProperties = default) - { - return new Table - { - Name = name, - DisplayName = displayName, - DynamicProperties = dynamicProperties, - }; - } - - /// - /// Creates a new instance of . - /// - public static ExternalIdFieldsList ExternalIdFieldsList( - List value = default) + public static TablesList TablesList( + List
value = default) { - return new ExternalIdFieldsList + return new TablesList { Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static ExternalIdField ExternalIdField( + public static Table Table( string name = default, - string displayName = default) + string displayName = default, + JsonElement? dynamicProperties = default) { - return new ExternalIdField + return new Table { Name = name, DisplayName = displayName, + DynamicProperties = dynamicProperties, }; } @@ -1388,6 +1272,122 @@ public static CreateJobResponse CreateJobResponse( }; } + /// + /// Creates a new instance of . + /// + public static ExternalIdFieldsList ExternalIdFieldsList( + List value = default) + { + return new ExternalIdFieldsList + { + Value = value, + }; + } + + /// + /// Creates a new instance of . + /// + public static ExternalIdField ExternalIdField( + string name = default, + string displayName = default) + { + return new ExternalIdField + { + Name = name, + DisplayName = displayName, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableMetadata TableMetadata( + string name = default, + string title = default, + string xMsPermission = default, + TableCapabilitiesMetadata xMsCapabilities = default, + ObjectEntity schema = default, + ObjectEntity referencedEntities = default, + string webUrl = default) + { + return new TableMetadata + { + Name = name, + Title = title, + XMsPermission = xMsPermission, + XMsCapabilities = xMsCapabilities, + Schema = schema, + ReferencedEntities = referencedEntities, + WebUrl = webUrl, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableCapabilitiesMetadata TableCapabilitiesMetadata( + TableSortRestrictionsMetadata sortRestrictions = default, + TableFilterRestrictionsMetadata filterRestrictions = default, + TableSelectRestrictionsMetadata selectRestrictions = default, + bool? isOnlyServerPagable = default, + List filterFunctionSupport = default, + List serverPagingOptions = default) + { + return new TableCapabilitiesMetadata + { + SortRestrictions = sortRestrictions, + FilterRestrictions = filterRestrictions, + SelectRestrictions = selectRestrictions, + IsOnlyServerPagable = isOnlyServerPagable, + FilterFunctionSupport = filterFunctionSupport, + ServerPagingOptions = serverPagingOptions, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( + bool? sortable = default, + List unsortableProperties = default, + List ascendingOnlyProperties = default) + { + return new TableSortRestrictionsMetadata + { + Sortable = sortable, + UnsortableProperties = unsortableProperties, + AscendingOnlyProperties = ascendingOnlyProperties, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( + bool? filterable = default, + List nonFilterableProperties = default, + List requiredProperties = default) + { + return new TableFilterRestrictionsMetadata + { + Filterable = filterable, + NonFilterableProperties = nonFilterableProperties, + RequiredProperties = requiredProperties, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( + bool? selectable = default) + { + return new TableSelectRestrictionsMetadata + { + Selectable = selectable, + }; + } + /// /// Creates a new instance of . /// @@ -1547,6 +1547,13 @@ public static class SalesforceTriggerParameters /// public static class OnNewItems { + /// + /// The Salesforce object type like 'Leads'. + /// Required. + /// Dynamic values from: GetTables. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// @@ -1569,6 +1576,13 @@ public static class OnNewItems /// public static class OnUpdatedItems { + /// + /// The Salesforce object type like 'Leads'. + /// Required. + /// Dynamic values from: GetTables. + /// + public const string Table = "table"; + /// /// An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123). /// @@ -1592,178 +1606,70 @@ public static class OnUpdatedItems #region Client - /// - /// Typed client for salesforce connector. - /// - public class SalesforceClient : ConnectorClientBase - { - /// - /// Creates a new SalesforceClient with the specified connection runtime URL. - /// Uses by default. - /// - /// The connection runtime URL from Azure Portal. - public SalesforceClient(Uri connectionRuntimeUrl) - : base(connectionRuntimeUrl) - { - } - - /// - /// Creates a new SalesforceClient with the specified connection runtime URL and credential. - /// - /// The connection runtime URL from Azure Portal. - /// The Azure credential for authentication. - /// Optional client options for retry, timeout, etc. - public SalesforceClient(Uri connectionRuntimeUrl, TokenCredential credential, ConnectorClientOptions options = null) - : base(connectionRuntimeUrl, credential, options) - { - } - - /// - /// Creates a new SalesforceClient with the specified connection runtime URL and credential. - /// - /// The connection runtime URL from Azure Portal. - /// The Azure credential for authentication. - public SalesforceClient(Uri connectionRuntimeUrl, TokenCredential credential) - : base(connectionRuntimeUrl, credential) - { - } - - /// - /// Creates a new SalesforceClient with the specified connection runtime URL string. - /// Uses by default. - /// - /// The connection runtime URL from Azure Portal. - public SalesforceClient(string connectionRuntimeUrl) - : base(connectionRuntimeUrl) - { - } - - protected SalesforceClient() : base() { } - - public override string ConnectorName => "salesforce"; - - private static readonly System.Diagnostics.ActivitySource ConnectorActivitySource = new System.Diagnostics.ActivitySource("Azure.Connectors.Sdk.salesforce"); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => base.Equals(obj); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => base.GetHashCode(); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override string ToString() => base.ToString(); - - /// - /// Get object metadata - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Salesforce Object Type - /// Cancellation token. - /// The Get object metadata response. - public virtual async Task GetTableAsync([DynamicValues("GetTables")] string salesforceObjectType, CancellationToken cancellationToken = default) - { - using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetTableAsync"); - try - { - if (salesforceObjectType is null) - throw new ArgumentNullException(nameof(salesforceObjectType)); - var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(salesforceObjectType.ToString()))}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// GetMetadataForGetItem - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// table - /// Cancellation token. - /// The GetMetadataForGetItem response. - public virtual async Task GetMetadataForGetItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) - { - using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForGetItemAsync"); - try - { - if (table is null) - throw new ArgumentNullException(nameof(table)); - var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/getitem"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - + /// + /// Typed client for salesforce connector. + /// + public class SalesforceClient : ConnectorClientBase + { /// - /// GetMetadataForPatchItem + /// Creates a new SalesforceClient with the specified connection runtime URL. + /// Uses by default. /// - /// Discovery method used to populate dynamic parameter values at design time. - /// table - /// Cancellation token. - /// The GetMetadataForPatchItem response. - public virtual async Task GetMetadataForPatchItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + /// The connection runtime URL from Azure Portal. + public SalesforceClient(Uri connectionRuntimeUrl) + : base(connectionRuntimeUrl) { - using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForPatchItemAsync"); - try - { - if (table is null) - throw new ArgumentNullException(nameof(table)); - var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/patchitem"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); + } - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } + /// + /// Creates a new SalesforceClient with the specified connection runtime URL and credential. + /// + /// The connection runtime URL from Azure Portal. + /// The Azure credential for authentication. + /// Optional client options for retry, timeout, etc. + public SalesforceClient(Uri connectionRuntimeUrl, TokenCredential credential, ConnectorClientOptions options = null) + : base(connectionRuntimeUrl, credential, options) + { } /// - /// GetMetadataForPostItem + /// Creates a new SalesforceClient with the specified connection runtime URL and credential. /// - /// Discovery method used to populate dynamic parameter values at design time. - /// table - /// Cancellation token. - /// The GetMetadataForPostItem response. - public virtual async Task GetMetadataForPostItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + /// The connection runtime URL from Azure Portal. + /// The Azure credential for authentication. + public SalesforceClient(Uri connectionRuntimeUrl, TokenCredential credential) + : base(connectionRuntimeUrl, credential) { - using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForPostItemAsync"); - try - { - if (table is null) - throw new ArgumentNullException(nameof(table)); - var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/postitem"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); + } - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } + /// + /// Creates a new SalesforceClient with the specified connection runtime URL string. + /// Uses by default. + /// + /// The connection runtime URL from Azure Portal. + public SalesforceClient(string connectionRuntimeUrl) + : base(connectionRuntimeUrl) + { } + protected SalesforceClient() : base() { } + + public override string ConnectorName => "salesforce"; + + private static readonly System.Diagnostics.ActivitySource ConnectorActivitySource = new System.Diagnostics.ActivitySource("Azure.Connectors.Sdk.salesforce"); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => base.Equals(obj); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => base.GetHashCode(); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override string ToString() => base.ToString(); + /// /// Get object types /// @@ -1788,33 +1694,6 @@ public virtual async Task GetTablesAsync(CancellationToken cancellat } } - /// - /// Get External ID Fields - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Salesforce Object Type - /// Cancellation token. - /// The Get External ID Fields response. - public virtual async Task GetExternalIdFieldsAsync([DynamicValues("GetTables")] string salesforceObjectType, CancellationToken cancellationToken = default) - { - using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetExternalIdFieldsAsync"); - try - { - if (salesforceObjectType is null) - throw new ArgumentNullException(nameof(salesforceObjectType)); - var path = $"/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(salesforceObjectType.ToString()))}/externalIdFields"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get a Record by External ID /// @@ -2601,6 +2480,141 @@ public virtual async Task PostItemAsync([DynamicValues("GetTab } } + /// + /// Get External ID Fields + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Salesforce Object Type + /// Cancellation token. + /// The Get External ID Fields response. + public virtual async Task GetExternalIdFieldsAsync([DynamicValues("GetTables")] string salesforceObjectType, CancellationToken cancellationToken = default) + { + using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetExternalIdFieldsAsync"); + try + { + if (salesforceObjectType is null) + throw new ArgumentNullException(nameof(salesforceObjectType)); + var path = $"/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(salesforceObjectType.ToString()))}/externalIdFields"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// GetMetadataForPatchItem + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// table + /// Cancellation token. + /// The GetMetadataForPatchItem response. + public virtual async Task GetMetadataForPatchItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + { + using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForPatchItemAsync"); + try + { + if (table is null) + throw new ArgumentNullException(nameof(table)); + var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/patchitem"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// GetMetadataForPostItem + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// table + /// Cancellation token. + /// The GetMetadataForPostItem response. + public virtual async Task GetMetadataForPostItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + { + using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForPostItemAsync"); + try + { + if (table is null) + throw new ArgumentNullException(nameof(table)); + var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/postitem"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// GetMetadataForGetItem + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// table + /// Cancellation token. + /// The GetMetadataForGetItem response. + public virtual async Task GetMetadataForGetItemAsync([DynamicValues("GetTables")] string table, CancellationToken cancellationToken = default) + { + using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetMetadataForGetItemAsync"); + try + { + if (table is null) + throw new ArgumentNullException(nameof(table)); + var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(table.ToString()))}/getitem"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get object metadata + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Salesforce Object Type + /// Cancellation token. + /// The Get object metadata response. + public virtual async Task GetTableAsync([DynamicValues("GetTables")] string salesforceObjectType, CancellationToken cancellationToken = default) + { + using var activity = SalesforceClient.ConnectorActivitySource.StartActivity("SalesforceClient.GetTableAsync"); + try + { + if (salesforceObjectType is null) + throw new ArgumentNullException(nameof(salesforceObjectType)); + var path = $"/$metadata.json/datasets/default/tables/{Uri.EscapeDataString(Uri.EscapeDataString(salesforceObjectType.ToString()))}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/SeismicPlannerExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SeismicPlannerExtensions.cs index a54aa58..78b6e0e 100644 --- a/src/Azure.Connectors.Sdk/Generated/SeismicPlannerExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SeismicPlannerExtensions.cs @@ -117,7 +117,7 @@ public class Comment } /// - /// meta + /// Metadata object /// public class Meta { @@ -829,7 +829,7 @@ public class ContentRef } /// - /// requestFormCustomPropertyOption + /// Request form custom properties /// public class RequestFormCustomProperties { @@ -945,7 +945,7 @@ public class ScopeSettingsItemDefinition } /// - /// valueSchemaProperty + /// Value schema definition /// public class ValueSchemaPropertyDefinition { diff --git a/src/Azure.Connectors.Sdk/Generated/SendGridExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SendGridExtensions.cs index c965d76..9518a1a 100644 --- a/src/Azure.Connectors.Sdk/Generated/SendGridExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SendGridExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.SendGrid.Models #region Types /// - /// Response for Add a global suppression + /// Add global suppress Response /// public class AddGlobalSuppressRequestAndResponse { @@ -39,7 +39,7 @@ public class AddGlobalSuppressRequestAndResponse } /// - /// Response for Get the global suppression + /// Add global suppress Response /// public class GetGlobalSuppressResponse { @@ -61,7 +61,39 @@ public class ObjectEntity } /// - /// Response for List Recipient Lists + /// Get Bounce Response + /// + public class Bounce + { + /// Created + [JsonPropertyName("created")] + public int? Created { get; set; } + + /// Email + [JsonPropertyName("email")] + public string Email { get; set; } + + /// Reason + [JsonPropertyName("reason")] + public string Reason { get; set; } + + /// Status + [JsonPropertyName("status")] + public string Status { get; set; } + } + + /// + /// Email Is Unsubscribed Response + /// + public class EmailIsUnsubscribedResponse + { + /// Is Email Unsubscribed + [JsonPropertyName("isUnsubscribed")] + public bool? IsEmailUnsubscribed { get; set; } + } + + /// + /// List Recipients Response Item /// public class RecipientLists { @@ -71,7 +103,7 @@ public class RecipientLists } /// - /// Item in List of recipient lists + /// Recipient list /// public class RecipientList { @@ -89,7 +121,7 @@ public class RecipientList } /// - /// Response for List Recipients + /// List of recipients /// public class Recipients { @@ -99,7 +131,7 @@ public class Recipients } /// - /// Item in List of recipients + /// SendGrid recipient /// public class Recipient { @@ -121,39 +153,7 @@ public class Recipient } /// - /// Response for Get bounce for an email - /// - public class Bounce - { - /// Created - [JsonPropertyName("created")] - public int? Created { get; set; } - - /// Email - [JsonPropertyName("email")] - public string Email { get; set; } - - /// Reason - [JsonPropertyName("reason")] - public string Reason { get; set; } - - /// Status - [JsonPropertyName("status")] - public string Status { get; set; } - } - - /// - /// Response for Check if email is in unsubscribed email list - /// - public class EmailIsUnsubscribedResponse - { - /// Is Email Unsubscribed - [JsonPropertyName("isUnsubscribed")] - public bool? IsEmailUnsubscribed { get; set; } - } - - /// - /// EmailRequestV5 + /// Include multipart attachments /// public class EmailRequest { @@ -207,7 +207,7 @@ public class EmailRequest } /// - /// Item in Attachments + /// Attachment /// public class EmailAttachment { @@ -259,6 +259,36 @@ public static GetGlobalSuppressResponse GetGlobalSuppressResponse( }; } + /// + /// Creates a new instance of . + /// + public static Bounce Bounce( + int? created = default, + string email = default, + string reason = default, + string status = default) + { + return new Bounce + { + Created = created, + Email = email, + Reason = reason, + Status = status, + }; + } + + /// + /// Creates a new instance of . + /// + public static EmailIsUnsubscribedResponse EmailIsUnsubscribedResponse( + bool? isEmailUnsubscribed = default) + { + return new EmailIsUnsubscribedResponse + { + IsEmailUnsubscribed = isEmailUnsubscribed, + }; + } + /// /// Creates a new instance of . /// @@ -317,36 +347,6 @@ public static Recipient Recipient( }; } - /// - /// Creates a new instance of . - /// - public static Bounce Bounce( - int? created = default, - string email = default, - string reason = default, - string status = default) - { - return new Bounce - { - Created = created, - Email = email, - Reason = reason, - Status = status, - }; - } - - /// - /// Creates a new instance of . - /// - public static EmailIsUnsubscribedResponse EmailIsUnsubscribedResponse( - bool? isEmailUnsubscribed = default) - { - return new EmailIsUnsubscribedResponse - { - IsEmailUnsubscribed = isEmailUnsubscribed, - }; - } - /// /// Creates a new instance of . /// @@ -579,54 +579,6 @@ public virtual async Task AddRecipientToListAsync([DynamicValues(" } } - /// - /// List Recipient Lists - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List Recipient Lists response. - public virtual async Task ListRecipientListsAsync(CancellationToken cancellationToken = default) - { - using var activity = SendGridClient.ConnectorActivitySource.StartActivity("SendGridClient.ListRecipientListsAsync"); - try - { - var path = $"/v3/contactdb/lists"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// List Recipients - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List Recipients response. - public virtual async Task ListRecipientsAsync(CancellationToken cancellationToken = default) - { - using var activity = SendGridClient.ConnectorActivitySource.StartActivity("SendGridClient.ListRecipientsAsync"); - try - { - var path = $"/v3/contactdb/recipients"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get bounce for an email /// @@ -732,6 +684,54 @@ public virtual async Task SendEmailAsync(EmailRequest input, Cance } } + /// + /// List Recipient Lists + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List Recipient Lists response. + public virtual async Task ListRecipientListsAsync(CancellationToken cancellationToken = default) + { + using var activity = SendGridClient.ConnectorActivitySource.StartActivity("SendGridClient.ListRecipientListsAsync"); + try + { + var path = $"/v3/contactdb/lists"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// List Recipients + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List Recipients response. + public virtual async Task ListRecipientsAsync(CancellationToken cancellationToken = default) + { + using var activity = SendGridClient.ConnectorActivitySource.StartActivity("SendGridClient.ListRecipientsAsync"); + try + { + var path = $"/v3/contactdb/recipients"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/ServicebusExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ServicebusExtensions.cs index 1a6838e..6ac2624 100644 --- a/src/Azure.Connectors.Sdk/Generated/ServicebusExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ServicebusExtensions.cs @@ -30,21 +30,7 @@ namespace Azure.Connectors.Sdk.Servicebus.Models #region Types /// - /// Response for Get all entities - /// - public class ServiceBusEntity - { - /// The entity name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// The display name for the entity - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - } - - /// - /// Response for When a message is received in a queue (auto-complete) + /// Service Bus Message /// public class ServiceBusMessage { @@ -121,7 +107,7 @@ public class CreateTopicSubscriptionInput } /// - /// Response for Create a topic subscription + /// The topic subscription. /// public class Subscription { @@ -130,6 +116,20 @@ public class Subscription public string SubscriptionName { get; set; } } + /// + /// Entity with name and display name. + /// + public class ServiceBusEntity + { + /// The entity name + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// The display name for the entity + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + } + /// /// Response for Get metadata of a filter /// @@ -153,20 +153,6 @@ public class ObjectEntity /// public static class ServiceBusModelFactory { - /// - /// Creates a new instance of . - /// - public static ServiceBusEntity ServiceBusEntity( - string name = default, - string displayName = default) - { - return new ServiceBusEntity - { - Name = name, - DisplayName = displayName, - }; - } - /// /// Creates a new instance of . /// @@ -216,6 +202,20 @@ public static Subscription Subscription( SubscriptionName = subscriptionName, }; } + + /// + /// Creates a new instance of . + /// + public static ServiceBusEntity ServiceBusEntity( + string name = default, + string displayName = default) + { + return new ServiceBusEntity + { + Name = name, + DisplayName = displayName, + }; + } } #endregion Model Factory @@ -354,6 +354,13 @@ public static class ServicebusTriggerParameters /// public static class OnGetMessageFromQueue { + /// + /// Name of the queue + /// Required. + /// Dynamic values from: GetQueues. + /// + public const string QueueName = "queueName"; + /// /// Queue type - Main or DeadLetter /// Default: Main. @@ -368,6 +375,13 @@ public static class OnGetMessageFromQueue /// public static class OnGetNewMessageFromQueueWithPeekLock { + /// + /// Name of the queue + /// Required. + /// Dynamic values from: GetQueues. + /// + public const string QueueName = "queueName"; + /// /// Queue type - Main or DeadLetter /// Default: Main. @@ -389,6 +403,13 @@ public static class OnGetNewMessageFromQueueWithPeekLock /// public static class OnGetMessagesFromQueue { + /// + /// Name of the queue + /// Required. + /// Dynamic values from: GetQueues. + /// + public const string QueueName = "queueName"; + /// /// The maximum number of messages to return in the batch /// Default: 20. @@ -409,6 +430,13 @@ public static class OnGetMessagesFromQueue /// public static class OnGetNewMessagesFromQueueWithPeekLock { + /// + /// Name of the queue + /// Required. + /// Dynamic values from: GetQueues. + /// + public const string QueueName = "queueName"; + /// /// The maximum number of messages to return in the batch /// Default: 20. @@ -436,6 +464,20 @@ public static class OnGetNewMessagesFromQueueWithPeekLock /// public static class OnGetMessageFromTopic { + /// + /// Name of the topic + /// Required. + /// Dynamic values from: GetTopics. + /// + public const string TopicName = "topicName"; + + /// + /// Name of the topic subscription + /// Required. + /// Dynamic values from: GetSubscriptions. + /// + public const string SubscriptionName = "subscriptionName"; + /// /// Subscription type - Main or DeadLetter /// Default: Main. @@ -450,6 +492,20 @@ public static class OnGetMessageFromTopic /// public static class OnGetNewMessageFromTopicWithPeekLock { + /// + /// Name of the topic + /// Required. + /// Dynamic values from: GetTopics. + /// + public const string TopicName = "topicName"; + + /// + /// Name of the topic subscription + /// Required. + /// Dynamic values from: GetSubscriptions. + /// + public const string SubscriptionName = "subscriptionName"; + /// /// Subscription type - Main or DeadLetter /// Default: Main. @@ -471,6 +527,20 @@ public static class OnGetNewMessageFromTopicWithPeekLock /// public static class OnGetMessagesFromTopic { + /// + /// Name of the topic + /// Required. + /// Dynamic values from: GetTopics. + /// + public const string TopicName = "topicName"; + + /// + /// Name of the topic subscription + /// Required. + /// Dynamic values from: GetSubscriptions. + /// + public const string SubscriptionName = "subscriptionName"; + /// /// The maximum number of messages to return in the batch /// Default: 20. @@ -491,6 +561,20 @@ public static class OnGetMessagesFromTopic /// public static class OnGetNewMessagesFromTopicWithPeekLock { + /// + /// Name of the topic + /// Required. + /// Dynamic values from: GetTopics. + /// + public const string TopicName = "topicName"; + + /// + /// Name of the topic subscription + /// Required. + /// Dynamic values from: GetSubscriptions. + /// + public const string SubscriptionName = "subscriptionName"; + /// /// The maximum number of messages to return in the batch /// Default: 20. @@ -583,153 +667,6 @@ protected ServiceBusConnectorClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get all queues - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get all queues response. - public virtual async Task> GetQueuesAsync(CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetQueuesAsync"); - try - { - var path = $"/queues"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get all topics - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get all topics response. - public virtual async Task> GetTopicsAsync(CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetTopicsAsync"); - try - { - var path = $"/topics"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get the subscriptions for a topic - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Topic name - /// Cancellation token. - /// The Get the subscriptions for a topic response. - public virtual async Task> GetSubscriptionsAsync(string topicName, CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSubscriptionsAsync"); - try - { - if (topicName is null) - throw new ArgumentNullException(nameof(topicName)); - var path = $"/topics/{Uri.EscapeDataString(Uri.EscapeDataString(topicName.ToString()))}/subscriptions"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get all entities - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get all entities response. - public virtual async Task> GetEntitiesAsync(CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetEntitiesAsync"); - try - { - var path = $"/entities"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get the list of system properties - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get the list of system properties response. - public virtual async Task> GetSystemPropertiesAsync(CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSystemPropertiesAsync"); - try - { - var path = $"/systemproperties"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get session options - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get session options response. - public virtual async Task> GetSessionOptionsAsync(CancellationToken cancellationToken = default) - { - using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSessionOptionsAsync"); - try - { - var path = $"/sessionoptions"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Send message /// @@ -1515,6 +1452,153 @@ await this } } + /// + /// Get all entities + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get all entities response. + public virtual async Task> GetEntitiesAsync(CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetEntitiesAsync"); + try + { + var path = $"/entities"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get the list of system properties + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get the list of system properties response. + public virtual async Task> GetSystemPropertiesAsync(CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSystemPropertiesAsync"); + try + { + var path = $"/systemproperties"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get all queues + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get all queues response. + public virtual async Task> GetQueuesAsync(CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetQueuesAsync"); + try + { + var path = $"/queues"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get session options + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get session options response. + public virtual async Task> GetSessionOptionsAsync(CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSessionOptionsAsync"); + try + { + var path = $"/sessionoptions"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get all topics + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get all topics response. + public virtual async Task> GetTopicsAsync(CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetTopicsAsync"); + try + { + var path = $"/topics"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get the subscriptions for a topic + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Topic name + /// Cancellation token. + /// The Get the subscriptions for a topic response. + public virtual async Task> GetSubscriptionsAsync(string topicName, CancellationToken cancellationToken = default) + { + using var activity = ServiceBusConnectorClient.ConnectorActivitySource.StartActivity("ServiceBusConnectorClient.GetSubscriptionsAsync"); + try + { + if (topicName is null) + throw new ArgumentNullException(nameof(topicName)); + var path = $"/topics/{Uri.EscapeDataString(Uri.EscapeDataString(topicName.ToString()))}/subscriptions"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Get metadata of a filter /// diff --git a/src/Azure.Connectors.Sdk/Generated/SharePointOnlineExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SharePointOnlineExtensions.cs index c2976ed..ce7d722 100644 --- a/src/Azure.Connectors.Sdk/Generated/SharePointOnlineExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SharePointOnlineExtensions.cs @@ -29,210 +29,6 @@ namespace Azure.Connectors.Sdk.SharePointOnline.Models #region Types - /// - /// Response for Get list metadata - /// - public class TableMetadata - { - /// Table name - [JsonPropertyName("name")] - public string Name { get; set; } - - /// Table title - [JsonPropertyName("title")] - public string Title { get; set; } - - /// Table permission - [JsonPropertyName("x-ms-permission")] - public string XMsPermission { get; set; } - - /// x-ms-capabilities - [JsonPropertyName("x-ms-capabilities")] - public TableCapabilitiesMetadata XMsCapabilities { get; set; } - - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - - /// referencedEntities - [JsonPropertyName("referencedEntities")] - public ObjectEntity ReferencedEntities { get; set; } - - /// URL link - [JsonPropertyName("webUrl")] - public string WebUrl { get; set; } - } - - /// - /// x-ms-capabilities - /// - public class TableCapabilitiesMetadata - { - /// sortRestrictions - [JsonPropertyName("sortRestrictions")] - public TableSortRestrictionsMetadata SortRestrictions { get; set; } - - /// filterRestrictions - [JsonPropertyName("filterRestrictions")] - public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } - - /// selectRestrictions - [JsonPropertyName("selectRestrictions")] - public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } - - /// countRestrictions - [JsonPropertyName("countRestrictions")] - public TableCountRestrictionsMetadata CountRestrictions { get; set; } - - /// Server paging restrictions - [JsonPropertyName("isOnlyServerPagable")] - public bool? IsOnlyServerPagable { get; set; } - - /// List of supported filter capabilities - [JsonPropertyName("filterFunctionSupport")] - public List FilterFunctionSupport { get; set; } - - /// List of supported server-driven paging capabilities - [JsonPropertyName("serverPagingOptions")] - public List ServerPagingOptions { get; set; } - } - - /// - /// sortRestrictions - /// - public class TableSortRestrictionsMetadata - { - /// Indicates whether this table has sortable columns - [JsonPropertyName("sortable")] - public bool? Sortable { get; set; } - - /// List of unsortable properties - [JsonPropertyName("unsortableProperties")] - public List UnsortableProperties { get; set; } - - /// List of properties which support ascending order only - [JsonPropertyName("ascendingOnlyProperties")] - public List AscendingOnlyProperties { get; set; } - } - - /// - /// filterRestrictions - /// - public class TableFilterRestrictionsMetadata - { - /// Indicates whether this table has filterable columns - [JsonPropertyName("filterable")] - public bool? Filterable { get; set; } - - /// List of non filterable properties - [JsonPropertyName("nonFilterableProperties")] - public List NonFilterableProperties { get; set; } - - /// List of required properties - [JsonPropertyName("requiredProperties")] - public List RequiredProperties { get; set; } - } - - /// - /// selectRestrictions - /// - public class TableSelectRestrictionsMetadata - { - /// Indicates whether this table has selectable columns - [JsonPropertyName("selectable")] - public bool? Selectable { get; set; } - } - - /// - /// countRestrictions - /// - public class TableCountRestrictionsMetadata - { - /// Indicates whether this table has countable columns - [JsonPropertyName("countable")] - public bool? Countable { get; set; } - } - - /// - /// schema - /// - public class ObjectEntity - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - - /// - /// Response for Get metadata about the return type of the GetItemChanges operation - /// - public class GetItemChangesMetadataResponse - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for Get datasets - /// - public class DataSetsList - { - /// List of datasets - [JsonPropertyName("value")] - public List Value { get; set; } - } - - /// - /// Item in List of datasets - /// - public class DataSet - { - /// Dataset name - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// Dataset display name - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - - /// Pass-through Native Queries - [JsonPropertyName("query")] - [JsonInclude] - public List Query { get; init; } - } - - /// - /// Item in Pass-through Native Queries - /// - public class PassThroughNativeQuery - { - /// Query language - [JsonPropertyName("Language")] - public string Language { get; set; } - } - - /// - /// Response for Agreements Solution - Get Templates - /// - public class Table - { - /// The name of the table. The name is used at runtime. - [JsonPropertyName("Name")] - public string Name { get; set; } - - /// The display name of the table. - [JsonPropertyName("DisplayName")] - public string DisplayName { get; set; } - - /// Additional table properties provided by the connector to the clients. - [JsonPropertyName("DynamicProperties")] - [JsonInclude] - public JsonElement? DynamicProperties { get; init; } - } - /// /// Agreements Solution - Generate document within Agreements Solution workspace /// @@ -248,7 +44,7 @@ public class CreateAgreementsSolutionDocumentInput } /// - /// Response for Agreements Solution - Generate document within Agreements Solution workspace + /// The SharePoint version of the BlobMetadataResponse extends the object by adding some additional fields that we want serialized /// public class SPBlobMetadataResponse { @@ -300,7 +96,7 @@ public class SPBlobMetadataResponse } /// - /// Response for Get all lists and libraries + /// Represents a list of tables. /// public class TablesList { @@ -310,7 +106,26 @@ public class TablesList } /// - /// Response for Approve hub site join request + /// Represents a table. + /// + public class Table + { + /// The name of the table. The name is used at runtime. + [JsonPropertyName("Name")] + public string Name { get; set; } + + /// The display name of the table. + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } + + /// Additional table properties provided by the connector to the clients. + [JsonPropertyName("DynamicProperties")] + [JsonInclude] + public JsonElement? DynamicProperties { get; init; } + } + + /// + /// Result object of ApproveHubSiteJoin action /// public class ApproveHubSiteJoinResponse { @@ -320,7 +135,7 @@ public class ApproveHubSiteJoinResponse } /// - /// Response for Create sharing link for a file or folder + /// Internal structure for sharing links /// public class SharingLinkPermission { @@ -330,7 +145,7 @@ public class SharingLinkPermission } /// - /// link + /// Internal structure for sharing links /// public class SharingLink { @@ -340,7 +155,7 @@ public class SharingLink } /// - /// Response for Copy file (deprecated) + /// Blob metadata /// public class BlobMetadata { @@ -388,7 +203,7 @@ public class BlobMetadata } /// - /// Response for Update file + /// Represents blob datasets metadata response /// public class BlobMetadataResponse { @@ -464,7 +279,7 @@ public class CreateNewFolderResponse } /// - /// Response for Resolve person + /// SharePoint expanded user field /// public class SPListExpandedUser { @@ -498,21 +313,7 @@ public class SPListExpandedUser } /// - /// Response for Returns User fields for a list - /// - public class SPListEntity - { - /// The Id of the SPField - [JsonPropertyName("Id")] - public string Id { get; set; } - - /// What type of entity (field) this is - [JsonPropertyName("EntityType")] - public string EntityType { get; set; } - } - - /// - /// Response for Get form metadata (preview) + /// Represents a table form with its metadata /// public class TableForm { @@ -558,7 +359,7 @@ public class TableForm } /// - /// Item in Gets or sets Form Fields + /// Represents metadata for a form field /// public class FormFieldMetadata { @@ -598,7 +399,7 @@ public class SubmitDocGenFormInput } /// - /// Response for Get files (properties only) + /// List of Items /// public class ItemsList { @@ -608,7 +409,7 @@ public class ItemsList } /// - /// Item in List of Items + /// Table item entity /// [DynamicSchema("GetTable")] public class Item @@ -710,7 +511,7 @@ public class CreateApprovalRequestInput } /// - /// Response for Create an approval request for an item or file + /// Output object of the new approval request /// public class ApprovalData { @@ -762,7 +563,7 @@ public class PatchFileItemResponse } /// - /// Response for Set content approval status + /// SetApprovalStatus output /// public class SetApprovalStatusOutput { @@ -789,7 +590,7 @@ public class SetApprovalStatusOutput } /// - /// Response for Get attachments + /// SharePoint list item attachment /// public class SPListItemAttachment { @@ -807,7 +608,7 @@ public class SPListItemAttachment } /// - /// Response for When a file is deleted + /// List of Deleted items /// public class DeletedItemList { @@ -817,7 +618,7 @@ public class DeletedItemList } /// - /// Item in List of Deleted Items + /// An item deleted from a SharePoint list or library /// public class DeletedItem { @@ -862,29 +663,228 @@ public class CreateContentAssemblyDocumentInput } /// - /// CopyFileParameters + /// List of datasets /// - public class CopyFileParameters + public class DataSetsList { - /// File Identifier - [JsonPropertyName("sourceFileId")] - public string FileToCopy { get; set; } + /// List of datasets + [JsonPropertyName("value")] + public List Value { get; set; } + } - /// Example: https://contoso.sharepoint.com/sites/sitename - [JsonPropertyName("destinationDataset")] - public string DestinationSiteAddress { get; set; } + /// + /// Dataset + /// + public class DataSet + { + /// Dataset name + [JsonPropertyName("Name")] + public string Name { get; set; } - /// Destination Folder - [JsonPropertyName("destinationFolderPath")] - public string DestinationFolder { get; set; } + /// Dataset display name + [JsonPropertyName("DisplayName")] + public string DisplayName { get; set; } - /// Pick one of the options available - [JsonPropertyName("nameConflictBehavior")] - public int? IfAnotherFileIsAlreadyThere { get; set; } + /// Pass-through Native Queries + [JsonPropertyName("query")] + [JsonInclude] + public List Query { get; init; } } /// - /// CopyFolderParameters + /// static schema for pass-through native query execution + /// + public class PassThroughNativeQuery + { + /// Query language + [JsonPropertyName("Language")] + public string Language { get; set; } + } + + /// + /// Table metadata + /// + public class TableMetadata + { + /// Table name + [JsonPropertyName("name")] + public string Name { get; set; } + + /// Table title + [JsonPropertyName("title")] + public string Title { get; set; } + + /// Table permission + [JsonPropertyName("x-ms-permission")] + public string XMsPermission { get; set; } + + /// x-ms-capabilities + [JsonPropertyName("x-ms-capabilities")] + public TableCapabilitiesMetadata XMsCapabilities { get; set; } + + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + + /// referencedEntities + [JsonPropertyName("referencedEntities")] + public ObjectEntity ReferencedEntities { get; set; } + + /// URL link + [JsonPropertyName("webUrl")] + public string WebUrl { get; set; } + } + + /// + /// Metadata for a table (capabilities) + /// + public class TableCapabilitiesMetadata + { + /// sortRestrictions + [JsonPropertyName("sortRestrictions")] + public TableSortRestrictionsMetadata SortRestrictions { get; set; } + + /// filterRestrictions + [JsonPropertyName("filterRestrictions")] + public TableFilterRestrictionsMetadata FilterRestrictions { get; set; } + + /// selectRestrictions + [JsonPropertyName("selectRestrictions")] + public TableSelectRestrictionsMetadata SelectRestrictions { get; set; } + + /// countRestrictions + [JsonPropertyName("countRestrictions")] + public TableCountRestrictionsMetadata CountRestrictions { get; set; } + + /// Server paging restrictions + [JsonPropertyName("isOnlyServerPagable")] + public bool? IsOnlyServerPagable { get; set; } + + /// List of supported filter capabilities + [JsonPropertyName("filterFunctionSupport")] + public List FilterFunctionSupport { get; set; } + + /// List of supported server-driven paging capabilities + [JsonPropertyName("serverPagingOptions")] + public List ServerPagingOptions { get; set; } + } + + /// + /// Metadata for a table (sort restrictions) + /// + public class TableSortRestrictionsMetadata + { + /// Indicates whether this table has sortable columns + [JsonPropertyName("sortable")] + public bool? Sortable { get; set; } + + /// List of unsortable properties + [JsonPropertyName("unsortableProperties")] + public List UnsortableProperties { get; set; } + + /// List of properties which support ascending order only + [JsonPropertyName("ascendingOnlyProperties")] + public List AscendingOnlyProperties { get; set; } + } + + /// + /// Metadata for a table (filter restrictions) + /// + public class TableFilterRestrictionsMetadata + { + /// Indicates whether this table has filterable columns + [JsonPropertyName("filterable")] + public bool? Filterable { get; set; } + + /// List of non filterable properties + [JsonPropertyName("nonFilterableProperties")] + public List NonFilterableProperties { get; set; } + + /// List of required properties + [JsonPropertyName("requiredProperties")] + public List RequiredProperties { get; set; } + } + + /// + /// Metadata for a table (select restrictions) + /// + public class TableSelectRestrictionsMetadata + { + /// Indicates whether this table has selectable columns + [JsonPropertyName("selectable")] + public bool? Selectable { get; set; } + } + + /// + /// Metadata for a table (count restrictions) + /// + public class TableCountRestrictionsMetadata + { + /// Indicates whether this table has countable columns + [JsonPropertyName("countable")] + public bool? Countable { get; set; } + } + + /// + /// schema + /// + public class ObjectEntity + { + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// Lightweight object representing a list "entity" (field) + /// + public class SPListEntity + { + /// The Id of the SPField + [JsonPropertyName("Id")] + public string Id { get; set; } + + /// What type of entity (field) this is + [JsonPropertyName("EntityType")] + public string EntityType { get; set; } + } + + /// + /// Output object of GetItemChangesMetadata operation + /// + public class GetItemChangesMetadataResponse + { + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + } + + /// + /// Body parameters for SharePoint copy file operation + /// + public class CopyFileParameters + { + /// File Identifier + [JsonPropertyName("sourceFileId")] + public string FileToCopy { get; set; } + + /// Example: https://contoso.sharepoint.com/sites/sitename + [JsonPropertyName("destinationDataset")] + public string DestinationSiteAddress { get; set; } + + /// Destination Folder + [JsonPropertyName("destinationFolderPath")] + public string DestinationFolder { get; set; } + + /// Pick one of the options available + [JsonPropertyName("nameConflictBehavior")] + public int? IfAnotherFileIsAlreadyThere { get; set; } + } + + /// + /// Body parameters for SharePoint copy folder operation /// public class CopyFolderParameters { @@ -924,7 +924,7 @@ public class CreateNewDocumentSetParameters } /// - /// CreateNewFolderParameters + /// Body parameters for SharePoint Create New Folder operation /// public class CreateNewFolderParameters { @@ -934,7 +934,7 @@ public class CreateNewFolderParameters } /// - /// FileCheckInParameters + /// Body parameters for SharePoint checkin file operation /// public class FileCheckInParameters { @@ -948,7 +948,7 @@ public class FileCheckInParameters } /// - /// ItemGrantAccessBody + /// Parameters for grant access action /// public class ItemGrantAccessBody { @@ -970,7 +970,7 @@ public class ItemGrantAccessBody } /// - /// ItemPermissionCreateLinkBody + /// Parameters for add permission action /// public class ItemPermissionCreateLinkBody { @@ -988,7 +988,7 @@ public class ItemPermissionCreateLinkBody } /// - /// MoveFileParameters + /// Body parameters for SharePoint move file operation /// public class MoveFileParameters { @@ -1010,7 +1010,7 @@ public class MoveFileParameters } /// - /// MoveFolderParameters + /// Body parameters for SharePoint move folder operation /// public class MoveFolderParameters { @@ -1032,7 +1032,7 @@ public class MoveFolderParameters } /// - /// PatchFileItemWithPredictedValuesParameters + /// Body parameters for SharePoint PatchFileItemWithPredictedValues HttpRequest operation /// public class PatchFileItemWithPredictedValuesParameters { @@ -1046,7 +1046,7 @@ public class PatchFileItemWithPredictedValuesParameters } /// - /// SharePointHttpRequestBodyParameters + /// Body parameters for SharePoint HttpRequest operation /// public class SharePointHttpRequestBodyParameters { @@ -1140,170 +1140,58 @@ public MethodJsonConverter() { } public static class SharePointOnlineModelFactory { /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableMetadata TableMetadata( + public static SPBlobMetadataResponse SPBlobMetadataResponse( + long? itemId = default, + string id = default, string name = default, - string title = default, - string xMsPermission = default, - TableCapabilitiesMetadata xMsCapabilities = default, - ObjectEntity schema = default, - ObjectEntity referencedEntities = default, - string webUrl = default) + string displayName = default, + string path = default, + DateTime? lastModified = default, + long? size = default, + string mediaType = default, + bool? isFolder = default, + string eTag = default, + string fileLocator = default) { - return new TableMetadata + return new SPBlobMetadataResponse { + ItemId = itemId, + Id = id, Name = name, - Title = title, - XMsPermission = xMsPermission, - XMsCapabilities = xMsCapabilities, - Schema = schema, - ReferencedEntities = referencedEntities, - WebUrl = webUrl, + DisplayName = displayName, + Path = path, + LastModified = lastModified, + Size = size, + MediaType = mediaType, + IsFolder = isFolder, + ETag = eTag, + FileLocator = fileLocator, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableCapabilitiesMetadata TableCapabilitiesMetadata( - TableSortRestrictionsMetadata sortRestrictions = default, - TableFilterRestrictionsMetadata filterRestrictions = default, - TableSelectRestrictionsMetadata selectRestrictions = default, - TableCountRestrictionsMetadata countRestrictions = default, - bool? isOnlyServerPagable = default, - List filterFunctionSupport = default, - List serverPagingOptions = default) + public static TablesList TablesList( + List
value = default) { - return new TableCapabilitiesMetadata + return new TablesList { - SortRestrictions = sortRestrictions, - FilterRestrictions = filterRestrictions, - SelectRestrictions = selectRestrictions, - CountRestrictions = countRestrictions, - IsOnlyServerPagable = isOnlyServerPagable, - FilterFunctionSupport = filterFunctionSupport, - ServerPagingOptions = serverPagingOptions, + Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( - bool? sortable = default, - List unsortableProperties = default, - List ascendingOnlyProperties = default) + public static Table Table( + string name = default, + string displayName = default, + JsonElement? dynamicProperties = default) { - return new TableSortRestrictionsMetadata - { - Sortable = sortable, - UnsortableProperties = unsortableProperties, - AscendingOnlyProperties = ascendingOnlyProperties, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( - bool? filterable = default, - List nonFilterableProperties = default, - List requiredProperties = default) - { - return new TableFilterRestrictionsMetadata - { - Filterable = filterable, - NonFilterableProperties = nonFilterableProperties, - RequiredProperties = requiredProperties, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( - bool? selectable = default) - { - return new TableSelectRestrictionsMetadata - { - Selectable = selectable, - }; - } - - /// - /// Creates a new instance of . - /// - public static TableCountRestrictionsMetadata TableCountRestrictionsMetadata( - bool? countable = default) - { - return new TableCountRestrictionsMetadata - { - Countable = countable, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetItemChangesMetadataResponse GetItemChangesMetadataResponse( - ObjectEntity schema = default) - { - return new GetItemChangesMetadataResponse - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static DataSetsList DataSetsList( - List value = default) - { - return new DataSetsList - { - Value = value, - }; - } - - /// - /// Creates a new instance of . - /// - public static DataSet DataSet( - string name = default, - string displayName = default, - List query = default) - { - return new DataSet - { - Name = name, - DisplayName = displayName, - Query = query, - }; - } - - /// - /// Creates a new instance of . - /// - public static PassThroughNativeQuery PassThroughNativeQuery( - string language = default) - { - return new PassThroughNativeQuery - { - Language = language, - }; - } - - /// - /// Creates a new instance of . - /// - public static Table Table( - string name = default, - string displayName = default, - JsonElement? dynamicProperties = default) - { - return new Table + return new Table { Name = name, DisplayName = displayName, @@ -1311,50 +1199,6 @@ public static Table Table( }; } - /// - /// Creates a new instance of . - /// - public static SPBlobMetadataResponse SPBlobMetadataResponse( - long? itemId = default, - string id = default, - string name = default, - string displayName = default, - string path = default, - DateTime? lastModified = default, - long? size = default, - string mediaType = default, - bool? isFolder = default, - string eTag = default, - string fileLocator = default) - { - return new SPBlobMetadataResponse - { - ItemId = itemId, - Id = id, - Name = name, - DisplayName = displayName, - Path = path, - LastModified = lastModified, - Size = size, - MediaType = mediaType, - IsFolder = isFolder, - ETag = eTag, - FileLocator = fileLocator, - }; - } - - /// - /// Creates a new instance of . - /// - public static TablesList TablesList( - List
value = default) - { - return new TablesList - { - Value = value, - }; - } - /// /// Creates a new instance of . /// @@ -1475,20 +1319,6 @@ public static SPListExpandedUser SPListExpandedUser( }; } - /// - /// Creates a new instance of . - /// - public static SPListEntity SPListEntity( - string id = default, - string entityType = default) - { - return new SPListEntity - { - Id = id, - EntityType = entityType, - }; - } - /// /// Creates a new instance of . /// @@ -1646,83 +1476,253 @@ public static DeletedItem DeletedItem( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static CopyFileParameters CopyFileParameters( - string fileToCopy = default, - string destinationSiteAddress = default, - string destinationFolder = default, - int? ifAnotherFileIsAlreadyThere = default) + public static DataSetsList DataSetsList( + List value = default) { - return new CopyFileParameters + return new DataSetsList { - FileToCopy = fileToCopy, - DestinationSiteAddress = destinationSiteAddress, - DestinationFolder = destinationFolder, - IfAnotherFileIsAlreadyThere = ifAnotherFileIsAlreadyThere, + Value = value, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static CopyFolderParameters CopyFolderParameters( - string folderToCopy = default, - string destinationSiteAddress = default, - string destinationFolder = default, - int? ifAnotherFolderIsAlreadyThere = default) + public static DataSet DataSet( + string name = default, + string displayName = default, + List query = default) { - return new CopyFolderParameters + return new DataSet { - FolderToCopy = folderToCopy, - DestinationSiteAddress = destinationSiteAddress, - DestinationFolder = destinationFolder, - IfAnotherFolderIsAlreadyThere = ifAnotherFolderIsAlreadyThere, + Name = name, + DisplayName = displayName, + Query = query, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static CreateNewDocumentSetParameters CreateNewDocumentSetParameters( - string documentSetPath = default, - string contentTypeId = default, - JsonElement? dynamicProperties = default) + public static PassThroughNativeQuery PassThroughNativeQuery( + string language = default) { - return new CreateNewDocumentSetParameters + return new PassThroughNativeQuery { - DocumentSetPath = documentSetPath, - ContentTypeId = contentTypeId, - DynamicProperties = dynamicProperties, + Language = language, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static CreateNewFolderParameters CreateNewFolderParameters( - string folderPath = default) + public static TableMetadata TableMetadata( + string name = default, + string title = default, + string xMsPermission = default, + TableCapabilitiesMetadata xMsCapabilities = default, + ObjectEntity schema = default, + ObjectEntity referencedEntities = default, + string webUrl = default) { - return new CreateNewFolderParameters + return new TableMetadata { - FolderPath = folderPath, + Name = name, + Title = title, + XMsPermission = xMsPermission, + XMsCapabilities = xMsCapabilities, + Schema = schema, + ReferencedEntities = referencedEntities, + WebUrl = webUrl, }; } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static FileCheckInParameters FileCheckInParameters( - string comments = default, - int? checkInType = default) + public static TableCapabilitiesMetadata TableCapabilitiesMetadata( + TableSortRestrictionsMetadata sortRestrictions = default, + TableFilterRestrictionsMetadata filterRestrictions = default, + TableSelectRestrictionsMetadata selectRestrictions = default, + TableCountRestrictionsMetadata countRestrictions = default, + bool? isOnlyServerPagable = default, + List filterFunctionSupport = default, + List serverPagingOptions = default) { - return new FileCheckInParameters + return new TableCapabilitiesMetadata { - Comments = comments, - CheckInType = checkInType, - }; - } - + SortRestrictions = sortRestrictions, + FilterRestrictions = filterRestrictions, + SelectRestrictions = selectRestrictions, + CountRestrictions = countRestrictions, + IsOnlyServerPagable = isOnlyServerPagable, + FilterFunctionSupport = filterFunctionSupport, + ServerPagingOptions = serverPagingOptions, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableSortRestrictionsMetadata TableSortRestrictionsMetadata( + bool? sortable = default, + List unsortableProperties = default, + List ascendingOnlyProperties = default) + { + return new TableSortRestrictionsMetadata + { + Sortable = sortable, + UnsortableProperties = unsortableProperties, + AscendingOnlyProperties = ascendingOnlyProperties, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableFilterRestrictionsMetadata TableFilterRestrictionsMetadata( + bool? filterable = default, + List nonFilterableProperties = default, + List requiredProperties = default) + { + return new TableFilterRestrictionsMetadata + { + Filterable = filterable, + NonFilterableProperties = nonFilterableProperties, + RequiredProperties = requiredProperties, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableSelectRestrictionsMetadata TableSelectRestrictionsMetadata( + bool? selectable = default) + { + return new TableSelectRestrictionsMetadata + { + Selectable = selectable, + }; + } + + /// + /// Creates a new instance of . + /// + public static TableCountRestrictionsMetadata TableCountRestrictionsMetadata( + bool? countable = default) + { + return new TableCountRestrictionsMetadata + { + Countable = countable, + }; + } + + /// + /// Creates a new instance of . + /// + public static SPListEntity SPListEntity( + string id = default, + string entityType = default) + { + return new SPListEntity + { + Id = id, + EntityType = entityType, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetItemChangesMetadataResponse GetItemChangesMetadataResponse( + ObjectEntity schema = default) + { + return new GetItemChangesMetadataResponse + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static CopyFileParameters CopyFileParameters( + string fileToCopy = default, + string destinationSiteAddress = default, + string destinationFolder = default, + int? ifAnotherFileIsAlreadyThere = default) + { + return new CopyFileParameters + { + FileToCopy = fileToCopy, + DestinationSiteAddress = destinationSiteAddress, + DestinationFolder = destinationFolder, + IfAnotherFileIsAlreadyThere = ifAnotherFileIsAlreadyThere, + }; + } + + /// + /// Creates a new instance of . + /// + public static CopyFolderParameters CopyFolderParameters( + string folderToCopy = default, + string destinationSiteAddress = default, + string destinationFolder = default, + int? ifAnotherFolderIsAlreadyThere = default) + { + return new CopyFolderParameters + { + FolderToCopy = folderToCopy, + DestinationSiteAddress = destinationSiteAddress, + DestinationFolder = destinationFolder, + IfAnotherFolderIsAlreadyThere = ifAnotherFolderIsAlreadyThere, + }; + } + + /// + /// Creates a new instance of . + /// + public static CreateNewDocumentSetParameters CreateNewDocumentSetParameters( + string documentSetPath = default, + string contentTypeId = default, + JsonElement? dynamicProperties = default) + { + return new CreateNewDocumentSetParameters + { + DocumentSetPath = documentSetPath, + ContentTypeId = contentTypeId, + DynamicProperties = dynamicProperties, + }; + } + + /// + /// Creates a new instance of . + /// + public static CreateNewFolderParameters CreateNewFolderParameters( + string folderPath = default) + { + return new CreateNewFolderParameters + { + FolderPath = folderPath, + }; + } + + /// + /// Creates a new instance of . + /// + public static FileCheckInParameters FileCheckInParameters( + string comments = default, + int? checkInType = default) + { + return new FileCheckInParameters + { + Comments = comments, + CheckInType = checkInType, + }; + } + /// /// Creates a new instance of . /// @@ -2042,6 +2042,20 @@ public static class SharePointOnlineTriggerParameters /// public static class OnChangedItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list name + /// Required. + /// Dynamic values from: GetTablesForListsAndLibraries. + /// + public const string Table = "table"; + /// /// Select a folder, or leave blank for the whole library /// @@ -2060,6 +2074,20 @@ public static class OnChangedItems /// public static class OnDeletedFileItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint library name + /// Required. + /// Dynamic values from: GetTablesForLibraries. + /// + public const string Table = "table"; + /// /// Select a folder, or leave blank for the whole library /// @@ -2067,11 +2095,46 @@ public static class OnDeletedFileItems } + /// + /// Input parameters for the OnDeletedItems trigger operation (operationId: GetOnDeletedItems). + /// + public static class OnDeletedItems + { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list name + /// Required. + /// Dynamic values from: GetTables. + /// + public const string Table = "table"; + + } + /// /// Input parameters for the OnNewFileItems trigger operation (operationId: GetOnNewFileItems). /// public static class OnNewFileItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint library name + /// Required. + /// Dynamic values from: GetTablesForLibraries. + /// + public const string Table = "table"; + /// /// Select a folder, or leave blank for the whole library /// @@ -2090,6 +2153,20 @@ public static class OnNewFileItems /// public static class OnNewItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list name + /// Required. + /// Dynamic values from: GetTables. + /// + public const string Table = "table"; + /// /// Avoid column threshold issues by only using columns defined in a view /// Dynamic values from: GetTableViews. @@ -2103,6 +2180,20 @@ public static class OnNewItems /// public static class OnNewItemsFromForm { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list or library name + /// Required. + /// Dynamic values from: GetTablesForListsAndLibraries. + /// + public const string Table = "table"; + /// /// Form identifier /// Required. @@ -2123,6 +2214,20 @@ public static class OnNewItemsFromForm /// public static class OnRecurrenceDigest { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename. + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list or library name. + /// Required. + /// Dynamic values from: GetTablesForListsAndLibraries. + /// + public const string Table = "table"; + /// /// Include item updates in the digest. /// Required. @@ -2165,6 +2270,20 @@ public static class OnRecurrenceDigest /// public static class OnUpdatedFileClassifiedTimes { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint library name + /// Required. + /// Dynamic values from: GetTablesForLibraries. + /// + public const string Table = "table"; + /// /// Select a folder, or leave blank for the whole library /// @@ -2183,6 +2302,20 @@ public static class OnUpdatedFileClassifiedTimes /// public static class OnUpdatedFileItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint library name + /// Required. + /// Dynamic values from: GetTablesForLibraries. + /// + public const string Table = "table"; + /// /// Select a folder, or leave blank for the whole library /// @@ -2201,6 +2334,20 @@ public static class OnUpdatedFileItems /// public static class OnUpdatedItems { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// SharePoint list name + /// Required. + /// Dynamic values from: GetTables. + /// + public const string Table = "table"; + /// /// Avoid column threshold issues by only using columns defined in a view /// Dynamic values from: GetTableViews. @@ -2215,7 +2362,14 @@ public static class OnUpdatedItems public static class OnNewFile { /// - /// Select a folder. + /// Example: https://contoso.sharepoint.com/sites/sitename. + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + + /// + /// Select a folder. /// Required. /// public const string FolderId = "folderId"; @@ -2239,6 +2393,13 @@ public static class OnNewFile /// public static class OnUpdatedFile { + /// + /// Example: https://contoso.sharepoint.com/sites/sitename. + /// Required. + /// Dynamic values from: GetDataSets. + /// + public const string Dataset = "dataset"; + /// /// Select a folder. /// Required. @@ -2335,124 +2496,6 @@ protected SharePointOnlineClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get list metadata - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address - /// List Name - /// Limit Columns by View - /// Limit Columns by Content Type - /// Cancellation token. - /// The Get list metadata response. - public virtual async Task GetTableAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, string limitColumnsByContentType = default, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listName is null) - throw new ArgumentNullException(nameof(listName)); - var queryParams = new List(); - if (limitColumnsByView != default) - queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); - if (limitColumnsByContentType != default) - queryParams.Add($"contentTypeId={Uri.EscapeDataString(limitColumnsByContentType.ToString())}"); - var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get metadata about the return type of the GetItemChanges operation - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address - /// List or Library Name - /// Cancellation token. - /// The Get metadata about the return type of the GetItemChanges operation response. - public virtual async Task GetItemChangesMetadataAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibraryName, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetItemChangesMetadataAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listOrLibraryName is null) - throw new ArgumentNullException(nameof(listOrLibraryName)); - var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listOrLibraryName.ToString()))}/items/changes"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get datasets - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get datasets response. - public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDataSetsAsync"); - try - { - var path = $"/datasets"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Agreements Solution - Get Templates - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Example: https://contoso.sharepoint.com/sites/sitename - /// Cancellation token. - /// The Agreements Solution - Get Templates response. - public virtual async Task> GetAgreementsSolutionTemplatesAsync(string dataset, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAgreementsSolutionTemplatesAsync"); - try - { - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/agreements/templates"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Agreements Solution - Generate document within Agreements Solution workspace /// @@ -2488,36 +2531,6 @@ public virtual async Task CreateAgreementsSolutionDocume } } - /// - /// Agreements Solution - Get template fields - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Example: https://contoso.sharepoint.com/sites/sitename - /// Agreements Solution template - /// Cancellation token. - /// The Agreements Solution - Get template fields response. - public virtual async Task GetAgreementsSolutionTemplateFieldsAsync(string dataset, string agreementsSolutionTemplate, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAgreementsSolutionTemplateFieldsAsync"); - try - { - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - if (agreementsSolutionTemplate is null) - throw new ArgumentNullException(nameof(agreementsSolutionTemplate)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/agreements/templates/{Uri.EscapeDataString(Uri.EscapeDataString(agreementsSolutionTemplate.ToString()))}/fields"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get all lists and libraries /// @@ -2897,6 +2910,63 @@ public virtual async Task GetFileContentAsync([DynamicValues("GetDataSet } } + /// + /// List root folder + /// + /// Returns files in the root SharePoint folder. + /// Site Address + /// Cancellation token. + /// The List root folder response. + public virtual async Task> ListRootFolderAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.ListRootFolderAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/folders"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// List folder + /// + /// Returns files contained in a SharePoint folder. + /// Site Address + /// File Identifier + /// Cancellation token. + /// The List folder response. + public virtual async Task> ListFolderAsync([DynamicValues("GetDataSets")] string siteAddress, string fileIdentifier, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.ListFolderAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + if (fileIdentifier is null) + throw new ArgumentNullException(nameof(fileIdentifier)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/folders/{Uri.EscapeDataString(fileIdentifier.ToString())}"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Get file metadata using path /// @@ -3275,25 +3345,36 @@ public virtual async Task CreateNewFolderAsync([Dynamic } /// - /// Get document generation forms + /// Resolve person /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Returns a single matching user value so it can be assigned to a column of type person. If there are no matches, or multiple matches, this action will error out. /// Site Address - /// Document Library Name + /// List or Library + /// Column + /// Email or name + /// Limit Columns by View /// Cancellation token. - /// The Get document generation forms response. - public virtual async Task> GetDocGenFormsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForLibraries")] string documentLibraryName, CancellationToken cancellationToken = default) + /// The Resolve person response. + public virtual async Task SearchForUserAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibrary, [DynamicValues("GetEntitiesForUser")] string column, string emailOrName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDocGenFormsAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.SearchForUserAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); - if (documentLibraryName is null) - throw new ArgumentNullException(nameof(documentLibraryName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(documentLibraryName.ToString()))}/docgenforms"; + if (listOrLibrary is null) + throw new ArgumentNullException(nameof(listOrLibrary)); + if (column is null) + throw new ArgumentNullException(nameof(column)); + var queryParams = new List(); + if (emailOrName is null) + throw new ArgumentNullException(nameof(emailOrName)); + queryParams.Add($"searchValue={Uri.EscapeDataString(emailOrName.ToString())}"); + if (limitColumnsByView != default) + queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listOrLibrary.ToString()))}/entities/{Uri.EscapeDataString(Uri.EscapeDataString(column.ToString()))}/searchforuser" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -3305,155 +3386,17 @@ public virtual async Task> GetDocGenFormsAsync([DynamicValues("GetDa } /// - /// Get document generation form fields + /// Get form metadata (preview) /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Example: https://contoso.sharepoint.com/sites/sitename - /// SharePoint list name - /// Form identifier + /// Use this action to get the form metadata, which includes the form ID, title, link, form type, and the output format. It also gets the form questions used to collect information. Document generation forms is a part of AI in SharePoint Public Preview. For more info on getting started, see: https://learn.microsoft.com/sharepoint/dev/declarative-customization/structured-documents. + /// Site Address + /// List or Library Name + /// Form Name /// Cancellation token. - /// The Get document generation form fields response. - public virtual async Task GetDocGenFormFieldsAsync(string dataset, string sharePointListName, string formIdentifier, CancellationToken cancellationToken = default) + /// The Get form metadata (preview) response. + public virtual async Task GetTableFormAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibraryName, [DynamicValues("GetTableForms")] string formName, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDocGenFormFieldsAsync"); - try - { - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - if (sharePointListName is null) - throw new ArgumentNullException(nameof(sharePointListName)); - if (formIdentifier is null) - throw new ArgumentNullException(nameof(formIdentifier)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointListName.ToString()))}/docgenforms/{Uri.EscapeDataString(Uri.EscapeDataString(formIdentifier.ToString()))}/fields"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Resolve person - /// - /// Returns a single matching user value so it can be assigned to a column of type person. If there are no matches, or multiple matches, this action will error out. - /// Site Address - /// List or Library - /// Column - /// Email or name - /// Limit Columns by View - /// Cancellation token. - /// The Resolve person response. - public virtual async Task SearchForUserAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibrary, [DynamicValues("GetEntitiesForUser")] string column, string emailOrName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.SearchForUserAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listOrLibrary is null) - throw new ArgumentNullException(nameof(listOrLibrary)); - if (column is null) - throw new ArgumentNullException(nameof(column)); - var queryParams = new List(); - if (emailOrName is null) - throw new ArgumentNullException(nameof(emailOrName)); - queryParams.Add($"searchValue={Uri.EscapeDataString(emailOrName.ToString())}"); - if (limitColumnsByView != default) - queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listOrLibrary.ToString()))}/entities/{Uri.EscapeDataString(Uri.EscapeDataString(column.ToString()))}/searchforuser" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Returns User fields for a list - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address - /// List Name - /// Limit Columns by View - /// Cancellation token. - /// The Returns User fields for a list response. - public virtual async Task> GetEntitiesForUserAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetEntitiesForUserAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listName is null) - throw new ArgumentNullException(nameof(listName)); - var queryParams = new List(); - if (limitColumnsByView != default) - queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/entitiesfor/user" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get list forms - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address - /// List Name - /// Cancellation token. - /// The Get list forms response. - public virtual async Task> GetTableFormsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableFormsAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listName is null) - throw new ArgumentNullException(nameof(listName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/forms"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get form metadata (preview) - /// - /// Use this action to get the form metadata, which includes the form ID, title, link, form type, and the output format. It also gets the form questions used to collect information. Document generation forms is a part of AI in SharePoint Public Preview. For more info on getting started, see: https://learn.microsoft.com/sharepoint/dev/declarative-customization/structured-documents. - /// Site Address - /// List or Library Name - /// Form Name - /// Cancellation token. - /// The Get form metadata (preview) response. - public virtual async Task GetTableFormAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibraryName, [DynamicValues("GetTableForms")] string formName, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableFormAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableFormAsync"); try { if (siteAddress is null) @@ -3562,36 +3505,6 @@ public virtual async Task GetFileItemsAsync([DynamicValues("GetDataSe } } - /// - /// Get list image fields - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address - /// List Name - /// Cancellation token. - /// The Get list image fields response. - public virtual async Task> GetListImageFieldsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, CancellationToken cancellationToken = default) - { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetListImageFieldsAsync"); - try - { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listName is null) - throw new ArgumentNullException(nameof(listName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/imagefields"; - return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get items /// @@ -4269,18 +4182,301 @@ await this /// The Get attachment content response. public virtual async Task GetAttachmentContentAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, int id, string fileIdentifier, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAttachmentContentAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAttachmentContentAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + if (listName is null) + throw new ArgumentNullException(nameof(listName)); + if (fileIdentifier is null) + throw new ArgumentNullException(nameof(fileIdentifier)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/items/{Uri.EscapeDataString(Uri.EscapeDataString(id.ToString()))}/attachments/{Uri.EscapeDataString(fileIdentifier.ToString())}/$value"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Generate document using Microsoft Syntex (preview) + /// + /// Use this action to create documents based on modern templates from Microsoft Syntex. This preview requires a Syntex license. Pricing is subject to change. For more info see: https://docs.microsoft.com/en-us/microsoft-365/contentunderstanding/content-assembly. + /// Site Address + /// Document Library Name + /// Document Template + /// The request body. + /// Folder Path + /// File Name + /// View (no effect) + /// Cancellation token. + /// The Generate document using Microsoft Syntex (preview) response. + public virtual async Task CreateContentAssemblyDocumentAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForLibraries")] string documentLibraryName, [DynamicValues("GetContentAssemblyTemplates")] string documentTemplate, CreateContentAssemblyDocumentInput input, string folderPath = default, string fileName = default, string viewNoEffect = default, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.CreateContentAssemblyDocumentAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + if (documentLibraryName is null) + throw new ArgumentNullException(nameof(documentLibraryName)); + if (documentTemplate is null) + throw new ArgumentNullException(nameof(documentTemplate)); + var queryParams = new List(); + if (folderPath != default) + queryParams.Add($"folderPath={Uri.EscapeDataString(folderPath.ToString())}"); + if (fileName != default) + queryParams.Add($"fileName={Uri.EscapeDataString(fileName.ToString())}"); + if (viewNoEffect != default) + queryParams.Add($"view={Uri.EscapeDataString(viewNoEffect.ToString())}"); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(documentLibraryName.ToString()))}/templates/{Uri.EscapeDataString(Uri.EscapeDataString(documentTemplate.ToString()))}/createnewdocument" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get list views + /// + /// Gets views from a SharePoint list. + /// Site Address + /// List Name + /// Cancellation token. + /// The Get list views response. + public virtual async Task> GetTableViewsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableViewsAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + if (listName is null) + throw new ArgumentNullException(nameof(listName)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/views"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Extract folder + /// + /// Extracts an archive file into a SharePoint folder (example: .zip). + /// Site Address + /// Source File Path + /// Destination Folder Path + /// Overwrite Flag + /// Cancellation token. + /// The Extract folder response. + public virtual async Task> ExtractFolderAsync([DynamicValues("GetDataSets")] string siteAddress, string sourceFilePath, string destinationFolderPath, bool? overwriteFlag = default, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.ExtractFolderAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + var queryParams = new List(); + queryParams.Add("queryParametersSingleEncoded=true"); + if (sourceFilePath is null) + throw new ArgumentNullException(nameof(sourceFilePath)); + queryParams.Add($"source={Uri.EscapeDataString(sourceFilePath.ToString())}"); + if (destinationFolderPath is null) + throw new ArgumentNullException(nameof(destinationFolderPath)); + queryParams.Add($"destination={Uri.EscapeDataString(destinationFolderPath.ToString())}"); + if (overwriteFlag.HasValue) + queryParams.Add($"overwrite={Uri.EscapeDataString(overwriteFlag.Value.ToString())}"); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/extractFolderV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync>(HttpMethod.Post, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get datasets + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get datasets response. + public virtual async Task GetDataSetsAsync(CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDataSetsAsync"); + try + { + var path = $"/datasets"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Agreements Solution - Get Templates + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Cancellation token. + /// The Agreements Solution - Get Templates response. + public virtual async Task> GetAgreementsSolutionTemplatesAsync(string dataset, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAgreementsSolutionTemplatesAsync"); + try + { + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/agreements/templates"; + return await this + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Agreements Solution - Get template fields + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Example: https://contoso.sharepoint.com/sites/sitename + /// Agreements Solution template + /// Cancellation token. + /// The Agreements Solution - Get template fields response. + public virtual async Task GetAgreementsSolutionTemplateFieldsAsync(string dataset, string agreementsSolutionTemplate, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetAgreementsSolutionTemplateFieldsAsync"); + try + { + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + if (agreementsSolutionTemplate is null) + throw new ArgumentNullException(nameof(agreementsSolutionTemplate)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/agreements/templates/{Uri.EscapeDataString(Uri.EscapeDataString(agreementsSolutionTemplate.ToString()))}/fields"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get libraries + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Site Address + /// Cancellation token. + /// The Get libraries response. + public virtual async Task GetTablesForLibrariesAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForLibrariesAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/libraries"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get lists and libraries + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Site Address + /// Cancellation token. + /// The Get lists and libraries response. + public virtual async Task GetTablesForListsAndLibrariesAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForListsAndLibrariesAsync"); + try + { + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/listsandlibraries"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Returns User fields for a list + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Site Address + /// List Name + /// Limit Columns by View + /// Cancellation token. + /// The Returns User fields for a list response. + public virtual async Task> GetEntitiesForUserAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, CancellationToken cancellationToken = default) + { + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetEntitiesForUserAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); if (listName is null) throw new ArgumentNullException(nameof(listName)); - if (fileIdentifier is null) - throw new ArgumentNullException(nameof(fileIdentifier)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/items/{Uri.EscapeDataString(Uri.EscapeDataString(id.ToString()))}/attachments/{Uri.EscapeDataString(fileIdentifier.ToString())}/$value"; + var queryParams = new List(); + if (limitColumnsByView != default) + queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/entitiesfor/user" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4292,23 +4488,23 @@ public virtual async Task GetAttachmentContentAsync([DynamicValues("GetD } /// - /// Get document library templates + /// Get list forms /// /// Discovery method used to populate dynamic parameter values at design time. - /// Example: https://contoso.sharepoint.com/sites/sitename - /// SharePoint document library name + /// Site Address + /// List Name /// Cancellation token. - /// The Get document library templates response. - public virtual async Task> GetContentAssemblyTemplatesAsync(string dataset, string sharePointDocumentLibraryName, CancellationToken cancellationToken = default) + /// The Get list forms response. + public virtual async Task> GetTableFormsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetContentAssemblyTemplatesAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableFormsAsync"); try { - if (dataset is null) - throw new ArgumentNullException(nameof(dataset)); - if (sharePointDocumentLibraryName is null) - throw new ArgumentNullException(nameof(sharePointDocumentLibraryName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointDocumentLibraryName.ToString()))}/templates"; + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + if (listName is null) + throw new ArgumentNullException(nameof(listName)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/forms"; return await this .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -4322,39 +4518,25 @@ public virtual async Task> GetContentAssemblyTemplatesAsync(string d } /// - /// Generate document using Microsoft Syntex (preview) + /// Get document generation forms /// - /// Use this action to create documents based on modern templates from Microsoft Syntex. This preview requires a Syntex license. Pricing is subject to change. For more info see: https://docs.microsoft.com/en-us/microsoft-365/contentunderstanding/content-assembly. + /// Discovery method used to populate dynamic parameter values at design time. /// Site Address /// Document Library Name - /// Document Template - /// The request body. - /// Folder Path - /// File Name - /// View (no effect) /// Cancellation token. - /// The Generate document using Microsoft Syntex (preview) response. - public virtual async Task CreateContentAssemblyDocumentAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForLibraries")] string documentLibraryName, [DynamicValues("GetContentAssemblyTemplates")] string documentTemplate, CreateContentAssemblyDocumentInput input, string folderPath = default, string fileName = default, string viewNoEffect = default, CancellationToken cancellationToken = default) + /// The Get document generation forms response. + public virtual async Task> GetDocGenFormsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForLibraries")] string documentLibraryName, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.CreateContentAssemblyDocumentAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDocGenFormsAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); if (documentLibraryName is null) throw new ArgumentNullException(nameof(documentLibraryName)); - if (documentTemplate is null) - throw new ArgumentNullException(nameof(documentTemplate)); - var queryParams = new List(); - if (folderPath != default) - queryParams.Add($"folderPath={Uri.EscapeDataString(folderPath.ToString())}"); - if (fileName != default) - queryParams.Add($"fileName={Uri.EscapeDataString(fileName.ToString())}"); - if (viewNoEffect != default) - queryParams.Add($"view={Uri.EscapeDataString(viewNoEffect.ToString())}"); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(documentLibraryName.ToString()))}/templates/{Uri.EscapeDataString(Uri.EscapeDataString(documentTemplate.ToString()))}/createnewdocument" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(documentLibraryName.ToString()))}/docgenforms"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4366,26 +4548,26 @@ public virtual async Task CreateContentAssemblyDocumentA } /// - /// Get placeholders from template + /// Get document generation form fields /// /// Discovery method used to populate dynamic parameter values at design time. /// Example: https://contoso.sharepoint.com/sites/sitename - /// SharePoint document library name - /// Document template + /// SharePoint list name + /// Form identifier /// Cancellation token. - /// The Get placeholders from template response. - public virtual async Task GetContentAssemblyPlaceholdersAsync(string dataset, string sharePointDocumentLibraryName, string documentTemplate, CancellationToken cancellationToken = default) + /// The Get document generation form fields response. + public virtual async Task GetDocGenFormFieldsAsync(string dataset, string sharePointListName, string formIdentifier, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetContentAssemblyPlaceholdersAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetDocGenFormFieldsAsync"); try { if (dataset is null) throw new ArgumentNullException(nameof(dataset)); - if (sharePointDocumentLibraryName is null) - throw new ArgumentNullException(nameof(sharePointDocumentLibraryName)); - if (documentTemplate is null) - throw new ArgumentNullException(nameof(documentTemplate)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointDocumentLibraryName.ToString()))}/templates/{Uri.EscapeDataString(Uri.EscapeDataString(documentTemplate.ToString()))}/placeholders"; + if (sharePointListName is null) + throw new ArgumentNullException(nameof(sharePointListName)); + if (formIdentifier is null) + throw new ArgumentNullException(nameof(formIdentifier)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointListName.ToString()))}/docgenforms/{Uri.EscapeDataString(Uri.EscapeDataString(formIdentifier.ToString()))}/fields"; return await this .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -4399,25 +4581,19 @@ public virtual async Task GetContentAssemblyPlaceholdersAsync(str } /// - /// Get list views + /// Get SPViewScope options to use for folder querying behavior /// - /// Gets views from a SharePoint list. - /// Site Address - /// List Name + /// Discovery method used to populate dynamic parameter values at design time. /// Cancellation token. - /// The Get list views response. - public virtual async Task> GetTableViewsAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, CancellationToken cancellationToken = default) + /// The Get SPViewScope options to use for folder querying behavior response. + public virtual async Task GetViewScopeOptionsAsync(CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableViewsAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetViewScopeOptionsAsync"); try { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - if (listName is null) - throw new ArgumentNullException(nameof(listName)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}/views"; + var path = $"/getViewScopeOptions"; return await this - .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4429,22 +4605,32 @@ public virtual async Task> GetTableViewsAsync([DynamicValues("GetDat } /// - /// Get libraries where Content Approval is supported + /// Get list metadata /// /// Discovery method used to populate dynamic parameter values at design time. /// Site Address + /// List Name + /// Limit Columns by View + /// Limit Columns by Content Type /// Cancellation token. - /// The Get libraries where Content Approval is supported response. - public virtual async Task GetTablesForApprovalAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + /// The Get list metadata response. + public virtual async Task GetTableAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTables")] string listName, [DynamicValues("GetTableViews")] string limitColumnsByView = default, string limitColumnsByContentType = default, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForApprovalAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTableAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/approval"; + if (listName is null) + throw new ArgumentNullException(nameof(listName)); + var queryParams = new List(); + if (limitColumnsByView != default) + queryParams.Add($"view={Uri.EscapeDataString(limitColumnsByView.ToString())}"); + if (limitColumnsByContentType != default) + queryParams.Add($"contentTypeId={Uri.EscapeDataString(limitColumnsByContentType.ToString())}"); + var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listName.ToString()))}" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4456,20 +4642,20 @@ public virtual async Task GetTablesForApprovalAsync([DynamicValues(" } /// - /// Get libraries + /// Get lists and libraries where lightweight approvals is enabled /// /// Discovery method used to populate dynamic parameter values at design time. /// Site Address /// Cancellation token. - /// The Get libraries response. - public virtual async Task GetTablesForLibrariesAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + /// The Get lists and libraries where lightweight approvals is enabled response. + public virtual async Task GetTablesForLightweightApprovalAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForLibrariesAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForLightweightApprovalAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/libraries"; + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/lightweightapproval"; return await this .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -4483,22 +4669,19 @@ public virtual async Task GetTablesForLibrariesAsync([DynamicValues( } /// - /// Get lists and libraries where lightweight approvals is enabled + /// Get available approval request types /// /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address /// Cancellation token. - /// The Get lists and libraries where lightweight approvals is enabled response. - public virtual async Task GetTablesForLightweightApprovalAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + /// The Get available approval request types response. + public virtual async Task GetApprovalTypesAsync(CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForLightweightApprovalAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetApprovalTypesAsync"); try { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/lightweightapproval"; + var path = $"/getApprovalTypes"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4510,22 +4693,22 @@ public virtual async Task GetTablesForLightweightApprovalAsync([Dyna } /// - /// Get lists and libraries + /// Get the appropriate creation schema for the approval request type /// /// Discovery method used to populate dynamic parameter values at design time. - /// Site Address + /// Approval Type /// Cancellation token. - /// The Get lists and libraries response. - public virtual async Task GetTablesForListsAndLibrariesAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) + /// The Get the appropriate creation schema for the approval request type response. + public virtual async Task GetApprovalSchemaAsync(int approvalType, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForListsAndLibrariesAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetApprovalSchemaAsync"); try { - if (siteAddress is null) - throw new ArgumentNullException(nameof(siteAddress)); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/listsandlibraries"; + var queryParams = new List(); + queryParams.Add($"approvalType={Uri.EscapeDataString(approvalType.ToString())}"); + var path = $"/getApprovalSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4537,22 +4720,22 @@ public virtual async Task GetTablesForListsAndLibrariesAsync([Dynami } /// - /// Get the appropriate creation schema for the approval request type + /// Get libraries where Content Approval is supported /// /// Discovery method used to populate dynamic parameter values at design time. - /// Approval Type + /// Site Address /// Cancellation token. - /// The Get the appropriate creation schema for the approval request type response. - public virtual async Task GetApprovalSchemaAsync(int approvalType, CancellationToken cancellationToken = default) + /// The Get libraries where Content Approval is supported response. + public virtual async Task GetTablesForApprovalAsync([DynamicValues("GetDataSets")] string siteAddress, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetApprovalSchemaAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetTablesForApprovalAsync"); try { - var queryParams = new List(); - queryParams.Add($"approvalType={Uri.EscapeDataString(approvalType.ToString())}"); - var path = $"/getApprovalSchema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (siteAddress is null) + throw new ArgumentNullException(nameof(siteAddress)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tablesfor/approval"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4588,19 +4771,25 @@ public virtual async Task GetDayOfWeekOptionsAsync(CancellationTok } /// - /// Get available approval request types + /// Get document library templates /// /// Discovery method used to populate dynamic parameter values at design time. + /// Example: https://contoso.sharepoint.com/sites/sitename + /// SharePoint document library name /// Cancellation token. - /// The Get available approval request types response. - public virtual async Task GetApprovalTypesAsync(CancellationToken cancellationToken = default) + /// The Get document library templates response. + public virtual async Task> GetContentAssemblyTemplatesAsync(string dataset, string sharePointDocumentLibraryName, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetApprovalTypesAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetContentAssemblyTemplatesAsync"); try { - var path = $"/getApprovalTypes"; + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + if (sharePointDocumentLibraryName is null) + throw new ArgumentNullException(nameof(sharePointDocumentLibraryName)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointDocumentLibraryName.ToString()))}/templates"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync>(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4612,19 +4801,28 @@ public virtual async Task GetApprovalTypesAsync(CancellationToken } /// - /// Get SPViewScope options to use for folder querying behavior + /// Get placeholders from template /// /// Discovery method used to populate dynamic parameter values at design time. + /// Example: https://contoso.sharepoint.com/sites/sitename + /// SharePoint document library name + /// Document template /// Cancellation token. - /// The Get SPViewScope options to use for folder querying behavior response. - public virtual async Task GetViewScopeOptionsAsync(CancellationToken cancellationToken = default) + /// The Get placeholders from template response. + public virtual async Task GetContentAssemblyPlaceholdersAsync(string dataset, string sharePointDocumentLibraryName, string documentTemplate, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetViewScopeOptionsAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetContentAssemblyPlaceholdersAsync"); try { - var path = $"/getViewScopeOptions"; + if (dataset is null) + throw new ArgumentNullException(nameof(dataset)); + if (sharePointDocumentLibraryName is null) + throw new ArgumentNullException(nameof(sharePointDocumentLibraryName)); + if (documentTemplate is null) + throw new ArgumentNullException(nameof(documentTemplate)); + var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(dataset.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(sharePointDocumentLibraryName.ToString()))}/templates/{Uri.EscapeDataString(Uri.EscapeDataString(documentTemplate.ToString()))}/placeholders"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4636,35 +4834,25 @@ public virtual async Task GetViewScopeOptionsAsync(CancellationTok } /// - /// Extract folder + /// Get metadata about the return type of the GetItemChanges operation /// - /// Extracts an archive file into a SharePoint folder (example: .zip). + /// Discovery method used to populate dynamic parameter values at design time. /// Site Address - /// Source File Path - /// Destination Folder Path - /// Overwrite Flag + /// List or Library Name /// Cancellation token. - /// The Extract folder response. - public virtual async Task> ExtractFolderAsync([DynamicValues("GetDataSets")] string siteAddress, string sourceFilePath, string destinationFolderPath, bool? overwriteFlag = default, CancellationToken cancellationToken = default) + /// The Get metadata about the return type of the GetItemChanges operation response. + public virtual async Task GetItemChangesMetadataAsync([DynamicValues("GetDataSets")] string siteAddress, [DynamicValues("GetTablesForListsAndLibraries")] string listOrLibraryName, CancellationToken cancellationToken = default) { - using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.ExtractFolderAsync"); + using var activity = SharePointOnlineClient.ConnectorActivitySource.StartActivity("SharePointOnlineClient.GetItemChangesMetadataAsync"); try { if (siteAddress is null) throw new ArgumentNullException(nameof(siteAddress)); - var queryParams = new List(); - queryParams.Add("queryParametersSingleEncoded=true"); - if (sourceFilePath is null) - throw new ArgumentNullException(nameof(sourceFilePath)); - queryParams.Add($"source={Uri.EscapeDataString(sourceFilePath.ToString())}"); - if (destinationFolderPath is null) - throw new ArgumentNullException(nameof(destinationFolderPath)); - queryParams.Add($"destination={Uri.EscapeDataString(destinationFolderPath.ToString())}"); - if (overwriteFlag.HasValue) - queryParams.Add($"overwrite={Uri.EscapeDataString(overwriteFlag.Value.ToString())}"); - var path = $"/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/extractFolderV2" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (listOrLibraryName is null) + throw new ArgumentNullException(nameof(listOrLibraryName)); + var path = $"/$metadata.json/datasets/{Uri.EscapeDataString(Uri.EscapeDataString(siteAddress.ToString()))}/tables/{Uri.EscapeDataString(Uri.EscapeDataString(listOrLibraryName.ToString()))}/items/changes"; return await this - .CallConnectorAsync>(HttpMethod.Post, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/ShiftsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/ShiftsExtensions.cs index 6f4ad03..08a96d8 100644 --- a/src/Azure.Connectors.Sdk/Generated/ShiftsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/ShiftsExtensions.cs @@ -29,21 +29,7 @@ namespace Azure.Connectors.Sdk.Shifts.Models #region Types /// - /// Response for List teams - /// - public class GetAllTeamsResponse - { - /// @odata.context - [JsonPropertyName("@odata.context")] - public string Context { get; set; } - - /// List of one or more Teams you are a part of. - [JsonPropertyName("value")] - public List TeamsList { get; set; } - } - - /// - /// Response for Get a Schedule's details + /// Schedule Entity. /// public class ScheduleResponse { @@ -79,7 +65,7 @@ public class ListTimesOffResponse } /// - /// Item in List of Time Off instances + /// Time Off Entity. /// public class TimeOffResponse { @@ -119,7 +105,7 @@ public class TimeOffResponse } /// - /// userInfo + /// User Info /// public class UserInfo { @@ -133,7 +119,7 @@ public class UserInfo } /// - /// teamInfo + /// Team Info /// public class TeamInfo { @@ -147,7 +133,7 @@ public class TeamInfo } /// - /// sharedTimeOff + /// Shared version of the Time Off. /// public class SharedTimeOff { @@ -169,7 +155,7 @@ public class SharedTimeOff } /// - /// draftTimeOff + /// Preliminary version of the Time Off /// public class DraftTimeOff { @@ -205,7 +191,7 @@ public class ListShiftsResponse } /// - /// Item in List of Shifts + /// Shift Entity. /// public class ShiftResponse { @@ -253,7 +239,7 @@ public class ShiftResponse } /// - /// schedulingGroupInfo + /// Scheduling Group Info /// public class SchedulingGroupInfo { @@ -271,7 +257,7 @@ public class SchedulingGroupInfo } /// - /// sharedShift + /// Shared version of the Shift. /// public class SharedShift { @@ -301,7 +287,7 @@ public class SharedShift } /// - /// draftShift + /// Preliminary version of the Shift /// public class DraftShift { @@ -345,7 +331,7 @@ public class ListOpenShiftsResponse } /// - /// Item in List of Open Shifts + /// Open Shift Entity /// public class OpenShiftResponse { @@ -385,7 +371,7 @@ public class OpenShiftResponse } /// - /// sharedOpenShift + /// Shared version of the Open Shift /// public class SharedOpenShift { @@ -419,7 +405,7 @@ public class SharedOpenShift } /// - /// draftOpenShift + /// Preliminary version of the Open Shift /// public class DraftOpenShift { @@ -453,7 +439,7 @@ public class DraftOpenShift } /// - /// Response for List all Time Off Reasons in a team + /// The list of Time Off Reasons. /// public class GetTimeOffReasonsResponse { @@ -481,7 +467,7 @@ public class ListSchedulingGroupsResponse } /// - /// Item in List of Scheduling Groups. + /// Scheduling Group Entity /// public class SchedulingGroupResponse { @@ -517,7 +503,7 @@ public class ListTimeOffRequestsResponse } /// - /// Item in List of Time Off requests. + /// Time Off Request Entity /// public class TimeOffRequestResponse { @@ -580,7 +566,7 @@ public class TimeOffRequestResponse } /// - /// Approve a Time Off request + /// Manager approves a Time Off request. /// public class TimeOffRequestApproveInput { @@ -602,7 +588,7 @@ public class TimeOffRequestApproveResponse } /// - /// Decline a Time Off request + /// Manager declines a Time Off request. /// public class TimeOffRequestDeclineInput { @@ -638,7 +624,7 @@ public class ListOfferShiftRequestsResponse } /// - /// Item in List of Offer Shift requests. + /// Offer Shift Request Entity /// public class OfferShiftRequestResponse { @@ -705,7 +691,7 @@ public class OfferShiftRequestResponse } /// - /// Approve an Offer Shift request + /// Approve an Offer Shift request. /// public class OfferShiftRequestApproveInput { @@ -727,7 +713,7 @@ public class OfferShiftRequestApproveResponse } /// - /// Decline an Offer Shift request + /// Recipient/Manager declines an Offer Shift request. /// public class OfferShiftRequestDeclineInput { @@ -763,7 +749,7 @@ public class ListSwapShiftsChangeRequestsResponse } /// - /// Item in List of Swap Shifts Change Requests. + /// Swap Shift Request Entity /// public class SwapShiftsChangeRequestResponse { @@ -834,7 +820,7 @@ public class SwapShiftsChangeRequestResponse } /// - /// Approve a Swap Shifts request + /// Approve a Swap Shifts change request. /// public class SwapShiftsChangeRequestApproveInput { @@ -856,7 +842,7 @@ public class SwapShiftsChangeRequestApproveResponse } /// - /// Decline a Swap Shifts request + /// Decline a Swap Shifts change request. /// public class SwapShiftsChangeRequestDeclineInput { @@ -892,7 +878,7 @@ public class ListOpenShiftChangeRequestsResponse } /// - /// Item in List of Open Shift Change Requests. + /// Open Shift Change Request Entity /// public class OpenShiftChangeRequestResponse { @@ -947,7 +933,7 @@ public class OpenShiftChangeRequestResponse } /// - /// Approve an Open Shift request + /// Manager approves an Open Shift change request. /// public class OpenShiftChangeRequestApproveInput { @@ -969,7 +955,7 @@ public class OpenShiftChangeRequestApproveResponse } /// - /// Decline an Open Shift request + /// Manager declines an Open Shift change request. /// public class OpenShiftChangeRequestDeclineInput { @@ -1032,6 +1018,20 @@ public class ListTimesOffCrossTeamResponse public List TimesOffList { get; set; } } + /// + /// Response for List teams + /// + public class GetAllTeamsResponse + { + /// @odata.context + [JsonPropertyName("@odata.context")] + public string Context { get; set; } + + /// List of one or more Teams you are a part of. + [JsonPropertyName("value")] + public List TeamsList { get; set; } + } + /// /// WebHookRequest /// @@ -1057,7 +1057,7 @@ public class EditOpenShiftRequest } /// - /// CreateShiftRequest + /// Create Shift Request Entity /// public class CreateShiftRequest { @@ -1075,7 +1075,7 @@ public class CreateShiftRequest } /// - /// CreateTimeOffRequest + /// Create Time Off Request Entity /// public class CreateTimeOffRequest { @@ -1151,20 +1151,6 @@ public AssignedToJsonConverter() { } /// public static class ShiftsModelFactory { - /// - /// Creates a new instance of . - /// - public static GetAllTeamsResponse GetAllTeamsResponse( - string context = default, - List teamsList = default) - { - return new GetAllTeamsResponse - { - Context = context, - TeamsList = teamsList, - }; - } - /// /// Creates a new instance of . /// @@ -1873,6 +1859,20 @@ public static ListTimesOffCrossTeamResponse ListTimesOffCrossTeamResponse( }; } + /// + /// Creates a new instance of . + /// + public static GetAllTeamsResponse GetAllTeamsResponse( + string context = default, + List teamsList = default) + { + return new GetAllTeamsResponse + { + Context = context, + TeamsList = teamsList, + }; + } + /// /// Creates a new instance of . /// @@ -1975,6 +1975,88 @@ public static class ShiftsTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the Shifts connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class ShiftsTriggerParameters + { + /// + /// Input parameters for the OnTriggerForOpenShiftChangeRequests trigger operation (operationId: TriggerForOpenShiftChangeRequests). + /// + public static class OnTriggerForOpenShiftChangeRequests + { + /// + /// Add Team ID + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string TeamId = "teamId"; + + } + + /// + /// Input parameters for the OnTriggerForSwapShiftsChangeRequests trigger operation (operationId: TriggerForSwapShiftsChangeRequests). + /// + public static class OnTriggerForSwapShiftsChangeRequests + { + /// + /// Add Team ID + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string TeamId = "teamId"; + + } + + /// + /// Input parameters for the OnTriggerForOfferShiftRequests trigger operation (operationId: TriggerForOfferShiftRequests). + /// + public static class OnTriggerForOfferShiftRequests + { + /// + /// Add Team ID + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string TeamId = "teamId"; + + } + + /// + /// Input parameters for the OnTriggerForTimeOffRequests trigger operation (operationId: TriggerForTimeOffRequests). + /// + public static class OnTriggerForTimeOffRequests + { + /// + /// Add Team ID + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string TeamId = "teamId"; + + } + + /// + /// Input parameters for the OnTriggerForShifts trigger operation (operationId: TriggerForShifts). + /// + public static class OnTriggerForShifts + { + /// + /// Add Team ID + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string TeamId = "teamId"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// @@ -2041,30 +2123,6 @@ protected ShiftsClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// List teams - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List teams response. - public virtual async Task GetAllTeamsAsync(CancellationToken cancellationToken = default) - { - using var activity = ShiftsClient.ConnectorActivitySource.StartActivity("ShiftsClient.GetAllTeamsAsync"); - try - { - var path = $"/v1.0/me/joinedTeams"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get a Schedule's details /// @@ -3199,6 +3257,30 @@ public virtual async Task ListTimesOffCrossTeamAs } } + /// + /// List teams + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List teams response. + public virtual async Task GetAllTeamsAsync(CancellationToken cancellationToken = default) + { + using var activity = ShiftsClient.ConnectorActivitySource.StartActivity("ShiftsClient.GetAllTeamsAsync"); + try + { + var path = $"/v1.0/me/joinedTeams"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/SlackExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SlackExtensions.cs index 519db6f..1103c72 100644 --- a/src/Azure.Connectors.Sdk/Generated/SlackExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SlackExtensions.cs @@ -51,7 +51,7 @@ public class CreateChannelResponse } /// - /// channel + /// The Channel /// public class Channel { @@ -93,7 +93,7 @@ public class ListChannelsResponse : IPageable } /// - /// Response for Post message (V2) + /// Details of the message posted to a Slack channel. /// public class PostMessageResponse { @@ -119,7 +119,7 @@ public class PostMessageResponse } /// - /// PostMessageRequest + /// Represents the values used to post a message. /// public class PostMessageRequest { diff --git a/src/Azure.Connectors.Sdk/Generated/SmtpExtensions.cs b/src/Azure.Connectors.Sdk/Generated/SmtpExtensions.cs index e56efa7..718912a 100644 --- a/src/Azure.Connectors.Sdk/Generated/SmtpExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/SmtpExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.Smtp.Models #region Types /// - /// AttachmentV2 + /// Email attachment (V2) /// public class Attachment { @@ -51,7 +51,7 @@ public class Attachment } /// - /// EmailV3 + /// SMTP email (v3) /// public class Email { diff --git a/src/Azure.Connectors.Sdk/Generated/StarmindExtensions.cs b/src/Azure.Connectors.Sdk/Generated/StarmindExtensions.cs index bb74480..faa70c6 100644 --- a/src/Azure.Connectors.Sdk/Generated/StarmindExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/StarmindExtensions.cs @@ -247,7 +247,7 @@ public class PublishQuestionDraftResponse } /// - /// UserV3 + /// User object containing user information. /// public class User { diff --git a/src/Azure.Connectors.Sdk/Generated/TallyfyExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TallyfyExtensions.cs index e1ed891..3ef27d6 100644 --- a/src/Azure.Connectors.Sdk/Generated/TallyfyExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TallyfyExtensions.cs @@ -28,30 +28,6 @@ namespace Azure.Connectors.Sdk.Tallyfy.Models #region Types - /// - /// Response for Get organization's users - /// - public class GetOrganizationUsersResponse - { - /// data - [JsonPropertyName("data")] - public List Data { get; set; } - } - - /// - /// Response for Get user's organizations - /// - public class GetUserOrganizationsResponse - { - /// data - [JsonPropertyName("data")] - public List Data { get; set; } - - /// meta - [JsonPropertyName("meta")] - public JsonElement? Meta { get; set; } - } - /// /// Response for Get a member's tasks /// @@ -336,6 +312,30 @@ public class EditStepTypeResponse public Dictionary AdditionalProperties { get; set; } = new(); } + /// + /// Response for Get user's organizations + /// + public class GetUserOrganizationsResponse + { + /// data + [JsonPropertyName("data")] + public List Data { get; set; } + + /// meta + [JsonPropertyName("meta")] + public JsonElement? Meta { get; set; } + } + + /// + /// Response for Get organization's users + /// + public class GetOrganizationUsersResponse + { + /// data + [JsonPropertyName("data")] + public List Data { get; set; } + } + /// /// Extensible enum for known Label values. /// @@ -564,32 +564,6 @@ public TaskTypeJsonConverter() { } /// public static class TallyfyModelFactory { - /// - /// Creates a new instance of . - /// - public static GetOrganizationUsersResponse GetOrganizationUsersResponse( - List data = default) - { - return new GetOrganizationUsersResponse - { - Data = data, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetUserOrganizationsResponse GetUserOrganizationsResponse( - List data = default, - JsonElement? meta = default) - { - return new GetUserOrganizationsResponse - { - Data = data, - Meta = meta, - }; - } - /// /// Creates a new instance of . /// @@ -761,6 +735,32 @@ public static EditStepTypeInput EditStepTypeInput( StepType = stepType, }; } + + /// + /// Creates a new instance of . + /// + public static GetUserOrganizationsResponse GetUserOrganizationsResponse( + List data = default, + JsonElement? meta = default) + { + return new GetUserOrganizationsResponse + { + Data = data, + Meta = meta, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetOrganizationUsersResponse GetOrganizationUsersResponse( + List data = default) + { + return new GetOrganizationUsersResponse + { + Data = data, + }; + } } #endregion Model Factory @@ -836,57 +836,6 @@ protected TallyfyClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Get organization's users - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Organization - /// Cancellation token. - /// The Get organization's users response. - public virtual async Task GetOrganizationUsersAsync([DynamicValues("Get_User_Organizations")] string organization, CancellationToken cancellationToken = default) - { - using var activity = TallyfyClient.ConnectorActivitySource.StartActivity("TallyfyClient.GetOrganizationUsersAsync"); - try - { - if (organization is null) - throw new ArgumentNullException(nameof(organization)); - var path = $"/organizations/{Uri.EscapeDataString(organization.ToString())}/users"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - - /// - /// Get user's organizations - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The Get user's organizations response. - public virtual async Task GetUserOrganizationsAsync(CancellationToken cancellationToken = default) - { - using var activity = TallyfyClient.ConnectorActivitySource.StartActivity("TallyfyClient.GetUserOrganizationsAsync"); - try - { - var path = $"/me/organizations"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Get a member's tasks /// @@ -1302,6 +1251,57 @@ public virtual async Task EditStepTypeAsync([DynamicValues } } + /// + /// Get user's organizations + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The Get user's organizations response. + public virtual async Task GetUserOrganizationsAsync(CancellationToken cancellationToken = default) + { + using var activity = TallyfyClient.ConnectorActivitySource.StartActivity("TallyfyClient.GetUserOrganizationsAsync"); + try + { + var path = $"/me/organizations"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + + /// + /// Get organization's users + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Organization + /// Cancellation token. + /// The Get organization's users response. + public virtual async Task GetOrganizationUsersAsync([DynamicValues("Get_User_Organizations")] string organization, CancellationToken cancellationToken = default) + { + using var activity = TallyfyClient.ConnectorActivitySource.StartActivity("TallyfyClient.GetOrganizationUsersAsync"); + try + { + if (organization is null) + throw new ArgumentNullException(nameof(organization)); + var path = $"/organizations/{Uri.EscapeDataString(organization.ToString())}/users"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/TeamsExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TeamsExtensions.cs index 9ed3bae..149e0ec 100644 --- a/src/Azure.Connectors.Sdk/Generated/TeamsExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TeamsExtensions.cs @@ -31,7 +31,7 @@ namespace Azure.Connectors.Sdk.Teams.Models #region Types /// - /// Response for Create a Teams meeting + /// Response for new meeting that was created /// public class NewMeetingResponse { @@ -187,7 +187,7 @@ public class GetAllAssociatedTeamsResponse } /// - /// Item in List of the teams you are associated with + /// Represents a team that is associated with a user /// public class AssociatedTeamInfo { @@ -219,7 +219,7 @@ public class GetChannelsForGroupResponse } /// - /// Item in List of one or more channels for a specific team + /// Get team channel details response /// public class GetChannelResponse { @@ -330,7 +330,7 @@ public class GetAllChannelsForTeamResponse } /// - /// Item in List of one or more channels for a specific team + /// Channel resource with owner team ID /// public class ChannelWithOwnerTeamId { @@ -391,7 +391,7 @@ public class GetChatsResponse } /// - /// Response for Get an @mention token for a team tag + /// @mention token for a tag /// public class AtMentionTagResponse { @@ -437,7 +437,7 @@ public class DynamicGetMessageDetailsResponseSchema } /// - /// Response for List replies of a channel message + /// List replies response schema /// public class ListRepliesResponseSchema { @@ -447,7 +447,7 @@ public class ListRepliesResponseSchema } /// - /// Response for List chat or channel members + /// List members response schema /// public class ListMembersResponseSchema { @@ -457,7 +457,7 @@ public class ListMembersResponseSchema } /// - /// Response for When a new channel message is added + /// A message in a channel, one on one chat, or group chat /// public class ChatMessage { @@ -539,99 +539,7 @@ public class WebhookChatMessageTriggerInput } /// - /// Response for Get unified action input metadata - /// - public class UnifiedActionSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// schema - /// - public class ObjectEntity - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - - /// - /// Response for Get response schema - /// - public class DynamicResponseSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for Get adaptive card input metadata - /// - public class ConnectorMetadata - { - /// metadatatype - [JsonPropertyName("metadatatype")] - public string Metadatatype { get; set; } - - /// activitytype - [JsonPropertyName("activitytype")] - public string Activitytype { get; set; } - - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for Get selected message hybrid trigger output metadata - /// - public class SelectedMessageTriggerMetadata - { - /// TeamsFlowRunContext - [JsonPropertyName("TeamsFlowRunContext")] - public ObjectEntity TeamsFlowRunContext { get; set; } - - /// CardOutputs - [JsonPropertyName("CardOutputs")] - public ObjectEntity CardOutputs { get; set; } - } - - /// - /// Response for Get compose message hybrid trigger output metadata - /// - public class ComposeMessageTriggerMetadata - { - /// TeamsFlowRunContext - [JsonPropertyName("TeamsFlowRunContext")] - public ObjectEntity TeamsFlowRunContext { get; set; } - - /// CardOutputs - [JsonPropertyName("CardOutputs")] - public ObjectEntity CardOutputs { get; set; } - } - - /// - /// Response for Get compose message hybrid trigger output metadata - /// - public class CardResponseTriggerMetadata - { - /// TeamsFlowRunContext - [JsonPropertyName("TeamsFlowRunContext")] - public ObjectEntity TeamsFlowRunContext { get; set; } - - /// CardOutputs - [JsonPropertyName("CardOutputs")] - public ObjectEntity CardOutputs { get; set; } - } - - /// - /// Response for Get a team + /// Get team response /// public class GetTeamResponse { @@ -681,7 +589,7 @@ public class GetTeamResponse } /// - /// memberSettings + /// Settings to configure whether members can perform certain actions, for example, create channels and add bots, in the team /// public class MemberSettings { @@ -707,7 +615,7 @@ public class MemberSettings } /// - /// guestSettings + /// Settings to configure whether guests can create, update, or delete channels in the team /// public class GuestSettings { @@ -721,7 +629,7 @@ public class GuestSettings } /// - /// messagingSettings + /// Settings to configure messaging and mentions in the team /// public class MessagingSettings { @@ -747,7 +655,7 @@ public class MessagingSettings } /// - /// funSettings + /// Settings to configure use of Giphy, memes, and stickers in the team /// public class FunSettings { @@ -769,7 +677,7 @@ public class FunSettings } /// - /// discoverySettings + /// Settings to configure team discoverability by others. /// public class DiscoverySettings { @@ -779,7 +687,7 @@ public class DiscoverySettings } /// - /// Response for Get an @mention token for a user + /// @mention Token /// public class AtMentionUser { @@ -789,7 +697,7 @@ public class AtMentionUser } /// - /// Response for Create a chat + /// Response for new chat that was created /// public class NewChatResponse { @@ -900,56 +808,6 @@ public class DynamicPostGatherInputToConversationResponse public Dictionary AdditionalProperties { get; set; } = new(); } - /// - /// Response for Get message details response schema - /// - public class GetMessageDetailsSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for List members input schema - /// - public class ListMembersSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for Input schema for webhook trigger - /// - public class WebhookTriggerSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - - /// - /// Response for Conversation location for where to post - /// - public class GetMessageLocationsResponse - { - /// valid locations to post a message or reply, make verbose - [JsonPropertyName("locations")] - public List Locations { get; set; } - } - - /// - /// Response for Get feed notification input metadata - /// - public class PostFeedSchema - { - /// schema - [JsonPropertyName("schema")] - public ObjectEntity Schema { get; set; } - } - /// /// Response for Send a Microsoft Graph HTTP request /// @@ -1062,7 +920,7 @@ public class CallTranscriptCollectionResponse } /// - /// Item in List of transcripts + /// A call transcript /// public class CallTranscriptResponse { @@ -1107,7 +965,7 @@ public class CallRecordingCollectionResponse } /// - /// Item in List of recordings + /// A call recording /// public class CallRecordingResponse { @@ -1156,7 +1014,7 @@ public class ListSectionsResponse } /// - /// Item in List of sections + /// A teamwork section /// public class SectionResponse { @@ -1259,7 +1117,7 @@ public class ListSectionItemsResponse } /// - /// Item in List of section items + /// An item (chat, channel, meeting, or community) within a teamwork section /// public class SectionItemResponse { @@ -1336,7 +1194,7 @@ public class CreateTagInput } /// - /// Response for Create a tag for a team + /// The created tag for a team /// public class CreateTagResponseSchema { @@ -1416,7 +1274,7 @@ public class AiInsightCollectionResponse } /// - /// Item in List of AI insights + /// An AI-generated insight for an online meeting /// public class AiInsightResponse { @@ -1444,121 +1302,263 @@ public class AiInsightResponse } /// - /// DynamicGetMessageDetailsSchema + /// Response for Conversation location for where to post /// - [DynamicSchema("GetMessageDetailsInputSchema")] - public class DynamicGetMessageDetailsSchema + public class GetMessageLocationsResponse { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// valid locations to post a message or reply, make verbose + [JsonPropertyName("locations")] + public List Locations { get; set; } } /// - /// DynamicListMembersSchema + /// Response for Get message details response schema /// - [DynamicSchema("ListMembersInputSchema")] - public class DynamicListMembersSchema + public class GetMessageDetailsSchema { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } } /// - /// DynamicPostFeedNotificationRequest + /// schema /// - [DynamicSchema("GetFeedNotificationInputSchema")] - public class DynamicPostFeedNotificationRequest + public class ObjectEntity { /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. /// [JsonExtensionData] public Dictionary AdditionalProperties { get; set; } = new(); } /// - /// DynamicPostMessageRequest + /// Response for List members input schema /// - [DynamicSchema("GetUnifiedActionSchema")] - public class DynamicPostMessageRequest + public class ListMembersSchema { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } } /// - /// DynamicReplyMessageRequest + /// Response for Get notification input metadata /// - [DynamicSchema("GetUnifiedActionSchema")] - public class DynamicReplyMessageRequest + public class ConnectorMetadata { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// metadatatype + [JsonPropertyName("metadatatype")] + public string Metadatatype { get; set; } + + /// activitytype + [JsonPropertyName("activitytype")] + public string Activitytype { get; set; } + + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } } /// - /// DynamicPostCardRequest + /// Response for Get feed notification input metadata /// - [DynamicSchema("GetUnifiedActionSchema")] - public class DynamicPostCardRequest + public class PostFeedSchema { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } } /// - /// DynamicPostCardAndWaitRequest + /// Response for Get unified action input metadata /// - [DynamicSchema("GetUnifiedActionSchema")] - public class DynamicPostCardAndWaitRequest + public class UnifiedActionSchema { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } } /// - /// DynamicReplyCardRequest + /// Metadata of data coming from Microsoft Teams for a selected message /// - [DynamicSchema("GetUnifiedActionSchema")] - public class DynamicReplyCardRequest + public class SelectedMessageTriggerMetadata { - /// - /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. - /// Populate this dictionary with the properties returned by the schema API. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); + /// TeamsFlowRunContext + [JsonPropertyName("TeamsFlowRunContext")] + public ObjectEntity TeamsFlowRunContext { get; set; } + + /// CardOutputs + [JsonPropertyName("CardOutputs")] + public ObjectEntity CardOutputs { get; set; } } /// - /// DynamicUpdateCardRequest + /// Metadata of data coming from Microsoft Teams for composing a message /// - [DynamicSchema("GetUnifiedActionSchema")] + public class ComposeMessageTriggerMetadata + { + /// TeamsFlowRunContext + [JsonPropertyName("TeamsFlowRunContext")] + public ObjectEntity TeamsFlowRunContext { get; set; } + + /// CardOutputs + [JsonPropertyName("CardOutputs")] + public ObjectEntity CardOutputs { get; set; } + } + + /// + /// Metadata of data coming from Microsoft Teams for a response to an adaptive card + /// + public class CardResponseTriggerMetadata + { + /// TeamsFlowRunContext + [JsonPropertyName("TeamsFlowRunContext")] + public ObjectEntity TeamsFlowRunContext { get; set; } + + /// CardOutputs + [JsonPropertyName("CardOutputs")] + public ObjectEntity CardOutputs { get; set; } + } + + /// + /// Response for Input schema for webhook trigger + /// + public class WebhookTriggerSchema + { + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + } + + /// + /// Response for Get response schema + /// + public class DynamicResponseSchema + { + /// schema + [JsonPropertyName("schema")] + public ObjectEntity Schema { get; set; } + } + + /// + /// DynamicGetMessageDetailsSchema + /// + [DynamicSchema("GetMessageDetailsInputSchema")] + public class DynamicGetMessageDetailsSchema + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicListMembersSchema + /// + [DynamicSchema("ListMembersInputSchema")] + public class DynamicListMembersSchema + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicPostFeedNotificationRequest + /// + [DynamicSchema("GetFeedNotificationInputSchema")] + public class DynamicPostFeedNotificationRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicPostMessageRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] + public class DynamicPostMessageRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicReplyMessageRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] + public class DynamicReplyMessageRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicPostCardRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] + public class DynamicPostCardRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicPostCardAndWaitRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] + public class DynamicPostCardAndWaitRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicReplyCardRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] + public class DynamicReplyCardRequest + { + /// + /// Dynamic properties determined at runtime by the connector's schema discovery endpoint. + /// Populate this dictionary with the properties returned by the schema API. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// DynamicUpdateCardRequest + /// + [DynamicSchema("GetUnifiedActionSchema")] public class DynamicUpdateCardRequest { /// @@ -1608,7 +1608,7 @@ public class PostMessageToSelfRequest } /// - /// NewChat + /// New chat event model /// public class NewChat { @@ -1622,7 +1622,7 @@ public class NewChat } /// - /// NewMeeting + /// New meeting event model /// public class NewMeeting { @@ -2415,88 +2415,6 @@ public static WebhookChatMessageTriggerInput WebhookChatMessageTriggerInput( }; } - /// - /// Creates a new instance of . - /// - public static UnifiedActionSchema UnifiedActionSchema( - ObjectEntity schema = default) - { - return new UnifiedActionSchema - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static DynamicResponseSchema DynamicResponseSchema( - ObjectEntity schema = default) - { - return new DynamicResponseSchema - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static ConnectorMetadata ConnectorMetadata( - string metadatatype = default, - string activitytype = default, - ObjectEntity schema = default) - { - return new ConnectorMetadata - { - Metadatatype = metadatatype, - Activitytype = activitytype, - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static SelectedMessageTriggerMetadata SelectedMessageTriggerMetadata( - ObjectEntity teamsFlowRunContext = default, - ObjectEntity cardOutputs = default) - { - return new SelectedMessageTriggerMetadata - { - TeamsFlowRunContext = teamsFlowRunContext, - CardOutputs = cardOutputs, - }; - } - - /// - /// Creates a new instance of . - /// - public static ComposeMessageTriggerMetadata ComposeMessageTriggerMetadata( - ObjectEntity teamsFlowRunContext = default, - ObjectEntity cardOutputs = default) - { - return new ComposeMessageTriggerMetadata - { - TeamsFlowRunContext = teamsFlowRunContext, - CardOutputs = cardOutputs, - }; - } - - /// - /// Creates a new instance of . - /// - public static CardResponseTriggerMetadata CardResponseTriggerMetadata( - ObjectEntity teamsFlowRunContext = default, - ObjectEntity cardOutputs = default) - { - return new CardResponseTriggerMetadata - { - TeamsFlowRunContext = teamsFlowRunContext, - CardOutputs = cardOutputs, - }; - } - /// /// Creates a new instance of . /// @@ -2724,78 +2642,18 @@ public static PostCardAndWaitForResponseInput PostCardAndWaitForResponseInput( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetMessageDetailsSchema GetMessageDetailsSchema( - ObjectEntity schema = default) + public static AddMemberToChatInput AddMemberToChatInput( + string user = default, + bool? setUserAsChatOwner = default, + DateTime? visibleHistoryStartDateTime = default) { - return new GetMessageDetailsSchema + return new AddMemberToChatInput { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static ListMembersSchema ListMembersSchema( - ObjectEntity schema = default) - { - return new ListMembersSchema - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static WebhookTriggerSchema WebhookTriggerSchema( - ObjectEntity schema = default) - { - return new WebhookTriggerSchema - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static GetMessageLocationsResponse GetMessageLocationsResponse( - List locations = default) - { - return new GetMessageLocationsResponse - { - Locations = locations, - }; - } - - /// - /// Creates a new instance of . - /// - public static PostFeedSchema PostFeedSchema( - ObjectEntity schema = default) - { - return new PostFeedSchema - { - Schema = schema, - }; - } - - /// - /// Creates a new instance of . - /// - public static AddMemberToChatInput AddMemberToChatInput( - string user = default, - bool? setUserAsChatOwner = default, - DateTime? visibleHistoryStartDateTime = default) - { - return new AddMemberToChatInput - { - User = user, - SetUserAsChatOwner = setUserAsChatOwner, - VisibleHistoryStartDateTime = visibleHistoryStartDateTime, + User = user, + SetUserAsChatOwner = setUserAsChatOwner, + VisibleHistoryStartDateTime = visibleHistoryStartDateTime, }; } @@ -3179,6 +3037,148 @@ public static AiInsightResponse AiInsightResponse( }; } + /// + /// Creates a new instance of . + /// + public static GetMessageLocationsResponse GetMessageLocationsResponse( + List locations = default) + { + return new GetMessageLocationsResponse + { + Locations = locations, + }; + } + + /// + /// Creates a new instance of . + /// + public static GetMessageDetailsSchema GetMessageDetailsSchema( + ObjectEntity schema = default) + { + return new GetMessageDetailsSchema + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static ListMembersSchema ListMembersSchema( + ObjectEntity schema = default) + { + return new ListMembersSchema + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static ConnectorMetadata ConnectorMetadata( + string metadatatype = default, + string activitytype = default, + ObjectEntity schema = default) + { + return new ConnectorMetadata + { + Metadatatype = metadatatype, + Activitytype = activitytype, + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static PostFeedSchema PostFeedSchema( + ObjectEntity schema = default) + { + return new PostFeedSchema + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static UnifiedActionSchema UnifiedActionSchema( + ObjectEntity schema = default) + { + return new UnifiedActionSchema + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static SelectedMessageTriggerMetadata SelectedMessageTriggerMetadata( + ObjectEntity teamsFlowRunContext = default, + ObjectEntity cardOutputs = default) + { + return new SelectedMessageTriggerMetadata + { + TeamsFlowRunContext = teamsFlowRunContext, + CardOutputs = cardOutputs, + }; + } + + /// + /// Creates a new instance of . + /// + public static ComposeMessageTriggerMetadata ComposeMessageTriggerMetadata( + ObjectEntity teamsFlowRunContext = default, + ObjectEntity cardOutputs = default) + { + return new ComposeMessageTriggerMetadata + { + TeamsFlowRunContext = teamsFlowRunContext, + CardOutputs = cardOutputs, + }; + } + + /// + /// Creates a new instance of . + /// + public static CardResponseTriggerMetadata CardResponseTriggerMetadata( + ObjectEntity teamsFlowRunContext = default, + ObjectEntity cardOutputs = default) + { + return new CardResponseTriggerMetadata + { + TeamsFlowRunContext = teamsFlowRunContext, + CardOutputs = cardOutputs, + }; + } + + /// + /// Creates a new instance of . + /// + public static WebhookTriggerSchema WebhookTriggerSchema( + ObjectEntity schema = default) + { + return new WebhookTriggerSchema + { + Schema = schema, + }; + } + + /// + /// Creates a new instance of . + /// + public static DynamicResponseSchema DynamicResponseSchema( + ObjectEntity schema = default) + { + return new DynamicResponseSchema + { + Schema = schema, + }; + } + /// /// Creates a new instance of . /// @@ -3391,6 +3391,20 @@ public static class TeamsTriggerParameters /// public static class OnNewChannelMessage { + /// + /// Select team + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string GroupId = "groupId"; + + /// + /// Channel ID + /// Required. + /// Dynamic values from: GetChannelsForGroup. + /// + public const string ChannelId = "channelId"; + /// /// Top. /// Default: 50. @@ -3404,6 +3418,20 @@ public static class OnNewChannelMessage /// public static class OnNewChannelMessageMentioningMe { + /// + /// Select team + /// Required. + /// Dynamic values from: GetAllTeams. + /// + public const string GroupId = "groupId"; + + /// + /// Channel ID + /// Required. + /// Dynamic values from: GetChannelsForGroup. + /// + public const string ChannelId = "channelId"; + /// /// Top. /// Default: 50. @@ -3412,6 +3440,20 @@ public static class OnNewChannelMessageMentioningMe } + /// + /// Input parameters for the OnWebhookAtMentionTrigger trigger operation (operationId: WebhookAtMentionTrigger). + /// + public static class OnWebhookAtMentionTrigger + { + /// + /// Choose message type + /// Required. + /// Allowed values: groupchat, channel. + /// + public const string ThreadType = "threadType"; + + } + /// /// Input parameters for the OnWebhookMessageReactionTrigger trigger operation (operationId: WebhookMessageReactionTrigger). /// @@ -3437,6 +3479,13 @@ public static class OnWebhookMessageReactionTrigger /// public const string RunningPolicy = "runningPolicy"; + /// + /// Choose message type + /// Required. + /// Allowed values: groupchat, channel. + /// + public const string ThreadType = "threadType"; + } /// @@ -3444,6 +3493,13 @@ public static class OnWebhookMessageReactionTrigger /// public static class OnWebhookKeywordTrigger { + /// + /// Choose message type + /// Required. + /// Allowed values: groupchat, channel. + /// + public const string ThreadType = "threadType"; + /// /// A comma separated list of keywords to search for /// Required. @@ -3452,6 +3508,20 @@ public static class OnWebhookKeywordTrigger } + /// + /// Input parameters for the OnWebhookNewMessageTrigger trigger operation (operationId: WebhookNewMessageTrigger). + /// + public static class OnWebhookNewMessageTrigger + { + /// + /// Choose message type + /// Required. + /// Allowed values: groupchat, channel. + /// + public const string ThreadType = "threadType"; + + } + /// /// Input parameters for the OnTeamMemberRemoved trigger operation (operationId: OnGroupMembershipRemoval). /// @@ -4006,28 +4076,19 @@ public virtual async Task ListMembersAsync(string thr } /// - /// Get unified action input metadata + /// Post a choice of options as the Flow bot to a user /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Unified Action - /// Post as - /// Type of the recipient of the action + /// Send a set of options to a Microsoft Teams user, that they must respond to before the flow will continue. This action will pause the flow until the user response to the options + /// The request body. /// Cancellation token. - /// The Get unified action input metadata response. - public virtual async Task GetUnifiedActionSchemaAsync(string unifiedAction, string postAs, string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + public virtual async Task SubscribeUserMessageWithOptionsAsync(DynamicUserMessageWithOptionsSubscriptionRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetUnifiedActionSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.SubscribeUserMessageWithOptionsAsync"); try { - if (unifiedAction is null) - throw new ArgumentNullException(nameof(unifiedAction)); - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/{Uri.EscapeDataString(unifiedAction.ToString())}/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/schema"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + var path = $"/flowbot/actions/messagewithoptions/recipienttypes/user/$subscriptions"; + await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4039,28 +4100,22 @@ public virtual async Task GetUnifiedActionSchemaAsync(strin } /// - /// Get response schema + /// Get a team /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Unified Action - /// Post as - /// Type of the recipient of the action + /// Gets the details for a team in Microsoft Teams. + /// Team /// Cancellation token. - /// The Get response schema response. - public virtual async Task GetPostToConversationResponseSchemaAsync(string unifiedAction, string postAs, string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + /// The Get a team response. + public virtual async Task GetTeamAsync([DynamicValues("GetAllTeams")] string team, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetPostToConversationResponseSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTeamAsync"); try { - if (unifiedAction is null) - throw new ArgumentNullException(nameof(unifiedAction)); - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/{Uri.EscapeDataString(unifiedAction.ToString())}/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/response/schema"; + if (team is null) + throw new ArgumentNullException(nameof(team)); + var path = $"/beta/teams/{Uri.EscapeDataString(team.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4072,22 +4127,22 @@ public virtual async Task GetPostToConversationResponseSc } /// - /// Get adaptive card input metadata + /// Get an @mention token for a user /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Type of the recipient of the action + /// Creates a token that can be inserted into a message or adaptive card to @mention a user. + /// User /// Cancellation token. - /// The Get adaptive card input metadata response. - public virtual async Task GetAdaptiveCardInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + /// The Get an @mention token for a user response. + public virtual async Task AtMentionUserAsync(string user, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAdaptiveCardInputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AtMentionUserAsync"); try { - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/adaptivecard/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/inputs"; + if (user is null) + throw new ArgumentNullException(nameof(user)); + var path = $"/v1.0/users/{Uri.EscapeDataString(user.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4099,22 +4154,20 @@ public virtual async Task GetAdaptiveCardInputMetadataAsync(s } /// - /// Get notification input metadata + /// Create a chat /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Type of the recipient of the action + /// Creates a one on one or group chat + /// The request body. /// Cancellation token. - /// The Get notification input metadata response. - public virtual async Task GetNotificationInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + /// The Create a chat response. + public virtual async Task CreateChatAsync(NewChat input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetNotificationInputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateChatAsync"); try { - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/notification/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/inputs"; + var path = $"/beta/chats"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4126,19 +4179,48 @@ public virtual async Task GetNotificationInputMetadataAsync(s } /// - /// Post a choice of options as the Flow bot to a user + /// Get messages in a chat /// - /// Send a set of options to a Microsoft Teams user, that they must respond to before the flow will continue. This action will pause the flow until the user response to the options + /// Retrieves messages from a one on one or group chat + /// Conversation ID + /// Filter Query + /// Order By + /// Top + /// Cancellation token. + /// An async enumerable of items across all pages. + public virtual AsyncPageable GetMessagesFromChatAsync([DynamicValues("GetChats")] string conversationId, string filterQuery = default, string orderBy = default, string top = default, CancellationToken cancellationToken = default) + { + if (conversationId is null) + throw new ArgumentNullException(nameof(conversationId)); + var queryParams = new List(); + if (filterQuery != default) + queryParams.Add($"$filter={Uri.EscapeDataString(filterQuery.ToString())}"); + if (orderBy != default) + queryParams.Add($"$orderby={Uri.EscapeDataString(orderBy.ToString())}"); + if (top != default) + queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); + var path = $"/beta/chats/{Uri.EscapeDataString(conversationId.ToString())}/messages" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return this.CreatePageable( + ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), + (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), + cancellationToken); + } + + /// + /// Post a message to myself + /// + /// Sends a message to the signed-in user's own Notes chat in Microsoft Teams. /// The request body. /// Cancellation token. - public virtual async Task SubscribeUserMessageWithOptionsAsync(DynamicUserMessageWithOptionsSubscriptionRequest input, CancellationToken cancellationToken = default) + /// The Post a message to myself response. + public virtual async Task PostMessageToSelfAsync(PostMessageToSelfRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.SubscribeUserMessageWithOptionsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostMessageToSelfAsync"); try { - var path = $"/flowbot/actions/messagewithoptions/recipienttypes/user/$subscriptions"; - await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + var path = $"/v1.0/chats/48:notes/messages"; + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4150,22 +4232,20 @@ await this } /// - /// Get message with options subscription input metadata + /// Create a team /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Type of the recipient of the action + /// Creates a new team in Microsoft Teams + /// The request body. /// Cancellation token. - /// The Get message with options subscription input metadata response. - public virtual async Task GetMessageWithOptionsSubscriptionInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + /// The Create a team response. + public virtual async Task CreateATeamAsync(CreateATeamInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageWithOptionsSubscriptionInputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateATeamAsync"); try { - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/messagewithoptions/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptioninputs"; + var path = $"/beta/teams"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4177,22 +4257,29 @@ public virtual async Task GetMessageWithOptionsSubscriptionIn } /// - /// Get message with options subscription output metadata + /// List team members /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Type of the recipient of the action + /// Lists the members of a team in Microsoft Teams + /// Team + /// Filter Query + /// Top /// Cancellation token. - /// The Get message with options subscription output metadata response. - public virtual async Task GetMessageWithOptionsSubscriptionOutputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) + /// The List team members response. + public virtual async Task ListTeamMembersAsync([DynamicValues("GetAllTeams")] string team, string filterQuery = default, string top = default, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageWithOptionsSubscriptionOutputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListTeamMembersAsync"); try { - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/messagewithoptions/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; + if (team is null) + throw new ArgumentNullException(nameof(team)); + var queryParams = new List(); + if (filterQuery != default) + queryParams.Add($"$filter={Uri.EscapeDataString(filterQuery.ToString())}"); + if (top != default) + queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4204,23 +4291,22 @@ public virtual async Task GetMessageWithOptionsSubscriptionOu } /// - /// Get flow continuation subscription output metadata + /// Add a member to a team /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Type of the recipient of the action + /// Adds a member to a team in Microsoft Teams + /// Team /// The request body. /// Cancellation token. - /// The Get flow continuation subscription output metadata response. - public virtual async Task GetFlowContinuationSubscriptionOutputMetadataAsync(string typeOfTheRecipientOfTheAction, string input, CancellationToken cancellationToken = default) + public virtual async Task AddMemberToTeamAsync([DynamicValues("GetAllTeams")] string team, AddMemberToTeamInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFlowContinuationSubscriptionOutputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToTeamAsync"); try { - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/flowcontinuation/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members"; + await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4232,26 +4318,24 @@ public virtual async Task GetFlowContinuationSubscriptionOutp } /// - /// Get flow continuation subscription output metadata + /// Remove a member from a team /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Post as - /// Type of the recipient of the action - /// The request body. + /// Removes a member from a team in Microsoft Teams + /// Team + /// Membership ID /// Cancellation token. - /// The Get flow continuation subscription output metadata response. - public virtual async Task GetFlowContinuationSubscriptionWithPosterOutputMetadataAsync(string postAs, string typeOfTheRecipientOfTheAction, string input, CancellationToken cancellationToken = default) + public virtual async Task RemoveMemberFromTeamAsync([DynamicValues("GetAllTeams")] string team, string membershipId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFlowContinuationSubscriptionWithPosterOutputMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromTeamAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (typeOfTheRecipientOfTheAction is null) - throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); - var path = $"/flowbot/actions/flowcontinuation/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (membershipId is null) + throw new ArgumentNullException(nameof(membershipId)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4263,20 +4347,25 @@ public virtual async Task GetFlowContinuationSubscriptionWith } /// - /// Get selected message hybrid trigger output metadata + /// Add a member to a channel /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Adds a member to a channel in Microsoft Teams. The channel must be a private or shared channel. + /// Team + /// Channel /// The request body. /// Cancellation token. - /// The Get selected message hybrid trigger output metadata response. - public virtual async Task GetSelectedMessageTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) + public virtual async Task AddMemberToChannelAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetChannelsForGroup")] string channel, AddMemberToChannelInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSelectedMessageTriggerOutputsMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToChannelAsync"); try { - var path = $"/flowbot/triggers/selectedmessage/$metadata.json/selectedmessageoutputs"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (channel is null) + throw new ArgumentNullException(nameof(channel)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/channels/{Uri.EscapeDataString(channel.ToString())}/members"; + await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4288,20 +4377,27 @@ public virtual async Task GetSelectedMessageTrig } /// - /// Get compose message hybrid trigger output metadata + /// Remove a direct member from a channel /// - /// Discovery method used to populate dynamic parameter values at design time. - /// The request body. + /// Removes a direct member from a channel in Microsoft Teams. The channel must be a private or shared channel. + /// Team + /// Channel + /// Membership ID /// Cancellation token. - /// The Get compose message hybrid trigger output metadata response. - public virtual async Task GetComposeMessageTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) + public virtual async Task RemoveMemberFromChannelAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetChannelsForGroup")] string channel, string membershipId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetComposeMessageTriggerOutputsMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromChannelAsync"); try { - var path = $"/flowbot/triggers/composemessage/$metadata.json/composemessageoutputs"; - return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (channel is null) + throw new ArgumentNullException(nameof(channel)); + if (membershipId is null) + throw new ArgumentNullException(nameof(membershipId)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/channels/{Uri.EscapeDataString(channel.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4313,20 +4409,26 @@ public virtual async Task GetComposeMessageTrigge } /// - /// Get compose message hybrid trigger output metadata + /// Post message in a chat or channel /// - /// Discovery method used to populate dynamic parameter values at design time. + /// Posts a message to a chat or a channel + /// Post as + /// Post in /// The request body. /// Cancellation token. - /// The Get compose message hybrid trigger output metadata response. - public virtual async Task GetCardResponseTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) + /// The Post message in a chat or channel response. + public virtual async Task PostMessageToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicPostMessageRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCardResponseTriggerOutputsMetadataAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostMessageToConversationAsync"); try { - var path = $"/flowbot/triggers/cardresponse/$metadata.json/cardresponseoutputs"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/beta/teams/conversation/message/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4338,22 +4440,26 @@ public virtual async Task GetCardResponseTriggerOut } /// - /// Get a team + /// Reply with a message in a channel /// - /// Gets the details for a team in Microsoft Teams. - /// Team + /// Replies with a message to a channel's message + /// Post as + /// Post in + /// The request body. /// Cancellation token. - /// The Get a team response. - public virtual async Task GetTeamAsync([DynamicValues("GetAllTeams")] string team, CancellationToken cancellationToken = default) + /// The Reply with a message in a channel response. + public virtual async Task ReplyWithMessageToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicReplyMessageRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTeamAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ReplyWithMessageToConversationAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - var path = $"/beta/teams/{Uri.EscapeDataString(team.ToString())}"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/v1.0/teams/conversation/replyWithMessage/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4365,22 +4471,26 @@ public virtual async Task GetTeamAsync([DynamicValues("GetAllTe } /// - /// Get an @mention token for a user + /// Post card in a chat or channel /// - /// Creates a token that can be inserted into a message or adaptive card to @mention a user. - /// User + /// Posts a card to a chat or a channel + /// Post as + /// Post in + /// The request body. /// Cancellation token. - /// The Get an @mention token for a user response. - public virtual async Task AtMentionUserAsync(string user, CancellationToken cancellationToken = default) + /// The Post card in a chat or channel response. + public virtual async Task PostCardToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicPostCardRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AtMentionUserAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostCardToConversationAsync"); try { - if (user is null) - throw new ArgumentNullException(nameof(user)); - var path = $"/v1.0/users/{Uri.EscapeDataString(user.ToString())}"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/v1.0/teams/conversation/adaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4392,20 +4502,26 @@ public virtual async Task AtMentionUserAsync(string user, Cancell } /// - /// Create a chat + /// Post adaptive card and wait for a response /// - /// Creates a one on one or group chat + /// Posts an adaptive card to a chat or a channel and waits for a response from any user. This will pause the flow until any user responds. + /// Post as + /// Post in /// The request body. /// Cancellation token. - /// The Create a chat response. - public virtual async Task CreateChatAsync(NewChat input, CancellationToken cancellationToken = default) + /// The Post adaptive card and wait for a response response. + public virtual async Task PostCardAndWaitForResponseAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, PostCardAndWaitForResponseInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateChatAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostCardAndWaitForResponseAsync"); try { - var path = $"/beta/chats"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/v1.0/teams/conversation/gatherinput/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}/$subscriptions"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4417,48 +4533,26 @@ public virtual async Task CreateChatAsync(NewChat input, Cancel } /// - /// Get messages in a chat - /// - /// Retrieves messages from a one on one or group chat - /// Conversation ID - /// Filter Query - /// Order By - /// Top - /// Cancellation token. - /// An async enumerable of items across all pages. - public virtual AsyncPageable GetMessagesFromChatAsync([DynamicValues("GetChats")] string conversationId, string filterQuery = default, string orderBy = default, string top = default, CancellationToken cancellationToken = default) - { - if (conversationId is null) - throw new ArgumentNullException(nameof(conversationId)); - var queryParams = new List(); - if (filterQuery != default) - queryParams.Add($"$filter={Uri.EscapeDataString(filterQuery.ToString())}"); - if (orderBy != default) - queryParams.Add($"$orderby={Uri.EscapeDataString(orderBy.ToString())}"); - if (top != default) - queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); - var path = $"/beta/chats/{Uri.EscapeDataString(conversationId.ToString())}/messages" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return this.CreatePageable( - ct => this.CallConnectorAsync(HttpMethod.Get, path, cancellationToken: ct), - (nextLink, ct) => this.CallConnectorAsync(HttpMethod.Get, nextLink, cancellationToken: ct), - cancellationToken); - } - - /// - /// Post a message to myself + /// Reply with an adaptive card in a channel /// - /// Sends a message to the signed-in user's own Notes chat in Microsoft Teams. + /// Replies with an adaptive card to a channel's message + /// Post as + /// Post in /// The request body. /// Cancellation token. - /// The Post a message to myself response. - public virtual async Task PostMessageToSelfAsync(PostMessageToSelfRequest input, CancellationToken cancellationToken = default) + /// The Reply with an adaptive card in a channel response. + public virtual async Task ReplyWithCardToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicReplyCardRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostMessageToSelfAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ReplyWithCardToConversationAsync"); try { - var path = $"/v1.0/chats/48:notes/messages"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/v1.0/teams/conversation/replyWithAdaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4470,20 +4564,26 @@ public virtual async Task PostMessageToSelfAsync(PostMessageToSelfR } /// - /// Create a team + /// Update an adaptive card in a chat or channel /// - /// Creates a new team in Microsoft Teams + /// Updates an existing adaptive card + /// Post as + /// Post in /// The request body. /// Cancellation token. - /// The Create a team response. - public virtual async Task CreateATeamAsync(CreateATeamInput input, CancellationToken cancellationToken = default) + /// The Update an adaptive card in a chat or channel response. + public virtual async Task UpdateCardInConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicUpdateCardRequest input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateATeamAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateCardInConversationAsync"); try { - var path = $"/beta/teams"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (postIn is null) + throw new ArgumentNullException(nameof(postIn)); + var path = $"/v1.0/teams/conversation/updateAdaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4495,29 +4595,20 @@ public virtual async Task CreateATeamAsync(CreateATeamInput } /// - /// List team members + /// Send a Microsoft Graph HTTP request /// - /// Lists the members of a team in Microsoft Teams - /// Team - /// Filter Query - /// Top + /// Construct a Microsoft Graph REST API request to invoke against the Microsoft Teams endpoints. These segments are supported: 1st segment: /teams, /me, /users 2nd segment: channels, chats, installedApps, messages, pinnedMessages, onlineMeetings. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api + /// The request body. /// Cancellation token. - /// The List team members response. - public virtual async Task ListTeamMembersAsync([DynamicValues("GetAllTeams")] string team, string filterQuery = default, string top = default, CancellationToken cancellationToken = default) + /// The Send a Microsoft Graph HTTP request response. + public virtual async Task HttpRequestAsync(byte[] input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListTeamMembersAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.HttpRequestAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - var queryParams = new List(); - if (filterQuery != default) - queryParams.Add($"$filter={Uri.EscapeDataString(filterQuery.ToString())}"); - if (top != default) - queryParams.Add($"$top={Uri.EscapeDataString(top.ToString())}"); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/httprequest"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, System.Net.Mime.MediaTypeNames.Application.Octet, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4529,20 +4620,20 @@ public virtual async Task ListTeamMembersAsync([Dynam } /// - /// Add a member to a team + /// Add a user to a chat /// - /// Adds a member to a team in Microsoft Teams - /// Team + /// Adds a user to a chat in Microsoft Teams. + /// Conversation ID /// The request body. /// Cancellation token. - public virtual async Task AddMemberToTeamAsync([DynamicValues("GetAllTeams")] string team, AddMemberToTeamInput input, CancellationToken cancellationToken = default) + public virtual async Task AddMemberToChatAsync([DynamicValues("GetChats")] string conversationId, AddMemberToChatInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToTeamAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToChatAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members"; + if (conversationId is null) + throw new ArgumentNullException(nameof(conversationId)); + var path = $"/v1.0/chats/{Uri.EscapeDataString(conversationId.ToString())}/members"; await this .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -4556,22 +4647,22 @@ await this } /// - /// Remove a member from a team + /// Remove a member from a chat /// - /// Removes a member from a team in Microsoft Teams - /// Team + /// Removes a member from a chat in Microsoft Teams. Only group chats support member removal. + /// Conversation ID /// Membership ID /// Cancellation token. - public virtual async Task RemoveMemberFromTeamAsync([DynamicValues("GetAllTeams")] string team, string membershipId, CancellationToken cancellationToken = default) + public virtual async Task RemoveMemberFromChatAsync([DynamicValues("GetChats")] string conversationId, string membershipId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromTeamAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromChatAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); + if (conversationId is null) + throw new ArgumentNullException(nameof(conversationId)); if (membershipId is null) throw new ArgumentNullException(nameof(membershipId)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; + var path = $"/v1.0/chats/{Uri.EscapeDataString(conversationId.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; await this .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); @@ -4585,57 +4676,55 @@ await this } /// - /// Add a member to a channel + /// Get an online meeting /// - /// Adds a member to a channel in Microsoft Teams. The channel must be a private or shared channel. - /// Team - /// Channel - /// The request body. + /// Retrieves the properties and relationships of an online meeting. You can look up a meeting by meeting ID, join web URL, or join meeting ID. + /// Lookup by + /// Lookup value /// Cancellation token. - public virtual async Task AddMemberToChannelAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetChannelsForGroup")] string channel, AddMemberToChannelInput input, CancellationToken cancellationToken = default) + /// The Get an online meeting response. + public virtual async Task GetOnlineMeetingAsync(string lookupBy, string lookupValue, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToChannelAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetOnlineMeetingAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (channel is null) - throw new ArgumentNullException(nameof(channel)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/channels/{Uri.EscapeDataString(channel.ToString())}/members"; - await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } + var queryParams = new List(); + if (lookupBy is null) + throw new ArgumentNullException(nameof(lookupBy)); + queryParams.Add($"lookupType={Uri.EscapeDataString(lookupBy.ToString())}"); + if (lookupValue is null) + throw new ArgumentNullException(nameof(lookupValue)); + queryParams.Add($"lookupValue={Uri.EscapeDataString(lookupValue.ToString())}"); + var path = $"/v1.0/me/onlineMeetings/lookup" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } } /// - /// Remove a direct member from a channel + /// List meeting transcripts /// - /// Removes a direct member from a channel in Microsoft Teams. The channel must be a private or shared channel. - /// Team - /// Channel - /// Membership ID + /// Lists all transcripts for an online meeting + /// Meeting ID /// Cancellation token. - public virtual async Task RemoveMemberFromChannelAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetChannelsForGroup")] string channel, string membershipId, CancellationToken cancellationToken = default) + /// The List meeting transcripts response. + public virtual async Task ListMeetingTranscriptsAsync(string meetingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromChannelAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMeetingTranscriptsAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (channel is null) - throw new ArgumentNullException(nameof(channel)); - if (membershipId is null) - throw new ArgumentNullException(nameof(membershipId)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/channels/{Uri.EscapeDataString(channel.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4647,26 +4736,25 @@ await this } /// - /// Post message in a chat or channel + /// Get meeting transcript /// - /// Posts a message to a chat or a channel - /// Post as - /// Post in - /// The request body. + /// Gets a specific transcript for an online meeting + /// Meeting ID + /// Transcript ID /// Cancellation token. - /// The Post message in a chat or channel response. - public virtual async Task PostMessageToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicPostMessageRequest input, CancellationToken cancellationToken = default) + /// The Get meeting transcript response. + public virtual async Task GetMeetingTranscriptAsync(string meetingId, string transcriptId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostMessageToConversationAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingTranscriptAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/beta/teams/conversation/message/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + if (transcriptId is null) + throw new ArgumentNullException(nameof(transcriptId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4678,26 +4766,25 @@ public virtual async Task PostMessageToConversationA } /// - /// Reply with a message in a channel + /// Get meeting transcript content /// - /// Replies with a message to a channel's message - /// Post as - /// Post in - /// The request body. + /// Gets the content of a meeting transcript + /// Meeting ID + /// Transcript ID /// Cancellation token. - /// The Reply with a message in a channel response. - public virtual async Task ReplyWithMessageToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicReplyMessageRequest input, CancellationToken cancellationToken = default) + /// The Get meeting transcript content response. + public virtual async Task GetMeetingTranscriptContentAsync(string meetingId, string transcriptId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ReplyWithMessageToConversationAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingTranscriptContentAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/v1.0/teams/conversation/replyWithMessage/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + if (transcriptId is null) + throw new ArgumentNullException(nameof(transcriptId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}/content"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4709,26 +4796,22 @@ public virtual async Task ReplyWithMessageToConversa } /// - /// Post card in a chat or channel + /// List meeting recordings /// - /// Posts a card to a chat or a channel - /// Post as - /// Post in - /// The request body. + /// Lists all recordings for an online meeting + /// Meeting ID /// Cancellation token. - /// The Post card in a chat or channel response. - public virtual async Task PostCardToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicPostCardRequest input, CancellationToken cancellationToken = default) + /// The List meeting recordings response. + public virtual async Task ListMeetingRecordingsAsync(string meetingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostCardToConversationAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMeetingRecordingsAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/v1.0/teams/conversation/adaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4740,26 +4823,25 @@ public virtual async Task PostCardToConversationAsyn } /// - /// Post adaptive card and wait for a response + /// Get meeting recording /// - /// Posts an adaptive card to a chat or a channel and waits for a response from any user. This will pause the flow until any user responds. - /// Post as - /// Post in - /// The request body. + /// Gets a specific recording for an online meeting + /// Meeting ID + /// Recording ID /// Cancellation token. - /// The Post adaptive card and wait for a response response. - public virtual async Task PostCardAndWaitForResponseAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, PostCardAndWaitForResponseInput input, CancellationToken cancellationToken = default) + /// The Get meeting recording response. + public virtual async Task GetMeetingRecordingAsync(string meetingId, string recordingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.PostCardAndWaitForResponseAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingRecordingAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/v1.0/teams/conversation/gatherinput/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}/$subscriptions"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + if (recordingId is null) + throw new ArgumentNullException(nameof(recordingId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4771,26 +4853,25 @@ public virtual async Task PostCard } /// - /// Reply with an adaptive card in a channel + /// Get meeting recording content /// - /// Replies with an adaptive card to a channel's message - /// Post as - /// Post in - /// The request body. + /// Gets the content stream of a meeting recording + /// Meeting ID + /// Recording ID /// Cancellation token. - /// The Reply with an adaptive card in a channel response. - public virtual async Task ReplyWithCardToConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicReplyCardRequest input, CancellationToken cancellationToken = default) + /// The Get meeting recording content response. + public virtual async Task GetMeetingRecordingContentAsync(string meetingId, string recordingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ReplyWithCardToConversationAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingRecordingContentAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/v1.0/teams/conversation/replyWithAdaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + if (recordingId is null) + throw new ArgumentNullException(nameof(recordingId)); + var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}/content"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4802,26 +4883,19 @@ public virtual async Task ReplyWithCardToConversatio } /// - /// Update an adaptive card in a chat or channel + /// List sections /// - /// Updates an existing adaptive card - /// Post as - /// Post in - /// The request body. + /// Lists the current user's teamwork sections /// Cancellation token. - /// The Update an adaptive card in a chat or channel response. - public virtual async Task UpdateCardInConversationAsync(string postAs, [DynamicValues("GetMessageLocations")] string postIn, DynamicUpdateCardRequest input, CancellationToken cancellationToken = default) + /// The List sections response. + public virtual async Task ListSectionsAsync(CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateCardInConversationAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListSectionsAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (postIn is null) - throw new ArgumentNullException(nameof(postIn)); - var path = $"/v1.0/teams/conversation/updateAdaptivecard/poster/{Uri.EscapeDataString(postAs.ToString())}/location/{Uri.EscapeDataString(postIn.ToString())}"; + var path = $"/beta/me/teamwork/sections"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4833,22 +4907,20 @@ public virtual async Task UpdateCardInConversationAs } /// - /// Get message details response schema + /// Create a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Message type + /// Creates a new teamwork section for the current user + /// The request body. /// Cancellation token. - /// The Get message details response schema response. - public virtual async Task GetMessageDetailsInputSchemaAsync(string messageType, CancellationToken cancellationToken = default) + /// The Create a section response. + public virtual async Task CreateSectionAsync(CreateSectionInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageDetailsInputSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateSectionAsync"); try { - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - var path = $"/flowbot/getmessagedetailsinputschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; + var path = $"/beta/me/teamwork/sections"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4860,22 +4932,22 @@ public virtual async Task GetMessageDetailsInputSchemaA } /// - /// Get message details input metadata + /// Get a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Message type + /// Gets a specific teamwork section by ID + /// Section ID /// Cancellation token. - /// The Get message details input metadata response. - public virtual async Task GetMessageDetailsResponseSchemaAsync(string messageType, CancellationToken cancellationToken = default) + /// The Get a section response. + public virtual async Task GetSectionAsync(string sectionId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageDetailsResponseSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSectionAsync"); try { - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - var path = $"/flowbot/getmessagedetailsresponseschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4887,22 +4959,23 @@ public virtual async Task GetMessageDetailsResponseSche } /// - /// List members input schema + /// Update a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Message type + /// Updates a teamwork section for the current user + /// Section ID + /// The request body. /// Cancellation token. - /// The List members input schema response. - public virtual async Task ListMembersInputSchemaAsync(string messageType, CancellationToken cancellationToken = default) + /// The Update a section response. + public virtual async Task UpdateSectionAsync(string sectionId, UpdateSectionInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMembersInputSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateSectionAsync"); try { - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - var path = $"/flowbot/listmembersinputschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4914,22 +4987,21 @@ public virtual async Task ListMembersInputSchemaAsync(string } /// - /// Input schema for webhook trigger + /// Delete a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Message type + /// Deletes a teamwork section for the current user + /// Section ID /// Cancellation token. - /// The Input schema for webhook trigger response. - public virtual async Task GetWebhookTriggerRequestSchemaAsync(string messageType, CancellationToken cancellationToken = default) + public virtual async Task DeleteSectionAsync(string sectionId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetWebhookTriggerRequestSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteSectionAsync"); try { - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - var path = $"/flowbot/webhookTrigger/inputSchema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4941,25 +5013,22 @@ public virtual async Task GetWebhookTriggerRequestSchemaAs } /// - /// Response schema for webhook trigger + /// List section items /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Trigger type - /// Message type + /// Lists the items (chats, channels, meetings, communities) in a teamwork section. Each item belongs to exactly one section at a time. + /// Section ID /// Cancellation token. - /// The Response schema for webhook trigger response. - public virtual async Task GetWebhookTriggerResponseSchemaAsync(string triggerType, string messageType, CancellationToken cancellationToken = default) + /// The List section items response. + public virtual async Task ListSectionItemsAsync(string sectionId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetWebhookTriggerResponseSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListSectionItemsAsync"); try { - if (triggerType is null) - throw new ArgumentNullException(nameof(triggerType)); - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - var path = $"/flowbot/webhookTrigger/triggerType/{Uri.EscapeDataString(triggerType.ToString())}/responseSchema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -4971,25 +5040,23 @@ public virtual async Task GetWebhookTriggerResponseSchemaA } /// - /// Conversation location for where to post + /// Add an item to a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Message Type - /// Post as + /// Adds an item (chat, channel, meeting, or community) currently in a system-defined section to a user-defined teamwork section. Use Move Section Item to relocate items already in another user-defined section. + /// Section ID + /// The request body. /// Cancellation token. - /// The Conversation location for where to post response. - public virtual async Task GetMessageLocationsAsync(string messageType, string postAs, CancellationToken cancellationToken = default) + /// The Add an item to a section response. + public virtual async Task AddSectionItemAsync(string sectionId, AddSectionItemInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageLocationsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddSectionItemAsync"); try { - if (messageType is null) - throw new ArgumentNullException(nameof(messageType)); - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - var path = $"/flowbot/messageType/{Uri.EscapeDataString(messageType.ToString())}/poster/{Uri.EscapeDataString(postAs.ToString())}"; + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5001,25 +5068,24 @@ public virtual async Task GetMessageLocationsAsync( } /// - /// Get feed notification input metadata + /// Remove an item from a section /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Post as - /// Notification type + /// Removes an item from a user-defined teamwork section. The underlying chat, channel, meeting, or community is not deleted; the item returns to its default system-defined section. + /// Section ID + /// Section Item ID /// Cancellation token. - /// The Get feed notification input metadata response. - public virtual async Task GetFeedNotificationInputSchemaAsync(string postAs, string notificationType, CancellationToken cancellationToken = default) + public virtual async Task RemoveSectionItemAsync(string sectionId, string sectionItemId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFeedNotificationInputSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveSectionItemAsync"); try { - if (postAs is null) - throw new ArgumentNullException(nameof(postAs)); - if (notificationType is null) - throw new ArgumentNullException(nameof(notificationType)); - var path = $"/flowbot/getfeednotificationinputschema/poster/{Uri.EscapeDataString(postAs.ToString())}/notificationType/{Uri.EscapeDataString(notificationType.ToString())}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + if (sectionItemId is null) + throw new ArgumentNullException(nameof(sectionItemId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items/{Uri.EscapeDataString(sectionItemId.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5031,20 +5097,26 @@ public virtual async Task GetFeedNotificationInputSchemaAsync(st } /// - /// Send a Microsoft Graph HTTP request + /// Move a section item /// - /// Construct a Microsoft Graph REST API request to invoke against the Microsoft Teams endpoints. These segments are supported: 1st segment: /teams, /me, /users 2nd segment: channels, chats, installedApps, messages, pinnedMessages, onlineMeetings. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api + /// Atomically moves an item from one user-defined teamwork section to another user-defined section. Each item can belong to only one section at a time. This action removes the item from its current section and adds it to the target section. + /// Section ID + /// Section Item ID /// The request body. /// Cancellation token. - /// The Send a Microsoft Graph HTTP request response. - public virtual async Task HttpRequestAsync(byte[] input, CancellationToken cancellationToken = default) + /// The Move a section item response. + public virtual async Task MoveSectionItemAsync(string sectionId, string sectionItemId, MoveSectionItemInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.HttpRequestAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.MoveSectionItemAsync"); try { - var path = $"/httprequest"; + if (sectionId is null) + throw new ArgumentNullException(nameof(sectionId)); + if (sectionItemId is null) + throw new ArgumentNullException(nameof(sectionItemId)); + var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items/{Uri.EscapeDataString(sectionItemId.ToString())}/move"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, System.Net.Mime.MediaTypeNames.Application.Octet, cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5056,22 +5128,22 @@ public virtual async Task HttpRequestAsync(byte[] input, Canc } /// - /// Add a user to a chat + /// List all tags for a team /// - /// Adds a user to a chat in Microsoft Teams. - /// Conversation ID - /// The request body. + /// Lists the team's tags + /// Team /// Cancellation token. - public virtual async Task AddMemberToChatAsync([DynamicValues("GetChats")] string conversationId, AddMemberToChatInput input, CancellationToken cancellationToken = default) + /// The List all tags for a team response. + public virtual async Task GetTagsAsync([DynamicValues("GetAllTeams")] string team, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToChatAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagsAsync"); try { - if (conversationId is null) - throw new ArgumentNullException(nameof(conversationId)); - var path = $"/v1.0/chats/{Uri.EscapeDataString(conversationId.ToString())}/members"; - await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5083,24 +5155,23 @@ await this } /// - /// Remove a member from a chat + /// Create a tag for a team /// - /// Removes a member from a chat in Microsoft Teams. Only group chats support member removal. - /// Conversation ID - /// Membership ID + /// Creates a tag in a team + /// Team + /// The request body. /// Cancellation token. - public virtual async Task RemoveMemberFromChatAsync([DynamicValues("GetChats")] string conversationId, string membershipId, CancellationToken cancellationToken = default) + /// The Create a tag for a team response. + public virtual async Task CreateTagAsync([DynamicValues("GetAllTeams")] string team, CreateTagInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveMemberFromChatAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateTagAsync"); try { - if (conversationId is null) - throw new ArgumentNullException(nameof(conversationId)); - if (membershipId is null) - throw new ArgumentNullException(nameof(membershipId)); - var path = $"/v1.0/chats/{Uri.EscapeDataString(conversationId.ToString())}/members/{Uri.EscapeDataString(membershipId.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags"; + return await this + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5112,28 +5183,25 @@ await this } /// - /// Get an online meeting + /// Get a team tag /// - /// Retrieves the properties and relationships of an online meeting. You can look up a meeting by meeting ID, join web URL, or join meeting ID. - /// Lookup by - /// Lookup value + /// Gets a specific tag by ID from a team + /// Team + /// Tag /// Cancellation token. - /// The Get an online meeting response. - public virtual async Task GetOnlineMeetingAsync(string lookupBy, string lookupValue, CancellationToken cancellationToken = default) + /// The Get a team tag response. + public virtual async Task GetTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetOnlineMeetingAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagAsync"); try { - var queryParams = new List(); - if (lookupBy is null) - throw new ArgumentNullException(nameof(lookupBy)); - queryParams.Add($"lookupType={Uri.EscapeDataString(lookupBy.ToString())}"); - if (lookupValue is null) - throw new ArgumentNullException(nameof(lookupValue)); - queryParams.Add($"lookupValue={Uri.EscapeDataString(lookupValue.ToString())}"); - var path = $"/v1.0/me/onlineMeetings/lookup" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5145,22 +5213,26 @@ public virtual async Task GetOnlineMeetingAsync(string } /// - /// List meeting transcripts + /// Update a team tag /// - /// Lists all transcripts for an online meeting - /// Meeting ID + /// Updates the display name of a tag in a team + /// Team + /// Tag + /// The request body. /// Cancellation token. - /// The List meeting transcripts response. - public virtual async Task ListMeetingTranscriptsAsync(string meetingId, CancellationToken cancellationToken = default) + /// The Update a team tag response. + public virtual async Task UpdateTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, UpdateTagInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMeetingTranscriptsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateTagAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts"; + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5172,25 +5244,24 @@ public virtual async Task ListMeetingTranscrip } /// - /// Get meeting transcript + /// Delete a team tag /// - /// Gets a specific transcript for an online meeting - /// Meeting ID - /// Transcript ID + /// Deletes a tag from a team + /// Team + /// Tag /// Cancellation token. - /// The Get meeting transcript response. - public virtual async Task GetMeetingTranscriptAsync(string meetingId, string transcriptId, CancellationToken cancellationToken = default) + public virtual async Task DeleteTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingTranscriptAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteTagAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - if (transcriptId is null) - throw new ArgumentNullException(nameof(transcriptId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5202,25 +5273,26 @@ public virtual async Task GetMeetingTranscriptAsync(stri } /// - /// Get meeting transcript content + /// Add a member to a team tag /// - /// Gets the content of a meeting transcript - /// Meeting ID - /// Transcript ID + /// Adds a user to a team tag + /// Team + /// Tag + /// The request body. /// Cancellation token. - /// The Get meeting transcript content response. - public virtual async Task GetMeetingTranscriptContentAsync(string meetingId, string transcriptId, CancellationToken cancellationToken = default) + /// The Add a member to a team tag response. + public virtual async Task AddMemberToTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, AddMemberToTagInput input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingTranscriptContentAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToTagAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - if (transcriptId is null) - throw new ArgumentNullException(nameof(transcriptId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}/content"; + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5232,22 +5304,25 @@ public virtual async Task GetMeetingTranscriptContentAsync(string meetin } /// - /// List meeting recordings + /// List the members of a team tag /// - /// Lists all recordings for an online meeting - /// Meeting ID + /// Lists the members of a team tag + /// Team + /// Tag /// Cancellation token. - /// The List meeting recordings response. - public virtual async Task ListMeetingRecordingsAsync(string meetingId, CancellationToken cancellationToken = default) + /// The List the members of a team tag response. + public virtual async Task GetTagMembersAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMeetingRecordingsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagMembersAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings"; + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5259,25 +5334,27 @@ public virtual async Task ListMeetingRecordings } /// - /// Get meeting recording + /// Delete a member from a team tag /// - /// Gets a specific recording for an online meeting - /// Meeting ID - /// Recording ID + /// Deletes a member from a team tag + /// Team + /// Tag + /// Tag Member ID /// Cancellation token. - /// The Get meeting recording response. - public virtual async Task GetMeetingRecordingAsync(string meetingId, string recordingId, CancellationToken cancellationToken = default) + public virtual async Task DeleteTagMemberAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, string tagMemberId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingRecordingAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteTagMemberAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - if (recordingId is null) - throw new ArgumentNullException(nameof(recordingId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + if (team is null) + throw new ArgumentNullException(nameof(team)); + if (tag is null) + throw new ArgumentNullException(nameof(tag)); + if (tagMemberId is null) + throw new ArgumentNullException(nameof(tagMemberId)); + var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members/{Uri.EscapeDataString(tagMemberId.ToString())}"; + await this + .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5289,25 +5366,22 @@ public virtual async Task GetMeetingRecordingAsync(string } /// - /// Get meeting recording content + /// List call recordings /// - /// Gets the content stream of a meeting recording - /// Meeting ID - /// Recording ID + /// Lists all recordings for an ad-hoc call + /// Call ID /// Cancellation token. - /// The Get meeting recording content response. - public virtual async Task GetMeetingRecordingContentAsync(string meetingId, string recordingId, CancellationToken cancellationToken = default) + /// The List call recordings response. + public virtual async Task ListCallRecordingsAsync(string callId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMeetingRecordingContentAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListCallRecordingsAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - if (recordingId is null) - throw new ArgumentNullException(nameof(recordingId)); - var path = $"/v1.0/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}/content"; + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5319,19 +5393,25 @@ public virtual async Task GetMeetingRecordingContentAsync(string meeting } /// - /// List sections + /// Get call recording /// - /// Lists the current user's teamwork sections + /// Gets a specific recording for an ad-hoc call + /// Call ID + /// Recording ID /// Cancellation token. - /// The List sections response. - public virtual async Task ListSectionsAsync(CancellationToken cancellationToken = default) + /// The Get call recording response. + public virtual async Task GetCallRecordingAsync(string callId, string recordingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListSectionsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallRecordingAsync"); try { - var path = $"/beta/me/teamwork/sections"; + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + if (recordingId is null) + throw new ArgumentNullException(nameof(recordingId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5343,20 +5423,25 @@ public virtual async Task ListSectionsAsync(CancellationTo } /// - /// Create a section + /// Get call recording content /// - /// Creates a new teamwork section for the current user - /// The request body. + /// Gets the content of a call recording + /// Call ID + /// Recording ID /// Cancellation token. - /// The Create a section response. - public virtual async Task CreateSectionAsync(CreateSectionInput input, CancellationToken cancellationToken = default) + /// The Get call recording content response. + public virtual async Task GetCallRecordingContentAsync(string callId, string recordingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateSectionAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallRecordingContentAsync"); try { - var path = $"/beta/me/teamwork/sections"; + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + if (recordingId is null) + throw new ArgumentNullException(nameof(recordingId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}/content"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5368,22 +5453,22 @@ public virtual async Task CreateSectionAsync(CreateSectionInput } /// - /// Get a section + /// List call transcripts /// - /// Gets a specific teamwork section by ID - /// Section ID + /// Lists all transcripts for an ad-hoc call + /// Call ID /// Cancellation token. - /// The Get a section response. - public virtual async Task GetSectionAsync(string sectionId, CancellationToken cancellationToken = default) + /// The List call transcripts response. + public virtual async Task ListCallTranscriptsAsync(string callId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSectionAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListCallTranscriptsAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5395,23 +5480,25 @@ public virtual async Task GetSectionAsync(string sectionId, Can } /// - /// Update a section + /// Get call transcript /// - /// Updates a teamwork section for the current user - /// Section ID - /// The request body. + /// Gets a specific transcript for an ad-hoc call + /// Call ID + /// Transcript ID /// Cancellation token. - /// The Update a section response. - public virtual async Task UpdateSectionAsync(string sectionId, UpdateSectionInput input, CancellationToken cancellationToken = default) + /// The Get call transcript response. + public virtual async Task GetCallTranscriptAsync(string callId, string transcriptId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateSectionAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallTranscriptAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + if (transcriptId is null) + throw new ArgumentNullException(nameof(transcriptId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5423,21 +5510,25 @@ public virtual async Task UpdateSectionAsync(string sectionId, } /// - /// Delete a section + /// Get call transcript content /// - /// Deletes a teamwork section for the current user - /// Section ID + /// Gets the content of a call transcript + /// Call ID + /// Transcript ID /// Cancellation token. - public virtual async Task DeleteSectionAsync(string sectionId, CancellationToken cancellationToken = default) + /// The Get call transcript content response. + public virtual async Task GetCallTranscriptContentAsync(string callId, string transcriptId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteSectionAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallTranscriptContentAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + if (callId is null) + throw new ArgumentNullException(nameof(callId)); + if (transcriptId is null) + throw new ArgumentNullException(nameof(transcriptId)); + var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}/content"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5449,22 +5540,35 @@ await this } /// - /// List section items + /// Get all ad-hoc call recordings /// - /// Lists the items (chats, channels, meetings, communities) in a teamwork section. Each item belongs to exactly one section at a time. - /// Section ID + /// Gets all recordings from ad-hoc calls for the signed-in user + /// Start Date Time + /// End Date Time + /// Top + /// Skip Token + /// Delta Token /// Cancellation token. - /// The List section items response. - public virtual async Task ListSectionItemsAsync(string sectionId, CancellationToken cancellationToken = default) + /// The Get all ad-hoc call recordings response. + public virtual async Task GetAllAdhocCallRecordingsAsync(string startDateTime = default, string endDateTime = default, int? top = default, string skipToken = default, string deltaToken = default, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListSectionItemsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAllAdhocCallRecordingsAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items"; + var queryParams = new List(); + if (startDateTime != default) + queryParams.Add($"startDateTime={Uri.EscapeDataString(startDateTime.ToString())}"); + if (endDateTime != default) + queryParams.Add($"endDateTime={Uri.EscapeDataString(endDateTime.ToString())}"); + if (top.HasValue) + queryParams.Add($"$top={Uri.EscapeDataString(top.Value.ToString())}"); + if (skipToken != default) + queryParams.Add($"$skiptoken={Uri.EscapeDataString(skipToken.ToString())}"); + if (deltaToken != default) + queryParams.Add($"$deltatoken={Uri.EscapeDataString(deltaToken.ToString())}"); + var path = $"/v1.0/me/adhocCalls/getAllRecordings" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5476,23 +5580,35 @@ public virtual async Task ListSectionItemsAsync(string } /// - /// Add an item to a section + /// Get all ad-hoc call transcripts /// - /// Adds an item (chat, channel, meeting, or community) currently in a system-defined section to a user-defined teamwork section. Use Move Section Item to relocate items already in another user-defined section. - /// Section ID - /// The request body. + /// Gets all transcripts from ad-hoc calls for the signed-in user + /// Start Date Time + /// End Date Time + /// Top + /// Skip Token + /// Delta Token /// Cancellation token. - /// The Add an item to a section response. - public virtual async Task AddSectionItemAsync(string sectionId, AddSectionItemInput input, CancellationToken cancellationToken = default) + /// The Get all ad-hoc call transcripts response. + public virtual async Task GetAllAdhocCallTranscriptsAsync(string startDateTime = default, string endDateTime = default, int? top = default, string skipToken = default, string deltaToken = default, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddSectionItemAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAllAdhocCallTranscriptsAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items"; + var queryParams = new List(); + if (startDateTime != default) + queryParams.Add($"startDateTime={Uri.EscapeDataString(startDateTime.ToString())}"); + if (endDateTime != default) + queryParams.Add($"endDateTime={Uri.EscapeDataString(endDateTime.ToString())}"); + if (top.HasValue) + queryParams.Add($"$top={Uri.EscapeDataString(top.Value.ToString())}"); + if (skipToken != default) + queryParams.Add($"$skiptoken={Uri.EscapeDataString(skipToken.ToString())}"); + if (deltaToken != default) + queryParams.Add($"$deltatoken={Uri.EscapeDataString(deltaToken.ToString())}"); + var path = $"/v1.0/me/adhocCalls/getAllTranscripts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5504,24 +5620,22 @@ public virtual async Task AddSectionItemAsync(string sectio } /// - /// Remove an item from a section + /// List AI insights /// - /// Removes an item from a user-defined teamwork section. The underlying chat, channel, meeting, or community is not deleted; the item returns to its default system-defined section. - /// Section ID - /// Section Item ID + /// Lists AI-generated insights for an online meeting. Requires Microsoft 365 Copilot license. + /// Meeting ID /// Cancellation token. - public virtual async Task RemoveSectionItemAsync(string sectionId, string sectionItemId, CancellationToken cancellationToken = default) + /// The List AI insights response. + public virtual async Task ListAiInsightsAsync(string meetingId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.RemoveSectionItemAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListAiInsightsAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - if (sectionItemId is null) - throw new ArgumentNullException(nameof(sectionItemId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items/{Uri.EscapeDataString(sectionItemId.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + var path = $"/v1.0/copilot/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/aiInsights"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5533,26 +5647,25 @@ await this } /// - /// Move a section item + /// Get AI insight /// - /// Atomically moves an item from one user-defined teamwork section to another user-defined section. Each item can belong to only one section at a time. This action removes the item from its current section and adds it to the target section. - /// Section ID - /// Section Item ID - /// The request body. + /// Gets a specific AI-generated insight for an online meeting. Requires Microsoft 365 Copilot license. + /// Meeting ID + /// AI Insight ID /// Cancellation token. - /// The Move a section item response. - public virtual async Task MoveSectionItemAsync(string sectionId, string sectionItemId, MoveSectionItemInput input, CancellationToken cancellationToken = default) + /// The Get AI insight response. + public virtual async Task GetAiInsightAsync(string meetingId, string aIInsightId, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.MoveSectionItemAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAiInsightAsync"); try { - if (sectionId is null) - throw new ArgumentNullException(nameof(sectionId)); - if (sectionItemId is null) - throw new ArgumentNullException(nameof(sectionItemId)); - var path = $"/beta/me/teamwork/sections/{Uri.EscapeDataString(sectionId.ToString())}/items/{Uri.EscapeDataString(sectionItemId.ToString())}/move"; + if (meetingId is null) + throw new ArgumentNullException(nameof(meetingId)); + if (aIInsightId is null) + throw new ArgumentNullException(nameof(aIInsightId)); + var path = $"/v1.0/copilot/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/aiInsights/{Uri.EscapeDataString(aIInsightId.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5564,22 +5677,25 @@ public virtual async Task MoveSectionItemAsync(string secti } /// - /// Get subscription scope input schema + /// Conversation location for where to post /// /// Discovery method used to populate dynamic parameter values at design time. - /// scopeType + /// Message Type + /// Post as /// Cancellation token. - /// The Get subscription scope input schema response. - public virtual async Task GetSubscriptionScopeSchemaAsync(string scopeType, CancellationToken cancellationToken = default) + /// The Conversation location for where to post response. + public virtual async Task GetMessageLocationsAsync(string messageType, string postAs, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSubscriptionScopeSchemaAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageLocationsAsync"); try { - if (scopeType is null) - throw new ArgumentNullException(nameof(scopeType)); - var path = $"/internalparameters/triggers/subscriptionscope/{Uri.EscapeDataString(scopeType.ToString())}/schema"; + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + var path = $"/flowbot/messageType/{Uri.EscapeDataString(messageType.ToString())}/poster/{Uri.EscapeDataString(postAs.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5591,22 +5707,22 @@ public virtual async Task GetSubscriptionScopeSchemaAsync(string s } /// - /// List all tags for a team + /// Get message details response schema /// - /// Lists the team's tags - /// Team + /// Discovery method used to populate dynamic parameter values at design time. + /// Message type /// Cancellation token. - /// The List all tags for a team response. - public virtual async Task GetTagsAsync([DynamicValues("GetAllTeams")] string team, CancellationToken cancellationToken = default) + /// The Get message details response schema response. + public virtual async Task GetMessageDetailsInputSchemaAsync(string messageType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageDetailsInputSchemaAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags"; + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + var path = $"/flowbot/getmessagedetailsinputschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5618,23 +5734,22 @@ public virtual async Task GetTagsAsync([DynamicValues("Ge } /// - /// Create a tag for a team + /// Get message details input metadata /// - /// Creates a tag in a team - /// Team - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// Message type /// Cancellation token. - /// The Create a tag for a team response. - public virtual async Task CreateTagAsync([DynamicValues("GetAllTeams")] string team, CreateTagInput input, CancellationToken cancellationToken = default) + /// The Get message details input metadata response. + public virtual async Task GetMessageDetailsResponseSchemaAsync(string messageType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.CreateTagAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageDetailsResponseSchemaAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags"; + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + var path = $"/flowbot/getmessagedetailsresponseschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5646,25 +5761,22 @@ public virtual async Task CreateTagAsync([DynamicValues } /// - /// Get a team tag + /// List members input schema /// - /// Gets a specific tag by ID from a team - /// Team - /// Tag + /// Discovery method used to populate dynamic parameter values at design time. + /// Message type /// Cancellation token. - /// The Get a team tag response. - public virtual async Task GetTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) + /// The List members input schema response. + public virtual async Task ListMembersInputSchemaAsync(string messageType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListMembersInputSchemaAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + var path = $"/flowbot/listmembersinputschema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5676,26 +5788,22 @@ public virtual async Task GetTagAsync([DynamicValues("G } /// - /// Update a team tag + /// Get notification input metadata /// - /// Updates the display name of a tag in a team - /// Team - /// Tag - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// Type of the recipient of the action /// Cancellation token. - /// The Update a team tag response. - public virtual async Task UpdateTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, UpdateTagInput input, CancellationToken cancellationToken = default) + /// The Get notification input metadata response. + public virtual async Task GetNotificationInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.UpdateTagAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetNotificationInputMetadataAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/notification/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/inputs"; return await this - .CallConnectorAsync(HttpMethod.Patch, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5707,24 +5815,25 @@ public virtual async Task UpdateTagAsync([DynamicValues } /// - /// Delete a team tag + /// Get feed notification input metadata /// - /// Deletes a tag from a team - /// Team - /// Tag + /// Discovery method used to populate dynamic parameter values at design time. + /// Post as + /// Notification type /// Cancellation token. - public virtual async Task DeleteTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) + /// The Get feed notification input metadata response. + public virtual async Task GetFeedNotificationInputSchemaAsync(string postAs, string notificationType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteTagAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFeedNotificationInputSchemaAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (notificationType is null) + throw new ArgumentNullException(nameof(notificationType)); + var path = $"/flowbot/getfeednotificationinputschema/poster/{Uri.EscapeDataString(postAs.ToString())}/notificationType/{Uri.EscapeDataString(notificationType.ToString())}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5736,26 +5845,28 @@ await this } /// - /// Add a member to a team tag + /// Get unified action input metadata /// - /// Adds a user to a team tag - /// Team - /// Tag - /// The request body. + /// Discovery method used to populate dynamic parameter values at design time. + /// Unified Action + /// Post as + /// Type of the recipient of the action /// Cancellation token. - /// The Add a member to a team tag response. - public virtual async Task AddMemberToTagAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, AddMemberToTagInput input, CancellationToken cancellationToken = default) + /// The Get unified action input metadata response. + public virtual async Task GetUnifiedActionSchemaAsync(string unifiedAction, string postAs, string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.AddMemberToTagAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetUnifiedActionSchemaAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members"; + if (unifiedAction is null) + throw new ArgumentNullException(nameof(unifiedAction)); + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/{Uri.EscapeDataString(unifiedAction.ToString())}/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/schema"; return await this - .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5767,25 +5878,22 @@ public virtual async Task AddMemberToTagAsync([Dyn } /// - /// List the members of a team tag + /// Get adaptive card input metadata /// - /// Lists the members of a team tag - /// Team - /// Tag + /// Discovery method used to populate dynamic parameter values at design time. + /// Type of the recipient of the action /// Cancellation token. - /// The List the members of a team tag response. - public virtual async Task GetTagMembersAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, CancellationToken cancellationToken = default) + /// The Get adaptive card input metadata response. + public virtual async Task GetAdaptiveCardInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetTagMembersAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAdaptiveCardInputMetadataAsync"); try { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members"; + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/adaptivecard/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/inputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5797,27 +5905,22 @@ public virtual async Task GetTagMembersAsync([Dynam } /// - /// Delete a member from a team tag + /// Get message with options subscription input metadata /// - /// Deletes a member from a team tag - /// Team - /// Tag - /// Tag Member ID + /// Discovery method used to populate dynamic parameter values at design time. + /// Type of the recipient of the action /// Cancellation token. - public virtual async Task DeleteTagMemberAsync([DynamicValues("GetAllTeams")] string team, [DynamicValues("GetTags")] string tag, string tagMemberId, CancellationToken cancellationToken = default) + /// The Get message with options subscription input metadata response. + public virtual async Task GetMessageWithOptionsSubscriptionInputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.DeleteTagMemberAsync"); - try - { - if (team is null) - throw new ArgumentNullException(nameof(team)); - if (tag is null) - throw new ArgumentNullException(nameof(tag)); - if (tagMemberId is null) - throw new ArgumentNullException(nameof(tagMemberId)); - var path = $"/v1.0/teams/{Uri.EscapeDataString(team.ToString())}/tags/{Uri.EscapeDataString(tag.ToString())}/members/{Uri.EscapeDataString(tagMemberId.ToString())}"; - await this - .CallConnectorAsync(HttpMethod.Delete, path, cancellationToken: cancellationToken) + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageWithOptionsSubscriptionInputMetadataAsync"); + try + { + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/messagewithoptions/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptioninputs"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5829,22 +5932,22 @@ await this } /// - /// List call recordings + /// Get message with options subscription output metadata /// - /// Lists all recordings for an ad-hoc call - /// Call ID + /// Discovery method used to populate dynamic parameter values at design time. + /// Type of the recipient of the action /// Cancellation token. - /// The List call recordings response. - public virtual async Task ListCallRecordingsAsync(string callId, CancellationToken cancellationToken = default) + /// The Get message with options subscription output metadata response. + public virtual async Task GetMessageWithOptionsSubscriptionOutputMetadataAsync(string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListCallRecordingsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetMessageWithOptionsSubscriptionOutputMetadataAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings"; + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/messagewithoptions/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5856,25 +5959,20 @@ public virtual async Task ListCallRecordingsAsy } /// - /// Get call recording + /// Get selected message hybrid trigger output metadata /// - /// Gets a specific recording for an ad-hoc call - /// Call ID - /// Recording ID + /// Discovery method used to populate dynamic parameter values at design time. + /// The request body. /// Cancellation token. - /// The Get call recording response. - public virtual async Task GetCallRecordingAsync(string callId, string recordingId, CancellationToken cancellationToken = default) + /// The Get selected message hybrid trigger output metadata response. + public virtual async Task GetSelectedMessageTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallRecordingAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSelectedMessageTriggerOutputsMetadataAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - if (recordingId is null) - throw new ArgumentNullException(nameof(recordingId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}"; + var path = $"/flowbot/triggers/selectedmessage/$metadata.json/selectedmessageoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5886,25 +5984,20 @@ public virtual async Task GetCallRecordingAsync(string ca } /// - /// Get call recording content + /// Get compose message hybrid trigger output metadata /// - /// Gets the content of a call recording - /// Call ID - /// Recording ID + /// Discovery method used to populate dynamic parameter values at design time. + /// The request body. /// Cancellation token. - /// The Get call recording content response. - public virtual async Task GetCallRecordingContentAsync(string callId, string recordingId, CancellationToken cancellationToken = default) + /// The Get compose message hybrid trigger output metadata response. + public virtual async Task GetComposeMessageTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallRecordingContentAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetComposeMessageTriggerOutputsMetadataAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - if (recordingId is null) - throw new ArgumentNullException(nameof(recordingId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/recordings/{Uri.EscapeDataString(recordingId.ToString())}/content"; + var path = $"/flowbot/triggers/composemessage/$metadata.json/composemessageoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5916,22 +6009,20 @@ public virtual async Task GetCallRecordingContentAsync(string callId, st } /// - /// List call transcripts + /// Get compose message hybrid trigger output metadata /// - /// Lists all transcripts for an ad-hoc call - /// Call ID + /// Discovery method used to populate dynamic parameter values at design time. + /// The request body. /// Cancellation token. - /// The List call transcripts response. - public virtual async Task ListCallTranscriptsAsync(string callId, CancellationToken cancellationToken = default) + /// The Get compose message hybrid trigger output metadata response. + public virtual async Task GetCardResponseTriggerOutputsMetadataAsync(string input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListCallTranscriptsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCardResponseTriggerOutputsMetadataAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts"; + var path = $"/flowbot/triggers/cardresponse/$metadata.json/cardresponseoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5943,25 +6034,22 @@ public virtual async Task ListCallTranscriptsA } /// - /// Get call transcript + /// Input schema for webhook trigger /// - /// Gets a specific transcript for an ad-hoc call - /// Call ID - /// Transcript ID + /// Discovery method used to populate dynamic parameter values at design time. + /// Message type /// Cancellation token. - /// The Get call transcript response. - public virtual async Task GetCallTranscriptAsync(string callId, string transcriptId, CancellationToken cancellationToken = default) + /// The Input schema for webhook trigger response. + public virtual async Task GetWebhookTriggerRequestSchemaAsync(string messageType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallTranscriptAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetWebhookTriggerRequestSchemaAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - if (transcriptId is null) - throw new ArgumentNullException(nameof(transcriptId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}"; + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + var path = $"/flowbot/webhookTrigger/inputSchema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -5973,25 +6061,25 @@ public virtual async Task GetCallTranscriptAsync(string } /// - /// Get call transcript content + /// Response schema for webhook trigger /// - /// Gets the content of a call transcript - /// Call ID - /// Transcript ID + /// Discovery method used to populate dynamic parameter values at design time. + /// Trigger type + /// Message type /// Cancellation token. - /// The Get call transcript content response. - public virtual async Task GetCallTranscriptContentAsync(string callId, string transcriptId, CancellationToken cancellationToken = default) + /// The Response schema for webhook trigger response. + public virtual async Task GetWebhookTriggerResponseSchemaAsync(string triggerType, string messageType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetCallTranscriptContentAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetWebhookTriggerResponseSchemaAsync"); try { - if (callId is null) - throw new ArgumentNullException(nameof(callId)); - if (transcriptId is null) - throw new ArgumentNullException(nameof(transcriptId)); - var path = $"/v1.0/me/adhocCalls/{Uri.EscapeDataString(callId.ToString())}/transcripts/{Uri.EscapeDataString(transcriptId.ToString())}/content"; + if (triggerType is null) + throw new ArgumentNullException(nameof(triggerType)); + if (messageType is null) + throw new ArgumentNullException(nameof(messageType)); + var path = $"/flowbot/webhookTrigger/triggerType/{Uri.EscapeDataString(triggerType.ToString())}/responseSchema/threadType/{Uri.EscapeDataString(messageType.ToString())}"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -6003,35 +6091,28 @@ public virtual async Task GetCallTranscriptContentAsync(string callId, s } /// - /// Get all ad-hoc call recordings + /// Get response schema /// - /// Gets all recordings from ad-hoc calls for the signed-in user - /// Start Date Time - /// End Date Time - /// Top - /// Skip Token - /// Delta Token + /// Discovery method used to populate dynamic parameter values at design time. + /// Unified Action + /// Post as + /// Type of the recipient of the action /// Cancellation token. - /// The Get all ad-hoc call recordings response. - public virtual async Task GetAllAdhocCallRecordingsAsync(string startDateTime = default, string endDateTime = default, int? top = default, string skipToken = default, string deltaToken = default, CancellationToken cancellationToken = default) + /// The Get response schema response. + public virtual async Task GetPostToConversationResponseSchemaAsync(string unifiedAction, string postAs, string typeOfTheRecipientOfTheAction, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAllAdhocCallRecordingsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetPostToConversationResponseSchemaAsync"); try { - var queryParams = new List(); - if (startDateTime != default) - queryParams.Add($"startDateTime={Uri.EscapeDataString(startDateTime.ToString())}"); - if (endDateTime != default) - queryParams.Add($"endDateTime={Uri.EscapeDataString(endDateTime.ToString())}"); - if (top.HasValue) - queryParams.Add($"$top={Uri.EscapeDataString(top.Value.ToString())}"); - if (skipToken != default) - queryParams.Add($"$skiptoken={Uri.EscapeDataString(skipToken.ToString())}"); - if (deltaToken != default) - queryParams.Add($"$deltatoken={Uri.EscapeDataString(deltaToken.ToString())}"); - var path = $"/v1.0/me/adhocCalls/getAllRecordings" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (unifiedAction is null) + throw new ArgumentNullException(nameof(unifiedAction)); + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/{Uri.EscapeDataString(unifiedAction.ToString())}/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/response/schema"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -6043,35 +6124,23 @@ public virtual async Task GetAllAdhocCallRecord } /// - /// Get all ad-hoc call transcripts + /// Get flow continuation subscription output metadata /// - /// Gets all transcripts from ad-hoc calls for the signed-in user - /// Start Date Time - /// End Date Time - /// Top - /// Skip Token - /// Delta Token + /// Discovery method used to populate dynamic parameter values at design time. + /// Type of the recipient of the action + /// The request body. /// Cancellation token. - /// The Get all ad-hoc call transcripts response. - public virtual async Task GetAllAdhocCallTranscriptsAsync(string startDateTime = default, string endDateTime = default, int? top = default, string skipToken = default, string deltaToken = default, CancellationToken cancellationToken = default) + /// The Get flow continuation subscription output metadata response. + public virtual async Task GetFlowContinuationSubscriptionOutputMetadataAsync(string typeOfTheRecipientOfTheAction, string input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAllAdhocCallTranscriptsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFlowContinuationSubscriptionOutputMetadataAsync"); try { - var queryParams = new List(); - if (startDateTime != default) - queryParams.Add($"startDateTime={Uri.EscapeDataString(startDateTime.ToString())}"); - if (endDateTime != default) - queryParams.Add($"endDateTime={Uri.EscapeDataString(endDateTime.ToString())}"); - if (top.HasValue) - queryParams.Add($"$top={Uri.EscapeDataString(top.Value.ToString())}"); - if (skipToken != default) - queryParams.Add($"$skiptoken={Uri.EscapeDataString(skipToken.ToString())}"); - if (deltaToken != default) - queryParams.Add($"$deltatoken={Uri.EscapeDataString(deltaToken.ToString())}"); - var path = $"/v1.0/me/adhocCalls/getAllTranscripts" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/flowcontinuation/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -6083,22 +6152,26 @@ public virtual async Task GetAllAdhocCallTrans } /// - /// List AI insights + /// Get flow continuation subscription output metadata /// - /// Lists AI-generated insights for an online meeting. Requires Microsoft 365 Copilot license. - /// Meeting ID + /// Discovery method used to populate dynamic parameter values at design time. + /// Post as + /// Type of the recipient of the action + /// The request body. /// Cancellation token. - /// The List AI insights response. - public virtual async Task ListAiInsightsAsync(string meetingId, CancellationToken cancellationToken = default) + /// The Get flow continuation subscription output metadata response. + public virtual async Task GetFlowContinuationSubscriptionWithPosterOutputMetadataAsync(string postAs, string typeOfTheRecipientOfTheAction, string input, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.ListAiInsightsAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetFlowContinuationSubscriptionWithPosterOutputMetadataAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - var path = $"/v1.0/copilot/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/aiInsights"; + if (postAs is null) + throw new ArgumentNullException(nameof(postAs)); + if (typeOfTheRecipientOfTheAction is null) + throw new ArgumentNullException(nameof(typeOfTheRecipientOfTheAction)); + var path = $"/flowbot/actions/flowcontinuation/posters/{Uri.EscapeDataString(postAs.ToString())}/recipienttypes/{Uri.EscapeDataString(typeOfTheRecipientOfTheAction.ToString())}/$metadata.json/subscriptionoutputs"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Post, path, input, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } @@ -6110,25 +6183,22 @@ public virtual async Task ListAiInsightsAsync(strin } /// - /// Get AI insight + /// Get subscription scope input schema /// - /// Gets a specific AI-generated insight for an online meeting. Requires Microsoft 365 Copilot license. - /// Meeting ID - /// AI Insight ID + /// Discovery method used to populate dynamic parameter values at design time. + /// scopeType /// Cancellation token. - /// The Get AI insight response. - public virtual async Task GetAiInsightAsync(string meetingId, string aIInsightId, CancellationToken cancellationToken = default) + /// The Get subscription scope input schema response. + public virtual async Task GetSubscriptionScopeSchemaAsync(string scopeType, CancellationToken cancellationToken = default) { - using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetAiInsightAsync"); + using var activity = TeamsClient.ConnectorActivitySource.StartActivity("TeamsClient.GetSubscriptionScopeSchemaAsync"); try { - if (meetingId is null) - throw new ArgumentNullException(nameof(meetingId)); - if (aIInsightId is null) - throw new ArgumentNullException(nameof(aIInsightId)); - var path = $"/v1.0/copilot/me/onlineMeetings/{Uri.EscapeDataString(meetingId.ToString())}/aiInsights/{Uri.EscapeDataString(aIInsightId.ToString())}"; + if (scopeType is null) + throw new ArgumentNullException(nameof(scopeType)); + var path = $"/internalparameters/triggers/subscriptionscope/{Uri.EscapeDataString(scopeType.ToString())}/schema"; return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/TextRequestExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TextRequestExtensions.cs index a0b0ea5..f88c417 100644 --- a/src/Azure.Connectors.Sdk/Generated/TextRequestExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TextRequestExtensions.cs @@ -1707,6 +1707,32 @@ public static class TextRequestTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the TextRequest connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class TextRequestTriggerParameters + { + /// + /// Input parameters for the OnTextingWebhook trigger operation (operationId: TextingWebhook). + /// + public static class OnTextingWebhook + { + /// + /// Id of dashboard to add trigger to + /// Required. + /// Dynamic values from: GetDashboards. + /// + public const string DashboardId = "dashboard_id"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// diff --git a/src/Azure.Connectors.Sdk/Generated/TodoExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TodoExtensions.cs index 07f9390..23023d7 100644 --- a/src/Azure.Connectors.Sdk/Generated/TodoExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TodoExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Todo.Models #region Types /// - /// Response for Update a to-do list + /// An Microsoft To-Do list. /// public class TodoList { @@ -60,7 +60,7 @@ public class TodoList } /// - /// Response for Add a to-do (V3) + /// A Microsoft To-Do object. /// public class ToDo { @@ -128,7 +128,7 @@ public class ToDo } /// - /// CreateToDo_V2 + /// A Microsoft To-Do. /// public class CreateToDo { @@ -164,7 +164,7 @@ public class CreateToDo } /// - /// UpdateToDo_V2 + /// A Microsoft To-Do. /// public class UpdateToDo { @@ -200,7 +200,7 @@ public class UpdateToDo } /// - /// CreateToDoList_V2 + /// A Microsoft To-Do list. /// public class CreateToDoList { @@ -530,6 +530,46 @@ public static class TodoTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the Todo connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class TodoTriggerParameters + { + /// + /// Input parameters for the OnNewToDoInFolder trigger operation (operationId: OnNewToDoInFolderV2). + /// + public static class OnNewToDoInFolder + { + /// + /// To-do list + /// Required. + /// Dynamic values from: GetAllTodoListsV2. + /// + public const string FolderId = "folderId"; + + } + + /// + /// Input parameters for the OnUpdateToDoInFolder trigger operation (operationId: OnUpdateToDoInFolderV2). + /// + public static class OnUpdateToDoInFolder + { + /// + /// To-do list + /// Required. + /// Dynamic values from: GetAllTodoListsV2. + /// + public const string FolderId = "folderId"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// diff --git a/src/Azure.Connectors.Sdk/Generated/TrelloExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TrelloExtensions.cs index 199c950..0347822 100644 --- a/src/Azure.Connectors.Sdk/Generated/TrelloExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TrelloExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Trello.Models #region Types /// - /// Response for List the cards in a board + /// A Trello Card Object /// public class Card { @@ -120,7 +120,7 @@ public class Card } /// - /// Item in The check item states in the card. + /// A Trello Item State Object /// public class CheckItemState { @@ -134,7 +134,7 @@ public class CheckItemState } /// - /// badges + /// A Trello Badges Object /// public class Badges { @@ -180,7 +180,7 @@ public class Badges } /// - /// Item in The set of board checklists. + /// A Trello Checklist Object /// public class Checklist { @@ -210,7 +210,7 @@ public class Checklist } /// - /// Item in The list of the checklist items + /// A Trello Checkitem Object /// public class Checkitem { @@ -248,7 +248,7 @@ public class Checkitem } /// - /// Response for Get a card by id + /// A Trello Card Object /// public class CardWithChecklists { @@ -350,7 +350,7 @@ public class ObjectEntity } /// - /// Response for List boards + /// A Trello Board Object /// public class Board { @@ -432,7 +432,7 @@ public class Board } /// - /// labelNames + /// A Trello Label Object /// public class Label { @@ -478,7 +478,7 @@ public class Label } /// - /// Item in The set of board memberships. + /// A Trello Membership Object /// public class Membership { @@ -500,7 +500,7 @@ public class Membership } /// - /// perfs + /// A Trello Perfs Object /// public class Perfs { @@ -574,7 +574,7 @@ public class Perfs } /// - /// Response for Get a board by Id + /// A Trello Board Object /// public class BoardWithChecklists { @@ -660,7 +660,7 @@ public class BoardWithChecklists } /// - /// Response for List the card lists in a board + /// A Trello List Object /// public class List { @@ -698,7 +698,7 @@ public class List } /// - /// Response for Update a list + /// A Trello List Object /// public class CreateListResponse { @@ -720,7 +720,7 @@ public class CreateListResponse } /// - /// Response for List teams you are a member of + /// A Trello Team /// public class Team { @@ -758,7 +758,7 @@ public class Team } /// - /// prefs + /// A Trello Team Preference Object /// public class TeamPreferences { @@ -768,7 +768,7 @@ public class TeamPreferences } /// - /// Response for List members of a team + /// A Trello Member Object /// public class Member { @@ -790,7 +790,7 @@ public class Member } /// - /// Response for List labels of a board + /// A Trello Label Object /// public class BoardLabel { @@ -808,7 +808,7 @@ public class BoardLabel } /// - /// Response for List comments for a card + /// The model for getting a comment /// public class Comment { @@ -826,7 +826,7 @@ public class Comment } /// - /// Response for When a new card is added to a board (V3) + /// A Trello Card Object /// public class CardInAction { @@ -852,7 +852,7 @@ public class CardInAction } /// - /// UpdateCard_V2 + /// Model for updating a card in Trello. /// public class UpdateCard { @@ -898,7 +898,7 @@ public class UpdateCard } /// - /// CreateCard_V2 + /// Model for creating a new card in Trello. /// public class CreateCard { @@ -948,7 +948,7 @@ public class CreateCard } /// - /// UpdateBoard + /// A Trello Board Object used to create a board /// public class UpdateBoard { @@ -1002,7 +1002,7 @@ public class UpdateBoard } /// - /// CommentPost + /// The model for posting a comment /// public class CommentPost { @@ -1012,7 +1012,7 @@ public class CommentPost } /// - /// CreateBoard + /// A Trello Board Object used to create a board /// public class CreateBoard { @@ -1066,7 +1066,7 @@ public class CreateBoard } /// - /// CreateList + /// A Trello List Object /// public class CreateList { @@ -2443,6 +2443,20 @@ public static class TrelloTriggerOperations /// public static class TrelloTriggerParameters { + /// + /// Input parameters for the OnNewCardInBoard trigger operation (operationId: OnNewCardInBoardV3). + /// + public static class OnNewCardInBoard + { + /// + /// The unique board id. + /// Required. + /// Dynamic values from: ListBoardsSimple. + /// + public const string BoardId = "board_id"; + + } + /// /// Input parameters for the OnNewCardInList trigger operation (operationId: OnNewCardInListV3). /// @@ -2455,6 +2469,13 @@ public static class OnNewCardInList /// public const string BoardId = "board_id"; + /// + /// The unique id of the list in the specified board. + /// Required. + /// Dynamic values from: ListListsSimple. + /// + public const string ListId = "list_id"; + } } diff --git a/src/Azure.Connectors.Sdk/Generated/TwitterExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TwitterExtensions.cs index bc9b38f..49b0644 100644 --- a/src/Azure.Connectors.Sdk/Generated/TwitterExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TwitterExtensions.cs @@ -30,7 +30,7 @@ namespace Azure.Connectors.Sdk.Twitter.Models #region Types /// - /// Response for Get user timeline + /// Represents a tweet post. /// public class TweetModel { @@ -84,7 +84,7 @@ public class TweetModel } /// - /// Item in List of users mentioned in the tweet + /// Represents a user mentioned in a tweet. /// public class UserMentionsModel { @@ -102,7 +102,7 @@ public class UserMentionsModel } /// - /// OriginalTweet + /// Represents an original tweet post. /// public class OriginalTweetModel { @@ -152,7 +152,7 @@ public class OriginalTweetModel } /// - /// Item in The list of user mentioned in the tweet + /// Represents a user mentioned in an original tweet. /// public class OriginalTweetUserMentionsModel { @@ -170,7 +170,7 @@ public class OriginalTweetUserMentionsModel } /// - /// UserDetails + /// Represents a user who posted an original tweet /// public class OriginalTweetUserDetailsModel { @@ -216,7 +216,7 @@ public class OriginalTweetUserDetailsModel } /// - /// UserDetails + /// Represents a user. /// public class UserDetailsModel { @@ -262,7 +262,7 @@ public class UserDetailsModel } /// - /// Response for Post a tweet + /// Represents the response of a tweet post. /// public class TweetResponseModel { @@ -272,7 +272,7 @@ public class TweetResponseModel } /// - /// Response for When a new tweet is posted + /// Represents a wrapper object for batch trigger response /// public class TriggerBatchResponseTweetModel { diff --git a/src/Azure.Connectors.Sdk/Generated/TypeformExtensions.cs b/src/Azure.Connectors.Sdk/Generated/TypeformExtensions.cs index b062c71..53741c8 100644 --- a/src/Azure.Connectors.Sdk/Generated/TypeformExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/TypeformExtensions.cs @@ -28,24 +28,6 @@ namespace Azure.Connectors.Sdk.Typeform.Models #region Types - /// - /// Response for List forms - /// - public class ListFormsResponse - { - /// Total number of forms. - [JsonPropertyName("total_items")] - public int? TotalItems { get; set; } - - /// Number of pages of results. - [JsonPropertyName("page_count")] - public int? PageCount { get; set; } - - /// Forms in response. - [JsonPropertyName("items")] - public List Items { get; set; } - } - /// /// When a response is submitted /// @@ -61,7 +43,7 @@ public class NewResponseWebhookInput } /// - /// Response for When a response is submitted + /// A JSON that contains information on the newly created webhook /// public class WebhookCreationResponse { @@ -94,6 +76,24 @@ public class WebhookCreationResponse public DateTime? UpdatedAt { get; set; } } + /// + /// Response for List forms + /// + public class ListFormsResponse + { + /// Total number of forms. + [JsonPropertyName("total_items")] + public int? TotalItems { get; set; } + + /// Number of pages of results. + [JsonPropertyName("page_count")] + public int? PageCount { get; set; } + + /// Forms in response. + [JsonPropertyName("items")] + public List Items { get; set; } + } + #endregion Types #region Model Factory @@ -105,22 +105,6 @@ public class WebhookCreationResponse /// public static class TypeformModelFactory { - /// - /// Creates a new instance of . - /// - public static ListFormsResponse ListFormsResponse( - int? totalItems = default, - int? pageCount = default, - List items = default) - { - return new ListFormsResponse - { - TotalItems = totalItems, - PageCount = pageCount, - Items = items, - }; - } - /// /// Creates a new instance of . /// @@ -158,6 +142,22 @@ public static WebhookCreationResponse WebhookCreationResponse( UpdatedAt = updatedAt, }; } + + /// + /// Creates a new instance of . + /// + public static ListFormsResponse ListFormsResponse( + int? totalItems = default, + int? pageCount = default, + List items = default) + { + return new ListFormsResponse + { + TotalItems = totalItems, + PageCount = pageCount, + Items = items, + }; + } } #endregion Model Factory @@ -185,6 +185,38 @@ public static class TypeformTriggerOperations #endregion Trigger Operation Constants + #region Trigger Parameter Metadata + + /// + /// Trigger input parameter name constants for the Typeform connector. + /// These correspond to the Connector Namespace TriggerConfig parameters array. + /// + public static class TypeformTriggerParameters + { + /// + /// Input parameters for the OnNewResponseWebhook trigger operation (operationId: NewResponseWebhook_V2). + /// + public static class OnNewResponseWebhook + { + /// + /// Select a form from the dropdown. + /// Required. + /// Dynamic values from: ListForms_V2. + /// + public const string FormId = "form_id"; + + /// + /// Unique name you want to use for the webhook. + /// Required. + /// + public const string Tag = "tag"; + + } + + } + + #endregion Trigger Parameter Metadata + #region Client /// @@ -288,6 +320,33 @@ public virtual async Task ListFormsAsync(string search = defa } } + /// + /// Get schema + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Form + /// Cancellation token. + /// The Get schema response. + public virtual async Task GetSchemaAsync([DynamicValues("ListForms_V2")] string form, CancellationToken cancellationToken = default) + { + using var activity = TypeformClient.ConnectorActivitySource.StartActivity("TypeformClient.GetSchemaAsync"); + try + { + if (form is null) + throw new ArgumentNullException(nameof(form)); + var path = $"/forms/{Uri.EscapeDataString(form.ToString())}"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/UniversalPrintExtensions.cs b/src/Azure.Connectors.Sdk/Generated/UniversalPrintExtensions.cs index 292c015..c487aad 100644 --- a/src/Azure.Connectors.Sdk/Generated/UniversalPrintExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/UniversalPrintExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.UniversalPrint.Models #region Types /// - /// Response for List recently used shares + /// The response for listing printer shares. /// public class ListRecentSharesResponse { @@ -135,30 +135,6 @@ protected UniversalPrintClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// List recently used shares - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Cancellation token. - /// The List recently used shares response. - public virtual async Task ListRecentSharesAsync(CancellationToken cancellationToken = default) - { - using var activity = UniversalPrintClient.ConnectorActivitySource.StartActivity("UniversalPrintClient.ListRecentSharesAsync"); - try - { - var path = $"/beta/me/print/recentPrinterShares"; - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Print PDF /// @@ -222,6 +198,30 @@ await this } } + /// + /// List recently used shares + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Cancellation token. + /// The List recently used shares response. + public virtual async Task ListRecentSharesAsync(CancellationToken cancellationToken = default) + { + using var activity = UniversalPrintClient.ConnectorActivitySource.StartActivity("UniversalPrintClient.ListRecentSharesAsync"); + try + { + var path = $"/beta/me/print/recentPrinterShares"; + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/WaywedoExtensions.cs b/src/Azure.Connectors.Sdk/Generated/WaywedoExtensions.cs index 6f56d64..61ca85c 100644 --- a/src/Azure.Connectors.Sdk/Generated/WaywedoExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/WaywedoExtensions.cs @@ -105,21 +105,33 @@ public class ChecklistComment } /// - /// Response for Get All Checklist Instances + /// Create Checklist Instance /// - public class GetAllChecklistInstancesResponse + public class ChecklistInstancesInput { - /// The list of checklist instances. - [JsonPropertyName("results")] - public List ChecklistInstances { get; set; } + /// Select a checklist master + [JsonPropertyName("procedureId")] + public int? ProcedureId { get; set; } - /// The total number of checklist instances. - [JsonPropertyName("_total")] - public int? Total { get; set; } + /// The title of the checklist instance + [JsonPropertyName("title")] + public string Title { get; set; } + + /// Select the user to add as a collaborator + [JsonPropertyName("userId")] + public int? UserId { get; set; } + + /// Select the company role to add as a collaborator. + [JsonPropertyName("companyRoleId")] + public int? CompanyRoleId { get; set; } + + /// The name of the bot creating the instance + [JsonPropertyName("bot")] + public string BotName { get; set; } } /// - /// Item in The list of checklist instances. + /// Response for Create Checklist Instance /// public class ChecklistInstance { @@ -160,32 +172,6 @@ public class ChecklistInstance public DateTime? InstanceLatestDueDate { get; set; } } - /// - /// Create Checklist Instance - /// - public class ChecklistInstancesInput - { - /// Select a checklist master - [JsonPropertyName("procedureId")] - public int? ProcedureId { get; set; } - - /// The title of the checklist instance - [JsonPropertyName("title")] - public string Title { get; set; } - - /// Select the user to add as a collaborator - [JsonPropertyName("userId")] - public int? UserId { get; set; } - - /// Select the company role to add as a collaborator. - [JsonPropertyName("companyRoleId")] - public int? CompanyRoleId { get; set; } - - /// The name of the bot creating the instance - [JsonPropertyName("bot")] - public string BotName { get; set; } - } - /// /// Response for Find Checklist Step /// @@ -444,6 +430,20 @@ public class ChecklistStepCompletedWebHookInput public string CallbackURL { get; set; } } + /// + /// Response for Get All Checklist Instances + /// + public class GetAllChecklistInstancesResponse + { + /// The list of checklist instances. + [JsonPropertyName("results")] + public List ChecklistInstances { get; set; } + + /// The total number of checklist instances. + [JsonPropertyName("_total")] + public int? Total { get; set; } + } + #endregion Types #region Model Factory @@ -508,16 +508,22 @@ public static ChecklistComment ChecklistComment( } /// - /// Creates a new instance of . + /// Creates a new instance of . /// - public static GetAllChecklistInstancesResponse GetAllChecklistInstancesResponse( - List checklistInstances = default, - int? total = default) + public static ChecklistInstancesInput ChecklistInstancesInput( + int? procedureId = default, + string title = default, + int? userId = default, + int? companyRoleId = default, + string botName = default) { - return new GetAllChecklistInstancesResponse + return new ChecklistInstancesInput { - ChecklistInstances = checklistInstances, - Total = total, + ProcedureId = procedureId, + Title = title, + UserId = userId, + CompanyRoleId = companyRoleId, + BotName = botName, }; } @@ -549,26 +555,6 @@ public static ChecklistInstance ChecklistInstance( }; } - /// - /// Creates a new instance of . - /// - public static ChecklistInstancesInput ChecklistInstancesInput( - int? procedureId = default, - string title = default, - int? userId = default, - int? companyRoleId = default, - string botName = default) - { - return new ChecklistInstancesInput - { - ProcedureId = procedureId, - Title = title, - UserId = userId, - CompanyRoleId = companyRoleId, - BotName = botName, - }; - } - /// /// Creates a new instance of . /// @@ -770,6 +756,20 @@ public static ChecklistStepCompletedWebHookInput ChecklistStepCompletedWebHookIn CallbackURL = callbackURL, }; } + + /// + /// Creates a new instance of . + /// + public static GetAllChecklistInstancesResponse GetAllChecklistInstancesResponse( + List checklistInstances = default, + int? total = default) + { + return new GetAllChecklistInstancesResponse + { + ChecklistInstances = checklistInstances, + Total = total, + }; + } } #endregion Model Factory @@ -913,40 +913,6 @@ public virtual async Task CommentAddAsync(CommentAddInput inpu } } - /// - /// Get All Checklist Instances - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// Limit - /// Offset - /// Status - /// Cancellation token. - /// The Get All Checklist Instances response. - public virtual async Task GetAllChecklistInstancesAsync(int? limit = default, int? offset = default, int? status = default, CancellationToken cancellationToken = default) - { - using var activity = WaywedoClient.ConnectorActivitySource.StartActivity("WaywedoClient.GetAllChecklistInstancesAsync"); - try - { - var queryParams = new List(); - if (limit.HasValue) - queryParams.Add($"limit={Uri.EscapeDataString(limit.Value.ToString())}"); - if (offset.HasValue) - queryParams.Add($"offset={Uri.EscapeDataString(offset.Value.ToString())}"); - if (status.HasValue) - queryParams.Add($"status={Uri.EscapeDataString(status.Value.ToString())}"); - var path = $"/v1/ChecklistInstances" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Create Checklist Instance /// @@ -1279,6 +1245,40 @@ public virtual async Task UsersAsync(UsersInput input, Cancel } } + /// + /// Get All Checklist Instances + /// + /// Discovery method used to populate dynamic parameter values at design time. + /// Limit + /// Offset + /// Status + /// Cancellation token. + /// The Get All Checklist Instances response. + public virtual async Task GetAllChecklistInstancesAsync(int? limit = default, int? offset = default, int? status = default, CancellationToken cancellationToken = default) + { + using var activity = WaywedoClient.ConnectorActivitySource.StartActivity("WaywedoClient.GetAllChecklistInstancesAsync"); + try + { + var queryParams = new List(); + if (limit.HasValue) + queryParams.Add($"limit={Uri.EscapeDataString(limit.Value.ToString())}"); + if (offset.HasValue) + queryParams.Add($"offset={Uri.EscapeDataString(offset.Value.ToString())}"); + if (status.HasValue) + queryParams.Add($"status={Uri.EscapeDataString(status.Value.ToString())}"); + var path = $"/v1/ChecklistInstances" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + } #endregion Client diff --git a/src/Azure.Connectors.Sdk/Generated/WdatpExtensions.cs b/src/Azure.Connectors.Sdk/Generated/WdatpExtensions.cs index d48e02f..589f58c 100644 --- a/src/Azure.Connectors.Sdk/Generated/WdatpExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/WdatpExtensions.cs @@ -93,7 +93,7 @@ public class CreateAlertByReferenceInput } /// - /// Response for Alerts - Create alert + /// A single alert entity /// public class Alert { @@ -241,7 +241,7 @@ public class StartInvestigationInput } /// - /// Response for Actions - Start automated investigation on a machine + /// A single investigation entity /// public class Investigation { @@ -275,7 +275,7 @@ public class Investigation } /// - /// Response for Actions - Get single machine action + /// A single machine action entity /// public class MachineAction { @@ -321,7 +321,7 @@ public class MachineAction } /// - /// Item in Live response machine action commands + /// A single command in Live Response machine action entity /// public class LiveResponseCommandStatus { @@ -403,7 +403,7 @@ public class GetMachineActionsResponse : IPageable } /// - /// Response for Files - Get the statistics for the given file + /// A single file statistics entity /// public class FileStats { @@ -441,7 +441,7 @@ public class FileStats } /// - /// Response for Domains - Get the statistics for the given domain name + /// A single ip address statistics entity /// public class DomainStats { @@ -463,7 +463,7 @@ public class DomainStats } /// - /// Response for Ips - Get the statistics for the given ip address + /// A single ip address statistics entity /// public class IpStats { @@ -613,7 +613,7 @@ public class GetRemediationActivitiesResponse : IPageable } /// - /// Item in The remediation activities returned + /// A single remediation activity entity /// public class RemediationActivity { @@ -753,7 +753,7 @@ public class GetRemediationActivityMachineListResponse : IPageable } /// - /// Item in The machines returned + /// A single machine entity /// public class Machine { diff --git a/src/Azure.Connectors.Sdk/Generated/WordOnlineBusinessExtensions.cs b/src/Azure.Connectors.Sdk/Generated/WordOnlineBusinessExtensions.cs index b1ed2b2..3ac12c3 100644 --- a/src/Azure.Connectors.Sdk/Generated/WordOnlineBusinessExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/WordOnlineBusinessExtensions.cs @@ -28,18 +28,6 @@ namespace Azure.Connectors.Sdk.WordOnlineBusiness.Models #region Types - /// - /// Response for Fetches the schema of the selected file - /// - public class GetFileSchemaResponse - { - /// - /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new(); - } - /// /// Populate a Microsoft Word template /// @@ -75,7 +63,19 @@ public class GetDrivesResponse } /// - /// ContentBody + /// Response for Fetches the schema of the selected file + /// + public class GetFileSchemaResponse + { + /// + /// Arbitrary properties. This type has no static schema; any JSON properties will be captured here. + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; set; } = new(); + } + + /// + /// Content for the word document /// public class ContentBody { @@ -205,43 +205,6 @@ protected WordOnlineBusinessClient() : base() { } [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - /// - /// Fetches the schema of the selected file - /// - /// Discovery method used to populate dynamic parameter values at design time. - /// source - /// drive - /// file - /// Cancellation token. - /// The Fetches the schema of the selected file response. - public virtual async Task GetFileSchemaAsync(string source, string drive, string @file, CancellationToken cancellationToken = default) - { - using var activity = WordOnlineBusinessClient.ConnectorActivitySource.StartActivity("WordOnlineBusinessClient.GetFileSchemaAsync"); - try - { - var queryParams = new List(); - if (source is null) - throw new ArgumentNullException(nameof(source)); - queryParams.Add($"source={Uri.EscapeDataString(source.ToString())}"); - if (drive is null) - throw new ArgumentNullException(nameof(drive)); - queryParams.Add($"drive={Uri.EscapeDataString(drive.ToString())}"); - if (@file is null) - throw new ArgumentNullException(nameof(@file)); - queryParams.Add($"file={Uri.EscapeDataString(@file.ToString())}"); - var path = $"/api/templates/schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); - return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) - .ConfigureAwait(continueOnCapturedContext: false); - - } - catch (Exception ex) when (!ex.IsFatal()) - { - activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); - throw; - } - } - /// /// Populate a Microsoft Word template /// @@ -309,6 +272,50 @@ public virtual async Task CreateWordFileWithContentAsync(ContentBody inp } } + /// + /// Convert Word Document to PDF + /// + /// Gets a PDF version of the selected file + /// Location + /// Document Library + /// File + /// Extract Sensitivity Label + /// Sensitivity Label Metadata + /// Cancellation token. + /// The Convert Word Document to PDF response. + public virtual async Task GetFilePDFAsync([DynamicValues("GetSources")] string location, [DynamicValues("GetDrives")] string documentLibrary, string @file, bool? extractSensitivityLabel = default, bool? sensitivityLabelMetadata = default, CancellationToken cancellationToken = default) + { + using var activity = WordOnlineBusinessClient.ConnectorActivitySource.StartActivity("WordOnlineBusinessClient.GetFilePDFAsync"); + try + { + var queryParams = new List(); + queryParams.Add("format=pdf"); + if (location is null) + throw new ArgumentNullException(nameof(location)); + queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); + if (documentLibrary is null) + throw new ArgumentNullException(nameof(documentLibrary)); + queryParams.Add($"drive={Uri.EscapeDataString(documentLibrary.ToString())}"); + if (@file is null) + throw new ArgumentNullException(nameof(@file)); + queryParams.Add($"file={Uri.EscapeDataString(@file.ToString())}"); + if (extractSensitivityLabel.HasValue) + queryParams.Add($"extractSensitivityLabel={Uri.EscapeDataString(extractSensitivityLabel.Value.ToString())}"); + if (sensitivityLabelMetadata.HasValue) + queryParams.Add($"fetchSensitivityLabelMetadata={Uri.EscapeDataString(sensitivityLabelMetadata.Value.ToString())}"); + var path = $"/api/templates/convertFile" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + return await this + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .ConfigureAwait(continueOnCapturedContext: false); + + } + catch (Exception ex) when (!ex.IsFatal()) + { + activity?.SetStatus(System.Diagnostics.ActivityStatusCode.Error, ex.Message); + throw; + } + } + /// /// Get sources /// @@ -360,39 +367,32 @@ public virtual async Task GetDrivesAsync(CancellationToken ca } /// - /// Convert Word Document to PDF + /// Fetches the schema of the selected file /// - /// Gets a PDF version of the selected file - /// Location - /// Document Library - /// File - /// Extract Sensitivity Label - /// Sensitivity Label Metadata + /// Discovery method used to populate dynamic parameter values at design time. + /// source + /// drive + /// file /// Cancellation token. - /// The Convert Word Document to PDF response. - public virtual async Task GetFilePDFAsync([DynamicValues("GetSources")] string location, [DynamicValues("GetDrives")] string documentLibrary, string @file, bool? extractSensitivityLabel = default, bool? sensitivityLabelMetadata = default, CancellationToken cancellationToken = default) + /// The Fetches the schema of the selected file response. + public virtual async Task GetFileSchemaAsync(string source, string drive, string @file, CancellationToken cancellationToken = default) { - using var activity = WordOnlineBusinessClient.ConnectorActivitySource.StartActivity("WordOnlineBusinessClient.GetFilePDFAsync"); + using var activity = WordOnlineBusinessClient.ConnectorActivitySource.StartActivity("WordOnlineBusinessClient.GetFileSchemaAsync"); try { var queryParams = new List(); - queryParams.Add("format=pdf"); - if (location is null) - throw new ArgumentNullException(nameof(location)); - queryParams.Add($"source={Uri.EscapeDataString(location.ToString())}"); - if (documentLibrary is null) - throw new ArgumentNullException(nameof(documentLibrary)); - queryParams.Add($"drive={Uri.EscapeDataString(documentLibrary.ToString())}"); + if (source is null) + throw new ArgumentNullException(nameof(source)); + queryParams.Add($"source={Uri.EscapeDataString(source.ToString())}"); + if (drive is null) + throw new ArgumentNullException(nameof(drive)); + queryParams.Add($"drive={Uri.EscapeDataString(drive.ToString())}"); if (@file is null) throw new ArgumentNullException(nameof(@file)); queryParams.Add($"file={Uri.EscapeDataString(@file.ToString())}"); - if (extractSensitivityLabel.HasValue) - queryParams.Add($"extractSensitivityLabel={Uri.EscapeDataString(extractSensitivityLabel.Value.ToString())}"); - if (sensitivityLabelMetadata.HasValue) - queryParams.Add($"fetchSensitivityLabelMetadata={Uri.EscapeDataString(sensitivityLabelMetadata.Value.ToString())}"); - var path = $"/api/templates/convertFile" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); + var path = $"/api/templates/schema" + (queryParams.Count > 0 ? "?" + string.Join("&", queryParams) : ""); return await this - .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) + .CallConnectorAsync(HttpMethod.Get, path, cancellationToken: cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); } diff --git a/src/Azure.Connectors.Sdk/Generated/WordPressExtensions.cs b/src/Azure.Connectors.Sdk/Generated/WordPressExtensions.cs index d165326..56a43ed 100644 --- a/src/Azure.Connectors.Sdk/Generated/WordPressExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/WordPressExtensions.cs @@ -289,7 +289,7 @@ public class PostModel } /// - /// Response for List sites + /// A list of sites /// public class SiteList { @@ -299,7 +299,7 @@ public class SiteList } /// - /// Item in List of sites + /// List of site items /// public class Site { @@ -357,7 +357,7 @@ public class Site } /// - /// CreatePostModel + /// A Blogger post object for new post requests /// public class CreatePostModel { diff --git a/src/Azure.Connectors.Sdk/Generated/YammerExtensions.cs b/src/Azure.Connectors.Sdk/Generated/YammerExtensions.cs index 4b14390..8e9e76f 100644 --- a/src/Azure.Connectors.Sdk/Generated/YammerExtensions.cs +++ b/src/Azure.Connectors.Sdk/Generated/YammerExtensions.cs @@ -29,7 +29,7 @@ namespace Azure.Connectors.Sdk.Yammer.Models #region Types /// - /// Response for Get my networks + /// Properties of a single network. /// public class Network { @@ -47,7 +47,7 @@ public class Network } /// - /// Response for Get groups + /// Properties of a single Viva Engage entity. /// public class YammerEntity { @@ -65,7 +65,7 @@ public class YammerEntity } /// - /// Response for Get user details + /// Properties of Viva Engage user. /// public class User { @@ -111,7 +111,7 @@ public class User } /// - /// Response for Get all messages (V3) + /// List of one or multiple messages. /// public class PageableMessageList { @@ -121,7 +121,7 @@ public class PageableMessageList } /// - /// Item in value + /// Properties of a single Viva Engage message. /// public class Message { @@ -211,7 +211,7 @@ public class Message } /// - /// body + /// Content associated with a single message. /// public class MessageBody { @@ -229,7 +229,7 @@ public class MessageBody } /// - /// liked_by + /// Liked By /// public class LikedBy { @@ -243,7 +243,7 @@ public class LikedBy } /// - /// Response for When there is a new message in my followed feed (V2) + /// List of one or multiple messages. /// public class MessageList { @@ -253,7 +253,7 @@ public class MessageList } /// - /// PostOperationRequestV2 + /// Represents a post request for Viva Engage Connector to post to Viva Engage. /// public class PostOperationRequest { @@ -553,6 +553,13 @@ public static class OnNewMessagesInGroup /// public const string NetworkId = "network_id"; + /// + /// Unique identifier of the group. + /// Required. + /// Dynamic values from: GetGroups. + /// + public const string GroupId = "group_id"; + /// /// Trigger state /// From 27863f6a168793ecdd7ef2cf4c56aaa27d22f46e Mon Sep 17 00:00:00 2001 From: David Burg <12040431+daviburg@users.noreply.github.com> Date: Thu, 30 Jul 2026 13:26:30 -0700 Subject: [PATCH 2/2] Add tests for the methods this regeneration introduces The regeneration changes 75 clients, but only nine change their public method surface: 13 methods added, 3 removed. None of the 13 had coverage. Adds success and error tests for the 12 non-pageable additions, following each file's existing convention - the shared CreateMockedClient helper where one exists, the factory-based helper in SharePointOnline, and inline mock setup in AzureMonitorLogs. ListTimeRangeTypesAsync returns AsyncPageable and is not covered here. No per-client test exercises a pageable method; pagination is covered centrally by ConnectorPageableTests, and inventing a per-client pattern for it belongs in its own change. The 3 removed methods were not referenced by any test, so nothing went stale. 935 tests pass, up from 912. --- .../AzureMonitorLogsClientTests.cs | 49 +++++++++++++ .../BoxClientTests.cs | 70 +++++++++++++++++++ .../DocuSignClientTests.cs | 38 ++++++++++ .../DropboxClientTests.cs | 70 +++++++++++++++++++ .../ExcelOnlineBusinessClientTests.cs | 40 +++++++++++ .../FtpClientTests.cs | 70 +++++++++++++++++++ .../SharePointOnlineClientTests.cs | 66 +++++++++++++++++ .../TypeformClientTests.cs | 36 ++++++++++ 8 files changed, 439 insertions(+) diff --git a/tests/Azure.Connectors.Sdk.Tests/AzureMonitorLogsClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/AzureMonitorLogsClientTests.cs index cded4af..d01aaa6 100644 --- a/tests/Azure.Connectors.Sdk.Tests/AzureMonitorLogsClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/AzureMonitorLogsClientTests.cs @@ -392,5 +392,54 @@ public void Dispose_WithInternallyCreatedHttpClient_ShouldDisposeIt() // Assert - calling Dispose again should not throw (idempotent) client.Dispose(); } + [TestMethod] + public async Task QuerySchemaV2Async_WithMockedResponse_ReturnsExpected() + { + // Arrange + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("{}") + }; + + var mockHandler = new Mock(); + mockHandler.Protected() + .Setup>( + "SendAsync", + ItExpr.IsAny(), + ItExpr.IsAny()) + .ReturnsAsync(responseMessage) + .Callback(() => { }) + .Verifiable(); + + var mockCredential = new Mock(); + mockCredential + .Setup(credential => credential.GetTokenAsync(It.IsAny(), It.IsAny())) + .ReturnsAsync(new AccessToken("mock-token", DateTimeOffset.UtcNow.AddHours(1))); + + var options = new ConnectorClientOptions(); + options.Transport = new HttpClientTransport(new HttpClient(mockHandler.Object)); + options.Retry.MaxRetries = 0; + + using var client = new AzureMonitorLogsClient( + connectionRuntimeUrl: new Uri("https://test.azure.com/connection"), + credential: mockCredential.Object, + options: options); + + // Act + var result = await client + .QuerySchemaV2Async( + input: "Heartbeat | take 10", + subscription: "sub-1", + resourceGroup: "rg-1", + resourceType: "Microsoft.OperationalInsights/workspaces", + resourceName: "my-workspace", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + // Assert + Assert.IsNotNull(result); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/BoxClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/BoxClientTests.cs index 720e753..4727875 100644 --- a/tests/Azure.Connectors.Sdk.Tests/BoxClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/BoxClientTests.cs @@ -117,5 +117,75 @@ await Assert.ThrowsExactlyAsync(() => .ConfigureAwait(continueOnCapturedContext: false); } + [TestMethod] + public async Task ListRootFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListRootFolderAsync(cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListRootFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListRootFolderAsync(cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + + [TestMethod] + public async Task ListFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListFolderAsync(folderId: "folder1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListFolderAsync(folderId: "folder1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/DocuSignClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/DocuSignClientTests.cs index 9cea6b7..aa4d721 100644 --- a/tests/Azure.Connectors.Sdk.Tests/DocuSignClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/DocuSignClientTests.cs @@ -119,5 +119,43 @@ await Assert.ThrowsExactlyAsync(() => .ConfigureAwait(continueOnCapturedContext: false); } + [TestMethod] + public async Task StaticResponseForEmbeddedSigningSchemaV2Async_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("{}") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .StaticResponseForEmbeddedSigningSchemaV2Async(returnURL: "https://contoso.example/return", + isThisAnPersonSigner: "true", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task StaticResponseForEmbeddedSigningSchemaV2Async_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.StaticResponseForEmbeddedSigningSchemaV2Async(returnURL: "https://contoso.example/return", + isThisAnPersonSigner: "true", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/DropboxClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/DropboxClientTests.cs index f1288c4..898bbfb 100644 --- a/tests/Azure.Connectors.Sdk.Tests/DropboxClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/DropboxClientTests.cs @@ -117,5 +117,75 @@ await Assert.ThrowsExactlyAsync(() => .ConfigureAwait(continueOnCapturedContext: false); } + [TestMethod] + public async Task ListRootFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListRootFolderAsync(cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListRootFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListRootFolderAsync(cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + + [TestMethod] + public async Task ListFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListFolderAsync(folder: "folder1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListFolderAsync(folder: "folder1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/ExcelOnlineBusinessClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/ExcelOnlineBusinessClientTests.cs index 0be3ac1..fdbc372 100644 --- a/tests/Azure.Connectors.Sdk.Tests/ExcelOnlineBusinessClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/ExcelOnlineBusinessClientTests.cs @@ -155,5 +155,45 @@ public void TableMetadata_SerializationRoundTrip() Assert.AreEqual("Sheet1!A1:D20", deserialized.Name); Assert.AreEqual("SalesTable", deserialized.Title); } + [TestMethod] + public async Task GetSingleScriptV2Async_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("{}") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .GetSingleScriptV2Async(chosenScriptSource: "me", + chosenScriptDrive: "drive1", + chosenScript: "script1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task GetSingleScriptV2Async_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.GetSingleScriptV2Async(chosenScriptSource: "me", + chosenScriptDrive: "drive1", + chosenScript: "script1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/FtpClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/FtpClientTests.cs index d860081..690fadd 100644 --- a/tests/Azure.Connectors.Sdk.Tests/FtpClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/FtpClientTests.cs @@ -121,5 +121,75 @@ await Assert.ThrowsExactlyAsync(() => .ConfigureAwait(continueOnCapturedContext: false); } + [TestMethod] + public async Task ListRootFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListRootFolderAsync(cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListRootFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListRootFolderAsync(cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + + [TestMethod] + public async Task ListFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .ListFolderAsync(folder: "folder1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.ListFolderAsync(folder: "folder1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/SharePointOnlineClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/SharePointOnlineClientTests.cs index 16e5938..ac45e65 100644 --- a/tests/Azure.Connectors.Sdk.Tests/SharePointOnlineClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/SharePointOnlineClientTests.cs @@ -291,5 +291,71 @@ public async Task CopyFileAsync_WithMockedResponse_ReturnsExpectedResult() Assert.AreEqual("copied-1", result.Id); Assert.AreEqual("report-copy.pdf", result.Name); } + [TestMethod] + public async Task ListRootFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var client = CreateMockedClient(() => new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }); + + var result = await client + .ListRootFolderAsync(siteAddress: "https://contoso.sharepoint.com/sites/test", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListRootFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var client = CreateMockedClient(() => new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }); + + await Assert.ThrowsExactlyAsync(() => + client.ListRootFolderAsync(siteAddress: "https://contoso.sharepoint.com/sites/test", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + + [TestMethod] + public async Task ListFolderAsync_WithMockedResponse_ReturnsExpected() + { + using var client = CreateMockedClient(() => new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("[]") + }); + + var result = await client + .ListFolderAsync(siteAddress: "https://contoso.sharepoint.com/sites/test", + fileIdentifier: "folder1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task ListFolderAsync_WithErrorResponse_ThrowsConnectorException() + { + using var client = CreateMockedClient(() => new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }); + + await Assert.ThrowsExactlyAsync(() => + client.ListFolderAsync(siteAddress: "https://contoso.sharepoint.com/sites/test", + fileIdentifier: "folder1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } } diff --git a/tests/Azure.Connectors.Sdk.Tests/TypeformClientTests.cs b/tests/Azure.Connectors.Sdk.Tests/TypeformClientTests.cs index 484d330..69c47de 100644 --- a/tests/Azure.Connectors.Sdk.Tests/TypeformClientTests.cs +++ b/tests/Azure.Connectors.Sdk.Tests/TypeformClientTests.cs @@ -115,5 +115,41 @@ await Assert.ThrowsExactlyAsync(() => .ConfigureAwait(continueOnCapturedContext: false); } + [TestMethod] + public async Task GetSchemaAsync_WithMockedResponse_ReturnsExpected() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.OK, + Content = new StringContent("\"schema\"") + }; + + using var client = CreateMockedClient(responseMessage); + + var result = await client + .GetSchemaAsync(form: "form1", + cancellationToken: CancellationToken.None) + .ConfigureAwait(continueOnCapturedContext: false); + + Assert.IsNotNull(result); + } + + [TestMethod] + public async Task GetSchemaAsync_WithErrorResponse_ThrowsConnectorException() + { + using var responseMessage = new HttpResponseMessage + { + StatusCode = HttpStatusCode.BadRequest, + Content = new StringContent("{\"error\": \"Bad request\"}") + }; + + using var client = CreateMockedClient(responseMessage); + + await Assert.ThrowsExactlyAsync(() => + client.GetSchemaAsync(form: "form1", + cancellationToken: CancellationToken.None)) + .ConfigureAwait(continueOnCapturedContext: false); + } + } }