@n8n/rest-api-client 2.31.2 → 2.32.0
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/api/consent.cjs
CHANGED
|
@@ -4,8 +4,11 @@ const require_utils = require('../utils2.cjs');
|
|
|
4
4
|
async function getConsentDetails(context) {
|
|
5
5
|
return await require_utils.makeRestApiRequest(context, "GET", "/consent/details");
|
|
6
6
|
}
|
|
7
|
-
async function approveConsent(context, approved) {
|
|
8
|
-
return await require_utils.makeRestApiRequest(context, "POST", "/consent/approve", {
|
|
7
|
+
async function approveConsent(context, approved, scopes) {
|
|
8
|
+
return await require_utils.makeRestApiRequest(context, "POST", "/consent/approve", {
|
|
9
|
+
approved,
|
|
10
|
+
scopes
|
|
11
|
+
});
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
//#endregion
|
package/dist/api/consent.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent.cjs","names":["makeRestApiRequest"],"sources":["../../src/api/consent.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport interface ConsentDetails {\n\tclientName: string;\n\tclientId: string;\n\tredirectUri?: string;\n\tresourceName?: string;\n}\n\nexport interface ConsentApprovalResponse {\n\tstatus: string;\n\tredirectUrl: string;\n}\n\nexport async function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails> {\n\treturn await makeRestApiRequest(context, 'GET', '/consent/details');\n}\n\nexport async function approveConsent(\n\tcontext: IRestApiContext,\n\tapproved: boolean,\n): Promise<ConsentApprovalResponse> {\n\treturn await makeRestApiRequest(context, 'POST', '/consent/approve', { approved });\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"consent.cjs","names":["makeRestApiRequest"],"sources":["../../src/api/consent.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport interface ConsentDetails {\n\tclientName: string;\n\tclientId: string;\n\tredirectUri?: string;\n\tresourceName?: string;\n\t/**\n\t * Scopes the user can grant (already capped by what the client requested).\n\t * Empty = full user delegation (no picker shown).\n\t */\n\tscopes: string[];\n\t/** Scopes this user granted to this client last time, used to preselect the picker. */\n\tpreviousScopes?: string[];\n\t/** Tool names each scope unlocks, shown per scope group in the picker. */\n\tscopeTools?: Record<string, string[]>;\n}\n\nexport interface ConsentApprovalResponse {\n\tstatus: string;\n\tredirectUrl: string;\n}\n\nexport async function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails> {\n\treturn await makeRestApiRequest(context, 'GET', '/consent/details');\n}\n\nexport async function approveConsent(\n\tcontext: IRestApiContext,\n\tapproved: boolean,\n\tscopes?: string[],\n): Promise<ConsentApprovalResponse> {\n\treturn await makeRestApiRequest(context, 'POST', '/consent/approve', { approved, scopes });\n}\n"],"mappings":";;;AAwBA,eAAsB,kBAAkB,SAAmD;AAC1F,QAAO,MAAMA,iCAAmB,SAAS,OAAO,mBAAmB;;AAGpE,eAAsB,eACrB,SACA,UACA,QACmC;AACnC,QAAO,MAAMA,iCAAmB,SAAS,QAAQ,oBAAoB;EAAE;EAAU;EAAQ,CAAC"}
|
package/dist/api/consent.d.cts
CHANGED
|
@@ -6,13 +6,16 @@ interface ConsentDetails {
|
|
|
6
6
|
clientId: string;
|
|
7
7
|
redirectUri?: string;
|
|
8
8
|
resourceName?: string;
|
|
9
|
+
scopes: string[];
|
|
10
|
+
previousScopes?: string[];
|
|
11
|
+
scopeTools?: Record<string, string[]>;
|
|
9
12
|
}
|
|
10
13
|
interface ConsentApprovalResponse {
|
|
11
14
|
status: string;
|
|
12
15
|
redirectUrl: string;
|
|
13
16
|
}
|
|
14
17
|
declare function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails>;
|
|
15
|
-
declare function approveConsent(context: IRestApiContext, approved: boolean): Promise<ConsentApprovalResponse>;
|
|
18
|
+
declare function approveConsent(context: IRestApiContext, approved: boolean, scopes?: string[]): Promise<ConsentApprovalResponse>;
|
|
16
19
|
//#endregion
|
|
17
20
|
export { ConsentApprovalResponse, ConsentDetails, approveConsent, getConsentDetails };
|
|
18
21
|
//# sourceMappingURL=consent.d.cts.map
|
package/dist/api/consent.d.mts
CHANGED
|
@@ -6,13 +6,16 @@ interface ConsentDetails {
|
|
|
6
6
|
clientId: string;
|
|
7
7
|
redirectUri?: string;
|
|
8
8
|
resourceName?: string;
|
|
9
|
+
scopes: string[];
|
|
10
|
+
previousScopes?: string[];
|
|
11
|
+
scopeTools?: Record<string, string[]>;
|
|
9
12
|
}
|
|
10
13
|
interface ConsentApprovalResponse {
|
|
11
14
|
status: string;
|
|
12
15
|
redirectUrl: string;
|
|
13
16
|
}
|
|
14
17
|
declare function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails>;
|
|
15
|
-
declare function approveConsent(context: IRestApiContext, approved: boolean): Promise<ConsentApprovalResponse>;
|
|
18
|
+
declare function approveConsent(context: IRestApiContext, approved: boolean, scopes?: string[]): Promise<ConsentApprovalResponse>;
|
|
16
19
|
//#endregion
|
|
17
20
|
export { ConsentApprovalResponse, ConsentDetails, approveConsent, getConsentDetails };
|
|
18
21
|
//# sourceMappingURL=consent.d.mts.map
|
package/dist/api/consent.mjs
CHANGED
|
@@ -4,8 +4,11 @@ import { s as makeRestApiRequest } from "../utils2.mjs";
|
|
|
4
4
|
async function getConsentDetails(context) {
|
|
5
5
|
return await makeRestApiRequest(context, "GET", "/consent/details");
|
|
6
6
|
}
|
|
7
|
-
async function approveConsent(context, approved) {
|
|
8
|
-
return await makeRestApiRequest(context, "POST", "/consent/approve", {
|
|
7
|
+
async function approveConsent(context, approved, scopes) {
|
|
8
|
+
return await makeRestApiRequest(context, "POST", "/consent/approve", {
|
|
9
|
+
approved,
|
|
10
|
+
scopes
|
|
11
|
+
});
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
//#endregion
|
package/dist/api/consent.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent.mjs","names":[],"sources":["../../src/api/consent.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport interface ConsentDetails {\n\tclientName: string;\n\tclientId: string;\n\tredirectUri?: string;\n\tresourceName?: string;\n}\n\nexport interface ConsentApprovalResponse {\n\tstatus: string;\n\tredirectUrl: string;\n}\n\nexport async function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails> {\n\treturn await makeRestApiRequest(context, 'GET', '/consent/details');\n}\n\nexport async function approveConsent(\n\tcontext: IRestApiContext,\n\tapproved: boolean,\n): Promise<ConsentApprovalResponse> {\n\treturn await makeRestApiRequest(context, 'POST', '/consent/approve', { approved });\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"consent.mjs","names":[],"sources":["../../src/api/consent.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport interface ConsentDetails {\n\tclientName: string;\n\tclientId: string;\n\tredirectUri?: string;\n\tresourceName?: string;\n\t/**\n\t * Scopes the user can grant (already capped by what the client requested).\n\t * Empty = full user delegation (no picker shown).\n\t */\n\tscopes: string[];\n\t/** Scopes this user granted to this client last time, used to preselect the picker. */\n\tpreviousScopes?: string[];\n\t/** Tool names each scope unlocks, shown per scope group in the picker. */\n\tscopeTools?: Record<string, string[]>;\n}\n\nexport interface ConsentApprovalResponse {\n\tstatus: string;\n\tredirectUrl: string;\n}\n\nexport async function getConsentDetails(context: IRestApiContext): Promise<ConsentDetails> {\n\treturn await makeRestApiRequest(context, 'GET', '/consent/details');\n}\n\nexport async function approveConsent(\n\tcontext: IRestApiContext,\n\tapproved: boolean,\n\tscopes?: string[],\n): Promise<ConsentApprovalResponse> {\n\treturn await makeRestApiRequest(context, 'POST', '/consent/approve', { approved, scopes });\n}\n"],"mappings":";;;AAwBA,eAAsB,kBAAkB,SAAmD;AAC1F,QAAO,MAAM,mBAAmB,SAAS,OAAO,mBAAmB;;AAGpE,eAAsB,eACrB,SACA,UACA,QACmC;AACnC,QAAO,MAAM,mBAAmB,SAAS,QAAQ,oBAAoB;EAAE;EAAU;EAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/rest-api-client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.32.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"LICENSE.md",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"js-base64": "3.7.8",
|
|
27
27
|
"axios": "1.18.0",
|
|
28
28
|
"flatted": "3.4.2",
|
|
29
|
-
"@n8n/api-types": "1.
|
|
30
|
-
"@n8n/utils": "1.
|
|
31
|
-
"@n8n/constants": "0.
|
|
32
|
-
"n8n-workflow": "2.
|
|
33
|
-
"@n8n/permissions": "0.
|
|
29
|
+
"@n8n/api-types": "1.32.0",
|
|
30
|
+
"@n8n/utils": "1.40.0",
|
|
31
|
+
"@n8n/constants": "0.32.0",
|
|
32
|
+
"n8n-workflow": "2.32.0",
|
|
33
|
+
"@n8n/permissions": "0.69.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"vitest": "^4.1.9",
|
|
42
42
|
"vue-tsc": "^2.2.8",
|
|
43
43
|
"@n8n/eslint-config": "0.0.1",
|
|
44
|
-
"@n8n/i18n": "2.
|
|
45
|
-
"@n8n/typescript-config": "1.9.0",
|
|
44
|
+
"@n8n/i18n": "2.32.0",
|
|
46
45
|
"@n8n/playwright-janitor": "0.1.0",
|
|
47
|
-
"@n8n/
|
|
46
|
+
"@n8n/typescript-config": "1.9.0",
|
|
47
|
+
"@n8n/vitest-config": "1.19.0"
|
|
48
48
|
},
|
|
49
49
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
50
50
|
"homepage": "https://n8n.io",
|