docs/Script API/classes/Backend_Script_API.BEtapiToken.html
EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications. Used by:
The format user is presented with is "_". This is also called "authToken" to distinguish it from tokenHash and token.
blobId?dateCreated?dateModified?etapiTokenId?isProtected?isSynced?nametokenHashutcDateCreatedutcDateModified?
beccaisDeletedentityNamehashedPropertiesprimaryKeyName
_getContent_setContentbeforeSavinggenerateHashgetPojogetPojoToSavegetUtcDateChangedhasStringContentinitmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateFromRow
new BEtapiToken(row?: EtapiTokenRow): BEtapiToken
Optionalrow: EtapiTokenRowOptionalblobIdblobId?: string
OptionaldateCreateddateCreated?: string
OptionaldateModifieddateModified?: string
OptionaletapiTokenIdetapiTokenId?: string
OptionalisProtectedisProtected?: boolean
OptionalisSyncedisSynced?: boolean
name: string
tokenHash: string
utcDateCreated: string
OptionalutcDateModifiedutcDateModified?: string
Protectedbeccaget becca(): default
get isDeleted(): boolean
StaticentityNameget entityName(): string
StatichashedPropertiesget hashedProperties(): string[]
StaticprimaryKeyNameget primaryKeyName(): string
Protected_getContent_getContent(): string | Buffer<ArrayBufferLike>
Protected_setContent_setContent(content: string | Buffer<ArrayBufferLike>, opts?: ContentOpts): void
beforeSaving(): void
generateHash(isDeleted?: boolean): string
OptionalisDeleted: booleangetPojo(): {
etapiTokenId: undefined
| string;
isDeleted: boolean;
name: string;
tokenHash: string;
utcDateCreated: string;
utcDateModified: undefined | string;
}
ProtectedgetPojoToSavegetPojoToSave(): {}
getUtcDateChanged(): string
hasStringContent(): boolean
init(): void
markAsDeleted(deleteId?: null | string): void
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use note.deleteNote() and 'branch.deleteBranch()` instead.
markAsDeletedSimple(): void
ProtectedputEntityChangeputEntityChange(isDeleted: boolean): void
save(opts?: {}): this
Saves entity - executes SQL, but doesn't commit the transaction on its own
Optionalopts: {}updateFromRow(row: EtapiTokenRow): void
Member Visibility
ThemeOSLightDark
Constructors constructor Properties blobIddateCreateddateModifiedetapiTokenIdisProtectedisSyncednametokenHashutcDateCreatedutcDateModified Accessors beccaisDeletedentityNamehashedPropertiesprimaryKeyName Methods _getContent_setContentbeforeSavinggenerateHashgetPojogetPojoToSavegetUtcDateChangedhasStringContentinitmarkAsDeletedmarkAsDeletedSimpleputEntityChangesaveupdateFromRow