@atom8n/rest-api-client 2.2.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/README.md +22 -0
- package/dist/api/api-keys.cjs +8 -0
- package/dist/api/api-keys.d.cts +3 -0
- package/dist/api/api-keys.d.mts +3 -0
- package/dist/api/api-keys.mjs +4 -0
- package/dist/api/breaking-changes.cjs +18 -0
- package/dist/api/breaking-changes.cjs.map +1 -0
- package/dist/api/breaking-changes.d.cts +13 -0
- package/dist/api/breaking-changes.d.mts +13 -0
- package/dist/api/breaking-changes.mjs +16 -0
- package/dist/api/breaking-changes.mjs.map +1 -0
- package/dist/api/cloudPlans.cjs +9 -0
- package/dist/api/cloudPlans.d.cts +3 -0
- package/dist/api/cloudPlans.d.mts +3 -0
- package/dist/api/cloudPlans.mjs +4 -0
- package/dist/api/communityNodes.cjs +8 -0
- package/dist/api/communityNodes.d.cts +3 -0
- package/dist/api/communityNodes.d.mts +3 -0
- package/dist/api/communityNodes.mjs +4 -0
- package/dist/api/consent.cjs +14 -0
- package/dist/api/consent.cjs.map +1 -0
- package/dist/api/consent.d.cts +16 -0
- package/dist/api/consent.d.mts +16 -0
- package/dist/api/consent.mjs +13 -0
- package/dist/api/consent.mjs.map +1 -0
- package/dist/api/credentialResolvers.cjs +9 -0
- package/dist/api/credentialResolvers.d.cts +3 -0
- package/dist/api/credentialResolvers.d.mts +3 -0
- package/dist/api/credentialResolvers.mjs +4 -0
- package/dist/api/ctas.cjs +4 -0
- package/dist/api/ctas.d.cts +3 -0
- package/dist/api/ctas.d.mts +3 -0
- package/dist/api/ctas.mjs +4 -0
- package/dist/api/dynamic-banners.cjs +10 -0
- package/dist/api/dynamic-banners.cjs.map +1 -0
- package/dist/api/dynamic-banners.d.cts +25 -0
- package/dist/api/dynamic-banners.d.mts +25 -0
- package/dist/api/dynamic-banners.mjs +10 -0
- package/dist/api/dynamic-banners.mjs.map +1 -0
- package/dist/api/eventbus.ee.cjs +9 -0
- package/dist/api/eventbus.ee.d.cts +3 -0
- package/dist/api/eventbus.ee.d.mts +3 -0
- package/dist/api/eventbus.ee.mjs +4 -0
- package/dist/api/events.cjs +4 -0
- package/dist/api/events.d.cts +3 -0
- package/dist/api/events.d.mts +3 -0
- package/dist/api/events.mjs +4 -0
- package/dist/api/execution.cjs +0 -0
- package/dist/api/execution.d.cts +1 -0
- package/dist/api/execution.d.mts +1 -0
- package/dist/api/execution.mjs +1 -0
- package/dist/api/externalSecrets.ee.cjs +10 -0
- package/dist/api/externalSecrets.ee.d.cts +3 -0
- package/dist/api/externalSecrets.ee.d.mts +3 -0
- package/dist/api/externalSecrets.ee.mjs +4 -0
- package/dist/api/index.cjs +149 -0
- package/dist/api/index.d.cts +32 -0
- package/dist/api/index.d.mts +32 -0
- package/dist/api/index.mjs +31 -0
- package/dist/api/ldap.cjs +8 -0
- package/dist/api/ldap.d.cts +3 -0
- package/dist/api/ldap.d.mts +3 -0
- package/dist/api/ldap.mjs +4 -0
- package/dist/api/mfa.cjs +9 -0
- package/dist/api/mfa.d.cts +3 -0
- package/dist/api/mfa.d.mts +3 -0
- package/dist/api/mfa.mjs +4 -0
- package/dist/api/module-settings.cjs +4 -0
- package/dist/api/module-settings.d.cts +3 -0
- package/dist/api/module-settings.d.mts +3 -0
- package/dist/api/module-settings.mjs +4 -0
- package/dist/api/nodeTypes.cjs +13 -0
- package/dist/api/nodeTypes.d.cts +3 -0
- package/dist/api/nodeTypes.d.mts +3 -0
- package/dist/api/nodeTypes.mjs +4 -0
- package/dist/api/npsSurvey.cjs +4 -0
- package/dist/api/npsSurvey.d.cts +3 -0
- package/dist/api/npsSurvey.d.mts +3 -0
- package/dist/api/npsSurvey.mjs +4 -0
- package/dist/api/orchestration.cjs +4 -0
- package/dist/api/orchestration.d.cts +3 -0
- package/dist/api/orchestration.d.mts +3 -0
- package/dist/api/orchestration.mjs +4 -0
- package/dist/api/prompts.cjs +5 -0
- package/dist/api/prompts.d.cts +2 -0
- package/dist/api/prompts.d.mts +2 -0
- package/dist/api/prompts.mjs +4 -0
- package/dist/api/provisioning.cjs +5 -0
- package/dist/api/provisioning.d.cts +3 -0
- package/dist/api/provisioning.d.mts +3 -0
- package/dist/api/provisioning.mjs +4 -0
- package/dist/api/roles.cjs +8 -0
- package/dist/api/roles.d.cts +3 -0
- package/dist/api/roles.d.mts +3 -0
- package/dist/api/roles.mjs +4 -0
- package/dist/api/settings.cjs +4 -0
- package/dist/api/settings.d.cts +3 -0
- package/dist/api/settings.d.mts +3 -0
- package/dist/api/settings.mjs +4 -0
- package/dist/api/sso.cjs +12 -0
- package/dist/api/sso.d.cts +3 -0
- package/dist/api/sso.d.mts +3 -0
- package/dist/api/sso.mjs +4 -0
- package/dist/api/tags.cjs +0 -0
- package/dist/api/tags.d.cts +2 -0
- package/dist/api/tags.d.mts +2 -0
- package/dist/api/tags.mjs +1 -0
- package/dist/api/templates.cjs +10 -0
- package/dist/api/templates.d.cts +5 -0
- package/dist/api/templates.d.mts +5 -0
- package/dist/api/templates.mjs +4 -0
- package/dist/api/third-party-licenses.cjs +4 -0
- package/dist/api/third-party-licenses.d.cts +3 -0
- package/dist/api/third-party-licenses.d.mts +3 -0
- package/dist/api/third-party-licenses.mjs +4 -0
- package/dist/api/ui.cjs +4 -0
- package/dist/api/ui.d.cts +3 -0
- package/dist/api/ui.d.mts +3 -0
- package/dist/api/ui.mjs +4 -0
- package/dist/api/usage.cjs +8 -0
- package/dist/api/usage.d.cts +3 -0
- package/dist/api/usage.d.mts +3 -0
- package/dist/api/usage.mjs +4 -0
- package/dist/api/users.cjs +22 -0
- package/dist/api/users.d.cts +3 -0
- package/dist/api/users.d.mts +3 -0
- package/dist/api/users.mjs +4 -0
- package/dist/api/versions.cjs +5 -0
- package/dist/api/versions.d.cts +2 -0
- package/dist/api/versions.d.mts +2 -0
- package/dist/api/versions.mjs +4 -0
- package/dist/api/webhooks.cjs +4 -0
- package/dist/api/webhooks.d.cts +3 -0
- package/dist/api/webhooks.d.mts +3 -0
- package/dist/api/webhooks.mjs +4 -0
- package/dist/api/workflowHistory.cjs +6 -0
- package/dist/api/workflowHistory.d.cts +3 -0
- package/dist/api/workflowHistory.d.mts +3 -0
- package/dist/api/workflowHistory.mjs +4 -0
- package/dist/api/workflows.cjs +0 -0
- package/dist/api/workflows.d.cts +3 -0
- package/dist/api/workflows.d.mts +3 -0
- package/dist/api/workflows.mjs +1 -0
- package/dist/api-keys.cjs +51 -0
- package/dist/api-keys.cjs.map +1 -0
- package/dist/api-keys.d.cts +17 -0
- package/dist/api-keys.d.mts +17 -0
- package/dist/api-keys.mjs +22 -0
- package/dist/api-keys.mjs.map +1 -0
- package/dist/api.cjs +0 -0
- package/dist/api.mjs +1 -0
- package/dist/cloudPlans.cjs +60 -0
- package/dist/cloudPlans.cjs.map +1 -0
- package/dist/cloudPlans.d.cts +62 -0
- package/dist/cloudPlans.d.mts +62 -0
- package/dist/cloudPlans.mjs +25 -0
- package/dist/cloudPlans.mjs.map +1 -0
- package/dist/communityNodes.cjs +60 -0
- package/dist/communityNodes.cjs.map +1 -0
- package/dist/communityNodes.d.cts +12 -0
- package/dist/communityNodes.d.mts +12 -0
- package/dist/communityNodes.mjs +31 -0
- package/dist/communityNodes.mjs.map +1 -0
- package/dist/credentialResolvers.cjs +60 -0
- package/dist/credentialResolvers.cjs.map +1 -0
- package/dist/credentialResolvers.d.cts +21 -0
- package/dist/credentialResolvers.d.mts +21 -0
- package/dist/credentialResolvers.mjs +25 -0
- package/dist/credentialResolvers.mjs.map +1 -0
- package/dist/ctas.cjs +15 -0
- package/dist/ctas.cjs.map +1 -0
- package/dist/ctas.d.cts +7 -0
- package/dist/ctas.d.mts +7 -0
- package/dist/ctas.mjs +10 -0
- package/dist/ctas.mjs.map +1 -0
- package/dist/eventbus.ee.cjs +63 -0
- package/dist/eventbus.ee.cjs.map +1 -0
- package/dist/eventbus.ee.d.cts +16 -0
- package/dist/eventbus.ee.d.mts +16 -0
- package/dist/eventbus.ee.mjs +28 -0
- package/dist/eventbus.ee.mjs.map +1 -0
- package/dist/events.cjs +15 -0
- package/dist/events.cjs.map +1 -0
- package/dist/events.d.cts +7 -0
- package/dist/events.d.mts +7 -0
- package/dist/events.mjs +10 -0
- package/dist/events.mjs.map +1 -0
- package/dist/externalSecrets.ee.cjs +69 -0
- package/dist/externalSecrets.ee.cjs.map +1 -0
- package/dist/externalSecrets.ee.d.cts +18 -0
- package/dist/externalSecrets.ee.d.mts +18 -0
- package/dist/externalSecrets.ee.mjs +28 -0
- package/dist/externalSecrets.ee.mjs.map +1 -0
- package/dist/index.cjs +160 -0
- package/dist/index.d.cts +33 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.mjs +31 -0
- package/dist/index2.d.cts +1 -0
- package/dist/index2.d.mts +1 -0
- package/dist/ldap.cjs +51 -0
- package/dist/ldap.cjs.map +1 -0
- package/dist/ldap.d.cts +55 -0
- package/dist/ldap.d.mts +55 -0
- package/dist/ldap.mjs +22 -0
- package/dist/ldap.mjs.map +1 -0
- package/dist/mfa.cjs +60 -0
- package/dist/mfa.cjs.map +1 -0
- package/dist/mfa.d.cts +24 -0
- package/dist/mfa.d.mts +24 -0
- package/dist/mfa.mjs +25 -0
- package/dist/mfa.mjs.map +1 -0
- package/dist/module-settings.cjs +15 -0
- package/dist/module-settings.cjs.map +1 -0
- package/dist/module-settings.d.cts +8 -0
- package/dist/module-settings.d.mts +8 -0
- package/dist/module-settings.mjs +10 -0
- package/dist/module-settings.mjs.map +1 -0
- package/dist/nodeTypes.cjs +109 -0
- package/dist/nodeTypes.cjs.map +1 -0
- package/dist/nodeTypes.d.cts +19 -0
- package/dist/nodeTypes.d.mts +19 -0
- package/dist/nodeTypes.mjs +49 -0
- package/dist/nodeTypes.mjs.map +1 -0
- package/dist/npsSurvey.cjs +15 -0
- package/dist/npsSurvey.cjs.map +1 -0
- package/dist/npsSurvey.d.cts +8 -0
- package/dist/npsSurvey.d.mts +8 -0
- package/dist/npsSurvey.mjs +10 -0
- package/dist/npsSurvey.mjs.map +1 -0
- package/dist/orchestration.cjs +16 -0
- package/dist/orchestration.cjs.map +1 -0
- package/dist/orchestration.d.cts +7 -0
- package/dist/orchestration.d.mts +7 -0
- package/dist/orchestration.mjs +11 -0
- package/dist/orchestration.mjs.map +1 -0
- package/dist/prompts.cjs +31 -0
- package/dist/prompts.cjs.map +1 -0
- package/dist/prompts.d.cts +14 -0
- package/dist/prompts.d.mts +14 -0
- package/dist/prompts.mjs +20 -0
- package/dist/prompts.mjs.map +1 -0
- package/dist/provisioning.cjs +24 -0
- package/dist/provisioning.cjs.map +1 -0
- package/dist/provisioning.d.cts +15 -0
- package/dist/provisioning.d.mts +15 -0
- package/dist/provisioning.mjs +13 -0
- package/dist/provisioning.mjs.map +1 -0
- package/dist/roles.cjs +51 -0
- package/dist/roles.cjs.map +1 -0
- package/dist/roles.d.cts +15 -0
- package/dist/roles.d.mts +15 -0
- package/dist/roles.mjs +22 -0
- package/dist/roles.mjs.map +1 -0
- package/dist/settings.cjs +15 -0
- package/dist/settings.cjs.map +1 -0
- package/dist/settings.d.cts +8 -0
- package/dist/settings.d.mts +8 -0
- package/dist/settings.mjs +10 -0
- package/dist/settings.mjs.map +1 -0
- package/dist/sso.cjs +87 -0
- package/dist/sso.cjs.map +1 -0
- package/dist/sso.d.cts +20 -0
- package/dist/sso.d.mts +20 -0
- package/dist/sso.mjs +34 -0
- package/dist/sso.mjs.map +1 -0
- package/dist/tags.d.cts +11 -0
- package/dist/tags.d.mts +11 -0
- package/dist/templates.cjs +83 -0
- package/dist/templates.cjs.map +1 -0
- package/dist/templates.d.cts +129 -0
- package/dist/templates.d.mts +129 -0
- package/dist/templates.mjs +42 -0
- package/dist/templates.mjs.map +1 -0
- package/dist/third-party-licenses.cjs +19 -0
- package/dist/third-party-licenses.cjs.map +1 -0
- package/dist/third-party-licenses.d.cts +7 -0
- package/dist/third-party-licenses.d.mts +7 -0
- package/dist/third-party-licenses.mjs +14 -0
- package/dist/third-party-licenses.mjs.map +1 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/types2.d.cts +8 -0
- package/dist/types2.d.mts +8 -0
- package/dist/ui.cjs +15 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.cts +11 -0
- package/dist/ui.d.mts +11 -0
- package/dist/ui.mjs +10 -0
- package/dist/ui.mjs.map +1 -0
- package/dist/usage.cjs +51 -0
- package/dist/usage.cjs.map +1 -0
- package/dist/usage.d.cts +18 -0
- package/dist/usage.d.mts +18 -0
- package/dist/usage.mjs +22 -0
- package/dist/usage.mjs.map +1 -0
- package/dist/users.cjs +178 -0
- package/dist/users.cjs.map +1 -0
- package/dist/users.d.cts +133 -0
- package/dist/users.d.mts +133 -0
- package/dist/users.mjs +65 -0
- package/dist/users.mjs.map +1 -0
- package/dist/utils.cjs +13 -0
- package/dist/utils.d.cts +3 -0
- package/dist/utils.d.mts +3 -0
- package/dist/utils.mjs +3 -0
- package/dist/utils2.cjs +305 -0
- package/dist/utils2.cjs.map +1 -0
- package/dist/utils2.d.cts +42 -0
- package/dist/utils2.d.mts +42 -0
- package/dist/utils2.mjs +210 -0
- package/dist/utils2.mjs.map +1 -0
- package/dist/versions.cjs +28 -0
- package/dist/versions.cjs.map +1 -0
- package/dist/versions.d.cts +48 -0
- package/dist/versions.d.mts +48 -0
- package/dist/versions.mjs +17 -0
- package/dist/versions.mjs.map +1 -0
- package/dist/webhooks.cjs +15 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +17 -0
- package/dist/webhooks.d.mts +17 -0
- package/dist/webhooks.mjs +10 -0
- package/dist/webhooks.mjs.map +1 -0
- package/dist/workflowHistory.cjs +36 -0
- package/dist/workflowHistory.cjs.map +1 -0
- package/dist/workflowHistory.d.cts +43 -0
- package/dist/workflowHistory.d.mts +43 -0
- package/dist/workflowHistory.mjs +19 -0
- package/dist/workflowHistory.mjs.map +1 -0
- package/dist/workflows.d.cts +47 -0
- package/dist/workflows.d.mts +47 -0
- package/package.json +58 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const require_utils = require('./utils2.cjs');
|
|
2
|
+
let __n8n_constants = require("@n8n/constants");
|
|
3
|
+
|
|
4
|
+
//#region src/api/versions.ts
|
|
5
|
+
async function getNextVersions(endpoint, currentVersion, instanceId) {
|
|
6
|
+
return await require_utils.get(endpoint, currentVersion, {}, { [__n8n_constants.INSTANCE_ID_HEADER]: instanceId });
|
|
7
|
+
}
|
|
8
|
+
async function getWhatsNewSection(endpoint, currentVersion, instanceId) {
|
|
9
|
+
return await require_utils.get(endpoint, "", {}, {
|
|
10
|
+
[__n8n_constants.INSTANCE_ID_HEADER]: instanceId,
|
|
11
|
+
[__n8n_constants.INSTANCE_VERSION_HEADER]: currentVersion
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, 'getNextVersions', {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return getNextVersions;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, 'getWhatsNewSection', {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () {
|
|
25
|
+
return getWhatsNewSection;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=versions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.cjs","names":["get","INSTANCE_ID_HEADER","INSTANCE_VERSION_HEADER"],"sources":["../src/api/versions.ts"],"sourcesContent":["import { INSTANCE_ID_HEADER, INSTANCE_VERSION_HEADER } from '@n8n/constants';\nimport type { INodeParameters } from 'n8n-workflow';\n\nimport { get } from '../utils';\n\nexport interface VersionNode {\n\tname: string;\n\tdisplayName: string;\n\ticon: string;\n\ticonUrl?: string;\n\tdefaults: INodeParameters;\n\ticonData: {\n\t\ttype: string;\n\t\ticon?: string;\n\t\tfileBuffer?: string;\n\t};\n\ttypeVersion?: number;\n}\n\nexport interface Version {\n\tname: string;\n\tnodes: VersionNode[];\n\tcreatedAt: string;\n\tdescription: string;\n\tdocumentationUrl: string;\n\thasBreakingChange: boolean;\n\thasSecurityFix: boolean;\n\thasSecurityIssue: boolean;\n\tsecurityIssueFixVersion: string;\n}\n\nexport interface WhatsNewSection {\n\ttitle: string;\n\tcalloutText: string;\n\tfooter: string;\n\titems: WhatsNewArticle[];\n\tcreatedAt: string;\n\tupdatedAt: string | null;\n}\n\nexport interface WhatsNewArticle {\n\tid: number;\n\tcreatedAt: string;\n\tupdatedAt: string | null;\n\tpublishedAt: string;\n\ttitle: string;\n\tcontent: string;\n}\n\nexport async function getNextVersions(\n\tendpoint: string,\n\tcurrentVersion: string,\n\tinstanceId: string,\n): Promise<Version[]> {\n\tconst headers = { [INSTANCE_ID_HEADER as string]: instanceId };\n\treturn await get(endpoint, currentVersion, {}, headers);\n}\n\nexport async function getWhatsNewSection(\n\tendpoint: string,\n\tcurrentVersion: string,\n\tinstanceId: string,\n): Promise<WhatsNewSection> {\n\tconst headers = {\n\t\t[INSTANCE_ID_HEADER as string]: instanceId,\n\t\t[INSTANCE_VERSION_HEADER as string]: currentVersion,\n\t};\n\treturn await get(endpoint, '', {}, headers);\n}\n"],"mappings":";;;;AAiDA,eAAsB,gBACrB,UACA,gBACA,YACqB;AAErB,QAAO,MAAMA,kBAAI,UAAU,gBAAgB,EAAE,EAD7B,GAAGC,qCAA+B,YAAY,CACP;;AAGxD,eAAsB,mBACrB,UACA,gBACA,YAC2B;AAK3B,QAAO,MAAMD,kBAAI,UAAU,IAAI,EAAE,EAJjB;GACdC,qCAA+B;GAC/BC,0CAAoC;EACrC,CAC0C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { INodeParameters } from "n8n-workflow";
|
|
2
|
+
|
|
3
|
+
//#region src/api/versions.d.ts
|
|
4
|
+
interface VersionNode {
|
|
5
|
+
name: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
iconUrl?: string;
|
|
9
|
+
defaults: INodeParameters;
|
|
10
|
+
iconData: {
|
|
11
|
+
type: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
fileBuffer?: string;
|
|
14
|
+
};
|
|
15
|
+
typeVersion?: number;
|
|
16
|
+
}
|
|
17
|
+
interface Version {
|
|
18
|
+
name: string;
|
|
19
|
+
nodes: VersionNode[];
|
|
20
|
+
createdAt: string;
|
|
21
|
+
description: string;
|
|
22
|
+
documentationUrl: string;
|
|
23
|
+
hasBreakingChange: boolean;
|
|
24
|
+
hasSecurityFix: boolean;
|
|
25
|
+
hasSecurityIssue: boolean;
|
|
26
|
+
securityIssueFixVersion: string;
|
|
27
|
+
}
|
|
28
|
+
interface WhatsNewSection {
|
|
29
|
+
title: string;
|
|
30
|
+
calloutText: string;
|
|
31
|
+
footer: string;
|
|
32
|
+
items: WhatsNewArticle[];
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface WhatsNewArticle {
|
|
37
|
+
id: number;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string | null;
|
|
40
|
+
publishedAt: string;
|
|
41
|
+
title: string;
|
|
42
|
+
content: string;
|
|
43
|
+
}
|
|
44
|
+
declare function getNextVersions(endpoint: string, currentVersion: string, instanceId: string): Promise<Version[]>;
|
|
45
|
+
declare function getWhatsNewSection(endpoint: string, currentVersion: string, instanceId: string): Promise<WhatsNewSection>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getNextVersions as a, WhatsNewSection as i, VersionNode as n, getWhatsNewSection as o, WhatsNewArticle as r, Version as t };
|
|
48
|
+
//# sourceMappingURL=versions.d.cts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { INodeParameters } from "n8n-workflow";
|
|
2
|
+
|
|
3
|
+
//#region src/api/versions.d.ts
|
|
4
|
+
interface VersionNode {
|
|
5
|
+
name: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
iconUrl?: string;
|
|
9
|
+
defaults: INodeParameters;
|
|
10
|
+
iconData: {
|
|
11
|
+
type: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
fileBuffer?: string;
|
|
14
|
+
};
|
|
15
|
+
typeVersion?: number;
|
|
16
|
+
}
|
|
17
|
+
interface Version {
|
|
18
|
+
name: string;
|
|
19
|
+
nodes: VersionNode[];
|
|
20
|
+
createdAt: string;
|
|
21
|
+
description: string;
|
|
22
|
+
documentationUrl: string;
|
|
23
|
+
hasBreakingChange: boolean;
|
|
24
|
+
hasSecurityFix: boolean;
|
|
25
|
+
hasSecurityIssue: boolean;
|
|
26
|
+
securityIssueFixVersion: string;
|
|
27
|
+
}
|
|
28
|
+
interface WhatsNewSection {
|
|
29
|
+
title: string;
|
|
30
|
+
calloutText: string;
|
|
31
|
+
footer: string;
|
|
32
|
+
items: WhatsNewArticle[];
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string | null;
|
|
35
|
+
}
|
|
36
|
+
interface WhatsNewArticle {
|
|
37
|
+
id: number;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string | null;
|
|
40
|
+
publishedAt: string;
|
|
41
|
+
title: string;
|
|
42
|
+
content: string;
|
|
43
|
+
}
|
|
44
|
+
declare function getNextVersions(endpoint: string, currentVersion: string, instanceId: string): Promise<Version[]>;
|
|
45
|
+
declare function getWhatsNewSection(endpoint: string, currentVersion: string, instanceId: string): Promise<WhatsNewSection>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getNextVersions as a, WhatsNewSection as i, VersionNode as n, getWhatsNewSection as o, WhatsNewArticle as r, Version as t };
|
|
48
|
+
//# sourceMappingURL=versions.d.mts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { a as get } from "./utils2.mjs";
|
|
2
|
+
import { INSTANCE_ID_HEADER, INSTANCE_VERSION_HEADER } from "@n8n/constants";
|
|
3
|
+
|
|
4
|
+
//#region src/api/versions.ts
|
|
5
|
+
async function getNextVersions(endpoint, currentVersion, instanceId) {
|
|
6
|
+
return await get(endpoint, currentVersion, {}, { [INSTANCE_ID_HEADER]: instanceId });
|
|
7
|
+
}
|
|
8
|
+
async function getWhatsNewSection(endpoint, currentVersion, instanceId) {
|
|
9
|
+
return await get(endpoint, "", {}, {
|
|
10
|
+
[INSTANCE_ID_HEADER]: instanceId,
|
|
11
|
+
[INSTANCE_VERSION_HEADER]: currentVersion
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getWhatsNewSection as n, getNextVersions as t };
|
|
17
|
+
//# sourceMappingURL=versions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versions.mjs","names":[],"sources":["../src/api/versions.ts"],"sourcesContent":["import { INSTANCE_ID_HEADER, INSTANCE_VERSION_HEADER } from '@n8n/constants';\nimport type { INodeParameters } from 'n8n-workflow';\n\nimport { get } from '../utils';\n\nexport interface VersionNode {\n\tname: string;\n\tdisplayName: string;\n\ticon: string;\n\ticonUrl?: string;\n\tdefaults: INodeParameters;\n\ticonData: {\n\t\ttype: string;\n\t\ticon?: string;\n\t\tfileBuffer?: string;\n\t};\n\ttypeVersion?: number;\n}\n\nexport interface Version {\n\tname: string;\n\tnodes: VersionNode[];\n\tcreatedAt: string;\n\tdescription: string;\n\tdocumentationUrl: string;\n\thasBreakingChange: boolean;\n\thasSecurityFix: boolean;\n\thasSecurityIssue: boolean;\n\tsecurityIssueFixVersion: string;\n}\n\nexport interface WhatsNewSection {\n\ttitle: string;\n\tcalloutText: string;\n\tfooter: string;\n\titems: WhatsNewArticle[];\n\tcreatedAt: string;\n\tupdatedAt: string | null;\n}\n\nexport interface WhatsNewArticle {\n\tid: number;\n\tcreatedAt: string;\n\tupdatedAt: string | null;\n\tpublishedAt: string;\n\ttitle: string;\n\tcontent: string;\n}\n\nexport async function getNextVersions(\n\tendpoint: string,\n\tcurrentVersion: string,\n\tinstanceId: string,\n): Promise<Version[]> {\n\tconst headers = { [INSTANCE_ID_HEADER as string]: instanceId };\n\treturn await get(endpoint, currentVersion, {}, headers);\n}\n\nexport async function getWhatsNewSection(\n\tendpoint: string,\n\tcurrentVersion: string,\n\tinstanceId: string,\n): Promise<WhatsNewSection> {\n\tconst headers = {\n\t\t[INSTANCE_ID_HEADER as string]: instanceId,\n\t\t[INSTANCE_VERSION_HEADER as string]: currentVersion,\n\t};\n\treturn await get(endpoint, '', {}, headers);\n}\n"],"mappings":";;;;AAiDA,eAAsB,gBACrB,UACA,gBACA,YACqB;AAErB,QAAO,MAAM,IAAI,UAAU,gBAAgB,EAAE,EAD7B,GAAG,qBAA+B,YAAY,CACP;;AAGxD,eAAsB,mBACrB,UACA,gBACA,YAC2B;AAK3B,QAAO,MAAM,IAAI,UAAU,IAAI,EAAE,EAJjB;GACd,qBAA+B;GAC/B,0BAAoC;EACrC,CAC0C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_utils = require('./utils2.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/api/webhooks.ts
|
|
4
|
+
const findWebhook = async (context, data) => {
|
|
5
|
+
return await require_utils.makeRestApiRequest(context, "POST", "/webhooks/find", data);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, 'findWebhook', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return findWebhook;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=webhooks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.cjs","names":["makeRestApiRequest"],"sources":["../src/api/webhooks.ts"],"sourcesContent":["import type { IHttpRequestMethods } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\ntype WebhookData = {\n\tworkflowId: string;\n\twebhookPath: string;\n\tmethod: IHttpRequestMethods;\n\tnode: string;\n};\n\nexport const findWebhook = async (\n\tcontext: IRestApiContext,\n\tdata: { path: string; method: string },\n): Promise<WebhookData | null> => {\n\treturn await makeRestApiRequest(context, 'POST', '/webhooks/find', data);\n};\n"],"mappings":";;;AAYA,MAAa,cAAc,OAC1B,SACA,SACiC;AACjC,QAAO,MAAMA,iCAAmB,SAAS,QAAQ,kBAAkB,KAAK"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as IRestApiContext } from "./types2.cjs";
|
|
2
|
+
import { IHttpRequestMethods } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/webhooks.d.ts
|
|
5
|
+
type WebhookData = {
|
|
6
|
+
workflowId: string;
|
|
7
|
+
webhookPath: string;
|
|
8
|
+
method: IHttpRequestMethods;
|
|
9
|
+
node: string;
|
|
10
|
+
};
|
|
11
|
+
declare const findWebhook: (context: IRestApiContext, data: {
|
|
12
|
+
path: string;
|
|
13
|
+
method: string;
|
|
14
|
+
}) => Promise<WebhookData | null>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { findWebhook as t };
|
|
17
|
+
//# sourceMappingURL=webhooks.d.cts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as IRestApiContext } from "./types2.mjs";
|
|
2
|
+
import { IHttpRequestMethods } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/webhooks.d.ts
|
|
5
|
+
type WebhookData = {
|
|
6
|
+
workflowId: string;
|
|
7
|
+
webhookPath: string;
|
|
8
|
+
method: IHttpRequestMethods;
|
|
9
|
+
node: string;
|
|
10
|
+
};
|
|
11
|
+
declare const findWebhook: (context: IRestApiContext, data: {
|
|
12
|
+
path: string;
|
|
13
|
+
method: string;
|
|
14
|
+
}) => Promise<WebhookData | null>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { findWebhook as t };
|
|
17
|
+
//# sourceMappingURL=webhooks.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { s as makeRestApiRequest } from "./utils2.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/api/webhooks.ts
|
|
4
|
+
const findWebhook = async (context, data) => {
|
|
5
|
+
return await makeRestApiRequest(context, "POST", "/webhooks/find", data);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { findWebhook as t };
|
|
10
|
+
//# sourceMappingURL=webhooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.mjs","names":[],"sources":["../src/api/webhooks.ts"],"sourcesContent":["import type { IHttpRequestMethods } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { makeRestApiRequest } from '../utils';\n\ntype WebhookData = {\n\tworkflowId: string;\n\twebhookPath: string;\n\tmethod: IHttpRequestMethods;\n\tnode: string;\n};\n\nexport const findWebhook = async (\n\tcontext: IRestApiContext,\n\tdata: { path: string; method: string },\n): Promise<WebhookData | null> => {\n\treturn await makeRestApiRequest(context, 'POST', '/webhooks/find', data);\n};\n"],"mappings":";;;AAYA,MAAa,cAAc,OAC1B,SACA,SACiC;AACjC,QAAO,MAAM,mBAAmB,SAAS,QAAQ,kBAAkB,KAAK"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const require_utils = require('./utils2.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/api/workflowHistory.ts
|
|
4
|
+
const getWorkflowHistory = async (context, workflowId, queryParams) => {
|
|
5
|
+
const { data } = await require_utils.get(context.baseUrl, `/workflow-history/workflow/${workflowId}`, queryParams);
|
|
6
|
+
return data;
|
|
7
|
+
};
|
|
8
|
+
const getWorkflowVersion = async (context, workflowId, versionId) => {
|
|
9
|
+
const { data } = await require_utils.get(context.baseUrl, `/workflow-history/workflow/${workflowId}/version/${versionId}`);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
const getWorkflowVersionsByIds = async (context, workflowId, versionIds) => {
|
|
13
|
+
const { data } = await require_utils.post(context.baseUrl, `/workflow-history/workflow/${workflowId}/versions`, { versionIds });
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
Object.defineProperty(exports, 'getWorkflowHistory', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return getWorkflowHistory;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, 'getWorkflowVersion', {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return getWorkflowVersion;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, 'getWorkflowVersionsByIds', {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return getWorkflowVersionsByIds;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=workflowHistory.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowHistory.cjs","names":["get","post"],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { IConnections, INode } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, 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 WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string;\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'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\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"],"mappings":";;;AAsCA,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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t as IRestApiContext } from "./types2.cjs";
|
|
2
|
+
import { IConnections, INode } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/workflowHistory.d.ts
|
|
5
|
+
type WorkflowHistory = {
|
|
6
|
+
versionId: string;
|
|
7
|
+
authors: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
workflowPublishHistory: WorkflowPublishHistory[];
|
|
11
|
+
name: string | null;
|
|
12
|
+
description: string | null;
|
|
13
|
+
};
|
|
14
|
+
type WorkflowPublishHistory = {
|
|
15
|
+
createdAt: string;
|
|
16
|
+
id: number;
|
|
17
|
+
event: 'activated' | 'deactivated';
|
|
18
|
+
userId: string | null;
|
|
19
|
+
versionId: string;
|
|
20
|
+
workflowId: string;
|
|
21
|
+
};
|
|
22
|
+
type WorkflowVersionId = WorkflowHistory['versionId'];
|
|
23
|
+
type WorkflowVersion = WorkflowHistory & {
|
|
24
|
+
workflowId: string;
|
|
25
|
+
nodes: INode[];
|
|
26
|
+
connections: IConnections;
|
|
27
|
+
};
|
|
28
|
+
type WorkflowHistoryActionTypes = Array<'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download'>;
|
|
29
|
+
type WorkflowHistoryRequestParams = {
|
|
30
|
+
take: number;
|
|
31
|
+
skip?: number;
|
|
32
|
+
};
|
|
33
|
+
declare const getWorkflowHistory: (context: IRestApiContext, workflowId: string, queryParams: WorkflowHistoryRequestParams) => Promise<WorkflowHistory[]>;
|
|
34
|
+
declare const getWorkflowVersion: (context: IRestApiContext, workflowId: string, versionId: string) => Promise<WorkflowVersion>;
|
|
35
|
+
declare const getWorkflowVersionsByIds: (context: IRestApiContext, workflowId: string, versionIds: string[]) => Promise<{
|
|
36
|
+
versions: Array<{
|
|
37
|
+
versionId: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { WorkflowVersion as a, getWorkflowVersion as c, WorkflowPublishHistory as i, getWorkflowVersionsByIds as l, WorkflowHistoryActionTypes as n, WorkflowVersionId as o, WorkflowHistoryRequestParams as r, getWorkflowHistory as s, WorkflowHistory as t };
|
|
43
|
+
//# sourceMappingURL=workflowHistory.d.cts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { t as IRestApiContext } from "./types2.mjs";
|
|
2
|
+
import { IConnections, INode } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/workflowHistory.d.ts
|
|
5
|
+
type WorkflowHistory = {
|
|
6
|
+
versionId: string;
|
|
7
|
+
authors: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
workflowPublishHistory: WorkflowPublishHistory[];
|
|
11
|
+
name: string | null;
|
|
12
|
+
description: string | null;
|
|
13
|
+
};
|
|
14
|
+
type WorkflowPublishHistory = {
|
|
15
|
+
createdAt: string;
|
|
16
|
+
id: number;
|
|
17
|
+
event: 'activated' | 'deactivated';
|
|
18
|
+
userId: string | null;
|
|
19
|
+
versionId: string;
|
|
20
|
+
workflowId: string;
|
|
21
|
+
};
|
|
22
|
+
type WorkflowVersionId = WorkflowHistory['versionId'];
|
|
23
|
+
type WorkflowVersion = WorkflowHistory & {
|
|
24
|
+
workflowId: string;
|
|
25
|
+
nodes: INode[];
|
|
26
|
+
connections: IConnections;
|
|
27
|
+
};
|
|
28
|
+
type WorkflowHistoryActionTypes = Array<'restore' | 'publish' | 'unpublish' | 'clone' | 'open' | 'download'>;
|
|
29
|
+
type WorkflowHistoryRequestParams = {
|
|
30
|
+
take: number;
|
|
31
|
+
skip?: number;
|
|
32
|
+
};
|
|
33
|
+
declare const getWorkflowHistory: (context: IRestApiContext, workflowId: string, queryParams: WorkflowHistoryRequestParams) => Promise<WorkflowHistory[]>;
|
|
34
|
+
declare const getWorkflowVersion: (context: IRestApiContext, workflowId: string, versionId: string) => Promise<WorkflowVersion>;
|
|
35
|
+
declare const getWorkflowVersionsByIds: (context: IRestApiContext, workflowId: string, versionIds: string[]) => Promise<{
|
|
36
|
+
versions: Array<{
|
|
37
|
+
versionId: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { WorkflowVersion as a, getWorkflowVersion as c, WorkflowPublishHistory as i, getWorkflowVersionsByIds as l, WorkflowHistoryActionTypes as n, WorkflowVersionId as o, WorkflowHistoryRequestParams as r, getWorkflowHistory as s, WorkflowHistory as t };
|
|
43
|
+
//# sourceMappingURL=workflowHistory.d.mts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as get, l as post } from "./utils2.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/api/workflowHistory.ts
|
|
4
|
+
const getWorkflowHistory = async (context, workflowId, queryParams) => {
|
|
5
|
+
const { data } = await get(context.baseUrl, `/workflow-history/workflow/${workflowId}`, queryParams);
|
|
6
|
+
return data;
|
|
7
|
+
};
|
|
8
|
+
const getWorkflowVersion = async (context, workflowId, versionId) => {
|
|
9
|
+
const { data } = await get(context.baseUrl, `/workflow-history/workflow/${workflowId}/version/${versionId}`);
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
const getWorkflowVersionsByIds = async (context, workflowId, versionIds) => {
|
|
13
|
+
const { data } = await post(context.baseUrl, `/workflow-history/workflow/${workflowId}/versions`, { versionIds });
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getWorkflowVersion as n, getWorkflowVersionsByIds as r, getWorkflowHistory as t };
|
|
19
|
+
//# sourceMappingURL=workflowHistory.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowHistory.mjs","names":[],"sources":["../src/api/workflowHistory.ts"],"sourcesContent":["import type { IConnections, INode } from 'n8n-workflow';\n\nimport type { IRestApiContext } from '../types';\nimport { get, 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 WorkflowPublishHistory = {\n\tcreatedAt: string;\n\tid: number;\n\tevent: 'activated' | 'deactivated';\n\tuserId: string | null;\n\tversionId: string;\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'\n>;\n\nexport type WorkflowHistoryRequestParams = { take: number; skip?: number };\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"],"mappings":";;;AAsCA,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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as ITag } from "./tags.cjs";
|
|
2
|
+
import { IConnections, INode, IPinData, IWorkflowSettings } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/workflows.d.ts
|
|
5
|
+
interface WorkflowMetadata {
|
|
6
|
+
onboardingId?: string;
|
|
7
|
+
templateId?: string;
|
|
8
|
+
instanceId?: string;
|
|
9
|
+
templateCredsSetupCompleted?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface WorkflowData {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
nodes: INode[];
|
|
16
|
+
connections: IConnections;
|
|
17
|
+
settings?: IWorkflowSettings;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
pinData?: IPinData;
|
|
20
|
+
versionId?: string;
|
|
21
|
+
activeVersionId?: string | null;
|
|
22
|
+
meta?: WorkflowMetadata;
|
|
23
|
+
}
|
|
24
|
+
interface WorkflowDataUpdate {
|
|
25
|
+
id?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
nodes?: INode[];
|
|
29
|
+
connections?: IConnections;
|
|
30
|
+
settings?: IWorkflowSettings;
|
|
31
|
+
active?: boolean;
|
|
32
|
+
tags?: ITag[] | string[];
|
|
33
|
+
pinData?: IPinData;
|
|
34
|
+
versionId?: string;
|
|
35
|
+
meta?: WorkflowMetadata;
|
|
36
|
+
parentFolderId?: string;
|
|
37
|
+
uiContext?: string;
|
|
38
|
+
expectedChecksum?: string;
|
|
39
|
+
aiBuilderAssisted?: boolean;
|
|
40
|
+
autosaved?: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface WorkflowDataCreate extends WorkflowDataUpdate {
|
|
43
|
+
projectId?: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { WorkflowMetadata as i, WorkflowDataCreate as n, WorkflowDataUpdate as r, WorkflowData as t };
|
|
47
|
+
//# sourceMappingURL=workflows.d.cts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as ITag } from "./tags.mjs";
|
|
2
|
+
import { IConnections, INode, IPinData, IWorkflowSettings } from "n8n-workflow";
|
|
3
|
+
|
|
4
|
+
//#region src/api/workflows.d.ts
|
|
5
|
+
interface WorkflowMetadata {
|
|
6
|
+
onboardingId?: string;
|
|
7
|
+
templateId?: string;
|
|
8
|
+
instanceId?: string;
|
|
9
|
+
templateCredsSetupCompleted?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface WorkflowData {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
nodes: INode[];
|
|
16
|
+
connections: IConnections;
|
|
17
|
+
settings?: IWorkflowSettings;
|
|
18
|
+
tags?: string[];
|
|
19
|
+
pinData?: IPinData;
|
|
20
|
+
versionId?: string;
|
|
21
|
+
activeVersionId?: string | null;
|
|
22
|
+
meta?: WorkflowMetadata;
|
|
23
|
+
}
|
|
24
|
+
interface WorkflowDataUpdate {
|
|
25
|
+
id?: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
nodes?: INode[];
|
|
29
|
+
connections?: IConnections;
|
|
30
|
+
settings?: IWorkflowSettings;
|
|
31
|
+
active?: boolean;
|
|
32
|
+
tags?: ITag[] | string[];
|
|
33
|
+
pinData?: IPinData;
|
|
34
|
+
versionId?: string;
|
|
35
|
+
meta?: WorkflowMetadata;
|
|
36
|
+
parentFolderId?: string;
|
|
37
|
+
uiContext?: string;
|
|
38
|
+
expectedChecksum?: string;
|
|
39
|
+
aiBuilderAssisted?: boolean;
|
|
40
|
+
autosaved?: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface WorkflowDataCreate extends WorkflowDataUpdate {
|
|
43
|
+
projectId?: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { WorkflowMetadata as i, WorkflowDataCreate as n, WorkflowDataUpdate as r, WorkflowData as t };
|
|
47
|
+
//# sourceMappingURL=workflows.d.mts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atom8n/rest-api-client",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.2.0",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.mts",
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./*": {
|
|
18
|
+
"types": "./dist/*.d.mts",
|
|
19
|
+
"import": "./dist/*.mjs",
|
|
20
|
+
"require": "./dist/*.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "tsdown --watch",
|
|
25
|
+
"build": "tsdown",
|
|
26
|
+
"preview": "vite preview",
|
|
27
|
+
"typecheck": "vue-tsc --noEmit",
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"test:dev": "vitest --silent=false",
|
|
30
|
+
"lint": "eslint src --quiet",
|
|
31
|
+
"lint:fix": "eslint src --fix",
|
|
32
|
+
"format": "biome format --write . && prettier --write . --ignore-path ../../../../.prettierignore",
|
|
33
|
+
"format:check": "biome ci . && prettier --check . --ignore-path ../../../../.prettierignore"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@atom8n/api-types": "1.2.0",
|
|
37
|
+
"@atom8n/constants": "0.15.0",
|
|
38
|
+
"@atom8n/permissions": "0.45.0",
|
|
39
|
+
"@atom8n/utils": "1.21.0",
|
|
40
|
+
"js-base64": "catalog:",
|
|
41
|
+
"@atom8n/n8n-workflow": "2.2.0",
|
|
42
|
+
"axios": "catalog:",
|
|
43
|
+
"flatted": "catalog:"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@n8n/eslint-config": "*",
|
|
47
|
+
"@atom8n/i18n": "2.2.0",
|
|
48
|
+
"@atom8n/typescript-config": "1.3.0",
|
|
49
|
+
"@atom8n/vitest-config": "1.5.0",
|
|
50
|
+
"@testing-library/jest-dom": "catalog:frontend",
|
|
51
|
+
"@testing-library/user-event": "catalog:frontend",
|
|
52
|
+
"tsdown": "catalog:",
|
|
53
|
+
"typescript": "catalog:",
|
|
54
|
+
"vite": "catalog:",
|
|
55
|
+
"vitest": "catalog:"
|
|
56
|
+
},
|
|
57
|
+
"license": "See LICENSE.md file in the root of the repository"
|
|
58
|
+
}
|