KumihoClient class

High-level Dart client for the Kumiho Cloud service.

This client provides access to all Kumiho gRPC endpoints for managing projects, spaces, items, revisions, artifacts, edges, and bundles.

Authentication

Pass a Firebase ID token to the token parameter for authentication. The token is automatically injected as a Bearer token in all requests.

final client = KumihoClient(
  host: 'us-central.kumiho.cloud',
  port: 443,
  token: firebaseIdToken,
  secure: true,
);

Connection Options

For local development (insecure):

final client = KumihoClient(host: 'localhost', port: 50051);

For production (TLS):

final client = KumihoClient(
  host: 'api.kumiho.cloud',
  port: 443,
  secure: true,
  token: authToken,
);

For custom channel:

final client = KumihoClient(channel: existingChannel);

Constructors

KumihoClient({String host = 'localhost', int port = 8080, String? token, String? tenantId, ClientChannelBase? channel, ChannelOptions? options, bool secure = false})
Creates a new Kumiho client.

Properties

callOptions CallOptions
Creates CallOptions with authentication metadata and correlation ID.
no setterinherited
channel ClientChannelBase
Underlying gRPC channel.
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stub KumihoServiceClient
Generated service stub for issuing RPCs.
latefinalinherited
tenantId String?
Get the tenant ID for anonymous access.
no setterinherited
token String?
Get the current authentication token.
getter/setter pairinherited
tokenSource String?
Get the source of the current token (for debugging).
no setterinherited

Methods

addBundleMember(String bundleKref, String memberItemKref, {Map<String, String>? metadata}) Future<AddBundleMemberResponse>
Adds an item as a member of a bundle.
inherited
analyzeImpact(String revisionKref, {List<String>? edgeTypeFilter, int? maxDepth, int? limit}) Future<ImpactAnalysisResponse>
Analyzes the impact of changes to a revision.
inherited
artifact(String krefUri) Future<Artifact>
Gets an artifact by kref and returns an Artifact model.
createArtifact(String revisionKref, String name, String location, {Map<String, String>? metadata, bool existsError = true}) Future<ArtifactResponse>
Creates a new artifact for a revision.
inherited
createBundle(String parentPath, String bundleName, {Map<String, String>? metadata}) Future<ItemResponse>
Creates a new bundle item.
inherited
createEdge(String sourceKref, String targetKref, String edgeType, {Map<String, String>? metadata, bool existsError = true}) Future<StatusResponse>
Creates an edge between two revisions.
inherited
createItem(String parentPath, String itemName, String kind, {bool existsError = true}) Future<ItemResponse>
Creates a new item within a space.
inherited
createProject(String name, {String? description}) Future<ProjectResponse>
Creates a new project.
inherited
createRevision(String itemKref, {Map<String, String>? metadata, int? number, bool existsError = true}) Future<RevisionResponse>
Creates a new revision for an item.
inherited
createSpace(String parentPath, String spaceName, {bool existsError = true}) Future<SpaceResponse>
Creates a new space within a project or parent space.
inherited
deleteArtifact(String kref, {bool force = false}) Future<StatusResponse>
Deletes an artifact.
inherited
deleteAttribute(String kref, String key) Future<StatusResponse>
Deletes a single metadata attribute.
inherited
deleteEdge(String sourceKref, String targetKref, String edgeType) Future<StatusResponse>
Deletes an edge between two revisions.
inherited
deleteItem(String kref, {bool force = false}) Future<StatusResponse>
Deletes an item.
inherited
deleteProject(String projectId, {bool force = false}) Future<StatusResponse>
Deletes or deprecates a project.
inherited
deleteRevision(String kref, {bool force = false}) Future<StatusResponse>
Deletes a revision.
inherited
deleteSpace(String path, {bool force = false}) Future<StatusResponse>
Deletes a space.
inherited
eventStream({String? routingKeyFilter, String? krefFilter}) Stream<Event>
Subscribes to real-time events.
inherited
findShortestPath(String sourceKref, String targetKref, {List<String>? edgeTypeFilter, int? maxDepth, bool allShortest = false}) Future<ShortestPathResponse>
Finds the shortest path between two revisions.
inherited
forceRefreshToken() Future<void>
Force refresh the authentication token.
inherited
getArtifact(String revisionKref, String name) Future<ArtifactResponse>
Gets a specific artifact by name.
inherited
getArtifacts(String revisionKref) Future<List<ArtifactResponse>>
Lists all artifacts for a revision.
inherited
getArtifactsByLocation(String location) Future<List<ArtifactResponse>>
Finds artifacts by their file location.
inherited
getAttribute(String kref, String key) Future<GetAttributeResponse>
Gets a single metadata attribute.
inherited
getBundleHistory(String bundleKref) Future<GetBundleHistoryResponse>
Gets the membership history of a bundle.
inherited
getBundleMembers(String bundleKref, {int? revisionNumber}) Future<GetBundleMembersResponse>
Gets the current members of a bundle.
inherited
getChildSpaces(String parentPath, {bool recursive = false}) Future<List<SpaceResponse>>
Lists child spaces under a parent path.
inherited
getEdges(String kref, {String? edgeTypeFilter, EdgeDirection? direction}) Future<GetEdgesResponse>
Gets edges for a revision.
inherited
getItem(String parentPath, String itemName, String kind) Future<ItemResponse>
Gets an item by its path components.
inherited
getItemByKref(String kref) Future<ItemResponse>
Gets an item by its kref URI.
inherited
getItems(String parentPath, {String? nameFilter, String? kindFilter, int? pageSize, String? cursor, bool includeDeprecated = false}) Future<PagedList<ItemResponse>>
Lists items within a space with optional filtering.
inherited
getLatestRevision(String itemKref) Future<RevisionResponse>
Gets the latest revision for an item.
inherited
getProjects() Future<List<ProjectResponse>>
Lists all projects accessible to the current user.
inherited
getRevision(String kref) Future<RevisionResponse>
Gets a revision by its kref URI.
inherited
getRevisions(String itemKref) Future<List<RevisionResponse>>
Lists all revisions for an item.
inherited
getSpace(String pathOrKref) Future<SpaceResponse>
Gets a space by its path or kref.
inherited
getTenantUsage() Future<TenantUsageResponse>
Gets the current tenant's usage statistics.
inherited
hasTag(String kref, String tag) Future<bool>
Checks if a revision currently has a tag.
inherited
item(String krefUri) Future<Item>
Gets an item by kref and returns an Item model.
itemSearch(String contextFilter, String nameFilter, String kindFilter, {int? pageSize, String? cursor, bool includeDeprecated = false}) Future<PagedList<ItemResponse>>
Searches for items across the project.
inherited
mergeOptions(CallOptions? custom) CallOptions
Merges default call options with custom options.
inherited
newProject(String name, {String description = ''}) Future<Project>
Creates a new project and returns a Project model.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekNextRevision(String itemKref) Future<int>
Peeks at the next revision number without creating it.
inherited
project(String name) Future<Project>
Gets a project by name and returns a Project model.
projects() Future<List<Project>>
Gets all projects and returns Project models.
refreshTokenIfNeeded() Future<bool>
Refreshes the authentication token if needed.
inherited
removeBundleMember(String bundleKref, String memberItemKref, {Map<String, String>? metadata}) Future<RemoveBundleMemberResponse>
Removes an item from a bundle.
inherited
resolveKref(String kref, {String? tag, String? time}) Future<RevisionResponse>
Resolves a kref to a specific revision.
inherited
resolveLocation(String kref, {String? tag, String? time}) Future<ResolveLocationResponse>
Resolves a kref to a file location.
inherited
revision(String krefUri) Future<Revision>
Gets a revision by kref and returns a Revision model.
searchItems({String contextFilter = '', String kindFilter = '', String nameFilter = ''}) Future<List<Item>>
Searches for items and returns Item models.
setAttribute(String kref, String key, String value) Future<StatusResponse>
Sets a single metadata attribute.
inherited
setDefaultArtifact(String revisionKref, String artifactName) Future<StatusResponse>
Sets the default artifact for a revision.
inherited
setDeprecated(String kref, bool deprecated) Future<StatusResponse>
Sets the deprecated status of an item.
inherited
shutdown() → void
Shut down the channel if it was created by this client.
inherited
shutdownAsync() Future<void>
Awaitable variant for callers that need to ensure the channel is closed.
inherited
space(String path) Future<Space>
Gets a space by path and returns a Space model.
tagRevision(String kref, String tag) Future<StatusResponse>
Tags a revision.
inherited
toString() String
A string representation of this object.
inherited
traverseEdges(String originKref, EdgeDirection direction, {List<String>? edgeTypeFilter, int? maxDepth, int? limit, bool includePath = false}) Future<TraverseEdgesResponse>
Traverses edges to find all connected revisions.
inherited
untagRevision(String kref, String tag) Future<StatusResponse>
Removes a tag from a revision.
inherited
updateArtifactMetadata(String kref, Map<String, String> metadata) Future<ArtifactResponse>
Updates metadata for an artifact.
inherited
updateItemMetadata(String kref, Map<String, String> metadata) Future<ItemResponse>
Updates metadata for an item.
inherited
updateProject(String projectId, {bool? allowPublic, String? description}) Future<ProjectResponse>
Updates a project's settings.
inherited
updateRevisionMetadata(String kref, Map<String, String> metadata) Future<RevisionResponse>
Updates metadata for a revision.
inherited
updateSpaceMetadata(String kref, Map<String, String> metadata) Future<SpaceResponse>
Updates metadata for a space.
inherited
wasTagged(String kref, String tag) Future<bool>
Checks if a revision was ever tagged (including removed tags).
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited