Skip to content

Sys.Types

Sys.Types collects TypeScript types that app code uses to declare variables, parameters and return values, for example Sys.Types.Choice[] or Sys.Types.PagedData<This.Order>. Most entries exist only for the type check; the constants under Properties and the classes under Classes also exist at runtime.

Availability: Everywhere

The entries are grouped by topic:

TopicEntries
Choices and validationChoice, HasChoices, ValidationError
Data queries and reportsFindManyOptions, FindManyPagedOptions, PagingDefinition, SortingDefinition, PagedData, allowedAggregationFunctions, AggregationInput, AggregationOutput, GroupedCount, ReportOptions, ReportResult, EntityState
Screens and formsForm, ImageSelectorOutput, ClientLogLevel
Users and loginUser, UserRole, UserPermission, UserRecord, LoginStages, LoginStage, UserIdentityTokenRecord
ProcessesSwimlane, SwimlaneAssignment, ProcessScope, ProcessTokenScope, UserTaskToken, UserTaskTokenDetails
MailMailType, MailBody, Mail
Files and binary dataBinaryData, BinaryOrBase64, BinaryFile, BinaryDataOrFile, RedactionBox
Resources, integrations and AIResourceAvailabilityOnClientType, ServiceIntegrationAvailabilityOnClientType, ResourceDefinition, AiTypes, AiType
Google MapsGoogleMapsGeoLocation, GoogleMapsRouteWaypoints, GoogleMapsRouteOptimizationTargets, GoogleMapsRouteOptimizationTarget, GoogleMapsRouteLegResult, GoogleMapsRouteSummary, GoogleMapsRouteResult, GoogleMapsClientConfig
ChatChatMessage, ChatMessageAttachment
Type helpersRemoveMethods, NumberProperties, NumberPropertyKeys, StringProperties, StringPropertyKeys, TypedProperties, TypedPropertyKeys
Library typesSee Re-exported library types.
const allowedAggregationFunctions: readonly ["count", "sum", "min", "max", "avg"]

The aggregation functions that a Server Data Store’s aggregate() method accepts in AggregationInput.aggregationFunction.

Type: readonly string[] · Availability: Everywhere

const LoginStages: readonly ["credentials", "mfa", "passwordChangeNeeded", "successful"]

The stages of a login, in order: entering credentials, multi-factor authentication, a required password change, and the completed login.

Type: readonly string[] · Availability: Everywhere

const AiTypes: readonly ["AzureOpenAi", "Gemini", "Anthropic", "DeepSeek", "Ollama"]

The AI providers that an AI Connection can use; see Sys.Ai.

Type: readonly string[] · Availability: Everywhere

const GoogleMapsRouteOptimizationTargets: {
readonly distance: "Shortest distance";
readonly time: "Fastest time";
}

The route optimization targets of Sys.GoogleMaps and the route picker component, with their display labels.

Type: object · Availability: Everywhere

class UserRecord {
id: UserIdType;
userName: string;
firstName: string;
lastName: string;
email?: string;
mobilePhone?: string;
roleNames?: string[];
permissionNames?: string[];
groupNames?: string[];
manager?: UserRecord;
}

A reduced, shareable view of a user, with role, permission and group names instead of full objects. Sys.User returns users in this form.

FieldTypeRequiredDescription
idUserIdTypeYesID of the user.
userNamestringYesLogin name.
firstNamestringYesFirst name.
lastNamestringYesLast name.
emailstringNoEmail address, if requested.
mobilePhonestringNoMobile phone number, if requested.
roleNamesstring[]NoQualified names of the user’s roles, for example 'Purchasing.Approver'; system roles start with System..
permissionNamesstring[]NoQualified names of the user’s permissions.
groupNamesstring[]NoNames of the user’s groups.
managerUserRecordNoThe user’s manager, if requested.
constructor(init?: Partial<UserRecord> & Pick<UserRecord, 'roleNames' | 'permissionNames' | 'groupNames'>)

Creates a user record from the given fields.

ParameterTypeDescription
initPartial<UserRecord>Optional. Field values; roleNames, permissionNames and groupNames must be given.
getName(): string

Returns the first and last name, separated by a space.

Returns: string · Availability: Everywhere

hasRole(roleName: string): boolean

Checks whether roleNames contains the given qualified role name.

ParameterTypeDescription
roleNamestringQualified role name, for example 'Purchasing.Approver'.

Returns: boolean · Availability: Everywhere

Note

hasRole() and hasSystemRole() throw if roleNames is not set; hasPermission() and hasSystemPermission() throw if permissionNames is not set.

hasSystemRole(roleName: string): boolean

Checks whether the user has the system role System.<roleName>.

ParameterTypeDescription
roleNamestringName of the system role, without System..

Returns: boolean · Availability: Everywhere

hasPermission(permissionName: string): boolean

Checks whether permissionNames contains the given qualified permission name.

ParameterTypeDescription
permissionNamestringQualified permission name.

Returns: boolean · Availability: Everywhere

hasSystemPermission(permissionName: string): boolean

Checks whether the user has the system permission System.<permissionName>.

ParameterTypeDescription
permissionNamestringName of the system permission, without System..

Returns: boolean · Availability: Everywhere

toUserIdAndName(): any

Returns the user’s ID and full name as an object with userId and name.

Returns: any · Availability: Everywhere

class UserTaskToken extends BaseTaskToken {
assignedToUserId: string;
assignedToName: string;
processModuleId: ModuleIdType;
processBoId: BusinessObjectIdType;
screenModuleId: ModuleIdType;
screenBoId: BusinessObjectIdType;
swimlaneId: string;
swimlaneName: string;
}

An open User Task of a Process instance, as listed for End users, for example by Sys.Process.

FieldTypeRequiredDescription
idstringYesID of the task token.
taskType'user' | 'script'YesKind of task.
taskNamestringYesName of the task.
publicMetadataRecord<string, any>NoMetadata copied from publicMetadata in the Process instance’s data.
processInstanceIdnumberYesID of the Process instance.
statusstringYes'active' or 'error'.
errorMessagestringNoError message if the status is 'error'.
errorStackstringNoStack trace of the error.
assignedToUserIdstringYesID of the user the task is assigned to.
assignedToNamestringYesName of that user.
processModuleIdModuleIdTypeYesModule of the Process.
processBoIdBusinessObjectIdTypeYesName of the Process.
screenModuleIdModuleIdTypeYesModule of the task’s Screen.
screenBoIdBusinessObjectIdTypeYesName of the task’s Screen.
swimlaneIdstringYesID of the task’s swimlane.
swimlaneNamestringYesName of the task’s swimlane.
constructor(init?: OnlyData<UserTaskToken>)

Creates a task token from the given field values.

ParameterTypeDescription
initOnlyData<UserTaskToken>Optional. Field values.
getUrl(): string

Returns the relative URL that opens the task, /<screenModuleId>/t/<id>.

Returns: string · Availability: Everywhere

class UserTaskTokenDetails extends UserTaskToken {
assignments: [string, any][];
outputs: string[];
outgoingFlows: ProcessOutgoingFlowInfo[];
layoutScreenModuleId: ModuleIdType;
layoutScreenBoId: BusinessObjectIdType;
}

A UserTaskToken with the details needed to show and complete the task. It has all fields of UserTaskToken, plus:

FieldTypeRequiredDescription
assignments[string, any][]YesInput values of the task, as name and value pairs.
outputsstring[]YesNames of the task’s outputs.
outgoingFlowsProcessOutgoingFlowInfo[]YesThe flows by which the task can be completed.
layoutScreenModuleIdModuleIdTypeYesModule of the layout Screen around the task’s Screen.
layoutScreenBoIdBusinessObjectIdTypeYesName of the layout Screen.
constructor(init?: OnlyData<UserTaskTokenDetails>)

Creates task details from the given field values.

ParameterTypeDescription
initOnlyData<UserTaskTokenDetails>Optional. Field values.
interface Choice<T = any> {
id: T;
label: string | number;
$isOther?: boolean;
}

One option of a dropdown, radio group or similar selection, for example from a Static Entity’s getChoices().

FieldTypeRequiredDescription
idTYesValue stored when the option is selected.
labelstring | numberYesText shown for the option.
$isOtherbooleanNoMarks the option as an “other” option.

Availability: Everywhere

interface HasChoices {
getChoices(...args: any[]): Choice[];
}

Anything that provides selection options through a getChoices() method, such as a Static Entity.

Availability: Everywhere

type ValidationError = {
error: string;
skipSubsequentRules?: boolean;
ruleId?: string;
}

The result of a failed validation rule.

FieldTypeRequiredDescription
errorstringYesMessage shown to the End user.
skipSubsequentRulesbooleanNoIf true, the remaining validation rules are not checked.
ruleIdstringNoID of the rule that failed.

Availability: Everywhere

interface FindManyOptions<T extends EntityCommon> {
select?: FindOptionsSelect<EntityRecord<T>>;
where?: FindOptionsWhere<EntityRecord<T>>[] | FindOptionsWhere<EntityRecord<T>>;
relations?: FindOptionsRelations<EntityRecord<T>>;
order?: FindOptionsOrder<EntityRecord<T>>;
cache?: boolean | number | { id: any; milliseconds: number };
lock?: { mode: 'optimistic'; version: number | Date } | { mode: 'pessimistic_read' | 'pessimistic_write' | 'dirty_read' | 'for_no_key_update' | 'for_key_share'; tables?: string[]; onLocked?: 'nowait' | 'skip_locked' };
transaction?: boolean;
skip?: number;
take?: number;
}

Options for loading Entities from a Server Data Store, a subset of TypeORM’s find options typed for the Entity T.

FieldTypeRequiredDescription
selectFindOptionsSelectNoProperties to load.
whereFindOptionsWhere | FindOptionsWhere[]NoCondition the Entities must match; an array matches any of the conditions.
relationsFindOptionsRelationsNoRelated Entities to load along.
orderFindOptionsOrderNoSort order, for example { createdAt: 'DESC' }.
cacheboolean | number | { id: any; milliseconds: number }NoCaches the query result; a number is the cache duration in milliseconds.
lockobjectNoLocking mode: optimistic with a version, or a pessimistic mode with optional tables and onLocked.
transactionbooleanNoRuns the query in a transaction.
skipnumberNoNumber of Entities to skip, for paging.
takenumberNoMaximum number of Entities to load.

Availability: Everywhere

type FindManyPagedOptions<T extends EntityCommon> = Omit<FindManyOptions<T>, 'take' | 'skip'>

FindManyOptions without skip and take, for paged loading where a PagingDefinition sets the page.

Availability: Everywhere

interface PagingDefinition {
pageSize: number;
pageIndex: number;
}

Which page of a list to load.

FieldTypeRequiredDescription
pageSizenumberYesNumber of items per page.
pageIndexnumberYesZero-based index of the page.

Availability: Everywhere

interface SortingDefinition<K extends string> {
by: K;
direction?: 'asc' | 'desc';
}

Sorting by one property.

FieldTypeRequiredDescription
byKYesName of the property to sort by.
direction'asc' | 'desc'NoSort direction.

Availability: Everywhere

interface PagedData<T> extends PagingDefinition {
list: T[];
length: number;
pageStartIndex: number;
pageEndIndex: number;
}

One page of a longer list, for example the result of a Server Data Store’s loadPageByCondition().

FieldTypeRequiredDescription
listT[]YesItems on this page.
lengthnumberYesTotal number of items across all pages.
pageStartIndexnumberYesZero-based index of the first item of this page within the whole list.
pageEndIndexnumberYesZero-based index of the last item of this page within the whole list.
pageSizenumberYesNumber of items per page.
pageIndexnumberYesZero-based index of this page.

Availability: Everywhere

interface AggregationInput<T extends EntityInstance, A extends (typeof allowedAggregationFunctions)[number], K extends keyof T, O extends string> {
aggregationFunction: A;
column: '*' | K;
outputName: O;
}

One aggregation for a Server Data Store’s aggregate() method.

FieldTypeRequiredDescription
aggregationFunction'count' | 'sum' | 'min' | 'max' | 'avg'YesAggregation function.
column'*' | KYesProperty to aggregate, or '*' for all rows (with count).
outputNameOYesName of the result property.

Availability: Everywhere

type AggregationOutput<T extends EntityInstance, A extends (typeof allowedAggregationFunctions)[number], G extends keyof T, K extends keyof T, O extends string> = {
[P in G]: T[P];
} & {
[P in O]: A extends 'count' ? number : T[K];
}

One result row of aggregate(): the properties grouped by, plus the aggregated value under its outputName (a number for count, otherwise the property’s type).

Availability: Everywhere

type GroupedCount<T extends EntityInstance, G extends keyof T> = {
[P in G]: T[P];
} & {
$count: number;
}

One result row of a Server Data Store’s count() method with grouping: the properties grouped by, plus the number of Entities in $count.

Availability: Everywhere

interface ReportOptions extends ReportView, PagingDefinition {}

Options for running a Report: a report view (filters, sorts, aggregations, grouping and selected columns) plus the page to load.

FieldTypeRequiredDescription
descriptionstringNoDescription of the view.
filtersReportViewFilter[]YesFilters, each with property, operator and values.
sortsReportViewSort[]YesSort order.
aggregationsReportViewAggregation[]YesAggregations to compute.
groupBystring[]YesProperties to group by.
selectstring[]NoProperties to include as columns.
pageSizenumberYesNumber of rows per page.
pageIndexnumberYesZero-based index of the page.

Availability: Everywhere

interface ReportResult<T = any> extends PagedData<T> {
columns: { displayName: string; property: string }[];
}

One page of a Report’s result: the fields of PagedData, plus the columns.

FieldTypeRequiredDescription
columns{ displayName: string; property: string }[]YesColumns of the result, with their display names.

Availability: Everywhere

class EntityState<T extends HasId> {
get list(): T[];
get ids(): IdType<T>[];
get byId(): Record<IdType<T>, T>;
set list(list: T[]);
set byId(byId: Record<IdType<T>, T>);
constructor(init?: Partial<EntityState<T>> | T[]);
}

A list of Entities that is also indexed by ID, used in client-side state. Setting list or byId updates the other views.

FieldTypeRequiredDescription
listT[]YesThe Entities in order.
idsIdType<T>[]YesTheir IDs, read-only.
byIdRecord<IdType<T>, T>YesThe Entities by ID.

Availability: Everywhere

interface Form {
reset(): void;
markAllAsTouched(): void;
markAsTouched(): void;
markAsPristine(): void;
markAllAsDirty(): void;
markAsDirty(): void;
markAsUntouched(): void;
get valid(): boolean;
get invalid(): boolean;
get pending(): boolean;
get disabled(): boolean;
get enabled(): boolean;
get errors(): ValidationErrors | null;
get pristine(): boolean;
get dirty(): boolean;
get touched(): boolean;
get untouched(): boolean;
}

A form on a Screen, with the state and methods of an Angular form: whether its inputs are valid, changed (dirty) or visited (touched), and methods to reset it or change those states.

Availability: Everywhere

interface ImageSelectorOutput {
readonly dataUrl: string;
readonly base64: string;
readonly mimeType: string;
readonly arrayBuffer: ArrayBuffer;
readonly fileName: string;
readonly fileNameExtension: string;
}

The image an End user selected in an image selector, in several representations.

FieldTypeRequiredDescription
dataUrlstringYesThe image as a data: URL.
base64stringYesThe image data, Base64-encoded.
mimeTypestringYesMIME type, for example 'image/png'.
arrayBufferArrayBufferYesThe image data.
fileNamestringYesFile name.
fileNameExtensionstringYesFile name extension.

Availability: Everywhere

type ClientLogLevel = 'success' | 'error' | 'warning' | 'info'

Severity of a message shown to the End user in the browser.

Availability: Everywhere

class User {
id: UserIdType;
userName: string;
firstName: string;
lastName: string;
email: string;
mobilePhone: string;
creationTimestamp: Date;
updateTimestamp: Date;
lastLogin?: Date;
roles?: UserRole[];
idpRoles?: UserIdpRole[];
permissions?: UserPermission[];
configurations?: UserConfiguration[];
groups?: string[];
status: UserStatus;
failedLoginAttempts: number;
effectiveRoles?: UserRole[];
effectivePermissions?: UserPermission[];
identityProviderId?: string;
identityProviderUserId?: string;
managerUserId?: string;
// … and methods
}

A user account with its roles and permissions, for example the initiator of a Process instance. Besides the fields below it has methods such as getName(), hasEffectiveRole(), hasPermission(), hasSystemRole(), isInGroup(), isActive() and mapToUserRecord().

FieldTypeRequiredDescription
idUserIdTypeYesID of the user.
userNamestringYesLogin name.
firstNamestringYesFirst name.
lastNamestringYesLast name.
emailstringYesEmail address.
mobilePhonestringYesMobile phone number.
creationTimestampDateYesWhen the user was created.
updateTimestampDateYesWhen the user was last changed.
lastLoginDateNoTime of the last login.
rolesUserRole[]NoRoles assigned directly.
idpRolesUserIdpRole[]NoRoles assigned by an identity provider.
permissionsUserPermission[]NoPermissions assigned directly.
configurationsUserConfiguration[]NoPer-user configuration values.
groupsstring[]NoNames of the user’s groups.
status'active' | 'passwordChangeNeeded' | 'blocked' | 'inactive' | 'deleted'YesAccount status.
failedLoginAttemptsnumberYesNumber of failed logins since the last successful one.
effectiveRolesUserRole[]NoAll roles, including inherited ones.
effectivePermissionsUserPermission[]NoAll permissions, including those granted through roles.
identityProviderIdstringNoID of the identity provider the user logs in with.
identityProviderUserIdstringNoThe user’s ID at that identity provider.
managerUserIdstringNoID of the user’s manager.

Availability: Everywhere

class UserRole {
id?: number;
userId?: UserIdType;
roleModuleId: ModuleIdType;
roleBoId: BusinessObjectIdType;
tenantIds: string[];
appliesAlsoToSubTenants: boolean;
}

The assignment of a role to a user, optionally restricted to tenants. getQualifiedName() returns the role’s qualified name, <roleModuleId>.<roleBoId>.

FieldTypeRequiredDescription
idnumberNoID of the assignment.
userIdUserIdTypeNoID of the user.
roleModuleIdModuleIdTypeYesModule of the role.
roleBoIdBusinessObjectIdTypeYesName of the role.
tenantIdsstring[]YesTenants the assignment applies to.
appliesAlsoToSubTenantsbooleanYesWhether it also applies to sub-tenants.

Availability: Everywhere

class UserPermission {
id?: number;
userId?: UserIdType;
permissionModuleId: ModuleIdType;
permissionBoId: BusinessObjectIdType;
tenantIds: string[];
appliesAlsoToSubTenants: boolean;
}

The assignment of a permission to a user, optionally restricted to tenants. getQualifiedName() returns the permission’s qualified name, <permissionModuleId>.<permissionBoId>.

FieldTypeRequiredDescription
idnumberNoID of the assignment.
userIdUserIdTypeNoID of the user.
permissionModuleIdModuleIdTypeYesModule of the permission.
permissionBoIdBusinessObjectIdTypeYesName of the permission.
tenantIdsstring[]YesTenants the assignment applies to.
appliesAlsoToSubTenantsbooleanYesWhether it also applies to sub-tenants.

Availability: Everywhere

type LoginStage = (typeof LoginStages)[number]

One of the login stages in LoginStages: 'credentials', 'mfa', 'passwordChangeNeeded' or 'successful'.

Availability: Everywhere

interface UserIdentityTokenRecord {
identityProviderId?: string;
accessToken: string;
scopes: string[];
}

An access token that an identity provider issued for a user, for example to call Microsoft Graph on the user’s behalf with Sys.Microsoft.

FieldTypeRequiredDescription
identityProviderIdstringNoID of the identity provider.
accessTokenstringYesThe access token.
scopesstring[]YesScopes granted to the token.

Availability: Everywhere

interface Swimlane {
id: string;
name: string;
assignee: User;
}

A swimlane of a Process instance and the user it is assigned to.

FieldTypeRequiredDescription
idstringYesID of the swimlane.
namestringYesName of the swimlane.
assigneeUserYesUser the swimlane is assigned to.

Availability: Everywhere

interface SwimlaneAssignment {
users?: (User | UserIdType | string) | (User | UserIdType | string)[];
groups?: string | string[];
roles?: string | string[];
}

Who a swimlane is assigned to: users, groups or roles, each as a single value or a list.

FieldTypeRequiredDescription
usersUser | UserIdType | string, or a list of themNoUsers, as objects, IDs or user names.
groupsstring | string[]NoGroup names.
rolesstring | string[]NoQualified role names.

Availability: Everywhere

interface ProcessScope<P = Record<string, any>> {
process: P;
initiator: User | null;
startSignalName?: string;
startMessageName?: string;
startTimerActivityId?: string;
startMessageData?: any;
action?: string;
}

The data of a Process instance that its scripts can access.

FieldTypeRequiredDescription
processPYesThe Process instance’s data.
initiatorUser | nullYesThe user who started the Process instance, or null.
startSignalNamestringNoName of the signal that started the instance.
startMessageNamestringNoName of the message that started the instance.
startTimerActivityIdstringNoID of the timer start event that started the instance.
startMessageDataanyNoData of the start message.
actionstringNoName of the action with which an End user last completed a User Task’s Screen.

Availability: Everywhere

interface ProcessTokenScope<P = Record<string, any>, T = Record<string, any>> extends ProcessScope<P> {
token: T;
action: string;
swimlane: Swimlane;
}

The scope parameter of Process scripts that run for a token: the fields of ProcessScope, plus the token’s data.

FieldTypeRequiredDescription
tokenTYesThe token’s variables.
actionstringYesName of the action with which an End user last completed a User Task’s Screen.
swimlaneSwimlaneYesThe swimlane the token is in.

Availability: Everywhere

type MailType = 'mail' | 'readReceipt' | 'nonDeliveryReport'

Kind of a received email: a normal mail, a read receipt, or a report that a mail could not be delivered.

Availability: Everywhere

interface MailBody extends ParsedMail {
sequenceNumber: number;
statusCode: string | undefined;
mailType: MailType;
}

A received email as parsed by mailparser (subject, sender, recipients, text, HTML, attachments, headers, …), plus Lowgile’s fields.

FieldTypeRequiredDescription
sequenceNumbernumberYesIMAP sequence number of the mail in the mailbox.
statusCodestring | undefinedYesDelivery status code from a delivery status notification, for example '5.1.1'.
mailTypeMailTypeYesKind of mail.

For the fields of ParsedMail, see the mailparser documentation (package mailparser, version ^3.9.3).

Availability: Everywhere

type Mail = MailBody & Imap.ImapMessageAttributes & {
getFragments(): {
getContent(): string;
isSignature(): boolean;
isQuoted(): boolean;
isHidden(): boolean;
isEmpty(): boolean;
}[];
getVisibleText(options?: { aggressive?: boolean }): string;
getHtmlWithHeaders(): string;
}

A received email as the IMAP client of Sys.Mail returns it: a MailBody with the IMAP message attributes (uid, flags, date, size, …) and methods that split the text into fragments.

FieldTypeRequiredDescription
getFragments() => Fragment[]YesSplits the text into fragments, each of which tells whether it is a signature, quoted, hidden or empty.
getVisibleText(options?) => stringYesReturns the text without quoted replies and signatures. With aggressive: true, visible fragments between hidden ones are treated as hidden too.
getHtmlWithHeaders() => stringYesReturns the HTML body with the mail headers shown on top.

Availability: Everywhere

type BinaryData = ArrayBuffer | Buffer | File | Blob | Uint8Array

Binary content in any of the usual JavaScript representations.

Availability: Everywhere

type BinaryOrBase64 = BinaryData | string

Binary content, or the same as a Base64-encoded string.

Availability: Everywhere

interface BinaryFile<T = BinaryData> {
data: T;
fileName?: string;
mimeType?: string;
}

Binary content with its file name and MIME type.

FieldTypeRequiredDescription
dataTYesThe content.
fileNamestringNoFile name.
mimeTypestringNoMIME type, for example 'application/pdf'.

Availability: Everywhere

type BinaryDataOrFile<T = BinaryData> = T | BinaryFile<T>

Binary content, either alone or as a BinaryFile with file name and MIME type.

Availability: Everywhere

interface RedactionBox {
x1: number;
y1: number;
x2: number;
y2: number;
}

A rectangle on a PDF page to black out, given by two opposite corners; see Sys.Pdf.

FieldTypeRequiredDescription
x1numberYesHorizontal position of the first corner.
y1numberYesVertical position of the first corner.
x2numberYesHorizontal position of the opposite corner.
y2numberYesVertical position of the opposite corner.

Availability: Everywhere

type ResourceAvailabilityOnClientType = 'none' | 'downloadable' | 'builtin'

How a Resource is available on the client: not at all, downloadable by URL, or built into the app.

Availability: Everywhere

ServiceIntegrationAvailabilityOnClientType

Section titled “ServiceIntegrationAvailabilityOnClientType”
type ServiceIntegrationAvailabilityOnClientType = 'none' | 'builtin'

Whether a Service Integration is available on the client.

Availability: Everywhere

interface ResourceDefinition<EL extends ExecutionLocation, Avail extends Omit<ResourceAvailabilityOnClientType, 'none'>> {
resourceType: ResourceType;
mimeType: string;
fileName: string;
relativeUrl: string;
absoluteUrl: string;
getDataBase64?: EL extends 'server' ? () => Promise<string> : Avail extends 'builtin' ? () => Promise<string> : never;
getDataBuffer?: EL extends 'server' ? () => Promise<Buffer> : never;
getDataString?: EL extends 'server' ? () => Promise<string> : Avail extends 'builtin' ? () => Promise<string> : never;
}

The type of a Resource Business Object in app code; see Resource. Which data methods exist depends on where the code runs and on the Resource’s client availability.

FieldTypeRequiredDescription
resourceTypeResourceTypeYesKind of Resource.
mimeTypestringYesMIME type of the file.
fileNamestringYesFile name.
relativeUrlstringYesURL of the file, relative to the app.
absoluteUrlstringYesAbsolute URL of the file, based on the app’s public URL.
getDataBase64() => Promise<string>NoReturns the content Base64-encoded. On the server, or on the client for built-in Resources.
getDataBuffer() => Promise<Buffer>NoReturns the content as a Buffer. On the server only.
getDataString() => Promise<string>NoReturns the content as text. On the server, or on the client for built-in Resources.

Availability: Everywhere

type AiType = (typeof AiTypes)[number]

One of the AI providers in AiTypes.

Availability: Everywhere

interface GoogleMapsGeoLocation {
lat: number;
lng: number;
placeId?: string;
name?: string;
formattedAddress?: string;
}

A point on the map, with the place found there if known.

FieldTypeRequiredDescription
latnumberYesLatitude in degrees.
lngnumberYesLongitude in degrees.
placeIdstringNoGoogle place ID.
namestringNoName of the place.
formattedAddressstringNoAddress as formatted by Google.

Availability: Everywhere

interface GoogleMapsRouteWaypoints {
start?: GoogleMapsGeoLocation;
vias: GoogleMapsGeoLocation[];
destination?: GoogleMapsGeoLocation;
}

The points a route passes, in order.

FieldTypeRequiredDescription
startGoogleMapsGeoLocationNoStart of the route.
viasGoogleMapsGeoLocation[]YesIntermediate stops, in order.
destinationGoogleMapsGeoLocationNoEnd of the route.

Availability: Everywhere

type GoogleMapsRouteOptimizationTarget = keyof typeof GoogleMapsRouteOptimizationTargets

What a route is optimized for: 'distance' (shortest) or 'time' (fastest).

Availability: Everywhere

interface GoogleMapsRouteLegResult {
distanceMeters: number;
durationSeconds: number;
}

Length and travel time of one leg of a route, from one waypoint to the next.

FieldTypeRequiredDescription
distanceMetersnumberYesDistance in meters.
durationSecondsnumberYesTravel time in seconds.

Availability: Everywhere

interface GoogleMapsRouteSummary {
distanceMeters: number;
durationSeconds: number;
legs: GoogleMapsRouteLegResult[];
encodedPolyline: string;
}

Totals, legs and path of one route.

FieldTypeRequiredDescription
distanceMetersnumberYesTotal distance in meters.
durationSecondsnumberYesTotal travel time in seconds.
legsGoogleMapsRouteLegResult[]YesOne entry per leg.
encodedPolylinestringYesPath of the whole route in Google’s encoded polyline format.

Availability: Everywhere

interface GoogleMapsRouteResult {
waypoints: GoogleMapsRouteWaypoints;
chosenRoute: GoogleMapsRouteSummary;
shortestDirectRoute: GoogleMapsRouteSummary;
optimizeFor: GoogleMapsRouteOptimizationTarget;
timeDependent: boolean;
departureTime?: string;
computedAt: string;
}

A planned route, as the route picker component and Sys.GoogleMaps.planRoute() produce it.

FieldTypeRequiredDescription
waypointsGoogleMapsRouteWaypointsYesThe waypoints the route was planned for.
chosenRouteGoogleMapsRouteSummaryYesRoute through all vias.
shortestDirectRouteGoogleMapsRouteSummaryYesShortest route directly from start to destination, without vias, for example to detect detours. Always distance-optimized and without traffic, but with the same avoid options.
optimizeForGoogleMapsRouteOptimizationTargetYesWhat the chosen route was optimized for.
timeDependentbooleanYesWhether traffic at the departure time was considered.
departureTimestringNoDeparture time as an ISO timestamp; only set for time-dependent routing.
computedAtstringYesWhen the route was computed, as an ISO timestamp.

Availability: Everywhere

interface GoogleMapsClientConfig {
apiKey: string;
mapId?: string | null;
}

The part of a Google Maps Configuration Item that the client uses to show maps.

FieldTypeRequiredDescription
apiKeystringYesBrowser API key.
mapIdstring | nullNoMap ID, required for advanced markers.

Availability: Everywhere

interface ChatMessage {
id: number;
userIdAndName: UserIdAndName;
timestamp: Date;
type: 'message' | 'action';
isHtml?: boolean;
actionType?: string;
actionName?: string;
actionIcon?: string;
message: string;
attachments: ChatMessageAttachment[];
}

One message in a chat.

FieldTypeRequiredDescription
idnumberYesID of the message.
userIdAndNameUserIdAndNameYesAuthor, as userId and name.
timestampDateYesWhen the message was written.
type'message' | 'action'YesA text message, or a recorded action.
isHtmlbooleanNoWhether message is HTML.
actionTypestringNoKind of action, for type: 'action'.
actionNamestringNoName of the action.
actionIconstringNoIcon of the action.
messagestringYesText of the message.
attachmentsChatMessageAttachment[]YesAttached files.

Availability: Everywhere

interface ChatMessageAttachment {
id: number;
mimeType?: string;
previewImage: ArrayBuffer | null;
content: ArrayBuffer;
}

A file attached to a chat message.

FieldTypeRequiredDescription
idnumberYesID of the attachment.
mimeTypestringNoMIME type.
previewImageArrayBuffer | nullYesPreview image, if any.
contentArrayBufferYesContent of the file.

Availability: Everywhere

type RemoveMethods<T extends object> = {
[P in keyof T]: T[P] extends (...args: any[]) => any ? never : T[P];
}

T with the type of every method property changed to never, leaving only data properties usable.

Availability: Everywhere

type NumberProperties<T> = {
[K in keyof T]: T[K] extends number ? K : never;
}

Maps each property of T to its own name if it is a number, otherwise to never.

Availability: Everywhere

type NumberPropertyKeys<T> = keyof NumberProperties<T>

Intended as the names of the number properties of T; used by Sys.Math.

Availability: Everywhere

Note

As declared, NumberPropertyKeys<T> is the same as keyof T: it accepts every property name. The same applies to StringPropertyKeys and TypedPropertyKeys.

type StringProperties<T> = {
[K in keyof T]: T[K] extends string ? K : never;
}

Maps each property of T to its own name if it is a string, otherwise to never.

Availability: Everywhere

type StringPropertyKeys<T> = keyof StringProperties<T>

Intended as the names of the string properties of T; see the note under NumberPropertyKeys.

Availability: Everywhere

type TypedProperties<T, U> = {
[K in keyof T]: T[K] extends U ? K : never;
}

Maps each property of T to its own name if its type is assignable to U, otherwise to never.

Availability: Everywhere

type TypedPropertyKeys<T, U> = keyof TypedProperties<T, U>

Intended as the names of the properties of T whose type is assignable to U; see the note under NumberPropertyKeys.

Availability: Everywhere

Sys.Types also re-exports these types from libraries unchanged:

TypePackageWhat it is
FindOptionsSelect, FindOptionsWhere, FindOptionsRelations, FindOptionsOrdertypeorm (1.1.1)Parts of TypeORM’s find options, used in FindManyOptions. See the TypeORM find options documentation.
MailObjectnodemailer (^8.0.1)Nodemailer’s SendMailOptions: the description of an email to send. See the Nodemailer message documentation.
Request, Responseexpress (^4.22.1)HTTP request and response objects of Express. See the Express API documentation.
CdkDragDrop, CdkDragEnd, CdkDragEnter, CdkDragExit, CdkDragMove, CdkDragRelease, CdkDragStart@angular/cdk (22.2.3)Events of Angular CDK drag and drop. See the Angular CDK drag and drop documentation.
MatChipInputEvent@angular/material (22.2.3)Event emitted when an End user enters a chip in a chip input. See the Angular Material chips documentation.
ChartConfigurationchart.js (^4.5.1)Configuration of a Chart.js chart. See the Chart.js configuration documentation.

Availability: Everywhere