Skip to main content

@nuclia/core / Exports / IDb

Interface: IDb

Implemented by

Table of contents

Methods

Methods

createAccount

createAccount(account): Observable<Account>

Parameters

NameType
accountAccountCreation

Returns

Observable<Account>

Defined in

libs/sdk-core/src/lib/models.ts:126


createKnowledgeBox

createKnowledgeBox(accountId, knowledgeBox, zone?): Observable<WritableKnowledgeBox>

Parameters

NameType
accountIdstring
knowledgeBoxKnowledgeBoxCreation
zone?string

Returns

Observable<WritableKnowledgeBox>

Defined in

libs/sdk-core/src/lib/models.ts:139


createNUAClient

createNUAClient(accountId, data): Observable<{ client_id: string ; token: string }>

Parameters

NameType
accountIdstring
dataNUAClientPayload

Returns

Observable<{ client_id: string ; token: string }>

Defined in

libs/sdk-core/src/lib/models.ts:155

createNUAClient(accountId, data, zone): Observable<{ client_id: string ; token: string }>

Parameters

NameType
accountIdstring
dataNUAClientPayload
zonestring

Returns

Observable<{ client_id: string ; token: string }>

Defined in

libs/sdk-core/src/lib/models.ts:156


deleteAccount

deleteAccount(accountSlug): Observable<void>

Parameters

NameType
accountSlugstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:129


deleteAccountInvitation

deleteAccountInvitation(accountId, email): Observable<void>

Parameters

NameType
accountIdstring
emailstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:183


deleteNUAClient

deleteNUAClient(accountId, client_id): Observable<void>

Parameters

NameType
accountIdstring
client_idstring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:163

deleteNUAClient(accountId, client_id, zone): Observable<void>

Parameters

NameType
accountIdstring
client_idstring
zonestring

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:164


getAccount

getAccount(): Observable<Account>

Returns

Observable<Account>

Defined in

libs/sdk-core/src/lib/models.ts:131

getAccount(accountIdOrSlug?): Observable<Account>

Parameters

NameType
accountIdOrSlug?string

Returns

Observable<Account>

Defined in

libs/sdk-core/src/lib/models.ts:132


getAccountInvitations

getAccountInvitations(accountId): Observable<PendingInvitation[]>

Parameters

NameType
accountIdstring

Returns

Observable<PendingInvitation[]>

Defined in

libs/sdk-core/src/lib/models.ts:182


getAccountStatus

getAccountStatus(accountSlug): Observable<AccountStatus>

Parameters

NameType
accountSlugstring

Returns

Observable<AccountStatus>

Defined in

libs/sdk-core/src/lib/models.ts:127


getAccountUser

getAccountUser(accountSlug, userId): Observable<Partial<FullAccountUser>>

Parameters

NameType
accountSlugstring
userIdstring

Returns

Observable<Partial<FullAccountUser>>

Defined in

libs/sdk-core/src/lib/models.ts:178


getAccountUsers

getAccountUsers(accountSlug): Observable<FullAccountUser[]>

Parameters

NameType
accountSlugstring

Returns

Observable<FullAccountUser[]>

Defined in

libs/sdk-core/src/lib/models.ts:179


getAccounts

getAccounts(): Observable<Account[]>

Returns

Observable<Account[]>

Defined in

libs/sdk-core/src/lib/models.ts:124


getKbIndexes

getKbIndexes(accountSlug): Observable<KbIndex[]>

Parameters

NameType
accountSlugstring

Returns

Observable<KbIndex[]>

Defined in

libs/sdk-core/src/lib/models.ts:125


getKnowledgeBox

getKnowledgeBox(): Observable<WritableKnowledgeBox>

Returns

Observable<WritableKnowledgeBox>

Defined in

libs/sdk-core/src/lib/models.ts:137

getKnowledgeBox(accountId, knowledgeBoxId, zone?): Observable<WritableKnowledgeBox>

Parameters

NameType
accountIdstring
knowledgeBoxIdstring
zone?string

Returns

Observable<WritableKnowledgeBox>

Defined in

libs/sdk-core/src/lib/models.ts:138


getKnowledgeBoxes

getKnowledgeBoxes(): Observable<IKnowledgeBoxItem[]>

Returns

Observable<IKnowledgeBoxItem[]>

Defined in

libs/sdk-core/src/lib/models.ts:134

getKnowledgeBoxes(accountSlug, accountId): Observable<IKnowledgeBoxItem[]>

Parameters

NameType
accountSlugstring
accountIdstring

Returns

Observable<IKnowledgeBoxItem[]>

Defined in

libs/sdk-core/src/lib/models.ts:135


getKnowledgeBoxesForZone

getKnowledgeBoxesForZone(accountId, zone): Observable<IKnowledgeBoxItem[]>

Parameters

NameType
accountIdstring
zonestring

Returns

Observable<IKnowledgeBoxItem[]>

Defined in

libs/sdk-core/src/lib/models.ts:136


getLearningSchema

getLearningSchema(): Observable<LearningConfigurations>

Returns

Observable<LearningConfigurations>

Defined in

libs/sdk-core/src/lib/models.ts:167

getLearningSchema(accountId, zone): Observable<LearningConfigurations>

Parameters

NameType
accountIdstring
zonestring

Returns

Observable<LearningConfigurations>

Defined in

libs/sdk-core/src/lib/models.ts:168


getNUAActivity

getNUAActivity(accountId, client_id, zoneSlug, pageIndex?): Observable<EventList>

Parameters

NameType
accountIdstring
client_idstring
zoneSlugstring
pageIndex?number

Returns

Observable<EventList>

Defined in

libs/sdk-core/src/lib/models.ts:166


getNUAClient

getNUAClient(accountId, client_id, zone): Observable<NUAClient>

Parameters

NameType
accountIdstring
client_idstring
zonestring

Returns

Observable<NUAClient>

Defined in

libs/sdk-core/src/lib/models.ts:154


getNUAClients

getNUAClients(accountId): Observable<NUAClient[]>

Parameters

NameType
accountIdstring

Returns

Observable<NUAClient[]>

Defined in

libs/sdk-core/src/lib/models.ts:153


getStandaloneKbs

getStandaloneKbs(): Observable<IStandaloneKb[]>

Returns

Observable<IStandaloneKb[]>

Defined in

libs/sdk-core/src/lib/models.ts:133


getUsage

getUsage(accountId, from, to?, knowledgeBox?, aggregation?): Observable<UsagePoint[]>

Parameters

NameType
accountIdstring
fromstring
to?string
knowledgeBox?string
aggregation?UsageAggregation

Returns

Observable<UsagePoint[]>

Defined in

libs/sdk-core/src/lib/models.ts:144


getWelcome

getWelcome(): Observable<Welcome>

Returns

Observable<Welcome>

Defined in

libs/sdk-core/src/lib/models.ts:130


hasNUAClient

hasNUAClient(): boolean

Returns

boolean

Defined in

libs/sdk-core/src/lib/models.ts:165


inviteToAccount

inviteToAccount(accountSlug, data): Observable<void>

Parameters

NameType
accountSlugstring
dataInviteAccountUserPayload

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:181


modifyAccount

modifyAccount(accountSlug, data): Observable<void>

Parameters

NameType
accountSlugstring
dataAccountModification

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:128


predictAnswer

predictAnswer(question, context, model?): Observable<string>

Parameters

NameType
questionstring
contextstring[]
model?string

Returns

Observable<string>

Defined in

libs/sdk-core/src/lib/models.ts:170


predictQuery

predictQuery(text, rephrase?, model?, rephrase_prompt?): Observable<QueryInfo>

Parameters

NameType
textstring
rephrase?boolean
model?string
rephrase_prompt?string

Returns

Observable<QueryInfo>

Defined in

libs/sdk-core/src/lib/models.ts:171


predictSummarize

predictSummarize(text, user_prompt?, model?, summary_kind?): Observable<string>

Parameters

NameType
textstring
user_prompt?string
model?string
summary_kind?"simple" | "extended"

Returns

Observable<string>

Defined in

libs/sdk-core/src/lib/models.ts:172


predictTokens

predictTokens(text): Observable<PredictedToken[]>

Parameters

NameType
textstring

Returns

Observable<PredictedToken[]>

Defined in

libs/sdk-core/src/lib/models.ts:169


pull

pull(): Observable<ProcessingPullResponse>

Returns

Observable<ProcessingPullResponse>

Defined in

libs/sdk-core/src/lib/models.ts:152


renewNUAClient

renewNUAClient(accountId, client_id): Observable<{ client_id: string ; token: string }>

Parameters

NameType
accountIdstring
client_idstring

Returns

Observable<{ client_id: string ; token: string }>

Defined in

libs/sdk-core/src/lib/models.ts:161

renewNUAClient(accountId, client_id, zone): Observable<{ client_id: string ; token: string }>

Parameters

NameType
accountIdstring
client_idstring
zonestring

Returns

Observable<{ client_id: string ; token: string }>

Defined in

libs/sdk-core/src/lib/models.ts:162


setAccountUsers

setAccountUsers(accountSlug, users): Observable<void>

Parameters

NameType
accountSlugstring
usersAccountUsersPayload

Returns

Observable<void>

Defined in

libs/sdk-core/src/lib/models.ts:180


upload

upload(file): Observable<ProcessingPushResponse>

Parameters

NameType
fileFile

Returns

Observable<ProcessingPushResponse>

Defined in

libs/sdk-core/src/lib/models.ts:151