@magda/registry-client 2.3.3 → 3.0.0-alpha.0
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.d.ts +60 -62
- package/dist/index.js +53485 -42950
- package/package.json +18 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import http from 'node:http';
|
|
3
4
|
import { default as URI_2 } from 'urijs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* A type of aspect in the registry, unique for a tenant.
|
|
7
|
-
*/
|
|
7
|
+
* A type of aspect in the registry, unique for a tenant.
|
|
8
|
+
*/
|
|
8
9
|
export declare class AspectDefinition {
|
|
9
10
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
* The identifier for the aspect type.
|
|
12
|
+
*/
|
|
12
13
|
'id': string;
|
|
13
14
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
* The name of the aspect.
|
|
16
|
+
*/
|
|
16
17
|
'name': string;
|
|
17
18
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
* The JSON Schema of this aspect.
|
|
20
|
+
*/
|
|
20
21
|
'jsonSchema': any;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -138,26 +139,26 @@ declare interface Eq<T> {
|
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
/**
|
|
141
|
-
* A page of events.
|
|
142
|
-
*/
|
|
142
|
+
* A page of events.
|
|
143
|
+
*/
|
|
143
144
|
declare class EventsPage {
|
|
144
145
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
* Whether there are more events available.
|
|
147
|
+
*/
|
|
147
148
|
'hasMore': boolean;
|
|
148
149
|
/**
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
* A token to be used to get the next page of events.
|
|
151
|
+
*/
|
|
151
152
|
'nextPageToken': string;
|
|
152
153
|
/**
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
* The events in this page.
|
|
155
|
+
*/
|
|
155
156
|
'events': Array<RegistryEvent>;
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
/**
|
|
159
|
-
* The type of a registry modification event.
|
|
160
|
-
*/
|
|
160
|
+
* The type of a registry modification event.
|
|
161
|
+
*/
|
|
161
162
|
export declare type EventType = 'CreateRecord' | 'CreateAspectDefinition' | 'CreateRecordAspect' | 'PatchRecord' | 'PatchAspectDefinition' | 'PatchRecordAspect' | 'DeleteRecord' | 'DeleteAspectDefinition' | 'DeleteRecordAspect';
|
|
162
163
|
|
|
163
164
|
declare interface Functor<T> {
|
|
@@ -181,7 +182,7 @@ declare class JsValue {
|
|
|
181
182
|
|
|
182
183
|
declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
183
184
|
private type;
|
|
184
|
-
private value
|
|
185
|
+
private value?;
|
|
185
186
|
constructor(type: MaybeType, value?: T);
|
|
186
187
|
static sequence<T>(t: {
|
|
187
188
|
[k: string]: Maybe<T>;
|
|
@@ -193,9 +194,11 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
193
194
|
}) => Maybe<{
|
|
194
195
|
[k: string]: any;
|
|
195
196
|
}>;
|
|
196
|
-
static maybe<T>(t
|
|
197
|
+
static maybe<T>(t?: T | null): Maybe<T>;
|
|
197
198
|
static just<T>(t: T): Maybe<T>;
|
|
198
199
|
static nothing<T>(): Maybe<T>;
|
|
200
|
+
static isJust<T>(t: Maybe<T>): boolean;
|
|
201
|
+
static isNothing<T>(t: Maybe<T>): boolean;
|
|
199
202
|
unit<U>(u: U): Maybe<U>;
|
|
200
203
|
bind<U>(f: (t: T) => Maybe<U>): Maybe<U>;
|
|
201
204
|
of: <U>(u: U) => Maybe<U>;
|
|
@@ -209,7 +212,7 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
|
|
|
209
212
|
valueOr<U extends T>(defaultValue: U): T | U;
|
|
210
213
|
valueOrCompute<U extends T>(defaultValueFunction: () => U): T | U;
|
|
211
214
|
valueOrThrow(error?: Error): T;
|
|
212
|
-
do(patterns?:
|
|
215
|
+
do(patterns?: Partial<MaybePatterns<T, void>>): Maybe<T>;
|
|
213
216
|
}
|
|
214
217
|
|
|
215
218
|
declare interface MaybePatterns<T, U> {
|
|
@@ -219,7 +222,7 @@ declare interface MaybePatterns<T, U> {
|
|
|
219
222
|
|
|
220
223
|
declare enum MaybeType {
|
|
221
224
|
Nothing = 0,
|
|
222
|
-
Just = 1
|
|
225
|
+
Just = 1
|
|
223
226
|
}
|
|
224
227
|
|
|
225
228
|
declare interface Monad<T> {
|
|
@@ -236,11 +239,6 @@ declare class MultipleDeleteResult {
|
|
|
236
239
|
declare class Operation {
|
|
237
240
|
}
|
|
238
241
|
|
|
239
|
-
declare interface OptionalMaybePatterns<T, U> {
|
|
240
|
-
just?: (t: T) => U;
|
|
241
|
-
nothing?: () => U;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
242
|
declare class PatchRecordsRequest {
|
|
245
243
|
'recordIds': Array<string>;
|
|
246
244
|
'jsonPath': JsonPatch;
|
|
@@ -252,28 +250,28 @@ declare class PutRecordsAspectRequest {
|
|
|
252
250
|
}
|
|
253
251
|
|
|
254
252
|
/**
|
|
255
|
-
* A record in the registry, usually including data for one or more aspects, unique for a tenant.
|
|
256
|
-
*/
|
|
253
|
+
* A record in the registry, usually including data for one or more aspects, unique for a tenant.
|
|
254
|
+
*/
|
|
257
255
|
declare class Record_2 {
|
|
258
256
|
/**
|
|
259
|
-
|
|
260
|
-
|
|
257
|
+
* The identifier of the record
|
|
258
|
+
*/
|
|
261
259
|
'id': string;
|
|
262
260
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
261
|
+
* The name of the record
|
|
262
|
+
*/
|
|
265
263
|
'name': string;
|
|
266
264
|
/**
|
|
267
|
-
|
|
268
|
-
|
|
265
|
+
* The aspects included in this record
|
|
266
|
+
*/
|
|
269
267
|
'aspects': any;
|
|
270
268
|
/**
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
* A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
|
|
270
|
+
*/
|
|
273
271
|
'sourceTag': string;
|
|
274
272
|
/**
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
* The identifier of a tenant
|
|
274
|
+
*/
|
|
277
275
|
'tenantId': number;
|
|
278
276
|
}
|
|
279
277
|
export { Record_2 as Record }
|
|
@@ -626,24 +624,24 @@ declare interface RecordsPage<I extends Record_2> {
|
|
|
626
624
|
}
|
|
627
625
|
|
|
628
626
|
/**
|
|
629
|
-
* A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
|
|
630
|
-
*/
|
|
627
|
+
* A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
|
|
628
|
+
*/
|
|
631
629
|
declare class RecordSummary {
|
|
632
630
|
/**
|
|
633
|
-
|
|
634
|
-
|
|
631
|
+
* The identifier of the record
|
|
632
|
+
*/
|
|
635
633
|
'id': string;
|
|
636
634
|
/**
|
|
637
|
-
|
|
638
|
-
|
|
635
|
+
* The name of the record
|
|
636
|
+
*/
|
|
639
637
|
'name': string;
|
|
640
638
|
/**
|
|
641
|
-
|
|
642
|
-
|
|
639
|
+
* The list of aspect IDs for which this record has data
|
|
640
|
+
*/
|
|
643
641
|
'aspects': Array<string>;
|
|
644
642
|
/**
|
|
645
|
-
|
|
646
|
-
|
|
643
|
+
* The identifier of the tenant
|
|
644
|
+
*/
|
|
647
645
|
'tenantId': number;
|
|
648
646
|
}
|
|
649
647
|
|
|
@@ -719,30 +717,30 @@ export declare class WebHook {
|
|
|
719
717
|
}
|
|
720
718
|
|
|
721
719
|
/**
|
|
722
|
-
* Asynchronously acknowledges receipt of a web hook notification.
|
|
723
|
-
*/
|
|
720
|
+
* Asynchronously acknowledges receipt of a web hook notification.
|
|
721
|
+
*/
|
|
724
722
|
declare class WebHookAcknowledgement {
|
|
725
723
|
/**
|
|
726
|
-
|
|
727
|
-
|
|
724
|
+
* 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.
|
|
725
|
+
*/
|
|
728
726
|
'succeeded': boolean;
|
|
729
727
|
/**
|
|
730
|
-
|
|
731
|
-
|
|
728
|
+
* 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.
|
|
729
|
+
*/
|
|
732
730
|
'lastEventIdReceived': any;
|
|
733
731
|
/**
|
|
734
|
-
|
|
735
|
-
|
|
732
|
+
* Should the webhook be active or inactive?
|
|
733
|
+
*/
|
|
736
734
|
'active': any;
|
|
737
735
|
}
|
|
738
736
|
|
|
739
737
|
/**
|
|
740
|
-
* The response to an asynchronous web hook acknowledgement.
|
|
741
|
-
*/
|
|
738
|
+
* The response to an asynchronous web hook acknowledgement.
|
|
739
|
+
*/
|
|
742
740
|
declare class WebHookAcknowledgementResponse {
|
|
743
741
|
/**
|
|
744
|
-
|
|
745
|
-
|
|
742
|
+
* The ID of the last event successfully received by the listener. Further notifications will start after this event.
|
|
743
|
+
*/
|
|
746
744
|
'lastEventIdReceived': number;
|
|
747
745
|
}
|
|
748
746
|
|