Bundle class
A bundle that aggregates multiple items in the Kumiho system.
Bundles are special items (kind="bundle") that can contain references to other items. They provide a way to group related assets together and maintain an audit trail of membership changes. Bundles are first-class model objects—they expose rich helper methods without requiring the consumer to touch protobuf-generated stubs.
Practical scenarios include:
- Packaging the set of approved assets for a release.
- Tracking episodic or level-based deliveries without duplicating the underlying items.
- Capturing metadata on the membership relationship (e.g., role, variant, platform) for downstream automation.
final bundle = await project.createBundle('release-v1');
// Add items to the bundle
await bundle.addMember(hero.kref);
await bundle.addMember(texture.kref);
// Get bundle members
final members = await bundle.getMembers();
for (final member in members) {
print(member.uri);
}
// Get membership history
final history = await bundle.getMembershipHistory(hero.kref);
- Inheritance
-
- Object
- KumihoObject
- Bundle
Constructors
- Bundle(ItemResponse response, dynamic client)
- Creates a Bundle from a protobuf ItemResponse.
Properties
-
The user ID who created the bundle.
latefinal
- client → dynamic
-
The client instance for making API calls.
finalinherited
- createdAt ↔ String?
-
ISO timestamp when the bundle was created.
latefinal
- deprecated ↔ bool
-
Whether the bundle is deprecated.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemName ↔ String
-
The base name of the bundle (e.g., "release-v1").
latefinal
- kind ↔ String
-
The kind of item (always "bundle").
latefinal
- kref ↔ Kref
-
The unique reference URI for this bundle.
latefinal
-
metadata
↔ Map<
String, String> -
Custom metadata key-value pairs.
latefinal
- name ↔ String
-
The full name including kind (e.g., "release-v1.bundle").
latefinal
- project → String
-
Gets the project name from the kref.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- space → String
-
Gets the space path from the kref.
no setter
- username ↔ String
-
Display name of the creator.
latefinal
Methods
-
addItem(
Item item, {Map< String, String> ? metadata}) → Future<void> - Adds an item to this bundle.
-
addMember(
Kref memberKref, {Map< String, String> ? metadata}) → Future<void> - Adds a member to this bundle.
-
createRevision(
{Map< String, String> ? metadata}) → Future<Revision> - Creates a new revision of this bundle.
-
getLatestRevision(
) → Future< Revision> - Gets the latest revision of this bundle.
-
getMembers(
) → Future< List< Kref> > - Gets all current members of this bundle.
-
getMembershipHistory(
Kref memberKref) → Future< GetBundleHistoryResponse> - Gets the membership history for a specific member.
-
getRevisions(
) → Future< List< Revision> > - Gets all revisions of this bundle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeItem(
Item item) → Future< void> - Removes an item from this bundle.
-
removeMember(
Kref memberKref) → Future< void> - Removes a member from this bundle.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited