@n8n/rest-api-client 2.22.2 → 2.23.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.
- package/dist/credentialResolvers.cjs +2 -2
- package/dist/credentialResolvers.cjs.map +1 -1
- package/dist/credentialResolvers.d.cts +3 -1
- package/dist/credentialResolvers.d.mts +3 -1
- package/dist/credentialResolvers.mjs +2 -2
- package/dist/credentialResolvers.mjs.map +1 -1
- package/dist/workflowHistory.cjs.map +1 -1
- package/dist/workflowHistory.d.cts +3 -1
- package/dist/workflowHistory.d.mts +3 -1
- package/dist/workflowHistory.mjs.map +1 -1
- package/dist/workflows.d.cts +3 -1
- package/dist/workflows.d.mts +3 -1
- package/package.json +11 -11
- package/dist/api/redaction-enforcement.cjs +0 -29
- package/dist/api/redaction-enforcement.cjs.map +0 -1
- package/dist/api/redaction-enforcement.d.cts +0 -9
- package/dist/api/redaction-enforcement.d.mts +0 -9
- package/dist/api/redaction-enforcement.mjs +0 -28
- package/dist/api/redaction-enforcement.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_utils = require('./utils2.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/api/credentialResolvers.ts
|
|
4
|
-
async function getCredentialResolvers(context) {
|
|
5
|
-
return await require_utils.makeRestApiRequest(context, "GET", "/credential-resolvers");
|
|
4
|
+
async function getCredentialResolvers(context, options = {}) {
|
|
5
|
+
return await require_utils.makeRestApiRequest(context, "GET", "/credential-resolvers", options.includeSystem ? { includeSystem: "true" } : void 0);
|
|
6
6
|
}
|
|
7
7
|
async function getCredentialResolverTypes(context) {
|
|
8
8
|
return await require_utils.makeRestApiRequest(context, "GET", "/credential-resolvers/types");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentialResolvers.cjs","names":["makeRestApiRequest"],"sources":["../src/api/credentialResolvers.ts"],"sourcesContent":["import type {\n\tCredentialResolver,\n\tCredentialResolverAffectedWorkflow,\n\tCredentialResolverType,\n} from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport async function getCredentialResolvers(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolver[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers');\n}\n\nexport async function getCredentialResolverTypes(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolverType[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers/types');\n}\n\nexport async function getCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}`);\n}\n\nexport async function createCredentialResolver(\n\tcontext: IRestApiContext,\n\tpayload: { name: string; type: string; config: Record<string, unknown> },\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'POST', '/credential-resolvers', payload);\n}\n\nexport async function updateCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n\tpayload: {\n\t\tname: string;\n\t\ttype: string;\n\t\tconfig: Record<string, unknown>;\n\t\tclearCredentials?: boolean;\n\t},\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'PATCH', `/credential-resolvers/${resolverId}`, payload);\n}\n\nexport async function getCredentialResolverWorkflows(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolverAffectedWorkflow[]> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}/workflows`);\n}\n\nexport async function deleteCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<void> {\n\treturn await makeRestApiRequest(context, 'DELETE', `/credential-resolvers/${resolverId}`);\n}\n"],"mappings":";;;AASA,eAAsB,uBACrB,
|
|
1
|
+
{"version":3,"file":"credentialResolvers.cjs","names":["makeRestApiRequest"],"sources":["../src/api/credentialResolvers.ts"],"sourcesContent":["import type {\n\tCredentialResolver,\n\tCredentialResolverAffectedWorkflow,\n\tCredentialResolverType,\n} from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport async function getCredentialResolvers(\n\tcontext: IRestApiContext,\n\toptions: { includeSystem?: boolean } = {},\n): Promise<CredentialResolver[]> {\n\tconst query = options.includeSystem ? { includeSystem: 'true' } : undefined;\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers', query);\n}\n\nexport async function getCredentialResolverTypes(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolverType[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers/types');\n}\n\nexport async function getCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}`);\n}\n\nexport async function createCredentialResolver(\n\tcontext: IRestApiContext,\n\tpayload: { name: string; type: string; config: Record<string, unknown> },\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'POST', '/credential-resolvers', payload);\n}\n\nexport async function updateCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n\tpayload: {\n\t\tname: string;\n\t\ttype: string;\n\t\tconfig: Record<string, unknown>;\n\t\tclearCredentials?: boolean;\n\t},\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'PATCH', `/credential-resolvers/${resolverId}`, payload);\n}\n\nexport async function getCredentialResolverWorkflows(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolverAffectedWorkflow[]> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}/workflows`);\n}\n\nexport async function deleteCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<void> {\n\treturn await makeRestApiRequest(context, 'DELETE', `/credential-resolvers/${resolverId}`);\n}\n"],"mappings":";;;AASA,eAAsB,uBACrB,SACA,UAAuC,EAAE,EACT;AAEhC,QAAO,MAAMA,iCAAmB,SAAS,OAAO,yBADlC,QAAQ,gBAAgB,EAAE,eAAe,QAAQ,GAAG,OACa;;AAGhF,eAAsB,2BACrB,SACoC;AACpC,QAAO,MAAMA,iCAAmB,SAAS,OAAO,8BAA8B;;AAG/E,eAAsB,sBACrB,SACA,YAC8B;AAC9B,QAAO,MAAMA,iCAAmB,SAAS,OAAO,yBAAyB,aAAa;;AAGvF,eAAsB,yBACrB,SACA,SAC8B;AAC9B,QAAO,MAAMA,iCAAmB,SAAS,QAAQ,yBAAyB,QAAQ;;AAGnF,eAAsB,yBACrB,SACA,YACA,SAM8B;AAC9B,QAAO,MAAMA,iCAAmB,SAAS,SAAS,yBAAyB,cAAc,QAAQ;;AAGlG,eAAsB,+BACrB,SACA,YACgD;AAChD,QAAO,MAAMA,iCAAmB,SAAS,OAAO,yBAAyB,WAAW,YAAY;;AAGjG,eAAsB,yBACrB,SACA,YACgB;AAChB,QAAO,MAAMA,iCAAmB,SAAS,UAAU,yBAAyB,aAAa"}
|
|
@@ -2,7 +2,9 @@ import { t as IRestApiContext } from "./types2.cjs";
|
|
|
2
2
|
import { CredentialResolver, CredentialResolverAffectedWorkflow, CredentialResolverType } from "@n8n/api-types";
|
|
3
3
|
|
|
4
4
|
//#region src/api/credentialResolvers.d.ts
|
|
5
|
-
declare function getCredentialResolvers(context: IRestApiContext
|
|
5
|
+
declare function getCredentialResolvers(context: IRestApiContext, options?: {
|
|
6
|
+
includeSystem?: boolean;
|
|
7
|
+
}): Promise<CredentialResolver[]>;
|
|
6
8
|
declare function getCredentialResolverTypes(context: IRestApiContext): Promise<CredentialResolverType[]>;
|
|
7
9
|
declare function getCredentialResolver(context: IRestApiContext, resolverId: string): Promise<CredentialResolver>;
|
|
8
10
|
declare function createCredentialResolver(context: IRestApiContext, payload: {
|
|
@@ -2,7 +2,9 @@ import { t as IRestApiContext } from "./types2.mjs";
|
|
|
2
2
|
import { CredentialResolver, CredentialResolverAffectedWorkflow, CredentialResolverType } from "@n8n/api-types";
|
|
3
3
|
|
|
4
4
|
//#region src/api/credentialResolvers.d.ts
|
|
5
|
-
declare function getCredentialResolvers(context: IRestApiContext
|
|
5
|
+
declare function getCredentialResolvers(context: IRestApiContext, options?: {
|
|
6
|
+
includeSystem?: boolean;
|
|
7
|
+
}): Promise<CredentialResolver[]>;
|
|
6
8
|
declare function getCredentialResolverTypes(context: IRestApiContext): Promise<CredentialResolverType[]>;
|
|
7
9
|
declare function getCredentialResolver(context: IRestApiContext, resolverId: string): Promise<CredentialResolver>;
|
|
8
10
|
declare function createCredentialResolver(context: IRestApiContext, payload: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as makeRestApiRequest } from "./utils2.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/credentialResolvers.ts
|
|
4
|
-
async function getCredentialResolvers(context) {
|
|
5
|
-
return await makeRestApiRequest(context, "GET", "/credential-resolvers");
|
|
4
|
+
async function getCredentialResolvers(context, options = {}) {
|
|
5
|
+
return await makeRestApiRequest(context, "GET", "/credential-resolvers", options.includeSystem ? { includeSystem: "true" } : void 0);
|
|
6
6
|
}
|
|
7
7
|
async function getCredentialResolverTypes(context) {
|
|
8
8
|
return await makeRestApiRequest(context, "GET", "/credential-resolvers/types");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentialResolvers.mjs","names":[],"sources":["../src/api/credentialResolvers.ts"],"sourcesContent":["import type {\n\tCredentialResolver,\n\tCredentialResolverAffectedWorkflow,\n\tCredentialResolverType,\n} from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport async function getCredentialResolvers(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolver[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers');\n}\n\nexport async function getCredentialResolverTypes(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolverType[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers/types');\n}\n\nexport async function getCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}`);\n}\n\nexport async function createCredentialResolver(\n\tcontext: IRestApiContext,\n\tpayload: { name: string; type: string; config: Record<string, unknown> },\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'POST', '/credential-resolvers', payload);\n}\n\nexport async function updateCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n\tpayload: {\n\t\tname: string;\n\t\ttype: string;\n\t\tconfig: Record<string, unknown>;\n\t\tclearCredentials?: boolean;\n\t},\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'PATCH', `/credential-resolvers/${resolverId}`, payload);\n}\n\nexport async function getCredentialResolverWorkflows(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolverAffectedWorkflow[]> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}/workflows`);\n}\n\nexport async function deleteCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<void> {\n\treturn await makeRestApiRequest(context, 'DELETE', `/credential-resolvers/${resolverId}`);\n}\n"],"mappings":";;;AASA,eAAsB,uBACrB,
|
|
1
|
+
{"version":3,"file":"credentialResolvers.mjs","names":[],"sources":["../src/api/credentialResolvers.ts"],"sourcesContent":["import type {\n\tCredentialResolver,\n\tCredentialResolverAffectedWorkflow,\n\tCredentialResolverType,\n} from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\nexport async function getCredentialResolvers(\n\tcontext: IRestApiContext,\n\toptions: { includeSystem?: boolean } = {},\n): Promise<CredentialResolver[]> {\n\tconst query = options.includeSystem ? { includeSystem: 'true' } : undefined;\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers', query);\n}\n\nexport async function getCredentialResolverTypes(\n\tcontext: IRestApiContext,\n): Promise<CredentialResolverType[]> {\n\treturn await makeRestApiRequest(context, 'GET', '/credential-resolvers/types');\n}\n\nexport async function getCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}`);\n}\n\nexport async function createCredentialResolver(\n\tcontext: IRestApiContext,\n\tpayload: { name: string; type: string; config: Record<string, unknown> },\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'POST', '/credential-resolvers', payload);\n}\n\nexport async function updateCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n\tpayload: {\n\t\tname: string;\n\t\ttype: string;\n\t\tconfig: Record<string, unknown>;\n\t\tclearCredentials?: boolean;\n\t},\n): Promise<CredentialResolver> {\n\treturn await makeRestApiRequest(context, 'PATCH', `/credential-resolvers/${resolverId}`, payload);\n}\n\nexport async function getCredentialResolverWorkflows(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<CredentialResolverAffectedWorkflow[]> {\n\treturn await makeRestApiRequest(context, 'GET', `/credential-resolvers/${resolverId}/workflows`);\n}\n\nexport async function deleteCredentialResolver(\n\tcontext: IRestApiContext,\n\tresolverId: string,\n): Promise<void> {\n\treturn await makeRestApiRequest(context, 'DELETE', `/credential-resolvers/${resolverId}`);\n}\n"],"mappings":";;;AASA,eAAsB,uBACrB,SACA,UAAuC,EAAE,EACT;AAEhC,QAAO,MAAM,mBAAmB,SAAS,OAAO,yBADlC,QAAQ,gBAAgB,EAAE,eAAe,QAAQ,GAAG,OACa;;AAGhF,eAAsB,2BACrB,SACoC;AACpC,QAAO,MAAM,mBAAmB,SAAS,OAAO,8BAA8B;;AAG/E,eAAsB,sBACrB,SACA,YAC8B;AAC9B,QAAO,MAAM,mBAAmB,SAAS,OAAO,yBAAyB,aAAa;;AAGvF,eAAsB,yBACrB,SACA,SAC8B;AAC9B,QAAO,MAAM,mBAAmB,SAAS,QAAQ,yBAAyB,QAAQ;;AAGnF,eAAsB,yBACrB,SACA,YACA,SAM8B;AAC9B,QAAO,MAAM,mBAAmB,SAAS,SAAS,yBAAyB,cAAc,QAAQ;;AAGlG,eAAsB,+BACrB,SACA,YACgD;AAChD,QAAO,MAAM,mBAAmB,SAAS,OAAO,yBAAyB,WAAW,YAAY;;AAGjG,eAAsB,yBACrB,SACA,YACgB;AAChB,QAAO,MAAM,mBAAmB,SAAS,UAAU,yBAAyB,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflowHistory.cjs","names":["get","post","patch"],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { PublishTimelineEvent } from '@n8n/api-types';\nimport type { IConnections, INode } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, patch, post } from '../utils';\n\nexport type WorkflowHistory = {\n\tversionId: string;\n\tauthors: string;\n\tcreatedAt: string;\n\tupdatedAt: string;\n\tworkflowPublishHistory: WorkflowPublishHistory[];\n\tname: string | null;\n\tdescription: string | null;\n};\n\nexport type WorkflowVersionData = Pick<WorkflowHistory, 'versionId' | 'name' | 'description'>;\n\nexport type WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string | null;\n\tworkflowId: string;\n};\n\nexport type WorkflowVersionId = WorkflowHistory['versionId'];\n\nexport type WorkflowVersion = WorkflowHistory & {\n\tworkflowId: string;\n\tnodes: INode[];\n\tconnections: IConnections;\n};\n\nexport type WorkflowHistoryActionTypes = Array<\n\t'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\n\nexport type UpdateWorkflowHistoryVersion = {\n\tnodes?: INode[];\n\tconnections?: IConnections;\n\tauthors?: string;\n\tname?: string | null;\n\tdescription?: string | null;\n};\n\nexport const getWorkflowHistory = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tqueryParams: WorkflowHistoryRequestParams,\n): Promise<WorkflowHistory[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}`,\n\t\tqueryParams,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n): Promise<WorkflowVersion> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/version/${versionId}`,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersionsByIds = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionIds: string[],\n): Promise<{ versions: Array<{ versionId: string; createdAt: string }> }> => {\n\tconst { data } = await post(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions`,\n\t\t{ versionIds },\n\t);\n\treturn data;\n};\n\nexport type { PublishTimelineEvent } from '@n8n/api-types';\n\nexport const getPublishTimeline = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n): Promise<PublishTimelineEvent[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/publish-timeline`,\n\t);\n\treturn data;\n};\n\nexport const updateWorkflowHistoryVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n\tdata: UpdateWorkflowHistoryVersion,\n): Promise<void> => {\n\tawait patch(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions/${versionId}`,\n\t\tdata,\n\t);\n};\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"workflowHistory.cjs","names":["get","post","patch"],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { PublishTimelineEvent } from '@n8n/api-types';\nimport type { IConnections, INode, IWorkflowGroup } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, patch, post } from '../utils';\n\nexport type WorkflowHistory = {\n\tversionId: string;\n\tauthors: string;\n\tcreatedAt: string;\n\tupdatedAt: string;\n\tworkflowPublishHistory: WorkflowPublishHistory[];\n\tname: string | null;\n\tdescription: string | null;\n};\n\nexport type WorkflowVersionData = Pick<WorkflowHistory, 'versionId' | 'name' | 'description'>;\n\nexport type WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string | null;\n\tworkflowId: string;\n};\n\nexport type WorkflowVersionId = WorkflowHistory['versionId'];\n\nexport type WorkflowVersion = WorkflowHistory & {\n\tworkflowId: string;\n\tnodes: INode[];\n\tconnections: IConnections;\n\tnodeGroups?: IWorkflowGroup[];\n};\n\nexport type WorkflowHistoryActionTypes = Array<\n\t'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\n\nexport type UpdateWorkflowHistoryVersion = {\n\tnodes?: INode[];\n\tconnections?: IConnections;\n\tnodeGroups?: IWorkflowGroup[];\n\tauthors?: string;\n\tname?: string | null;\n\tdescription?: string | null;\n};\n\nexport const getWorkflowHistory = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tqueryParams: WorkflowHistoryRequestParams,\n): Promise<WorkflowHistory[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}`,\n\t\tqueryParams,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n): Promise<WorkflowVersion> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/version/${versionId}`,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersionsByIds = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionIds: string[],\n): Promise<{ versions: Array<{ versionId: string; createdAt: string }> }> => {\n\tconst { data } = await post(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions`,\n\t\t{ versionIds },\n\t);\n\treturn data;\n};\n\nexport type { PublishTimelineEvent } from '@n8n/api-types';\n\nexport const getPublishTimeline = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n): Promise<PublishTimelineEvent[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/publish-timeline`,\n\t);\n\treturn data;\n};\n\nexport const updateWorkflowHistoryVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n\tdata: UpdateWorkflowHistoryVersion,\n): Promise<void> => {\n\tawait patch(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions/${versionId}`,\n\t\tdata,\n\t);\n};\n"],"mappings":";;;AAmDA,MAAa,qBAAqB,OACjC,SACA,YACA,gBACgC;CAChC,MAAM,EAAE,SAAS,MAAMA,kBACtB,QAAQ,SACR,8BAA8B,cAC9B,YACA;AACD,QAAO;;AAGR,MAAa,qBAAqB,OACjC,SACA,YACA,cAC8B;CAC9B,MAAM,EAAE,SAAS,MAAMA,kBACtB,QAAQ,SACR,8BAA8B,WAAW,WAAW,YACpD;AACD,QAAO;;AAGR,MAAa,2BAA2B,OACvC,SACA,YACA,eAC4E;CAC5E,MAAM,EAAE,SAAS,MAAMC,mBACtB,QAAQ,SACR,8BAA8B,WAAW,YACzC,EAAE,YAAY,CACd;AACD,QAAO;;AAKR,MAAa,qBAAqB,OACjC,SACA,eACqC;CACrC,MAAM,EAAE,SAAS,MAAMD,kBACtB,QAAQ,SACR,8BAA8B,WAAW,mBACzC;AACD,QAAO;;AAGR,MAAa,+BAA+B,OAC3C,SACA,YACA,WACA,SACmB;AACnB,OAAME,oBACL,QAAQ,SACR,8BAA8B,WAAW,YAAY,aACrD,KACA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as IRestApiContext } from "./types2.cjs";
|
|
2
2
|
import { PublishTimelineEvent, PublishTimelineEvent as PublishTimelineEvent$1 } from "@n8n/api-types";
|
|
3
|
-
import { IConnections, INode } from "n8n-workflow";
|
|
3
|
+
import { IConnections, INode, IWorkflowGroup } from "n8n-workflow";
|
|
4
4
|
|
|
5
5
|
//#region src/api/workflowHistory.d.ts
|
|
6
6
|
type WorkflowHistory = {
|
|
@@ -26,6 +26,7 @@ type WorkflowVersion = WorkflowHistory & {
|
|
|
26
26
|
workflowId: string;
|
|
27
27
|
nodes: INode[];
|
|
28
28
|
connections: IConnections;
|
|
29
|
+
nodeGroups?: IWorkflowGroup[];
|
|
29
30
|
};
|
|
30
31
|
type WorkflowHistoryActionTypes = Array<'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'>;
|
|
31
32
|
type WorkflowHistoryRequestParams = {
|
|
@@ -35,6 +36,7 @@ type WorkflowHistoryRequestParams = {
|
|
|
35
36
|
type UpdateWorkflowHistoryVersion = {
|
|
36
37
|
nodes?: INode[];
|
|
37
38
|
connections?: IConnections;
|
|
39
|
+
nodeGroups?: IWorkflowGroup[];
|
|
38
40
|
authors?: string;
|
|
39
41
|
name?: string | null;
|
|
40
42
|
description?: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as IRestApiContext } from "./types2.mjs";
|
|
2
|
-
import { IConnections, INode } from "n8n-workflow";
|
|
2
|
+
import { IConnections, INode, IWorkflowGroup } from "n8n-workflow";
|
|
3
3
|
import { PublishTimelineEvent, PublishTimelineEvent as PublishTimelineEvent$1 } from "@n8n/api-types";
|
|
4
4
|
|
|
5
5
|
//#region src/api/workflowHistory.d.ts
|
|
@@ -26,6 +26,7 @@ type WorkflowVersion = WorkflowHistory & {
|
|
|
26
26
|
workflowId: string;
|
|
27
27
|
nodes: INode[];
|
|
28
28
|
connections: IConnections;
|
|
29
|
+
nodeGroups?: IWorkflowGroup[];
|
|
29
30
|
};
|
|
30
31
|
type WorkflowHistoryActionTypes = Array<'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'>;
|
|
31
32
|
type WorkflowHistoryRequestParams = {
|
|
@@ -35,6 +36,7 @@ type WorkflowHistoryRequestParams = {
|
|
|
35
36
|
type UpdateWorkflowHistoryVersion = {
|
|
36
37
|
nodes?: INode[];
|
|
37
38
|
connections?: IConnections;
|
|
39
|
+
nodeGroups?: IWorkflowGroup[];
|
|
38
40
|
authors?: string;
|
|
39
41
|
name?: string | null;
|
|
40
42
|
description?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflowHistory.mjs","names":[],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { PublishTimelineEvent } from '@n8n/api-types';\nimport type { IConnections, INode } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, patch, post } from '../utils';\n\nexport type WorkflowHistory = {\n\tversionId: string;\n\tauthors: string;\n\tcreatedAt: string;\n\tupdatedAt: string;\n\tworkflowPublishHistory: WorkflowPublishHistory[];\n\tname: string | null;\n\tdescription: string | null;\n};\n\nexport type WorkflowVersionData = Pick<WorkflowHistory, 'versionId' | 'name' | 'description'>;\n\nexport type WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string | null;\n\tworkflowId: string;\n};\n\nexport type WorkflowVersionId = WorkflowHistory['versionId'];\n\nexport type WorkflowVersion = WorkflowHistory & {\n\tworkflowId: string;\n\tnodes: INode[];\n\tconnections: IConnections;\n};\n\nexport type WorkflowHistoryActionTypes = Array<\n\t'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\n\nexport type UpdateWorkflowHistoryVersion = {\n\tnodes?: INode[];\n\tconnections?: IConnections;\n\tauthors?: string;\n\tname?: string | null;\n\tdescription?: string | null;\n};\n\nexport const getWorkflowHistory = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tqueryParams: WorkflowHistoryRequestParams,\n): Promise<WorkflowHistory[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}`,\n\t\tqueryParams,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n): Promise<WorkflowVersion> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/version/${versionId}`,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersionsByIds = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionIds: string[],\n): Promise<{ versions: Array<{ versionId: string; createdAt: string }> }> => {\n\tconst { data } = await post(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions`,\n\t\t{ versionIds },\n\t);\n\treturn data;\n};\n\nexport type { PublishTimelineEvent } from '@n8n/api-types';\n\nexport const getPublishTimeline = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n): Promise<PublishTimelineEvent[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/publish-timeline`,\n\t);\n\treturn data;\n};\n\nexport const updateWorkflowHistoryVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n\tdata: UpdateWorkflowHistoryVersion,\n): Promise<void> => {\n\tawait patch(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions/${versionId}`,\n\t\tdata,\n\t);\n};\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"workflowHistory.mjs","names":[],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { PublishTimelineEvent } from '@n8n/api-types';\nimport type { IConnections, INode, IWorkflowGroup } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, patch, post } from '../utils';\n\nexport type WorkflowHistory = {\n\tversionId: string;\n\tauthors: string;\n\tcreatedAt: string;\n\tupdatedAt: string;\n\tworkflowPublishHistory: WorkflowPublishHistory[];\n\tname: string | null;\n\tdescription: string | null;\n};\n\nexport type WorkflowVersionData = Pick<WorkflowHistory, 'versionId' | 'name' | 'description'>;\n\nexport type WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string | null;\n\tworkflowId: string;\n};\n\nexport type WorkflowVersionId = WorkflowHistory['versionId'];\n\nexport type WorkflowVersion = WorkflowHistory & {\n\tworkflowId: string;\n\tnodes: INode[];\n\tconnections: IConnections;\n\tnodeGroups?: IWorkflowGroup[];\n};\n\nexport type WorkflowHistoryActionTypes = Array<\n\t'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download' | 'name'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\n\nexport type UpdateWorkflowHistoryVersion = {\n\tnodes?: INode[];\n\tconnections?: IConnections;\n\tnodeGroups?: IWorkflowGroup[];\n\tauthors?: string;\n\tname?: string | null;\n\tdescription?: string | null;\n};\n\nexport const getWorkflowHistory = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tqueryParams: WorkflowHistoryRequestParams,\n): Promise<WorkflowHistory[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}`,\n\t\tqueryParams,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n): Promise<WorkflowVersion> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/version/${versionId}`,\n\t);\n\treturn data;\n};\n\nexport const getWorkflowVersionsByIds = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionIds: string[],\n): Promise<{ versions: Array<{ versionId: string; createdAt: string }> }> => {\n\tconst { data } = await post(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions`,\n\t\t{ versionIds },\n\t);\n\treturn data;\n};\n\nexport type { PublishTimelineEvent } from '@n8n/api-types';\n\nexport const getPublishTimeline = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n): Promise<PublishTimelineEvent[]> => {\n\tconst { data } = await get(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/publish-timeline`,\n\t);\n\treturn data;\n};\n\nexport const updateWorkflowHistoryVersion = async (\n\tcontext: IRestApiContext,\n\tworkflowId: string,\n\tversionId: string,\n\tdata: UpdateWorkflowHistoryVersion,\n): Promise<void> => {\n\tawait patch(\n\t\tcontext.baseUrl,\n\t\t`/workflow-history/workflow/${workflowId}/versions/${versionId}`,\n\t\tdata,\n\t);\n};\n"],"mappings":";;;AAmDA,MAAa,qBAAqB,OACjC,SACA,YACA,gBACgC;CAChC,MAAM,EAAE,SAAS,MAAM,IACtB,QAAQ,SACR,8BAA8B,cAC9B,YACA;AACD,QAAO;;AAGR,MAAa,qBAAqB,OACjC,SACA,YACA,cAC8B;CAC9B,MAAM,EAAE,SAAS,MAAM,IACtB,QAAQ,SACR,8BAA8B,WAAW,WAAW,YACpD;AACD,QAAO;;AAGR,MAAa,2BAA2B,OACvC,SACA,YACA,eAC4E;CAC5E,MAAM,EAAE,SAAS,MAAM,KACtB,QAAQ,SACR,8BAA8B,WAAW,YACzC,EAAE,YAAY,CACd;AACD,QAAO;;AAKR,MAAa,qBAAqB,OACjC,SACA,eACqC;CACrC,MAAM,EAAE,SAAS,MAAM,IACtB,QAAQ,SACR,8BAA8B,WAAW,mBACzC;AACD,QAAO;;AAGR,MAAa,+BAA+B,OAC3C,SACA,YACA,WACA,SACmB;AACnB,OAAM,MACL,QAAQ,SACR,8BAA8B,WAAW,YAAY,aACrD,KACA"}
|
package/dist/workflows.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ITag } from "./tags.cjs";
|
|
2
|
-
import { IConnections, INode, IPinData, IWorkflowSettings } from "n8n-workflow";
|
|
2
|
+
import { IConnections, INode, IPinData, IWorkflowGroup, IWorkflowSettings } from "n8n-workflow";
|
|
3
3
|
|
|
4
4
|
//#region src/api/workflows.d.ts
|
|
5
5
|
interface WorkflowMetadata {
|
|
@@ -20,6 +20,7 @@ interface WorkflowData {
|
|
|
20
20
|
versionId?: string;
|
|
21
21
|
activeVersionId?: string | null;
|
|
22
22
|
meta?: WorkflowMetadata;
|
|
23
|
+
nodeGroups?: IWorkflowGroup[];
|
|
23
24
|
}
|
|
24
25
|
interface WorkflowDataUpdate {
|
|
25
26
|
id?: string;
|
|
@@ -33,6 +34,7 @@ interface WorkflowDataUpdate {
|
|
|
33
34
|
pinData?: IPinData;
|
|
34
35
|
versionId?: string;
|
|
35
36
|
meta?: WorkflowMetadata;
|
|
37
|
+
nodeGroups?: IWorkflowGroup[];
|
|
36
38
|
parentFolderId?: string;
|
|
37
39
|
uiContext?: string;
|
|
38
40
|
expectedChecksum?: string;
|
package/dist/workflows.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ITag } from "./tags.mjs";
|
|
2
|
-
import { IConnections, INode, IPinData, IWorkflowSettings } from "n8n-workflow";
|
|
2
|
+
import { IConnections, INode, IPinData, IWorkflowGroup, IWorkflowSettings } from "n8n-workflow";
|
|
3
3
|
|
|
4
4
|
//#region src/api/workflows.d.ts
|
|
5
5
|
interface WorkflowMetadata {
|
|
@@ -20,6 +20,7 @@ interface WorkflowData {
|
|
|
20
20
|
versionId?: string;
|
|
21
21
|
activeVersionId?: string | null;
|
|
22
22
|
meta?: WorkflowMetadata;
|
|
23
|
+
nodeGroups?: IWorkflowGroup[];
|
|
23
24
|
}
|
|
24
25
|
interface WorkflowDataUpdate {
|
|
25
26
|
id?: string;
|
|
@@ -33,6 +34,7 @@ interface WorkflowDataUpdate {
|
|
|
33
34
|
pinData?: IPinData;
|
|
34
35
|
versionId?: string;
|
|
35
36
|
meta?: WorkflowMetadata;
|
|
37
|
+
nodeGroups?: IWorkflowGroup[];
|
|
36
38
|
parentFolderId?: string;
|
|
37
39
|
uiContext?: string;
|
|
38
40
|
expectedChecksum?: string;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/rest-api-client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.23.1",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"LICENSE_EE.md",
|
|
8
|
+
"LICENSE.md"
|
|
9
9
|
],
|
|
10
10
|
"main": "./dist/index.cjs",
|
|
11
11
|
"module": "./dist/index.mjs",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"js-base64": "3.7.8",
|
|
27
|
-
"axios": "1.16.
|
|
27
|
+
"axios": "1.16.1",
|
|
28
28
|
"flatted": "3.4.2",
|
|
29
|
-
"@n8n/
|
|
30
|
-
"@n8n/
|
|
31
|
-
"
|
|
32
|
-
"n8n
|
|
33
|
-
"@n8n/
|
|
29
|
+
"@n8n/constants": "0.25.0",
|
|
30
|
+
"@n8n/api-types": "1.23.1",
|
|
31
|
+
"n8n-workflow": "2.23.0",
|
|
32
|
+
"@n8n/utils": "1.32.0",
|
|
33
|
+
"@n8n/permissions": "0.61.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"typescript": "6.0.2",
|
|
40
40
|
"vite": "^8.0.2",
|
|
41
41
|
"vitest": "^4.1.1",
|
|
42
|
+
"@n8n/i18n": "2.23.0",
|
|
42
43
|
"@n8n/eslint-config": "0.0.1",
|
|
43
|
-
"@n8n/i18n": "2.22.2",
|
|
44
44
|
"@n8n/typescript-config": "1.4.0",
|
|
45
|
-
"@n8n/vitest-config": "1.
|
|
45
|
+
"@n8n/vitest-config": "1.12.0"
|
|
46
46
|
},
|
|
47
47
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
48
48
|
"homepage": "https://n8n.io",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const require_utils = require('../utils2.cjs');
|
|
2
|
-
|
|
3
|
-
//#region src/api/redaction-enforcement.ts
|
|
4
|
-
/**
|
|
5
|
-
* Single seam for the instance-level data-redaction enforcement API.
|
|
6
|
-
*
|
|
7
|
-
* Both endpoints currently piggyback on `/rest/settings/security` because the
|
|
8
|
-
* backend wiring lands in a follow-up (see IAM-619). When that ticket decides
|
|
9
|
-
* on its final surface (extend `SecuritySettingsController` vs. a new
|
|
10
|
-
* `/redaction-enforcement` endpoint vs. public-API), update the two URL
|
|
11
|
-
* constants below — no component changes required.
|
|
12
|
-
*/
|
|
13
|
-
const GET_ENDPOINT = "/settings/security";
|
|
14
|
-
const UPDATE_ENDPOINT = "/settings/security";
|
|
15
|
-
async function getRedactionEnforcement(context) {
|
|
16
|
-
const response = await require_utils.makeRestApiRequest(context, "GET", GET_ENDPOINT);
|
|
17
|
-
return {
|
|
18
|
-
redactionEnforced: response.redactionEnforced ?? false,
|
|
19
|
-
redactionScope: response.redactionScope ?? "non-manual"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
async function updateRedactionEnforcement(context, payload) {
|
|
23
|
-
await require_utils.makeRestApiRequest(context, "POST", UPDATE_ENDPOINT, payload);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
exports.getRedactionEnforcement = getRedactionEnforcement;
|
|
28
|
-
exports.updateRedactionEnforcement = updateRedactionEnforcement;
|
|
29
|
-
//# sourceMappingURL=redaction-enforcement.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redaction-enforcement.cjs","names":["makeRestApiRequest"],"sources":["../../src/api/redaction-enforcement.ts"],"sourcesContent":["import type { RedactionEnforcementDto, UpdateRedactionEnforcementDto } from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\n/**\n * Single seam for the instance-level data-redaction enforcement API.\n *\n * Both endpoints currently piggyback on `/rest/settings/security` because the\n * backend wiring lands in a follow-up (see IAM-619). When that ticket decides\n * on its final surface (extend `SecuritySettingsController` vs. a new\n * `/redaction-enforcement` endpoint vs. public-API), update the two URL\n * constants below — no component changes required.\n */\nconst GET_ENDPOINT = '/settings/security';\nconst UPDATE_ENDPOINT = '/settings/security';\n\nexport async function getRedactionEnforcement(\n\tcontext: IRestApiContext,\n): Promise<RedactionEnforcementDto> {\n\tconst response = await makeRestApiRequest<Partial<RedactionEnforcementDto>>(\n\t\tcontext,\n\t\t'GET',\n\t\tGET_ENDPOINT,\n\t);\n\treturn {\n\t\tredactionEnforced: response.redactionEnforced ?? false,\n\t\tredactionScope: response.redactionScope ?? 'non-manual',\n\t};\n}\n\nexport async function updateRedactionEnforcement(\n\tcontext: IRestApiContext,\n\tpayload: UpdateRedactionEnforcementDto,\n): Promise<void> {\n\tawait makeRestApiRequest(context, 'POST', UPDATE_ENDPOINT, payload);\n}\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAExB,eAAsB,wBACrB,SACmC;CACnC,MAAM,WAAW,MAAMA,iCACtB,SACA,OACA,aACA;AACD,QAAO;EACN,mBAAmB,SAAS,qBAAqB;EACjD,gBAAgB,SAAS,kBAAkB;EAC3C;;AAGF,eAAsB,2BACrB,SACA,SACgB;AAChB,OAAMA,iCAAmB,SAAS,QAAQ,iBAAiB,QAAQ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { t as IRestApiContext } from "../types2.cjs";
|
|
2
|
-
import { RedactionEnforcementDto, UpdateRedactionEnforcementDto } from "@n8n/api-types";
|
|
3
|
-
|
|
4
|
-
//#region src/api/redaction-enforcement.d.ts
|
|
5
|
-
declare function getRedactionEnforcement(context: IRestApiContext): Promise<RedactionEnforcementDto>;
|
|
6
|
-
declare function updateRedactionEnforcement(context: IRestApiContext, payload: UpdateRedactionEnforcementDto): Promise<void>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { getRedactionEnforcement, updateRedactionEnforcement };
|
|
9
|
-
//# sourceMappingURL=redaction-enforcement.d.cts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { t as IRestApiContext } from "../types2.mjs";
|
|
2
|
-
import { RedactionEnforcementDto, UpdateRedactionEnforcementDto } from "@n8n/api-types";
|
|
3
|
-
|
|
4
|
-
//#region src/api/redaction-enforcement.d.ts
|
|
5
|
-
declare function getRedactionEnforcement(context: IRestApiContext): Promise<RedactionEnforcementDto>;
|
|
6
|
-
declare function updateRedactionEnforcement(context: IRestApiContext, payload: UpdateRedactionEnforcementDto): Promise<void>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { getRedactionEnforcement, updateRedactionEnforcement };
|
|
9
|
-
//# sourceMappingURL=redaction-enforcement.d.mts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { s as makeRestApiRequest } from "../utils2.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/api/redaction-enforcement.ts
|
|
4
|
-
/**
|
|
5
|
-
* Single seam for the instance-level data-redaction enforcement API.
|
|
6
|
-
*
|
|
7
|
-
* Both endpoints currently piggyback on `/rest/settings/security` because the
|
|
8
|
-
* backend wiring lands in a follow-up (see IAM-619). When that ticket decides
|
|
9
|
-
* on its final surface (extend `SecuritySettingsController` vs. a new
|
|
10
|
-
* `/redaction-enforcement` endpoint vs. public-API), update the two URL
|
|
11
|
-
* constants below — no component changes required.
|
|
12
|
-
*/
|
|
13
|
-
const GET_ENDPOINT = "/settings/security";
|
|
14
|
-
const UPDATE_ENDPOINT = "/settings/security";
|
|
15
|
-
async function getRedactionEnforcement(context) {
|
|
16
|
-
const response = await makeRestApiRequest(context, "GET", GET_ENDPOINT);
|
|
17
|
-
return {
|
|
18
|
-
redactionEnforced: response.redactionEnforced ?? false,
|
|
19
|
-
redactionScope: response.redactionScope ?? "non-manual"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
async function updateRedactionEnforcement(context, payload) {
|
|
23
|
-
await makeRestApiRequest(context, "POST", UPDATE_ENDPOINT, payload);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { getRedactionEnforcement, updateRedactionEnforcement };
|
|
28
|
-
//# sourceMappingURL=redaction-enforcement.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redaction-enforcement.mjs","names":[],"sources":["../../src/api/redaction-enforcement.ts"],"sourcesContent":["import type { RedactionEnforcementDto, UpdateRedactionEnforcementDto } from '@n8n/api-types';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\n/**\n * Single seam for the instance-level data-redaction enforcement API.\n *\n * Both endpoints currently piggyback on `/rest/settings/security` because the\n * backend wiring lands in a follow-up (see IAM-619). When that ticket decides\n * on its final surface (extend `SecuritySettingsController` vs. a new\n * `/redaction-enforcement` endpoint vs. public-API), update the two URL\n * constants below — no component changes required.\n */\nconst GET_ENDPOINT = '/settings/security';\nconst UPDATE_ENDPOINT = '/settings/security';\n\nexport async function getRedactionEnforcement(\n\tcontext: IRestApiContext,\n): Promise<RedactionEnforcementDto> {\n\tconst response = await makeRestApiRequest<Partial<RedactionEnforcementDto>>(\n\t\tcontext,\n\t\t'GET',\n\t\tGET_ENDPOINT,\n\t);\n\treturn {\n\t\tredactionEnforced: response.redactionEnforced ?? false,\n\t\tredactionScope: response.redactionScope ?? 'non-manual',\n\t};\n}\n\nexport async function updateRedactionEnforcement(\n\tcontext: IRestApiContext,\n\tpayload: UpdateRedactionEnforcementDto,\n): Promise<void> {\n\tawait makeRestApiRequest(context, 'POST', UPDATE_ENDPOINT, payload);\n}\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAExB,eAAsB,wBACrB,SACmC;CACnC,MAAM,WAAW,MAAM,mBACtB,SACA,OACA,aACA;AACD,QAAO;EACN,mBAAmB,SAAS,qBAAqB;EACjD,gBAAgB,SAAS,kBAAkB;EAC3C;;AAGF,eAAsB,2BACrB,SACA,SACgB;AAChB,OAAM,mBAAmB,SAAS,QAAQ,iBAAiB,QAAQ"}
|