Skip to content

Module Reference / @tinystacks/ops-model

Module: @tinystacks/ops-model

Table of contents

Namespaces

Type Aliases

Type Aliases

Config

Ƭ Config: Object

Type declaration

Name Type
Console { constants?: Record<string, Constant> ; dashboards?: Record<string, YamlDashboard> ; dependencies?: Record<string, string> ; name: string ; providers?: Record<string, YamlProvider> ; repository?: { branch?: string ; configFile?: string ; url?: string } ; widgets?: Record<string, YamlWidget> }
Console.constants? Record<string, Constant>
Console.dashboards? Record<string, YamlDashboard>
Console.dependencies? Record<string, string>
Console.name string
Console.providers? Record<string, YamlProvider>
Console.repository? { branch?: string ; configFile?: string ; url?: string }
Console.repository.branch? string
Console.repository.configFile? string
Console.repository.url? string
Console.widgets? Record<string, YamlWidget>

Defined in

node_modules/@tinystacks/ops-model/dist/models/Config.d.ts:5


Console

Ƭ Console: Object

A console is a top-level construct that defines all

Type declaration

Name Type Description
constants? Record<string, Constant> -
dashboards Record<string, Dashboard> -
dependencies? Record<string, string> -
name string a human-readable name for your console.
providers Record<string, Provider> -
repository? { branch?: string ; configFile?: string ; url?: string } -
repository.branch? string The name of the branch within the repository to use as the source of truth for this console when hosted.
repository.configFile? string The relative file path of the main config file within the repository.
repository.url? string The github repository url to use as a source of truth for this console when hosted
widgets Record<string, Widget> -

Defined in

node_modules/@tinystacks/ops-model/dist/models/Console.d.ts:8


Constant

Ƭ Constant: Object

Type declaration

Name Type Description
description? string description of this constant
type? type the type for this constant
value string the value for this constant

Defined in

node_modules/@tinystacks/ops-model/dist/models/Constant.d.ts:1

node_modules/@tinystacks/ops-model/dist/models/Constant.d.ts:15


Dashboard

Ƭ Dashboard: Object

Type declaration

Name Type Description
description? string a description of the dashboard
id string -
parameters? Parameter[] runtime parameters that can be assigned a value via a query param in the url
route string A URL-safe route where this dashboard can be accessed
widgetIds? string[] -

Defined in

node_modules/@tinystacks/ops-model/dist/models/Dashboard.d.ts:2


Parameter

Ƭ Parameter: Object

Type declaration

Name Type Description
default? string the default value for this parameter
name string a uri compliant string to name this parameter
type? type the type for this parameter

Defined in

node_modules/@tinystacks/ops-model/dist/models/Parameter.d.ts:1

node_modules/@tinystacks/ops-model/dist/models/Parameter.d.ts:15


Ping

Ƭ Ping: string

Defined in

node_modules/@tinystacks/ops-model/dist/models/Ping.d.ts:1


Provider

Ƭ Provider: Object

Type declaration

Name Type Description
id string -
type string This describes the type of the provider

Defined in

node_modules/@tinystacks/ops-model/dist/models/Provider.d.ts:1


TinyStacksError

Ƭ TinyStacksError: Object

Type declaration

Name Type Description
cause? string Used to describe the origin of an error if that original error has meaning to the client. This field should add specificity to 'message'.
context? string Used to identify what part of the request caused the error for non-JSON payloads.
fields? Record<string, string> Used to identify specific fields in a JSON body that caused the error. Typically only used for 4xx type responses. The key should be the json path to the invalid property and the value should be an error message specific to that property.
message string A concise message describing the error in more detail than the status code.
name string The standard name of a TinyStacksError; always to be set to TinyStacksError.
stack? string The stack trace of the error. This is typically not shown to the client, but is important for server-side logging and debugging.
status number The standard HTTP status code for the error. Be sure to use the most specific error code possible, falling back to the X00 codes as necessary. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status for more details.
type "Unauthorized" | "Unauthenticated" | "Validation" | "NotFound" | "Conflict" | "InternalServerError" | string A standard error type corresponding to the textual representation of an HTTP status code. See https://www.npmjs.com/package/http-status-codes for status codes not included in our default list.

Defined in

node_modules/@tinystacks/ops-model/dist/models/TinyStacksError.d.ts:1


Widget

Ƭ Widget: Object

A widget is an object that is passed in and out of the API. It is used to serialize the complex and resolved widgets into only the information needed by the API and frontend to fetch data and render the widget, respectively. The main difference between this object and YamlWidget is that this object does not carry over resolved references to providers and children.

Type declaration

Name Type Description
additionalProperties? any -
childrenIds? string[] -
description? string -
displayName string A human-readable display name, usually used to title a widget
displayOptions? { showDescription?: boolean ; showDisplayName?: boolean } -
displayOptions.showDescription? boolean Whether to show the description
displayOptions.showDisplayName? boolean Whether to show the display name
id string Unique Id for this widget.
providerIds? string[] -
type string This describes how this widget should be rendered. The "type" should be equivalent to the Object definition's name of the widget you are trying to render.

Defined in

node_modules/@tinystacks/ops-model/dist/models/Widget.d.ts:4


YamlConsole

Ƭ YamlConsole: Object

A console is a top-level construct that defines all

Type declaration

Name Type Description
constants? Record<string, Constant> -
dashboards Record<string, YamlDashboard> -
dependencies? Record<string, string> -
name string a human-readable name for your console.
providers Record<string, YamlProvider> -
repository? { branch?: string ; configFile?: string ; url?: string } -
repository.branch? string The name of the branch within the repository to use as the source of truth for this console when hosted.
repository.configFile? string The relative file path of the main config file within the repository.
repository.url? string The github repository url to use as a source of truth for this console when hosted
widgets Record<string, YamlWidget> -

Defined in

node_modules/@tinystacks/ops-model/dist/models/YamlConsole.d.ts:8


YamlDashboard

Ƭ YamlDashboard: Object

Type declaration

Name Type Description
description? string a description of the dashboard
parameters? Parameter[] -
route string -
widgets? YamlWidget[] -

Defined in

node_modules/@tinystacks/ops-model/dist/models/YamlDashboard.d.ts:3


YamlProvider

Ƭ YamlProvider: Object

Type declaration

Name Type Description
id? string -
type string This describes how type of the provider

Defined in

node_modules/@tinystacks/ops-model/dist/models/YamlProvider.d.ts:1


YamlWidget

Ƭ YamlWidget: { children?: YamlWidget[] ; description?: string ; displayName: string ; displayOptions?: { showDescription?: boolean ; showDisplayName?: boolean } ; providers?: Provider[] ; type: string } & Record<string, any>

Defined in

node_modules/@tinystacks/ops-model/dist/models/YamlWidget.d.ts:2