@magda/connector-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-web.d.ts +0 -4
- package/dist/index-web.js +1 -2
- package/dist/index.d.ts +7 -35
- package/dist/index.js +992 -934
- package/package.json +3 -3
package/dist/index-web.d.ts
CHANGED
|
@@ -164,10 +164,6 @@ declare class Record_2 {
|
|
|
164
164
|
*/
|
|
165
165
|
'aspects': any;
|
|
166
166
|
/**
|
|
167
|
-
* The read authorization policy id of a record
|
|
168
|
-
*/
|
|
169
|
-
'authnReadPolicyId': string;
|
|
170
|
-
/**
|
|
171
167
|
* A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
|
|
172
168
|
*/
|
|
173
169
|
'sourceTag': string;
|
package/dist/index-web.js
CHANGED
|
@@ -33086,8 +33086,7 @@ class JsonTransformer {
|
|
|
33086
33086
|
name: name,
|
|
33087
33087
|
aspects: generatedAspects,
|
|
33088
33088
|
sourceTag: undefined,
|
|
33089
|
-
tenantId: this.tenantId
|
|
33090
|
-
authnReadPolicyId: undefined
|
|
33089
|
+
tenantId: this.tenantId
|
|
33091
33090
|
};
|
|
33092
33091
|
}
|
|
33093
33092
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import http = require('http');
|
|
3
|
-
import { Response as Response_2 } from 'request';
|
|
4
3
|
import { default as URI_2 } from 'urijs';
|
|
5
4
|
|
|
6
5
|
export declare interface AspectBuilder {
|
|
@@ -127,24 +126,18 @@ export declare class AuthorizedRegistryClient extends RegistryClient {
|
|
|
127
126
|
getHooks(): Promise<WebHook[] | Error>;
|
|
128
127
|
resumeHook(webhookId: string, succeeded?: boolean, lastEventIdReceived?: string, active?: boolean): Promise<WebHookAcknowledgementResponse | Error>;
|
|
129
128
|
putRecord(record: Record_2, tenantId?: number): Promise<Record_2 | Error>;
|
|
129
|
+
patchRecord(recordId: string, recordPatch: Operation[], tenantId?: number): Promise<Record_2 | Error>;
|
|
130
130
|
putRecordAspect(recordId: string, aspectId: string, aspect: any, tenantId?: number): Promise<Record_2 | Error>;
|
|
131
|
+
deleteRecordAspect(recordId: string, aspectId: string, tenantId?: number): Promise<DeleteResult | Error>;
|
|
131
132
|
patchRecordAspect(recordId: string, aspectId: string, aspectPatch: Operation[], tenantId?: number): Promise<Record_2 | Error>;
|
|
132
133
|
deleteBySource(sourceTagToPreserve: string, sourceId: string, tenantId?: number): Promise<MultipleDeleteResult | "Processing" | Error>;
|
|
133
134
|
getRecordHistory(id: string, pageToken?: string, start?: number, limit?: number): Promise<EventsPage | Error>;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
declare interface
|
|
137
|
-
jwt
|
|
138
|
-
userId?:
|
|
139
|
-
jwtSecret?:
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export declare type AuthorizedRegistryOptions = AuthorizedRegistryUserIdAndJwtSecretOptions | AuthorizedRegistryJwtOptions;
|
|
143
|
-
|
|
144
|
-
declare interface AuthorizedRegistryUserIdAndJwtSecretOptions extends RegistryOptions {
|
|
145
|
-
userId: string;
|
|
146
|
-
jwtSecret: string;
|
|
147
|
-
jwt?: never;
|
|
137
|
+
export declare interface AuthorizedRegistryOptions extends RegistryOptions {
|
|
138
|
+
jwt?: string;
|
|
139
|
+
userId?: string;
|
|
140
|
+
jwtSecret?: string;
|
|
148
141
|
}
|
|
149
142
|
|
|
150
143
|
export declare abstract class BuilderFunctionParameters {
|
|
@@ -614,10 +607,6 @@ declare class Record_2 {
|
|
|
614
607
|
*/
|
|
615
608
|
'aspects': any;
|
|
616
609
|
/**
|
|
617
|
-
* The read authorization policy id of a record
|
|
618
|
-
*/
|
|
619
|
-
'authnReadPolicyId': string;
|
|
620
|
-
/**
|
|
621
610
|
* A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
|
|
622
611
|
*/
|
|
623
612
|
'sourceTag': string;
|
|
@@ -900,7 +889,7 @@ declare class RecordsApi {
|
|
|
900
889
|
*/
|
|
901
890
|
patchById(xMagdaTenantId: number, id: string, recordPatch: Array<Operation>, xMagdaSession: string): Promise<{
|
|
902
891
|
response: http.IncomingMessage;
|
|
903
|
-
body:
|
|
892
|
+
body: Record_2;
|
|
904
893
|
}>;
|
|
905
894
|
/**
|
|
906
895
|
* Modify a record by ID
|
|
@@ -974,13 +963,6 @@ declare class RegistryClient {
|
|
|
974
963
|
protected tenantId: number;
|
|
975
964
|
protected jwt: string | undefined;
|
|
976
965
|
constructor({ baseUrl, maxRetries, secondsBetweenRetries, tenantId }: RegistryOptions);
|
|
977
|
-
toServerError(error: {
|
|
978
|
-
body: any;
|
|
979
|
-
response: Response_2;
|
|
980
|
-
}): ServerError | {
|
|
981
|
-
body: any;
|
|
982
|
-
response: Response_2;
|
|
983
|
-
};
|
|
984
966
|
getRecordUrl(id: string): string;
|
|
985
967
|
getAspectDefinitions(): Promise<AspectDefinition[] | Error>;
|
|
986
968
|
getAspectDefinition(aspectId: string, jwtToken?: string): Promise<AspectDefinition>;
|
|
@@ -1010,16 +992,6 @@ declare interface ReportProblem {
|
|
|
1010
992
|
(title: string, message?: string, additionalInfo?: any): void;
|
|
1011
993
|
}
|
|
1012
994
|
|
|
1013
|
-
declare class ServerError extends Error {
|
|
1014
|
-
statusCode: number;
|
|
1015
|
-
constructor(message?: string, statusCode?: number);
|
|
1016
|
-
toData(): {
|
|
1017
|
-
isError: boolean;
|
|
1018
|
-
errorCode: number;
|
|
1019
|
-
errorMessage: string;
|
|
1020
|
-
};
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
995
|
export declare const TenantConsts: any;
|
|
1024
996
|
|
|
1025
997
|
declare class WebHook {
|