@frontera-sdk/knowledge 1.53.23 → 1.53.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/errors.ts +6 -0
- package/src/wire-types.ts +70 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontera-sdk/knowledge",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.25",
|
|
4
4
|
"description": "Typed client for Frontera Knowledge: knowledge bases, documents, uploads, search with citations and sources, from a backend, a script or an App.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"frontera",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"typecheck": "../../node_modules/typescript7/bin/tsc --noEmit"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@frontera-sdk/core": "1.53.
|
|
62
|
+
"@frontera-sdk/core": "1.53.25"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@tanstack/react-query": "^5.90.21",
|
package/src/errors.ts
CHANGED
|
@@ -58,6 +58,12 @@ export const KNOWLEDGE_REFUSAL_REASONS = [
|
|
|
58
58
|
'source_paused',
|
|
59
59
|
/** The source is being removed. */
|
|
60
60
|
'source_removing',
|
|
61
|
+
/** The chosen owner cannot read this knowledge base, so they cannot own its files. */
|
|
62
|
+
'owner_cannot_read',
|
|
63
|
+
/** The knowledge base already has a file with exactly these bytes; `documentId` names it. */
|
|
64
|
+
'duplicate_file',
|
|
65
|
+
/** A comment mentions someone who cannot read its file; `userIds` names them. */
|
|
66
|
+
'mention_cannot_read',
|
|
61
67
|
] as const
|
|
62
68
|
|
|
63
69
|
export type KnowledgeRefusalReason = (typeof KNOWLEDGE_REFUSAL_REASONS)[number]
|
package/src/wire-types.ts
CHANGED
|
@@ -90,6 +90,17 @@ export type DocumentsAnswer = {
|
|
|
90
90
|
addedByKey: {
|
|
91
91
|
name: string | null
|
|
92
92
|
} | null
|
|
93
|
+
owner: {
|
|
94
|
+
kind: 'person'
|
|
95
|
+
userId: string
|
|
96
|
+
name: string
|
|
97
|
+
} | {
|
|
98
|
+
kind: 'left'
|
|
99
|
+
userId: string
|
|
100
|
+
name: string
|
|
101
|
+
} | {
|
|
102
|
+
kind: 'none'
|
|
103
|
+
}
|
|
93
104
|
source: {
|
|
94
105
|
id: string
|
|
95
106
|
name: string
|
|
@@ -121,6 +132,17 @@ export type DocumentAnswer = {
|
|
|
121
132
|
addedByKey: {
|
|
122
133
|
name: string | null
|
|
123
134
|
} | null
|
|
135
|
+
owner: {
|
|
136
|
+
kind: 'person'
|
|
137
|
+
userId: string
|
|
138
|
+
name: string
|
|
139
|
+
} | {
|
|
140
|
+
kind: 'left'
|
|
141
|
+
userId: string
|
|
142
|
+
name: string
|
|
143
|
+
} | {
|
|
144
|
+
kind: 'none'
|
|
145
|
+
}
|
|
124
146
|
source: {
|
|
125
147
|
id: string
|
|
126
148
|
name: string
|
|
@@ -150,6 +172,17 @@ export type UploadedAnswer = {
|
|
|
150
172
|
addedByKey: {
|
|
151
173
|
name: string | null
|
|
152
174
|
} | null
|
|
175
|
+
owner: {
|
|
176
|
+
kind: 'person'
|
|
177
|
+
userId: string
|
|
178
|
+
name: string
|
|
179
|
+
} | {
|
|
180
|
+
kind: 'left'
|
|
181
|
+
userId: string
|
|
182
|
+
name: string
|
|
183
|
+
} | {
|
|
184
|
+
kind: 'none'
|
|
185
|
+
}
|
|
153
186
|
source: {
|
|
154
187
|
id: string
|
|
155
188
|
name: string
|
|
@@ -180,6 +213,17 @@ export type DocumentDetailsAnswer = {
|
|
|
180
213
|
addedByKey: {
|
|
181
214
|
name: string | null
|
|
182
215
|
} | null
|
|
216
|
+
owner: {
|
|
217
|
+
kind: 'person'
|
|
218
|
+
userId: string
|
|
219
|
+
name: string
|
|
220
|
+
} | {
|
|
221
|
+
kind: 'left'
|
|
222
|
+
userId: string
|
|
223
|
+
name: string
|
|
224
|
+
} | {
|
|
225
|
+
kind: 'none'
|
|
226
|
+
}
|
|
183
227
|
source: {
|
|
184
228
|
id: string
|
|
185
229
|
name: string
|
|
@@ -213,6 +257,17 @@ export type StatusesAnswer = {
|
|
|
213
257
|
addedByKey: {
|
|
214
258
|
name: string | null
|
|
215
259
|
} | null
|
|
260
|
+
owner: {
|
|
261
|
+
kind: 'person'
|
|
262
|
+
userId: string
|
|
263
|
+
name: string
|
|
264
|
+
} | {
|
|
265
|
+
kind: 'left'
|
|
266
|
+
userId: string
|
|
267
|
+
name: string
|
|
268
|
+
} | {
|
|
269
|
+
kind: 'none'
|
|
270
|
+
}
|
|
216
271
|
source: {
|
|
217
272
|
id: string
|
|
218
273
|
name: string
|
|
@@ -262,6 +317,21 @@ export type SearchAnswer = {
|
|
|
262
317
|
addedByKey: {
|
|
263
318
|
name: string | null
|
|
264
319
|
} | null
|
|
320
|
+
owner: {
|
|
321
|
+
kind: 'person'
|
|
322
|
+
userId: string
|
|
323
|
+
name: string
|
|
324
|
+
} | {
|
|
325
|
+
kind: 'left'
|
|
326
|
+
userId: string
|
|
327
|
+
name: string
|
|
328
|
+
} | {
|
|
329
|
+
kind: 'none'
|
|
330
|
+
}
|
|
331
|
+
source: {
|
|
332
|
+
id: string
|
|
333
|
+
name: string
|
|
334
|
+
} | null
|
|
265
335
|
text?: string
|
|
266
336
|
passageId?: string
|
|
267
337
|
}>
|