public static Task TransformConfigUpdateDestinationApiKey( this IJetfireClient client, int id, string newApiKey, CancellationToken ct = default ) => client.TransformConfigUpdateDestinationApiKey(id, new TransformConfigApiKeyUpdate { ApiKey = newApiKey });
async Task Update(TransformConfigRead transformToUpdate, ResolvedManifest manifest) { var id = transformToUpdate.Id; await client.TransformConfigUpdate(id, new TransformConfigUpdate { Name = manifest.Transformation.Name, Query = manifest.Query, Destination = ToDataSource(manifest.Transformation.Destination), ConflictMode = ToConflictModeString(manifest.Transformation.Action), }); if (manifest.ReadApiKey != null) { await client.TransformConfigUpdateSourceApiKey(id, manifest.ReadApiKey); } if (manifest.WriteApiKey != null) { await client.TransformConfigUpdateDestinationApiKey(id, manifest.WriteApiKey); } if (manifest.ReadCredentials != null) { await client.TransformConfigUpdateSourceCredentials(id, manifest.ReadCredentials); } if (manifest.WriteCredentials != null) { await client.TransformConfigUpdateDestinationCredentials(id, manifest.WriteCredentials); } if (transformToUpdate.IsPublic != manifest.Transformation.Shared) { await client.TransformConfigSetPublished(id, manifest.Transformation.Shared); } if (transformToUpdate.ignoreNullFields != manifest.Transformation.IgnoreNullFields) { await client.TransformConfigSetIgnoreNullFields(id, manifest.Transformation.IgnoreNullFields); } }