@magda/registry-client 3.0.0-alpha.0 → 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 +34 -47
  2. package/dist/index.js +6541 -45285
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
-
3
- import http from 'node:http';
4
1
  import { default as URI_2 } from 'urijs';
5
2
 
6
3
  /**
@@ -24,10 +21,8 @@ export declare class AspectDefinition {
24
21
  declare class AspectDefinitionsApi {
25
22
  protected basePath: string;
26
23
  protected defaultHeaders: any;
27
- protected _useQuerystring: boolean;
28
24
  protected authentications: any;
29
25
  constructor(basePath?: string);
30
- set useQuerystring(value: boolean);
31
26
  setApiKey(key: AspectDefinitionsApiApiKeys, value: string): void;
32
27
  /**
33
28
  * Create a new aspect
@@ -37,7 +32,7 @@ declare class AspectDefinitionsApi {
37
32
  * @param xMagdaSession Magda internal session id
38
33
  */
39
34
  create(xMagdaTenantId: number, aspect: AspectDefinition, xMagdaSession: string): Promise<{
40
- response: http.IncomingMessage;
35
+ response: Response;
41
36
  body: AspectDefinition;
42
37
  }>;
43
38
  /**
@@ -47,7 +42,7 @@ declare class AspectDefinitionsApi {
47
42
  * @param xMagdaSession Magda internal session id
48
43
  */
49
44
  getAll(xMagdaTenantId: number, xMagdaSession?: string): Promise<{
50
- response: http.IncomingMessage;
45
+ response: Response;
51
46
  body: Array<AspectDefinition>;
52
47
  }>;
53
48
  /**
@@ -58,7 +53,7 @@ declare class AspectDefinitionsApi {
58
53
  * @param xMagdaSession Magda internal session id
59
54
  */
60
55
  getById(xMagdaTenantId: number, id: string, xMagdaSession?: string): Promise<{
61
- response: http.IncomingMessage;
56
+ response: Response;
62
57
  body: AspectDefinition;
63
58
  }>;
64
59
  /**
@@ -70,7 +65,7 @@ declare class AspectDefinitionsApi {
70
65
  * @param xMagdaSession Magda internal session id
71
66
  */
72
67
  patchById(xMagdaTenantId: number, id: string, aspectPatch: Array<Operation>, xMagdaSession: string): Promise<{
73
- response: http.IncomingMessage;
68
+ response: Response;
74
69
  body: AspectDefinition;
75
70
  }>;
76
71
  /**
@@ -82,7 +77,7 @@ declare class AspectDefinitionsApi {
82
77
  * @param xMagdaSession Magda internal session id
83
78
  */
84
79
  putById(xMagdaTenantId: number, id: string, aspect: AspectDefinition, xMagdaSession: string): Promise<{
85
- response: http.IncomingMessage;
80
+ response: Response;
86
81
  body: AspectDefinition;
87
82
  }>;
88
83
  }
@@ -279,10 +274,8 @@ export { Record_2 as Record }
279
274
  declare class RecordAspectsApi {
280
275
  protected basePath: string;
281
276
  protected defaultHeaders: any;
282
- protected _useQuerystring: boolean;
283
277
  protected authentications: any;
284
278
  constructor(basePath?: string);
285
- set useQuerystring(value: boolean);
286
279
  setApiKey(key: RecordAspectsApiApiKeys, value: string): void;
287
280
  /**
288
281
  * Delete a record aspect by ID
@@ -293,7 +286,7 @@ declare class RecordAspectsApi {
293
286
  * @param xMagdaTenantId 0
294
287
  */
295
288
  deleteById(recordId: string, aspectId: string, xMagdaSession: string, xMagdaTenantId: number): Promise<{
296
- response: http.IncomingMessage;
289
+ response: Response;
297
290
  body: DeleteResult;
298
291
  }>;
299
292
  /**
@@ -308,7 +301,7 @@ declare class RecordAspectsApi {
308
301
  * @param xMagdaSession Magda internal session id
309
302
  */
310
303
  getAspects(xMagdaTenantId: number, recordId: string, keyword?: string, aspectIdOnly?: boolean, start?: number, limit?: number, xMagdaSession?: string): Promise<{
311
- response: http.IncomingMessage;
304
+ response: Response;
312
305
  body: Array<any>;
313
306
  }>;
314
307
  /**
@@ -320,7 +313,7 @@ declare class RecordAspectsApi {
320
313
  * @param xMagdaSession Magda internal session id
321
314
  */
322
315
  getAspectsCount(xMagdaTenantId: number, recordId: string, keyword?: string, xMagdaSession?: string): Promise<{
323
- response: http.IncomingMessage;
316
+ response: Response;
324
317
  body: CountResponse;
325
318
  }>;
326
319
  /**
@@ -332,7 +325,7 @@ declare class RecordAspectsApi {
332
325
  * @param xMagdaSession Magda internal session id
333
326
  */
334
327
  getById(xMagdaTenantId: number, recordId: string, aspectId: string, xMagdaSession?: string): Promise<{
335
- response: http.IncomingMessage;
328
+ response: Response;
336
329
  body: any;
337
330
  }>;
338
331
  /**
@@ -345,7 +338,7 @@ declare class RecordAspectsApi {
345
338
  * @param xMagdaTenantId 0
346
339
  */
347
340
  patchById(recordId: string, aspectId: string, aspectPatch: Array<Operation>, xMagdaSession: string, xMagdaTenantId: number): Promise<{
348
- response: http.IncomingMessage;
341
+ response: Response;
349
342
  body: any;
350
343
  }>;
351
344
  /**
@@ -359,7 +352,7 @@ declare class RecordAspectsApi {
359
352
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
360
353
  */
361
354
  putById(recordId: string, aspectId: string, aspect: any, xMagdaSession: string, xMagdaTenantId: number, merge?: boolean): Promise<{
362
- response: http.IncomingMessage;
355
+ response: Response;
363
356
  body: any;
364
357
  }>;
365
358
  }
@@ -370,10 +363,8 @@ declare enum RecordAspectsApiApiKeys {
370
363
  declare class RecordHistoryApi {
371
364
  protected basePath: string;
372
365
  protected defaultHeaders: any;
373
- protected _useQuerystring: boolean;
374
366
  protected authentications: any;
375
367
  constructor(basePath?: string);
376
- set useQuerystring(value: boolean);
377
368
  setApiKey(key: RecordHistoryApiApiKeys, value: string): void;
378
369
  /**
379
370
  * Get a list of all events affecting this record
@@ -389,7 +380,7 @@ declare class RecordHistoryApi {
389
380
  * @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.
390
381
  */
391
382
  history(xMagdaTenantId: number, recordId: string, xMagdaSession: string, pageToken?: string, start?: number, limit?: number, aspect?: Array<string>, dereference?: boolean, reversePageTokenOrder?: boolean): Promise<{
392
- response: http.IncomingMessage;
383
+ response: Response;
393
384
  body: EventsPage;
394
385
  }>;
395
386
  /**
@@ -400,7 +391,7 @@ declare class RecordHistoryApi {
400
391
  * @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.
401
392
  */
402
393
  version(xMagdaTenantId: number, recordId: string, eventId: string): Promise<{
403
- response: http.IncomingMessage;
394
+ response: Response;
404
395
  body: Record_2;
405
396
  }>;
406
397
  }
@@ -411,10 +402,8 @@ declare enum RecordHistoryApiApiKeys {
411
402
  declare class RecordsApi {
412
403
  protected basePath: string;
413
404
  protected defaultHeaders: any;
414
- protected _useQuerystring: boolean;
415
405
  protected authentications: any;
416
406
  constructor(basePath?: string);
417
- set useQuerystring(value: boolean);
418
407
  setApiKey(key: RecordsApiApiKeys, value: string): void;
419
408
  /**
420
409
  * Create a new record
@@ -424,7 +413,7 @@ declare class RecordsApi {
424
413
  * @param xMagdaSession Magda internal session id
425
414
  */
426
415
  create(xMagdaTenantId: number, record: Record_2, xMagdaSession: string): Promise<{
427
- response: http.IncomingMessage;
416
+ response: Response;
428
417
  body: Record_2;
429
418
  }>;
430
419
  /**
@@ -435,7 +424,7 @@ declare class RecordsApi {
435
424
  * @param xMagdaSession Magda internal session id
436
425
  */
437
426
  deleteById(xMagdaTenantId: number, recordId: string, xMagdaSession: string): Promise<{
438
- response: http.IncomingMessage;
427
+ response: Response;
439
428
  body: DeleteResult;
440
429
  }>;
441
430
  /**
@@ -447,7 +436,7 @@ declare class RecordsApi {
447
436
  * @param xMagdaSession Magda internal session id
448
437
  */
449
438
  deleteRecordsAspectArrayItems(xMagdaTenantId: number, aspectId: string, requestData: DeleteRecordsAspectArrayItemsRequest, xMagdaSession: string): Promise<{
450
- response: http.IncomingMessage;
439
+ response: Response;
451
440
  body: Array<any>;
452
441
  }>;
453
442
  /**
@@ -470,7 +459,7 @@ declare class RecordsApi {
470
459
  * @param xMagdaSession Magda internal session id
471
460
  */
472
461
  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<{
473
- response: http.IncomingMessage;
462
+ response: Response;
474
463
  body: Array<Record_2>;
475
464
  }>;
476
465
  /**
@@ -485,7 +474,7 @@ declare class RecordsApi {
485
474
  * @param xMagdaSession Magda internal session id
486
475
  */
487
476
  getAllSummary(xMagdaTenantId: number, pageToken?: string, start?: number, limit?: number, reversePageTokenOrder?: boolean, q?: string, xMagdaSession?: string): Promise<{
488
- response: http.IncomingMessage;
477
+ response: Response;
489
478
  body: Array<RecordSummary>;
490
479
  }>;
491
480
  /**
@@ -499,7 +488,7 @@ declare class RecordsApi {
499
488
  * @param xMagdaSession Magda internal session id
500
489
  */
501
490
  getById(id: string, xMagdaTenantId: number, aspect?: Array<string>, optionalAspect?: Array<string>, dereference?: boolean, xMagdaSession?: string): Promise<{
502
- response: http.IncomingMessage;
491
+ response: Response;
503
492
  body: Record_2;
504
493
  }>;
505
494
  /**
@@ -510,7 +499,7 @@ declare class RecordsApi {
510
499
  * @param xMagdaSession Magda internal session id
511
500
  */
512
501
  getByIdInFull(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
513
- response: http.IncomingMessage;
502
+ response: Response;
514
503
  body: Record_2;
515
504
  }>;
516
505
  /**
@@ -521,7 +510,7 @@ declare class RecordsApi {
521
510
  * @param xMagdaSession Magda internal session id
522
511
  */
523
512
  getByIdSummary(id: string, xMagdaTenantId: number, xMagdaSession?: string): Promise<{
524
- response: http.IncomingMessage;
513
+ response: Response;
525
514
  body: RecordSummary;
526
515
  }>;
527
516
  /**
@@ -535,7 +524,7 @@ declare class RecordsApi {
535
524
  * @param xMagdaSession Magda internal session id
536
525
  */
537
526
  getCount(xMagdaTenantId: number, aspect?: Array<string>, aspectQuery?: Array<string>, aspectOrQuery?: Array<string>, q?: string, xMagdaSession?: string): Promise<{
538
- response: http.IncomingMessage;
527
+ response: Response;
539
528
  body: CountResponse;
540
529
  }>;
541
530
  /**
@@ -547,7 +536,7 @@ declare class RecordsApi {
547
536
  * @param xMagdaSession Magda internal session id
548
537
  */
549
538
  getPageTokens(xMagdaTenantId: number, aspect?: Array<string>, limit?: number, xMagdaSession?: string): Promise<{
550
- response: http.IncomingMessage;
539
+ response: Response;
551
540
  body: Array<string>;
552
541
  }>;
553
542
  /**
@@ -559,7 +548,7 @@ declare class RecordsApi {
559
548
  * @param xMagdaSession Magda internal session id
560
549
  */
561
550
  patchById(xMagdaTenantId: number, id: string, recordPatch: Array<Operation>, xMagdaSession: string): Promise<{
562
- response: http.IncomingMessage;
551
+ response: Response;
563
552
  body: Record_2;
564
553
  }>;
565
554
  /**
@@ -570,7 +559,7 @@ declare class RecordsApi {
570
559
  * @param xMagdaSession Magda internal session id
571
560
  */
572
561
  patchRecords(xMagdaTenantId: number, requestData: PatchRecordsRequest, xMagdaSession: string): Promise<{
573
- response: http.IncomingMessage;
562
+ response: Response;
574
563
  body: Array<any>;
575
564
  }>;
576
565
  /**
@@ -583,7 +572,7 @@ declare class RecordsApi {
583
572
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
584
573
  */
585
574
  putById(xMagdaTenantId: number, id: string, record: Record_2, xMagdaSession: string, merge?: boolean): Promise<{
586
- response: http.IncomingMessage;
575
+ response: Response;
587
576
  body: Record_2;
588
577
  }>;
589
578
  /**
@@ -596,7 +585,7 @@ declare class RecordsApi {
596
585
  * @param merge Whether merge the supplied aspect data to existing aspect data or replace it
597
586
  */
598
587
  putRecordsAspect(xMagdaTenantId: number, aspectId: string, requestData: PutRecordsAspectRequest, xMagdaSession: string, merge?: boolean): Promise<{
599
- response: http.IncomingMessage;
588
+ response: Response;
600
589
  body: Array<any>;
601
590
  }>;
602
591
  /**
@@ -608,7 +597,7 @@ declare class RecordsApi {
608
597
  * @param xMagdaSession Magda internal session id
609
598
  */
610
599
  trimBySourceTag(xMagdaTenantId: number, sourceTagToPreserve: string, sourceId: string, xMagdaSession: string): Promise<{
611
- response: http.IncomingMessage;
600
+ response: Response;
612
601
  body: MultipleDeleteResult;
613
602
  }>;
614
603
  }
@@ -756,10 +745,8 @@ declare class WebHookConfig {
756
745
  declare class WebHooksApi {
757
746
  protected basePath: string;
758
747
  protected defaultHeaders: any;
759
- protected _useQuerystring: boolean;
760
748
  protected authentications: any;
761
749
  constructor(basePath?: string);
762
- set useQuerystring(value: boolean);
763
750
  setApiKey(key: WebHooksApiApiKeys, value: string): void;
764
751
  /**
765
752
  * Acknowledge a previously-deferred web hook
@@ -769,7 +756,7 @@ declare class WebHooksApi {
769
756
  * @param xMagdaSession Magda internal session id
770
757
  */
771
758
  ack(id: string, acknowledgement: WebHookAcknowledgement, xMagdaSession: string): Promise<{
772
- response: http.IncomingMessage;
759
+ response: Response;
773
760
  body: WebHookAcknowledgementResponse;
774
761
  }>;
775
762
  /**
@@ -779,7 +766,7 @@ declare class WebHooksApi {
779
766
  * @param xMagdaSession Magda internal session id
780
767
  */
781
768
  create(hook: WebHook, xMagdaSession: string): Promise<{
782
- response: http.IncomingMessage;
769
+ response: Response;
783
770
  body: WebHook;
784
771
  }>;
785
772
  /**
@@ -789,7 +776,7 @@ declare class WebHooksApi {
789
776
  * @param xMagdaSession Magda internal session id
790
777
  */
791
778
  deleteById(hookId: string, xMagdaSession: string): Promise<{
792
- response: http.IncomingMessage;
779
+ response: Response;
793
780
  body: DeleteResult;
794
781
  }>;
795
782
  /**
@@ -798,7 +785,7 @@ declare class WebHooksApi {
798
785
  * @param xMagdaSession Magda internal session id
799
786
  */
800
787
  getAll(xMagdaSession: string): Promise<{
801
- response: http.IncomingMessage;
788
+ response: Response;
802
789
  body: Array<WebHook>;
803
790
  }>;
804
791
  /**
@@ -808,7 +795,7 @@ declare class WebHooksApi {
808
795
  * @param xMagdaSession Magda internal session id
809
796
  */
810
797
  getById(id: string, xMagdaSession: string): Promise<{
811
- response: http.IncomingMessage;
798
+ response: Response;
812
799
  body: WebHook;
813
800
  }>;
814
801
  /**
@@ -819,7 +806,7 @@ declare class WebHooksApi {
819
806
  * @param xMagdaSession Magda internal session id
820
807
  */
821
808
  putById(id: string, hook: WebHook, xMagdaSession: string): Promise<{
822
- response: http.IncomingMessage;
809
+ response: Response;
823
810
  body: WebHook;
824
811
  }>;
825
812
  }