Dominevo
ReferenceHTTP API

tags

The tags router: 8 methods of the tags capability, with tier, scope, input and output.

Capability tags · scope system · mode singleton · source packages/types/src/capabilities/tags.cap.ts:57.

Every method is called at /trpc/tags.<method> — queries with GET, mutations with POST. See How to call and Authorization.

MethodKindTierToken scopeViewer
ensureTagmutationadminadmin onlyno
listTagsqueryprotectedviewno
updateTagmutationadminadmin onlyno
deleteTagmutationadminadmin onlyno
listqueryprotectedviewno
setStylemutationadminadmin onlyno
renamemutationadminadmin onlyno
removemutationadminadmin onlyno

tags.ensureTag

  • Kind: mutation — POST /trpc/tags.ensureTag
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.ensureTag on your hub

Input

{ name: string }

Output

{ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string }

tags.listTags

  • Kind: query — GET /trpc/tags.listTags
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability tags, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.listTags on your hub

Input

{}

Output

({ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string })[]

tags.updateTag

  • Kind: mutation — POST /trpc/tags.updateTag
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.updateTag on your hub

Input

{ id: string; patch: { name?: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h" | null; icon?: <custom> | null; description?: string | null; order?: number | null } }

Output

{ name: string; colour?: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon?: <custom>; description?: string; order?: number; id: string }

tags.deleteTag

  • Kind: mutation — POST /trpc/tags.deleteTag
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.deleteTag on your hub

Input

{ id: string }

Output

{ updated: TagUsageCountsSchema }

Shapes: TagUsageCountsSchema

tags.list

  • Kind: query — GET /trpc/tags.list
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability tags, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.list on your hub

Input

{}

Output

TagEntrySchema[]

Shapes: TagEntrySchema

tags.setStyle

  • Kind: mutation — POST /trpc/tags.setStyle
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.setStyle on your hub

Input

{ name: string; color: "tag-a" | "tag-b" | "tag-c" | "tag-d" | "tag-e" | "tag-f" | "tag-g" | "tag-h"; icon: <custom> }

Output

void

tags.rename

  • Kind: mutation — POST /trpc/tags.rename
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.rename on your hub

Input

{ from: string; to: string }

Output

{ updated: TagUsageCountsSchema }

Shapes: TagUsageCountsSchema

tags.remove

  • Kind: mutation — POST /trpc/tags.remove
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=tags.remove on your hub

Input

{ name: string }

Output

{ updated: TagUsageCountsSchema }

Shapes: TagUsageCountsSchema