@magda/minion-sdk 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 +15317 -52297
  3. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- /// <reference types="node" />
2
-
3
1
  import express from 'express';
4
- import http from 'node:http';
5
2
  import { default as URI_2 } from 'urijs';
6
3
  import yargs from 'yargs';
7
4
 
@@ -26,10 +23,8 @@ export declare class AspectDefinition {
26
23
  declare class AspectDefinitionsApi {
27
24
  protected basePath: string;
28
25
  protected defaultHeaders: any;
29
- protected _useQuerystring: boolean;
30
26
  protected authentications: any;
31
27
  constructor(basePath?: string);
32
- set useQuerystring(value: boolean);
33
28
  setApiKey(key: AspectDefinitionsApiApiKeys, value: string): void;
34
29
  /**
35
30
  * Create a new aspect
@@ -39,7 +34,7 @@ declare class AspectDefinitionsApi {
39
34
  * @param xMagdaSession Magda internal session id
40
35
  */
41
36
  create(xMagdaTenantId: number, aspect: AspectDefinition, xMagdaSession: string): Promise<{
42
- response: http.IncomingMessage;
37
+ response: Response;
43
38
  body: AspectDefinition;
44
39
  }>;
45
40
  /**
@@ -49,7 +44,7 @@ declare class AspectDefinitionsApi {
49
44
  * @param xMagdaSession Magda internal session id
50
45
  */
51
46
  getAll(xMagdaTenantId: number, xMagdaSession?: string): Promise<{
52
- response: http.IncomingMessage;
47
+ response: Response;
53
48
  body: Array<AspectDefinition>;
54
49
  }>;
55
50
  /**
@@ -60,7 +55,7 @@ declare class AspectDefinitionsApi {
60
55
  * @param xMagdaSession Magda internal session id
61
56
  */
62
57
  getById(xMagdaTenantId: number, id: string, xMagdaSession?: string): Promise<{
63
- response: http.IncomingMessage;
58
+ response: Response;
64
59
  body: AspectDefinition;
65
60
  }>;
66
61
  /**
@@ -72,7 +67,7 @@ declare class AspectDefinitionsApi {
72
67
  * @param xMagdaSession Magda internal session id
73
68
  */
74
69
  patchById(xMagdaTenantId: number, id: string, aspectPatch: Array<Operation>, xMagdaSession: string): Promise<{
75
- response: http.IncomingMessage;
70
+ response: Response;
76
71
  body: AspectDefinition;
77
72
  }>;
78
73
  /**
@@ -84,7 +79,7 @@ declare class AspectDefinitionsApi {
84
79
  * @param xMagdaSession Magda internal session id
85
80
  */
86
81
  putById(xMagdaTenantId: number, id: string, aspect: AspectDefinition, xMagdaSession: string): Promise<{
87
- response: http.IncomingMessage;
82
+ response: Response;
88
83
  body: AspectDefinition;
89
84
  }>;
90
85
  }
@@ -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
  }
@@ -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
  }