PlanServiceType

public protocol PlanServiceType : Sendable

Provides access to plan operations

  • Returns plans list with summary information.

    Declaration

    Swift

    func plans(includeAccounts: Bool) async throws -> [PlanSummary]

    Parameters

    includeAccounts

    Includes plan accounts in the response

    Return Value

    A list of plans

  • plan(planId:lastKnowledgeOfServer:) Default implementation, asynchronous

    Returns a single plan with all related entities.

    This is effectively a full plan export. Depending on the size of your plan, this request can take a while.

    Default Implementation

    Returns a single plan with all related entities, with optional parameters defaulted.

    Declaration

    Swift

    func plan(
        planId: String,
        lastKnowledgeOfServer: ServerKnowledge?
    ) async throws -> PlanResponse

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    lastKnowledgeOfServer

    The starting server knowledge. If provided, only entities that have changed since lastKnowledgeOfServer will be included.

    Return Value

    A single plan and the knowledge of the server

  • planSettings(planId:) Asynchronous

    Returns settings for a plan.

    Declaration

    Swift

    func planSettings(planId: String) async throws -> PlanSettings

    Parameters

    planId

    The id of the plan (last_used can also be used to specify the last used plan)

    Return Value

    Settings for a specific plan