@lblod/mu-auth-sudo 1.0.0-beta.4 → 1.0.0-beta.5
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/auth-sudo.d.ts +29 -0
- package/package.json +6 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Response } from 'node-fetch';
|
|
2
|
+
export interface ConnectionOptions {
|
|
3
|
+
sparqlEndpoint?: string;
|
|
4
|
+
authUser?: string;
|
|
5
|
+
authPassword?: string;
|
|
6
|
+
authType?: "basic" | "digest";
|
|
7
|
+
mayRetry?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SPARQLResult {
|
|
10
|
+
head: Record<string, any>;
|
|
11
|
+
results?: {
|
|
12
|
+
distinct: boolean;
|
|
13
|
+
ordered: boolean;
|
|
14
|
+
bindings: Record<string, any>[];
|
|
15
|
+
};
|
|
16
|
+
boolean?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class HTTPResponseError extends Error {
|
|
19
|
+
httpStatus: number;
|
|
20
|
+
httpStatusText: string;
|
|
21
|
+
constructor(response: Response);
|
|
22
|
+
}
|
|
23
|
+
export declare function querySudo(queryString: string, extraHeaders?: Record<string, string>, connectionOptions?: ConnectionOptions): Promise<SPARQLResult | null>;
|
|
24
|
+
export declare function updateSudo(queryString: string, extraHeaders?: Record<string, string>, connectionOptions?: ConnectionOptions): Promise<SPARQLResult | null>;
|
|
25
|
+
declare const defaultExport: {
|
|
26
|
+
querySudo: typeof querySudo;
|
|
27
|
+
updateSudo: typeof updateSudo;
|
|
28
|
+
};
|
|
29
|
+
export default defaultExport;
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/mu-auth-sudo",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"description": "this package provides an alternative sparql client for the mu-javascript-template that has sudo rights.",
|
|
5
5
|
"main": "dist/auth-sudo.js",
|
|
6
|
+
"types": "dist/auth-sudo.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "tsc",
|
|
8
9
|
"prepare": "npm run build",
|
|
@@ -43,7 +44,10 @@
|
|
|
43
44
|
"express-http-context": "~1.2.4"
|
|
44
45
|
},
|
|
45
46
|
"volta": {
|
|
46
|
-
"node": "
|
|
47
|
+
"node": "22.22.0"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=22"
|
|
47
51
|
},
|
|
48
52
|
"files": [
|
|
49
53
|
"dist/**/*"
|