@n8n/rest-api-client 1.7.0 → 1.8.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.
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkPF2UUTTIcjs = require('../chunk-PF2UUTTI.cjs');
7
+ var _chunk2UDX6KSWcjs = require('../chunk-2UDX6KSW.cjs');
8
8
  require('../chunk-CXANUEOE.cjs');
9
9
 
10
10
 
@@ -12,5 +12,5 @@ require('../chunk-CXANUEOE.cjs');
12
12
 
13
13
 
14
14
 
15
- exports.getAdminPanelLoginCode = _chunkPF2UUTTIcjs.getAdminPanelLoginCode; exports.getCloudUserInfo = _chunkPF2UUTTIcjs.getCloudUserInfo; exports.getCurrentPlan = _chunkPF2UUTTIcjs.getCurrentPlan; exports.getCurrentUsage = _chunkPF2UUTTIcjs.getCurrentUsage; exports.sendConfirmationEmail = _chunkPF2UUTTIcjs.sendConfirmationEmail;
15
+ exports.getAdminPanelLoginCode = _chunk2UDX6KSWcjs.getAdminPanelLoginCode; exports.getCloudUserInfo = _chunk2UDX6KSWcjs.getCloudUserInfo; exports.getCurrentPlan = _chunk2UDX6KSWcjs.getCurrentPlan; exports.getCurrentUsage = _chunk2UDX6KSWcjs.getCurrentUsage; exports.sendConfirmationEmail = _chunk2UDX6KSWcjs.sendConfirmationEmail;
16
16
  //# sourceMappingURL=cloudPlans.cjs.map
@@ -27,6 +27,10 @@ declare namespace Cloud {
27
27
  email: string;
28
28
  hasEarlyAccess?: boolean;
29
29
  role?: string;
30
+ selectedApps?: string[];
31
+ information?: {
32
+ [key: string]: string | string[];
33
+ };
30
34
  };
31
35
  }
32
36
  interface InstanceUsage {
@@ -27,6 +27,10 @@ declare namespace Cloud {
27
27
  email: string;
28
28
  hasEarlyAccess?: boolean;
29
29
  role?: string;
30
+ selectedApps?: string[];
31
+ information?: {
32
+ [key: string]: string | string[];
33
+ };
30
34
  };
31
35
  }
32
36
  interface InstanceUsage {
@@ -4,7 +4,7 @@ import {
4
4
  getCurrentPlan,
5
5
  getCurrentUsage,
6
6
  sendConfirmationEmail
7
- } from "../chunk-RI442553.js";
7
+ } from "../chunk-DBKI426S.js";
8
8
  import "../chunk-SHSKCS7V.js";
9
9
  export {
10
10
  getAdminPanelLoginCode,
@@ -44,7 +44,7 @@ require('../chunk-F2BR3GFD.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkYJZ7IQYEcjs = require('../chunk-YJZ7IQYE.cjs');
47
+ var _chunkN3KYHSJNcjs = require('../chunk-N3KYHSJN.cjs');
48
48
 
49
49
 
50
50
  var _chunkDSZQ3LTRcjs = require('../chunk-DSZQ3LTR.cjs');
@@ -97,7 +97,7 @@ var _chunkK5WSAZTLcjs = require('../chunk-K5WSAZTL.cjs');
97
97
 
98
98
 
99
99
 
100
- var _chunkPF2UUTTIcjs = require('../chunk-PF2UUTTI.cjs');
100
+ var _chunk2UDX6KSWcjs = require('../chunk-2UDX6KSW.cjs');
101
101
 
102
102
 
103
103
 
@@ -191,5 +191,5 @@ require('../chunk-CXANUEOE.cjs');
191
191
 
192
192
 
193
193
 
194
- exports.canEnableMFA = _chunkOV7UJVKRcjs.canEnableMFA; exports.createApiKey = _chunkK5WSAZTLcjs.createApiKey; exports.deleteApiKey = _chunkK5WSAZTLcjs.deleteApiKey; exports.deleteDestinationFromDb = _chunkOB6QUZZOcjs.deleteDestinationFromDb; exports.disableMfa = _chunkOV7UJVKRcjs.disableMfa; exports.dismissBannerPermanently = _chunkDSZQ3LTRcjs.dismissBannerPermanently; exports.enableMfa = _chunkOV7UJVKRcjs.enableMfa; exports.fetchCommunityNodeAttributes = _chunkXR664FGVcjs.fetchCommunityNodeAttributes; exports.fetchCommunityNodeTypes = _chunkXR664FGVcjs.fetchCommunityNodeTypes; exports.findWebhook = _chunkC7EDXYMGcjs.findWebhook; exports.getAdminPanelLoginCode = _chunkPF2UUTTIcjs.getAdminPanelLoginCode; exports.getApiKeyScopes = _chunkK5WSAZTLcjs.getApiKeyScopes; exports.getApiKeys = _chunkK5WSAZTLcjs.getApiKeys; exports.getAvailableCommunityPackageCount = _chunkOHF4O34Mcjs.getAvailableCommunityPackageCount; exports.getBecomeCreatorCta = _chunkOOJBVMQTcjs.getBecomeCreatorCta; exports.getCategories = _chunkYJZ7IQYEcjs.getCategories; exports.getCloudUserInfo = _chunkPF2UUTTIcjs.getCloudUserInfo; exports.getCollectionById = _chunkYJZ7IQYEcjs.getCollectionById; exports.getCollections = _chunkYJZ7IQYEcjs.getCollections; exports.getCurrentPlan = _chunkPF2UUTTIcjs.getCurrentPlan; exports.getCurrentUsage = _chunkPF2UUTTIcjs.getCurrentUsage; exports.getDestinationsFromBackend = _chunkOB6QUZZOcjs.getDestinationsFromBackend; exports.getEventNamesFromBackend = _chunkOB6QUZZOcjs.getEventNamesFromBackend; exports.getInstalledCommunityNodes = _chunkOHF4O34Mcjs.getInstalledCommunityNodes; exports.getLdapConfig = _chunkZYTDV3ZPcjs.getLdapConfig; exports.getLdapSynchronizations = _chunkZYTDV3ZPcjs.getLdapSynchronizations; exports.getLocalResourceMapperFields = _chunkXR664FGVcjs.getLocalResourceMapperFields; exports.getMfaQR = _chunkOV7UJVKRcjs.getMfaQR; exports.getModuleSettings = _chunkSROE4HVCcjs.getModuleSettings; exports.getNextVersions = _chunkO3LVSY2Ocjs.getNextVersions; exports.getNodeParameterActionResult = _chunkXR664FGVcjs.getNodeParameterActionResult; exports.getNodeParameterOptions = _chunkXR664FGVcjs.getNodeParameterOptions; exports.getNodeTranslationHeaders = _chunkXR664FGVcjs.getNodeTranslationHeaders; exports.getNodeTypes = _chunkXR664FGVcjs.getNodeTypes; exports.getNodesInformation = _chunkXR664FGVcjs.getNodesInformation; exports.getOidcConfig = _chunkXCKMEOZ6cjs.getOidcConfig; exports.getPromptsData = _chunk7P4MIN3Icjs.getPromptsData; exports.getResourceLocatorResults = _chunkXR664FGVcjs.getResourceLocatorResults; exports.getResourceMapperFields = _chunkXR664FGVcjs.getResourceMapperFields; exports.getRoles = _chunkLZN3X7AKcjs.getRoles; exports.getSamlConfig = _chunkXCKMEOZ6cjs.getSamlConfig; exports.getSamlMetadata = _chunkXCKMEOZ6cjs.getSamlMetadata; exports.getSettings = _chunk3FTGUK44cjs.getSettings; exports.getTemplateById = _chunkYJZ7IQYEcjs.getTemplateById; exports.getWhatsNewSection = _chunkO3LVSY2Ocjs.getWhatsNewSection; exports.getWorkflowHistory = _chunkSW7IBR4Ecjs.getWorkflowHistory; exports.getWorkflowTemplate = _chunkYJZ7IQYEcjs.getWorkflowTemplate; exports.getWorkflowVersion = _chunkSW7IBR4Ecjs.getWorkflowVersion; exports.getWorkflows = _chunkYJZ7IQYEcjs.getWorkflows; exports.hasDestinationId = _chunkOB6QUZZOcjs.hasDestinationId; exports.initOidcLogin = _chunkXCKMEOZ6cjs.initOidcLogin; exports.initSSO = _chunkXCKMEOZ6cjs.initSSO; exports.installNewPackage = _chunkOHF4O34Mcjs.installNewPackage; exports.runLdapSync = _chunkZYTDV3ZPcjs.runLdapSync; exports.saveDestinationToDb = _chunkOB6QUZZOcjs.saveDestinationToDb; exports.saveOidcConfig = _chunkXCKMEOZ6cjs.saveOidcConfig; exports.saveSamlConfig = _chunkXCKMEOZ6cjs.saveSamlConfig; exports.sendConfirmationEmail = _chunkPF2UUTTIcjs.sendConfirmationEmail; exports.sendGetWorkerStatus = _chunkJKPZR2TJcjs.sendGetWorkerStatus; exports.sendTestMessageToDestination = _chunkOB6QUZZOcjs.sendTestMessageToDestination; exports.sessionStarted = _chunkY55DMGV3cjs.sessionStarted; exports.submitContactInfo = _chunk7P4MIN3Icjs.submitContactInfo; exports.testHealthEndpoint = _chunkYJZ7IQYEcjs.testHealthEndpoint; exports.testLdapConnection = _chunkZYTDV3ZPcjs.testLdapConnection; exports.testSamlConfig = _chunkXCKMEOZ6cjs.testSamlConfig; exports.toggleSamlConfig = _chunkXCKMEOZ6cjs.toggleSamlConfig; exports.uninstallPackage = _chunkOHF4O34Mcjs.uninstallPackage; exports.updateApiKey = _chunkK5WSAZTLcjs.updateApiKey; exports.updateEnforceMfa = _chunkOV7UJVKRcjs.updateEnforceMfa; exports.updateLdapConfig = _chunkZYTDV3ZPcjs.updateLdapConfig; exports.updateNpsSurveyState = _chunk3XQAB4AGcjs.updateNpsSurveyState; exports.updatePackage = _chunkOHF4O34Mcjs.updatePackage; exports.verifyMfaCode = _chunkOV7UJVKRcjs.verifyMfaCode;
194
+ exports.canEnableMFA = _chunkOV7UJVKRcjs.canEnableMFA; exports.createApiKey = _chunkK5WSAZTLcjs.createApiKey; exports.deleteApiKey = _chunkK5WSAZTLcjs.deleteApiKey; exports.deleteDestinationFromDb = _chunkOB6QUZZOcjs.deleteDestinationFromDb; exports.disableMfa = _chunkOV7UJVKRcjs.disableMfa; exports.dismissBannerPermanently = _chunkDSZQ3LTRcjs.dismissBannerPermanently; exports.enableMfa = _chunkOV7UJVKRcjs.enableMfa; exports.fetchCommunityNodeAttributes = _chunkXR664FGVcjs.fetchCommunityNodeAttributes; exports.fetchCommunityNodeTypes = _chunkXR664FGVcjs.fetchCommunityNodeTypes; exports.findWebhook = _chunkC7EDXYMGcjs.findWebhook; exports.getAdminPanelLoginCode = _chunk2UDX6KSWcjs.getAdminPanelLoginCode; exports.getApiKeyScopes = _chunkK5WSAZTLcjs.getApiKeyScopes; exports.getApiKeys = _chunkK5WSAZTLcjs.getApiKeys; exports.getAvailableCommunityPackageCount = _chunkOHF4O34Mcjs.getAvailableCommunityPackageCount; exports.getBecomeCreatorCta = _chunkOOJBVMQTcjs.getBecomeCreatorCta; exports.getCategories = _chunkN3KYHSJNcjs.getCategories; exports.getCloudUserInfo = _chunk2UDX6KSWcjs.getCloudUserInfo; exports.getCollectionById = _chunkN3KYHSJNcjs.getCollectionById; exports.getCollections = _chunkN3KYHSJNcjs.getCollections; exports.getCurrentPlan = _chunk2UDX6KSWcjs.getCurrentPlan; exports.getCurrentUsage = _chunk2UDX6KSWcjs.getCurrentUsage; exports.getDestinationsFromBackend = _chunkOB6QUZZOcjs.getDestinationsFromBackend; exports.getEventNamesFromBackend = _chunkOB6QUZZOcjs.getEventNamesFromBackend; exports.getInstalledCommunityNodes = _chunkOHF4O34Mcjs.getInstalledCommunityNodes; exports.getLdapConfig = _chunkZYTDV3ZPcjs.getLdapConfig; exports.getLdapSynchronizations = _chunkZYTDV3ZPcjs.getLdapSynchronizations; exports.getLocalResourceMapperFields = _chunkXR664FGVcjs.getLocalResourceMapperFields; exports.getMfaQR = _chunkOV7UJVKRcjs.getMfaQR; exports.getModuleSettings = _chunkSROE4HVCcjs.getModuleSettings; exports.getNextVersions = _chunkO3LVSY2Ocjs.getNextVersions; exports.getNodeParameterActionResult = _chunkXR664FGVcjs.getNodeParameterActionResult; exports.getNodeParameterOptions = _chunkXR664FGVcjs.getNodeParameterOptions; exports.getNodeTranslationHeaders = _chunkXR664FGVcjs.getNodeTranslationHeaders; exports.getNodeTypes = _chunkXR664FGVcjs.getNodeTypes; exports.getNodesInformation = _chunkXR664FGVcjs.getNodesInformation; exports.getOidcConfig = _chunkXCKMEOZ6cjs.getOidcConfig; exports.getPromptsData = _chunk7P4MIN3Icjs.getPromptsData; exports.getResourceLocatorResults = _chunkXR664FGVcjs.getResourceLocatorResults; exports.getResourceMapperFields = _chunkXR664FGVcjs.getResourceMapperFields; exports.getRoles = _chunkLZN3X7AKcjs.getRoles; exports.getSamlConfig = _chunkXCKMEOZ6cjs.getSamlConfig; exports.getSamlMetadata = _chunkXCKMEOZ6cjs.getSamlMetadata; exports.getSettings = _chunk3FTGUK44cjs.getSettings; exports.getTemplateById = _chunkN3KYHSJNcjs.getTemplateById; exports.getWhatsNewSection = _chunkO3LVSY2Ocjs.getWhatsNewSection; exports.getWorkflowHistory = _chunkSW7IBR4Ecjs.getWorkflowHistory; exports.getWorkflowTemplate = _chunkN3KYHSJNcjs.getWorkflowTemplate; exports.getWorkflowVersion = _chunkSW7IBR4Ecjs.getWorkflowVersion; exports.getWorkflows = _chunkN3KYHSJNcjs.getWorkflows; exports.hasDestinationId = _chunkOB6QUZZOcjs.hasDestinationId; exports.initOidcLogin = _chunkXCKMEOZ6cjs.initOidcLogin; exports.initSSO = _chunkXCKMEOZ6cjs.initSSO; exports.installNewPackage = _chunkOHF4O34Mcjs.installNewPackage; exports.runLdapSync = _chunkZYTDV3ZPcjs.runLdapSync; exports.saveDestinationToDb = _chunkOB6QUZZOcjs.saveDestinationToDb; exports.saveOidcConfig = _chunkXCKMEOZ6cjs.saveOidcConfig; exports.saveSamlConfig = _chunkXCKMEOZ6cjs.saveSamlConfig; exports.sendConfirmationEmail = _chunk2UDX6KSWcjs.sendConfirmationEmail; exports.sendGetWorkerStatus = _chunkJKPZR2TJcjs.sendGetWorkerStatus; exports.sendTestMessageToDestination = _chunkOB6QUZZOcjs.sendTestMessageToDestination; exports.sessionStarted = _chunkY55DMGV3cjs.sessionStarted; exports.submitContactInfo = _chunk7P4MIN3Icjs.submitContactInfo; exports.testHealthEndpoint = _chunkN3KYHSJNcjs.testHealthEndpoint; exports.testLdapConnection = _chunkZYTDV3ZPcjs.testLdapConnection; exports.testSamlConfig = _chunkXCKMEOZ6cjs.testSamlConfig; exports.toggleSamlConfig = _chunkXCKMEOZ6cjs.toggleSamlConfig; exports.uninstallPackage = _chunkOHF4O34Mcjs.uninstallPackage; exports.updateApiKey = _chunkK5WSAZTLcjs.updateApiKey; exports.updateEnforceMfa = _chunkOV7UJVKRcjs.updateEnforceMfa; exports.updateLdapConfig = _chunkZYTDV3ZPcjs.updateLdapConfig; exports.updateNpsSurveyState = _chunk3XQAB4AGcjs.updateNpsSurveyState; exports.updatePackage = _chunkOHF4O34Mcjs.updatePackage; exports.verifyMfaCode = _chunkOV7UJVKRcjs.verifyMfaCode;
195
195
  //# sourceMappingURL=index.cjs.map
package/dist/api/index.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  getWorkflowTemplate,
45
45
  getWorkflows,
46
46
  testHealthEndpoint
47
- } from "../chunk-FBDUFVI7.js";
47
+ } from "../chunk-WRJVRWH6.js";
48
48
  import {
49
49
  dismissBannerPermanently
50
50
  } from "../chunk-YUD6EP3J.js";
@@ -97,7 +97,7 @@ import {
97
97
  getCurrentPlan,
98
98
  getCurrentUsage,
99
99
  sendConfirmationEmail
100
- } from "../chunk-RI442553.js";
100
+ } from "../chunk-DBKI426S.js";
101
101
  import {
102
102
  getAvailableCommunityPackageCount,
103
103
  getInstalledCommunityNodes,
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkYJZ7IQYEcjs = require('../chunk-YJZ7IQYE.cjs');
9
+ var _chunkN3KYHSJNcjs = require('../chunk-N3KYHSJN.cjs');
10
10
  require('../chunk-CXANUEOE.cjs');
11
11
 
12
12
 
@@ -16,5 +16,5 @@ require('../chunk-CXANUEOE.cjs');
16
16
 
17
17
 
18
18
 
19
- exports.getCategories = _chunkYJZ7IQYEcjs.getCategories; exports.getCollectionById = _chunkYJZ7IQYEcjs.getCollectionById; exports.getCollections = _chunkYJZ7IQYEcjs.getCollections; exports.getTemplateById = _chunkYJZ7IQYEcjs.getTemplateById; exports.getWorkflowTemplate = _chunkYJZ7IQYEcjs.getWorkflowTemplate; exports.getWorkflows = _chunkYJZ7IQYEcjs.getWorkflows; exports.testHealthEndpoint = _chunkYJZ7IQYEcjs.testHealthEndpoint;
19
+ exports.getCategories = _chunkN3KYHSJNcjs.getCategories; exports.getCollectionById = _chunkN3KYHSJNcjs.getCollectionById; exports.getCollections = _chunkN3KYHSJNcjs.getCollections; exports.getTemplateById = _chunkN3KYHSJNcjs.getTemplateById; exports.getWorkflowTemplate = _chunkN3KYHSJNcjs.getWorkflowTemplate; exports.getWorkflows = _chunkN3KYHSJNcjs.getWorkflows; exports.testHealthEndpoint = _chunkN3KYHSJNcjs.testHealthEndpoint;
20
20
  //# sourceMappingURL=templates.cjs.map
@@ -87,6 +87,9 @@ interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {
87
87
  interface ITemplatesQuery {
88
88
  categories: string[];
89
89
  search: string;
90
+ apps?: string[];
91
+ sort?: string;
92
+ combineWith?: string;
90
93
  }
91
94
  interface ITemplatesCategory {
92
95
  id: number;
@@ -104,6 +107,9 @@ declare function getWorkflows(apiEndpoint: string, query: {
104
107
  limit: number;
105
108
  categories: string[];
106
109
  search: string;
110
+ sort?: string;
111
+ apps?: string[];
112
+ combineWith?: string;
107
113
  }, headers?: RawAxiosRequestHeaders): Promise<{
108
114
  totalWorkflows: number;
109
115
  workflows: ITemplatesWorkflow[];
@@ -87,6 +87,9 @@ interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {
87
87
  interface ITemplatesQuery {
88
88
  categories: string[];
89
89
  search: string;
90
+ apps?: string[];
91
+ sort?: string;
92
+ combineWith?: string;
90
93
  }
91
94
  interface ITemplatesCategory {
92
95
  id: number;
@@ -104,6 +107,9 @@ declare function getWorkflows(apiEndpoint: string, query: {
104
107
  limit: number;
105
108
  categories: string[];
106
109
  search: string;
110
+ sort?: string;
111
+ apps?: string[];
112
+ combineWith?: string;
107
113
  }, headers?: RawAxiosRequestHeaders): Promise<{
108
114
  totalWorkflows: number;
109
115
  workflows: ITemplatesWorkflow[];
@@ -6,7 +6,7 @@ import {
6
6
  getWorkflowTemplate,
7
7
  getWorkflows,
8
8
  testHealthEndpoint
9
- } from "../chunk-FBDUFVI7.js";
9
+ } from "../chunk-WRJVRWH6.js";
10
10
  import "../chunk-SHSKCS7V.js";
11
11
  export {
12
12
  getCategories,
@@ -27,4 +27,4 @@ async function getAdminPanelLoginCode(context) {
27
27
 
28
28
 
29
29
  exports.getCurrentPlan = getCurrentPlan; exports.getCurrentUsage = getCurrentUsage; exports.getCloudUserInfo = getCloudUserInfo; exports.sendConfirmationEmail = sendConfirmationEmail; exports.getAdminPanelLoginCode = getAdminPanelLoginCode;
30
- //# sourceMappingURL=chunk-PF2UUTTI.cjs.map
30
+ //# sourceMappingURL=chunk-2UDX6KSW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-PF2UUTTI.cjs","../src/api/cloudPlans.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACqCA,MAAA,SAAsB,cAAA,CAAe,OAAA,EAAmD;AACvF,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,mBAAmB,CAAA;AACtD;AAEA,MAAA,SAAsB,eAAA,CAAgB,OAAA,EAAkD;AACvF,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,eAAe,CAAA;AAClD;AAEA,MAAA,SAAsB,gBAAA,CAAiB,OAAA,EAAsD;AAC5F,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,sBAAsB,CAAA;AACzD;AAEA,MAAA,SAAsB,qBAAA,CAAsB,OAAA,EAAsD;AACjG,EAAA,OAAO,MAAM,oCAAA,OAAK,CAAQ,OAAA,EAAS,6CAA6C,CAAA;AACjF;AAEA,MAAA,SAAsB,sBAAA,CAAuB,OAAA,EAAqD;AACjG,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,yBAAyB,CAAA;AAC5D;ADvCA;AACA;AACE;AACA;AACA;AACA;AACA;AACF,gPAAC","file":"/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-PF2UUTTI.cjs","sourcesContent":[null,"import type { IRestApiContext } from '../types';\nimport { get, post } from '../utils';\n\nexport declare namespace Cloud {\n\texport interface PlanData {\n\t\tplanId: number;\n\t\tmonthlyExecutionsLimit: number;\n\t\tactiveWorkflowsLimit: number;\n\t\tcredentialsLimit: number;\n\t\tisActive: boolean;\n\t\tdisplayName: string;\n\t\texpirationDate: string;\n\t\tmetadata: PlanMetadata;\n\t}\n\n\texport interface PlanMetadata {\n\t\tversion: 'v1';\n\t\tgroup: 'opt-out' | 'opt-in' | 'trial';\n\t\tslug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1';\n\t\ttrial?: Trial;\n\t}\n\n\tinterface Trial {\n\t\tlength: number;\n\t\tgracePeriod: number;\n\t}\n\n\texport type UserAccount = {\n\t\tconfirmed: boolean;\n\t\tusername: string;\n\t\temail: string;\n\t\thasEarlyAccess?: boolean;\n\t\trole?: string;\n\t};\n}\n\nexport interface InstanceUsage {\n\ttimeframe?: string;\n\texecutions: number;\n\tactiveWorkflows: number;\n}\n\nexport async function getCurrentPlan(context: IRestApiContext): Promise<Cloud.PlanData> {\n\treturn await get(context.baseUrl, '/admin/cloud-plan');\n}\n\nexport async function getCurrentUsage(context: IRestApiContext): Promise<InstanceUsage> {\n\treturn await get(context.baseUrl, '/cloud/limits');\n}\n\nexport async function getCloudUserInfo(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await get(context.baseUrl, '/cloud/proxy/user/me');\n}\n\nexport async function sendConfirmationEmail(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await post(context.baseUrl, '/cloud/proxy/user/resend-confirmation-email');\n}\n\nexport async function getAdminPanelLoginCode(context: IRestApiContext): Promise<{ code: string }> {\n\treturn await get(context.baseUrl, '/cloud/proxy/login/code');\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-2UDX6KSW.cjs","../src/api/cloudPlans.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACyCA,MAAA,SAAsB,cAAA,CAAe,OAAA,EAAmD;AACvF,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,mBAAmB,CAAA;AACtD;AAEA,MAAA,SAAsB,eAAA,CAAgB,OAAA,EAAkD;AACvF,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,eAAe,CAAA;AAClD;AAEA,MAAA,SAAsB,gBAAA,CAAiB,OAAA,EAAsD;AAC5F,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,sBAAsB,CAAA;AACzD;AAEA,MAAA,SAAsB,qBAAA,CAAsB,OAAA,EAAsD;AACjG,EAAA,OAAO,MAAM,oCAAA,OAAK,CAAQ,OAAA,EAAS,6CAA6C,CAAA;AACjF;AAEA,MAAA,SAAsB,sBAAA,CAAuB,OAAA,EAAqD;AACjG,EAAA,OAAO,MAAM,mCAAA,OAAI,CAAQ,OAAA,EAAS,yBAAyB,CAAA;AAC5D;AD3CA;AACA;AACE;AACA;AACA;AACA;AACA;AACF,gPAAC","file":"/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-2UDX6KSW.cjs","sourcesContent":[null,"import type { IRestApiContext } from '../types';\nimport { get, post } from '../utils';\n\nexport declare namespace Cloud {\n\texport interface PlanData {\n\t\tplanId: number;\n\t\tmonthlyExecutionsLimit: number;\n\t\tactiveWorkflowsLimit: number;\n\t\tcredentialsLimit: number;\n\t\tisActive: boolean;\n\t\tdisplayName: string;\n\t\texpirationDate: string;\n\t\tmetadata: PlanMetadata;\n\t}\n\n\texport interface PlanMetadata {\n\t\tversion: 'v1';\n\t\tgroup: 'opt-out' | 'opt-in' | 'trial';\n\t\tslug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1';\n\t\ttrial?: Trial;\n\t}\n\n\tinterface Trial {\n\t\tlength: number;\n\t\tgracePeriod: number;\n\t}\n\n\texport type UserAccount = {\n\t\tconfirmed: boolean;\n\t\tusername: string;\n\t\temail: string;\n\t\thasEarlyAccess?: boolean;\n\t\trole?: string;\n\t\tselectedApps?: string[];\n\t\tinformation?: {\n\t\t\t[key: string]: string | string[];\n\t\t};\n\t};\n}\n\nexport interface InstanceUsage {\n\ttimeframe?: string;\n\texecutions: number;\n\tactiveWorkflows: number;\n}\n\nexport async function getCurrentPlan(context: IRestApiContext): Promise<Cloud.PlanData> {\n\treturn await get(context.baseUrl, '/admin/cloud-plan');\n}\n\nexport async function getCurrentUsage(context: IRestApiContext): Promise<InstanceUsage> {\n\treturn await get(context.baseUrl, '/cloud/limits');\n}\n\nexport async function getCloudUserInfo(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await get(context.baseUrl, '/cloud/proxy/user/me');\n}\n\nexport async function sendConfirmationEmail(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await post(context.baseUrl, '/cloud/proxy/user/resend-confirmation-email');\n}\n\nexport async function getAdminPanelLoginCode(context: IRestApiContext): Promise<{ code: string }> {\n\treturn await get(context.baseUrl, '/cloud/proxy/login/code');\n}\n"]}
@@ -27,4 +27,4 @@ export {
27
27
  sendConfirmationEmail,
28
28
  getAdminPanelLoginCode
29
29
  };
30
- //# sourceMappingURL=chunk-RI442553.js.map
30
+ //# sourceMappingURL=chunk-DBKI426S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/cloudPlans.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { get, post } from '../utils';\n\nexport declare namespace Cloud {\n\texport interface PlanData {\n\t\tplanId: number;\n\t\tmonthlyExecutionsLimit: number;\n\t\tactiveWorkflowsLimit: number;\n\t\tcredentialsLimit: number;\n\t\tisActive: boolean;\n\t\tdisplayName: string;\n\t\texpirationDate: string;\n\t\tmetadata: PlanMetadata;\n\t}\n\n\texport interface PlanMetadata {\n\t\tversion: 'v1';\n\t\tgroup: 'opt-out' | 'opt-in' | 'trial';\n\t\tslug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1';\n\t\ttrial?: Trial;\n\t}\n\n\tinterface Trial {\n\t\tlength: number;\n\t\tgracePeriod: number;\n\t}\n\n\texport type UserAccount = {\n\t\tconfirmed: boolean;\n\t\tusername: string;\n\t\temail: string;\n\t\thasEarlyAccess?: boolean;\n\t\trole?: string;\n\t\tselectedApps?: string[];\n\t\tinformation?: {\n\t\t\t[key: string]: string | string[];\n\t\t};\n\t};\n}\n\nexport interface InstanceUsage {\n\ttimeframe?: string;\n\texecutions: number;\n\tactiveWorkflows: number;\n}\n\nexport async function getCurrentPlan(context: IRestApiContext): Promise<Cloud.PlanData> {\n\treturn await get(context.baseUrl, '/admin/cloud-plan');\n}\n\nexport async function getCurrentUsage(context: IRestApiContext): Promise<InstanceUsage> {\n\treturn await get(context.baseUrl, '/cloud/limits');\n}\n\nexport async function getCloudUserInfo(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await get(context.baseUrl, '/cloud/proxy/user/me');\n}\n\nexport async function sendConfirmationEmail(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await post(context.baseUrl, '/cloud/proxy/user/resend-confirmation-email');\n}\n\nexport async function getAdminPanelLoginCode(context: IRestApiContext): Promise<{ code: string }> {\n\treturn await get(context.baseUrl, '/cloud/proxy/login/code');\n}\n"],"mappings":";;;;;;AA8CA,eAAsB,eAAe,SAAmD;AACvF,SAAO,MAAM,IAAI,QAAQ,SAAS,mBAAmB;AACtD;AAEA,eAAsB,gBAAgB,SAAkD;AACvF,SAAO,MAAM,IAAI,QAAQ,SAAS,eAAe;AAClD;AAEA,eAAsB,iBAAiB,SAAsD;AAC5F,SAAO,MAAM,IAAI,QAAQ,SAAS,sBAAsB;AACzD;AAEA,eAAsB,sBAAsB,SAAsD;AACjG,SAAO,MAAM,KAAK,QAAQ,SAAS,6CAA6C;AACjF;AAEA,eAAsB,uBAAuB,SAAqD;AACjG,SAAO,MAAM,IAAI,QAAQ,SAAS,yBAAyB;AAC5D;","names":[]}
@@ -21,17 +21,15 @@ async function getCollections(apiEndpoint, query, headers) {
21
21
  );
22
22
  }
23
23
  async function getWorkflows(apiEndpoint, query, headers) {
24
- return await _chunkCXANUEOEcjs.get.call(void 0,
25
- apiEndpoint,
26
- "/templates/search",
27
- {
28
- page: query.page,
29
- rows: query.limit,
30
- category: stringifyArray(query.categories),
31
- search: query.search
32
- },
33
- headers
34
- );
24
+ const { apps, sort, combineWith, categories, ...restQuery } = query;
25
+ const finalQuery = {
26
+ ...restQuery,
27
+ category: stringifyArray(categories),
28
+ ...apps && { app: stringifyArray(apps) },
29
+ ...sort && { sort },
30
+ ...combineWith && { combineWith }
31
+ };
32
+ return await _chunkCXANUEOEcjs.get.call(void 0, apiEndpoint, "/templates/search", finalQuery, headers);
35
33
  }
36
34
  async function getCollectionById(apiEndpoint, collectionId, headers) {
37
35
  return await _chunkCXANUEOEcjs.get.call(void 0, apiEndpoint, `/templates/collections/${collectionId}`, void 0, headers);
@@ -52,4 +50,4 @@ async function getWorkflowTemplate(apiEndpoint, templateId, headers) {
52
50
 
53
51
 
54
52
  exports.testHealthEndpoint = testHealthEndpoint; exports.getCategories = getCategories; exports.getCollections = getCollections; exports.getWorkflows = getWorkflows; exports.getCollectionById = getCollectionById; exports.getTemplateById = getTemplateById; exports.getWorkflowTemplate = getWorkflowTemplate;
55
- //# sourceMappingURL=chunk-YJZ7IQYE.cjs.map
53
+ //# sourceMappingURL=chunk-N3KYHSJN.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-N3KYHSJN.cjs","../src/api/templates.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACyHA,SAAS,cAAA,CAAe,GAAA,EAAe;AACtC,EAAA,OAAO,GAAA,CAAI,IAAA,CAAK,GAAG,CAAA;AACpB;AAEA,MAAA,SAAsB,kBAAA,CAAmB,WAAA,EAAqB;AAC7D,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,SAAS,CAAA;AACxC;AAEA,MAAA,SAAsB,aAAA,CACrB,WAAA,EACA,OAAA,EACgD;AAChD,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,uBAAA,EAAyB,KAAA,CAAA,EAAW,OAAO,CAAA;AAC1E;AAEA,MAAA,SAAsB,cAAA,CACrB,WAAA,EACA,KAAA,EACA,OAAA,EACmD;AACnD,EAAA,OAAO,MAAM,mCAAA;AAAA,IACZ,WAAA;AAAA,IACA,wBAAA;AAAA,IACA,EAAE,QAAA,EAAU,KAAA,CAAM,UAAA,EAAY,MAAA,EAAQ,KAAA,CAAM,OAAO,CAAA;AAAA,IACnD;AAAA,EACD,CAAA;AACD;AAEA,MAAA,SAAsB,YAAA,CACrB,WAAA,EACA,KAAA,EASA,OAAA,EAKE;AACF,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,WAAA,EAAa,UAAA,EAAY,GAAG,UAAU,EAAA,EAAI,KAAA;AAC9D,EAAA,MAAM,WAAA,EAAa;AAAA,IAClB,GAAG,SAAA;AAAA,IACH,QAAA,EAAU,cAAA,CAAe,UAAU,CAAA;AAAA,IACnC,GAAI,KAAA,GAAQ,EAAE,GAAA,EAAK,cAAA,CAAe,IAAI,EAAE,CAAA;AAAA,IACxC,GAAI,KAAA,GAAQ,EAAE,KAAK,CAAA;AAAA,IACnB,GAAI,YAAA,GAAe,EAAE,YAAY;AAAA,EAClC,CAAA;AAEA,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,mBAAA,EAAqB,UAAA,EAAY,OAAO,CAAA;AACvE;AAEA,MAAA,SAAsB,iBAAA,CACrB,WAAA,EACA,YAAA,EACA,OAAA,EACwD;AACxD,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,CAAA,uBAAA,EAA0B,YAAY,CAAA,CAAA;AACrE;AAMqD;AACgB,EAAA;AACrE;AAM8B;AACuC,EAAA;AACrE;ADlKuE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-N3KYHSJN.cjs","sourcesContent":[null,"import type { RawAxiosRequestHeaders } from 'axios';\nimport type { INode, INodeCredentialsDetails } from 'n8n-workflow';\n\nimport type { VersionNode } from './versions';\nimport type { WorkflowData } from './workflows';\nimport { get } from '../utils';\n\nexport interface IWorkflowTemplateNode\n\textends Pick<\n\t\tINode,\n\t\t'name' | 'type' | 'position' | 'parameters' | 'typeVersion' | 'webhookId' | 'id' | 'disabled'\n\t> {\n\t// The credentials in a template workflow have a different type than in a regular workflow\n\tcredentials?: IWorkflowTemplateNodeCredentials;\n}\n\nexport interface IWorkflowTemplateNodeCredentials {\n\t[key: string]: string | INodeCredentialsDetails;\n}\n\nexport interface IWorkflowTemplate {\n\tid: number;\n\tname: string;\n\tworkflow: Pick<WorkflowData, 'connections' | 'settings' | 'pinData'> & {\n\t\tnodes: IWorkflowTemplateNode[];\n\t};\n}\n\nexport interface ITemplatesNode extends VersionNode {\n\tid: number;\n\tcategories?: ITemplatesCategory[];\n}\n\nexport interface ITemplatesCollection {\n\tid: number;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\tworkflows: Array<{ id: number }>;\n}\n\ninterface ITemplatesImage {\n\tid: number;\n\turl: string;\n}\n\ninterface ITemplatesCollectionExtended extends ITemplatesCollection {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tcreatedAt: string;\n}\n\nexport interface ITemplatesCollectionFull extends ITemplatesCollectionExtended {\n\tfull: true;\n}\n\nexport interface ITemplatesCollectionResponse extends ITemplatesCollectionExtended {\n\tworkflows: ITemplatesWorkflow[];\n}\n\n/**\n * A template without the actual workflow definition\n */\n\nexport interface ITemplatesWorkflow {\n\tid: number;\n\tcreatedAt: string;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\ttotalViews: number;\n\tuser: {\n\t\tusername: string;\n\t};\n}\n\nexport interface ITemplatesWorkflowInfo {\n\tnodeCount: number;\n\tnodeTypes: {\n\t\t[key: string]: {\n\t\t\tcount: number;\n\t\t};\n\t};\n}\n\nexport type TemplateSearchFacet = {\n\tfield_name: string;\n\tsampled: boolean;\n\tstats: {\n\t\ttotal_values: number;\n\t};\n\tcounts: Array<{\n\t\tcount: number;\n\t\thighlighted: string;\n\t\tvalue: string;\n\t}>;\n};\n\nexport interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tworkflowInfo: ITemplatesWorkflowInfo;\n}\n\n/**\n * A template with also the full workflow definition\n */\n\nexport interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {\n\tfull: true;\n}\n\nexport interface ITemplatesQuery {\n\tcategories: string[];\n\tsearch: string;\n\tapps?: string[];\n\tsort?: string;\n\tcombineWith?: string;\n}\n\nexport interface ITemplatesCategory {\n\tid: number;\n\tname: string;\n}\n\nfunction stringifyArray(arr: string[]) {\n\treturn arr.join(',');\n}\n\nexport async function testHealthEndpoint(apiEndpoint: string) {\n\treturn await get(apiEndpoint, '/health');\n}\n\nexport async function getCategories(\n\tapiEndpoint: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ categories: ITemplatesCategory[] }> {\n\treturn await get(apiEndpoint, '/templates/categories', undefined, headers);\n}\n\nexport async function getCollections(\n\tapiEndpoint: string,\n\tquery: ITemplatesQuery,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collections: ITemplatesCollection[] }> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/collections',\n\t\t{ category: query.categories, search: query.search },\n\t\theaders,\n\t);\n}\n\nexport async function getWorkflows(\n\tapiEndpoint: string,\n\tquery: {\n\t\tpage: number;\n\t\tlimit: number;\n\t\tcategories: string[];\n\t\tsearch: string;\n\t\tsort?: string;\n\t\tapps?: string[];\n\t\tcombineWith?: string;\n\t},\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{\n\ttotalWorkflows: number;\n\tworkflows: ITemplatesWorkflow[];\n\tfilters: TemplateSearchFacet[];\n}> {\n\tconst { apps, sort, combineWith, categories, ...restQuery } = query;\n\tconst finalQuery = {\n\t\t...restQuery,\n\t\tcategory: stringifyArray(categories),\n\t\t...(apps && { app: stringifyArray(apps) }),\n\t\t...(sort && { sort }),\n\t\t...(combineWith && { combineWith }),\n\t};\n\n\treturn await get(apiEndpoint, '/templates/search', finalQuery, headers);\n}\n\nexport async function getCollectionById(\n\tapiEndpoint: string,\n\tcollectionId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collection: ITemplatesCollectionResponse }> {\n\treturn await get(apiEndpoint, `/templates/collections/${collectionId}`, undefined, headers);\n}\n\nexport async function getTemplateById(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ workflow: ITemplatesWorkflowResponse }> {\n\treturn await get(apiEndpoint, `/templates/workflows/${templateId}`, undefined, headers);\n}\n\nexport async function getWorkflowTemplate(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<IWorkflowTemplate> {\n\treturn await get(apiEndpoint, `/workflows/templates/${templateId}`, undefined, headers);\n}\n"]}
@@ -21,17 +21,15 @@ async function getCollections(apiEndpoint, query, headers) {
21
21
  );
22
22
  }
23
23
  async function getWorkflows(apiEndpoint, query, headers) {
24
- return await get(
25
- apiEndpoint,
26
- "/templates/search",
27
- {
28
- page: query.page,
29
- rows: query.limit,
30
- category: stringifyArray(query.categories),
31
- search: query.search
32
- },
33
- headers
34
- );
24
+ const { apps, sort, combineWith, categories, ...restQuery } = query;
25
+ const finalQuery = {
26
+ ...restQuery,
27
+ category: stringifyArray(categories),
28
+ ...apps && { app: stringifyArray(apps) },
29
+ ...sort && { sort },
30
+ ...combineWith && { combineWith }
31
+ };
32
+ return await get(apiEndpoint, "/templates/search", finalQuery, headers);
35
33
  }
36
34
  async function getCollectionById(apiEndpoint, collectionId, headers) {
37
35
  return await get(apiEndpoint, `/templates/collections/${collectionId}`, void 0, headers);
@@ -52,4 +50,4 @@ export {
52
50
  getTemplateById,
53
51
  getWorkflowTemplate
54
52
  };
55
- //# sourceMappingURL=chunk-FBDUFVI7.js.map
53
+ //# sourceMappingURL=chunk-WRJVRWH6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/templates.ts"],"sourcesContent":["import type { RawAxiosRequestHeaders } from 'axios';\nimport type { INode, INodeCredentialsDetails } from 'n8n-workflow';\n\nimport type { VersionNode } from './versions';\nimport type { WorkflowData } from './workflows';\nimport { get } from '../utils';\n\nexport interface IWorkflowTemplateNode\n\textends Pick<\n\t\tINode,\n\t\t'name' | 'type' | 'position' | 'parameters' | 'typeVersion' | 'webhookId' | 'id' | 'disabled'\n\t> {\n\t// The credentials in a template workflow have a different type than in a regular workflow\n\tcredentials?: IWorkflowTemplateNodeCredentials;\n}\n\nexport interface IWorkflowTemplateNodeCredentials {\n\t[key: string]: string | INodeCredentialsDetails;\n}\n\nexport interface IWorkflowTemplate {\n\tid: number;\n\tname: string;\n\tworkflow: Pick<WorkflowData, 'connections' | 'settings' | 'pinData'> & {\n\t\tnodes: IWorkflowTemplateNode[];\n\t};\n}\n\nexport interface ITemplatesNode extends VersionNode {\n\tid: number;\n\tcategories?: ITemplatesCategory[];\n}\n\nexport interface ITemplatesCollection {\n\tid: number;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\tworkflows: Array<{ id: number }>;\n}\n\ninterface ITemplatesImage {\n\tid: number;\n\turl: string;\n}\n\ninterface ITemplatesCollectionExtended extends ITemplatesCollection {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tcreatedAt: string;\n}\n\nexport interface ITemplatesCollectionFull extends ITemplatesCollectionExtended {\n\tfull: true;\n}\n\nexport interface ITemplatesCollectionResponse extends ITemplatesCollectionExtended {\n\tworkflows: ITemplatesWorkflow[];\n}\n\n/**\n * A template without the actual workflow definition\n */\n\nexport interface ITemplatesWorkflow {\n\tid: number;\n\tcreatedAt: string;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\ttotalViews: number;\n\tuser: {\n\t\tusername: string;\n\t};\n}\n\nexport interface ITemplatesWorkflowInfo {\n\tnodeCount: number;\n\tnodeTypes: {\n\t\t[key: string]: {\n\t\t\tcount: number;\n\t\t};\n\t};\n}\n\nexport type TemplateSearchFacet = {\n\tfield_name: string;\n\tsampled: boolean;\n\tstats: {\n\t\ttotal_values: number;\n\t};\n\tcounts: Array<{\n\t\tcount: number;\n\t\thighlighted: string;\n\t\tvalue: string;\n\t}>;\n};\n\nexport interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tworkflowInfo: ITemplatesWorkflowInfo;\n}\n\n/**\n * A template with also the full workflow definition\n */\n\nexport interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {\n\tfull: true;\n}\n\nexport interface ITemplatesQuery {\n\tcategories: string[];\n\tsearch: string;\n\tapps?: string[];\n\tsort?: string;\n\tcombineWith?: string;\n}\n\nexport interface ITemplatesCategory {\n\tid: number;\n\tname: string;\n}\n\nfunction stringifyArray(arr: string[]) {\n\treturn arr.join(',');\n}\n\nexport async function testHealthEndpoint(apiEndpoint: string) {\n\treturn await get(apiEndpoint, '/health');\n}\n\nexport async function getCategories(\n\tapiEndpoint: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ categories: ITemplatesCategory[] }> {\n\treturn await get(apiEndpoint, '/templates/categories', undefined, headers);\n}\n\nexport async function getCollections(\n\tapiEndpoint: string,\n\tquery: ITemplatesQuery,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collections: ITemplatesCollection[] }> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/collections',\n\t\t{ category: query.categories, search: query.search },\n\t\theaders,\n\t);\n}\n\nexport async function getWorkflows(\n\tapiEndpoint: string,\n\tquery: {\n\t\tpage: number;\n\t\tlimit: number;\n\t\tcategories: string[];\n\t\tsearch: string;\n\t\tsort?: string;\n\t\tapps?: string[];\n\t\tcombineWith?: string;\n\t},\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{\n\ttotalWorkflows: number;\n\tworkflows: ITemplatesWorkflow[];\n\tfilters: TemplateSearchFacet[];\n}> {\n\tconst { apps, sort, combineWith, categories, ...restQuery } = query;\n\tconst finalQuery = {\n\t\t...restQuery,\n\t\tcategory: stringifyArray(categories),\n\t\t...(apps && { app: stringifyArray(apps) }),\n\t\t...(sort && { sort }),\n\t\t...(combineWith && { combineWith }),\n\t};\n\n\treturn await get(apiEndpoint, '/templates/search', finalQuery, headers);\n}\n\nexport async function getCollectionById(\n\tapiEndpoint: string,\n\tcollectionId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collection: ITemplatesCollectionResponse }> {\n\treturn await get(apiEndpoint, `/templates/collections/${collectionId}`, undefined, headers);\n}\n\nexport async function getTemplateById(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ workflow: ITemplatesWorkflowResponse }> {\n\treturn await get(apiEndpoint, `/templates/workflows/${templateId}`, undefined, headers);\n}\n\nexport async function getWorkflowTemplate(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<IWorkflowTemplate> {\n\treturn await get(apiEndpoint, `/workflows/templates/${templateId}`, undefined, headers);\n}\n"],"mappings":";;;;;AA6HA,SAAS,eAAe,KAAe;AACtC,SAAO,IAAI,KAAK,GAAG;AACpB;AAEA,eAAsB,mBAAmB,aAAqB;AAC7D,SAAO,MAAM,IAAI,aAAa,SAAS;AACxC;AAEA,eAAsB,cACrB,aACA,SACgD;AAChD,SAAO,MAAM,IAAI,aAAa,yBAAyB,QAAW,OAAO;AAC1E;AAEA,eAAsB,eACrB,aACA,OACA,SACmD;AACnD,SAAO,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,UAAU,MAAM,YAAY,QAAQ,MAAM,OAAO;AAAA,IACnD;AAAA,EACD;AACD;AAEA,eAAsB,aACrB,aACA,OASA,SAKE;AACF,QAAM,EAAE,MAAM,MAAM,aAAa,YAAY,GAAG,UAAU,IAAI;AAC9D,QAAM,aAAa;AAAA,IAClB,GAAG;AAAA,IACH,UAAU,eAAe,UAAU;AAAA,IACnC,GAAI,QAAQ,EAAE,KAAK,eAAe,IAAI,EAAE;AAAA,IACxC,GAAI,QAAQ,EAAE,KAAK;AAAA,IACnB,GAAI,eAAe,EAAE,YAAY;AAAA,EAClC;AAEA,SAAO,MAAM,IAAI,aAAa,qBAAqB,YAAY,OAAO;AACvE;AAEA,eAAsB,kBACrB,aACA,cACA,SACwD;AACxD,SAAO,MAAM,IAAI,aAAa,0BAA0B,YAAY,IAAI,QAAW,OAAO;AAC3F;AAEA,eAAsB,gBACrB,aACA,YACA,SACoD;AACpD,SAAO,MAAM,IAAI,aAAa,wBAAwB,UAAU,IAAI,QAAW,OAAO;AACvF;AAEA,eAAsB,oBACrB,aACA,YACA,SAC6B;AAC7B,SAAO,MAAM,IAAI,aAAa,wBAAwB,UAAU,IAAI,QAAW,OAAO;AACvF;","names":[]}
package/dist/index.cjs CHANGED
@@ -44,7 +44,7 @@ require('./chunk-F2BR3GFD.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkYJZ7IQYEcjs = require('./chunk-YJZ7IQYE.cjs');
47
+ var _chunkN3KYHSJNcjs = require('./chunk-N3KYHSJN.cjs');
48
48
 
49
49
 
50
50
  var _chunkDSZQ3LTRcjs = require('./chunk-DSZQ3LTR.cjs');
@@ -98,7 +98,7 @@ var _chunkK5WSAZTLcjs = require('./chunk-K5WSAZTL.cjs');
98
98
 
99
99
 
100
100
 
101
- var _chunkPF2UUTTIcjs = require('./chunk-PF2UUTTI.cjs');
101
+ var _chunk2UDX6KSWcjs = require('./chunk-2UDX6KSW.cjs');
102
102
 
103
103
 
104
104
 
@@ -215,5 +215,5 @@ var _chunkCXANUEOEcjs = require('./chunk-CXANUEOE.cjs');
215
215
 
216
216
 
217
217
 
218
- exports.MfaRequiredError = _chunkCXANUEOEcjs.MfaRequiredError; exports.NO_NETWORK_ERROR_CODE = _chunkCXANUEOEcjs.NO_NETWORK_ERROR_CODE; exports.ResponseError = _chunkCXANUEOEcjs.ResponseError; exports.STREAM_SEPERATOR = _chunkCXANUEOEcjs.STREAM_SEPERATOR; exports.canEnableMFA = _chunkOV7UJVKRcjs.canEnableMFA; exports.createApiKey = _chunkK5WSAZTLcjs.createApiKey; exports.deleteApiKey = _chunkK5WSAZTLcjs.deleteApiKey; exports.deleteDestinationFromDb = _chunkOB6QUZZOcjs.deleteDestinationFromDb; exports.disableMfa = _chunkOV7UJVKRcjs.disableMfa; exports.dismissBannerPermanently = _chunkDSZQ3LTRcjs.dismissBannerPermanently; exports.enableMfa = _chunkOV7UJVKRcjs.enableMfa; exports.fetchCommunityNodeAttributes = _chunkXR664FGVcjs.fetchCommunityNodeAttributes; exports.fetchCommunityNodeTypes = _chunkXR664FGVcjs.fetchCommunityNodeTypes; exports.findWebhook = _chunkC7EDXYMGcjs.findWebhook; exports.get = _chunkCXANUEOEcjs.get; exports.getAdminPanelLoginCode = _chunkPF2UUTTIcjs.getAdminPanelLoginCode; exports.getApiKeyScopes = _chunkK5WSAZTLcjs.getApiKeyScopes; exports.getApiKeys = _chunkK5WSAZTLcjs.getApiKeys; exports.getAvailableCommunityPackageCount = _chunkOHF4O34Mcjs.getAvailableCommunityPackageCount; exports.getBecomeCreatorCta = _chunkOOJBVMQTcjs.getBecomeCreatorCta; exports.getCategories = _chunkYJZ7IQYEcjs.getCategories; exports.getCloudUserInfo = _chunkPF2UUTTIcjs.getCloudUserInfo; exports.getCollectionById = _chunkYJZ7IQYEcjs.getCollectionById; exports.getCollections = _chunkYJZ7IQYEcjs.getCollections; exports.getCurrentPlan = _chunkPF2UUTTIcjs.getCurrentPlan; exports.getCurrentUsage = _chunkPF2UUTTIcjs.getCurrentUsage; exports.getDestinationsFromBackend = _chunkOB6QUZZOcjs.getDestinationsFromBackend; exports.getEventNamesFromBackend = _chunkOB6QUZZOcjs.getEventNamesFromBackend; exports.getFullApiResponse = _chunkCXANUEOEcjs.getFullApiResponse; exports.getInstalledCommunityNodes = _chunkOHF4O34Mcjs.getInstalledCommunityNodes; exports.getLdapConfig = _chunkZYTDV3ZPcjs.getLdapConfig; exports.getLdapSynchronizations = _chunkZYTDV3ZPcjs.getLdapSynchronizations; exports.getLocalResourceMapperFields = _chunkXR664FGVcjs.getLocalResourceMapperFields; exports.getMfaQR = _chunkOV7UJVKRcjs.getMfaQR; exports.getModuleSettings = _chunkSROE4HVCcjs.getModuleSettings; exports.getNextVersions = _chunkO3LVSY2Ocjs.getNextVersions; exports.getNodeParameterActionResult = _chunkXR664FGVcjs.getNodeParameterActionResult; exports.getNodeParameterOptions = _chunkXR664FGVcjs.getNodeParameterOptions; exports.getNodeTranslationHeaders = _chunkXR664FGVcjs.getNodeTranslationHeaders; exports.getNodeTypes = _chunkXR664FGVcjs.getNodeTypes; exports.getNodesInformation = _chunkXR664FGVcjs.getNodesInformation; exports.getOidcConfig = _chunkXCKMEOZ6cjs.getOidcConfig; exports.getPromptsData = _chunk7P4MIN3Icjs.getPromptsData; exports.getResourceLocatorResults = _chunkXR664FGVcjs.getResourceLocatorResults; exports.getResourceMapperFields = _chunkXR664FGVcjs.getResourceMapperFields; exports.getRoles = _chunkLZN3X7AKcjs.getRoles; exports.getSamlConfig = _chunkXCKMEOZ6cjs.getSamlConfig; exports.getSamlMetadata = _chunkXCKMEOZ6cjs.getSamlMetadata; exports.getSettings = _chunk3FTGUK44cjs.getSettings; exports.getTemplateById = _chunkYJZ7IQYEcjs.getTemplateById; exports.getWhatsNewSection = _chunkO3LVSY2Ocjs.getWhatsNewSection; exports.getWorkflowHistory = _chunkSW7IBR4Ecjs.getWorkflowHistory; exports.getWorkflowTemplate = _chunkYJZ7IQYEcjs.getWorkflowTemplate; exports.getWorkflowVersion = _chunkSW7IBR4Ecjs.getWorkflowVersion; exports.getWorkflows = _chunkYJZ7IQYEcjs.getWorkflows; exports.hasDestinationId = _chunkOB6QUZZOcjs.hasDestinationId; exports.initOidcLogin = _chunkXCKMEOZ6cjs.initOidcLogin; exports.initSSO = _chunkXCKMEOZ6cjs.initSSO; exports.installNewPackage = _chunkOHF4O34Mcjs.installNewPackage; exports.makeRestApiRequest = _chunkCXANUEOEcjs.makeRestApiRequest; exports.patch = _chunkCXANUEOEcjs.patch; exports.post = _chunkCXANUEOEcjs.post; exports.request = _chunkCXANUEOEcjs.request; exports.runLdapSync = _chunkZYTDV3ZPcjs.runLdapSync; exports.saveDestinationToDb = _chunkOB6QUZZOcjs.saveDestinationToDb; exports.saveOidcConfig = _chunkXCKMEOZ6cjs.saveOidcConfig; exports.saveSamlConfig = _chunkXCKMEOZ6cjs.saveSamlConfig; exports.sendConfirmationEmail = _chunkPF2UUTTIcjs.sendConfirmationEmail; exports.sendGetWorkerStatus = _chunkJKPZR2TJcjs.sendGetWorkerStatus; exports.sendTestMessageToDestination = _chunkOB6QUZZOcjs.sendTestMessageToDestination; exports.sessionStarted = _chunkY55DMGV3cjs.sessionStarted; exports.streamRequest = _chunkCXANUEOEcjs.streamRequest; exports.submitContactInfo = _chunk7P4MIN3Icjs.submitContactInfo; exports.testHealthEndpoint = _chunkYJZ7IQYEcjs.testHealthEndpoint; exports.testLdapConnection = _chunkZYTDV3ZPcjs.testLdapConnection; exports.testSamlConfig = _chunkXCKMEOZ6cjs.testSamlConfig; exports.toggleSamlConfig = _chunkXCKMEOZ6cjs.toggleSamlConfig; exports.uninstallPackage = _chunkOHF4O34Mcjs.uninstallPackage; exports.updateApiKey = _chunkK5WSAZTLcjs.updateApiKey; exports.updateEnforceMfa = _chunkOV7UJVKRcjs.updateEnforceMfa; exports.updateLdapConfig = _chunkZYTDV3ZPcjs.updateLdapConfig; exports.updateNpsSurveyState = _chunk3XQAB4AGcjs.updateNpsSurveyState; exports.updatePackage = _chunkOHF4O34Mcjs.updatePackage; exports.verifyMfaCode = _chunkOV7UJVKRcjs.verifyMfaCode;
218
+ exports.MfaRequiredError = _chunkCXANUEOEcjs.MfaRequiredError; exports.NO_NETWORK_ERROR_CODE = _chunkCXANUEOEcjs.NO_NETWORK_ERROR_CODE; exports.ResponseError = _chunkCXANUEOEcjs.ResponseError; exports.STREAM_SEPERATOR = _chunkCXANUEOEcjs.STREAM_SEPERATOR; exports.canEnableMFA = _chunkOV7UJVKRcjs.canEnableMFA; exports.createApiKey = _chunkK5WSAZTLcjs.createApiKey; exports.deleteApiKey = _chunkK5WSAZTLcjs.deleteApiKey; exports.deleteDestinationFromDb = _chunkOB6QUZZOcjs.deleteDestinationFromDb; exports.disableMfa = _chunkOV7UJVKRcjs.disableMfa; exports.dismissBannerPermanently = _chunkDSZQ3LTRcjs.dismissBannerPermanently; exports.enableMfa = _chunkOV7UJVKRcjs.enableMfa; exports.fetchCommunityNodeAttributes = _chunkXR664FGVcjs.fetchCommunityNodeAttributes; exports.fetchCommunityNodeTypes = _chunkXR664FGVcjs.fetchCommunityNodeTypes; exports.findWebhook = _chunkC7EDXYMGcjs.findWebhook; exports.get = _chunkCXANUEOEcjs.get; exports.getAdminPanelLoginCode = _chunk2UDX6KSWcjs.getAdminPanelLoginCode; exports.getApiKeyScopes = _chunkK5WSAZTLcjs.getApiKeyScopes; exports.getApiKeys = _chunkK5WSAZTLcjs.getApiKeys; exports.getAvailableCommunityPackageCount = _chunkOHF4O34Mcjs.getAvailableCommunityPackageCount; exports.getBecomeCreatorCta = _chunkOOJBVMQTcjs.getBecomeCreatorCta; exports.getCategories = _chunkN3KYHSJNcjs.getCategories; exports.getCloudUserInfo = _chunk2UDX6KSWcjs.getCloudUserInfo; exports.getCollectionById = _chunkN3KYHSJNcjs.getCollectionById; exports.getCollections = _chunkN3KYHSJNcjs.getCollections; exports.getCurrentPlan = _chunk2UDX6KSWcjs.getCurrentPlan; exports.getCurrentUsage = _chunk2UDX6KSWcjs.getCurrentUsage; exports.getDestinationsFromBackend = _chunkOB6QUZZOcjs.getDestinationsFromBackend; exports.getEventNamesFromBackend = _chunkOB6QUZZOcjs.getEventNamesFromBackend; exports.getFullApiResponse = _chunkCXANUEOEcjs.getFullApiResponse; exports.getInstalledCommunityNodes = _chunkOHF4O34Mcjs.getInstalledCommunityNodes; exports.getLdapConfig = _chunkZYTDV3ZPcjs.getLdapConfig; exports.getLdapSynchronizations = _chunkZYTDV3ZPcjs.getLdapSynchronizations; exports.getLocalResourceMapperFields = _chunkXR664FGVcjs.getLocalResourceMapperFields; exports.getMfaQR = _chunkOV7UJVKRcjs.getMfaQR; exports.getModuleSettings = _chunkSROE4HVCcjs.getModuleSettings; exports.getNextVersions = _chunkO3LVSY2Ocjs.getNextVersions; exports.getNodeParameterActionResult = _chunkXR664FGVcjs.getNodeParameterActionResult; exports.getNodeParameterOptions = _chunkXR664FGVcjs.getNodeParameterOptions; exports.getNodeTranslationHeaders = _chunkXR664FGVcjs.getNodeTranslationHeaders; exports.getNodeTypes = _chunkXR664FGVcjs.getNodeTypes; exports.getNodesInformation = _chunkXR664FGVcjs.getNodesInformation; exports.getOidcConfig = _chunkXCKMEOZ6cjs.getOidcConfig; exports.getPromptsData = _chunk7P4MIN3Icjs.getPromptsData; exports.getResourceLocatorResults = _chunkXR664FGVcjs.getResourceLocatorResults; exports.getResourceMapperFields = _chunkXR664FGVcjs.getResourceMapperFields; exports.getRoles = _chunkLZN3X7AKcjs.getRoles; exports.getSamlConfig = _chunkXCKMEOZ6cjs.getSamlConfig; exports.getSamlMetadata = _chunkXCKMEOZ6cjs.getSamlMetadata; exports.getSettings = _chunk3FTGUK44cjs.getSettings; exports.getTemplateById = _chunkN3KYHSJNcjs.getTemplateById; exports.getWhatsNewSection = _chunkO3LVSY2Ocjs.getWhatsNewSection; exports.getWorkflowHistory = _chunkSW7IBR4Ecjs.getWorkflowHistory; exports.getWorkflowTemplate = _chunkN3KYHSJNcjs.getWorkflowTemplate; exports.getWorkflowVersion = _chunkSW7IBR4Ecjs.getWorkflowVersion; exports.getWorkflows = _chunkN3KYHSJNcjs.getWorkflows; exports.hasDestinationId = _chunkOB6QUZZOcjs.hasDestinationId; exports.initOidcLogin = _chunkXCKMEOZ6cjs.initOidcLogin; exports.initSSO = _chunkXCKMEOZ6cjs.initSSO; exports.installNewPackage = _chunkOHF4O34Mcjs.installNewPackage; exports.makeRestApiRequest = _chunkCXANUEOEcjs.makeRestApiRequest; exports.patch = _chunkCXANUEOEcjs.patch; exports.post = _chunkCXANUEOEcjs.post; exports.request = _chunkCXANUEOEcjs.request; exports.runLdapSync = _chunkZYTDV3ZPcjs.runLdapSync; exports.saveDestinationToDb = _chunkOB6QUZZOcjs.saveDestinationToDb; exports.saveOidcConfig = _chunkXCKMEOZ6cjs.saveOidcConfig; exports.saveSamlConfig = _chunkXCKMEOZ6cjs.saveSamlConfig; exports.sendConfirmationEmail = _chunk2UDX6KSWcjs.sendConfirmationEmail; exports.sendGetWorkerStatus = _chunkJKPZR2TJcjs.sendGetWorkerStatus; exports.sendTestMessageToDestination = _chunkOB6QUZZOcjs.sendTestMessageToDestination; exports.sessionStarted = _chunkY55DMGV3cjs.sessionStarted; exports.streamRequest = _chunkCXANUEOEcjs.streamRequest; exports.submitContactInfo = _chunk7P4MIN3Icjs.submitContactInfo; exports.testHealthEndpoint = _chunkN3KYHSJNcjs.testHealthEndpoint; exports.testLdapConnection = _chunkZYTDV3ZPcjs.testLdapConnection; exports.testSamlConfig = _chunkXCKMEOZ6cjs.testSamlConfig; exports.toggleSamlConfig = _chunkXCKMEOZ6cjs.toggleSamlConfig; exports.uninstallPackage = _chunkOHF4O34Mcjs.uninstallPackage; exports.updateApiKey = _chunkK5WSAZTLcjs.updateApiKey; exports.updateEnforceMfa = _chunkOV7UJVKRcjs.updateEnforceMfa; exports.updateLdapConfig = _chunkZYTDV3ZPcjs.updateLdapConfig; exports.updateNpsSurveyState = _chunk3XQAB4AGcjs.updateNpsSurveyState; exports.updatePackage = _chunkOHF4O34Mcjs.updatePackage; exports.verifyMfaCode = _chunkOV7UJVKRcjs.verifyMfaCode;
219
219
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  getWorkflowTemplate,
45
45
  getWorkflows,
46
46
  testHealthEndpoint
47
- } from "./chunk-FBDUFVI7.js";
47
+ } from "./chunk-WRJVRWH6.js";
48
48
  import {
49
49
  dismissBannerPermanently
50
50
  } from "./chunk-YUD6EP3J.js";
@@ -98,7 +98,7 @@ import {
98
98
  getCurrentPlan,
99
99
  getCurrentUsage,
100
100
  sendConfirmationEmail
101
- } from "./chunk-RI442553.js";
101
+ } from "./chunk-DBKI426S.js";
102
102
  import {
103
103
  getAvailableCommunityPackageCount,
104
104
  getInstalledCommunityNodes,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@n8n/rest-api-client",
3
3
  "type": "module",
4
- "version": "1.7.0",
4
+ "version": "1.8.0",
5
5
  "files": [
6
6
  "dist",
7
7
  "LICENSE.md",
@@ -26,11 +26,11 @@
26
26
  "js-base64": "3.7.2",
27
27
  "axios": "1.8.3",
28
28
  "flatted": "3.2.7",
29
- "@n8n/api-types": "0.38.0",
30
- "@n8n/utils": "1.13.0",
31
- "@n8n/constants": "0.9.0",
32
- "n8n-workflow": "1.101.0",
33
- "@n8n/permissions": "0.30.0"
29
+ "@n8n/api-types": "0.39.0",
30
+ "@n8n/permissions": "0.31.0",
31
+ "n8n-workflow": "1.102.0",
32
+ "@n8n/constants": "0.10.0",
33
+ "@n8n/utils": "1.14.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@testing-library/jest-dom": "^6.6.3",
@@ -39,7 +39,7 @@
39
39
  "typescript": "5.8.3",
40
40
  "vite": "^6.3.5",
41
41
  "vitest": "^3.1.3",
42
- "@n8n/i18n": "1.8.0",
42
+ "@n8n/i18n": "1.9.0",
43
43
  "@n8n/eslint-config": "0.0.1",
44
44
  "@n8n/typescript-config": "1.3.0",
45
45
  "@n8n/vitest-config": "1.5.0"
@@ -62,7 +62,7 @@
62
62
  "test": "vitest run",
63
63
  "test:dev": "vitest --silent=false",
64
64
  "lint": "eslint src --quiet",
65
- "lintfix": "eslint src --fix",
65
+ "lint:fix": "eslint src --fix",
66
66
  "format": "biome format --write . && prettier --write . --ignore-path ../../../../.prettierignore",
67
67
  "format:check": "biome ci . && prettier --check . --ignore-path ../../../../.prettierignore"
68
68
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/api/templates.ts"],"sourcesContent":["import type { RawAxiosRequestHeaders } from 'axios';\nimport type { INode, INodeCredentialsDetails } from 'n8n-workflow';\n\nimport type { VersionNode } from './versions';\nimport type { WorkflowData } from './workflows';\nimport { get } from '../utils';\n\nexport interface IWorkflowTemplateNode\n\textends Pick<\n\t\tINode,\n\t\t'name' | 'type' | 'position' | 'parameters' | 'typeVersion' | 'webhookId' | 'id' | 'disabled'\n\t> {\n\t// The credentials in a template workflow have a different type than in a regular workflow\n\tcredentials?: IWorkflowTemplateNodeCredentials;\n}\n\nexport interface IWorkflowTemplateNodeCredentials {\n\t[key: string]: string | INodeCredentialsDetails;\n}\n\nexport interface IWorkflowTemplate {\n\tid: number;\n\tname: string;\n\tworkflow: Pick<WorkflowData, 'connections' | 'settings' | 'pinData'> & {\n\t\tnodes: IWorkflowTemplateNode[];\n\t};\n}\n\nexport interface ITemplatesNode extends VersionNode {\n\tid: number;\n\tcategories?: ITemplatesCategory[];\n}\n\nexport interface ITemplatesCollection {\n\tid: number;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\tworkflows: Array<{ id: number }>;\n}\n\ninterface ITemplatesImage {\n\tid: number;\n\turl: string;\n}\n\ninterface ITemplatesCollectionExtended extends ITemplatesCollection {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tcreatedAt: string;\n}\n\nexport interface ITemplatesCollectionFull extends ITemplatesCollectionExtended {\n\tfull: true;\n}\n\nexport interface ITemplatesCollectionResponse extends ITemplatesCollectionExtended {\n\tworkflows: ITemplatesWorkflow[];\n}\n\n/**\n * A template without the actual workflow definition\n */\n\nexport interface ITemplatesWorkflow {\n\tid: number;\n\tcreatedAt: string;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\ttotalViews: number;\n\tuser: {\n\t\tusername: string;\n\t};\n}\n\nexport interface ITemplatesWorkflowInfo {\n\tnodeCount: number;\n\tnodeTypes: {\n\t\t[key: string]: {\n\t\t\tcount: number;\n\t\t};\n\t};\n}\n\nexport type TemplateSearchFacet = {\n\tfield_name: string;\n\tsampled: boolean;\n\tstats: {\n\t\ttotal_values: number;\n\t};\n\tcounts: Array<{\n\t\tcount: number;\n\t\thighlighted: string;\n\t\tvalue: string;\n\t}>;\n};\n\nexport interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tworkflowInfo: ITemplatesWorkflowInfo;\n}\n\n/**\n * A template with also the full workflow definition\n */\n\nexport interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {\n\tfull: true;\n}\n\nexport interface ITemplatesQuery {\n\tcategories: string[];\n\tsearch: string;\n}\n\nexport interface ITemplatesCategory {\n\tid: number;\n\tname: string;\n}\n\nfunction stringifyArray(arr: string[]) {\n\treturn arr.join(',');\n}\n\nexport async function testHealthEndpoint(apiEndpoint: string) {\n\treturn await get(apiEndpoint, '/health');\n}\n\nexport async function getCategories(\n\tapiEndpoint: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ categories: ITemplatesCategory[] }> {\n\treturn await get(apiEndpoint, '/templates/categories', undefined, headers);\n}\n\nexport async function getCollections(\n\tapiEndpoint: string,\n\tquery: ITemplatesQuery,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collections: ITemplatesCollection[] }> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/collections',\n\t\t{ category: query.categories, search: query.search },\n\t\theaders,\n\t);\n}\n\nexport async function getWorkflows(\n\tapiEndpoint: string,\n\tquery: { page: number; limit: number; categories: string[]; search: string },\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{\n\ttotalWorkflows: number;\n\tworkflows: ITemplatesWorkflow[];\n\tfilters: TemplateSearchFacet[];\n}> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/search',\n\t\t{\n\t\t\tpage: query.page,\n\t\t\trows: query.limit,\n\t\t\tcategory: stringifyArray(query.categories),\n\t\t\tsearch: query.search,\n\t\t},\n\t\theaders,\n\t);\n}\n\nexport async function getCollectionById(\n\tapiEndpoint: string,\n\tcollectionId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collection: ITemplatesCollectionResponse }> {\n\treturn await get(apiEndpoint, `/templates/collections/${collectionId}`, undefined, headers);\n}\n\nexport async function getTemplateById(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ workflow: ITemplatesWorkflowResponse }> {\n\treturn await get(apiEndpoint, `/templates/workflows/${templateId}`, undefined, headers);\n}\n\nexport async function getWorkflowTemplate(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<IWorkflowTemplate> {\n\treturn await get(apiEndpoint, `/workflows/templates/${templateId}`, undefined, headers);\n}\n"],"mappings":";;;;;AA0HA,SAAS,eAAe,KAAe;AACtC,SAAO,IAAI,KAAK,GAAG;AACpB;AAEA,eAAsB,mBAAmB,aAAqB;AAC7D,SAAO,MAAM,IAAI,aAAa,SAAS;AACxC;AAEA,eAAsB,cACrB,aACA,SACgD;AAChD,SAAO,MAAM,IAAI,aAAa,yBAAyB,QAAW,OAAO;AAC1E;AAEA,eAAsB,eACrB,aACA,OACA,SACmD;AACnD,SAAO,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,UAAU,MAAM,YAAY,QAAQ,MAAM,OAAO;AAAA,IACnD;AAAA,EACD;AACD;AAEA,eAAsB,aACrB,aACA,OACA,SAKE;AACF,SAAO,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,MACC,MAAM,MAAM;AAAA,MACZ,MAAM,MAAM;AAAA,MACZ,UAAU,eAAe,MAAM,UAAU;AAAA,MACzC,QAAQ,MAAM;AAAA,IACf;AAAA,IACA;AAAA,EACD;AACD;AAEA,eAAsB,kBACrB,aACA,cACA,SACwD;AACxD,SAAO,MAAM,IAAI,aAAa,0BAA0B,YAAY,IAAI,QAAW,OAAO;AAC3F;AAEA,eAAsB,gBACrB,aACA,YACA,SACoD;AACpD,SAAO,MAAM,IAAI,aAAa,wBAAwB,UAAU,IAAI,QAAW,OAAO;AACvF;AAEA,eAAsB,oBACrB,aACA,YACA,SAC6B;AAC7B,SAAO,MAAM,IAAI,aAAa,wBAAwB,UAAU,IAAI,QAAW,OAAO;AACvF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/api/cloudPlans.ts"],"sourcesContent":["import type { IRestApiContext } from '../types';\nimport { get, post } from '../utils';\n\nexport declare namespace Cloud {\n\texport interface PlanData {\n\t\tplanId: number;\n\t\tmonthlyExecutionsLimit: number;\n\t\tactiveWorkflowsLimit: number;\n\t\tcredentialsLimit: number;\n\t\tisActive: boolean;\n\t\tdisplayName: string;\n\t\texpirationDate: string;\n\t\tmetadata: PlanMetadata;\n\t}\n\n\texport interface PlanMetadata {\n\t\tversion: 'v1';\n\t\tgroup: 'opt-out' | 'opt-in' | 'trial';\n\t\tslug: 'pro-1' | 'pro-2' | 'starter' | 'trial-1';\n\t\ttrial?: Trial;\n\t}\n\n\tinterface Trial {\n\t\tlength: number;\n\t\tgracePeriod: number;\n\t}\n\n\texport type UserAccount = {\n\t\tconfirmed: boolean;\n\t\tusername: string;\n\t\temail: string;\n\t\thasEarlyAccess?: boolean;\n\t\trole?: string;\n\t};\n}\n\nexport interface InstanceUsage {\n\ttimeframe?: string;\n\texecutions: number;\n\tactiveWorkflows: number;\n}\n\nexport async function getCurrentPlan(context: IRestApiContext): Promise<Cloud.PlanData> {\n\treturn await get(context.baseUrl, '/admin/cloud-plan');\n}\n\nexport async function getCurrentUsage(context: IRestApiContext): Promise<InstanceUsage> {\n\treturn await get(context.baseUrl, '/cloud/limits');\n}\n\nexport async function getCloudUserInfo(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await get(context.baseUrl, '/cloud/proxy/user/me');\n}\n\nexport async function sendConfirmationEmail(context: IRestApiContext): Promise<Cloud.UserAccount> {\n\treturn await post(context.baseUrl, '/cloud/proxy/user/resend-confirmation-email');\n}\n\nexport async function getAdminPanelLoginCode(context: IRestApiContext): Promise<{ code: string }> {\n\treturn await get(context.baseUrl, '/cloud/proxy/login/code');\n}\n"],"mappings":";;;;;;AA0CA,eAAsB,eAAe,SAAmD;AACvF,SAAO,MAAM,IAAI,QAAQ,SAAS,mBAAmB;AACtD;AAEA,eAAsB,gBAAgB,SAAkD;AACvF,SAAO,MAAM,IAAI,QAAQ,SAAS,eAAe;AAClD;AAEA,eAAsB,iBAAiB,SAAsD;AAC5F,SAAO,MAAM,IAAI,QAAQ,SAAS,sBAAsB;AACzD;AAEA,eAAsB,sBAAsB,SAAsD;AACjG,SAAO,MAAM,KAAK,QAAQ,SAAS,6CAA6C;AACjF;AAEA,eAAsB,uBAAuB,SAAqD;AACjG,SAAO,MAAM,IAAI,QAAQ,SAAS,yBAAyB;AAC5D;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-YJZ7IQYE.cjs","../src/api/templates.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACsHA,SAAS,cAAA,CAAe,GAAA,EAAe;AACtC,EAAA,OAAO,GAAA,CAAI,IAAA,CAAK,GAAG,CAAA;AACpB;AAEA,MAAA,SAAsB,kBAAA,CAAmB,WAAA,EAAqB;AAC7D,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,SAAS,CAAA;AACxC;AAEA,MAAA,SAAsB,aAAA,CACrB,WAAA,EACA,OAAA,EACgD;AAChD,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,uBAAA,EAAyB,KAAA,CAAA,EAAW,OAAO,CAAA;AAC1E;AAEA,MAAA,SAAsB,cAAA,CACrB,WAAA,EACA,KAAA,EACA,OAAA,EACmD;AACnD,EAAA,OAAO,MAAM,mCAAA;AAAA,IACZ,WAAA;AAAA,IACA,wBAAA;AAAA,IACA,EAAE,QAAA,EAAU,KAAA,CAAM,UAAA,EAAY,MAAA,EAAQ,KAAA,CAAM,OAAO,CAAA;AAAA,IACnD;AAAA,EACD,CAAA;AACD;AAEA,MAAA,SAAsB,YAAA,CACrB,WAAA,EACA,KAAA,EACA,OAAA,EAKE;AACF,EAAA,OAAO,MAAM,mCAAA;AAAA,IACZ,WAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,MACC,IAAA,EAAM,KAAA,CAAM,IAAA;AAAA,MACZ,IAAA,EAAM,KAAA,CAAM,KAAA;AAAA,MACZ,QAAA,EAAU,cAAA,CAAe,KAAA,CAAM,UAAU,CAAA;AAAA,MACzC,MAAA,EAAQ,KAAA,CAAM;AAAA,IACf,CAAA;AAAA,IACA;AAAA,EACD,CAAA;AACD;AAEA,MAAA,SAAsB,iBAAA,CACrB,WAAA,EACA,YAAA,EACA,OAAA,EACwD;AACxD,EAAA,OAAO,MAAM,mCAAA,WAAI,EAAa,CAAA,uBAAA,EAA0B,YAAY,CAAA,CAAA;AACrE;AAMqD;AACgB,EAAA;AACrE;AAM8B;AACuC,EAAA;AACrE;ADtJuE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/n8n/n8n/packages/frontend/@n8n/rest-api-client/dist/chunk-YJZ7IQYE.cjs","sourcesContent":[null,"import type { RawAxiosRequestHeaders } from 'axios';\nimport type { INode, INodeCredentialsDetails } from 'n8n-workflow';\n\nimport type { VersionNode } from './versions';\nimport type { WorkflowData } from './workflows';\nimport { get } from '../utils';\n\nexport interface IWorkflowTemplateNode\n\textends Pick<\n\t\tINode,\n\t\t'name' | 'type' | 'position' | 'parameters' | 'typeVersion' | 'webhookId' | 'id' | 'disabled'\n\t> {\n\t// The credentials in a template workflow have a different type than in a regular workflow\n\tcredentials?: IWorkflowTemplateNodeCredentials;\n}\n\nexport interface IWorkflowTemplateNodeCredentials {\n\t[key: string]: string | INodeCredentialsDetails;\n}\n\nexport interface IWorkflowTemplate {\n\tid: number;\n\tname: string;\n\tworkflow: Pick<WorkflowData, 'connections' | 'settings' | 'pinData'> & {\n\t\tnodes: IWorkflowTemplateNode[];\n\t};\n}\n\nexport interface ITemplatesNode extends VersionNode {\n\tid: number;\n\tcategories?: ITemplatesCategory[];\n}\n\nexport interface ITemplatesCollection {\n\tid: number;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\tworkflows: Array<{ id: number }>;\n}\n\ninterface ITemplatesImage {\n\tid: number;\n\turl: string;\n}\n\ninterface ITemplatesCollectionExtended extends ITemplatesCollection {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tcreatedAt: string;\n}\n\nexport interface ITemplatesCollectionFull extends ITemplatesCollectionExtended {\n\tfull: true;\n}\n\nexport interface ITemplatesCollectionResponse extends ITemplatesCollectionExtended {\n\tworkflows: ITemplatesWorkflow[];\n}\n\n/**\n * A template without the actual workflow definition\n */\n\nexport interface ITemplatesWorkflow {\n\tid: number;\n\tcreatedAt: string;\n\tname: string;\n\tnodes: ITemplatesNode[];\n\ttotalViews: number;\n\tuser: {\n\t\tusername: string;\n\t};\n}\n\nexport interface ITemplatesWorkflowInfo {\n\tnodeCount: number;\n\tnodeTypes: {\n\t\t[key: string]: {\n\t\t\tcount: number;\n\t\t};\n\t};\n}\n\nexport type TemplateSearchFacet = {\n\tfield_name: string;\n\tsampled: boolean;\n\tstats: {\n\t\ttotal_values: number;\n\t};\n\tcounts: Array<{\n\t\tcount: number;\n\t\thighlighted: string;\n\t\tvalue: string;\n\t}>;\n};\n\nexport interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate {\n\tdescription: string | null;\n\timage: ITemplatesImage[];\n\tcategories: ITemplatesCategory[];\n\tworkflowInfo: ITemplatesWorkflowInfo;\n}\n\n/**\n * A template with also the full workflow definition\n */\n\nexport interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse {\n\tfull: true;\n}\n\nexport interface ITemplatesQuery {\n\tcategories: string[];\n\tsearch: string;\n}\n\nexport interface ITemplatesCategory {\n\tid: number;\n\tname: string;\n}\n\nfunction stringifyArray(arr: string[]) {\n\treturn arr.join(',');\n}\n\nexport async function testHealthEndpoint(apiEndpoint: string) {\n\treturn await get(apiEndpoint, '/health');\n}\n\nexport async function getCategories(\n\tapiEndpoint: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ categories: ITemplatesCategory[] }> {\n\treturn await get(apiEndpoint, '/templates/categories', undefined, headers);\n}\n\nexport async function getCollections(\n\tapiEndpoint: string,\n\tquery: ITemplatesQuery,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collections: ITemplatesCollection[] }> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/collections',\n\t\t{ category: query.categories, search: query.search },\n\t\theaders,\n\t);\n}\n\nexport async function getWorkflows(\n\tapiEndpoint: string,\n\tquery: { page: number; limit: number; categories: string[]; search: string },\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{\n\ttotalWorkflows: number;\n\tworkflows: ITemplatesWorkflow[];\n\tfilters: TemplateSearchFacet[];\n}> {\n\treturn await get(\n\t\tapiEndpoint,\n\t\t'/templates/search',\n\t\t{\n\t\t\tpage: query.page,\n\t\t\trows: query.limit,\n\t\t\tcategory: stringifyArray(query.categories),\n\t\t\tsearch: query.search,\n\t\t},\n\t\theaders,\n\t);\n}\n\nexport async function getCollectionById(\n\tapiEndpoint: string,\n\tcollectionId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ collection: ITemplatesCollectionResponse }> {\n\treturn await get(apiEndpoint, `/templates/collections/${collectionId}`, undefined, headers);\n}\n\nexport async function getTemplateById(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<{ workflow: ITemplatesWorkflowResponse }> {\n\treturn await get(apiEndpoint, `/templates/workflows/${templateId}`, undefined, headers);\n}\n\nexport async function getWorkflowTemplate(\n\tapiEndpoint: string,\n\ttemplateId: string,\n\theaders?: RawAxiosRequestHeaders,\n): Promise<IWorkflowTemplate> {\n\treturn await get(apiEndpoint, `/workflows/templates/${templateId}`, undefined, headers);\n}\n"]}