generated from bscotch/typescript-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Tag management methods to the Client and improve related me…
…thods on Cards. BREAKING
- Loading branch information
1 parent
f5c944a
commit 4f364e5
Showing
9 changed files
with
221 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type { FavroDataTypes } from '$/types/FavroTagTypes.js'; | ||
import { BravoEntity } from '$lib/BravoEntity.js'; | ||
|
||
/** Hydrated Favro Organization. */ | ||
export class BravoTagDefinition extends BravoEntity<FavroDataTypes.Tag.Definition> { | ||
get name() { | ||
return this._data.name; | ||
} | ||
|
||
get tagId() { | ||
return this._data.tagId; | ||
} | ||
|
||
get color() { | ||
return this._data.color; | ||
} | ||
|
||
get organizationId() { | ||
return this._data.organizationId; | ||
} | ||
|
||
async delete() { | ||
await this._client.deleteTagById(this.tagId); | ||
} | ||
|
||
equals(tag: BravoTagDefinition) { | ||
return this.hasSameConstructor(tag) && this.tagId === tag.tagId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.