@magda/minion-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.
Files changed (3) hide show
  1. package/dist/index.d.ts +125 -138
  2. package/dist/index.js +58133 -94050
  3. package/package.json +20 -10
package/dist/index.d.ts CHANGED
@@ -1,34 +1,30 @@
1
- /// <reference types="node" />
2
1
  import express from 'express';
3
- import http = require('http');
4
2
  import { default as URI_2 } from 'urijs';
5
3
  import yargs from 'yargs';
6
4
 
7
5
  /**
8
- * A type of aspect in the registry, unique for a tenant.
9
- */
6
+ * A type of aspect in the registry, unique for a tenant.
7
+ */
10
8
  export declare class AspectDefinition {
11
9
  /**
12
- * The identifier for the aspect type.
13
- */
10
+ * The identifier for the aspect type.
11
+ */
14
12
  'id': string;
15
13
  /**
16
- * The name of the aspect.
17
- */
14
+ * The name of the aspect.
15
+ */
18
16
  'name': string;
19
17
  /**
20
- * The JSON Schema of this aspect.
21
- */
18
+ * The JSON Schema of this aspect.
19
+ */
22
20
  'jsonSchema': any;
23
21
  }
24
22
 
25
23
  declare class AspectDefinitionsApi {
26
24
  protected basePath: string;
27
25
  protected defaultHeaders: any;
28
- protected _useQuerystring: boolean;
29
26
  protected authentications: any;
30
27
  constructor(basePath?: string);
31
- set useQuerystring(value: boolean);
32
28
  setApiKey(key: AspectDefinitionsApiApiKeys, value: string): void;
33
29
  /**
34
30
  * Create a new aspect
@@ -38,7 +34,7 @@ declare class AspectDefinitionsApi {
38
34
  * @param xMagdaSession Magda internal session id
39
35
  */
40
36
  create(xMagdaTenantId: number, aspect: AspectDefinition, xMagdaSession: string): Promise<{
41
- response: http.IncomingMessage;
37
+ response: Response;
42
38
  body: AspectDefinition;
43
39
  }>;
44
40
  /**
@@ -48,7 +44,7 @@ declare class AspectDefinitionsApi {
48
44
  * @param xMagdaSession Magda internal session id
49
45
  */
50
46
  getAll(xMagdaTenantId: number, xMagdaSession?: string): Promise<{
51
- response: http.IncomingMessage;
47
+ response: Response;
52
48
  body: Array<AspectDefinition>;
53
49
  }>;
54
50
  /**
@@ -59,7 +55,7 @@ declare class AspectDefinitionsApi {
59
55
  * @param xMagdaSession Magda internal session id
60
56
  */
61
57
  getById(xMagdaTenantId: number, id: string, xMagdaSession?: string): Promise<{
62
- response: http.IncomingMessage;
58
+ response: Response;
63
59
  body: AspectDefinition;
64
60
  }>;
65
61
  /**
@@ -71,7 +67,7 @@ declare class AspectDefinitionsApi {
71
67
  * @param xMagdaSession Magda internal session id
72
68
  */
73
69
  patchById(xMagdaTenantId: number, id: string, aspectPatch: Array<Operation>, xMagdaSession: string): Promise<{
74
- response: http.IncomingMessage;
70
+ response: Response;
75
71
  body: AspectDefinition;
76
72
  }>;
77
73
  /**
@@ -83,7 +79,7 @@ declare class AspectDefinitionsApi {
83
79
  * @param xMagdaSession Magda internal session id
84
80
  */
85
81
  putById(xMagdaTenantId: number, id: string, aspect: AspectDefinition, xMagdaSession: string): Promise<{
86
- response: http.IncomingMessage;
82
+ response: Response;
87
83
  body: AspectDefinition;
88
84
  }>;
89
85
  }
@@ -122,13 +118,13 @@ export declare interface AuthorizedRegistryOptions extends RegistryOptions {
122
118
  }
123
119
 
124
120
  /**
125
- * Builds an argv object that will accept command line arguments used by all common argv minions.
126
- *
127
- * @param id
128
- * @param defaultPort
129
- * @param defaultInternalUrl
130
- * @param additions
131
- */
121
+ * Builds an argv object that will accept command line arguments used by all common argv minions.
122
+ *
123
+ * @param id
124
+ * @param defaultPort
125
+ * @param defaultInternalUrl
126
+ * @param additions
127
+ */
132
128
  export declare function commonYargs<T extends MinionArguments = MinionArguments>(defaultPort: number, defaultInternalUrl: string, additions?: (a: yargs.Argv<MinionArguments>) => yargs.Argv<T>): T;
133
129
 
134
130
  declare class CountResponse {
@@ -150,26 +146,26 @@ declare interface Eq<T> {
150
146
  }
151
147
 
152
148
  /**
153
- * A page of events.
154
- */
149
+ * A page of events.
150
+ */
155
151
  declare class EventsPage {
156
152
  /**
157
- * Whether there are more events available.
158
- */
153
+ * Whether there are more events available.
154
+ */
159
155
  'hasMore': boolean;
160
156
  /**
161
- * A token to be used to get the next page of events.
162
- */
157
+ * A token to be used to get the next page of events.
158
+ */
163
159
  'nextPageToken': string;
164
160
  /**
165
- * The events in this page.
166
- */
161
+ * The events in this page.
162
+ */
167
163
  'events': Array<RegistryEvent>;
168
164
  }
169
165
 
170
166
  /**
171
- * The type of a registry modification event.
172
- */
167
+ * The type of a registry modification event.
168
+ */
173
169
  declare type EventType = 'CreateRecord' | 'CreateAspectDefinition' | 'CreateRecordAspect' | 'PatchRecord' | 'PatchAspectDefinition' | 'PatchRecordAspect' | 'DeleteRecord' | 'DeleteAspectDefinition' | 'DeleteRecordAspect';
174
170
 
175
171
  declare interface Functor<T> {
@@ -193,7 +189,7 @@ declare class JsValue {
193
189
 
194
190
  declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
195
191
  private type;
196
- private value;
192
+ private value?;
197
193
  constructor(type: MaybeType, value?: T);
198
194
  static sequence<T>(t: {
199
195
  [k: string]: Maybe<T>;
@@ -205,9 +201,11 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
205
201
  }) => Maybe<{
206
202
  [k: string]: any;
207
203
  }>;
208
- static maybe<T>(t: T): Maybe<T>;
204
+ static maybe<T>(t?: T | null): Maybe<T>;
209
205
  static just<T>(t: T): Maybe<T>;
210
206
  static nothing<T>(): Maybe<T>;
207
+ static isJust<T>(t: Maybe<T>): boolean;
208
+ static isNothing<T>(t: Maybe<T>): boolean;
211
209
  unit<U>(u: U): Maybe<U>;
212
210
  bind<U>(f: (t: T) => Maybe<U>): Maybe<U>;
213
211
  of: <U>(u: U) => Maybe<U>;
@@ -221,7 +219,7 @@ declare class Maybe<T> implements Monad<T>, Functor<T>, Eq<Maybe<T>> {
221
219
  valueOr<U extends T>(defaultValue: U): T | U;
222
220
  valueOrCompute<U extends T>(defaultValueFunction: () => U): T | U;
223
221
  valueOrThrow(error?: Error): T;
224
- do(patterns?: OptionalMaybePatterns<T, void>): Maybe<T>;
222
+ do(patterns?: Partial<MaybePatterns<T, void>>): Maybe<T>;
225
223
  }
226
224
 
227
225
  declare interface MaybePatterns<T, U> {
@@ -231,39 +229,41 @@ declare interface MaybePatterns<T, U> {
231
229
 
232
230
  declare enum MaybeType {
233
231
  Nothing = 0,
234
- Just = 1,
232
+ Just = 1
235
233
  }
236
234
 
237
235
  declare function minion(options: MinionOptions): Promise<void>;
238
236
  export default minion;
239
237
 
240
238
  export declare type MinionArguments = {
241
- listenPort: string | number;
242
- internalUrl: string;
243
- jwtSecret: string;
244
- userId: string;
245
- registryUrl: string;
246
- enableMultiTenant: boolean;
247
- tenantUrl: string;
248
- retries: string | number;
249
- crawlerRecordFetchNumber?: string | number;};
239
+ listenPort: string | number;
240
+ internalUrl: string;
241
+ jwtSecret: string;
242
+ userId: string;
243
+ registryUrl: string;
244
+ enableMultiTenant: boolean;
245
+ tenantUrl: string;
246
+ retries: string | number;
247
+ crawlerRecordFetchNumber?: string | number;
248
+ };
250
249
 
251
250
  export declare interface MinionOptions {
252
- argv: MinionArguments;
253
- id: string;
254
- aspects: string[];
255
- optionalAspects: string[];
256
- writeAspectDefs: AspectDefinition[];
257
- async?: boolean;
258
- onRecordFound: onRecordFoundType;
259
- express?: () => express.Express;
260
- maxRetries?: number;
261
- concurrency?: number;
262
- crawlerRecordFetchNumber?: number;
263
- includeEvents?: boolean;
264
- includeRecords?: boolean;
265
- includeAspectDefinitions?: boolean;
266
- dereference?: boolean;}
251
+ argv: MinionArguments;
252
+ id: string;
253
+ aspects: string[];
254
+ optionalAspects: string[];
255
+ writeAspectDefs: AspectDefinition[];
256
+ async?: boolean;
257
+ onRecordFound: onRecordFoundType;
258
+ express?: () => express.Express;
259
+ maxRetries?: number;
260
+ concurrency?: number;
261
+ crawlerRecordFetchNumber?: number;
262
+ includeEvents?: boolean;
263
+ includeRecords?: boolean;
264
+ includeAspectDefinitions?: boolean;
265
+ dereference?: boolean;
266
+ }
267
267
 
268
268
  declare interface Monad<T> {
269
269
  unit<U>(t: U): Monad<U>;
@@ -281,11 +281,6 @@ export declare type onRecordFoundType = (record: Record_2, registry: AuthorizedR
281
281
  declare class Operation {
282
282
  }
283
283
 
284
- declare interface OptionalMaybePatterns<T, U> {
285
- just?: (t: T) => U;
286
- nothing?: () => U;
287
- }
288
-
289
284
  declare class PatchRecordsRequest {
290
285
  'recordIds': Array<string>;
291
286
  'jsonPath': JsonPatch;
@@ -297,28 +292,28 @@ declare class PutRecordsAspectRequest {
297
292
  }
298
293
 
299
294
  /**
300
- * A record in the registry, usually including data for one or more aspects, unique for a tenant.
301
- */
295
+ * A record in the registry, usually including data for one or more aspects, unique for a tenant.
296
+ */
302
297
  declare class Record_2 {
303
298
  /**
304
- * The identifier of the record
305
- */
299
+ * The identifier of the record
300
+ */
306
301
  'id': string;
307
302
  /**
308
- * The name of the record
309
- */
303
+ * The name of the record
304
+ */
310
305
  'name': string;
311
306
  /**
312
- * The aspects included in this record
313
- */
307
+ * The aspects included in this record
308
+ */
314
309
  'aspects': any;
315
310
  /**
316
- * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
317
- */
311
+ * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
312
+ */
318
313
  'sourceTag': string;
319
314
  /**
320
- * The identifier of a tenant
321
- */
315
+ * The identifier of a tenant
316
+ */
322
317
  'tenantId': number;
323
318
  }
324
319
  export { Record_2 as Record }
@@ -326,10 +321,8 @@ export { Record_2 as Record }
326
321
  declare class RecordAspectsApi {
327
322
  protected basePath: string;
328
323
  protected defaultHeaders: any;
329
- protected _useQuerystring: boolean;
330
324
  protected authentications: any;
331
325
  constructor(basePath?: string);
332
- set useQuerystring(value: boolean);
333
326
  setApiKey(key: RecordAspectsApiApiKeys, value: string): void;
334
327
  /**
335
328
  * Delete a record aspect by ID
@@ -340,7 +333,7 @@ declare class RecordAspectsApi {
340
333
  * @param xMagdaTenantId 0
341
334
  */
342
335
  deleteById(recordId: string, aspectId: string, xMagdaSession: string, xMagdaTenantId: number): Promise<{
343
- response: http.IncomingMessage;
336
+ response: Response;
344
337
  body: DeleteResult;
345
338
  }>;
346
339
  /**
@@ -355,7 +348,7 @@ declare class RecordAspectsApi {
355
348
  * @param xMagdaSession Magda internal session id
356
349
  */
357
350
  getAspects(xMagdaTenantId: number, recordId: string, keyword?: string, aspectIdOnly?: boolean, start?: number, limit?: number, xMagdaSession?: string): Promise<{
358
- response: http.IncomingMessage;
351
+ response: Response;
359
352
  body: Array<any>;
360
353
  }>;
361
354
  /**
@@ -367,7 +360,7 @@ declare class RecordAspectsApi {
367
360
  * @param xMagdaSession Magda internal session id
368
361
  */
369
362
  getAspectsCount(xMagdaTenantId: number, recordId: string, keyword?: string, xMagdaSession?: string): Promise<{
370
- response: http.IncomingMessage;
363
+ response: Response;
371
364
  body: CountResponse;
372
365
  }>;
373
366
  /**
@@ -379,7 +372,7 @@ declare class RecordAspectsApi {
379
372
  * @param xMagdaSession Magda internal session id
380
373
  */
381
374
  getById(xMagdaTenantId: number, recordId: string, aspectId: string, xMagdaSession?: string): Promise<{
382
- response: http.IncomingMessage;
375
+ response: Response;
383
376
  body: any;
384
377
  }>;
385
378
  /**
@@ -392,7 +385,7 @@ declare class RecordAspectsApi {
392
385
  * @param xMagdaTenantId 0
393
386
  */
394
387
  patchById(recordId: string, aspectId: string, aspectPatch: Array<Operation>, xMagdaSession: string, xMagdaTenantId: number): Promise<{
395
- response: http.IncomingMessage;
388
+ response: Response;
396
389
  body: any;
397
390
  }>;
398
391
  /**
@@ -406,7 +399,7 @@ declare class RecordAspectsApi {
406
399
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
407
400
  */
408
401
  putById(recordId: string, aspectId: string, aspect: any, xMagdaSession: string, xMagdaTenantId: number, merge?: boolean): Promise<{
409
- response: http.IncomingMessage;
402
+ response: Response;
410
403
  body: any;
411
404
  }>;
412
405
  }
@@ -417,10 +410,8 @@ declare enum RecordAspectsApiApiKeys {
417
410
  declare class RecordHistoryApi {
418
411
  protected basePath: string;
419
412
  protected defaultHeaders: any;
420
- protected _useQuerystring: boolean;
421
413
  protected authentications: any;
422
414
  constructor(basePath?: string);
423
- set useQuerystring(value: boolean);
424
415
  setApiKey(key: RecordHistoryApiApiKeys, value: string): void;
425
416
  /**
426
417
  * Get a list of all events affecting this record
@@ -436,7 +427,7 @@ declare class RecordHistoryApi {
436
427
  * @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 &#x60;true&#x60;, higher pageToken records (newer records) will be returned.
437
428
  */
438
429
  history(xMagdaTenantId: number, recordId: string, xMagdaSession: string, pageToken?: string, start?: number, limit?: number, aspect?: Array<string>, dereference?: boolean, reversePageTokenOrder?: boolean): Promise<{
439
- response: http.IncomingMessage;
430
+ response: Response;
440
431
  body: EventsPage;
441
432
  }>;
442
433
  /**
@@ -447,7 +438,7 @@ declare class RecordHistoryApi {
447
438
  * @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.
448
439
  */
449
440
  version(xMagdaTenantId: number, recordId: string, eventId: string): Promise<{
450
- response: http.IncomingMessage;
441
+ response: Response;
451
442
  body: Record_2;
452
443
  }>;
453
444
  }
@@ -458,10 +449,8 @@ declare enum RecordHistoryApiApiKeys {
458
449
  declare class RecordsApi {
459
450
  protected basePath: string;
460
451
  protected defaultHeaders: any;
461
- protected _useQuerystring: boolean;
462
452
  protected authentications: any;
463
453
  constructor(basePath?: string);
464
- set useQuerystring(value: boolean);
465
454
  setApiKey(key: RecordsApiApiKeys, value: string): void;
466
455
  /**
467
456
  * Create a new record
@@ -471,7 +460,7 @@ declare class RecordsApi {
471
460
  * @param xMagdaSession Magda internal session id
472
461
  */
473
462
  create(xMagdaTenantId: number, record: Record_2, xMagdaSession: string): Promise<{
474
- response: http.IncomingMessage;
463
+ response: Response;
475
464
  body: Record_2;
476
465
  }>;
477
466
  /**
@@ -482,7 +471,7 @@ declare class RecordsApi {
482
471
  * @param xMagdaSession Magda internal session id
483
472
  */
484
473
  deleteById(xMagdaTenantId: number, recordId: string, xMagdaSession: string): Promise<{
485
- response: http.IncomingMessage;
474
+ response: Response;
486
475
  body: DeleteResult;
487
476
  }>;
488
477
  /**
@@ -494,7 +483,7 @@ declare class RecordsApi {
494
483
  * @param xMagdaSession Magda internal session id
495
484
  */
496
485
  deleteRecordsAspectArrayItems(xMagdaTenantId: number, aspectId: string, requestData: DeleteRecordsAspectArrayItemsRequest, xMagdaSession: string): Promise<{
497
- response: http.IncomingMessage;
486
+ response: Response;
498
487
  body: Array<any>;
499
488
  }>;
500
489
  /**
@@ -517,7 +506,7 @@ declare class RecordsApi {
517
506
  * @param xMagdaSession Magda internal session id
518
507
  */
519
508
  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<{
520
- response: http.IncomingMessage;
509
+ response: Response;
521
510
  body: Array<Record_2>;
522
511
  }>;
523
512
  /**
@@ -532,7 +521,7 @@ declare class RecordsApi {
532
521
  * @param xMagdaSession Magda internal session id
533
522
  */
534
523
  getAllSummary(xMagdaTenantId: number, pageToken?: string, start?: number, limit?: number, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
535
- response: http.IncomingMessage;
524
+ response: Response;
536
525
  body: Array<RecordSummary>;
537
526
  }>;
538
527
  /**
@@ -546,7 +535,7 @@ declare class RecordsApi {
546
535
  * @param xMagdaSession Magda internal session id
547
536
  */
548
537
  getById(id: string, xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, dereference?: boolean, xMagdaSession?: string): Promise<{
549
- response: http.IncomingMessage;
538
+ response: Response;
550
539
  body: Record_2;
551
540
  }>;
552
541
  /**
@@ -557,7 +546,7 @@ declare class RecordsApi {
557
546
  * @param xMagdaSession Magda internal session id
558
547
  */
559
548
  getByIdInFull(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
560
- response: http.IncomingMessage;
549
+ response: Response;
561
550
  body: Record_2;
562
551
  }>;
563
552
  /**
@@ -568,7 +557,7 @@ declare class RecordsApi {
568
557
  * @param xMagdaSession Magda internal session id
569
558
  */
570
559
  getByIdSummary(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
571
- response: http.IncomingMessage;
560
+ response: Response;
572
561
  body: RecordSummary;
573
562
  }>;
574
563
  /**
@@ -582,7 +571,7 @@ declare class RecordsApi {
582
571
  * @param xMagdaSession Magda internal session id
583
572
  */
584
573
  getCount(xMagdaTenantId: number, aspect?: Array<string>, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, q?: string, xMagdaSession?: string): Promise<{
585
- response: http.IncomingMessage;
574
+ response: Response;
586
575
  body: CountResponse;
587
576
  }>;
588
577
  /**
@@ -594,7 +583,7 @@ declare class RecordsApi {
594
583
  * @param xMagdaSession Magda internal session id
595
584
  */
596
585
  getPageTokens(xMagdaTenantId: number, aspect?: Array<string>, limit?: number, xMagdaSession?: string): Promise<{
597
- response: http.IncomingMessage;
586
+ response: Response;
598
587
  body: Array<string>;
599
588
  }>;
600
589
  /**
@@ -606,7 +595,7 @@ declare class RecordsApi {
606
595
  * @param xMagdaSession Magda internal session id
607
596
  */
608
597
  patchById(xMagdaTenantId: number, id: string, recordPatch: Array<Operation>, xMagdaSession: string): Promise<{
609
- response: http.IncomingMessage;
598
+ response: Response;
610
599
  body: Record_2;
611
600
  }>;
612
601
  /**
@@ -617,7 +606,7 @@ declare class RecordsApi {
617
606
  * @param xMagdaSession Magda internal session id
618
607
  */
619
608
  patchRecords(xMagdaTenantId: number, requestData: PatchRecordsRequest, xMagdaSession: string): Promise<{
620
- response: http.IncomingMessage;
609
+ response: Response;
621
610
  body: Array<any>;
622
611
  }>;
623
612
  /**
@@ -630,7 +619,7 @@ declare class RecordsApi {
630
619
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
631
620
  */
632
621
  putById(xMagdaTenantId: number, id: string, record: Record_2, xMagdaSession: string, merge?: boolean): Promise<{
633
- response: http.IncomingMessage;
622
+ response: Response;
634
623
  body: Record_2;
635
624
  }>;
636
625
  /**
@@ -643,7 +632,7 @@ declare class RecordsApi {
643
632
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
644
633
  */
645
634
  putRecordsAspect(xMagdaTenantId: number, aspectId: string, requestData: PutRecordsAspectRequest, xMagdaSession: string, merge?: boolean): Promise<{
646
- response: http.IncomingMessage;
635
+ response: Response;
647
636
  body: Array<any>;
648
637
  }>;
649
638
  /**
@@ -655,7 +644,7 @@ declare class RecordsApi {
655
644
  * @param xMagdaSession Magda internal session id
656
645
  */
657
646
  trimBySourceTag(xMagdaTenantId: number, sourceTagToPreserve: string, sourceId: string, xMagdaSession: string): Promise<{
658
- response: http.IncomingMessage;
647
+ response: Response;
659
648
  body: MultipleDeleteResult;
660
649
  }>;
661
650
  }
@@ -671,24 +660,24 @@ declare interface RecordsPage<I extends Record_2> {
671
660
  }
672
661
 
673
662
  /**
674
- * A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
675
- */
663
+ * A summary of a record in the registry. Summaries specify which aspects are available, but do not include data for any aspects.
664
+ */
676
665
  declare class RecordSummary {
677
666
  /**
678
- * The identifier of the record
679
- */
667
+ * The identifier of the record
668
+ */
680
669
  'id': string;
681
670
  /**
682
- * The name of the record
683
- */
671
+ * The name of the record
672
+ */
684
673
  'name': string;
685
674
  /**
686
- * The list of aspect IDs for which this record has data
687
- */
675
+ * The list of aspect IDs for which this record has data
676
+ */
688
677
  'aspects': Array<string>;
689
678
  /**
690
- * The identifier of the tenant
691
- */
679
+ * The identifier of the tenant
680
+ */
692
681
  'tenantId': number;
693
682
  }
694
683
 
@@ -762,30 +751,30 @@ declare class WebHook {
762
751
  }
763
752
 
764
753
  /**
765
- * Asynchronously acknowledges receipt of a web hook notification.
766
- */
754
+ * Asynchronously acknowledges receipt of a web hook notification.
755
+ */
767
756
  declare class WebHookAcknowledgement {
768
757
  /**
769
- * 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.
770
- */
758
+ * 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.
759
+ */
771
760
  'succeeded': boolean;
772
761
  /**
773
- * 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.
774
- */
762
+ * 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.
763
+ */
775
764
  'lastEventIdReceived': any;
776
765
  /**
777
- * Should the webhook be active or inactive?
778
- */
766
+ * Should the webhook be active or inactive?
767
+ */
779
768
  'active': any;
780
769
  }
781
770
 
782
771
  /**
783
- * The response to an asynchronous web hook acknowledgement.
784
- */
772
+ * The response to an asynchronous web hook acknowledgement.
773
+ */
785
774
  declare class WebHookAcknowledgementResponse {
786
775
  /**
787
- * The ID of the last event successfully received by the listener. Further notifications will start after this event.
788
- */
776
+ * The ID of the last event successfully received by the listener. Further notifications will start after this event.
777
+ */
789
778
  'lastEventIdReceived': number;
790
779
  }
791
780
 
@@ -801,10 +790,8 @@ declare class WebHookConfig {
801
790
  declare class WebHooksApi {
802
791
  protected basePath: string;
803
792
  protected defaultHeaders: any;
804
- protected _useQuerystring: boolean;
805
793
  protected authentications: any;
806
794
  constructor(basePath?: string);
807
- set useQuerystring(value: boolean);
808
795
  setApiKey(key: WebHooksApiApiKeys, value: string): void;
809
796
  /**
810
797
  * Acknowledge a previously-deferred web hook
@@ -814,7 +801,7 @@ declare class WebHooksApi {
814
801
  * @param xMagdaSession Magda internal session id
815
802
  */
816
803
  ack(id: string, acknowledgement: WebHookAcknowledgement, xMagdaSession: string): Promise<{
817
- response: http.IncomingMessage;
804
+ response: Response;
818
805
  body: WebHookAcknowledgementResponse;
819
806
  }>;
820
807
  /**
@@ -824,7 +811,7 @@ declare class WebHooksApi {
824
811
  * @param xMagdaSession Magda internal session id
825
812
  */
826
813
  create(hook: WebHook, xMagdaSession: string): Promise<{
827
- response: http.IncomingMessage;
814
+ response: Response;
828
815
  body: WebHook;
829
816
  }>;
830
817
  /**
@@ -834,7 +821,7 @@ declare class WebHooksApi {
834
821
  * @param xMagdaSession Magda internal session id
835
822
  */
836
823
  deleteById(hookId: string, xMagdaSession: string): Promise<{
837
- response: http.IncomingMessage;
824
+ response: Response;
838
825
  body: DeleteResult;
839
826
  }>;
840
827
  /**
@@ -843,7 +830,7 @@ declare class WebHooksApi {
843
830
  * @param xMagdaSession Magda internal session id
844
831
  */
845
832
  getAll(xMagdaSession: string): Promise<{
846
- response: http.IncomingMessage;
833
+ response: Response;
847
834
  body: Array<WebHook>;
848
835
  }>;
849
836
  /**
@@ -853,7 +840,7 @@ declare class WebHooksApi {
853
840
  * @param xMagdaSession Magda internal session id
854
841
  */
855
842
  getById(id: string, xMagdaSession: string): Promise<{
856
- response: http.IncomingMessage;
843
+ response: Response;
857
844
  body: WebHook;
858
845
  }>;
859
846
  /**
@@ -864,7 +851,7 @@ declare class WebHooksApi {
864
851
  * @param xMagdaSession Magda internal session id
865
852
  */
866
853
  putById(id: string, hook: WebHook, xMagdaSession: string): Promise<{
867
- response: http.IncomingMessage;
854
+ response: Response;
868
855
  body: WebHook;
869
856
  }>;
870
857
  }