@stackfactor/client-api 1.19.3 → 1.20.1
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/dist/cjs/lib/constants.d.ts +2 -1
- package/dist/cjs/lib/constants.d.ts.map +1 -1
- package/dist/cjs/lib/constants.js +3 -1
- package/dist/cjs/lib/constants.js.map +1 -1
- package/dist/cjs/lib/knowledgeAssessmentAttempts.d.ts +22 -0
- package/dist/cjs/lib/knowledgeAssessmentAttempts.d.ts.map +1 -1
- package/dist/cjs/lib/knowledgeAssessmentAttempts.js +44 -1
- package/dist/cjs/lib/knowledgeAssessmentAttempts.js.map +1 -1
- package/dist/cjs/lib/knowledgeBase/documents.d.ts +127 -0
- package/dist/cjs/lib/knowledgeBase/documents.d.ts.map +1 -0
- package/dist/cjs/lib/knowledgeBase/documents.js +114 -0
- package/dist/cjs/lib/knowledgeBase/documents.js.map +1 -0
- package/dist/cjs/lib/knowledgeBase/knowledgeBases.d.ts +118 -0
- package/dist/cjs/lib/knowledgeBase/knowledgeBases.d.ts.map +1 -0
- package/dist/cjs/lib/knowledgeBase/knowledgeBases.js +256 -0
- package/dist/cjs/lib/knowledgeBase/knowledgeBases.js.map +1 -0
- package/dist/cjs/lib/knowledgeBase/review.d.ts +184 -0
- package/dist/cjs/lib/knowledgeBase/review.d.ts.map +1 -0
- package/dist/cjs/lib/knowledgeBase/review.js +413 -0
- package/dist/cjs/lib/knowledgeBase/review.js.map +1 -0
- package/dist/cjs/lib/knowledgeBase/skills.d.ts +247 -0
- package/dist/cjs/lib/knowledgeBase/skills.d.ts.map +1 -0
- package/dist/cjs/lib/knowledgeBase/skills.js +199 -0
- package/dist/cjs/lib/knowledgeBase/skills.js.map +1 -0
- package/dist/cjs/lib/knowledgeBase/sources.d.ts +136 -0
- package/dist/cjs/lib/knowledgeBase/sources.d.ts.map +1 -0
- package/dist/cjs/lib/knowledgeBase/sources.js +234 -0
- package/dist/cjs/lib/knowledgeBase/sources.js.map +1 -0
- package/dist/cjs/lib/knowledgeBase.d.ts +5 -785
- package/dist/cjs/lib/knowledgeBase.d.ts.map +1 -1
- package/dist/cjs/lib/knowledgeBase.js +32 -1229
- package/dist/cjs/lib/knowledgeBase.js.map +1 -1
- package/dist/cjs/lib/knowledgeBaseAgent.d.ts +33 -1
- package/dist/cjs/lib/knowledgeBaseAgent.d.ts.map +1 -1
- package/dist/cjs/lib/knowledgeBaseAgent.js +18 -3
- package/dist/cjs/lib/knowledgeBaseAgent.js.map +1 -1
- package/dist/cjs/lib/learningContent.d.ts.map +1 -1
- package/dist/cjs/lib/learningContent.js +12 -2
- package/dist/cjs/lib/learningContent.js.map +1 -1
- package/dist/cjs/lib/learningContentCohorts.d.ts +80 -0
- package/dist/cjs/lib/learningContentCohorts.d.ts.map +1 -1
- package/dist/cjs/lib/learningContentCohorts.js +80 -1
- package/dist/cjs/lib/learningContentCohorts.js.map +1 -1
- package/dist/esm/lib/constants.d.ts +2 -1
- package/dist/esm/lib/constants.d.ts.map +1 -1
- package/dist/esm/lib/constants.js +3 -1
- package/dist/esm/lib/constants.js.map +1 -1
- package/dist/esm/lib/knowledgeAssessmentAttempts.d.ts +22 -0
- package/dist/esm/lib/knowledgeAssessmentAttempts.d.ts.map +1 -1
- package/dist/esm/lib/knowledgeAssessmentAttempts.js +40 -0
- package/dist/esm/lib/knowledgeAssessmentAttempts.js.map +1 -1
- package/dist/esm/lib/knowledgeBase/documents.d.ts +127 -0
- package/dist/esm/lib/knowledgeBase/documents.d.ts.map +1 -0
- package/dist/esm/lib/knowledgeBase/documents.js +107 -0
- package/dist/esm/lib/knowledgeBase/documents.js.map +1 -0
- package/dist/esm/lib/knowledgeBase/knowledgeBases.d.ts +118 -0
- package/dist/esm/lib/knowledgeBase/knowledgeBases.d.ts.map +1 -0
- package/dist/esm/lib/knowledgeBase/knowledgeBases.js +242 -0
- package/dist/esm/lib/knowledgeBase/knowledgeBases.js.map +1 -0
- package/dist/esm/lib/knowledgeBase/review.d.ts +184 -0
- package/dist/esm/lib/knowledgeBase/review.d.ts.map +1 -0
- package/dist/esm/lib/knowledgeBase/review.js +392 -0
- package/dist/esm/lib/knowledgeBase/review.js.map +1 -0
- package/dist/esm/lib/knowledgeBase/skills.d.ts +247 -0
- package/dist/esm/lib/knowledgeBase/skills.d.ts.map +1 -0
- package/dist/esm/lib/knowledgeBase/skills.js +189 -0
- package/dist/esm/lib/knowledgeBase/skills.js.map +1 -0
- package/dist/esm/lib/knowledgeBase/sources.d.ts +136 -0
- package/dist/esm/lib/knowledgeBase/sources.d.ts.map +1 -0
- package/dist/esm/lib/knowledgeBase/sources.js +221 -0
- package/dist/esm/lib/knowledgeBase/sources.js.map +1 -0
- package/dist/esm/lib/knowledgeBase.d.ts +5 -785
- package/dist/esm/lib/knowledgeBase.d.ts.map +1 -1
- package/dist/esm/lib/knowledgeBase.js +18 -1175
- package/dist/esm/lib/knowledgeBase.js.map +1 -1
- package/dist/esm/lib/knowledgeBaseAgent.d.ts +33 -1
- package/dist/esm/lib/knowledgeBaseAgent.d.ts.map +1 -1
- package/dist/esm/lib/knowledgeBaseAgent.js +16 -2
- package/dist/esm/lib/knowledgeBaseAgent.js.map +1 -1
- package/dist/esm/lib/learningContent.d.ts.map +1 -1
- package/dist/esm/lib/learningContent.js +12 -2
- package/dist/esm/lib/learningContent.js.map +1 -1
- package/dist/esm/lib/learningContentCohorts.d.ts +80 -0
- package/dist/esm/lib/learningContentCohorts.d.ts.map +1 -1
- package/dist/esm/lib/learningContentCohorts.js +66 -0
- package/dist/esm/lib/learningContentCohorts.js.map +1 -1
- package/package.json +1 -3
|
@@ -1,786 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* from
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
export interface ListedSkill {
|
|
8
|
-
name: string;
|
|
9
|
-
catalogId?: string | null;
|
|
10
|
-
catalogType?: "skill" | "skillTemplate" | null;
|
|
11
|
-
/** Read-only: the catalog skill's own microskills, as stored. */
|
|
12
|
-
microSkills?: string[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* What labelling looks for in a knowledge base's content: every skill it
|
|
16
|
-
* teaches (`"discover"`, the default), the listed skills first, under their
|
|
17
|
-
* names, and any others (`"guided"`), or only the listed ones (`"focused"`).
|
|
18
|
-
* Guided and focused need at least one skill, at most 50; discover lists none.
|
|
19
|
-
* Changing the mode or the list on update syncs every resource again.
|
|
20
|
-
*/
|
|
21
|
-
export interface SkillSettings {
|
|
22
|
-
mode: "discover" | "guided" | "focused";
|
|
23
|
-
skills: ListedSkill[];
|
|
24
|
-
}
|
|
25
|
-
/** Create / update payload for a KB's metadata (§14 CRUD). */
|
|
26
|
-
export interface KnowledgeBaseInput {
|
|
27
|
-
name?: string;
|
|
28
|
-
description?: string | null;
|
|
29
|
-
category?: string | null;
|
|
30
|
-
/** One of `KNOWLEDGE_BASE.VISIBILITY` — "private" | "team" | "public". */
|
|
31
|
-
visibility?: string;
|
|
32
|
-
embeddingProvider?: string;
|
|
33
|
-
embeddingModel?: string;
|
|
34
|
-
embeddingDimensions?: number;
|
|
35
|
-
redactionPolicy?: object;
|
|
36
|
-
status?: number;
|
|
37
|
-
skillSettings?: SkillSettings;
|
|
38
|
-
}
|
|
39
|
-
/** An access grant (§14 KB Access Management). */
|
|
40
|
-
export interface AccessEntryInput {
|
|
41
|
-
/** One of `KNOWLEDGE_BASE.SUBJECT_TYPE` — "user" | "group" | "team". */
|
|
42
|
-
subjectType: string;
|
|
43
|
-
subjectId: string;
|
|
44
|
-
/** One of `KNOWLEDGE_BASE.ACCESS_ROLE` — "owner" | "editor" | "contributor" | "viewer". */
|
|
45
|
-
role: string;
|
|
46
|
-
}
|
|
47
|
-
/** Optional filters for the paginated document list (§14 Document Management). */
|
|
48
|
-
export interface DocumentListParams {
|
|
49
|
-
page?: number;
|
|
50
|
-
limit?: number;
|
|
51
|
-
/** One of `KNOWLEDGE_BASE.DOCUMENT_STATUS`. */
|
|
52
|
-
status?: number;
|
|
53
|
-
}
|
|
54
|
-
/** Optional options for the list of a knowledge base's skills. */
|
|
55
|
-
export interface SkillListParams {
|
|
56
|
-
/** How many skills, most named first: 1 to 200 (default 50). */
|
|
57
|
-
limit?: number;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* One way a knowledge base's people name a skill its content was labelled
|
|
61
|
-
* with: `from`, a skill's name (any spelling of it), becomes `to` — a new name,
|
|
62
|
-
* or the name of a skill it merges into — or null, which removes the skill.
|
|
63
|
-
*/
|
|
64
|
-
export interface SkillMapping {
|
|
65
|
-
from: string;
|
|
66
|
-
to: string | null;
|
|
67
|
-
}
|
|
68
|
-
/** A knowledge base that holds documents about a skill (`getSkillCoverage`). */
|
|
69
|
-
export interface SkillCoverageKnowledgeBase {
|
|
70
|
-
_id: string;
|
|
71
|
-
name: string;
|
|
72
|
-
/** How many of its documents the caller may read name the skill. */
|
|
73
|
-
documentCount: number;
|
|
74
|
-
/** The kinds of resource those documents came from. */
|
|
75
|
-
sourceTypes: string[];
|
|
76
|
-
}
|
|
77
|
-
/** What the knowledge bases the caller can open hold about one skill. */
|
|
78
|
-
export interface SkillCoverage {
|
|
79
|
-
/** The skill's name as it was matched: spaces collapsed, trimmed. */
|
|
80
|
-
skill: string;
|
|
81
|
-
documentCount: number;
|
|
82
|
-
/** Most documents first. */
|
|
83
|
-
knowledgeBases: SkillCoverageKnowledgeBase[];
|
|
84
|
-
/** The microskills their passages cover most, at most 12. */
|
|
85
|
-
microSkills: string[];
|
|
86
|
-
/** Every microskill they cover. */
|
|
87
|
-
microSkillCount: number;
|
|
88
|
-
}
|
|
89
|
-
/** Options for the skill names the caller's knowledge bases suggest (`getSkillSuggestions`). */
|
|
90
|
-
export interface SkillSuggestionParams {
|
|
91
|
-
/** How many suggestions: 1 to 25 (default 10). */
|
|
92
|
-
limit?: number;
|
|
93
|
-
/**
|
|
94
|
-
* Where a name that already exists is looked for: the tenant's skills
|
|
95
|
-
* (`"skill"`, the default) or, for the skill template form, the platform's
|
|
96
|
-
* skill templates (`"skillTemplate"`, a StackFactor admin tenant only).
|
|
97
|
-
*/
|
|
98
|
-
catalog?: "skill" | "skillTemplate";
|
|
99
|
-
/** The skill or skill template being edited: its own name is no clash. */
|
|
100
|
-
excludeId?: string | null;
|
|
101
|
-
}
|
|
102
|
-
/** A skill name the caller's knowledge bases suggest (`getSkillSuggestions`). */
|
|
103
|
-
export interface SkillSuggestion {
|
|
104
|
-
/** The spelling most of its documents use. */
|
|
105
|
-
name: string;
|
|
106
|
-
/** How many documents the caller may read name it. */
|
|
107
|
-
documentCount: number;
|
|
108
|
-
/** How many knowledge bases those documents are in. */
|
|
109
|
-
knowledgeBaseCount: number;
|
|
110
|
-
/**
|
|
111
|
-
* A skill (with `catalog` "skillTemplate", a skill template) already has
|
|
112
|
-
* this name, in some spelling: a new one may not take it.
|
|
113
|
-
*/
|
|
114
|
-
existingSkill: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* How the skill (skill template) that already has the name spells it, which
|
|
117
|
-
* may differ from `name` ("react" for "React"); null when none has it.
|
|
118
|
-
*/
|
|
119
|
-
existingSkillName: string | null;
|
|
120
|
-
}
|
|
121
|
-
/** One of a knowledge base skill's microskills, and how many passages teach it. */
|
|
122
|
-
export interface KnowledgeBaseMicroSkill {
|
|
123
|
-
name: string;
|
|
124
|
-
passages: number;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Where a knowledge base's microskill grouping stands, read from what the
|
|
128
|
-
* platform stores: asked for and not started (`queued`, since `requestedAt`),
|
|
129
|
-
* under way (`running`, since `startedAt`) or neither (`idle`); and when the
|
|
130
|
-
* last grouping ended, null before the first.
|
|
131
|
-
*/
|
|
132
|
-
export interface KnowledgeBaseMicroSkillGrouping {
|
|
133
|
-
state: "idle" | "queued" | "running";
|
|
134
|
-
requestedAt: string | null;
|
|
135
|
-
startedAt: string | null;
|
|
136
|
-
finishedAt: string | null;
|
|
137
|
-
}
|
|
138
|
-
/** A knowledge base skill's microskills (`listMicroSkills`). */
|
|
139
|
-
export interface KnowledgeBaseMicroSkills {
|
|
140
|
-
/** The skill as it was asked for: spaces collapsed, trimmed. */
|
|
141
|
-
skill: string;
|
|
142
|
-
/**
|
|
143
|
-
* True when the passages' tags were grouped into microskills; false before,
|
|
144
|
-
* when `microSkills` are the tags as labelling gave them.
|
|
145
|
-
*/
|
|
146
|
-
consolidated: boolean;
|
|
147
|
-
consolidatedAt: string | null;
|
|
148
|
-
/** Most passages first. Every one, however many. */
|
|
149
|
-
microSkills: KnowledgeBaseMicroSkill[];
|
|
150
|
-
microSkillCount: number;
|
|
151
|
-
/** How many distinct passage tags they were grouped from. */
|
|
152
|
-
passageTags: number;
|
|
153
|
-
/**
|
|
154
|
-
* How many passages carry the skill's tags, each once. Absent, like the two
|
|
155
|
-
* fields below, from a platform older than Group now.
|
|
156
|
-
*/
|
|
157
|
-
passages?: number;
|
|
158
|
-
/**
|
|
159
|
-
* True when those passages are fewer than a microskill needs: grouping never
|
|
160
|
-
* groups the skill, so its tags stay as they are and Group now would change
|
|
161
|
-
* nothing for it.
|
|
162
|
-
*/
|
|
163
|
-
belowGroupingThreshold?: boolean;
|
|
164
|
-
/** Where the knowledge base's grouping stands. */
|
|
165
|
-
grouping?: KnowledgeBaseMicroSkillGrouping;
|
|
166
|
-
/**
|
|
167
|
-
* When the last grouping of a skill not grouped failed; null when it did not,
|
|
168
|
-
* or the skill is grouped.
|
|
169
|
-
*/
|
|
170
|
-
groupingFailedAt?: string | null;
|
|
171
|
-
/**
|
|
172
|
-
* Why, when the platform's RAG processor was refused for good (none enabled
|
|
173
|
-
* or allowed by the compliance profile, or the one named switched off);
|
|
174
|
-
* null otherwise.
|
|
175
|
-
*/
|
|
176
|
-
groupingFailure?: string | null;
|
|
177
|
-
}
|
|
178
|
-
/** A knowledge base document as its page shows it (`getDocument`). */
|
|
179
|
-
export interface KnowledgeBaseDocumentInfo {
|
|
180
|
-
_id: string;
|
|
181
|
-
knowledgeBaseId: string;
|
|
182
|
-
knowledgeBaseSourceId: string;
|
|
183
|
-
name: string;
|
|
184
|
-
/** One of `KNOWLEDGE_BASE.DOCUMENT_STATUS`. */
|
|
185
|
-
status: number;
|
|
186
|
-
/** The source's connector type, or null when the source is gone. */
|
|
187
|
-
sourceType: string | null;
|
|
188
|
-
/** The document at its source (http or https only), or null. */
|
|
189
|
-
webUrl: string | null;
|
|
190
|
-
folderPath: string | null;
|
|
191
|
-
mimeType: string | null;
|
|
192
|
-
documentType: string | null;
|
|
193
|
-
chunkCount: number | null;
|
|
194
|
-
lastSync: string | null;
|
|
195
|
-
updatedAt: string | null;
|
|
196
|
-
}
|
|
197
|
-
/** A skill a chunk was labelled with, and its microskills. */
|
|
198
|
-
export interface KnowledgeBaseChunkSkill {
|
|
199
|
-
name: string;
|
|
200
|
-
microSkills: string[];
|
|
201
|
-
}
|
|
202
|
-
/** One chunk of a knowledge base document, as the RAG holds it (redacted). */
|
|
203
|
-
export interface KnowledgeBaseDocumentChunk {
|
|
204
|
-
_id: string;
|
|
205
|
-
chunkIndex: number;
|
|
206
|
-
sectionTitle: string | null;
|
|
207
|
-
pageNumber: number | null;
|
|
208
|
-
contentType: string | null;
|
|
209
|
-
text: string;
|
|
210
|
-
isImage: boolean;
|
|
211
|
-
imageDescription: string | null;
|
|
212
|
-
/**
|
|
213
|
-
* True for an image chunk whose picture can be shown: ask `getDocumentImage`
|
|
214
|
-
* for it. False for a text chunk, and for a picture that was never stored
|
|
215
|
-
* (an older sync) or is of a type the page does not show; such a passage
|
|
216
|
-
* keeps to its description.
|
|
217
|
-
*/
|
|
218
|
-
hasImage: boolean;
|
|
219
|
-
skills: KnowledgeBaseChunkSkill[];
|
|
220
|
-
}
|
|
221
|
-
/** A knowledge base document and what the RAG holds for it (`getDocument`). */
|
|
222
|
-
export interface KnowledgeBaseDocumentContent {
|
|
223
|
-
knowledgeBase: {
|
|
224
|
-
_id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
};
|
|
227
|
-
document: KnowledgeBaseDocumentInfo;
|
|
228
|
-
/**
|
|
229
|
-
* By `chunkIndex`. Empty unless the document was processed and is not held
|
|
230
|
-
* for review or blocked.
|
|
231
|
-
*/
|
|
232
|
-
chunks: KnowledgeBaseDocumentChunk[];
|
|
233
|
-
/** How many chunks the document has. */
|
|
234
|
-
chunksTotal: number;
|
|
235
|
-
/** True when it has more than 1000; only the first 1000 are returned. */
|
|
236
|
-
truncated: boolean;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* List the knowledge bases the caller can see.
|
|
240
|
-
* GET /api/v1/knowledge-base
|
|
241
|
-
* @param {String} authToken Authentication token
|
|
242
|
-
* @returns {Promise<object>}
|
|
243
|
-
*/
|
|
244
|
-
export declare const listKnowledgeBases: (authToken: string) => Promise<object>;
|
|
245
|
-
/**
|
|
246
|
-
* Create a knowledge base (the creator becomes owner automatically). Requires the
|
|
247
|
-
* global CREATE_KNOWLEDGE_BASE capability.
|
|
248
|
-
* POST /api/v1/knowledge-base
|
|
249
|
-
* @param {KnowledgeBaseInput} data KB metadata (at minimum `name`)
|
|
250
|
-
* @param {String} authToken Authentication token
|
|
251
|
-
* @returns {Promise<object>}
|
|
252
|
-
*/
|
|
253
|
-
export declare const createKnowledgeBase: (data: KnowledgeBaseInput, authToken: string) => Promise<object>;
|
|
254
|
-
/**
|
|
255
|
-
* Get a single knowledge base (plus stats).
|
|
256
|
-
* GET /api/v1/knowledge-base/:id
|
|
257
|
-
* @param {String} id The knowledge base id
|
|
258
|
-
* @param {String} authToken Authentication token
|
|
259
|
-
* @returns {Promise<object>}
|
|
260
|
-
*/
|
|
261
|
-
export declare const getKnowledgeBase: (id: string, authToken: string) => Promise<object>;
|
|
262
|
-
/**
|
|
263
|
-
* Update a knowledge base's metadata. Owner or editor only. Does not touch
|
|
264
|
-
* `access[]`, `sources`, or `createdBy` — those have their own gated flows.
|
|
265
|
-
* PUT /api/v1/knowledge-base/:id
|
|
266
|
-
* @param {String} id The knowledge base id
|
|
267
|
-
* @param {KnowledgeBaseInput} data The fields to update
|
|
268
|
-
* @param {String} authToken Authentication token
|
|
269
|
-
* @returns {Promise<object>}
|
|
270
|
-
*/
|
|
271
|
-
export declare const updateKnowledgeBase: (id: string, data: KnowledgeBaseInput, authToken: string) => Promise<object>;
|
|
272
|
-
/**
|
|
273
|
-
* Delete a knowledge base (cascades to its chunks). Owner only.
|
|
274
|
-
* DELETE /api/v1/knowledge-base/:id
|
|
275
|
-
* @param {String} id The knowledge base id
|
|
276
|
-
* @param {String} authToken Authentication token
|
|
277
|
-
* @returns {Promise<object>}
|
|
278
|
-
*/
|
|
279
|
-
export declare const deleteKnowledgeBase: (id: string, authToken: string) => Promise<object>;
|
|
280
|
-
/**
|
|
281
|
-
* List the available KB_SOURCE_CONNECTOR integrations (enabled integrations +
|
|
282
|
-
* capability manifests for the source-creation form).
|
|
283
|
-
* GET /api/v1/knowledge-base/source-connectors
|
|
284
|
-
* @param {String} authToken Authentication token
|
|
285
|
-
* @returns {Promise<object>}
|
|
286
|
-
*/
|
|
287
|
-
export declare const listSourceConnectors: (authToken: string) => Promise<object>;
|
|
288
|
-
/**
|
|
289
|
-
* Add a source to a knowledge base (`integrationId` + credentials +
|
|
290
|
-
* `syncFrequencyDays`, default 7). Publishes a kb-source-event (changeType="add").
|
|
291
|
-
* POST /api/v1/knowledge-base/:id/sources
|
|
292
|
-
* @param {String} id The knowledge base id
|
|
293
|
-
* @param {object} source The source configuration
|
|
294
|
-
* @param {String} authToken Authentication token
|
|
295
|
-
* @returns {Promise<object>}
|
|
296
|
-
*/
|
|
297
|
-
export declare const addSource: (id: string, source: object, authToken: string) => Promise<object>;
|
|
298
|
-
/**
|
|
299
|
-
* Update a knowledge base source. Publishes a kb-source-event per changed source.
|
|
300
|
-
* PUT /api/v1/knowledge-base/:id/sources/:sourceId
|
|
301
|
-
* @param {String} id The knowledge base id
|
|
302
|
-
* @param {String} sourceId The source id
|
|
303
|
-
* @param {object} source The updated source configuration
|
|
304
|
-
* @param {String} authToken Authentication token
|
|
305
|
-
* @returns {Promise<object>}
|
|
306
|
-
*/
|
|
307
|
-
export declare const updateSource: (id: string, sourceId: string, source: object, authToken: string) => Promise<object>;
|
|
308
|
-
/**
|
|
309
|
-
* Remove a source from a knowledge base. Publishes a kb-source-event
|
|
310
|
-
* (changeType="delete").
|
|
311
|
-
* DELETE /api/v1/knowledge-base/:id/sources/:sourceId
|
|
312
|
-
* @param {String} id The knowledge base id
|
|
313
|
-
* @param {String} sourceId The source id
|
|
314
|
-
* @param {String} authToken Authentication token
|
|
315
|
-
* @returns {Promise<object>}
|
|
316
|
-
*/
|
|
317
|
-
export declare const deleteSource: (id: string, sourceId: string, authToken: string) => Promise<object>;
|
|
318
|
-
/**
|
|
319
|
-
* Trigger a manual re-sync of a source. Publishes a kb-source-event
|
|
320
|
-
* (changeType="update", trigger="manual_sync").
|
|
321
|
-
* POST /api/v1/knowledge-base/:id/sources/:sourceId/sync
|
|
322
|
-
* @param {String} id The knowledge base id
|
|
323
|
-
* @param {String} sourceId The source id
|
|
324
|
-
* @param {String} authToken Authentication token
|
|
325
|
-
* @returns {Promise<object>}
|
|
326
|
-
*/
|
|
327
|
-
export declare const syncSource: (id: string, sourceId: string, authToken: string) => Promise<object>;
|
|
328
|
-
/**
|
|
329
|
-
* Process every processed document of a source again — classification, labels,
|
|
330
|
-
* chunks and embeddings redone — on a run of the source. Quarantined and blocked
|
|
331
|
-
* documents are left as they are. A run starts now, or a follow-up run is owed
|
|
332
|
-
* while one is outstanding (trigger="reprocess").
|
|
333
|
-
* POST /api/v1/knowledge-base/:id/sources/:sourceId/reprocess
|
|
334
|
-
* @param {String} id The knowledge base id
|
|
335
|
-
* @param {String} sourceId The source id
|
|
336
|
-
* @param {String} authToken Authentication token
|
|
337
|
-
* @returns {Promise<object>} { ok, documents, correlationId, started }: how many
|
|
338
|
-
* documents were marked, the run, and whether it started now
|
|
339
|
-
*/
|
|
340
|
-
export declare const reprocessSource: (id: string, sourceId: string, authToken: string) => Promise<object>;
|
|
341
|
-
/**
|
|
342
|
-
* Test a source's connector credentials (dispatches TEST_CONNECTION).
|
|
343
|
-
* POST /api/v1/knowledge-base/:id/sources/:sourceId/test
|
|
344
|
-
* @param {String} id The knowledge base id
|
|
345
|
-
* @param {String} sourceId The source id
|
|
346
|
-
* @param {String} authToken Authentication token
|
|
347
|
-
* @returns {Promise<object>}
|
|
348
|
-
*/
|
|
349
|
-
export declare const testSource: (id: string, sourceId: string, authToken: string) => Promise<object>;
|
|
350
|
-
/**
|
|
351
|
-
* List a knowledge base's documents (paginated, with status + lastSync). There is
|
|
352
|
-
* no upload endpoint — documents are only ingested via configured sources.
|
|
353
|
-
* GET /api/v1/knowledge-base/:id/documents
|
|
354
|
-
* @param {String} id The knowledge base id
|
|
355
|
-
* @param {DocumentListParams} params Optional pagination / status filters
|
|
356
|
-
* @param {String} authToken Authentication token
|
|
357
|
-
* @returns {Promise<object>}
|
|
358
|
-
*/
|
|
359
|
-
export declare const listDocuments: (id: string, params: DocumentListParams, authToken: string) => Promise<object>;
|
|
360
|
-
/**
|
|
361
|
-
* Get one knowledge base document and what the RAG holds for it: its chunks,
|
|
362
|
-
* after redaction, in order (the first 1000; `truncated` says when there are
|
|
363
|
-
* more). No chunks while the document is not processed, or is held for review
|
|
364
|
-
* or blocked. Needs the knowledge base access search needs, and the
|
|
365
|
-
* document's own source permissions (403); 404 when either is missing.
|
|
366
|
-
* GET /api/v1/knowledge-base/:id/documents/:docId
|
|
367
|
-
* @param {String} id The knowledge base id
|
|
368
|
-
* @param {String} docId The document id
|
|
369
|
-
* @param {String} authToken Authentication token
|
|
370
|
-
* @returns {Promise<KnowledgeBaseDocumentContent>}
|
|
371
|
-
*/
|
|
372
|
-
export declare const getDocument: (id: string, docId: string, authToken: string) => Promise<KnowledgeBaseDocumentContent>;
|
|
373
|
-
/**
|
|
374
|
-
* The size a document image is asked in (`getDocumentImage`): its preview (at
|
|
375
|
-
* most 1280 pixels on its longest side, WebP, or the original itself when the
|
|
376
|
-
* platform could not make one) or the full picture as stored.
|
|
377
|
-
*/
|
|
378
|
-
export type DocumentImageSize = "preview" | "full";
|
|
379
|
-
/**
|
|
380
|
-
* Get the picture of one image passage (chunk) of a knowledge base document,
|
|
381
|
-
* for the document's page: a chunk `getDocument` answered with `hasImage`.
|
|
382
|
-
* Its preview unless `size` is "full", which is the stored original (often
|
|
383
|
-
* several MB: ask for it only to show the picture full size). The same access
|
|
384
|
-
* as `getDocument` applies (403), and only while its chunks are shown; 404
|
|
385
|
-
* when the passage has no picture to show. Answered `private, no-cache`, so
|
|
386
|
-
* the platform judges access each time it is asked.
|
|
387
|
-
* GET /api/v1/knowledge-base/:id/documents/:docId/chunks/:chunkId/image[?size=full]
|
|
388
|
-
* @param {String} id The knowledge base id
|
|
389
|
-
* @param {String} docId The document id
|
|
390
|
-
* @param {String} chunkId The image chunk id
|
|
391
|
-
* @param {String} authToken Authentication token
|
|
392
|
-
* @param {DocumentImageSize} size Optional: "full" for the stored original;
|
|
393
|
-
* the preview otherwise
|
|
394
|
-
* @returns {Promise<Blob>} The picture, typed by what it is: the preview is
|
|
395
|
-
* WebP, or the original's own type when no preview could be made; the full
|
|
396
|
-
* picture is the original's type
|
|
397
|
-
*/
|
|
398
|
-
export declare const getDocumentImage: (id: string, docId: string, chunkId: string, authToken: string, size?: DocumentImageSize) => Promise<Blob>;
|
|
399
|
-
/**
|
|
400
|
-
* List the skills a knowledge base's content was labelled with, across its
|
|
401
|
-
* processed documents, most named first: `{ items, total, limit }`, each item
|
|
402
|
-
* `{ name, nameNormalized, scope, proficiencyLevels, documentCount }`, where
|
|
403
|
-
* `scope` is "organization", "general" or null (labelled before skills had one).
|
|
404
|
-
* GET /api/v1/knowledge-base/:id/skills
|
|
405
|
-
* @param {String} id The knowledge base id
|
|
406
|
-
* @param {SkillListParams} params Optional limit
|
|
407
|
-
* @param {String} authToken Authentication token
|
|
408
|
-
* @returns {Promise<object>}
|
|
409
|
-
*/
|
|
410
|
-
export declare const listSkills: (id: string, params: SkillListParams, authToken: string) => Promise<object>;
|
|
411
|
-
/**
|
|
412
|
-
* Set how a knowledge base's skills are named, and rename them on every
|
|
413
|
-
* document and chunk already labelled; every document labelled later takes
|
|
414
|
-
* them too. The mappings replace the ones before; an empty list gives back
|
|
415
|
-
* every skill as labelling named it. Owner or editor only; refused while a sync
|
|
416
|
-
* of one of its sources is under way (409) and for mappings that do not hold —
|
|
417
|
-
* a skill mapped twice, or mappings that lead a skill back to itself (400).
|
|
418
|
-
* PUT /api/v1/knowledge-base/:id/skill-mappings
|
|
419
|
-
* @param {String} id The knowledge base id
|
|
420
|
-
* @param {SkillMapping[]} skillMappings The mappings, `[{ from, to }]`
|
|
421
|
-
* @param {String} authToken Authentication token
|
|
422
|
-
* @returns {Promise<object>} { knowledgeBase, documents, chunks }: the knowledge
|
|
423
|
-
* base with the mappings as stored, and how many documents and chunks were
|
|
424
|
-
* rewritten
|
|
425
|
-
*/
|
|
426
|
-
export declare const setSkillMappings: (id: string, skillMappings: SkillMapping[], authToken: string) => Promise<object>;
|
|
427
|
-
/**
|
|
428
|
-
* What the knowledge bases the caller can open hold about one skill: how many
|
|
429
|
-
* of their documents name it (any spelling, under the names set with Edit
|
|
430
|
-
* skill names), in which knowledge bases, and the microskills their passages
|
|
431
|
-
* cover. The skill and skill template Additional Information dialogs ask it
|
|
432
|
-
* before they offer StackFactor as a data source. Only what the caller may
|
|
433
|
-
* open counts: their role on each knowledge base and each document's source
|
|
434
|
-
* permissions decide. Requires VIEW_KNOWLEDGE_BASE; the name must be 1 to 200
|
|
435
|
-
* characters (400 otherwise).
|
|
436
|
-
* GET /api/v1/knowledge-base/skill-coverage
|
|
437
|
-
* @param {String} skill The skill's or skill template's name
|
|
438
|
-
* @param {String} authToken Authentication token
|
|
439
|
-
* @returns {Promise<SkillCoverage>}
|
|
440
|
-
*/
|
|
441
|
-
export declare const getSkillCoverage: (skill: string, authToken: string) => Promise<SkillCoverage>;
|
|
442
|
-
/**
|
|
443
|
-
* The skill names the knowledge bases the caller can open suggest while a
|
|
444
|
-
* skill's or skill template's name is typed: the skills their documents were
|
|
445
|
-
* classified with whose name has a word starting with what was typed, in any
|
|
446
|
-
* spelling ("gov" suggests "AI Governance"), one per skill, most documents
|
|
447
|
-
* first. Only what the caller may open counts, as for `getSkillCoverage`.
|
|
448
|
-
* Fewer than 2 characters to match answer no suggestions. Requires
|
|
449
|
-
* VIEW_KNOWLEDGE_BASE; `q` is at most 200 characters (400 otherwise).
|
|
450
|
-
* GET /api/v1/knowledge-base/skill-suggestions
|
|
451
|
-
* @param {String} q What was typed
|
|
452
|
-
* @param {SkillSuggestionParams} params Optional limit, catalog and the id of
|
|
453
|
-
* the skill or skill template being edited
|
|
454
|
-
* @param {String} authToken Authentication token
|
|
455
|
-
* @returns {Promise<SkillSuggestion[]>}
|
|
456
|
-
*/
|
|
457
|
-
export declare const getSkillSuggestions: (q: string, params: SkillSuggestionParams | undefined, authToken: string) => Promise<SkillSuggestion[]>;
|
|
458
|
-
/**
|
|
459
|
-
* One of a knowledge base's skills, opened on its page: its microskills, as
|
|
460
|
-
* grouped, each with how many passages teach it, most first, and where the
|
|
461
|
-
* knowledge base's grouping stands (`grouping`). Any spelling of the skill
|
|
462
|
-
* matches. Requires VIEW_KNOWLEDGE_BASE and a role on the knowledge base; the
|
|
463
|
-
* name must be 1 to 200 characters (400 otherwise).
|
|
464
|
-
* GET /api/v1/knowledge-base/:id/skills/micro-skills
|
|
465
|
-
* @param {String} id The knowledge base id
|
|
466
|
-
* @param {String} skill The skill's name
|
|
467
|
-
* @param {String} authToken Authentication token
|
|
468
|
-
* @returns {Promise<KnowledgeBaseMicroSkills>}
|
|
469
|
-
*/
|
|
470
|
-
export declare const listMicroSkills: (id: string, skill: string, authToken: string) => Promise<KnowledgeBaseMicroSkills>;
|
|
471
|
-
/**
|
|
472
|
-
* Where a knowledge base's microskill grouping stands: queued, running or
|
|
473
|
-
* idle, and when the last one ended. What a page polls while a grouping is
|
|
474
|
-
* under way, rather than `listMicroSkills`: the platform reads the knowledge
|
|
475
|
-
* base and nothing else. Requires VIEW_KNOWLEDGE_BASE and a role on the
|
|
476
|
-
* knowledge base.
|
|
477
|
-
* GET /api/v1/knowledge-base/:id/skills/micro-skills/grouping
|
|
478
|
-
* @param {String} id The knowledge base id
|
|
479
|
-
* @param {String} authToken Authentication token
|
|
480
|
-
* @returns {Promise<KnowledgeBaseMicroSkillGrouping>}
|
|
481
|
-
*/
|
|
482
|
-
export declare const getMicroSkillGrouping: (id: string, authToken: string) => Promise<KnowledgeBaseMicroSkillGrouping>;
|
|
483
|
-
/**
|
|
484
|
-
* Group now: groups the knowledge base's skills' passage tags into their
|
|
485
|
-
* microskills, in the background. Owner or editor only, as setting how its
|
|
486
|
-
* skills are named (403 otherwise; 404 for no such knowledge base). Asked
|
|
487
|
-
* while a grouping runs, nothing more is asked: the answer is that it is
|
|
488
|
-
* running. `getMicroSkillGrouping` says when it is done (no longer queued or
|
|
489
|
-
* running). The skills whose grouping failed are sent again now.
|
|
490
|
-
* POST /api/v1/knowledge-base/:id/skills/micro-skills/group
|
|
491
|
-
* @param {String} id The knowledge base id
|
|
492
|
-
* @param {String} authToken Authentication token
|
|
493
|
-
* @returns {Promise<KnowledgeBaseMicroSkillGrouping>} Where the grouping
|
|
494
|
-
* stands: queued or running, and when the last one ended
|
|
495
|
-
*/
|
|
496
|
-
export declare const groupMicroSkills: (id: string, authToken: string) => Promise<KnowledgeBaseMicroSkillGrouping>;
|
|
497
|
-
/**
|
|
498
|
-
* Delete a single document (cascades to chunks + S3 images + dependent entity
|
|
499
|
-
* flags).
|
|
500
|
-
* DELETE /api/v1/knowledge-base/:id/documents/:docId
|
|
501
|
-
* @param {String} id The knowledge base id
|
|
502
|
-
* @param {String} docId The document id
|
|
503
|
-
* @param {String} authToken Authentication token
|
|
504
|
-
* @returns {Promise<object>}
|
|
505
|
-
*/
|
|
506
|
-
export declare const deleteDocument: (id: string, docId: string, authToken: string) => Promise<object>;
|
|
507
|
-
/**
|
|
508
|
-
* List a knowledge base's access entries.
|
|
509
|
-
* GET /api/v1/knowledge-base/:id/access
|
|
510
|
-
* @param {String} id The knowledge base id
|
|
511
|
-
* @param {String} authToken Authentication token
|
|
512
|
-
* @returns {Promise<object>}
|
|
513
|
-
*/
|
|
514
|
-
export declare const listAccess: (id: string, authToken: string) => Promise<object>;
|
|
515
|
-
/**
|
|
516
|
-
* Grant (upsert) an access entry. Owner only. Access is keyed by
|
|
517
|
-
* `(subjectType, subjectId)`, so re-granting a subject that already has an entry
|
|
518
|
-
* updates its role — there is no separate "update role" endpoint.
|
|
519
|
-
* POST /api/v1/knowledge-base/:id/access
|
|
520
|
-
* @param {String} id The knowledge base id
|
|
521
|
-
* @param {AccessEntryInput} entry The `{ subjectType, subjectId, role }` grant
|
|
522
|
-
* @param {String} authToken Authentication token
|
|
523
|
-
* @returns {Promise<object>}
|
|
524
|
-
*/
|
|
525
|
-
export declare const grantAccess: (id: string, entry: AccessEntryInput, authToken: string) => Promise<object>;
|
|
526
|
-
/**
|
|
527
|
-
* Revoke a subject's access. Owner only. Keyed by `(subjectType, subjectId)` — the
|
|
528
|
-
* same composite key `grantAccess` upserts on. The backend refuses to remove the
|
|
529
|
-
* last owner.
|
|
530
|
-
* DELETE /api/v1/knowledge-base/:id/access
|
|
531
|
-
* @param {String} id The knowledge base id
|
|
532
|
-
* @param {String} subjectType One of `KNOWLEDGE_BASE.SUBJECT_TYPE`
|
|
533
|
-
* @param {String} subjectId The subject whose access is revoked
|
|
534
|
-
* @param {String} authToken Authentication token
|
|
535
|
-
* @returns {Promise<object>}
|
|
536
|
-
*/
|
|
537
|
-
export declare const revokeAccess: (id: string, subjectType: string, subjectId: string, authToken: string) => Promise<object>;
|
|
538
|
-
/**
|
|
539
|
-
* Read a knowledge base's redaction policy.
|
|
540
|
-
* GET /api/v1/knowledge-base/:id/redaction-policy
|
|
541
|
-
* @param {String} id The knowledge base id
|
|
542
|
-
* @param {String} authToken Authentication token
|
|
543
|
-
* @returns {Promise<object>}
|
|
544
|
-
*/
|
|
545
|
-
export declare const getRedactionPolicy: (id: string, authToken: string) => Promise<object>;
|
|
546
|
-
/**
|
|
547
|
-
* Set a knowledge base's per-KB redaction behavior + DLP provider.
|
|
548
|
-
* PUT /api/v1/knowledge-base/:id/redaction-policy
|
|
549
|
-
* @param {String} id The knowledge base id
|
|
550
|
-
* @param {object} policy The redaction policy
|
|
551
|
-
* @param {String} authToken Authentication token
|
|
552
|
-
* @returns {Promise<object>}
|
|
553
|
-
*/
|
|
554
|
-
export declare const updateRedactionPolicy: (id: string, policy: object, authToken: string) => Promise<object>;
|
|
555
|
-
/**
|
|
556
|
-
* Read the tenant's compliance profile (admin only). Governs which RAG processors
|
|
557
|
-
* a KB may route to (e.g. HIPAA tenants → BAA-eligible processors only).
|
|
558
|
-
* GET /api/v1/tenants/compliance-profile
|
|
559
|
-
* @param {String} authToken Authentication token
|
|
560
|
-
* @returns {Promise<object>}
|
|
561
|
-
*/
|
|
562
|
-
export declare const getComplianceProfile: (authToken: string) => Promise<object>;
|
|
563
|
-
/**
|
|
564
|
-
* Update the tenant's compliance profile (admin only; not exposed via the KB UI).
|
|
565
|
-
* PUT /api/v1/tenants/compliance-profile
|
|
566
|
-
* @param {object} profile The compliance profile
|
|
567
|
-
* @param {String} authToken Authentication token
|
|
568
|
-
* @returns {Promise<object>}
|
|
569
|
-
*/
|
|
570
|
-
export declare const updateComplianceProfile: (profile: object, authToken: string) => Promise<object>;
|
|
571
|
-
/**
|
|
572
|
-
* Trigger a GDPR subject-purge ("right to be forgotten"; admin only).
|
|
573
|
-
* POST /api/v1/compliance/right-to-be-forgotten
|
|
574
|
-
* @param {object} data The subject-purge request
|
|
575
|
-
* @param {String} authToken Authentication token
|
|
576
|
-
* @returns {Promise<object>}
|
|
577
|
-
*/
|
|
578
|
-
export declare const rightToBeForgotten: (data: object, authToken: string) => Promise<object>;
|
|
579
|
-
/**
|
|
580
|
-
* Overview of all Review Center streams + counts for a knowledge base.
|
|
581
|
-
* GET /api/v1/knowledge-base/:id/review
|
|
582
|
-
* @param {String} id The knowledge base id
|
|
583
|
-
* @param {String} authToken Authentication token
|
|
584
|
-
* @returns {Promise<object>}
|
|
585
|
-
*/
|
|
586
|
-
export declare const getReviewOverview: (id: string, authToken: string) => Promise<object>;
|
|
587
|
-
/**
|
|
588
|
-
* List QUARANTINED documents (Review Center stream 1).
|
|
589
|
-
* GET /api/v1/knowledge-base/:id/review/quarantine
|
|
590
|
-
* @param {String} id The knowledge base id
|
|
591
|
-
* @param {String} authToken Authentication token
|
|
592
|
-
* @returns {Promise<object>}
|
|
593
|
-
*/
|
|
594
|
-
export declare const listQuarantine: (id: string, authToken: string) => Promise<object>;
|
|
595
|
-
/**
|
|
596
|
-
* List the documents released from review (Review Center stream 1): every one
|
|
597
|
-
* released and not held again since, the newest release first, each with
|
|
598
|
-
* `quarantineReleasedAt` and `quarantineReleasedByName` (who released it, or
|
|
599
|
-
* null). Requires RELEASE_QUARANTINE + owner|editor, as the held list does.
|
|
600
|
-
* GET /api/v1/knowledge-base/:id/review/quarantine?state=released
|
|
601
|
-
* @param {String} id The knowledge base id
|
|
602
|
-
* @param {String} authToken Authentication token
|
|
603
|
-
* @returns {Promise<object>}
|
|
604
|
-
*/
|
|
605
|
-
export declare const listReleased: (id: string, authToken: string) => Promise<object>;
|
|
606
|
-
/**
|
|
607
|
-
* Release a quarantined document. Requires RELEASE_QUARANTINE + owner|editor.
|
|
608
|
-
* POST /api/v1/knowledge-base/:id/review/quarantine/:docId/release
|
|
609
|
-
* @param {String} id The knowledge base id
|
|
610
|
-
* @param {String} docId The document id
|
|
611
|
-
* @param {String} authToken Authentication token
|
|
612
|
-
* @returns {Promise<object>}
|
|
613
|
-
*/
|
|
614
|
-
export declare const releaseQuarantine: (id: string, docId: string, authToken: string) => Promise<object>;
|
|
615
|
-
/**
|
|
616
|
-
* Apply a reviewer's decisions to many held documents at once: release each
|
|
617
|
-
* named document back through ingestion, keep it in quarantine as reviewed, or
|
|
618
|
-
* block it from the knowledge base. One run per source released into is asked
|
|
619
|
-
* for, never one per document. Requires RELEASE_QUARANTINE + owner|editor.
|
|
620
|
-
* POST /api/v1/knowledge-base/:id/review/quarantine/decisions
|
|
621
|
-
* @param {String} id The knowledge base id
|
|
622
|
-
* @param {Array<{documentId: string, decision: "release"|"quarantine"|"block", reason?: string}>} decisions One decision per document, at most 500
|
|
623
|
-
* @param {String} authToken Authentication token
|
|
624
|
-
* @returns {Promise<object>} `{ results: [{ documentId, decision, outcome }], runs: [{ sourceId, correlationId, started }] }`
|
|
625
|
-
*/
|
|
626
|
-
export declare const decideQuarantine: (id: string, decisions: Array<{
|
|
627
|
-
documentId: string;
|
|
628
|
-
decision: string;
|
|
629
|
-
reason?: string;
|
|
630
|
-
}>, authToken: string) => Promise<object>;
|
|
631
|
-
/**
|
|
632
|
-
* Re-ingest a quarantined document (optionally with an updated redaction policy).
|
|
633
|
-
* Publishes a kb-source-event (trigger="quarantine_re_ingest"). Requires
|
|
634
|
-
* RELEASE_QUARANTINE + owner.
|
|
635
|
-
* POST /api/v1/knowledge-base/:id/review/quarantine/:docId/re-ingest
|
|
636
|
-
* @param {String} id The knowledge base id
|
|
637
|
-
* @param {String} docId The document id
|
|
638
|
-
* @param {object} data Optional body, e.g. `{ updatedRedactionPolicy }`
|
|
639
|
-
* @param {String} authToken Authentication token
|
|
640
|
-
* @returns {Promise<object>}
|
|
641
|
-
*/
|
|
642
|
-
export declare const reingestQuarantine: (id: string, docId: string, data: object, authToken: string) => Promise<object>;
|
|
643
|
-
/**
|
|
644
|
-
* Delete a quarantined document. Requires RELEASE_QUARANTINE + owner.
|
|
645
|
-
* POST /api/v1/knowledge-base/:id/review/quarantine/:docId/delete
|
|
646
|
-
* @param {String} id The knowledge base id
|
|
647
|
-
* @param {String} docId The document id
|
|
648
|
-
* @param {String} authToken Authentication token
|
|
649
|
-
* @returns {Promise<object>}
|
|
650
|
-
*/
|
|
651
|
-
export declare const deleteQuarantine: (id: string, docId: string, authToken: string) => Promise<object>;
|
|
652
|
-
/**
|
|
653
|
-
* List generated artifacts awaiting review (needsReview=true).
|
|
654
|
-
* Requires GENERATE_FROM_KB + owner|editor.
|
|
655
|
-
* GET /api/v1/knowledge-base/:id/review/generated
|
|
656
|
-
* @param {String} id The knowledge base id
|
|
657
|
-
* @param {String} authToken Authentication token
|
|
658
|
-
* @returns {Promise<object>}
|
|
659
|
-
*/
|
|
660
|
-
export declare const listGeneratedReview: (id: string, authToken: string) => Promise<object>;
|
|
661
|
-
/**
|
|
662
|
-
* Approve a generated artifact. Requires GENERATE_FROM_KB + owner|editor.
|
|
663
|
-
* POST /api/v1/knowledge-base/:id/review/generated/:entityId/approve
|
|
664
|
-
* @param {String} id The knowledge base id
|
|
665
|
-
* @param {String} entityId The artifact/entity id
|
|
666
|
-
* @param {object} data Body `{ entityType, notes? }`
|
|
667
|
-
* @param {String} authToken Authentication token
|
|
668
|
-
* @returns {Promise<object>}
|
|
669
|
-
*/
|
|
670
|
-
export declare const approveGenerated: (id: string, entityId: string, data: object, authToken: string) => Promise<object>;
|
|
671
|
-
/**
|
|
672
|
-
* Approve a generated artifact with edits.
|
|
673
|
-
* Requires GENERATE_FROM_KB + owner|editor.
|
|
674
|
-
* POST /api/v1/knowledge-base/:id/review/generated/:entityId/edit-approve
|
|
675
|
-
* @param {String} id The knowledge base id
|
|
676
|
-
* @param {String} entityId The artifact/entity id
|
|
677
|
-
* @param {object} data Body `{ entityType, edits, notes? }`
|
|
678
|
-
* @param {String} authToken Authentication token
|
|
679
|
-
* @returns {Promise<object>}
|
|
680
|
-
*/
|
|
681
|
-
export declare const editApproveGenerated: (id: string, entityId: string, data: object, authToken: string) => Promise<object>;
|
|
682
|
-
/**
|
|
683
|
-
* Reject a generated artifact. Requires GENERATE_FROM_KB + owner|editor.
|
|
684
|
-
* POST /api/v1/knowledge-base/:id/review/generated/:entityId/reject
|
|
685
|
-
* @param {String} id The knowledge base id
|
|
686
|
-
* @param {String} entityId The artifact/entity id
|
|
687
|
-
* @param {object} data Body `{ entityType, reason }`
|
|
688
|
-
* @param {String} authToken Authentication token
|
|
689
|
-
* @returns {Promise<object>}
|
|
690
|
-
*/
|
|
691
|
-
export declare const rejectGenerated: (id: string, entityId: string, data: object, authToken: string) => Promise<object>;
|
|
692
|
-
/**
|
|
693
|
-
* Regenerate a generated artifact using current chunks.
|
|
694
|
-
* Requires GENERATE_FROM_KB + owner|editor.
|
|
695
|
-
* POST /api/v1/knowledge-base/:id/review/generated/:entityId/regenerate
|
|
696
|
-
* @param {String} id The knowledge base id
|
|
697
|
-
* @param {String} entityId The artifact/entity id
|
|
698
|
-
* @param {object} data Body `{ entityType, regenerationHints? }`
|
|
699
|
-
* @param {String} authToken Authentication token
|
|
700
|
-
* @returns {Promise<object>}
|
|
701
|
-
*/
|
|
702
|
-
export declare const regenerateGenerated: (id: string, entityId: string, data: object, authToken: string) => Promise<object>;
|
|
703
|
-
/**
|
|
704
|
-
* List chunks with non-empty contradictionFlags[].
|
|
705
|
-
* Requires GENERATE_FROM_KB + owner|editor.
|
|
706
|
-
* GET /api/v1/knowledge-base/:id/review/contradictions
|
|
707
|
-
* @param {String} id The knowledge base id
|
|
708
|
-
* @param {String} authToken Authentication token
|
|
709
|
-
* @returns {Promise<object>}
|
|
710
|
-
*/
|
|
711
|
-
export declare const listContradictions: (id: string, authToken: string) => Promise<object>;
|
|
712
|
-
/**
|
|
713
|
-
* Decide a contradiction between two chunks.
|
|
714
|
-
* Requires GENERATE_FROM_KB + owner|editor.
|
|
715
|
-
* POST /api/v1/knowledge-base/:id/review/contradictions/:chunkId/decide
|
|
716
|
-
* @param {String} id The knowledge base id
|
|
717
|
-
* @param {String} chunkId The chunk id carrying the contradiction flag
|
|
718
|
-
* @param {object} data Body `{ decision, otherChunkId, notes }` — `decision` is one
|
|
719
|
-
* of `KNOWLEDGE_BASE.CONTRADICTION_DECISION`
|
|
720
|
-
* @param {String} authToken Authentication token
|
|
721
|
-
* @returns {Promise<object>}
|
|
722
|
-
*/
|
|
723
|
-
export declare const decideContradiction: (id: string, chunkId: string, data: object, authToken: string) => Promise<object>;
|
|
724
|
-
/**
|
|
725
|
-
* Regenerate a stale artifact from a notification using current chunks.
|
|
726
|
-
* POST /api/v1/notifications/:notificationId/artifacts/:artifactId/regenerate
|
|
727
|
-
* @param {String} notificationId The notification id
|
|
728
|
-
* @param {String} artifactId The artifact id
|
|
729
|
-
* @param {object} data Body `{ entityType }`
|
|
730
|
-
* @param {String} authToken Authentication token
|
|
731
|
-
* @returns {Promise<object>}
|
|
732
|
-
*/
|
|
733
|
-
export declare const regenerateArtifact: (notificationId: string, artifactId: string, data: object, authToken: string) => Promise<object>;
|
|
734
|
-
/**
|
|
735
|
-
* Retire (soft-delete) a stale artifact from a notification.
|
|
736
|
-
* POST /api/v1/notifications/:notificationId/artifacts/:artifactId/retire
|
|
737
|
-
* @param {String} notificationId The notification id
|
|
738
|
-
* @param {String} artifactId The artifact id
|
|
739
|
-
* @param {object} data Body `{ entityType }`
|
|
740
|
-
* @param {String} authToken Authentication token
|
|
741
|
-
* @returns {Promise<object>}
|
|
742
|
-
*/
|
|
743
|
-
export declare const retireArtifact: (notificationId: string, artifactId: string, data: object, authToken: string) => Promise<object>;
|
|
744
|
-
/**
|
|
745
|
-
* Dismiss a stale-artifact flag (mark the staleness acceptable).
|
|
746
|
-
* POST /api/v1/notifications/:notificationId/artifacts/:artifactId/dismiss
|
|
747
|
-
* @param {String} notificationId The notification id
|
|
748
|
-
* @param {String} artifactId The artifact id
|
|
749
|
-
* @param {object} data Body `{ entityType, reason? }`
|
|
750
|
-
* @param {String} authToken Authentication token
|
|
751
|
-
* @returns {Promise<object>}
|
|
752
|
-
*/
|
|
753
|
-
export declare const dismissArtifact: (notificationId: string, artifactId: string, data: object, authToken: string) => Promise<object>;
|
|
754
|
-
/**
|
|
755
|
-
* Dismiss an entire out-of-sync notification (all artifacts).
|
|
756
|
-
* POST /api/v1/notifications/:notificationId/dismiss-all
|
|
757
|
-
* @param {String} notificationId The notification id
|
|
758
|
-
* @param {String} authToken Authentication token
|
|
759
|
-
* @returns {Promise<object>}
|
|
760
|
-
*/
|
|
761
|
-
export declare const dismissAllArtifacts: (notificationId: string, authToken: string) => Promise<object>;
|
|
762
|
-
/**
|
|
763
|
-
* List the current user's source-side identities.
|
|
764
|
-
* GET /api/v1/identity/source-mappings
|
|
765
|
-
* @param {String} authToken Authentication token
|
|
766
|
-
* @returns {Promise<object>}
|
|
767
|
-
*/
|
|
768
|
-
export declare const listSourceMappings: (authToken: string) => Promise<object>;
|
|
769
|
-
/**
|
|
770
|
-
* Tenant-admin override for a user's source identity mapping.
|
|
771
|
-
* PUT /api/v1/identity/source-mappings/:sourceType
|
|
772
|
-
* @param {String} sourceType The source type key
|
|
773
|
-
* @param {object} data The mapping override
|
|
774
|
-
* @param {String} authToken Authentication token
|
|
775
|
-
* @returns {Promise<object>}
|
|
776
|
-
*/
|
|
777
|
-
export declare const updateSourceMapping: (sourceType: string, data: object, authToken: string) => Promise<object>;
|
|
778
|
-
/**
|
|
779
|
-
* Bulk-resolve source principal IDs → tenant users (internal / service-to-service).
|
|
780
|
-
* POST /api/v1/identity/source-mappings/resolve
|
|
781
|
-
* @param {object} data Body carrying the principal IDs to resolve
|
|
782
|
-
* @param {String} authToken Authentication token
|
|
783
|
-
* @returns {Promise<object>}
|
|
784
|
-
*/
|
|
785
|
-
export declare const resolveSourceMappings: (data: object, authToken: string) => Promise<object>;
|
|
1
|
+
export * from "./knowledgeBase/knowledgeBases.js";
|
|
2
|
+
export * from "./knowledgeBase/sources.js";
|
|
3
|
+
export * from "./knowledgeBase/documents.js";
|
|
4
|
+
export * from "./knowledgeBase/skills.js";
|
|
5
|
+
export * from "./knowledgeBase/review.js";
|
|
786
6
|
//# sourceMappingURL=knowledgeBase.d.ts.map
|