@magda/connector-sdk 2.3.3 → 3.0.0-alpha.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/index-web.d.ts +7 -185
- package/dist/index.d.ts +92 -107
- package/dist/index.js +57071 -93460
- package/package.json +20 -15
- package/dist/index-web.js +0 -33304
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import http = require('http');
|
|
3
1
|
import { default as URI_2 } from 'urijs';
|
|
4
2
|
|
|
5
3
|
export declare interface AspectBuilder {
|
|
@@ -15,30 +13,28 @@ declare class AspectCreationFailure {
|
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
|
-
* A type of aspect in the registry, unique for a tenant.
|
|
19
|
-
*/
|
|
16
|
+
* A type of aspect in the registry, unique for a tenant.
|
|
17
|
+
*/
|
|
20
18
|
export declare class AspectDefinition {
|
|
21
19
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
* The identifier for the aspect type.
|
|
21
|
+
*/
|
|
24
22
|
'id': string;
|
|
25
23
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
* The name of the aspect.
|
|
25
|
+
*/
|
|
28
26
|
'name': string;
|
|
29
27
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* The JSON Schema of this aspect.
|
|
29
|
+
*/
|
|
32
30
|
'jsonSchema': any;
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
declare class AspectDefinitionsApi {
|
|
36
34
|
protected basePath: string;
|
|
37
35
|
protected defaultHeaders: any;
|
|
38
|
-
protected _useQuerystring: boolean;
|
|
39
36
|
protected authentications: any;
|
|
40
37
|
constructor(basePath?: string);
|
|
41
|
-
set useQuerystring(value: boolean);
|
|
42
38
|
setApiKey(key: AspectDefinitionsApiApiKeys, value: string): void;
|
|
43
39
|
/**
|
|
44
40
|
* Create a new aspect
|
|
@@ -48,7 +44,7 @@ declare class AspectDefinitionsApi {
|
|
|
48
44
|
* @param xMagdaSession Magda internal session id
|
|
49
45
|
*/
|
|
50
46
|
create(xMagdaTenantId: number, aspect: AspectDefinition, xMagdaSession: string): Promise<{
|
|
51
|
-
response:
|
|
47
|
+
response: Response;
|
|
52
48
|
body: AspectDefinition;
|
|
53
49
|
}>;
|
|
54
50
|
/**
|
|
@@ -58,7 +54,7 @@ declare class AspectDefinitionsApi {
|
|
|
58
54
|
* @param xMagdaSession Magda internal session id
|
|
59
55
|
*/
|
|
60
56
|
getAll(xMagdaTenantId: number, xMagdaSession?: string): Promise<{
|
|
61
|
-
response:
|
|
57
|
+
response: Response;
|
|
62
58
|
body: Array<AspectDefinition>;
|
|
63
59
|
}>;
|
|
64
60
|
/**
|
|
@@ -69,7 +65,7 @@ declare class AspectDefinitionsApi {
|
|
|
69
65
|
* @param xMagdaSession Magda internal session id
|
|
70
66
|
*/
|
|
71
67
|
getById(xMagdaTenantId: number, id: string, xMagdaSession?: string): Promise<{
|
|
72
|
-
response:
|
|
68
|
+
response: Response;
|
|
73
69
|
body: AspectDefinition;
|
|
74
70
|
}>;
|
|
75
71
|
/**
|
|
@@ -81,7 +77,7 @@ declare class AspectDefinitionsApi {
|
|
|
81
77
|
* @param xMagdaSession Magda internal session id
|
|
82
78
|
*/
|
|
83
79
|
patchById(xMagdaTenantId: number, id: string, aspectPatch: Array<Operation>, xMagdaSession: string): Promise<{
|
|
84
|
-
response:
|
|
80
|
+
response: Response;
|
|
85
81
|
body: AspectDefinition;
|
|
86
82
|
}>;
|
|
87
83
|
/**
|
|
@@ -93,7 +89,7 @@ declare class AspectDefinitionsApi {
|
|
|
93
89
|
* @param xMagdaSession Magda internal session id
|
|
94
90
|
*/
|
|
95
91
|
putById(xMagdaTenantId: number, id: string, aspect: AspectDefinition, xMagdaSession: string): Promise<{
|
|
96
|
-
response:
|
|
92
|
+
response: Response;
|
|
97
93
|
body: AspectDefinition;
|
|
98
94
|
}>;
|
|
99
95
|
}
|
|
@@ -362,26 +358,26 @@ declare interface Eq<T> {
|
|
|
362
358
|
}
|
|
363
359
|
|
|
364
360
|
/**
|
|
365
|
-
* A page of events.
|
|
366
|
-
*/
|
|
361
|
+
* A page of events.
|
|
362
|
+
*/
|
|
367
363
|
declare class EventsPage {
|
|
368
364
|
/**
|
|
369
|
-
|
|
370
|
-
|
|
365
|
+
* Whether there are more events available.
|
|
366
|
+
*/
|
|
371
367
|
'hasMore': boolean;
|
|
372
368
|
/**
|
|
373
|
-
|
|
374
|
-
|
|
369
|
+
* A token to be used to get the next page of events.
|
|
370
|
+
*/
|
|
375
371
|
'nextPageToken': string;
|
|
376
372
|
/**
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
* The events in this page.
|
|
374
|
+
*/
|
|
379
375
|
'events': Array<RegistryEvent>;
|
|
380
376
|
}
|
|
381
377
|
|
|
382
378
|
/**
|
|
383
|
-
* The type of a registry modification event.
|
|
384
|
-
*/
|
|
379
|
+
* The type of a registry modification event.
|
|
380
|
+
*/
|
|
385
381
|
declare type EventType = 'CreateRecord' | 'CreateAspectDefinition' | 'CreateRecordAspect' | 'PatchRecord' | 'PatchAspectDefinition' | 'PatchRecordAspect' | 'DeleteRecord' | 'DeleteAspectDefinition' | 'DeleteRecordAspect';
|
|
386
382
|
|
|
387
383
|
declare interface Functor<T> {
|
|
@@ -564,7 +560,7 @@ declare class JsValue {
|
|
|
564
560
|
|
|
565
561
|
declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
566
562
|
private type;
|
|
567
|
-
private value
|
|
563
|
+
private value?;
|
|
568
564
|
constructor(type: MaybeType, value?: T);
|
|
569
565
|
static sequence<T>(t: {
|
|
570
566
|
[k: string]: Maybe<T>;
|
|
@@ -576,9 +572,11 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
576
572
|
}) => Maybe<{
|
|
577
573
|
[k: string]: any;
|
|
578
574
|
}>;
|
|
579
|
-
static maybe<T>(t
|
|
575
|
+
static maybe<T>(t?: T | null): Maybe<T>;
|
|
580
576
|
static just<T>(t: T): Maybe<T>;
|
|
581
577
|
static nothing<T>(): Maybe<T>;
|
|
578
|
+
static isJust<T>(t: Maybe<T>): boolean;
|
|
579
|
+
static isNothing<T>(t: Maybe<T>): boolean;
|
|
582
580
|
unit<U>(u: U): Maybe<U>;
|
|
583
581
|
bind<U>(f: (t: T) => Maybe<U>): Maybe<U>;
|
|
584
582
|
of: <U>(u: U) => Maybe<U>;
|
|
@@ -592,7 +590,7 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
592
590
|
valueOr<U extends T>(defaultValue: U): T | U;
|
|
593
591
|
valueOrCompute<U extends T>(defaultValueFunction: () => U): T | U;
|
|
594
592
|
valueOrThrow(error?: Error): T;
|
|
595
|
-
do(patterns?:
|
|
593
|
+
do(patterns?: Partial<MaybePatterns<T, void>>): Maybe<T>;
|
|
596
594
|
}
|
|
597
595
|
|
|
598
596
|
declare interface MaybePatterns<T, U> {
|
|
@@ -602,7 +600,7 @@ declare interface MaybePatterns<T, U> {
|
|
|
602
600
|
|
|
603
601
|
declare enum MaybeType {
|
|
604
602
|
Nothing = 0,
|
|
605
|
-
Just = 1
|
|
603
|
+
Just = 1
|
|
606
604
|
}
|
|
607
605
|
|
|
608
606
|
declare interface Monad<T> {
|
|
@@ -619,11 +617,6 @@ declare class MultipleDeleteResult {
|
|
|
619
617
|
declare class Operation {
|
|
620
618
|
}
|
|
621
619
|
|
|
622
|
-
declare interface OptionalMaybePatterns<T, U> {
|
|
623
|
-
just?: (t: T) => U;
|
|
624
|
-
nothing?: () => U;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
620
|
declare class PatchRecordsRequest {
|
|
628
621
|
'recordIds': Array<string>;
|
|
629
622
|
'jsonPath': JsonPatch;
|
|
@@ -635,28 +628,28 @@ declare class PutRecordsAspectRequest {
|
|
|
635
628
|
}
|
|
636
629
|
|
|
637
630
|
/**
|
|
638
|
-
* A record in the registry, usually including data for one or more aspects, unique for a tenant.
|
|
639
|
-
*/
|
|
631
|
+
* A record in the registry, usually including data for one or more aspects, unique for a tenant.
|
|
632
|
+
*/
|
|
640
633
|
declare class Record_2 {
|
|
641
634
|
/**
|
|
642
|
-
|
|
643
|
-
|
|
635
|
+
* The identifier of the record
|
|
636
|
+
*/
|
|
644
637
|
'id': string;
|
|
645
638
|
/**
|
|
646
|
-
|
|
647
|
-
|
|
639
|
+
* The name of the record
|
|
640
|
+
*/
|
|
648
641
|
'name': string;
|
|
649
642
|
/**
|
|
650
|
-
|
|
651
|
-
|
|
643
|
+
* The aspects included in this record
|
|
644
|
+
*/
|
|
652
645
|
'aspects': any;
|
|
653
646
|
/**
|
|
654
|
-
|
|
655
|
-
|
|
647
|
+
* A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
|
|
648
|
+
*/
|
|
656
649
|
'sourceTag': string;
|
|
657
650
|
/**
|
|
658
|
-
|
|
659
|
-
|
|
651
|
+
* The identifier of a tenant
|
|
652
|
+
*/
|
|
660
653
|
'tenantId': number;
|
|
661
654
|
}
|
|
662
655
|
export { Record_2 as Record }
|
|
@@ -664,10 +657,8 @@ export { Record_2 as Record }
|
|
|
664
657
|
declare class RecordAspectsApi {
|
|
665
658
|
protected basePath: string;
|
|
666
659
|
protected defaultHeaders: any;
|
|
667
|
-
protected _useQuerystring: boolean;
|
|
668
660
|
protected authentications: any;
|
|
669
661
|
constructor(basePath?: string);
|
|
670
|
-
set useQuerystring(value: boolean);
|
|
671
662
|
setApiKey(key: RecordAspectsApiApiKeys, value: string): void;
|
|
672
663
|
/**
|
|
673
664
|
* Delete a record aspect by ID
|
|
@@ -678,7 +669,7 @@ declare class RecordAspectsApi {
|
|
|
678
669
|
* @param xMagdaTenantId 0
|
|
679
670
|
*/
|
|
680
671
|
deleteById(recordId: string, aspectId: string, xMagdaSession: string, xMagdaTenantId: number): Promise<{
|
|
681
|
-
response:
|
|
672
|
+
response: Response;
|
|
682
673
|
body: DeleteResult;
|
|
683
674
|
}>;
|
|
684
675
|
/**
|
|
@@ -693,7 +684,7 @@ declare class RecordAspectsApi {
|
|
|
693
684
|
* @param xMagdaSession Magda internal session id
|
|
694
685
|
*/
|
|
695
686
|
getAspects(xMagdaTenantId: number, recordId: string, keyword?: string, aspectIdOnly?: boolean, start?: number, limit?: number, xMagdaSession?: string): Promise<{
|
|
696
|
-
response:
|
|
687
|
+
response: Response;
|
|
697
688
|
body: Array<any>;
|
|
698
689
|
}>;
|
|
699
690
|
/**
|
|
@@ -705,7 +696,7 @@ declare class RecordAspectsApi {
|
|
|
705
696
|
* @param xMagdaSession Magda internal session id
|
|
706
697
|
*/
|
|
707
698
|
getAspectsCount(xMagdaTenantId: number, recordId: string, keyword?: string, xMagdaSession?: string): Promise<{
|
|
708
|
-
response:
|
|
699
|
+
response: Response;
|
|
709
700
|
body: CountResponse;
|
|
710
701
|
}>;
|
|
711
702
|
/**
|
|
@@ -717,7 +708,7 @@ declare class RecordAspectsApi {
|
|
|
717
708
|
* @param xMagdaSession Magda internal session id
|
|
718
709
|
*/
|
|
719
710
|
getById(xMagdaTenantId: number, recordId: string, aspectId: string, xMagdaSession?: string): Promise<{
|
|
720
|
-
response:
|
|
711
|
+
response: Response;
|
|
721
712
|
body: any;
|
|
722
713
|
}>;
|
|
723
714
|
/**
|
|
@@ -730,7 +721,7 @@ declare class RecordAspectsApi {
|
|
|
730
721
|
* @param xMagdaTenantId 0
|
|
731
722
|
*/
|
|
732
723
|
patchById(recordId: string, aspectId: string, aspectPatch: Array<Operation>, xMagdaSession: string, xMagdaTenantId: number): Promise<{
|
|
733
|
-
response:
|
|
724
|
+
response: Response;
|
|
734
725
|
body: any;
|
|
735
726
|
}>;
|
|
736
727
|
/**
|
|
@@ -744,7 +735,7 @@ declare class RecordAspectsApi {
|
|
|
744
735
|
* @param merge Whether merge the supplied aspect data to existing aspect data or replace it
|
|
745
736
|
*/
|
|
746
737
|
putById(recordId: string, aspectId: string, aspect: any, xMagdaSession: string, xMagdaTenantId: number, merge?: boolean): Promise<{
|
|
747
|
-
response:
|
|
738
|
+
response: Response;
|
|
748
739
|
body: any;
|
|
749
740
|
}>;
|
|
750
741
|
}
|
|
@@ -764,10 +755,8 @@ declare type RecordFilterFunctionType = (jsonData: any, type: "Dataset" | "Distr
|
|
|
764
755
|
declare class RecordHistoryApi {
|
|
765
756
|
protected basePath: string;
|
|
766
757
|
protected defaultHeaders: any;
|
|
767
|
-
protected _useQuerystring: boolean;
|
|
768
758
|
protected authentications: any;
|
|
769
759
|
constructor(basePath?: string);
|
|
770
|
-
set useQuerystring(value: boolean);
|
|
771
760
|
setApiKey(key: RecordHistoryApiApiKeys, value: string): void;
|
|
772
761
|
/**
|
|
773
762
|
* Get a list of all events affecting this record
|
|
@@ -783,7 +772,7 @@ declare class RecordHistoryApi {
|
|
|
783
772
|
* @param reversePageTokenOrder When pagination via pageToken, by default, records with smaller pageToken (i.e. older records) will be returned first. When this parameter is set to `true`, higher pageToken records (newer records) will be returned.
|
|
784
773
|
*/
|
|
785
774
|
history(xMagdaTenantId: number, recordId: string, xMagdaSession: string, pageToken?: string, start?: number, limit?: number, aspect?: Array<string>, dereference?: boolean, reversePageTokenOrder?: boolean): Promise<{
|
|
786
|
-
response:
|
|
775
|
+
response: Response;
|
|
787
776
|
body: EventsPage;
|
|
788
777
|
}>;
|
|
789
778
|
/**
|
|
@@ -794,7 +783,7 @@ declare class RecordHistoryApi {
|
|
|
794
783
|
* @param eventId The ID of the last event to be applied to the record. The event with this ID need not actually apply to the record, in which case that last event prior to this even that does apply will be used.
|
|
795
784
|
*/
|
|
796
785
|
version(xMagdaTenantId: number, recordId: string, eventId: string): Promise<{
|
|
797
|
-
response:
|
|
786
|
+
response: Response;
|
|
798
787
|
body: Record_2;
|
|
799
788
|
}>;
|
|
800
789
|
}
|
|
@@ -805,10 +794,8 @@ declare enum RecordHistoryApiApiKeys {
|
|
|
805
794
|
declare class RecordsApi {
|
|
806
795
|
protected basePath: string;
|
|
807
796
|
protected defaultHeaders: any;
|
|
808
|
-
protected _useQuerystring: boolean;
|
|
809
797
|
protected authentications: any;
|
|
810
798
|
constructor(basePath?: string);
|
|
811
|
-
set useQuerystring(value: boolean);
|
|
812
799
|
setApiKey(key: RecordsApiApiKeys, value: string): void;
|
|
813
800
|
/**
|
|
814
801
|
* Create a new record
|
|
@@ -818,7 +805,7 @@ declare class RecordsApi {
|
|
|
818
805
|
* @param xMagdaSession Magda internal session id
|
|
819
806
|
*/
|
|
820
807
|
create(xMagdaTenantId: number, record: Record_2, xMagdaSession: string): Promise<{
|
|
821
|
-
response:
|
|
808
|
+
response: Response;
|
|
822
809
|
body: Record_2;
|
|
823
810
|
}>;
|
|
824
811
|
/**
|
|
@@ -829,7 +816,7 @@ declare class RecordsApi {
|
|
|
829
816
|
* @param xMagdaSession Magda internal session id
|
|
830
817
|
*/
|
|
831
818
|
deleteById(xMagdaTenantId: number, recordId: string, xMagdaSession: string): Promise<{
|
|
832
|
-
response:
|
|
819
|
+
response: Response;
|
|
833
820
|
body: DeleteResult;
|
|
834
821
|
}>;
|
|
835
822
|
/**
|
|
@@ -841,7 +828,7 @@ declare class RecordsApi {
|
|
|
841
828
|
* @param xMagdaSession Magda internal session id
|
|
842
829
|
*/
|
|
843
830
|
deleteRecordsAspectArrayItems(xMagdaTenantId: number, aspectId: string, requestData: DeleteRecordsAspectArrayItemsRequest, xMagdaSession: string): Promise<{
|
|
844
|
-
response:
|
|
831
|
+
response: Response;
|
|
845
832
|
body: Array<any>;
|
|
846
833
|
}>;
|
|
847
834
|
/**
|
|
@@ -864,7 +851,7 @@ declare class RecordsApi {
|
|
|
864
851
|
* @param xMagdaSession Magda internal session id
|
|
865
852
|
*/
|
|
866
853
|
getAll(xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, pageToken?: string, start?: number, limit?: number, dereference?: boolean, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, orderBy?: string, orderByDir?: string, orderNullFirst?: boolean, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
|
|
867
|
-
response:
|
|
854
|
+
response: Response;
|
|
868
855
|
body: Array<Record_2>;
|
|
869
856
|
}>;
|
|
870
857
|
/**
|
|
@@ -879,7 +866,7 @@ declare class RecordsApi {
|
|
|
879
866
|
* @param xMagdaSession Magda internal session id
|
|
880
867
|
*/
|
|
881
868
|
getAllSummary(xMagdaTenantId: number, pageToken?: string, start?: number, limit?: number, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
|
|
882
|
-
response:
|
|
869
|
+
response: Response;
|
|
883
870
|
body: Array<RecordSummary>;
|
|
884
871
|
}>;
|
|
885
872
|
/**
|
|
@@ -893,7 +880,7 @@ declare class RecordsApi {
|
|
|
893
880
|
* @param xMagdaSession Magda internal session id
|
|
894
881
|
*/
|
|
895
882
|
getById(id: string, xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, dereference?: boolean, xMagdaSession?: string): Promise<{
|
|
896
|
-
response:
|
|
883
|
+
response: Response;
|
|
897
884
|
body: Record_2;
|
|
898
885
|
}>;
|
|
899
886
|
/**
|
|
@@ -904,7 +891,7 @@ declare class RecordsApi {
|
|
|
904
891
|
* @param xMagdaSession Magda internal session id
|
|
905
892
|
*/
|
|
906
893
|
getByIdInFull(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
|
|
907
|
-
response:
|
|
894
|
+
response: Response;
|
|
908
895
|
body: Record_2;
|
|
909
896
|
}>;
|
|
910
897
|
/**
|
|
@@ -915,7 +902,7 @@ declare class RecordsApi {
|
|
|
915
902
|
* @param xMagdaSession Magda internal session id
|
|
916
903
|
*/
|
|
917
904
|
getByIdSummary(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
|
|
918
|
-
response:
|
|
905
|
+
response: Response;
|
|
919
906
|
body: RecordSummary;
|
|
920
907
|
}>;
|
|
921
908
|
/**
|
|
@@ -929,7 +916,7 @@ declare class RecordsApi {
|
|
|
929
916
|
* @param xMagdaSession Magda internal session id
|
|
930
917
|
*/
|
|
931
918
|
getCount(xMagdaTenantId: number, aspect?: Array<string>, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, q?: string, xMagdaSession?: string): Promise<{
|
|
932
|
-
response:
|
|
919
|
+
response: Response;
|
|
933
920
|
body: CountResponse;
|
|
934
921
|
}>;
|
|
935
922
|
/**
|
|
@@ -941,7 +928,7 @@ declare class RecordsApi {
|
|
|
941
928
|
* @param xMagdaSession Magda internal session id
|
|
942
929
|
*/
|
|
943
930
|
getPageTokens(xMagdaTenantId: number, aspect?: Array<string>, limit?: number, xMagdaSession?: string): Promise<{
|
|
944
|
-
response:
|
|
931
|
+
response: Response;
|
|
945
932
|
body: Array<string>;
|
|
946
933
|
}>;
|
|
947
934
|
/**
|
|
@@ -953,7 +940,7 @@ declare class RecordsApi {
|
|
|
953
940
|
* @param xMagdaSession Magda internal session id
|
|
954
941
|
*/
|
|
955
942
|
patchById(xMagdaTenantId: number, id: string, recordPatch: Array<Operation>, xMagdaSession: string): Promise<{
|
|
956
|
-
response:
|
|
943
|
+
response: Response;
|
|
957
944
|
body: Record_2;
|
|
958
945
|
}>;
|
|
959
946
|
/**
|
|
@@ -964,7 +951,7 @@ declare class RecordsApi {
|
|
|
964
951
|
* @param xMagdaSession Magda internal session id
|
|
965
952
|
*/
|
|
966
953
|
patchRecords(xMagdaTenantId: number, requestData: PatchRecordsRequest, xMagdaSession: string): Promise<{
|
|
967
|
-
response:
|
|
954
|
+
response: Response;
|
|
968
955
|
body: Array<any>;
|
|
969
956
|
}>;
|
|
970
957
|
/**
|
|
@@ -977,7 +964,7 @@ declare class RecordsApi {
|
|
|
977
964
|
* @param merge Whether merge the supplied aspect data to existing aspect data or replace it
|
|
978
965
|
*/
|
|
979
966
|
putById(xMagdaTenantId: number, id: string, record: Record_2, xMagdaSession: string, merge?: boolean): Promise<{
|
|
980
|
-
response:
|
|
967
|
+
response: Response;
|
|
981
968
|
body: Record_2;
|
|
982
969
|
}>;
|
|
983
970
|
/**
|
|
@@ -990,7 +977,7 @@ declare class RecordsApi {
|
|
|
990
977
|
* @param merge Whether merge the supplied aspect data to existing aspect data or replace it
|
|
991
978
|
*/
|
|
992
979
|
putRecordsAspect(xMagdaTenantId: number, aspectId: string, requestData: PutRecordsAspectRequest, xMagdaSession: string, merge?: boolean): Promise<{
|
|
993
|
-
response:
|
|
980
|
+
response: Response;
|
|
994
981
|
body: Array<any>;
|
|
995
982
|
}>;
|
|
996
983
|
/**
|
|
@@ -1002,7 +989,7 @@ declare class RecordsApi {
|
|
|
1002
989
|
* @param xMagdaSession Magda internal session id
|
|
1003
990
|
*/
|
|
1004
991
|
trimBySourceTag(xMagdaTenantId: number, sourceTagToPreserve: string, sourceId: string, xMagdaSession: string): Promise<{
|
|
1005
|
-
response:
|
|
992
|
+
response: Response;
|
|
1006
993
|
body: MultipleDeleteResult;
|
|
1007
994
|
}>;
|
|
1008
995
|
}
|
|
@@ -1018,24 +1005,24 @@ declare interface RecordsPage<I extends Record_2> {
|
|
|
1018
1005
|
}
|
|
1019
1006
|
|
|
1020
1007
|
/**
|
|
1021
|
-
* A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
|
|
1022
|
-
*/
|
|
1008
|
+
* A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
|
|
1009
|
+
*/
|
|
1023
1010
|
declare class RecordSummary {
|
|
1024
1011
|
/**
|
|
1025
|
-
|
|
1026
|
-
|
|
1012
|
+
* The identifier of the record
|
|
1013
|
+
*/
|
|
1027
1014
|
'id': string;
|
|
1028
1015
|
/**
|
|
1029
|
-
|
|
1030
|
-
|
|
1016
|
+
* The name of the record
|
|
1017
|
+
*/
|
|
1031
1018
|
'name': string;
|
|
1032
1019
|
/**
|
|
1033
|
-
|
|
1034
|
-
|
|
1020
|
+
* The list of aspect IDs for which this record has data
|
|
1021
|
+
*/
|
|
1035
1022
|
'aspects': Array<string>;
|
|
1036
1023
|
/**
|
|
1037
|
-
|
|
1038
|
-
|
|
1024
|
+
* The identifier of the tenant
|
|
1025
|
+
*/
|
|
1039
1026
|
'tenantId': number;
|
|
1040
1027
|
}
|
|
1041
1028
|
|
|
@@ -1117,30 +1104,30 @@ declare class WebHook {
|
|
|
1117
1104
|
}
|
|
1118
1105
|
|
|
1119
1106
|
/**
|
|
1120
|
-
* Asynchronously acknowledges receipt of a web hook notification.
|
|
1121
|
-
*/
|
|
1107
|
+
* Asynchronously acknowledges receipt of a web hook notification.
|
|
1108
|
+
*/
|
|
1122
1109
|
declare class WebHookAcknowledgement {
|
|
1123
1110
|
/**
|
|
1124
|
-
|
|
1125
|
-
|
|
1111
|
+
* True if the web hook was received successfully and the listener is ready for further notifications. False if the web hook was not received and the same notification should be repeated.
|
|
1112
|
+
*/
|
|
1126
1113
|
'succeeded': boolean;
|
|
1127
1114
|
/**
|
|
1128
|
-
|
|
1129
|
-
|
|
1115
|
+
* The ID of the last event received by the listener. This should be the value of the `lastEventId` property of the web hook payload that is being acknowledged. This value is ignored if `succeeded` is false.
|
|
1116
|
+
*/
|
|
1130
1117
|
'lastEventIdReceived': any;
|
|
1131
1118
|
/**
|
|
1132
|
-
|
|
1133
|
-
|
|
1119
|
+
* Should the webhook be active or inactive?
|
|
1120
|
+
*/
|
|
1134
1121
|
'active': any;
|
|
1135
1122
|
}
|
|
1136
1123
|
|
|
1137
1124
|
/**
|
|
1138
|
-
* The response to an asynchronous web hook acknowledgement.
|
|
1139
|
-
*/
|
|
1125
|
+
* The response to an asynchronous web hook acknowledgement.
|
|
1126
|
+
*/
|
|
1140
1127
|
declare class WebHookAcknowledgementResponse {
|
|
1141
1128
|
/**
|
|
1142
|
-
|
|
1143
|
-
|
|
1129
|
+
* The ID of the last event successfully received by the listener. Further notifications will start after this event.
|
|
1130
|
+
*/
|
|
1144
1131
|
'lastEventIdReceived': number;
|
|
1145
1132
|
}
|
|
1146
1133
|
|
|
@@ -1156,10 +1143,8 @@ declare class WebHookConfig {
|
|
|
1156
1143
|
declare class WebHooksApi {
|
|
1157
1144
|
protected basePath: string;
|
|
1158
1145
|
protected defaultHeaders: any;
|
|
1159
|
-
protected _useQuerystring: boolean;
|
|
1160
1146
|
protected authentications: any;
|
|
1161
1147
|
constructor(basePath?: string);
|
|
1162
|
-
set useQuerystring(value: boolean);
|
|
1163
1148
|
setApiKey(key: WebHooksApiApiKeys, value: string): void;
|
|
1164
1149
|
/**
|
|
1165
1150
|
* Acknowledge a previously-deferred web hook
|
|
@@ -1169,7 +1154,7 @@ declare class WebHooksApi {
|
|
|
1169
1154
|
* @param xMagdaSession Magda internal session id
|
|
1170
1155
|
*/
|
|
1171
1156
|
ack(id: string, acknowledgement: WebHookAcknowledgement, xMagdaSession: string): Promise<{
|
|
1172
|
-
response:
|
|
1157
|
+
response: Response;
|
|
1173
1158
|
body: WebHookAcknowledgementResponse;
|
|
1174
1159
|
}>;
|
|
1175
1160
|
/**
|
|
@@ -1179,7 +1164,7 @@ declare class WebHooksApi {
|
|
|
1179
1164
|
* @param xMagdaSession Magda internal session id
|
|
1180
1165
|
*/
|
|
1181
1166
|
create(hook: WebHook, xMagdaSession: string): Promise<{
|
|
1182
|
-
response:
|
|
1167
|
+
response: Response;
|
|
1183
1168
|
body: WebHook;
|
|
1184
1169
|
}>;
|
|
1185
1170
|
/**
|
|
@@ -1189,7 +1174,7 @@ declare class WebHooksApi {
|
|
|
1189
1174
|
* @param xMagdaSession Magda internal session id
|
|
1190
1175
|
*/
|
|
1191
1176
|
deleteById(hookId: string, xMagdaSession: string): Promise<{
|
|
1192
|
-
response:
|
|
1177
|
+
response: Response;
|
|
1193
1178
|
body: DeleteResult;
|
|
1194
1179
|
}>;
|
|
1195
1180
|
/**
|
|
@@ -1198,7 +1183,7 @@ declare class WebHooksApi {
|
|
|
1198
1183
|
* @param xMagdaSession Magda internal session id
|
|
1199
1184
|
*/
|
|
1200
1185
|
getAll(xMagdaSession: string): Promise<{
|
|
1201
|
-
response:
|
|
1186
|
+
response: Response;
|
|
1202
1187
|
body: Array<WebHook>;
|
|
1203
1188
|
}>;
|
|
1204
1189
|
/**
|
|
@@ -1208,7 +1193,7 @@ declare class WebHooksApi {
|
|
|
1208
1193
|
* @param xMagdaSession Magda internal session id
|
|
1209
1194
|
*/
|
|
1210
1195
|
getById(id: string, xMagdaSession: string): Promise<{
|
|
1211
|
-
response:
|
|
1196
|
+
response: Response;
|
|
1212
1197
|
body: WebHook;
|
|
1213
1198
|
}>;
|
|
1214
1199
|
/**
|
|
@@ -1219,7 +1204,7 @@ declare class WebHooksApi {
|
|
|
1219
1204
|
* @param xMagdaSession Magda internal session id
|
|
1220
1205
|
*/
|
|
1221
1206
|
putById(id: string, hook: WebHook, xMagdaSession: string): Promise<{
|
|
1222
|
-
response:
|
|
1207
|
+
response: Response;
|
|
1223
1208
|
body: WebHook;
|
|
1224
1209
|
}>;
|
|
1225
1210
|
}
|