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 constructor | Something a request needs the server to define in its $metadata; made by the static methods. |
kind property | |
type property | |
name property | |
addedIn property | |
entitySet static | An entity set, such as GitPlans. |
singleton static | A singleton, such as ActiveSession. |
boundOperation static | An action or function bound to a type, or to one of its base types. |
unboundOperation static | An action or function import, invoked from the service root, such as ExecuteMDX. |
property static | A structural or navigation property of a type, or of one of its base types. |
since | A copy recording the schema version that added it. |
addedInVersion | The schema version that added it, or undefined if not known. |
describe | How it reads in messages, with aliases and namespaces dropped. |
toString | The capability, as describe reads, for logs. |
Tm1Capability
constructorconstructor( 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
propertyreadonly kind: Tm1CapabilityKindtype
propertyreadonly type: string | nullname
propertyreadonly name: stringaddedIn
propertyreadonly addedIn: string | nullentitySet
staticstatic entitySet(name: string): Tm1CapabilityAn entity set, such as GitPlans.
singleton
staticstatic singleton(name: string): Tm1CapabilityA singleton, such as ActiveSession.
boundOperation
staticstatic boundOperation(bindingType: string, operation: string): Tm1CapabilityAn 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
staticstatic unboundOperation(name: string): Tm1CapabilityAn action or function import, invoked from the service root, such as ExecuteMDX.
property
staticstatic property(type: string, property: string): Tm1CapabilityA 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): Tm1CapabilityA copy recording the schema version that added it: the version from Core.Revisions, such as 11.8.34.
addedInVersion
addedInVersion(): string | undefinedThe schema version that added it, or undefined if not known.
describe
describe(): stringHow it reads in messages, with aliases and namespaces dropped: Cube.Reserve, entity set GitPlans.
toString
toString(): stringThe capability, as describe reads, for logs.