n8n-nodes-academyfive-api-beta 0.0.1-beta

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.
Files changed (120) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +9 -0
  3. package/dist/credentials/AcademyFiveCredentialsApi.credentials.d.ts +10 -0
  4. package/dist/credentials/AcademyFiveCredentialsApi.credentials.js +53 -0
  5. package/dist/credentials/AcademyFiveCredentialsApi.credentials.js.map +1 -0
  6. package/dist/credentials/simovative.svg +5 -0
  7. package/dist/nodes/AcademyFive/AcademyFive.node.d.ts +10 -0
  8. package/dist/nodes/AcademyFive/AcademyFive.node.js +184 -0
  9. package/dist/nodes/AcademyFive/AcademyFive.node.js.map +1 -0
  10. package/dist/nodes/AcademyFive/AcademyFive.node.json +6 -0
  11. package/dist/nodes/AcademyFive/MapToRequestUtils.d.ts +24 -0
  12. package/dist/nodes/AcademyFive/MapToRequestUtils.js +245 -0
  13. package/dist/nodes/AcademyFive/MapToRequestUtils.js.map +1 -0
  14. package/dist/nodes/AcademyFive/NodeConfigUtils.d.ts +5 -0
  15. package/dist/nodes/AcademyFive/NodeConfigUtils.js +50 -0
  16. package/dist/nodes/AcademyFive/NodeConfigUtils.js.map +1 -0
  17. package/dist/nodes/AcademyFive/SchemaResolver.d.ts +12 -0
  18. package/dist/nodes/AcademyFive/SchemaResolver.js +205 -0
  19. package/dist/nodes/AcademyFive/SchemaResolver.js.map +1 -0
  20. package/dist/nodes/AcademyFive/SpecGeneratorUtils.d.ts +11 -0
  21. package/dist/nodes/AcademyFive/SpecGeneratorUtils.js +106 -0
  22. package/dist/nodes/AcademyFive/SpecGeneratorUtils.js.map +1 -0
  23. package/dist/nodes/AcademyFive/SpecMapper.d.ts +61 -0
  24. package/dist/nodes/AcademyFive/SpecMapper.js +385 -0
  25. package/dist/nodes/AcademyFive/SpecMapper.js.map +1 -0
  26. package/dist/nodes/AcademyFive/simovative.svg +5 -0
  27. package/dist/nodes/AcademyFive/types.d.ts +34 -0
  28. package/dist/nodes/AcademyFive/types.js +19 -0
  29. package/dist/nodes/AcademyFive/types.js.map +1 -0
  30. package/dist/package.json +66 -0
  31. package/dist/specs/ac5.json +1 -0
  32. package/dist/specs/schemas/src/Api/AccessGroups/Schema/AccessGroupsGetPaginatedSchema.json +94 -0
  33. package/dist/specs/schemas/src/Api/AccessGroups/Schema/AccessGroupsGetSchema.json +66 -0
  34. package/dist/specs/schemas/src/Api/Bookings/Handler/BookingsPatchSchema.json +150 -0
  35. package/dist/specs/schemas/src/Api/Bookings/StatisticAustria/Handler/BookingStatisticAustriaPatchSchema.json +111 -0
  36. package/dist/specs/schemas/src/Api/Bookings/StatisticAustria/Handler/BookingStatisticAustriaPostSchema.json +113 -0
  37. package/dist/specs/schemas/src/Api/Cohorts/Schema/CohortsGetPaginatedSchema.json +83 -0
  38. package/dist/specs/schemas/src/Api/Colors/Schema/ColorsListGetSchema.json +50 -0
  39. package/dist/specs/schemas/src/Api/Common/Model/Validation/ValidationErrorSchema.json +29 -0
  40. package/dist/specs/schemas/src/Api/Company/Handler/CompanyPostSchema.json +77 -0
  41. package/dist/specs/schemas/src/Api/Company/Handler/CompanyPutSchema.json +84 -0
  42. package/dist/specs/schemas/src/Api/CourseSeriesLecturer/Handler/CourseSeriesLecturerPostSchema.json +113 -0
  43. package/dist/specs/schemas/src/Api/CourseTicket/Handler/CourseTicketsPostV2Schema.json +162 -0
  44. package/dist/specs/schemas/src/Api/DataSourceAreas/Handler/DataSourceAreasPatchSchema.json +84 -0
  45. package/dist/specs/schemas/src/Api/DataSourceAreas/Handler/DataSourceAreasPostSchema.json +151 -0
  46. package/dist/specs/schemas/src/Api/DataSourceFieldOptionGroupRestrictions/Handler/DataSourceFieldOptionGroupRestrictionsPatchSchema.json +107 -0
  47. package/dist/specs/schemas/src/Api/DataSourceFieldOptionGroupRestrictions/Handler/DataSourceFieldOptionGroupRestrictionsPostSchema.json +107 -0
  48. package/dist/specs/schemas/src/Api/DataSourceFieldOptionGroups/Handler/DataSourceFieldOptionGroupsPatchSchema.json +88 -0
  49. package/dist/specs/schemas/src/Api/DataSourceFieldOptionGroups/Handler/DataSourceFieldOptionGroupsPostSchema.json +89 -0
  50. package/dist/specs/schemas/src/Api/DataSourceFieldOptionValues/Handler/DataSourceFieldOptionValuesPatchSchema.json +54 -0
  51. package/dist/specs/schemas/src/Api/DataSourceFieldOptionValues/Handler/DataSourceFieldOptionValuesPostSchema.json +87 -0
  52. package/dist/specs/schemas/src/Api/DataSourceFields/Handler/DataSourceFieldsPatchSchema.json +242 -0
  53. package/dist/specs/schemas/src/Api/DataSourceFields/Handler/DataSourceFieldsPostSchema.json +357 -0
  54. package/dist/specs/schemas/src/Api/DataSourceRecords/Handler/DataSourceRecordsDeleteSchema.json +16 -0
  55. package/dist/specs/schemas/src/Api/DataSourceRecords/Handler/DataSourceRecordsPutBulkSchema.json +42 -0
  56. package/dist/specs/schemas/src/Api/DataSourceTabs/Handler/DataSourceTabsPostSchema.json +85 -0
  57. package/dist/specs/schemas/src/Api/DataSources/Handler/DataSourcesPostSchema.json +61 -0
  58. package/dist/specs/schemas/src/Api/Documents/Handler/DocumentsPostSchema.json +61 -0
  59. package/dist/specs/schemas/src/Api/EventSeries/Handler/EventDatePatchSchema.json +159 -0
  60. package/dist/specs/schemas/src/Api/EventSeries/Handler/EventDatePostSchema.json +335 -0
  61. package/dist/specs/schemas/src/Api/EventSeries/Handler/EventSeriesCustomPatchSchema.json +837 -0
  62. package/dist/specs/schemas/src/Api/EventSeries/Handler/EventSeriesCustomPostSchema.json +288 -0
  63. package/dist/specs/schemas/src/Api/EventSeries/Handler/EventSeriesPostSchema.json +514 -0
  64. package/dist/specs/schemas/src/Api/GkvPendingMessages/Handler/GkvPendingMessagesPatchBulkSchema.json +64 -0
  65. package/dist/specs/schemas/src/Api/GkvPendingMessages/Handler/GkvPendingMessagesPatchSchema.json +120 -0
  66. package/dist/specs/schemas/src/Api/GkvPendingMessages/Handler/GkvPendingMessagesPostSchema.json +117 -0
  67. package/dist/specs/schemas/src/Api/GkvPendingMessages/Handler/GkvPendingMessagesSelectProfileSchema.json +47 -0
  68. package/dist/specs/schemas/src/Api/GlobalFileSyncs/Handler/GlobalFileSyncsPatchSchema.json +63 -0
  69. package/dist/specs/schemas/src/Api/GradeAnnotation/Handler/GradeAnnotationPostSchema.json +98 -0
  70. package/dist/specs/schemas/src/Api/GradeAnnotation/Handler/GradeAnnotationPutSchema.json +105 -0
  71. package/dist/specs/schemas/src/Api/Grades/GradeAnnotationRelations/Handler/GradeAnnotationRelationsPostSchema.json +102 -0
  72. package/dist/specs/schemas/src/Api/Grades/ModuleGradeRecalculation/Schema/ModuleGradeRecalculationJobsGetSchema.json +89 -0
  73. package/dist/specs/schemas/src/Api/Grades/ModuleGradeRecalculation/Schema/ModuleGradeRecalculationJobsPostSchema.json +54 -0
  74. package/dist/specs/schemas/src/Api/Grades/Schema/GradesAttributeSchema.json +400 -0
  75. package/dist/specs/schemas/src/Api/Grades/Schema/GradesGetSchema.json +108 -0
  76. package/dist/specs/schemas/src/Api/Grades/Schema/GradesPatchSchema.json +112 -0
  77. package/dist/specs/schemas/src/Api/Grades/Schema/GradesPostSchema.json +950 -0
  78. package/dist/specs/schemas/src/Api/Grades/Schema/GradesRelationshipSchema.json +547 -0
  79. package/dist/specs/schemas/src/Api/HealthInsuranceInstitutes/Handler/HealthInsuranceInstitutesPatchSchema.json +71 -0
  80. package/dist/specs/schemas/src/Api/HealthInsuranceInstitutes/Handler/HealthInsuranceInstitutesPostSchema.json +73 -0
  81. package/dist/specs/schemas/src/Api/HealthInsuranceProfile/Handler/HealthInsuranceProfilePatchSchema.json +83 -0
  82. package/dist/specs/schemas/src/Api/HealthInsuranceProfile/Handler/HealthInsuranceProfilePostSchema.json +38 -0
  83. package/dist/specs/schemas/src/Api/HealthInsuranceProfileCommunicationLog/Handler/HealthInsuranceProfileCommunicationLogPatchSchema.json +101 -0
  84. package/dist/specs/schemas/src/Api/HealthInsuranceProfileCommunicationLog/Handler/HealthInsuranceProfileCommunicationLogPostSchema.json +99 -0
  85. package/dist/specs/schemas/src/Api/Icons/Schema/IconsListGetSchema.json +50 -0
  86. package/dist/specs/schemas/src/Api/InvoiceCollections/Handler/InvoiceCollectionsFromInstallmentsPostSchema.json +49 -0
  87. package/dist/specs/schemas/src/Api/InvoiceQueueEntries/Handler/InvoiceQueueEntriesPostSchema.json +49 -0
  88. package/dist/specs/schemas/src/Api/Invoices/Handler/InvoicesPostSchema.json +182 -0
  89. package/dist/specs/schemas/src/Api/Invoices/Handler/InvoicesStatusChangePostSchema.json +55 -0
  90. package/dist/specs/schemas/src/Api/LecturerContractEmploymentAvailabilities/Handler/LecturerContractEmploymentAvailabilitiesPatchSchema.json +87 -0
  91. package/dist/specs/schemas/src/Api/LecturerContractEmploymentAvailabilities/Handler/LecturerContractEmploymentAvailabilitiesPostSchema.json +84 -0
  92. package/dist/specs/schemas/src/Api/LecturerContractEmployments/Handler/LecturerContractEmploymentsPatchSchema.json +103 -0
  93. package/dist/specs/schemas/src/Api/LecturerContractEmployments/Handler/LecturerContractEmploymentsPostSchema.json +153 -0
  94. package/dist/specs/schemas/src/Api/LecturerContracts/Handler/LecturerContractsPatchSchema.json +154 -0
  95. package/dist/specs/schemas/src/Api/LecturerContracts/Handler/LecturerContractsPostSchema.json +215 -0
  96. package/dist/specs/schemas/src/Api/OnlineExamEnrolments/Handler/OnlineExamEnrolmentsPostSchema.json +180 -0
  97. package/dist/specs/schemas/src/Api/Payment/Command/PaymentAddCommandSchema.json +51 -0
  98. package/dist/specs/schemas/src/Api/ProfessionalBackground/Handler/ProfessionalBackgroundPostSchema.json +104 -0
  99. package/dist/specs/schemas/src/Api/ProfessionalBackground/Handler/ProfessionalBackgroundPutSchema.json +113 -0
  100. package/dist/specs/schemas/src/Api/ProfileBankDetails/Handler/ProfileBankDetailsPatchSchema.json +56 -0
  101. package/dist/specs/schemas/src/Api/ProfileBankDetails/Handler/ProfileBankDetailsPostSchema.json +56 -0
  102. package/dist/specs/schemas/src/Api/Profiles/Handler/ProfilesPatchSchema.json +45 -0
  103. package/dist/specs/schemas/src/Api/Profiles/Schema/ProfilesGetSchema.json +0 -0
  104. package/dist/specs/schemas/src/Api/RequestFormProfileComments/Schema/RequestFormProfileCommentsPostSchema.json +98 -0
  105. package/dist/specs/schemas/src/Api/RequestFormProfiles/Schema/RequestFromProfilesPatchSchema.json +45 -0
  106. package/dist/specs/schemas/src/Api/RevenueAccounts/Handler/RevenueAccountsPatchSchema.json +151 -0
  107. package/dist/specs/schemas/src/Api/RevenueAccounts/Handler/RevenueAccountsPostSchema.json +151 -0
  108. package/dist/specs/schemas/src/Api/StatisticAustria/Handler/StatisticAustriaPatchSchema.json +115 -0
  109. package/dist/specs/schemas/src/Api/StatisticAustria/Handler/StatisticAustriaPostSchema.json +115 -0
  110. package/dist/specs/schemas/src/Api/StatisticValidations/Handler/StatisticValidationsPostSchema.json +37 -0
  111. package/dist/specs/schemas/src/Api/Submissions/StatusChange/Handler/SubmissionsStatusChangePostSchema.json +42 -0
  112. package/dist/specs/schemas/src/Api/TaskTypes/Schema/TaskTypesGetSchema.json +213 -0
  113. package/dist/specs/schemas/src/Api/TaskTypes/Schema/TaskTypesPatchSchema.json +195 -0
  114. package/dist/specs/schemas/src/Api/TaskTypes/Schema/TaskTypesPostSchema.json +208 -0
  115. package/dist/specs/schemas/src/Api/TranslationPlaceholders/Schema/TranslationPlaceholdersGetSchema.json +57 -0
  116. package/dist/specs/schemas/src/Api/ZensusSettings/Handler/ZensusSettingsPatchSchema.json +176 -0
  117. package/dist/specs/schemas/src/Api/ZensusSettings/Handler/ZensusSettingsPostSchema.json +170 -0
  118. package/dist/tsconfig.tsbuildinfo +1 -0
  119. package/index.js +0 -0
  120. package/package.json +66 -0
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2025 Simovative GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # AcademyFIVE integration for n8n
2
+
3
+ Integration for n8n to call the academyFIVE webservices.
4
+
5
+ # Getting started
6
+
7
+ To get started, you need to configure the credentials for the academyFIVE webservices.
8
+
9
+ You need the URL of your academyFIVE instance as well as the username and password for the API.
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class AcademyFiveCredentialsApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AcademyFiveCredentialsApi = void 0;
4
+ class AcademyFiveCredentialsApi {
5
+ constructor() {
6
+ this.name = 'academyFiveCredentialsApi';
7
+ this.displayName = 'academyFIVE API';
8
+ this.icon = { light: 'file:simovative.svg', dark: 'file:simovative.svg' };
9
+ this.documentationUrl = 'https://ac5.a5cloud-preview.net/api/documentation';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Base URL',
13
+ name: 'hostname',
14
+ type: 'string',
15
+ default: '',
16
+ placeholder: 'https://system.academyfive.net',
17
+ description: 'The base URL of the Academy Five API',
18
+ },
19
+ {
20
+ displayName: 'User Name',
21
+ name: 'username',
22
+ type: 'string',
23
+ default: '',
24
+ },
25
+ {
26
+ displayName: 'Password',
27
+ name: 'password',
28
+ type: 'string',
29
+ typeOptions: {
30
+ password: true,
31
+ },
32
+ default: '',
33
+ },
34
+ ];
35
+ this.authenticate = {
36
+ type: 'generic',
37
+ properties: {
38
+ auth: {
39
+ username: '={{ $credentials.username }}',
40
+ password: '={{ $credentials.password }}',
41
+ },
42
+ },
43
+ };
44
+ this.test = {
45
+ request: {
46
+ baseURL: '={{ $credentials.hostname}}',
47
+ url: '/api/documentation',
48
+ },
49
+ };
50
+ }
51
+ }
52
+ exports.AcademyFiveCredentialsApi = AcademyFiveCredentialsApi;
53
+ //# sourceMappingURL=AcademyFiveCredentialsApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcademyFiveCredentialsApi.credentials.js","sourceRoot":"","sources":["../../credentials/AcademyFiveCredentialsApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,yBAAyB;IAAtC;QACC,SAAI,GAAG,2BAA2B,CAAC;QACnC,gBAAW,GAAG,iBAAiB,CAAC;QAChC,SAAI,GAAS,EAAE,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;QAE3E,qBAAgB,GAAG,mDAAmD,CAAC;QAEvE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,gCAAgC;gBAC7C,WAAW,EAAE,sCAAsC;aACnD;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,8BAA8B;oBACxC,QAAQ,EAAE,8BAA8B;iBACxC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,6BAA6B;gBACtC,GAAG,EAAE,oBAAoB;aACzB;SACD,CAAC;IACH,CAAC;CAAA;AAjDD,8DAiDC"}
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Ebene_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 640 640">
3
+ <!-- Generator: Adobe Illustrator 29.7.1, SVG Export Plug-In . SVG Version: 2.1.1 Build 8) -->
4
+ <path d="M435.64,527.82c1.6-1.6,6.4-4.2,13.8-7,7.7-2.9,16.6-7,26.9-12.5,10.2-5.1,21.1-11.8,32.6-19.8s22.4-18.2,32.3-30.7c10.2-12.2,18.6-26.9,25.9-44.2,7-17,11.2-37.1,12.2-59.8-3.8-17.3-9.3-28.2-16.3-33.3-7.4-4.8-16.6-4.2-28.2,1.9-11.6,6.1-25,17.6-40.6,34.2s-33.6,37.8-53.8,63.4c-2.2-.3-4.8-7.4-6.7-20.8-2.2-13.4-3.8-32.3-5.1-56.6s-1.9-53.4-1.9-87.7,1-72,3.2-113.9l187.8-25.3c11.5,0,18.6,2.2,21.4,6.4s.6,11.8-6.7,22.4c-9.6-1.3-22.1-1.6-38.1,0-16,1.3-33,2.9-50.2,5.4-17.6,2.2-34.2,5.1-50.2,8.3s-28.5,6.1-37.4,8.3c-1,33.9-1.6,63-1.6,86.4v58.6c0,15.4.3,27.2.6,34.9s.6,12.8.6,14.7c8-9,16-17.9,23.4-26.6s15.4-16.3,23.7-23.4,17.6-12.5,27.2-16.3c9.6-4.2,20.8-6.1,33.6-6.1,7.7,0,14.4,2.2,19.8,6.4s9.9,9.6,13.1,16.3,5.8,13.8,7.4,21.1,2.2,14.7,2.2,21.1c-.3,26.6-5.4,50.6-15,72s-22.4,40.3-38.1,56.6c-15.4,16.3-33,30.4-52.8,41.6-19.5,11.5-39,20.5-58.6,26.9-1.9-.6-3.8-1.9-5.1-4.2s-2.2-4.2-2.9-6.7-.6-5.1,0-7.4c.3-2.2,1-4.2,1.9-5.1h0l-.3.5ZM357.84,548.02c-4.2-6.4-7-15-8-25.3s-1.6-21.4-1.9-33v-34.2c0-11.2-.6-20.8-2.6-28.8-14.4,31.7-28.2,56.3-41,74.2-12.8,17.6-24.6,30.4-35.2,37.8s-20.2,10.9-28.8,10.2-16-3.8-22.1-9.3-10.6-12.2-14.1-19.8c-3.5-8-5.1-15.4-5.4-22.4-2.2-11.8-2.2-25.9,0-42.2,1.9-16.3,5.4-33.6,10.6-51.2s11.5-34.6,19.5-51.5,16.6-31.4,26.9-43.5c9.9-12.2,20.8-21.4,32-27.5,11.5-6.1,23.4-7,35.5-2.9,6.1-.6,11.2-.3,15.4.6s7.7,3.2,10.2,6.7c2.9,3.5,4.8,8,6.1,14.1s2.2,13.8,2.9,23c-.6,29.8,0,55.4,2.6,76.2,2.2,20.8,5.1,39.4,8,55.4,3.2,16,6.1,30.4,9,43.5s4.8,26.2,5.4,40.3c0,4.8-1.3,8.6-3.8,11.2s-5.1,4.2-8.3,5.1c-3.2.6-6.1.6-8.6-.6s-4.2-3.2-4.5-5.4h0l.2-.7ZM331.34,314.72c-7.4-9.9-15.4-14.1-24-12.5s-17.3,7-25.6,16c-8.6,9-16.6,20.8-24.3,35.5s-14.4,30.4-19.8,46.7c-5.4,16.6-9.6,33.3-12.2,49.6-2.6,16.6-3.2,31-1.6,43.5,4.2,13.8,9.6,22.1,15.7,25s12.8,1.9,19.8-2.9,14.4-12.5,21.8-23,14.4-21.8,21.1-33.9,12.8-24.3,18.2-36.5c5.4-12.2,9.9-22.4,13.1-30.7l-2.2-77.1h0v.3ZM200.14,276.92c25.6-25.6,57-39,93.4-39,16.3,0,31.7,2.6,45.8,7.7,1-3.8,1.3-8,0-12.2-3.5-16-52.2-52.2-52.2-52.2,0,0,51.2-67.5,63.4-94.4,1-2.2-6.1-2.2-8.6-1.6-70.4,22.7-224.6,88.6-224.6,88.6,0,0-3.8,1.6-116.2,152.6,0,0-6.7,8.3,8.6,5.4,0,28.8.6,96,.6,96,0,0-6.7,12.2-8.3,19.2,6.4,15,5.8,15.7,13.4,21.1,8.6-6.4,7.7-6.4,14.1-21.4-1-6.1-9-18.9-9-18.9l-.6-99.8,107.5-45.8s11.8,73.3,31.7,79.4c.6-1.6,1.6-2.9,2.6-4.2,2.6-30.7,15-57.6,37.8-80.3"/>
5
+ </svg>
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class AcademyFive implements INodeType {
3
+ private static _description?;
4
+ private static dynamicProperties;
5
+ get description(): INodeTypeDescription;
6
+ static getDescription(): INodeTypeDescription;
7
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
8
+ private static initializeSync;
9
+ private static generatePropertiesFromSpec;
10
+ }
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.AcademyFive = void 0;
40
+ const n8n_workflow_1 = require("n8n-workflow");
41
+ const specData = __importStar(require("../../specs/ac5.json"));
42
+ const NodeConfigUtils_1 = require("./NodeConfigUtils");
43
+ const SpecGeneratorUtils_1 = require("./SpecGeneratorUtils");
44
+ const MapToRequestUtils_1 = require("./MapToRequestUtils");
45
+ const lodash_1 = __importDefault(require("lodash"));
46
+ const spec = specData;
47
+ class AcademyFive {
48
+ get description() {
49
+ if (!AcademyFive._description) {
50
+ AcademyFive.initializeSync();
51
+ }
52
+ return AcademyFive._description;
53
+ }
54
+ static getDescription() {
55
+ return AcademyFive._description;
56
+ }
57
+ async execute() {
58
+ let responseData;
59
+ const returnData = [];
60
+ const resourceValue = this.getNodeParameter('resource', 0);
61
+ const operationValue = this.getNodeParameter('operation', 0);
62
+ const parameters = (0, MapToRequestUtils_1.reduceCollectedElements)(AcademyFive.dynamicProperties
63
+ .filter((property) => property.name !== 'resource' && property.name !== 'operation')
64
+ .filter((property) => {
65
+ var _a, _b, _c, _d;
66
+ return !('displayOptions' in property &&
67
+ property.displayOptions !== undefined &&
68
+ (!((_b = (_a = property.displayOptions.show) === null || _a === void 0 ? void 0 : _a.resource) === null || _b === void 0 ? void 0 : _b.includes(resourceValue)) ||
69
+ !((_d = (_c = property.displayOptions.show) === null || _c === void 0 ? void 0 : _c.operation) === null || _d === void 0 ? void 0 : _d.includes(operationValue))));
70
+ })
71
+ .map((property) => {
72
+ let value = undefined;
73
+ try {
74
+ value = this.getNodeParameter(property.name, 0);
75
+ }
76
+ catch (e) {
77
+ }
78
+ if ((0, MapToRequestUtils_1.isRequiredValueInvalid)(property, value)) {
79
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Required parameter ${property.name} is missing.`);
80
+ }
81
+ if ((typeof value === 'number' && !Number.isNaN(value)) ||
82
+ (!lodash_1.default.isNil(value) && !lodash_1.default.isEmpty(value))) {
83
+ return (0, MapToRequestUtils_1.walkProperty)(this, property, resourceValue, operationValue, value);
84
+ }
85
+ return undefined;
86
+ }));
87
+ const operations = (0, MapToRequestUtils_1.walkOperations)(AcademyFive.dynamicProperties.filter((property) => property.name === 'operation'));
88
+ const credentials = await this.getCredentials('academyFiveCredentialsApi');
89
+ const baseUrlFromCredentials = (credentials === null || credentials === void 0 ? void 0 : credentials.hostname) || '';
90
+ const options = (0, MapToRequestUtils_1.getRequestOptions)(AcademyFive.getDescription(), operations, resourceValue, operationValue, parameters, baseUrlFromCredentials);
91
+ n8n_workflow_1.LoggerProxy.info(`Sending request: ${options.uri} ${options.method}`);
92
+ responseData = await this.helpers.requestWithAuthentication.call(this, 'academyFiveCredentialsApi', options);
93
+ returnData.push(responseData);
94
+ return [this.helpers.returnJsonArray(returnData)];
95
+ }
96
+ static initializeSync() {
97
+ try {
98
+ AcademyFive.dynamicProperties = this.generatePropertiesFromSpec(spec);
99
+ this._description = {
100
+ displayName: 'academyFIVE API',
101
+ name: 'academyFive',
102
+ icon: { light: 'file:simovative.svg', dark: 'file:simovative.svg' },
103
+ group: ['transform'],
104
+ version: 1,
105
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
106
+ description: 'Interact with academyFIVE API',
107
+ defaults: {
108
+ name: 'academyFive',
109
+ },
110
+ inputs: ["main"],
111
+ outputs: ["main"],
112
+ usableAsTool: true,
113
+ credentials: [
114
+ {
115
+ name: 'academyFiveCredentialsApi',
116
+ required: false,
117
+ },
118
+ ],
119
+ requestDefaults: {
120
+ url: '',
121
+ headers: {
122
+ Accept: 'application/json',
123
+ 'Content-Type': 'application/json',
124
+ },
125
+ },
126
+ properties: AcademyFive.dynamicProperties,
127
+ };
128
+ }
129
+ catch (error) {
130
+ this._description = NodeConfigUtils_1.NodeConfigUtils.getBasicDescription();
131
+ }
132
+ }
133
+ static generatePropertiesFromSpec(spec) {
134
+ var _a;
135
+ try {
136
+ if (!spec || !spec.paths) {
137
+ return NodeConfigUtils_1.NodeConfigUtils.getFallbackProperties();
138
+ }
139
+ const resources = {};
140
+ const properties = [];
141
+ SpecGeneratorUtils_1.SpecGeneratorUtils.extractResourcesFromSpec(spec, resources);
142
+ const resourceOptions = Object.keys(resources).map((tag) => ({
143
+ name: tag.charAt(0).toUpperCase() + tag.slice(1),
144
+ value: tag,
145
+ }));
146
+ properties.push({
147
+ displayName: 'Resource',
148
+ name: 'resource',
149
+ type: 'options',
150
+ noDataExpression: true,
151
+ options: resourceOptions,
152
+ default: (_a = resourceOptions[0]) === null || _a === void 0 ? void 0 : _a.value,
153
+ });
154
+ Object.entries(resources).forEach(([tag, ops]) => {
155
+ var _a;
156
+ properties.push({
157
+ displayName: 'Operation',
158
+ name: 'operation',
159
+ type: 'options',
160
+ noDataExpression: true,
161
+ displayOptions: {
162
+ show: {
163
+ resource: [tag],
164
+ },
165
+ },
166
+ options: ops.map((op) => op.option),
167
+ default: ((_a = ops[0]) === null || _a === void 0 ? void 0 : _a.default) || '',
168
+ });
169
+ ops.forEach((op) => {
170
+ properties.push(...SpecGeneratorUtils_1.SpecGeneratorUtils.addRequestBodyProperties(spec, op, tag));
171
+ SpecGeneratorUtils_1.SpecGeneratorUtils.addPathParametersProperties(op, properties, tag);
172
+ SpecGeneratorUtils_1.SpecGeneratorUtils.addQueryParametersProperties(op, properties, tag);
173
+ });
174
+ });
175
+ return properties;
176
+ }
177
+ catch (error) {
178
+ n8n_workflow_1.LoggerProxy.error(`Error generating properties from spec: ${error}`);
179
+ return NodeConfigUtils_1.NodeConfigUtils.getFallbackProperties();
180
+ }
181
+ }
182
+ }
183
+ exports.AcademyFive = AcademyFive;
184
+ //# sourceMappingURL=AcademyFive.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcademyFive.node.js","sourceRoot":"","sources":["../../../nodes/AcademyFive/AcademyFive.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CASsB;AACtB,+DAAiD;AACjD,uDAAoD;AACpD,6DAA0D;AAE1D,2DAM6B;AAC7B,oDAAuB;AAGvB,MAAM,IAAI,GAAG,QAAoC,CAAC;AAElD,MAAa,WAAW;IAIvB,IAAI,WAAW;QACd,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;YAE/B,WAAW,CAAC,cAAc,EAAE,CAAC;QAC9B,CAAC;QACD,OAAO,WAAW,CAAC,YAAa,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,cAAc;QACpB,OAAO,WAAW,CAAC,YAAa,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,OAAO;QACZ,IAAI,YAAY,CAAC;QACjB,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QACrE,MAAM,cA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;gBACtE,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,0BAAM,CAAC,KAAK,CAAC,0CAA0C,KAAK,EAAE,CAAC,CAAC;YAChE,OAAO,iCAAe,CAAC,qBAAqB,EAAE,CAAC;QAChD,CAAC;IACF,CAAC;CACD;AA7LD,kCA6LC"}
@@ -0,0 +1,6 @@
1
+ {
2
+ "node": "n8n-nodes-base.simovative",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development", "Developer Tools"]
6
+ }
@@ -0,0 +1,24 @@
1
+ import { IExecuteFunctions, INodeProperties, INodePropertyCollection, INodePropertyOptions, INodeTypeDescription, IRequestOptions } from 'n8n-workflow';
2
+ interface WalkedRequestBody {
3
+ requestBody?: {
4
+ [name: string]: any;
5
+ };
6
+ queryParameters?: {
7
+ [name: string]: any;
8
+ };
9
+ pathParameters?: {
10
+ [name: string]: any;
11
+ };
12
+ }
13
+ interface OperationRouting {
14
+ resources: string[];
15
+ operation: string;
16
+ method: string;
17
+ url: string;
18
+ }
19
+ export declare function isRequiredValueInvalid(property: INodeProperties, value: any): boolean;
20
+ export declare function walkProperty(parent: IExecuteFunctions, property: INodeProperties | INodePropertyOptions | INodePropertyCollection, resourceValue: string, operationValue: string, value: any): WalkedRequestBody | undefined;
21
+ export declare function reduceCollectedElements(input: (WalkedRequestBody | undefined)[]): WalkedRequestBody;
22
+ export declare function walkOperations(operations: INodeProperties[]): OperationRouting[];
23
+ export declare function getRequestOptions(properties: INodeTypeDescription, operations: OperationRouting[], resourceValue: string, operationValue: string, parameters: WalkedRequestBody, baseUrlOverride?: string): IRequestOptions;
24
+ export {};
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.isRequiredValueInvalid = isRequiredValueInvalid;
7
+ exports.walkProperty = walkProperty;
8
+ exports.reduceCollectedElements = reduceCollectedElements;
9
+ exports.walkOperations = walkOperations;
10
+ exports.getRequestOptions = getRequestOptions;
11
+ const n8n_workflow_1 = require("n8n-workflow");
12
+ const lodash_1 = __importDefault(require("lodash"));
13
+ function isRequiredValueInvalid(property, value) {
14
+ return ((property.required && (lodash_1.default.isNil(value) || (lodash_1.default.isString(value) && value.length === 0))) || false);
15
+ }
16
+ function walkProperty(parent, property, resourceValue, operationValue, value) {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
18
+ if ('displayOptions' in property &&
19
+ property.displayOptions !== undefined &&
20
+ (!((_b = (_a = property.displayOptions.show) === null || _a === void 0 ? void 0 : _a.resource) === null || _b === void 0 ? void 0 : _b.includes(resourceValue)) ||
21
+ !((_d = (_c = property.displayOptions.show) === null || _c === void 0 ? void 0 : _c.operation) === null || _d === void 0 ? void 0 : _d.includes(operationValue)))) {
22
+ n8n_workflow_1.LoggerProxy.info(`Skipping property ${property.name} because it is not visible`);
23
+ return undefined;
24
+ }
25
+ function isINodeProperties(object) {
26
+ return 'type' in object;
27
+ }
28
+ function isINodePropertyCollection(object) {
29
+ return 'values' in object;
30
+ }
31
+ if (isINodeProperties(property)) {
32
+ if (isRequiredValueInvalid(property, value)) {
33
+ throw new n8n_workflow_1.NodeOperationError(parent.getNode(), `Required parameter ${property.name} is missing.`);
34
+ }
35
+ const routingBody = (_f = (_e = property.routing) === null || _e === void 0 ? void 0 : _e.request) === null || _f === void 0 ? void 0 : _f.body;
36
+ const nestInPropertyName = Boolean((_g = routingBody === null || routingBody === void 0 ? void 0 : routingBody[property.name]) === null || _g === void 0 ? void 0 : _g.nestInPropertyName);
37
+ const nullable = Boolean((_h = routingBody === null || routingBody === void 0 ? void 0 : routingBody[property.name]) === null || _h === void 0 ? void 0 : _h.nullable);
38
+ if (typeof value === 'object' && lodash_1.default.isEmpty(value)) {
39
+ if (property.required) {
40
+ throw new n8n_workflow_1.NodeOperationError(parent.getNode(), `Required parameter ${property.name} is missing.`);
41
+ }
42
+ else if (!nullable) {
43
+ throw new n8n_workflow_1.NodeOperationError(parent.getNode(), `Parameter ${property.name} must not be null.`);
44
+ }
45
+ else {
46
+ return undefined;
47
+ }
48
+ }
49
+ if (property.type === 'collection' || property.type === 'fixedCollection') {
50
+ const elements = reduceCollectedElements(((_j = property.options) !== null && _j !== void 0 ? _j : []).map((option) => {
51
+ const childValue = Array.isArray(value) ? value : value === null || value === void 0 ? void 0 : value[option.name];
52
+ return walkProperty(parent, option, resourceValue, operationValue, childValue);
53
+ }));
54
+ if (elements.requestBody !== undefined && nestInPropertyName) {
55
+ elements.requestBody = {
56
+ [property.name]: elements.requestBody,
57
+ };
58
+ }
59
+ return elements;
60
+ }
61
+ else if (value !== undefined) {
62
+ if (((_l = (_k = property.routing) === null || _k === void 0 ? void 0 : _k.request) === null || _l === void 0 ? void 0 : _l.body) !== undefined) {
63
+ return {
64
+ requestBody: nestInPropertyName ? { [property.name]: value } : value,
65
+ };
66
+ }
67
+ else if (((_o = (_m = property.routing) === null || _m === void 0 ? void 0 : _m.request) === null || _o === void 0 ? void 0 : _o.qs) !== undefined) {
68
+ const typeOptions = property.typeOptions;
69
+ const queryKey = (_p = typeOptions === null || typeOptions === void 0 ? void 0 : typeOptions.originalName) !== null && _p !== void 0 ? _p : property.name;
70
+ return {
71
+ queryParameters: {
72
+ [queryKey]: value,
73
+ },
74
+ };
75
+ }
76
+ else if ((_q = property.typeOptions) === null || _q === void 0 ? void 0 : _q.isPathParam) {
77
+ const typeOptions = property.typeOptions;
78
+ const key = (_r = typeOptions === null || typeOptions === void 0 ? void 0 : typeOptions.originalName) !== null && _r !== void 0 ? _r : property.name;
79
+ return {
80
+ pathParameters: {
81
+ [key]: value,
82
+ },
83
+ };
84
+ }
85
+ }
86
+ return undefined;
87
+ }
88
+ else if (isINodePropertyCollection(property)) {
89
+ if (value === undefined) {
90
+ if (((_s = property.values) === null || _s === void 0 ? void 0 : _s.filter((val) => {
91
+ var _a, _b, _c, _d;
92
+ const routingBody = (_b = (_a = val.routing) === null || _a === void 0 ? void 0 : _a.request) === null || _b === void 0 ? void 0 : _b.body;
93
+ const nullable = Boolean((_d = (_c = routingBody === null || routingBody === void 0 ? void 0 : routingBody[val.name]) === null || _c === void 0 ? void 0 : _c.nullable) !== null && _d !== void 0 ? _d : true);
94
+ return !nullable;
95
+ }).length) > 0) {
96
+ throw new n8n_workflow_1.NodeOperationError(parent.getNode(), `Array ${property.name} must not be empty.`);
97
+ }
98
+ else {
99
+ return undefined;
100
+ }
101
+ }
102
+ else if (Array.isArray(value)) {
103
+ const firstValue = (_t = property.values) === null || _t === void 0 ? void 0 : _t[0];
104
+ const isPrimitiveArray = ((_u = property.values) === null || _u === void 0 ? void 0 : _u.length) === 1 &&
105
+ firstValue &&
106
+ isINodePropertyCollection(firstValue) &&
107
+ ((_v = firstValue.values) === null || _v === void 0 ? void 0 : _v.length) === 1 &&
108
+ firstValue.values[0].name === 'value';
109
+ if (isPrimitiveArray) {
110
+ return reduceCollectedElements(value.map((element) => {
111
+ var _a;
112
+ let reduced = reduceCollectedElements((_a = property.values) === null || _a === void 0 ? void 0 : _a.map((optionValue) => {
113
+ let result = walkProperty(parent, optionValue, resourceValue, operationValue, element[optionValue.name]);
114
+ return result;
115
+ }));
116
+ return reduced;
117
+ }));
118
+ }
119
+ else {
120
+ return reduceCollectedElements(value.map((element) => {
121
+ var _a;
122
+ let reduced = reduceCollectedElements((_a = property.values) === null || _a === void 0 ? void 0 : _a.map((optionValue) => {
123
+ let result = walkProperty(parent, optionValue, resourceValue, operationValue, element[optionValue.name]);
124
+ if (result && result.requestBody) {
125
+ result.requestBody = [result.requestBody];
126
+ }
127
+ return result;
128
+ }));
129
+ if (reduced.requestBody) {
130
+ reduced.requestBody = [
131
+ reduced.requestBody.reduce((acc, current) => {
132
+ if (typeof current === 'object' && current !== null) {
133
+ return { ...acc, ...current };
134
+ }
135
+ return current;
136
+ }, {}),
137
+ ];
138
+ }
139
+ return reduced;
140
+ }));
141
+ }
142
+ }
143
+ else {
144
+ return reduceCollectedElements((_w = property.values) === null || _w === void 0 ? void 0 : _w.map((optionValue) => walkProperty(parent, optionValue, resourceValue, operationValue, value === null || value === void 0 ? void 0 : value[optionValue.name])));
145
+ }
146
+ }
147
+ return undefined;
148
+ }
149
+ function reduceCollectedElements(input) {
150
+ return input
151
+ .filter((optionValue) => optionValue !== undefined)
152
+ .reduce((acc, current) => {
153
+ var _a;
154
+ if (current.requestBody) {
155
+ if (Array.isArray(current === null || current === void 0 ? void 0 : current.requestBody)) {
156
+ if (acc.requestBody) {
157
+ acc.requestBody = current.requestBody.concat(acc.requestBody);
158
+ }
159
+ else {
160
+ acc.requestBody = current.requestBody;
161
+ }
162
+ }
163
+ else {
164
+ acc.requestBody = { ...acc.requestBody, ...current.requestBody };
165
+ }
166
+ }
167
+ if (current.queryParameters) {
168
+ acc.queryParameters = (_a = acc.queryParameters) !== null && _a !== void 0 ? _a : {};
169
+ for (const [key, val] of Object.entries(current.queryParameters)) {
170
+ const prev = acc.queryParameters[key];
171
+ if (prev === undefined) {
172
+ acc.queryParameters[key] = val;
173
+ }
174
+ else if (Array.isArray(prev)) {
175
+ acc.queryParameters[key] = prev.concat(val);
176
+ }
177
+ else {
178
+ acc.queryParameters[key] = Array.isArray(val)
179
+ ? [prev, ...val]
180
+ : [prev, val];
181
+ }
182
+ }
183
+ }
184
+ if (current.pathParameters) {
185
+ acc.pathParameters = { ...acc.pathParameters, ...current.pathParameters };
186
+ }
187
+ return acc;
188
+ }, { requestBody: [] });
189
+ }
190
+ function walkOperations(operations) {
191
+ return operations
192
+ .filter((property) => property.name === 'operation')
193
+ .filter((property) => property.type === 'options')
194
+ .map((operation) => {
195
+ var _a, _b;
196
+ return (_b = (_a = operation.options) === null || _a === void 0 ? void 0 : _a.filter((option) => {
197
+ var _a;
198
+ return 'routing' in option &&
199
+ typeof option.routing === 'object' &&
200
+ ((_a = option.routing) === null || _a === void 0 ? void 0 : _a.request);
201
+ }).map((option) => {
202
+ var _a, _b, _c;
203
+ const optionWithRouting = option;
204
+ return {
205
+ resources: (_c = (_b = (_a = operation.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.resource) !== null && _c !== void 0 ? _c : [],
206
+ operation: optionWithRouting.value,
207
+ method: optionWithRouting.routing.request.method,
208
+ url: optionWithRouting.routing.request.url,
209
+ };
210
+ })) !== null && _b !== void 0 ? _b : [];
211
+ })
212
+ .flat();
213
+ }
214
+ function getRequestOptions(properties, operations, resourceValue, operationValue, parameters, baseUrlOverride) {
215
+ var _a, _b, _c, _d;
216
+ const baseUrl = baseUrlOverride !== null && baseUrlOverride !== void 0 ? baseUrlOverride : '';
217
+ const op = operations.find((op) => op.resources.includes(resourceValue) && op.operation === operationValue);
218
+ const url = (_a = op === null || op === void 0 ? void 0 : op.url) !== null && _a !== void 0 ? _a : '';
219
+ const method = op === null || op === void 0 ? void 0 : op.method;
220
+ const headers = (_c = (_b = properties.requestDefaults) === null || _b === void 0 ? void 0 : _b.headers) !== null && _c !== void 0 ? _c : {};
221
+ let finalUrl = url;
222
+ if (parameters.pathParameters) {
223
+ for (const [key, rawValue] of Object.entries(parameters.pathParameters)) {
224
+ const value = encodeURIComponent(String(rawValue));
225
+ finalUrl = finalUrl.replace(new RegExp(`{${key}}`, 'g'), value);
226
+ }
227
+ }
228
+ const queryParameters = Object.entries((_d = parameters.queryParameters) !== null && _d !== void 0 ? _d : {})
229
+ .flatMap(([key, value]) => {
230
+ if (Array.isArray(value)) {
231
+ return value.map((v) => `${key}=${encodeURIComponent(String(v))}`);
232
+ }
233
+ return [`${key}=${encodeURIComponent(String(value))}`];
234
+ })
235
+ .join('&');
236
+ const options = {
237
+ headers,
238
+ method,
239
+ body: parameters.requestBody,
240
+ uri: `${baseUrl}${finalUrl}${!lodash_1.default.isEmpty(queryParameters) ? '?' : ''}${queryParameters}`,
241
+ json: true,
242
+ };
243
+ return options;
244
+ }
245
+ //# sourceMappingURL=MapToRequestUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapToRequestUtils.js","sourceRoot":"","sources":["../../../nodes/AcademyFive/MapToRequestUtils.ts"],"names":[],"mappings":";;;;;AAiCA,wDAIC;AAED,oCAsMC;AAED,0DA4CC;AAED,wCAyBC;AAED,8CA0CC;AAlWD,+CAUsB;AAEtB,oDAAuB;AAqBvB,SAAgB,sBAAsB,CAAC,QAAyB,EAAE,KAAU;IAC3E,OAAO,CACN,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,gBAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAC7F,CAAC;AACH,CAAC;AAED,SAAgB,YAAY,CAC3B,MAAyB,EACzB,QAA0E,EAC1E,aAAqB,EACrB,cAAsB,EACtB,KAAU;;IAEV,IACC,gBAAgB,IAAI,QAAQ;QAC5B,QAAQ,CAAC,cAAc,KAAK,SAAS;QACrC,CAAC,CAAC,CAAA,MAAA,MAAA,QAAQ,CAAC,cAAc,CAAC,IAAI,0CAAE,QAAQ,0CAAE,QAAQ,CAAC,aAAa,CAAC,CAAA;YAChE,CAAC,CAAA,MAAA,MAAA,QAAQ,CAAC,cAAc,CAAC,IAAI,0CAAE,SAAS,0CAAE,QAAQ,CAAC,cAAc,CAAC,CAAA,CAAC,EACnE,CAAC;QACF,0BAAW,CAAC,IAAI,CAAC,qBAAqB,QAAQ,CAAC,IAAI,4BAA4B,CAAC,CAAC;QACjF,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,SAAS,iBAAiB,CAAC,MAAW;QACrC,OAAO,MAAM,IAAI,MAAM,CAAC;IACzB,CAAC;IAED,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,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,CAAC,GAAG,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;IAEZ,MAAM,OAAO,GAAoB;QAChC,OAAO;QACP,MAAM;QACN,IAAI,EAAE,UAAU,CAAC,WAAW;QAC5B,GAAG,EAAE,GAAG,OAAO,GAAG,QAAQ,GAAG,CAAC,gBAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,eAAe,EAAE;QACvF,IAAI,EAAE,IAAI;KACV,CAAC;IACF,OAAO,OAAO,CAAC;AAChB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { INodeProperties, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class NodeConfigUtils {
3
+ static getBasicDescription(): INodeTypeDescription;
4
+ static getFallbackProperties(): INodeProperties[];
5
+ }