skipcheck

TM1 client · Docs · Versions and capabilities

Tm1Capability

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

Something a request needs the server to define in its $metadata: an entity set, a singleton, an operation or a property. A request can declare one, and the session checks it against the connected server before sending anything.

// Does the server's $metadata define the cube's tm1.Reserve action?
const reserve = Tm1Capability.boundOperation("tm1.Cube", "tm1.Reserve").since("11.8.34");
return (await session.capabilities()).supports(reserve);

Names are qualified by namespace or alias (tm1.Cube or ibm.tm1.api.v1.Cube), as in $metadata. since records the schema version that added it, from Core.Revisions, so a server that lacks it can be told why; the generated model fills it in.

Members

Tm1Capability constructorSomething a request needs the server to define in its $metadata; made by the static methods.
kind property
type property
name property
addedIn property
entitySet staticAn entity set, such as GitPlans.
singleton staticA singleton, such as ActiveSession.
boundOperation staticAn action or function bound to a type, or to one of its base types.
unboundOperation staticAn action or function import, invoked from the service root, such as ExecuteMDX.
property staticA structural or navigation property of a type, or of one of its base types.
sinceA copy recording the schema version that added it.
addedInVersionThe schema version that added it, or undefined if not known.
describeHow it reads in messages, with aliases and namespaces dropped.
toStringThe capability, as describe reads, for logs.

Tm1Capability

constructor
constructor( readonly kind: Tm1CapabilityKind, readonly type: string | null, readonly name: string, readonly addedIn: string | null = null, )

Something a request needs the server to define in its $metadata; made by the static methods. Names are qualified by namespace or alias (tm1.Cube or ibm.tm1.api.v1.Cube), as in $metadata.

kind

property
readonly kind: Tm1CapabilityKind

type

property
readonly type: string | null

name

property
readonly name: string

addedIn

property
readonly addedIn: string | null

entitySet

static
static entitySet(name: string): Tm1Capability

An entity set, such as GitPlans.

singleton

static
static singleton(name: string): Tm1Capability

A singleton, such as ActiveSession.

boundOperation

static
static boundOperation(bindingType: string, operation: string): Tm1Capability

An action or function bound to a type, or to one of its base types. @param bindingType the qualified type, such as tm1.Cube @param operation the qualified operation name, such as tm1.Reserve

unboundOperation

static
static unboundOperation(name: string): Tm1Capability

An action or function import, invoked from the service root, such as ExecuteMDX.

property

static
static property(type: string, property: string): Tm1Capability

A structural or navigation property of a type, or of one of its base types. @param type the qualified type, such as tm1.Cube @param property the property's name, such as Rules

since

since(schemaVersion: string): Tm1Capability

A copy recording the schema version that added it: the version from Core.Revisions, such as 11.8.34.

addedInVersion

addedInVersion(): string | undefined

The schema version that added it, or undefined if not known.

describe

describe(): string

How it reads in messages, with aliases and namespaces dropped: Cube.Reserve, entity set GitPlans.

toString

toString(): string

The capability, as describe reads, for logs.