@nuclia/core / Exports / IDb
Interface: IDb
Implemented by
Table of contents
Methods
- createAccount
- createKnowledgeBox
- createNUAClient
- deleteAccount
- deleteAccountInvitation
- deleteNUAClient
- getAccount
- getAccountInvitations
- getAccountStatus
- getAccountUser
- getAccountUsers
- getAccounts
- getKbIndexes
- getKnowledgeBox
- getKnowledgeBoxes
- getKnowledgeBoxesForZone
- getLearningSchema
- getNUAActivity
- getNUAClient
- getNUAClients
- getStandaloneKbs
- getUsage
- getWelcome
- hasNUAClient
- inviteToAccount
- modifyAccount
- predictAnswer
- predictQuery
- predictSummarize
- predictTokens
- pull
- renewNUAClient
- setAccountUsers
- upload
Methods
createAccount
▸ createAccount(account
): Observable
<Account
>
Parameters
Name | Type |
---|---|
account | AccountCreation |
Returns
Observable
<Account
>
Defined in
libs/sdk-core/src/lib/models.ts:126
createKnowledgeBox
▸ createKnowledgeBox(accountId
, knowledgeBox
, zone?
): Observable
<WritableKnowledgeBox
>
Parameters
Name | Type |
---|---|
accountId | string |
knowledgeBox | KnowledgeBoxCreation |
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
Name | Type |
---|---|
accountId | string |
data | NUAClientPayload |
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
Name | Type |
---|---|
accountId | string |
data | NUAClientPayload |
zone | string |
Returns
Observable
<{ client_id
: string
; token
: string
}>
Defined in
libs/sdk-core/src/lib/models.ts:156
deleteAccount
▸ deleteAccount(accountSlug
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountSlug | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:129
deleteAccountInvitation
▸ deleteAccountInvitation(accountId
, email
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountId | string |
email | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:183
deleteNUAClient
▸ deleteNUAClient(accountId
, client_id
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountId | string |
client_id | string |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:163
▸ deleteNUAClient(accountId
, client_id
, zone
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountId | string |
client_id | string |
zone | string |
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
Name | Type |
---|---|
accountIdOrSlug? | string |
Returns
Observable
<Account
>
Defined in
libs/sdk-core/src/lib/models.ts:132
getAccountInvitations
▸ getAccountInvitations(accountId
): Observable
<PendingInvitation
[]>
Parameters
Name | Type |
---|---|
accountId | string |
Returns
Observable
<PendingInvitation
[]>
Defined in
libs/sdk-core/src/lib/models.ts:182
getAccountStatus
▸ getAccountStatus(accountSlug
): Observable
<AccountStatus
>
Parameters
Name | Type |
---|---|
accountSlug | string |
Returns
Observable
<AccountStatus
>
Defined in
libs/sdk-core/src/lib/models.ts:127
getAccountUser
▸ getAccountUser(accountSlug
, userId
): Observable
<Partial
<FullAccountUser
>>
Parameters
Name | Type |
---|---|
accountSlug | string |
userId | string |
Returns
Observable
<Partial
<FullAccountUser
>>
Defined in
libs/sdk-core/src/lib/models.ts:178
getAccountUsers
▸ getAccountUsers(accountSlug
): Observable
<FullAccountUser
[]>
Parameters
Name | Type |
---|---|
accountSlug | string |
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
Name | Type |
---|---|
accountSlug | string |
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
Name | Type |
---|---|
accountId | string |
knowledgeBoxId | string |
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
Name | Type |
---|---|
accountSlug | string |
accountId | string |
Returns
Observable
<IKnowledgeBoxItem
[]>
Defined in
libs/sdk-core/src/lib/models.ts:135
getKnowledgeBoxesForZone
▸ getKnowledgeBoxesForZone(accountId
, zone
): Observable
<IKnowledgeBoxItem
[]>
Parameters
Name | Type |
---|---|
accountId | string |
zone | string |
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
Name | Type |
---|---|
accountId | string |
zone | string |
Returns
Observable
<LearningConfigurations
>
Defined in
libs/sdk-core/src/lib/models.ts:168
getNUAActivity
▸ getNUAActivity(accountId
, client_id
, zoneSlug
, pageIndex?
): Observable
<EventList
>
Parameters
Name | Type |
---|---|
accountId | string |
client_id | string |
zoneSlug | string |
pageIndex? | number |
Returns
Observable
<EventList
>
Defined in
libs/sdk-core/src/lib/models.ts:166
getNUAClient
▸ getNUAClient(accountId
, client_id
, zone
): Observable
<NUAClient
>
Parameters
Name | Type |
---|---|
accountId | string |
client_id | string |
zone | string |
Returns
Observable
<NUAClient
>
Defined in
libs/sdk-core/src/lib/models.ts:154
getNUAClients
▸ getNUAClients(accountId
): Observable
<NUAClient
[]>
Parameters
Name | Type |
---|---|
accountId | string |
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
Name | Type |
---|---|
accountId | string |
from | string |
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
Name | Type |
---|---|
accountSlug | string |
data | InviteAccountUserPayload |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:181
modifyAccount
▸ modifyAccount(accountSlug
, data
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountSlug | string |
data | AccountModification |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:128
predictAnswer
▸ predictAnswer(question
, context
, model?
): Observable
<string
>
Parameters
Name | Type |
---|---|
question | string |
context | string [] |
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
Name | Type |
---|---|
text | string |
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
Name | Type |
---|---|
text | string |
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
Name | Type |
---|---|
text | string |
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
Name | Type |
---|---|
accountId | string |
client_id | string |
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
Name | Type |
---|---|
accountId | string |
client_id | string |
zone | string |
Returns
Observable
<{ client_id
: string
; token
: string
}>
Defined in
libs/sdk-core/src/lib/models.ts:162
setAccountUsers
▸ setAccountUsers(accountSlug
, users
): Observable
<void
>
Parameters
Name | Type |
---|---|
accountSlug | string |
users | AccountUsersPayload |
Returns
Observable
<void
>
Defined in
libs/sdk-core/src/lib/models.ts:180
upload
▸ upload(file
): Observable
<ProcessingPushResponse
>
Parameters
Name | Type |
---|---|
file | File |
Returns
Observable
<ProcessingPushResponse
>