@astro-api/n8n-nodes-astrology 0.4.0 → 0.6.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.
@@ -19,6 +19,8 @@ const resourceHandlers = {
19
19
  data: handlers_1.handleDataResource,
20
20
  horoscope: handlers_1.handleHoroscopeResource,
21
21
  charts: handlers_1.handleChartsResource,
22
+ humanDesign: handlers_1.handleHumanDesignResource,
23
+ numerology: handlers_1.handleNumerologyResource,
22
24
  };
23
25
  class Astrology {
24
26
  constructor() {
@@ -47,6 +49,8 @@ class Astrology {
47
49
  ...operations_1.dataOperations,
48
50
  ...operations_1.horoscopeOperations,
49
51
  ...operations_1.chartsOperations,
52
+ ...operations_1.humanDesignOperations,
53
+ ...operations_1.numerologyOperations,
50
54
  ],
51
55
  };
52
56
  }
@@ -11,7 +11,9 @@ const CHARTS_ENDPOINTS = {
11
11
  transit: "/api/v3/charts/transit",
12
12
  composite: "/api/v3/charts/composite",
13
13
  solarReturn: "/api/v3/charts/solar-return",
14
+ solarReturnTransits: "/api/v3/charts/solar-return-transits",
14
15
  lunarReturn: "/api/v3/charts/lunar-return",
16
+ lunarReturnTransits: "/api/v3/charts/lunar-return-transits",
15
17
  progressions: "/api/v3/charts/progressions",
16
18
  natalTransits: "/api/v3/charts/natal-transits",
17
19
  directions: "/api/v3/charts/directions",
@@ -144,8 +146,12 @@ async function handleChartsResource(context, operation) {
144
146
  return handleCompositeChart(context);
145
147
  case "solarReturn":
146
148
  return handleSolarReturnChart(context);
149
+ case "solarReturnTransits":
150
+ return handleSolarReturnTransits(context);
147
151
  case "lunarReturn":
148
152
  return handleLunarReturnChart(context);
153
+ case "lunarReturnTransits":
154
+ return handleLunarReturnTransits(context);
149
155
  case "progressions":
150
156
  return handleProgressionsChart(context);
151
157
  case "natalTransits":
@@ -526,3 +532,78 @@ async function handleDirectionsChart(context) {
526
532
  const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
527
533
  return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
528
534
  }
535
+ /**
536
+ * Handles solar return transits (transits to solar return chart over a date range)
537
+ */
538
+ async function handleSolarReturnTransits(context) {
539
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
540
+ // Build natal subject
541
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
542
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
543
+ // Get return year
544
+ const returnYear = executeFunctions.getNodeParameter("returnYear", itemIndex);
545
+ // Get date range
546
+ const startDate = executeFunctions.getNodeParameter("startDate", itemIndex);
547
+ const endDate = executeFunctions.getNodeParameter("endDate", itemIndex);
548
+ // Get orb
549
+ const orb = executeFunctions.getNodeParameter("orb", itemIndex, 1.0);
550
+ // Build request body
551
+ const body = {
552
+ subject: {
553
+ birth_data: birthData,
554
+ ...(subjectName && { name: subjectName }),
555
+ },
556
+ return_year: returnYear,
557
+ date_range: { start_date: startDate, end_date: endDate },
558
+ orb,
559
+ };
560
+ // Handle relocated return location
561
+ const useRelocatedReturn = executeFunctions.getNodeParameter("useRelocatedReturn", itemIndex, false);
562
+ if (useRelocatedReturn) {
563
+ const returnLocationType = executeFunctions.getNodeParameter("returnLocationType", itemIndex);
564
+ const returnLocation = {};
565
+ if (returnLocationType === "city") {
566
+ returnLocation.city = executeFunctions.getNodeParameter("returnCity", itemIndex);
567
+ returnLocation.country_code = executeFunctions.getNodeParameter("returnCountryCode", itemIndex);
568
+ }
569
+ else {
570
+ returnLocation.latitude = executeFunctions.getNodeParameter("returnLatitude", itemIndex);
571
+ returnLocation.longitude = executeFunctions.getNodeParameter("returnLongitude", itemIndex);
572
+ }
573
+ body.return_location = returnLocation;
574
+ }
575
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, CHARTS_ENDPOINTS.solarReturnTransits, apiKey, body);
576
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
577
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
578
+ }
579
+ /**
580
+ * Handles lunar return transits (transits to lunar return chart over a date range)
581
+ */
582
+ async function handleLunarReturnTransits(context) {
583
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
584
+ // Build natal subject
585
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
586
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
587
+ // Get return date (optional)
588
+ const lunarReturnDate = executeFunctions.getNodeParameter("lunarReturnDate", itemIndex, "");
589
+ // Get date range
590
+ const startDate = executeFunctions.getNodeParameter("startDate", itemIndex);
591
+ const endDate = executeFunctions.getNodeParameter("endDate", itemIndex);
592
+ // Get orb
593
+ const orb = executeFunctions.getNodeParameter("orb", itemIndex, 1.0);
594
+ // Build request body
595
+ const body = {
596
+ subject: {
597
+ birth_data: birthData,
598
+ ...(subjectName && { name: subjectName }),
599
+ },
600
+ date_range: { start_date: startDate, end_date: endDate },
601
+ orb,
602
+ };
603
+ if (lunarReturnDate) {
604
+ body.return_date = lunarReturnDate;
605
+ }
606
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, CHARTS_ENDPOINTS.lunarReturnTransits, apiKey, body);
607
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
608
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
609
+ }
@@ -0,0 +1,10 @@
1
+ import type { IDataObject } from "n8n-workflow";
2
+ import type { IHandlerContext } from "../interfaces/types";
3
+ /**
4
+ * Handles all Human Design resource operations
5
+ *
6
+ * @param context - Handler context with execution functions and credentials
7
+ * @param operation - The operation to execute
8
+ * @returns API response data
9
+ */
10
+ export declare function handleHumanDesignResource(context: IHandlerContext, operation: string): Promise<IDataObject>;
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleHumanDesignResource = handleHumanDesignResource;
4
+ const shared_1 = require("../shared");
5
+ /**
6
+ * Endpoint mapping for Human Design operations
7
+ */
8
+ const HD_ENDPOINTS = {
9
+ glossaryChannels: "/api/v3/human-design/glossary/channels",
10
+ glossaryGates: "/api/v3/human-design/glossary/gates",
11
+ glossaryTypes: "/api/v3/human-design/glossary/types",
12
+ bodygraph: "/api/v3/human-design/bodygraph",
13
+ compatibility: "/api/v3/human-design/compatibility",
14
+ designDate: "/api/v3/human-design/design-date",
15
+ transits: "/api/v3/human-design/transits",
16
+ typeOnly: "/api/v3/human-design/type",
17
+ };
18
+ /**
19
+ * Handles all Human Design resource operations
20
+ *
21
+ * @param context - Handler context with execution functions and credentials
22
+ * @param operation - The operation to execute
23
+ * @returns API response data
24
+ */
25
+ async function handleHumanDesignResource(context, operation) {
26
+ const op = operation;
27
+ switch (op) {
28
+ case "glossaryChannels":
29
+ return handleGlossaryChannels(context);
30
+ case "glossaryGates":
31
+ return handleGlossaryGates(context);
32
+ case "glossaryTypes":
33
+ return handleGlossaryTypes(context);
34
+ case "bodygraph":
35
+ return handleBodygraph(context);
36
+ case "compatibility":
37
+ return handleCompatibility(context);
38
+ case "designDate":
39
+ return handleDesignDate(context);
40
+ case "transits":
41
+ return handleTransits(context);
42
+ case "typeOnly":
43
+ return handleTypeOnly(context);
44
+ default:
45
+ throw new Error(`The operation '${operation}' is not supported for the humanDesign resource`);
46
+ }
47
+ }
48
+ /**
49
+ * Handles glossary channels request (GET with optional filters)
50
+ */
51
+ async function handleGlossaryChannels(context) {
52
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
53
+ // Build query parameters
54
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
55
+ const circuit = executeFunctions.getNodeParameter("circuit", itemIndex, "");
56
+ let endpoint = `${HD_ENDPOINTS.glossaryChannels}?language=${language}`;
57
+ if (circuit) {
58
+ endpoint += `&circuit=${circuit}`;
59
+ }
60
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
61
+ }
62
+ /**
63
+ * Handles glossary gates request (GET with optional filters)
64
+ */
65
+ async function handleGlossaryGates(context) {
66
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
67
+ // Build query parameters
68
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
69
+ const center = executeFunctions.getNodeParameter("center", itemIndex, "");
70
+ let endpoint = `${HD_ENDPOINTS.glossaryGates}?language=${language}`;
71
+ if (center) {
72
+ endpoint += `&center=${center}`;
73
+ }
74
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
75
+ }
76
+ /**
77
+ * Handles glossary types request (GET)
78
+ */
79
+ async function handleGlossaryTypes(context) {
80
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
81
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
82
+ const endpoint = `${HD_ENDPOINTS.glossaryTypes}?language=${language}`;
83
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
84
+ }
85
+ /**
86
+ * Handles bodygraph calculation (POST)
87
+ */
88
+ async function handleBodygraph(context) {
89
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
90
+ // Build birth data
91
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
92
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
93
+ // Get options
94
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
95
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
96
+ const includeChannels = executeFunctions.getNodeParameter("includeChannels", itemIndex, true);
97
+ const includeDesignChart = executeFunctions.getNodeParameter("includeDesignChart", itemIndex, true);
98
+ const includeVariables = executeFunctions.getNodeParameter("includeVariables", itemIndex, false);
99
+ // Build request body
100
+ const body = {
101
+ subject: {
102
+ birth_data: birthData,
103
+ ...(subjectName && { name: subjectName }),
104
+ },
105
+ options: {
106
+ language,
107
+ include_interpretations: includeInterpretations,
108
+ },
109
+ hd_options: {
110
+ include_channels: includeChannels,
111
+ include_design_chart: includeDesignChart,
112
+ include_variables: includeVariables,
113
+ },
114
+ };
115
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, HD_ENDPOINTS.bodygraph, apiKey, body);
116
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
117
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
118
+ }
119
+ /**
120
+ * Builds second subject birth data from subject2* prefixed fields
121
+ */
122
+ function buildSecondSubjectBirthData(executeFunctions, itemIndex) {
123
+ const locationType = executeFunctions.getNodeParameter("subject2LocationType", itemIndex);
124
+ const birthData = {
125
+ year: executeFunctions.getNodeParameter("subject2Year", itemIndex),
126
+ month: executeFunctions.getNodeParameter("subject2Month", itemIndex),
127
+ day: executeFunctions.getNodeParameter("subject2Day", itemIndex),
128
+ hour: executeFunctions.getNodeParameter("subject2Hour", itemIndex),
129
+ minute: executeFunctions.getNodeParameter("subject2Minute", itemIndex),
130
+ };
131
+ if (locationType === "city") {
132
+ birthData.city = executeFunctions.getNodeParameter("subject2City", itemIndex);
133
+ birthData.country_code = executeFunctions.getNodeParameter("subject2CountryCode", itemIndex);
134
+ }
135
+ else {
136
+ birthData.latitude = executeFunctions.getNodeParameter("subject2Latitude", itemIndex);
137
+ birthData.longitude = executeFunctions.getNodeParameter("subject2Longitude", itemIndex);
138
+ }
139
+ return birthData;
140
+ }
141
+ /**
142
+ * Handles compatibility calculation (POST with two subjects)
143
+ */
144
+ async function handleCompatibility(context) {
145
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
146
+ // Build subject 1
147
+ const birthData1 = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
148
+ const subjectName1 = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
149
+ // Build subject 2
150
+ const birthData2 = buildSecondSubjectBirthData(executeFunctions, itemIndex);
151
+ const subjectName2 = executeFunctions.getNodeParameter("subject2Name", itemIndex, "");
152
+ // Get options
153
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
154
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
155
+ const includeChannels = executeFunctions.getNodeParameter("includeChannels", itemIndex, true);
156
+ // Build request body
157
+ const body = {
158
+ subjects: [
159
+ {
160
+ birth_data: birthData1,
161
+ ...(subjectName1 && { name: subjectName1 }),
162
+ },
163
+ {
164
+ birth_data: birthData2,
165
+ ...(subjectName2 && { name: subjectName2 }),
166
+ },
167
+ ],
168
+ options: {
169
+ language,
170
+ include_interpretations: includeInterpretations,
171
+ },
172
+ hd_options: {
173
+ include_channels: includeChannels,
174
+ },
175
+ };
176
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, HD_ENDPOINTS.compatibility, apiKey, body);
177
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
178
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
179
+ }
180
+ /**
181
+ * Handles design date calculation (POST)
182
+ */
183
+ async function handleDesignDate(context) {
184
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
185
+ // Build birth data
186
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
187
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
188
+ // Build request body
189
+ const body = {
190
+ subject: {
191
+ birth_data: birthData,
192
+ ...(subjectName && { name: subjectName }),
193
+ },
194
+ };
195
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, HD_ENDPOINTS.designDate, apiKey, body);
196
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
197
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
198
+ }
199
+ /**
200
+ * Handles transits calculation (POST with transit datetime)
201
+ */
202
+ async function handleTransits(context) {
203
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
204
+ // Build birth data
205
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
206
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
207
+ // Get transit datetime (optional - defaults to current time)
208
+ const transitDatetime = executeFunctions.getNodeParameter("transitDatetime", itemIndex, "");
209
+ // Get options
210
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
211
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
212
+ // Build request body
213
+ const body = {
214
+ subject: {
215
+ birth_data: birthData,
216
+ ...(subjectName && { name: subjectName }),
217
+ },
218
+ options: {
219
+ language,
220
+ include_interpretations: includeInterpretations,
221
+ },
222
+ };
223
+ // Add transit datetime if provided
224
+ if (transitDatetime) {
225
+ body.transit_datetime = transitDatetime;
226
+ }
227
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, HD_ENDPOINTS.transits, apiKey, body);
228
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
229
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
230
+ }
231
+ /**
232
+ * Handles type only calculation (POST - quick type determination)
233
+ */
234
+ async function handleTypeOnly(context) {
235
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
236
+ // Build birth data
237
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
238
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex, "");
239
+ // Build request body
240
+ const body = {
241
+ subject: {
242
+ birth_data: birthData,
243
+ ...(subjectName && { name: subjectName }),
244
+ },
245
+ };
246
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, HD_ENDPOINTS.typeOnly, apiKey, body);
247
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
248
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
249
+ }
@@ -1,3 +1,5 @@
1
1
  export { handleDataResource } from "./data.handler";
2
2
  export { handleHoroscopeResource } from "./horoscope.handler";
3
3
  export { handleChartsResource } from "./charts.handler";
4
+ export { handleHumanDesignResource } from "./humanDesign.handler";
5
+ export { handleNumerologyResource } from "./numerology.handler";
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleChartsResource = exports.handleHoroscopeResource = exports.handleDataResource = void 0;
3
+ exports.handleNumerologyResource = exports.handleHumanDesignResource = exports.handleChartsResource = exports.handleHoroscopeResource = exports.handleDataResource = void 0;
4
4
  var data_handler_1 = require("./data.handler");
5
5
  Object.defineProperty(exports, "handleDataResource", { enumerable: true, get: function () { return data_handler_1.handleDataResource; } });
6
6
  var horoscope_handler_1 = require("./horoscope.handler");
7
7
  Object.defineProperty(exports, "handleHoroscopeResource", { enumerable: true, get: function () { return horoscope_handler_1.handleHoroscopeResource; } });
8
8
  var charts_handler_1 = require("./charts.handler");
9
9
  Object.defineProperty(exports, "handleChartsResource", { enumerable: true, get: function () { return charts_handler_1.handleChartsResource; } });
10
+ var humanDesign_handler_1 = require("./humanDesign.handler");
11
+ Object.defineProperty(exports, "handleHumanDesignResource", { enumerable: true, get: function () { return humanDesign_handler_1.handleHumanDesignResource; } });
12
+ var numerology_handler_1 = require("./numerology.handler");
13
+ Object.defineProperty(exports, "handleNumerologyResource", { enumerable: true, get: function () { return numerology_handler_1.handleNumerologyResource; } });
@@ -0,0 +1,10 @@
1
+ import type { IDataObject } from "n8n-workflow";
2
+ import type { IHandlerContext } from "../interfaces/types";
3
+ /**
4
+ * Handles all Numerology resource operations
5
+ *
6
+ * @param context - Handler context with execution functions and credentials
7
+ * @param operation - The operation to execute
8
+ * @returns API response data
9
+ */
10
+ export declare function handleNumerologyResource(context: IHandlerContext, operation: string): Promise<IDataObject>;
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleNumerologyResource = handleNumerologyResource;
4
+ const shared_1 = require("../shared");
5
+ /**
6
+ * Endpoint mapping for Numerology operations
7
+ */
8
+ const NUMEROLOGY_ENDPOINTS = {
9
+ coreNumbers: "/api/v3/numerology/core-numbers",
10
+ comprehensive: "/api/v3/numerology/comprehensive",
11
+ compatibility: "/api/v3/numerology/compatibility",
12
+ };
13
+ /**
14
+ * Handles all Numerology resource operations
15
+ *
16
+ * @param context - Handler context with execution functions and credentials
17
+ * @param operation - The operation to execute
18
+ * @returns API response data
19
+ */
20
+ async function handleNumerologyResource(context, operation) {
21
+ const op = operation;
22
+ switch (op) {
23
+ case "coreNumbers":
24
+ return handleCoreNumbers(context);
25
+ case "comprehensive":
26
+ return handleComprehensive(context);
27
+ case "compatibility":
28
+ return handleCompatibility(context);
29
+ default:
30
+ throw new Error(`The operation '${operation}' is not supported for the numerology resource`);
31
+ }
32
+ }
33
+ /**
34
+ * Builds numerology birth data (date only, no time/location)
35
+ */
36
+ function buildNumerologyBirthData(context) {
37
+ const { executeFunctions, itemIndex } = context;
38
+ return {
39
+ year: executeFunctions.getNodeParameter("year", itemIndex),
40
+ month: executeFunctions.getNodeParameter("month", itemIndex),
41
+ day: executeFunctions.getNodeParameter("day", itemIndex),
42
+ };
43
+ }
44
+ /**
45
+ * Builds second subject birth data for compatibility
46
+ */
47
+ function buildSecondSubjectBirthData(context) {
48
+ const { executeFunctions, itemIndex } = context;
49
+ return {
50
+ year: executeFunctions.getNodeParameter("subject2Year", itemIndex),
51
+ month: executeFunctions.getNodeParameter("subject2Month", itemIndex),
52
+ day: executeFunctions.getNodeParameter("subject2Day", itemIndex),
53
+ };
54
+ }
55
+ /**
56
+ * Handles core numbers calculation (POST)
57
+ */
58
+ async function handleCoreNumbers(context) {
59
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
60
+ // Get subject data
61
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex);
62
+ const birthData = buildNumerologyBirthData(context);
63
+ // Get options
64
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
65
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
66
+ // Build request body
67
+ const body = {
68
+ subject: {
69
+ name: subjectName,
70
+ birth_data: birthData,
71
+ },
72
+ options: {
73
+ language,
74
+ include_interpretations: includeInterpretations,
75
+ },
76
+ };
77
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, NUMEROLOGY_ENDPOINTS.coreNumbers, apiKey, body);
78
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
79
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
80
+ }
81
+ /**
82
+ * Handles comprehensive reading (POST)
83
+ */
84
+ async function handleComprehensive(context) {
85
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
86
+ // Get subject data
87
+ const subjectName = executeFunctions.getNodeParameter("subjectName", itemIndex);
88
+ const birthData = buildNumerologyBirthData(context);
89
+ // Get options
90
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
91
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
92
+ // Build request body
93
+ const body = {
94
+ subject: {
95
+ name: subjectName,
96
+ birth_data: birthData,
97
+ },
98
+ options: {
99
+ language,
100
+ include_interpretations: includeInterpretations,
101
+ },
102
+ };
103
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, NUMEROLOGY_ENDPOINTS.comprehensive, apiKey, body);
104
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
105
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
106
+ }
107
+ /**
108
+ * Handles compatibility analysis (POST with two subjects)
109
+ */
110
+ async function handleCompatibility(context) {
111
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
112
+ // Get subject 1 data
113
+ const subjectName1 = executeFunctions.getNodeParameter("subjectName", itemIndex);
114
+ const birthData1 = buildNumerologyBirthData(context);
115
+ // Get subject 2 data
116
+ const subjectName2 = executeFunctions.getNodeParameter("subject2Name", itemIndex);
117
+ const birthData2 = buildSecondSubjectBirthData(context);
118
+ // Get options
119
+ const language = executeFunctions.getNodeParameter("language", itemIndex, "en");
120
+ const includeInterpretations = executeFunctions.getNodeParameter("includeInterpretations", itemIndex, true);
121
+ // Build request body
122
+ const body = {
123
+ subjects: [
124
+ {
125
+ name: subjectName1,
126
+ birth_data: birthData1,
127
+ },
128
+ {
129
+ name: subjectName2,
130
+ birth_data: birthData2,
131
+ },
132
+ ],
133
+ options: {
134
+ language,
135
+ include_interpretations: includeInterpretations,
136
+ },
137
+ };
138
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, NUMEROLOGY_ENDPOINTS.compatibility, apiKey, body);
139
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
140
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
141
+ }
@@ -25,7 +25,7 @@ export interface ISubjectRequest {
25
25
  /**
26
26
  * Resource types available in the node
27
27
  */
28
- export type ResourceType = "data" | "horoscope" | "charts";
28
+ export type ResourceType = "data" | "horoscope" | "charts" | "humanDesign" | "numerology";
29
29
  /**
30
30
  * Data resource operations
31
31
  */
@@ -37,7 +37,23 @@ export type HoroscopeOperation = "signDaily" | "signDailyText" | "signWeekly" |
37
37
  /**
38
38
  * Charts resource operations
39
39
  */
40
- export type ChartsOperation = "natal" | "synastry" | "transit" | "composite" | "solarReturn" | "lunarReturn" | "progressions" | "natalTransits" | "directions";
40
+ export type ChartsOperation = "natal" | "synastry" | "transit" | "composite" | "solarReturn" | "solarReturnTransits" | "lunarReturn" | "lunarReturnTransits" | "progressions" | "natalTransits" | "directions";
41
+ /**
42
+ * Human Design resource operations
43
+ */
44
+ export type HumanDesignOperation = "glossaryChannels" | "glossaryGates" | "glossaryTypes" | "bodygraph" | "compatibility" | "designDate" | "transits" | "typeOnly";
45
+ /**
46
+ * Numerology resource operations
47
+ */
48
+ export type NumerologyOperation = "coreNumbers" | "comprehensive" | "compatibility";
49
+ /**
50
+ * Human Design circuit types
51
+ */
52
+ export type HumanDesignCircuit = "individual" | "collective" | "tribal";
53
+ /**
54
+ * Human Design center types
55
+ */
56
+ export type HumanDesignCenter = "head" | "ajna" | "throat" | "g_center" | "heart" | "sacral" | "solar_plexus" | "spleen" | "root";
41
57
  /**
42
58
  * Transit time structure for transit chart requests
43
59
  */