skipcheck

TM1 client · Docs · More services

ContentPath

import { ContentPath } from "@skipcheck/tm1-client";

Where an entry is in the contents tree: a root folder, then each folder's child by ID.

// Children by ID, which for most entries is the name plus a suffix for the kind
const notes = ContentPath.applications().child("Planning").child("notes.txt.blob");
// Contents('Applications')/Contents('Planning')/Contents('notes.txt.blob')

Children are found by their ID, not their Name, though $metadata keys entries by Name: TM1 (11.8) gives most entries an ID of the name plus a suffix for its kind, such as notes.txt.blob for a document, ibm.extr for a link and }ClientGroups.cube for a cube reference. A folder's ID is its name. The ID is in the entry TM1 returns when it's made. $metadata deprecates Entry.ID in schema 11.5.0, but TM1 11.8 still keys by it. Paths are immutable.

Members

root staticA root folder.
applications staticThe Applications folder, where applications are built.
blobs staticThe Blobs folder, holding the documents behind the document references in applications.
childA child of this folder, public unless scope says.
childA child of this folder, as TM1 returned it, such as from ContentService.create.
child
inBlobsWhether this is in the Blobs folder, where documents themselves are.
pathThe OData path to the entry, such as Contents('Applications')/Contents('Planning').
equalsWhether other is a path through the same IDs, in the same scopes.
toStringThe IDs from the root, such as Applications/Planning/notes.txt.blob.

root

static
static root(id: string): ContentPath

A root folder: Contents('id'), such as Applications.

applications

static
static applications(): ContentPath

The Applications folder, where applications are built.

blobs

static
static blobs(): ContentPath

The Blobs folder, holding the documents behind the document references in applications.

child

child(id: string, scope?: ContentScope): ContentPath

A child of this folder, public unless scope says: …/Contents('id') or …/PrivateContents('id').

child

child(entry: Entry, scope?: ContentScope): ContentPath

A child of this folder, as TM1 returned it, such as from ContentService.create: found by its ID, which $metadata deprecates but TM1 (11.8) still keys entries by, so callers needn't read it. A RangeError if the entry has no ID (it was selected away).

child

child(idOrEntry: string | Entry, scope: ContentScope = ContentScope.Public): ContentPath

inBlobs

inBlobs(): boolean

Whether this is in the Blobs folder, where documents themselves are.

path

path(): ODataPath

The OData path to the entry, such as Contents('Applications')/Contents('Planning').

equals

equals(other: unknown): boolean

Whether other is a path through the same IDs, in the same scopes.

toString

toString(): string

The IDs from the root, such as Applications/Planning/notes.txt.blob.