-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathglossaries.d.ts
1190 lines (1188 loc) · 40.1 KB
/
glossaries.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { A as ApiCallOptions } from './invoke-fetch-types-BXn-uSF5.js';
import './auth-types-PkN9CAF_.js';
/**
* A JSON Patch document as defined in http://tools.ietf.org/html/rfc6902.
*/
type JSONPatch = {
/** The operation to be performed. */
op: "replace";
/** A JSON Pointer. */
path: string;
/** The value to be used for this operation. */
value: string | number;
};
/**
* An array of JSON Patch documents
* @example
* [
* {
* op: "replace",
* path: "/name",
* value: "new name"
* },
* {
* op: "replace",
* path: "/description",
* value: "new description"
* }
* ]
*/
type JSONPatchArray = JSONPatch[];
type AtlanEntity = {
attributes?: AtlanEntityAttributes;
guid?: string;
labels?: string[];
relationshipAttributes?: AtlanRelationshipAttributes;
status?: string;
typeName?: string;
};
type AtlanEntityAttributes = {
abbreviation?: string;
displayText?: string;
examples?: unknown;
guid?: string;
name?: string;
parentCategory?: string;
relationGuid?: string;
relations?: AtlanResourceLink;
usage?: string;
userDescription?: string;
};
/**
* Atlan glossary format. See https://apidocs.atlan.com/
*/
type AtlanGlossary = {
entity?: AtlanEntity;
referredEntities?: AtlanEntity[];
};
type AtlanRelationEntity = {
displayText?: string;
entityStatus?: string;
guid?: string;
typeName?: string;
};
type AtlanRelationshipAttributes = {
antonyms?: AtlanTermHeader;
categories?: AtlanRelationEntity;
classifies?: AtlanTermHeader;
isA?: AtlanTermHeader;
replacedBy?: AtlanTermHeader;
seeAlso?: AtlanTermHeader;
synonyms?: AtlanTermHeader;
terms?: AtlanRelationEntity;
};
type AtlanResourceLink = {
displayName?: string;
url?: string;
};
type AtlanTermHeader = {
description?: string;
displayText?: string;
entityStatus?: string;
expression?: string;
guid?: string;
relationGuid?: string;
steward?: string;
};
type AtlasCategory = {
categoryGuid?: string;
description?: string;
displayText?: string;
parentCategoryGuid?: string;
relationGuid?: string;
};
type AtlasGlossary = {
categories?: AtlasCategory[];
guid?: string;
language?: string;
longDescription?: string;
name?: string;
qualifiedName?: string;
shortDescription?: string;
terms?: AtlasTerm[];
usage?: string;
};
type AtlasTerm = {
description?: string;
displayText?: string;
expression?: string;
relationGuid?: string;
source?: string;
status?: string;
steward?: string;
termGuid?: string;
};
type CategoriesResult = {
data: Category[];
links?: PageLinks;
meta?: ResultMeta;
};
type Category = {
readonly createdAt: string;
readonly createdBy: string;
description: string;
glossaryId: string;
/** The id for resolving updates in future imports/updates.
* Opposed to the id of terms, id on category are not resolved by backend. Any category referred in the category array in terms will have to be identical to the id property of the category. If not, the category reference will be discarded. */
id: string;
name: string;
parentId?: string;
/** This list contains the uids of the stewards of the category. */
stewards?: string[];
readonly updatedAt: string;
/** The uid of the user who last updated the category */
readonly updatedBy: string;
};
type CreateCategory = {
description?: string;
/** The name of the category. May not be identical to another category belonging to the same parent. */
name?: string;
parentId?: string;
/** This list contains the uids of the stewards of the category. */
stewards?: string[];
};
type CreateGlossary = {
/** Description of the glossary */
description?: string;
/** Name of the glossary */
name: string;
/** Overview of the glossary content */
overview?: string;
/** Unique unique identifier of the space to contain the glossary */
spaceId?: string;
/** List of tags for glossary */
tags?: string[];
termTemplate?: TermTemplate;
};
type CreateTerm = {
abbreviation?: string;
/** Category Ids that the term belongs to. NOTE! In case of import the string refers to the index of the category in the import document. */
categories?: string[];
description?: string;
linksTo?: TermCreateLinksTo[];
name: string;
relatedInformation?: string;
relatesTo?: TermRelatesTo[];
/** This list contain the uids for the term's stewards */
stewards?: string[];
tags?: string[];
};
type ErrorResponse = {
errors?: ErrorResponseCode[];
traceId?: string;
};
/**
* ### Custom error codes
* * BG-1 - Context JWT is missing tenantId.
* * BG-2 - Context JWT is missing userId.
* * BG-4 - Invalid or unsupported Content Type. Valid types are: application/json, application/json+qlik, application/json+atlan, application/json+atlas
* * BG-5 - Failed to decode JSON payload.
* * BG-6 - A glossary name is required.
* * BG-7 - Two categories with the same name cannot have the same parent.
* * BG-11 - Glossary validation failed - A value or parameter is invalid or not set
* * BG-12 - Category validation failed - A value or parameter is invalid or not set
* * BG-13 - Term validation failed - A value or parameter is invalid or not set
* * BG-14 - Two or more categories share Id
* * BG-15 - Two or more terms share Id
* * BG-16 - Not detecting proper Atlas format
* * BG-17 - Not detecting proper Atlan format
* * BG-18 - Not detecting proper Qlik format
* * BG-19 - Invalid format in term
* * BG-20 - Duplicate link definition
* * BG-21 - Rich text validation failed
* * BG-22 - Import cancelled
* * BG-23 - Duplicate link related
*/
type ErrorResponseBadRequest = {
errors?: ErrorResponseCode[];
traceId?: string;
};
type ErrorResponseCode = {
code?: string;
detail?: string;
title?: string;
};
/**
* ### Custom error codes
* * BG-3 - Access denied, no read access
* * BG-30 - Feature not enabled on tenant.
*/
type ErrorResponseForbidden = {
errors?: ErrorResponseCode[];
traceId?: string;
};
/**
* ### Custom error codes
* * BG-8 - Glossary not found
* * BG-9 - Category not found
* * BG-10 - Term not found
*/
type ErrorResponseNotFound = {
errors?: ErrorResponseCode[];
traceId?: string;
};
type ExportCategory = {
description?: string;
/** The id for resolving updates in future imports/updates.
* Opposed to the id of terms, id on category are not resolved by backend. Any category referred in the category array in terms will have to be identical to the id property of the category. If not, the category reference will be discarded. */
id?: string;
/** The name of the category. May not be identical to another category belonging to the same parent. */
name?: string;
parentId?: string;
stewardDetails?: StewardDetail[];
};
type ExportGlossary = {
categories?: ExportCategory[];
readonly createdAt?: string;
readonly createdBy?: string;
description?: string;
id?: string;
name?: string;
overview?: string;
ownerId?: string;
spaceId?: string;
tags?: string[];
termTemplate?: TermTemplate;
terms?: ExportTerm[];
readonly updatedAt?: string;
/** The uid of the user who last updated the glossary */
readonly updatedBy?: string;
};
type ExportTerm = {
abbreviation?: string;
/** Categories that the term belongs to. Refers to the `id` property of the category object */
categories?: string[];
description?: string;
/** The id of the term. Used to identify the term in future updates. If not provided, will use the leading 30 chars of the term name and an incremental index */
id?: string;
linksTo?: TermCreateLinksTo[];
name?: string;
owner?: ImportOwner[];
relatesTo?: TermRelatesTo[];
stewardDetails?: StewardDetail[];
stewards?: StewardDetail[];
tags?: string[];
};
type GlossariesResult = {
data?: Glossary[];
links?: PageLinks;
meta?: ResultMeta;
};
type Glossary = {
/** Datetime when the glossary was created */
readonly createdAt: string;
/** Unique identifier of the user who created the glossary */
readonly createdBy: string;
/** Description of the glossary */
description: string;
/** Unique identifier of the glossary */
id: string;
/** Name of the glossary */
name: string;
/** Overview of the glossary contents */
overview: string;
/** The unique identifier of the glossary owner */
ownerId: string;
/** The unique identifier of the space containg the glossary */
spaceId: string;
/** List of tags associated with the glossary. */
tags: string[];
termTemplate: TermTemplate;
/** Datetime when the glossary was updated */
readonly updatedAt: string;
/** The unique identifier of the user who last updated the glossary */
readonly updatedBy: string;
};
type ImportCategory = {
description?: string;
/** The id for resolving updates in future imports/updates.
* Opposed to the id of terms, id on category are not resolved by backend. Any category referred in the category array in terms will have to be identical to the id property of the category. If not, the category reference will be discarded. */
id?: string;
/** The name of the category. May not be identical to another category belonging to the same parent. */
name?: string;
parentId?: string;
stewardDetails?: StewardDetail[];
stewards?: string[];
};
type ImportOwner = {
email?: string;
name?: string;
userId?: string;
};
type ImportTerm = {
abbreviation?: string;
/** Categories that the term belongs to. Refers to the `id` property of the category object */
categories?: string[];
description?: string;
/** The id of the term. Used to identify the term in future updates. If not provided, will use the leading 30 chars of the term name and an incremental index */
id?: string;
linksTo?: TermCreateLinksTo[];
name?: string;
owner?: ImportOwner[];
relatesTo?: TermRelatesTo[];
stewardDetails?: StewardDetail[];
stewards?: StewardDetail[];
tags?: string[];
};
type LinksResult = {
data?: TermLinksTo[];
links?: PageLinks;
meta?: ResultMeta;
};
type PageLink = {
href?: string;
};
type PageLinks = {
next?: PageLink;
prev?: PageLink;
self?: PageLink;
};
type QlikGlossary = {
categories?: ImportCategory[];
description?: string;
name?: string;
overview?: string;
spaceId?: string;
tags?: string[];
termTemplate?: TermTemplate;
terms?: ImportTerm[];
};
type ResultMeta = {
countTotal?: number;
};
type StewardDetail = {
email?: string;
name?: string;
userId?: string;
};
type Term = {
abbreviation?: string;
categories?: string[];
readonly createdAt: string;
readonly createdBy: string;
description: string;
glossaryId: string;
id: string;
linksTo?: TermLinksTo[];
name: string;
relatedInformation: string;
relatesTo?: TermRelatesTo[];
revision: number;
/** Terms status is used determine the status of a term */
status: TermStatus;
/** This list contains the uids of the terms data stewards. */
stewards: string[];
tags: string[];
readonly updatedAt: string;
/** The uid of the user who last updated the term */
readonly updatedBy: string;
};
/**
* Describes links to other data assets such as analytics applications or dataset.
*/
type TermCreateLinksTo = {
resourceId: string;
resourceType: "app" | "dataset";
subResourceId?: string;
subResourceName?: string;
subResourceType?: "master_dimension" | "master_measure" | "field";
type?: "definition" | "related";
};
/**
* Describes links to other entities such as qlik charts, dataset columns etc.
*/
type TermLinksTo = {
readonly createdAt?: string;
createdBy?: string;
id?: string;
name?: string;
openUrl?: string;
/** Different formats based on resource type. Could be e.g. OID or UUID. */
resourceId?: string;
resourceSpaceId?: string;
resourceType?: "app" | "dataset";
/** Http status code for item during batch operation. */
status?: number;
/** Different formats based on subresource type. Could be e.g. OID or UUID. */
subResourceId?: string;
/** Populated and true if no matching subresource is found on parent resource. E.g. if a dataset field no longer exist but a link to that field exists. */
subResourceInvalid?: boolean;
subResourceName?: string;
subResourceType?: "master_dimension" | "master_measure" | "field";
/** Describes reason for item status during batch operation. E.g. why an error occurs during creation. */
title?: string;
type?: "definition" | "related";
};
type TermRelatesTo = {
/** The unique identifier of the related term. NOTE! In case of import the string refers to the index of the term in the import document. */
termId: string;
/** How the term related to the other object */
type: "isA" | "hasA" | "seeAlso" | "synonym" | "antonym" | "classifies" | "other";
};
/**
* Terms status is used determine the status of a term
*/
type TermStatus = {
type: "draft" | "verified" | "deprecated";
/** Time when the state was changed */
updatedAt: string;
/** The unique identifier of the user who last changed the status of the term */
updatedBy: string;
};
type TermTemplate = {
/** Template text for new terms */
relatedInformation?: string;
};
type TermsResult = {
data: Term[];
links?: PageLinks;
meta?: ResultMeta;
};
/**
* Returns all glossaries.
*
* @param query an object with query parameters
* @throws GetGlossariesHttpError
*/
declare const getGlossaries: (query: {
/** Optional parameter to request total count for query */
countTotal?: boolean;
/** The number of glossaries to get. */
limit?: number;
/** Optional parameter to request the next page. */
next?: string;
/** Optional parameter to request the previous page. */
prev?: string;
/** Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. */
sort?: "name" | "+name" | "-name" | "description" | "+description" | "-description";
}, options?: ApiCallOptions) => Promise<GetGlossariesHttpResponse>;
type GetGlossariesHttpResponse = {
data: GlossariesResult;
headers: Headers;
status: 200;
prev?: (options?: ApiCallOptions) => Promise<GetGlossariesHttpResponse>;
next?: (options?: ApiCallOptions) => Promise<GetGlossariesHttpResponse>;
};
type GetGlossariesHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403;
};
/**
* Creates a new glossary. Only a steward can create a glossary.
*
* @param body an object with the body content
* @throws CreateGlossaryHttpError
*/
declare const createGlossary: (body: CreateGlossary, options?: ApiCallOptions) => Promise<CreateGlossaryHttpResponse>;
type CreateGlossaryHttpResponse = {
data: Glossary;
headers: Headers;
status: 201;
};
type CreateGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403;
};
/**
* Creates a new glossary, including categories and terms, based on a glossary definition file.
* Supported formats are currently, qlik, atlan and atlas
*
* @param query an object with query parameters
* @param body an object with the body content
* @throws ImportGlossaryHttpError
*/
declare const importGlossary: (query: {
/** Appending the current importer user as steward to categories/terms where no steward is defined/not match the identity service. */
importerAsFallbackSteward?: boolean;
/** Using email in the steward fields to lookup userIds in the identity service */
lookupUserOnEmail?: boolean;
/** The spaceId (leave blank or omit for personal) */
spaceId?: string;
}, body: QlikGlossary, options?: ApiCallOptions) => Promise<ImportGlossaryHttpResponse>;
type ImportGlossaryHttpResponse = {
data: Glossary;
headers: Headers;
status: 201;
};
type ImportGlossaryHttpError = ImportGlossary400HttpError | ImportGlossary403HttpError | ImportGlossary404HttpError;
type ImportGlossary400HttpError = {
data: ErrorResponseBadRequest;
headers: Headers;
status: 400;
};
type ImportGlossary403HttpError = {
data: ErrorResponseForbidden;
headers: Headers;
status: 403;
};
type ImportGlossary404HttpError = {
data: ErrorResponseNotFound;
headers: Headers;
status: 404;
};
/**
* Deletes a glossary and all of its terms.
*
* @param id The id of the glossary to delete.
* @throws DeleteGlossaryHttpError
*/
declare const deleteGlossary: (id: string, options?: ApiCallOptions) => Promise<DeleteGlossaryHttpResponse>;
type DeleteGlossaryHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type DeleteGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Retrieves a glossary.
*
* @param id The id of the glossary to retrieve.
* @throws GetGlossaryHttpError
*/
declare const getGlossary: (id: string, options?: ApiCallOptions) => Promise<GetGlossaryHttpResponse>;
type GetGlossaryHttpResponse = {
data: Glossary;
headers: Headers;
status: 200;
};
type GetGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Updates glossary properties with json-patch formated data
*
* @param id The glossary id.
* @param body an object with the body content
* @throws PatchGlossaryHttpError
*/
declare const patchGlossary: (id: string, body: JSONPatchArray, options?: ApiCallOptions) => Promise<PatchGlossaryHttpResponse>;
type PatchGlossaryHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type PatchGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 401 | 403 | 404 | 429;
};
/**
* Updates a glossary.
*
* @param id The id of the glossary to update.
* @param body an object with the body content
* @throws UpdateGlossaryHttpError
*/
declare const updateGlossary: (id: string, body: CreateGlossary, options?: ApiCallOptions) => Promise<UpdateGlossaryHttpResponse>;
type UpdateGlossaryHttpResponse = {
data: Glossary;
headers: Headers;
status: 200;
};
type UpdateGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Exports a glossary.
*
* @param id The glossary id.
* @throws ExportGlossaryHttpError
*/
declare const exportGlossary: (id: string, options?: ApiCallOptions) => Promise<ExportGlossaryHttpResponse>;
type ExportGlossaryHttpResponse = {
data: ExportGlossary;
headers: Headers;
status: 200;
};
type ExportGlossaryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Returns a list of categories for a glossary.
*
* @param id The glossary id.
* @param query an object with query parameters
* @throws GetGlossaryCategoriesHttpError
*/
declare const getGlossaryCategories: (id: string, query: {
/** Optional parameter to request total count for query */
countTotal?: boolean;
/** The number of terms to get. */
limit?: number;
/** Optional parameter to request the next page. */
next?: string;
/** Optional parameter to request the previous page. */
prev?: string;
/** Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. */
sort?: "description" | "+description" | "-description" | "name" | "+name" | "-name" | "update" | "+update" | "-update";
}, options?: ApiCallOptions) => Promise<GetGlossaryCategoriesHttpResponse>;
type GetGlossaryCategoriesHttpResponse = {
data: CategoriesResult;
headers: Headers;
status: 200;
prev?: (options?: ApiCallOptions) => Promise<GetGlossaryCategoriesHttpResponse>;
next?: (options?: ApiCallOptions) => Promise<GetGlossaryCategoriesHttpResponse>;
};
type GetGlossaryCategoriesHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Creates a new category.
*
* @param id The glossary id.
* @param body an object with the body content
* @throws CreateGlossaryCategoryHttpError
*/
declare const createGlossaryCategory: (id: string, body: CreateCategory, options?: ApiCallOptions) => Promise<CreateGlossaryCategoryHttpResponse>;
type CreateGlossaryCategoryHttpResponse = {
data: Category;
headers: Headers;
status: 201;
};
type CreateGlossaryCategoryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Deletes a category.
*
* @param id The id of the glossary.
* @param categoryId The id for the category to delete. All subcategories are also deleted
* @throws DeleteGlossaryCategoryHttpError
*/
declare const deleteGlossaryCategory: (id: string, categoryId: string, options?: ApiCallOptions) => Promise<DeleteGlossaryCategoryHttpResponse>;
type DeleteGlossaryCategoryHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type DeleteGlossaryCategoryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Retrieves a category.
*
* @param id The glossary id.
* @param categoryId The category id.
* @throws GetGlossaryCategoryHttpError
*/
declare const getGlossaryCategory: (id: string, categoryId: string, options?: ApiCallOptions) => Promise<GetGlossaryCategoryHttpResponse>;
type GetGlossaryCategoryHttpResponse = {
data: Category;
headers: Headers;
status: 200;
};
type GetGlossaryCategoryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Updates category properties with json-patch formated data
*
* @param id The glossary id.
* @param categoryId The category id.
* @param body an object with the body content
* @throws PatchGlossaryCategoryHttpError
*/
declare const patchGlossaryCategory: (id: string, categoryId: string, body: JSONPatchArray, options?: ApiCallOptions) => Promise<PatchGlossaryCategoryHttpResponse>;
type PatchGlossaryCategoryHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type PatchGlossaryCategoryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 401 | 403 | 404 | 429;
};
/**
* Updates a category.
*
* @param id The glossary id.
* @param categoryId The category id.
* @param body an object with the body content
* @throws UpdateGlossaryCategoryHttpError
*/
declare const updateGlossaryCategory: (id: string, categoryId: string, body: CreateCategory, options?: ApiCallOptions) => Promise<UpdateGlossaryCategoryHttpResponse>;
type UpdateGlossaryCategoryHttpResponse = {
data: Category;
headers: Headers;
status: 200;
};
type UpdateGlossaryCategoryHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Returns a list of terms for a glossary.
*
* @param id The glossary id.
* @param query an object with query parameters
* @throws GetGlossaryTermsHttpError
*/
declare const getGlossaryTerms: (id: string, query: {
/** Optional parameter to request total count for query */
countTotal?: boolean;
/** Optional SCIM filter to be used to filter terms
* Usable fields are
*
* - id
* - name
* - relatedInformation
* - description
* - abbreviation
* - tags
* - stewards
* - status
* - categories */
filter?: string;
/** The number of terms to get. */
limit?: number;
/** Optional parameter to request the next page. */
next?: string;
/** Optional parameter to request the previous page. */
prev?: string;
/** Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. */
sort?: "abbreviation" | "+abbreviation" | "-abbreviation" | "description" | "+description" | "-description" | "name" | "+name" | "-name" | "status" | "+status" | "-status" | "updated" | "+updated" | "-updated";
}, options?: ApiCallOptions) => Promise<GetGlossaryTermsHttpResponse>;
type GetGlossaryTermsHttpResponse = {
data: TermsResult;
headers: Headers;
status: 200;
prev?: (options?: ApiCallOptions) => Promise<GetGlossaryTermsHttpResponse>;
next?: (options?: ApiCallOptions) => Promise<GetGlossaryTermsHttpResponse>;
};
type GetGlossaryTermsHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Creates a new term.
*
* @param id The glossary id.
* @param body an object with the body content
* @throws CreateGlossaryTermHttpError
*/
declare const createGlossaryTerm: (id: string, body: CreateTerm, options?: ApiCallOptions) => Promise<CreateGlossaryTermHttpResponse>;
type CreateGlossaryTermHttpResponse = {
data: Term;
headers: Headers;
status: 201;
};
type CreateGlossaryTermHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Deletes a term.
*
* @param id The glossary id.
* @param termId The term id.
* @throws DeleteGlossaryTermHttpError
*/
declare const deleteGlossaryTerm: (id: string, termId: string, options?: ApiCallOptions) => Promise<DeleteGlossaryTermHttpResponse>;
type DeleteGlossaryTermHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type DeleteGlossaryTermHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Retrieves a term.
*
* @param id The glossary id.
* @param termId The term id.
* @throws GetGlossaryTermHttpError
*/
declare const getGlossaryTerm: (id: string, termId: string, options?: ApiCallOptions) => Promise<GetGlossaryTermHttpResponse>;
type GetGlossaryTermHttpResponse = {
data: Term;
headers: Headers;
status: 200;
};
type GetGlossaryTermHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Updates term properties with json-patch formated data
*
* @param id The glossary id.
* @param termId The term id.
* @param body an object with the body content
* @throws PatchGlossaryTermHttpError
*/
declare const patchGlossaryTerm: (id: string, termId: string, body: JSONPatchArray, options?: ApiCallOptions) => Promise<PatchGlossaryTermHttpResponse>;
type PatchGlossaryTermHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type PatchGlossaryTermHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 401 | 403 | 404 | 412 | 429;
};
/**
* Updates a term.
*
* @param id The glossary id.
* @param termId The term id.
* @param body an object with the body content
* @throws UpdateGlossaryTermHttpError
*/
declare const updateGlossaryTerm: (id: string, termId: string, body: CreateTerm, options?: ApiCallOptions) => Promise<UpdateGlossaryTermHttpResponse>;
type UpdateGlossaryTermHttpResponse = {
data: Term;
headers: Headers;
status: 200;
};
type UpdateGlossaryTermHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404 | 412;
};
/**
* Changes the status of the term. Only a steward can verify a term. Once the term is verified only a steward can modify the term.
*
* @param id The glossary id.
* @param termId The term id.
* @param query an object with query parameters
* @throws ChangeGlossaryTermStatusHttpError
*/
declare const changeGlossaryTermStatus: (id: string, termId: string, query: {
/** The status to update to. */
status: "draft" | "verified" | "deprecated";
}, options?: ApiCallOptions) => Promise<ChangeGlossaryTermStatusHttpResponse>;
type ChangeGlossaryTermStatusHttpResponse = {
data: Term;
headers: Headers;
status: 200;
};
type ChangeGlossaryTermStatusHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404 | 412;
};
/**
* Returns a list of links assigned to a term.
*
* @param id The glossary id.
* @param termId The term id.
* @param query an object with query parameters
* @throws GetGlossaryTermLinksHttpError
*/
declare const getGlossaryTermLinks: (id: string, termId: string, query: {
/** Optional parameter to request total count for query */
countTotal?: boolean;
/** Optional SCIM filter to be used to filter terms */
filter?: string;
/** The number of terms to get. */
limit?: number;
/** Optional parameter to request the next page. */
next?: string;
/** Optional parameter to request the previous page. */
prev?: string;
/** Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. */
sort?: "type" | "+type" | "-type" | "subtype" | "+subtype" | "-subtype" | "created" | "+created" | "-created";
}, options?: ApiCallOptions) => Promise<GetGlossaryTermLinksHttpResponse>;
type GetGlossaryTermLinksHttpResponse = {
data: LinksResult;
headers: Headers;
status: 200;
prev?: (options?: ApiCallOptions) => Promise<GetGlossaryTermLinksHttpResponse>;
next?: (options?: ApiCallOptions) => Promise<GetGlossaryTermLinksHttpResponse>;
};
type GetGlossaryTermLinksHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Creates a new link to a term.
*
* @param id The glossary id.
* @param termId The term id.
* @param body an object with the body content
* @throws CreateGlossaryTermLinkHttpError
*/
declare const createGlossaryTermLink: (id: string, termId: string, body: TermCreateLinksTo, options?: ApiCallOptions) => Promise<CreateGlossaryTermLinkHttpResponse>;
type CreateGlossaryTermLinkHttpResponse = {
data: TermLinksTo;
headers: Headers;
status: 201;
};
type CreateGlossaryTermLinkHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404 | 412;
};
/**
* Retrieves previous revisions of a term.
*
* @param id The glossary id.
* @param termId The term id.
* @param query an object with query parameters
* @throws GetGlossaryTermRevisionsHttpError
*/
declare const getGlossaryTermRevisions: (id: string, termId: string, query: {
/** Optional parameter to request total count for query */
countTotal?: boolean;
/** The number of terms to get. */
limit?: number;
/** Optional parameter to request the next page. */
next?: string;
/** Optional parameter to request the previous page. */
prev?: string;
/** Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending. */
sort?: "update" | "+update" | "-update";
}, options?: ApiCallOptions) => Promise<GetGlossaryTermRevisionsHttpResponse>;
type GetGlossaryTermRevisionsHttpResponse = {
data: TermsResult;
headers: Headers;
status: 200;
prev?: (options?: ApiCallOptions) => Promise<GetGlossaryTermRevisionsHttpResponse>;
next?: (options?: ApiCallOptions) => Promise<GetGlossaryTermRevisionsHttpResponse>;
};
type GetGlossaryTermRevisionsHttpError = {
data: ErrorResponse;
headers: Headers;
status: 400 | 403 | 404;
};
/**
* Clears the cache for glossaries api requests.
*/
declare function clearCache(): void;
interface GlossariesAPI {
/**
* Returns all glossaries.
*
* @param query an object with query parameters
* @throws GetGlossariesHttpError
*/
getGlossaries: typeof getGlossaries;
/**
* Creates a new glossary. Only a steward can create a glossary.
*
* @param body an object with the body content
* @throws CreateGlossaryHttpError
*/
createGlossary: typeof createGlossary;
/**
* Creates a new glossary, including categories and terms, based on a glossary definition file.
* Supported formats are currently, qlik, atlan and atlas