@astro-api/n8n-nodes-astrology 0.6.0 → 0.7.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.
@@ -21,6 +21,7 @@ const resourceHandlers = {
21
21
  charts: handlers_1.handleChartsResource,
22
22
  humanDesign: handlers_1.handleHumanDesignResource,
23
23
  numerology: handlers_1.handleNumerologyResource,
24
+ tarot: handlers_1.handleTarotResource,
24
25
  };
25
26
  class Astrology {
26
27
  constructor() {
@@ -51,6 +52,7 @@ class Astrology {
51
52
  ...operations_1.chartsOperations,
52
53
  ...operations_1.humanDesignOperations,
53
54
  ...operations_1.numerologyOperations,
55
+ ...operations_1.tarotOperations,
54
56
  ],
55
57
  };
56
58
  }
@@ -3,3 +3,4 @@ export { handleHoroscopeResource } from "./horoscope.handler";
3
3
  export { handleChartsResource } from "./charts.handler";
4
4
  export { handleHumanDesignResource } from "./humanDesign.handler";
5
5
  export { handleNumerologyResource } from "./numerology.handler";
6
+ export { handleTarotResource } from "./tarot.handler";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleNumerologyResource = exports.handleHumanDesignResource = exports.handleChartsResource = exports.handleHoroscopeResource = exports.handleDataResource = void 0;
3
+ exports.handleTarotResource = 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");
@@ -11,3 +11,5 @@ var humanDesign_handler_1 = require("./humanDesign.handler");
11
11
  Object.defineProperty(exports, "handleHumanDesignResource", { enumerable: true, get: function () { return humanDesign_handler_1.handleHumanDesignResource; } });
12
12
  var numerology_handler_1 = require("./numerology.handler");
13
13
  Object.defineProperty(exports, "handleNumerologyResource", { enumerable: true, get: function () { return numerology_handler_1.handleNumerologyResource; } });
14
+ var tarot_handler_1 = require("./tarot.handler");
15
+ Object.defineProperty(exports, "handleTarotResource", { enumerable: true, get: function () { return tarot_handler_1.handleTarotResource; } });
@@ -0,0 +1,6 @@
1
+ import type { IDataObject } from "n8n-workflow";
2
+ import type { IHandlerContext } from "../interfaces/types";
3
+ /**
4
+ * Handles all Tarot resource operations
5
+ */
6
+ export declare function handleTarotResource(context: IHandlerContext, operation: string): Promise<IDataObject>;
@@ -0,0 +1,387 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleTarotResource = handleTarotResource;
4
+ const shared_1 = require("../shared");
5
+ /**
6
+ * Endpoint mapping for Tarot operations
7
+ */
8
+ const TAROT_ENDPOINTS = {
9
+ // Glossary (GET)
10
+ glossaryCards: "/api/v3/tarot/glossary/cards",
11
+ glossarySpreads: "/api/v3/tarot/glossary/spreads",
12
+ glossaryCardDetail: "/api/v3/tarot/glossary/cards/{card_id}",
13
+ searchCards: "/api/v3/tarot/cards/search",
14
+ dailyCard: "/api/v3/tarot/cards/daily",
15
+ // Draw (POST)
16
+ drawCards: "/api/v3/tarot/cards/draw",
17
+ // Reports (POST)
18
+ reportSingle: "/api/v3/tarot/reports/single",
19
+ reportThreeCard: "/api/v3/tarot/reports/three-card",
20
+ reportCelticCross: "/api/v3/tarot/reports/celtic-cross",
21
+ reportSynastry: "/api/v3/tarot/reports/synastry",
22
+ reportHouses: "/api/v3/tarot/reports/houses",
23
+ reportTreeOfLife: "/api/v3/tarot/reports/tree-of-life",
24
+ // Analysis (POST)
25
+ analysisQuintessence: "/api/v3/tarot/analysis/quintessence",
26
+ analysisBirthCards: "/api/v3/tarot/analysis/birth-cards",
27
+ analysisDignities: "/api/v3/tarot/analysis/dignities",
28
+ analysisTiming: "/api/v3/tarot/analysis/timing",
29
+ analysisOptimalTimes: "/api/v3/tarot/analysis/optimal-times",
30
+ analysisTransitReport: "/api/v3/tarot/analysis/transit-report",
31
+ analysisNatalReport: "/api/v3/tarot/analysis/natal-report",
32
+ };
33
+ /**
34
+ * Handles all Tarot resource operations
35
+ */
36
+ async function handleTarotResource(context, operation) {
37
+ const op = operation;
38
+ switch (op) {
39
+ // Glossary operations (GET)
40
+ case "glossaryCards":
41
+ return handleGlossaryCards(context);
42
+ case "glossarySpreads":
43
+ return handleGlossarySpreads(context);
44
+ case "glossaryCardDetail":
45
+ return handleGlossaryCardDetail(context);
46
+ case "searchCards":
47
+ return handleSearchCards(context);
48
+ case "dailyCard":
49
+ return handleDailyCard(context);
50
+ // Draw operation (POST)
51
+ case "drawCards":
52
+ return handleDrawCards(context);
53
+ // Report operations (POST)
54
+ case "reportSingle":
55
+ case "reportThreeCard":
56
+ case "reportCelticCross":
57
+ case "reportHouses":
58
+ case "reportTreeOfLife":
59
+ return handleReport(context, op);
60
+ case "reportSynastry":
61
+ return handleReportSynastry(context);
62
+ // Analysis operations (POST)
63
+ case "analysisQuintessence":
64
+ case "analysisDignities":
65
+ case "analysisTiming":
66
+ return handleAnalysisWithCards(context, op);
67
+ case "analysisBirthCards":
68
+ return handleAnalysisBirthCards(context);
69
+ case "analysisOptimalTimes":
70
+ return handleAnalysisOptimalTimes(context);
71
+ case "analysisTransitReport":
72
+ return handleAnalysisTransitReport(context);
73
+ case "analysisNatalReport":
74
+ return handleAnalysisNatalReport(context);
75
+ default:
76
+ throw new Error(`The operation '${operation}' is not supported for the tarot resource`);
77
+ }
78
+ }
79
+ /**
80
+ * Builds common tarot options from node parameters
81
+ */
82
+ function buildTarotOptions(executeFunctions, itemIndex) {
83
+ return {
84
+ use_reversals: executeFunctions.getNodeParameter("useReversals", itemIndex, true),
85
+ tradition: executeFunctions.getNodeParameter("tradition", itemIndex, "universal"),
86
+ include_dignities: executeFunctions.getNodeParameter("includeDignities", itemIndex, false),
87
+ include_timing: executeFunctions.getNodeParameter("includeTiming", itemIndex, false),
88
+ include_astro_context: executeFunctions.getNodeParameter("includeAstroContext", itemIndex, false),
89
+ include_birth_cards: executeFunctions.getNodeParameter("includeBirthCards", itemIndex, false),
90
+ interpretation_depth: executeFunctions.getNodeParameter("interpretationDepth", itemIndex, "detailed"),
91
+ language: executeFunctions.getNodeParameter("language", itemIndex, "en"),
92
+ };
93
+ }
94
+ /**
95
+ * Builds second subject birth data from subject2* prefixed fields
96
+ */
97
+ function buildSecondSubjectBirthData(executeFunctions, itemIndex) {
98
+ const locationType = executeFunctions.getNodeParameter("subject2LocationType", itemIndex);
99
+ const birthData = {
100
+ year: executeFunctions.getNodeParameter("subject2Year", itemIndex),
101
+ month: executeFunctions.getNodeParameter("subject2Month", itemIndex),
102
+ day: executeFunctions.getNodeParameter("subject2Day", itemIndex),
103
+ hour: executeFunctions.getNodeParameter("subject2Hour", itemIndex),
104
+ minute: executeFunctions.getNodeParameter("subject2Minute", itemIndex),
105
+ };
106
+ if (locationType === "city") {
107
+ birthData.city = executeFunctions.getNodeParameter("subject2City", itemIndex);
108
+ birthData.country_code = executeFunctions.getNodeParameter("subject2CountryCode", itemIndex);
109
+ }
110
+ else {
111
+ birthData.latitude = executeFunctions.getNodeParameter("subject2Latitude", itemIndex);
112
+ birthData.longitude = executeFunctions.getNodeParameter("subject2Longitude", itemIndex);
113
+ }
114
+ return birthData;
115
+ }
116
+ /**
117
+ * Handles glossary cards request (GET with filters)
118
+ */
119
+ async function handleGlossaryCards(context) {
120
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
121
+ // Build query parameters from filters
122
+ const params = [];
123
+ const arcana = executeFunctions.getNodeParameter("arcana", itemIndex, "");
124
+ if (arcana)
125
+ params.push(`arcana=${arcana}`);
126
+ const suit = executeFunctions.getNodeParameter("suit", itemIndex, "");
127
+ if (suit)
128
+ params.push(`suit=${suit}`);
129
+ const element = executeFunctions.getNodeParameter("element", itemIndex, "");
130
+ if (element)
131
+ params.push(`element=${element}`);
132
+ const planet = executeFunctions.getNodeParameter("planet", itemIndex, "");
133
+ if (planet)
134
+ params.push(`planet=${planet}`);
135
+ const sign = executeFunctions.getNodeParameter("sign", itemIndex, "");
136
+ if (sign)
137
+ params.push(`sign=${sign}`);
138
+ const house = executeFunctions.getNodeParameter("house", itemIndex, 0);
139
+ if (house > 0)
140
+ params.push(`house=${house}`);
141
+ const queryString = params.length > 0 ? `?${params.join("&")}` : "";
142
+ const endpoint = `${TAROT_ENDPOINTS.glossaryCards}${queryString}`;
143
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
144
+ }
145
+ /**
146
+ * Handles glossary spreads request (GET)
147
+ */
148
+ async function handleGlossarySpreads(context) {
149
+ const { executeFunctions, baseUrl, apiKey } = context;
150
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, TAROT_ENDPOINTS.glossarySpreads, apiKey);
151
+ }
152
+ /**
153
+ * Handles glossary card detail request (GET with path parameter)
154
+ */
155
+ async function handleGlossaryCardDetail(context) {
156
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
157
+ const cardId = executeFunctions.getNodeParameter("cardId", itemIndex);
158
+ // Replace path parameter
159
+ const endpoint = TAROT_ENDPOINTS.glossaryCardDetail.replace("{card_id}", encodeURIComponent(cardId));
160
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
161
+ }
162
+ /**
163
+ * Handles search cards request (GET with pagination and filters)
164
+ */
165
+ async function handleSearchCards(context) {
166
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
167
+ // Build query parameters
168
+ const params = [];
169
+ const keyword = executeFunctions.getNodeParameter("keyword", itemIndex, "");
170
+ if (keyword)
171
+ params.push(`keyword=${encodeURIComponent(keyword)}`);
172
+ const lifeArea = executeFunctions.getNodeParameter("lifeArea", itemIndex, "");
173
+ if (lifeArea)
174
+ params.push(`life_area=${encodeURIComponent(lifeArea)}`);
175
+ const arcana = executeFunctions.getNodeParameter("arcana", itemIndex, "");
176
+ if (arcana)
177
+ params.push(`arcana=${arcana}`);
178
+ const suit = executeFunctions.getNodeParameter("suit", itemIndex, "");
179
+ if (suit)
180
+ params.push(`suit=${suit}`);
181
+ const element = executeFunctions.getNodeParameter("element", itemIndex, "");
182
+ if (element)
183
+ params.push(`element=${element}`);
184
+ const planet = executeFunctions.getNodeParameter("planet", itemIndex, "");
185
+ if (planet)
186
+ params.push(`planet=${planet}`);
187
+ const sign = executeFunctions.getNodeParameter("sign", itemIndex, "");
188
+ if (sign)
189
+ params.push(`sign=${sign}`);
190
+ const page = executeFunctions.getNodeParameter("page", itemIndex, 1);
191
+ params.push(`page=${page}`);
192
+ const pageSize = executeFunctions.getNodeParameter("pageSize", itemIndex, 20);
193
+ params.push(`page_size=${pageSize}`);
194
+ const queryString = params.length > 0 ? `?${params.join("&")}` : "";
195
+ const endpoint = `${TAROT_ENDPOINTS.searchCards}${queryString}`;
196
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
197
+ }
198
+ /**
199
+ * Handles daily card request (GET with user_id)
200
+ */
201
+ async function handleDailyCard(context) {
202
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
203
+ const userId = executeFunctions.getNodeParameter("userId", itemIndex);
204
+ const params = [`user_id=${encodeURIComponent(userId)}`];
205
+ const lifeArea = executeFunctions.getNodeParameter("lifeArea", itemIndex, "");
206
+ if (lifeArea)
207
+ params.push(`life_area=${encodeURIComponent(lifeArea)}`);
208
+ // Optional birth data for personalization
209
+ try {
210
+ const year = executeFunctions.getNodeParameter("year", itemIndex, 0);
211
+ if (year > 0) {
212
+ params.push(`birth_year=${year}`);
213
+ const month = executeFunctions.getNodeParameter("month", itemIndex, 0);
214
+ if (month > 0)
215
+ params.push(`birth_month=${month}`);
216
+ const day = executeFunctions.getNodeParameter("day", itemIndex, 0);
217
+ if (day > 0)
218
+ params.push(`birth_day=${day}`);
219
+ const hour = executeFunctions.getNodeParameter("hour", itemIndex, 0);
220
+ if (hour > 0)
221
+ params.push(`birth_hour=${hour}`);
222
+ const minute = executeFunctions.getNodeParameter("minute", itemIndex, 0);
223
+ if (minute > 0)
224
+ params.push(`birth_minute=${minute}`);
225
+ }
226
+ }
227
+ catch {
228
+ // Birth data fields are optional, ignore if not provided
229
+ }
230
+ const queryString = `?${params.join("&")}`;
231
+ const endpoint = `${TAROT_ENDPOINTS.dailyCard}${queryString}`;
232
+ return await (0, shared_1.makeApiRequest)(executeFunctions, "GET", baseUrl, endpoint, apiKey);
233
+ }
234
+ /**
235
+ * Handles draw cards request (POST)
236
+ */
237
+ async function handleDrawCards(context) {
238
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
239
+ const count = executeFunctions.getNodeParameter("drawCount", itemIndex, 1);
240
+ const excludeReversed = executeFunctions.getNodeParameter("excludeReversed", itemIndex, false);
241
+ const excludeMajors = executeFunctions.getNodeParameter("excludeMajors", itemIndex, false);
242
+ const excludeMinors = executeFunctions.getNodeParameter("excludeMinors", itemIndex, false);
243
+ const lifeArea = executeFunctions.getNodeParameter("lifeArea", itemIndex, "");
244
+ const body = {
245
+ count,
246
+ exclude_reversed: excludeReversed,
247
+ exclude_majors: excludeMajors,
248
+ exclude_minors: excludeMinors,
249
+ };
250
+ if (lifeArea) {
251
+ body.life_area = lifeArea;
252
+ }
253
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.drawCards, apiKey, body);
254
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
255
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
256
+ }
257
+ /**
258
+ * Handles generic report requests (POST)
259
+ */
260
+ async function handleReport(context, op) {
261
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
262
+ // Build birth data
263
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
264
+ // Get options
265
+ const lifeArea = executeFunctions.getNodeParameter("lifeArea", itemIndex, "");
266
+ const options = buildTarotOptions(executeFunctions, itemIndex);
267
+ const body = {
268
+ birth_data: birthData,
269
+ ...options,
270
+ };
271
+ if (lifeArea) {
272
+ body.life_area = lifeArea;
273
+ }
274
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS[op], apiKey, body);
275
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
276
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
277
+ }
278
+ /**
279
+ * Handles synastry report (POST with two subjects)
280
+ */
281
+ async function handleReportSynastry(context) {
282
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
283
+ // Build subject 1 birth data
284
+ const birthData1 = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
285
+ // Build subject 2 birth data
286
+ const birthData2 = buildSecondSubjectBirthData(executeFunctions, itemIndex);
287
+ // Get options
288
+ const lifeArea = executeFunctions.getNodeParameter("lifeArea", itemIndex, "");
289
+ const options = buildTarotOptions(executeFunctions, itemIndex);
290
+ const body = {
291
+ birth_data: birthData1,
292
+ partner_birth_data: birthData2,
293
+ ...options,
294
+ };
295
+ if (lifeArea) {
296
+ body.life_area = lifeArea;
297
+ }
298
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.reportSynastry, apiKey, body);
299
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
300
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
301
+ }
302
+ /**
303
+ * Handles analysis operations that require card IDs input
304
+ */
305
+ async function handleAnalysisWithCards(context, op) {
306
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
307
+ // Parse card IDs from comma-separated string
308
+ const cardIdsStr = executeFunctions.getNodeParameter("cardIds", itemIndex);
309
+ const cards = cardIdsStr
310
+ .split(",")
311
+ .map((id) => id.trim())
312
+ .filter((id) => id);
313
+ // Get options
314
+ const options = buildTarotOptions(executeFunctions, itemIndex);
315
+ const body = {
316
+ cards,
317
+ ...options,
318
+ };
319
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS[op], apiKey, body);
320
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
321
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
322
+ }
323
+ /**
324
+ * Handles birth cards analysis (POST with birth data)
325
+ */
326
+ async function handleAnalysisBirthCards(context) {
327
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
328
+ // Build birth data
329
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
330
+ // Get options
331
+ const options = buildTarotOptions(executeFunctions, itemIndex);
332
+ const body = {
333
+ birth_data: birthData,
334
+ ...options,
335
+ };
336
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.analysisBirthCards, apiKey, body);
337
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
338
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
339
+ }
340
+ /**
341
+ * Handles optimal times analysis (POST with birth data)
342
+ */
343
+ async function handleAnalysisOptimalTimes(context) {
344
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
345
+ // Get options
346
+ const options = buildTarotOptions(executeFunctions, itemIndex);
347
+ const body = {
348
+ ...options,
349
+ };
350
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.analysisOptimalTimes, apiKey, body);
351
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
352
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
353
+ }
354
+ /**
355
+ * Handles transit report analysis (POST with birth data)
356
+ */
357
+ async function handleAnalysisTransitReport(context) {
358
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
359
+ // Build birth data
360
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
361
+ // Get options
362
+ const options = buildTarotOptions(executeFunctions, itemIndex);
363
+ const body = {
364
+ birth_data: birthData,
365
+ ...options,
366
+ };
367
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.analysisTransitReport, apiKey, body);
368
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
369
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
370
+ }
371
+ /**
372
+ * Handles natal report analysis (POST with birth data)
373
+ */
374
+ async function handleAnalysisNatalReport(context) {
375
+ const { executeFunctions, itemIndex, baseUrl, apiKey } = context;
376
+ // Build birth data
377
+ const birthData = (0, shared_1.buildBirthData)(executeFunctions, itemIndex);
378
+ // Get options
379
+ const options = buildTarotOptions(executeFunctions, itemIndex);
380
+ const body = {
381
+ birth_data: birthData,
382
+ ...options,
383
+ };
384
+ const responseData = await (0, shared_1.makeApiRequest)(executeFunctions, "POST", baseUrl, TAROT_ENDPOINTS.analysisNatalReport, apiKey, body);
385
+ const simplify = executeFunctions.getNodeParameter("simplify", itemIndex, true);
386
+ return simplify ? (0, shared_1.simplifyResponse)(responseData) : responseData;
387
+ }
@@ -1 +1 @@
1
- export type { IBirthData, ISubjectRequest, ResourceType, DataOperation, HoroscopeOperation, ChartsOperation, IHandlerContext, ResourceHandler, ZodiacSign, LocationType, Tradition, TextFormat, } from "./types";
1
+ export type { IBirthData, ISubjectRequest, ResourceType, DataOperation, HoroscopeOperation, ChartsOperation, TarotOperation, TarotTradition, TarotInterpretationDepth, TarotArcana, TarotSuit, IHandlerContext, ResourceHandler, ZodiacSign, LocationType, Tradition, TextFormat, } from "./types";
@@ -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" | "humanDesign" | "numerology";
28
+ export type ResourceType = "data" | "horoscope" | "charts" | "humanDesign" | "numerology" | "tarot";
29
29
  /**
30
30
  * Data resource operations
31
31
  */
@@ -46,6 +46,26 @@ export type HumanDesignOperation = "glossaryChannels" | "glossaryGates" | "gloss
46
46
  * Numerology resource operations
47
47
  */
48
48
  export type NumerologyOperation = "coreNumbers" | "comprehensive" | "compatibility";
49
+ /**
50
+ * Tarot resource operations
51
+ */
52
+ export type TarotOperation = "glossaryCards" | "glossarySpreads" | "glossaryCardDetail" | "searchCards" | "dailyCard" | "drawCards" | "reportSingle" | "reportThreeCard" | "reportCelticCross" | "reportSynastry" | "reportHouses" | "reportTreeOfLife" | "analysisQuintessence" | "analysisBirthCards" | "analysisDignities" | "analysisTiming" | "analysisOptimalTimes" | "analysisTransitReport" | "analysisNatalReport";
53
+ /**
54
+ * Tarot tradition/interpretation style
55
+ */
56
+ export type TarotTradition = "universal" | "psychological" | "classical" | "hermetic";
57
+ /**
58
+ * Tarot interpretation depth levels
59
+ */
60
+ export type TarotInterpretationDepth = "keywords" | "basic" | "detailed" | "professional";
61
+ /**
62
+ * Tarot arcana types for filtering
63
+ */
64
+ export type TarotArcana = "major" | "minor";
65
+ /**
66
+ * Tarot suits for filtering
67
+ */
68
+ export type TarotSuit = "wands" | "cups" | "swords" | "pentacles";
49
69
  /**
50
70
  * Human Design circuit types
51
71
  */
@@ -4,3 +4,4 @@ export { horoscopeOperations } from "./horoscope.operation";
4
4
  export { chartsOperations } from "./charts.operation";
5
5
  export { humanDesignOperations } from "./humanDesign.operation";
6
6
  export { numerologyOperations } from "./numerology.operation";
7
+ export { tarotOperations } from "./tarot.operation";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.numerologyOperations = exports.humanDesignOperations = exports.chartsOperations = exports.horoscopeOperations = exports.dataOperations = exports.resourceField = void 0;
3
+ exports.tarotOperations = exports.numerologyOperations = exports.humanDesignOperations = exports.chartsOperations = exports.horoscopeOperations = exports.dataOperations = exports.resourceField = void 0;
4
4
  var resource_options_1 = require("./resource.options");
5
5
  Object.defineProperty(exports, "resourceField", { enumerable: true, get: function () { return resource_options_1.resourceField; } });
6
6
  var data_operation_1 = require("./data.operation");
@@ -13,3 +13,5 @@ var humanDesign_operation_1 = require("./humanDesign.operation");
13
13
  Object.defineProperty(exports, "humanDesignOperations", { enumerable: true, get: function () { return humanDesign_operation_1.humanDesignOperations; } });
14
14
  var numerology_operation_1 = require("./numerology.operation");
15
15
  Object.defineProperty(exports, "numerologyOperations", { enumerable: true, get: function () { return numerology_operation_1.numerologyOperations; } });
16
+ var tarot_operation_1 = require("./tarot.operation");
17
+ Object.defineProperty(exports, "tarotOperations", { enumerable: true, get: function () { return tarot_operation_1.tarotOperations; } });
@@ -36,6 +36,11 @@ exports.resourceField = {
36
36
  value: "numerology",
37
37
  description: "Numerology calculations: Life Path, Expression, Soul Urge numbers, comprehensive readings, and compatibility analysis",
38
38
  },
39
+ {
40
+ name: "Tarot",
41
+ value: "tarot",
42
+ description: "Tarot card readings and analysis: daily cards, spreads (single, three-card, Celtic Cross), birth cards, and astrological integration",
43
+ },
39
44
  ],
40
45
  default: "data",
41
46
  };
@@ -0,0 +1,5 @@
1
+ import type { INodeProperties } from "n8n-workflow";
2
+ /**
3
+ * All properties for the Tarot resource
4
+ */
5
+ export declare const tarotOperations: INodeProperties[];
@@ -0,0 +1,573 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tarotOperations = void 0;
4
+ const shared_1 = require("../shared");
5
+ /**
6
+ * Operation groups for displayOptions
7
+ */
8
+ const glossaryOperations = [
9
+ "glossaryCards",
10
+ "glossarySpreads",
11
+ "glossaryCardDetail",
12
+ "searchCards",
13
+ "dailyCard",
14
+ ];
15
+ const birthDataOperations = [
16
+ "dailyCard",
17
+ "reportSingle",
18
+ "reportThreeCard",
19
+ "reportCelticCross",
20
+ "reportSynastry",
21
+ "reportHouses",
22
+ "reportTreeOfLife",
23
+ "analysisBirthCards",
24
+ "analysisTransitReport",
25
+ "analysisNatalReport",
26
+ ];
27
+ const locationOperations = [
28
+ "dailyCard",
29
+ "reportSingle",
30
+ "reportThreeCard",
31
+ "reportCelticCross",
32
+ "reportSynastry",
33
+ "reportHouses",
34
+ "reportTreeOfLife",
35
+ "analysisBirthCards",
36
+ "analysisTransitReport",
37
+ "analysisNatalReport",
38
+ ];
39
+ const synastryOperations = ["reportSynastry"];
40
+ const reportOperations = [
41
+ "reportSingle",
42
+ "reportThreeCard",
43
+ "reportCelticCross",
44
+ "reportSynastry",
45
+ "reportHouses",
46
+ "reportTreeOfLife",
47
+ ];
48
+ const analysisOperations = [
49
+ "analysisQuintessence",
50
+ "analysisBirthCards",
51
+ "analysisDignities",
52
+ "analysisTiming",
53
+ "analysisOptimalTimes",
54
+ "analysisTransitReport",
55
+ "analysisNatalReport",
56
+ ];
57
+ const cardsInputOperations = [
58
+ "analysisQuintessence",
59
+ "analysisDignities",
60
+ "analysisTiming",
61
+ ];
62
+ const filterOperations = ["glossaryCards", "searchCards"];
63
+ const postOperations = [
64
+ "drawCards",
65
+ ...reportOperations,
66
+ ...analysisOperations,
67
+ ];
68
+ /**
69
+ * Operation selector for Tarot resource
70
+ */
71
+ const tarotOperationField = {
72
+ displayName: "Operation",
73
+ name: "operation",
74
+ type: "options",
75
+ noDataExpression: true,
76
+ displayOptions: {
77
+ show: {
78
+ resource: ["tarot"],
79
+ },
80
+ },
81
+ options: [
82
+ // Analysis operations
83
+ {
84
+ name: "Analysis - Birth Cards",
85
+ value: "analysisBirthCards",
86
+ description: "Calculate personal birth cards based on date of birth",
87
+ action: "Calculate birth cards",
88
+ },
89
+ {
90
+ name: "Analysis - Dignities",
91
+ value: "analysisDignities",
92
+ description: "Analyze elemental dignities between cards in a spread",
93
+ action: "Analyze elemental dignities",
94
+ },
95
+ {
96
+ name: "Analysis - Natal Report",
97
+ value: "analysisNatalReport",
98
+ description: "Tarot reading integrated with natal chart for deep personal insights",
99
+ action: "Get natal integration report",
100
+ },
101
+ {
102
+ name: "Analysis - Optimal Times",
103
+ value: "analysisOptimalTimes",
104
+ description: "Find optimal timing for specific activities based on tarot and astrology",
105
+ action: "Find optimal times",
106
+ },
107
+ {
108
+ name: "Analysis - Quintessence",
109
+ value: "analysisQuintessence",
110
+ description: "Calculate the quintessence (essence card) from a spread",
111
+ action: "Calculate quintessence",
112
+ },
113
+ {
114
+ name: "Analysis - Timing",
115
+ value: "analysisTiming",
116
+ description: "Timing analysis and predictions based on card positions",
117
+ action: "Analyze timing",
118
+ },
119
+ {
120
+ name: "Analysis - Transit Report",
121
+ value: "analysisTransitReport",
122
+ description: "Tarot reading aligned with current planetary transits for timely guidance",
123
+ action: "Get transit report",
124
+ },
125
+ // Daily Card
126
+ {
127
+ name: "Daily Card",
128
+ value: "dailyCard",
129
+ description: "Get a personalized daily tarot card for guidance (consistent per user/day)",
130
+ action: "Get daily card",
131
+ },
132
+ // Draw Cards
133
+ {
134
+ name: "Draw Cards",
135
+ value: "drawCards",
136
+ description: "Draw random tarot cards for a reading (1-78 cards)",
137
+ action: "Draw random cards",
138
+ },
139
+ // Glossary operations
140
+ {
141
+ name: "Glossary - Card Detail",
142
+ value: "glossaryCardDetail",
143
+ description: "Get detailed information about a specific tarot card by ID",
144
+ action: "Get card detail",
145
+ },
146
+ {
147
+ name: "Glossary - Cards",
148
+ value: "glossaryCards",
149
+ description: "Get tarot cards glossary with optional filters (arcana, suit, element, planet, sign)",
150
+ action: "Get cards glossary",
151
+ },
152
+ {
153
+ name: "Glossary - Spreads",
154
+ value: "glossarySpreads",
155
+ description: "Get available tarot spread types and their position descriptions",
156
+ action: "Get spreads glossary",
157
+ },
158
+ // Report operations
159
+ {
160
+ name: "Report - Celtic Cross",
161
+ value: "reportCelticCross",
162
+ description: "Full Celtic Cross spread (10 cards) for comprehensive life situation analysis",
163
+ action: "Get celtic cross report",
164
+ },
165
+ {
166
+ name: "Report - Houses",
167
+ value: "reportHouses",
168
+ description: "12-house astrological spread covering all life areas",
169
+ action: "Get houses report",
170
+ },
171
+ {
172
+ name: "Report - Single Card",
173
+ value: "reportSingle",
174
+ description: "Single card tarot reading for focused guidance",
175
+ action: "Get single card report",
176
+ },
177
+ {
178
+ name: "Report - Synastry",
179
+ value: "reportSynastry",
180
+ description: "Two-person relationship tarot reading for compatibility insights",
181
+ action: "Get synastry report",
182
+ },
183
+ {
184
+ name: "Report - Three Card",
185
+ value: "reportThreeCard",
186
+ description: "Classic three card spread (past/present/future or situation/action/outcome)",
187
+ action: "Get three card report",
188
+ },
189
+ {
190
+ name: "Report - Tree of Life",
191
+ value: "reportTreeOfLife",
192
+ description: "Kabbalah Tree of Life spread for spiritual insight",
193
+ action: "Get tree of life report",
194
+ },
195
+ // Search Cards
196
+ {
197
+ name: "Search Cards",
198
+ value: "searchCards",
199
+ description: "Search tarot cards by keyword, life area, element, or astrological correspondence",
200
+ action: "Search cards",
201
+ },
202
+ ],
203
+ default: "reportSingle",
204
+ };
205
+ /**
206
+ * Card ID field for glossaryCardDetail
207
+ */
208
+ const cardIdField = {
209
+ displayName: "Card ID",
210
+ name: "cardId",
211
+ type: "string",
212
+ displayOptions: {
213
+ show: {
214
+ resource: ["tarot"],
215
+ operation: ["glossaryCardDetail"],
216
+ },
217
+ },
218
+ default: "",
219
+ placeholder: "e.g. the_fool, ace_of_wands, major_04",
220
+ description: "The card identifier to get details for",
221
+ required: true,
222
+ };
223
+ /**
224
+ * User ID field for daily card
225
+ */
226
+ const userIdField = {
227
+ displayName: "User ID",
228
+ name: "userId",
229
+ type: "string",
230
+ displayOptions: {
231
+ show: {
232
+ resource: ["tarot"],
233
+ operation: ["dailyCard"],
234
+ },
235
+ },
236
+ default: "",
237
+ placeholder: "e.g. user-123, email@example.com",
238
+ description: "Unique user identifier for consistent daily card (same user gets same card per day)",
239
+ required: true,
240
+ };
241
+ /**
242
+ * Draw count field
243
+ */
244
+ const drawCountField = {
245
+ displayName: "Number of Cards",
246
+ name: "drawCount",
247
+ type: "number",
248
+ displayOptions: {
249
+ show: {
250
+ resource: ["tarot"],
251
+ operation: ["drawCards"],
252
+ },
253
+ },
254
+ default: 1,
255
+ typeOptions: {
256
+ minValue: 1,
257
+ maxValue: 78,
258
+ },
259
+ description: "Number of cards to draw (1-78)",
260
+ required: true,
261
+ };
262
+ /**
263
+ * Exclude reversed cards toggle
264
+ */
265
+ const excludeReversedField = {
266
+ displayName: "Exclude Reversed",
267
+ name: "excludeReversed",
268
+ type: "boolean",
269
+ displayOptions: {
270
+ show: {
271
+ resource: ["tarot"],
272
+ operation: ["drawCards"],
273
+ },
274
+ },
275
+ default: false,
276
+ description: "Whether to exclude reversed card orientations from draw",
277
+ };
278
+ /**
279
+ * Exclude Major Arcana toggle
280
+ */
281
+ const excludeMajorsField = {
282
+ displayName: "Exclude Major Arcana",
283
+ name: "excludeMajors",
284
+ type: "boolean",
285
+ displayOptions: {
286
+ show: {
287
+ resource: ["tarot"],
288
+ operation: ["drawCards"],
289
+ },
290
+ },
291
+ default: false,
292
+ description: "Whether to exclude Major Arcana cards from draw",
293
+ };
294
+ /**
295
+ * Exclude Minor Arcana toggle
296
+ */
297
+ const excludeMinorsField = {
298
+ displayName: "Exclude Minor Arcana",
299
+ name: "excludeMinors",
300
+ type: "boolean",
301
+ displayOptions: {
302
+ show: {
303
+ resource: ["tarot"],
304
+ operation: ["drawCards"],
305
+ },
306
+ },
307
+ default: false,
308
+ description: "Whether to exclude Minor Arcana cards from draw",
309
+ };
310
+ /**
311
+ * Arcana filter field
312
+ */
313
+ const arcanaFilterField = {
314
+ displayName: "Filter by Arcana",
315
+ name: "arcana",
316
+ type: "options",
317
+ displayOptions: {
318
+ show: {
319
+ resource: ["tarot"],
320
+ operation: filterOperations,
321
+ },
322
+ },
323
+ options: shared_1.tarotArcanaOptions,
324
+ default: "",
325
+ description: "Filter cards by arcana type",
326
+ };
327
+ /**
328
+ * Suit filter field
329
+ */
330
+ const suitFilterField = {
331
+ displayName: "Filter by Suit",
332
+ name: "suit",
333
+ type: "options",
334
+ displayOptions: {
335
+ show: {
336
+ resource: ["tarot"],
337
+ operation: filterOperations,
338
+ },
339
+ },
340
+ options: shared_1.tarotSuitOptions,
341
+ default: "",
342
+ description: "Filter Minor Arcana cards by suit",
343
+ };
344
+ /**
345
+ * Element filter field
346
+ */
347
+ const elementFilterField = {
348
+ displayName: "Filter by Element",
349
+ name: "element",
350
+ type: "options",
351
+ displayOptions: {
352
+ show: {
353
+ resource: ["tarot"],
354
+ operation: filterOperations,
355
+ },
356
+ },
357
+ options: shared_1.tarotElementOptions,
358
+ default: "",
359
+ description: "Filter cards by elemental correspondence",
360
+ };
361
+ /**
362
+ * Planet filter field
363
+ */
364
+ const planetFilterField = {
365
+ displayName: "Filter by Planet",
366
+ name: "planet",
367
+ type: "string",
368
+ displayOptions: {
369
+ show: {
370
+ resource: ["tarot"],
371
+ operation: filterOperations,
372
+ },
373
+ },
374
+ default: "",
375
+ placeholder: "e.g. mars, venus, moon",
376
+ description: "Filter cards by planetary correspondence (lowercase)",
377
+ };
378
+ /**
379
+ * Sign filter field
380
+ */
381
+ const signFilterField = {
382
+ displayName: "Filter by Zodiac Sign",
383
+ name: "sign",
384
+ type: "string",
385
+ displayOptions: {
386
+ show: {
387
+ resource: ["tarot"],
388
+ operation: filterOperations,
389
+ },
390
+ },
391
+ default: "",
392
+ placeholder: "e.g. ari, tau, gem (3-letter code)",
393
+ description: "Filter cards by zodiac sign correspondence (3-letter code)",
394
+ };
395
+ /**
396
+ * House filter field
397
+ */
398
+ const houseFilterField = {
399
+ displayName: "Filter by House",
400
+ name: "house",
401
+ type: "number",
402
+ displayOptions: {
403
+ show: {
404
+ resource: ["tarot"],
405
+ operation: filterOperations,
406
+ },
407
+ },
408
+ default: 0,
409
+ typeOptions: {
410
+ minValue: 0,
411
+ maxValue: 12,
412
+ },
413
+ description: "Filter cards by astrological house correspondence (1-12, 0 for all)",
414
+ };
415
+ /**
416
+ * Search keyword field
417
+ */
418
+ const keywordField = {
419
+ displayName: "Keyword",
420
+ name: "keyword",
421
+ type: "string",
422
+ displayOptions: {
423
+ show: {
424
+ resource: ["tarot"],
425
+ operation: ["searchCards"],
426
+ },
427
+ },
428
+ default: "",
429
+ placeholder: "e.g. love, success, transformation",
430
+ description: "Search keyword for card names (case-insensitive)",
431
+ };
432
+ /**
433
+ * Life area field
434
+ */
435
+ const lifeAreaField = {
436
+ displayName: "Life Area",
437
+ name: "lifeArea",
438
+ type: "string",
439
+ displayOptions: {
440
+ show: {
441
+ resource: ["tarot"],
442
+ operation: ["searchCards", "dailyCard", "drawCards", ...reportOperations],
443
+ },
444
+ },
445
+ default: "",
446
+ placeholder: "e.g. career, love, health, finances",
447
+ description: "Optional life area focus for the reading or search",
448
+ };
449
+ /**
450
+ * Page number field for search
451
+ */
452
+ const pageField = {
453
+ displayName: "Page",
454
+ name: "page",
455
+ type: "number",
456
+ displayOptions: {
457
+ show: {
458
+ resource: ["tarot"],
459
+ operation: ["searchCards"],
460
+ },
461
+ },
462
+ default: 1,
463
+ typeOptions: {
464
+ minValue: 1,
465
+ },
466
+ description: "Page number for pagination (1-based)",
467
+ };
468
+ /**
469
+ * Page size field for search
470
+ */
471
+ const pageSizeField = {
472
+ displayName: "Page Size",
473
+ name: "pageSize",
474
+ type: "number",
475
+ displayOptions: {
476
+ show: {
477
+ resource: ["tarot"],
478
+ operation: ["searchCards"],
479
+ },
480
+ },
481
+ default: 20,
482
+ typeOptions: {
483
+ minValue: 1,
484
+ maxValue: 78,
485
+ },
486
+ description: "Number of results per page (max 78)",
487
+ };
488
+ /**
489
+ * Cards input field for analysis operations
490
+ */
491
+ const cardsInputField = {
492
+ displayName: "Card IDs",
493
+ name: "cardIds",
494
+ type: "string",
495
+ displayOptions: {
496
+ show: {
497
+ resource: ["tarot"],
498
+ operation: cardsInputOperations,
499
+ },
500
+ },
501
+ default: "",
502
+ placeholder: "the_fool,the_magician,the_high_priestess",
503
+ description: "Comma-separated list of card IDs for analysis",
504
+ required: true,
505
+ };
506
+ /**
507
+ * Simplify output toggle
508
+ */
509
+ const simplifyField = {
510
+ displayName: "Simplify",
511
+ name: "simplify",
512
+ type: "boolean",
513
+ displayOptions: {
514
+ show: {
515
+ resource: ["tarot"],
516
+ },
517
+ hide: {
518
+ operation: glossaryOperations,
519
+ },
520
+ },
521
+ default: true,
522
+ description: "Whether to return simplified response with key data only. Disable for full API response.",
523
+ };
524
+ /**
525
+ * All properties for the Tarot resource
526
+ */
527
+ exports.tarotOperations = [
528
+ // Operation selector
529
+ tarotOperationField,
530
+ // Card ID for glossaryCardDetail
531
+ cardIdField,
532
+ // User ID for dailyCard
533
+ userIdField,
534
+ // Draw options
535
+ drawCountField,
536
+ excludeReversedField,
537
+ excludeMajorsField,
538
+ excludeMinorsField,
539
+ // Filter fields for glossary/search
540
+ arcanaFilterField,
541
+ suitFilterField,
542
+ elementFilterField,
543
+ planetFilterField,
544
+ signFilterField,
545
+ houseFilterField,
546
+ // Search fields
547
+ keywordField,
548
+ pageField,
549
+ pageSizeField,
550
+ // Life area
551
+ lifeAreaField,
552
+ // Cards input for analysis
553
+ cardsInputField,
554
+ // Birth data fields (for operations that need it)
555
+ ...(0, shared_1.createBirthDataFields)("tarot", birthDataOperations),
556
+ // Location fields
557
+ ...(0, shared_1.createLocationFields)("tarot", locationOperations),
558
+ // Second subject fields for synastry
559
+ ...(0, shared_1.createSecondSubjectFields)("tarot", synastryOperations),
560
+ // Tarot-specific options
561
+ (0, shared_1.createLanguageField)("tarot", postOperations),
562
+ (0, shared_1.createTarotTraditionField)("tarot", [
563
+ ...reportOperations,
564
+ ...analysisOperations,
565
+ ]),
566
+ (0, shared_1.createInterpretationDepthField)("tarot", reportOperations),
567
+ ...(0, shared_1.createTarotOptionsFields)("tarot", [
568
+ ...reportOperations,
569
+ ...analysisOperations,
570
+ ]),
571
+ // Simplify output
572
+ simplifyField,
573
+ ];
@@ -6,4 +6,5 @@ export { createTransitTimeFields } from "./transitTime.fields";
6
6
  export { createDateRangeFields } from "./dateRange.fields";
7
7
  export { createNameField, createSecondSubjectNameField } from "./name.fields";
8
8
  export { languageOptions, createLanguageField, createIncludeInterpretationsField, } from "./language.fields";
9
+ export { tarotTraditionOptions, tarotInterpretationDepthOptions, tarotArcanaOptions, tarotSuitOptions, tarotElementOptions, createTarotTraditionField, createInterpretationDepthField, createTarotOptionsFields, } from "./tarot.fields";
9
10
  export { buildBirthData, makeApiRequest, createSubjectRequest, simplifyResponse, } from "./helpers";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.simplifyResponse = exports.createSubjectRequest = exports.makeApiRequest = exports.buildBirthData = exports.createIncludeInterpretationsField = exports.createLanguageField = exports.languageOptions = exports.createSecondSubjectNameField = exports.createNameField = exports.createDateRangeFields = exports.createTransitTimeFields = exports.createSecondSubjectFields = exports.createTraditionField = exports.traditionOptions = exports.createZodiacSignField = exports.zodiacSignOptions = exports.createLocationFields = exports.createBirthDataFields = void 0;
3
+ exports.simplifyResponse = exports.createSubjectRequest = exports.makeApiRequest = exports.buildBirthData = exports.createTarotOptionsFields = exports.createInterpretationDepthField = exports.createTarotTraditionField = exports.tarotElementOptions = exports.tarotSuitOptions = exports.tarotArcanaOptions = exports.tarotInterpretationDepthOptions = exports.tarotTraditionOptions = exports.createIncludeInterpretationsField = exports.createLanguageField = exports.languageOptions = exports.createSecondSubjectNameField = exports.createNameField = exports.createDateRangeFields = exports.createTransitTimeFields = exports.createSecondSubjectFields = exports.createTraditionField = exports.traditionOptions = exports.createZodiacSignField = exports.zodiacSignOptions = exports.createLocationFields = exports.createBirthDataFields = void 0;
4
4
  // Shared field creators
5
5
  var birthData_fields_1 = require("./birthData.fields");
6
6
  Object.defineProperty(exports, "createBirthDataFields", { enumerable: true, get: function () { return birthData_fields_1.createBirthDataFields; } });
@@ -24,6 +24,15 @@ var language_fields_1 = require("./language.fields");
24
24
  Object.defineProperty(exports, "languageOptions", { enumerable: true, get: function () { return language_fields_1.languageOptions; } });
25
25
  Object.defineProperty(exports, "createLanguageField", { enumerable: true, get: function () { return language_fields_1.createLanguageField; } });
26
26
  Object.defineProperty(exports, "createIncludeInterpretationsField", { enumerable: true, get: function () { return language_fields_1.createIncludeInterpretationsField; } });
27
+ var tarot_fields_1 = require("./tarot.fields");
28
+ Object.defineProperty(exports, "tarotTraditionOptions", { enumerable: true, get: function () { return tarot_fields_1.tarotTraditionOptions; } });
29
+ Object.defineProperty(exports, "tarotInterpretationDepthOptions", { enumerable: true, get: function () { return tarot_fields_1.tarotInterpretationDepthOptions; } });
30
+ Object.defineProperty(exports, "tarotArcanaOptions", { enumerable: true, get: function () { return tarot_fields_1.tarotArcanaOptions; } });
31
+ Object.defineProperty(exports, "tarotSuitOptions", { enumerable: true, get: function () { return tarot_fields_1.tarotSuitOptions; } });
32
+ Object.defineProperty(exports, "tarotElementOptions", { enumerable: true, get: function () { return tarot_fields_1.tarotElementOptions; } });
33
+ Object.defineProperty(exports, "createTarotTraditionField", { enumerable: true, get: function () { return tarot_fields_1.createTarotTraditionField; } });
34
+ Object.defineProperty(exports, "createInterpretationDepthField", { enumerable: true, get: function () { return tarot_fields_1.createInterpretationDepthField; } });
35
+ Object.defineProperty(exports, "createTarotOptionsFields", { enumerable: true, get: function () { return tarot_fields_1.createTarotOptionsFields; } });
27
36
  // Helper functions
28
37
  var helpers_1 = require("./helpers");
29
38
  Object.defineProperty(exports, "buildBirthData", { enumerable: true, get: function () { return helpers_1.buildBirthData; } });
@@ -0,0 +1,33 @@
1
+ import type { INodeProperties } from "n8n-workflow";
2
+ /**
3
+ * Tarot tradition options
4
+ */
5
+ export declare const tarotTraditionOptions: INodeProperties["options"];
6
+ /**
7
+ * Tarot interpretation depth options
8
+ */
9
+ export declare const tarotInterpretationDepthOptions: INodeProperties["options"];
10
+ /**
11
+ * Tarot arcana filter options
12
+ */
13
+ export declare const tarotArcanaOptions: INodeProperties["options"];
14
+ /**
15
+ * Tarot suit filter options
16
+ */
17
+ export declare const tarotSuitOptions: INodeProperties["options"];
18
+ /**
19
+ * Tarot element filter options
20
+ */
21
+ export declare const tarotElementOptions: INodeProperties["options"];
22
+ /**
23
+ * Creates a tarot tradition selection field
24
+ */
25
+ export declare function createTarotTraditionField(resourceName: string, showForOperations?: string[]): INodeProperties;
26
+ /**
27
+ * Creates an interpretation depth field
28
+ */
29
+ export declare function createInterpretationDepthField(resourceName: string, showForOperations?: string[]): INodeProperties;
30
+ /**
31
+ * Creates tarot-specific boolean option fields
32
+ */
33
+ export declare function createTarotOptionsFields(resourceName: string, showForOperations: string[]): INodeProperties[];
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tarotElementOptions = exports.tarotSuitOptions = exports.tarotArcanaOptions = exports.tarotInterpretationDepthOptions = exports.tarotTraditionOptions = void 0;
4
+ exports.createTarotTraditionField = createTarotTraditionField;
5
+ exports.createInterpretationDepthField = createInterpretationDepthField;
6
+ exports.createTarotOptionsFields = createTarotOptionsFields;
7
+ /**
8
+ * Tarot tradition options
9
+ */
10
+ exports.tarotTraditionOptions = [
11
+ { name: "Classical", value: "classical" },
12
+ { name: "Hermetic", value: "hermetic" },
13
+ { name: "Psychological", value: "psychological" },
14
+ { name: "Universal", value: "universal" },
15
+ ];
16
+ /**
17
+ * Tarot interpretation depth options
18
+ */
19
+ exports.tarotInterpretationDepthOptions = [
20
+ { name: "Keywords Only", value: "keywords" },
21
+ { name: "Basic", value: "basic" },
22
+ { name: "Detailed", value: "detailed" },
23
+ { name: "Professional", value: "professional" },
24
+ ];
25
+ /**
26
+ * Tarot arcana filter options
27
+ */
28
+ exports.tarotArcanaOptions = [
29
+ { name: "All", value: "" },
30
+ { name: "Major Arcana", value: "major" },
31
+ { name: "Minor Arcana", value: "minor" },
32
+ ];
33
+ /**
34
+ * Tarot suit filter options
35
+ */
36
+ exports.tarotSuitOptions = [
37
+ { name: "All", value: "" },
38
+ { name: "Cups", value: "cups" },
39
+ { name: "Pentacles", value: "pentacles" },
40
+ { name: "Swords", value: "swords" },
41
+ { name: "Wands", value: "wands" },
42
+ ];
43
+ /**
44
+ * Tarot element filter options
45
+ */
46
+ exports.tarotElementOptions = [
47
+ { name: "All", value: "" },
48
+ { name: "Air", value: "air" },
49
+ { name: "Earth", value: "earth" },
50
+ { name: "Fire", value: "fire" },
51
+ { name: "Water", value: "water" },
52
+ ];
53
+ /**
54
+ * Creates a tarot tradition selection field
55
+ */
56
+ function createTarotTraditionField(resourceName, showForOperations) {
57
+ const baseDisplayOptions = {
58
+ show: {
59
+ resource: [resourceName],
60
+ },
61
+ };
62
+ if (showForOperations && showForOperations.length > 0) {
63
+ baseDisplayOptions.show.operation = showForOperations;
64
+ }
65
+ return {
66
+ displayName: "Tradition",
67
+ name: "tradition",
68
+ type: "options",
69
+ displayOptions: baseDisplayOptions,
70
+ options: exports.tarotTraditionOptions,
71
+ default: "universal",
72
+ description: "Tarot interpretation tradition/style",
73
+ };
74
+ }
75
+ /**
76
+ * Creates an interpretation depth field
77
+ */
78
+ function createInterpretationDepthField(resourceName, showForOperations) {
79
+ const baseDisplayOptions = {
80
+ show: {
81
+ resource: [resourceName],
82
+ },
83
+ };
84
+ if (showForOperations && showForOperations.length > 0) {
85
+ baseDisplayOptions.show.operation = showForOperations;
86
+ }
87
+ return {
88
+ displayName: "Interpretation Depth",
89
+ name: "interpretationDepth",
90
+ type: "options",
91
+ displayOptions: baseDisplayOptions,
92
+ options: exports.tarotInterpretationDepthOptions,
93
+ default: "detailed",
94
+ description: "Level of detail in card interpretations",
95
+ };
96
+ }
97
+ /**
98
+ * Creates tarot-specific boolean option fields
99
+ */
100
+ function createTarotOptionsFields(resourceName, showForOperations) {
101
+ const baseDisplayOptions = {
102
+ show: {
103
+ resource: [resourceName],
104
+ operation: showForOperations,
105
+ },
106
+ };
107
+ return [
108
+ {
109
+ displayName: "Use Reversals",
110
+ name: "useReversals",
111
+ type: "boolean",
112
+ displayOptions: baseDisplayOptions,
113
+ default: true,
114
+ description: "Whether to include reversed card orientations",
115
+ },
116
+ {
117
+ displayName: "Include Dignities",
118
+ name: "includeDignities",
119
+ type: "boolean",
120
+ displayOptions: baseDisplayOptions,
121
+ default: false,
122
+ description: "Whether to include elemental dignity analysis",
123
+ },
124
+ {
125
+ displayName: "Include Timing",
126
+ name: "includeTiming",
127
+ type: "boolean",
128
+ displayOptions: baseDisplayOptions,
129
+ default: false,
130
+ description: "Whether to include timing predictions",
131
+ },
132
+ {
133
+ displayName: "Include Astrological Context",
134
+ name: "includeAstroContext",
135
+ type: "boolean",
136
+ displayOptions: baseDisplayOptions,
137
+ default: false,
138
+ description: "Whether to include current astrological influences",
139
+ },
140
+ {
141
+ displayName: "Include Birth Cards",
142
+ name: "includeBirthCards",
143
+ type: "boolean",
144
+ displayOptions: baseDisplayOptions,
145
+ default: false,
146
+ description: "Whether to include personal birth cards in analysis",
147
+ },
148
+ ];
149
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astro-api/n8n-nodes-astrology",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "n8n community node for Astrology API - professional astrological calculations, charts, horoscopes, and interpretations",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {