@ndla/types-taxonomy 1.0.20 → 1.0.22
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/build/taxonomy-api.d.ts +43 -0
- package/package.json +1 -1
- package/taxonomy-api.ts +44 -0
package/build/taxonomy-api.d.ts
CHANGED
|
@@ -125,6 +125,10 @@ export interface NodePostPut {
|
|
|
125
125
|
* The node is the root in a context. Default is false. Only used if present.
|
|
126
126
|
*/
|
|
127
127
|
context?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* The language used at create time. Used to set default translation.
|
|
130
|
+
*/
|
|
131
|
+
language?: string;
|
|
128
132
|
/**
|
|
129
133
|
* The name of the node. Required on create.
|
|
130
134
|
*/
|
|
@@ -210,6 +214,45 @@ export interface NodeResourcePUT {
|
|
|
210
214
|
*/
|
|
211
215
|
relevanceId?: string;
|
|
212
216
|
}
|
|
217
|
+
export interface NodeSearchBody {
|
|
218
|
+
/**
|
|
219
|
+
* ContentURIs to fetch for query
|
|
220
|
+
*/
|
|
221
|
+
contentUris?: string[];
|
|
222
|
+
customFields?: Record<string, string>;
|
|
223
|
+
/**
|
|
224
|
+
* Filter out programme contexts
|
|
225
|
+
*/
|
|
226
|
+
filterProgrammes: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Ids to fetch for query
|
|
229
|
+
*/
|
|
230
|
+
ids?: string[];
|
|
231
|
+
/**
|
|
232
|
+
* Include all contexts
|
|
233
|
+
*/
|
|
234
|
+
includeContexts?: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* ISO-639-1 language code
|
|
237
|
+
*/
|
|
238
|
+
language?: string;
|
|
239
|
+
/**
|
|
240
|
+
* Filter by nodeType
|
|
241
|
+
*/
|
|
242
|
+
nodeType?: NodeType[];
|
|
243
|
+
/**
|
|
244
|
+
* Which page to fetch
|
|
245
|
+
*/
|
|
246
|
+
page: number;
|
|
247
|
+
/**
|
|
248
|
+
* How many results to return per page
|
|
249
|
+
*/
|
|
250
|
+
pageSize: number;
|
|
251
|
+
/**
|
|
252
|
+
* Query to search names
|
|
253
|
+
*/
|
|
254
|
+
query?: string;
|
|
255
|
+
}
|
|
213
256
|
export interface NodeWithParents extends Node {
|
|
214
257
|
parents: NodeChild[];
|
|
215
258
|
}
|
package/package.json
CHANGED
package/taxonomy-api.ts
CHANGED
|
@@ -135,6 +135,10 @@ export interface NodePostPut {
|
|
|
135
135
|
* The node is the root in a context. Default is false. Only used if present.
|
|
136
136
|
*/
|
|
137
137
|
context?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* The language used at create time. Used to set default translation.
|
|
140
|
+
*/
|
|
141
|
+
language?: string;
|
|
138
142
|
/**
|
|
139
143
|
* The name of the node. Required on create.
|
|
140
144
|
*/
|
|
@@ -224,6 +228,46 @@ export interface NodeResourcePUT {
|
|
|
224
228
|
relevanceId?: string;
|
|
225
229
|
}
|
|
226
230
|
|
|
231
|
+
export interface NodeSearchBody {
|
|
232
|
+
/**
|
|
233
|
+
* ContentURIs to fetch for query
|
|
234
|
+
*/
|
|
235
|
+
contentUris?: string[];
|
|
236
|
+
customFields?: Record<string, string>;
|
|
237
|
+
/**
|
|
238
|
+
* Filter out programme contexts
|
|
239
|
+
*/
|
|
240
|
+
filterProgrammes: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Ids to fetch for query
|
|
243
|
+
*/
|
|
244
|
+
ids?: string[];
|
|
245
|
+
/**
|
|
246
|
+
* Include all contexts
|
|
247
|
+
*/
|
|
248
|
+
includeContexts?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* ISO-639-1 language code
|
|
251
|
+
*/
|
|
252
|
+
language?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Filter by nodeType
|
|
255
|
+
*/
|
|
256
|
+
nodeType?: NodeType[];
|
|
257
|
+
/**
|
|
258
|
+
* Which page to fetch
|
|
259
|
+
*/
|
|
260
|
+
page: number;
|
|
261
|
+
/**
|
|
262
|
+
* How many results to return per page
|
|
263
|
+
*/
|
|
264
|
+
pageSize: number;
|
|
265
|
+
/**
|
|
266
|
+
* Query to search names
|
|
267
|
+
*/
|
|
268
|
+
query?: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
227
271
|
export interface NodeWithParents extends Node {
|
|
228
272
|
parents: NodeChild[];
|
|
229
273
|
}
|