@magda/minion-sdk 2.0.0-alpha.1 → 2.0.0-alpha.2

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 CHANGED
@@ -1,7 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import express from 'express';
3
3
  import http = require('http');
4
- import { Response as Response_2 } from 'request';
5
4
  import { default as URI_2 } from 'urijs';
6
5
  import yargs from 'yargs';
7
6
 
@@ -103,24 +102,18 @@ export declare class AuthorizedRegistryClient extends RegistryClient {
103
102
  getHooks(): Promise<WebHook[] | Error>;
104
103
  resumeHook(webhookId: string, succeeded?: boolean, lastEventIdReceived?: string, active?: boolean): Promise<WebHookAcknowledgementResponse | Error>;
105
104
  putRecord(record: Record_2, tenantId?: number): Promise<Record_2 | Error>;
105
+ patchRecord(recordId: string, recordPatch: Operation[], tenantId?: number): Promise<Record_2 | Error>;
106
106
  putRecordAspect(recordId: string, aspectId: string, aspect: any, tenantId?: number): Promise<Record_2 | Error>;
107
+ deleteRecordAspect(recordId: string, aspectId: string, tenantId?: number): Promise<DeleteResult | Error>;
107
108
  patchRecordAspect(recordId: string, aspectId: string, aspectPatch: Operation[], tenantId?: number): Promise<Record_2 | Error>;
108
109
  deleteBySource(sourceTagToPreserve: string, sourceId: string, tenantId?: number): Promise<MultipleDeleteResult | "Processing" | Error>;
109
110
  getRecordHistory(id: string, pageToken?: string, start?: number, limit?: number): Promise<EventsPage | Error>;
110
111
  }
111
112
 
112
- declare interface AuthorizedRegistryJwtOptions extends RegistryOptions {
113
- jwt: string;
114
- userId?: never;
115
- jwtSecret?: never;
116
- }
117
-
118
- export declare type AuthorizedRegistryOptions = AuthorizedRegistryUserIdAndJwtSecretOptions | AuthorizedRegistryJwtOptions;
119
-
120
- declare interface AuthorizedRegistryUserIdAndJwtSecretOptions extends RegistryOptions {
121
- userId: string;
122
- jwtSecret: string;
123
- jwt?: never;
113
+ export declare interface AuthorizedRegistryOptions extends RegistryOptions {
114
+ jwt?: string;
115
+ userId?: string;
116
+ jwtSecret?: string;
124
117
  }
125
118
 
126
119
  /**
@@ -290,10 +283,6 @@ declare class Record_2 {
290
283
  */
291
284
  'aspects': any;
292
285
  /**
293
- * The read authorization policy id of a record
294
- */
295
- 'authnReadPolicyId': string;
296
- /**
297
286
  * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
298
287
  */
299
288
  'sourceTag': string;
@@ -569,7 +558,7 @@ declare class RecordsApi {
569
558
  */
570
559
  patchById(xMagdaTenantId: number, id: string, recordPatch: Array<Operation>, xMagdaSession: string): Promise<{
571
560
  response: http.IncomingMessage;
572
- body: AspectDefinition;
561
+ body: Record_2;
573
562
  }>;
574
563
  /**
575
564
  * Modify a record by ID
@@ -641,13 +630,6 @@ declare class RegistryClient {
641
630
  protected tenantId: number;
642
631
  protected jwt: string | undefined;
643
632
  constructor({ baseUrl, maxRetries, secondsBetweenRetries, tenantId }: RegistryOptions);
644
- toServerError(error: {
645
- body: any;
646
- response: Response_2;
647
- }): ServerError | {
648
- body: any;
649
- response: Response_2;
650
- };
651
633
  getRecordUrl(id: string): string;
652
634
  getAspectDefinitions(): Promise<AspectDefinition[] | Error>;
653
635
  getAspectDefinition(aspectId: string, jwtToken?: string): Promise<AspectDefinition>;
@@ -673,16 +655,6 @@ declare interface RegistryOptions {
673
655
  tenantId: number;
674
656
  }
675
657
 
676
- declare class ServerError extends Error {
677
- statusCode: number;
678
- constructor(message?: string, statusCode?: number);
679
- toData(): {
680
- isError: boolean;
681
- errorCode: number;
682
- errorMessage: string;
683
- };
684
- }
685
-
686
658
  declare class WebHook {
687
659
  'id': string;
688
660
  'name': string;