Skip to main content

IBlueprintService

Namespace: Meshmakers.Octo.Runtime.Contracts.Blueprints

Service for applying blueprints to tenants

public interface IBlueprintService

Methods

ApplyBlueprintAsync(String, BlueprintId, CancellationToken)

Applies a blueprint to initialize a tenant with CK models and seed data

Task<BlueprintApplicationResult> ApplyBlueprintAsync(string tenantId, BlueprintId blueprintId, CancellationToken cancellationToken)

Parameters

tenantId String
Target tenant identifier

blueprintId BlueprintId
Blueprint to apply

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintApplicationResult>
Result of the blueprint application

ValidateBlueprintAsync(BlueprintId, CancellationToken)

Validates that a blueprint can be applied (checks CK dependencies exist, seed data is valid, etc.)

Task<BlueprintValidationResult> ValidateBlueprintAsync(BlueprintId blueprintId, CancellationToken cancellationToken)

Parameters

blueprintId BlueprintId
Blueprint to validate

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintValidationResult>
Result of the validation

ListBlueprintsAsync(Int32, Int32, CancellationToken)

Lists all available blueprints

Task<BlueprintListResult> ListBlueprintsAsync(int skip, int take, CancellationToken cancellationToken)

Parameters

skip Int32
Number of blueprints to skip

take Int32
Number of blueprints to take

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintListResult>
List of available blueprints

SearchBlueprintsAsync(String, Int32, Int32, CancellationToken)

Searches for blueprints by name or description

Task<BlueprintSearchResult> SearchBlueprintsAsync(string searchTerm, int skip, int take, CancellationToken cancellationToken)

Parameters

searchTerm String
Search term

skip Int32
Number of blueprints to skip

take Int32
Number of blueprints to take

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintSearchResult>
Search results

GetUpdateInfoAsync(String, CancellationToken)

Gets update information for a tenant's current blueprint

Task<BlueprintUpdateInfo> GetUpdateInfoAsync(string tenantId, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintUpdateInfo>
Information about available updates, or null if no blueprint is applied

PreviewUpdateAsync(String, BlueprintId, BlueprintUpdateMode, CancellationToken)

Previews the changes that would be made by updating to a specific blueprint version

Task<BlueprintUpdatePreview> PreviewUpdateAsync(string tenantId, BlueprintId targetVersion, BlueprintUpdateMode updateMode, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

targetVersion BlueprintId
Target blueprint version

updateMode BlueprintUpdateMode
How to apply the update

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintUpdatePreview>
Preview of changes including conflicts

ApplyUpdateAsync(String, BlueprintId, BlueprintUpdateMode, BlueprintUpdateOptions, CancellationToken)

Applies an update to a tenant's blueprint

Task<BlueprintUpdateResult> ApplyUpdateAsync(string tenantId, BlueprintId targetVersion, BlueprintUpdateMode updateMode, BlueprintUpdateOptions options, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

targetVersion BlueprintId
Target blueprint version

updateMode BlueprintUpdateMode
How to apply the update

options BlueprintUpdateOptions
Update options including conflict resolutions

cancellationToken CancellationToken
Cancellation token

Returns

Task<BlueprintUpdateResult>
Result of the update operation

GetHistoryAsync(String, CancellationToken)

Gets the blueprint application history for a tenant

Task<IReadOnlyList<TenantBlueprintInfo>> GetHistoryAsync(string tenantId, CancellationToken cancellationToken)

Parameters

tenantId String
Tenant identifier

cancellationToken CancellationToken
Cancellation token

Returns

Task<IReadOnlyList<TenantBlueprintInfo>>
List of blueprint applications in chronological order