@astroway/n8n-nodes-astroway 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AstroWay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @astroway/n8n-nodes-astroway
2
+
3
+ An [n8n](https://n8n.io) community node for the [AstroWay astrology API](https://api.astroway.info). Natal charts, synastry, transits, Vedic, Human Design, BaZi, numerology, tarot and more, as ready-made actions instead of hand-built HTTP requests.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@astroway/n8n-nodes-astroway.svg?style=flat&color=blue)](https://www.npmjs.com/package/@astroway/n8n-nodes-astroway)
6
+ [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
7
+
8
+ ## Install
9
+
10
+ In n8n open **Settings → Community Nodes → Install**, enter `@astroway/n8n-nodes-astroway` and confirm. Self-hosted n8n can also install it with `npm install @astroway/n8n-nodes-astroway` in `~/.n8n/nodes`.
11
+
12
+ ## Credentials
13
+
14
+ 1. Sign in at [api.astroway.info/dashboard](https://api.astroway.info/dashboard/) and create a key on the Keys page. The Free plan works.
15
+ 2. In n8n create an **AstroWay API** credential and paste the key. n8n checks it with a request that spends no credits.
16
+
17
+ Every call spends credits from the key owner's account; the price of each endpoint is in the [API reference](https://api.astroway.info/en/docs/api/).
18
+
19
+ ## Usage
20
+
21
+ 1. Add the **AstroWay** node, or search the node panel for the calculation, for example "Natal Chart".
22
+ 2. Pick a **Resource** (a group such as Core, Vedic or Human Design) and an **Operation**.
23
+ 3. Under **Fields** the required fields are already listed; add optional ones with **Add field**. Object fields such as `chart1` in Synastry take JSON.
24
+ 4. Run the node. The output is the `data` part of the API answer; a list comes back as `{ "items": [...] }`.
25
+
26
+ A natal chart needs `date` (`YYYY-MM-DD`), `latitude` and `longitude`, plus `time` (`HH:MM`) and a `timezone` such as `Europe/Kyiv`. Add `fields` with comma-separated paths, for example `planets.name,planets.longitude`, to keep only what the next node needs.
27
+
28
+ Errors keep the API's code and message, for example `INVALID_INPUT` with the list of fields that failed. With **Settings → On Error → Continue** the error lands on the item instead of stopping the workflow.
29
+
30
+ [`examples/natal-chart.json`](examples/natal-chart.json) is a workflow you can import: a manual trigger and one natal chart.
31
+
32
+ ## AI Agent tool
33
+
34
+ The node can be attached to an n8n AI Agent as a tool. Pick the operation the agent may call and let the model fill the fields with the "Let the model define this parameter" button next to each one.
35
+
36
+ ## Operations
37
+
38
+ 730 operations in 52 groups, generated from the live [OpenAPI document](https://api.astroway.info/v1/openapi.json): Core, Aspects & Points, Prognostics, Horoscope, Vedic (175), Human Design, BaZi, Zi Wei Dou Shu, Chinese zodiac and feng shui, Hellenistic (four traditions), Horary, Astro-Geography, numerology in five systems, tarot (Rider-Waite-Smith, Marseille, Lenormand), runes, I Ching, Mayan calendars, Kabbalah, Destiny Matrix, reports, visualization and reference data.
39
+
40
+ Field forms are read from the same OpenAPI document when you open the node, so a field added to the API appears without a node update. Embeddable HTML widgets, streaming routes and key management are not part of the node.
41
+
42
+ ## Links
43
+
44
+ - [API documentation](https://api.astroway.info/en/)
45
+ - [No-code integrations](https://api.astroway.info/en/integrations/)
46
+ - [Status](https://api.astroway.info/en/status/)
47
+
48
+ ## License
49
+
50
+ MIT
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class AstrowayApi 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,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AstrowayApi = void 0;
4
+ class AstrowayApi {
5
+ constructor() {
6
+ this.name = 'astrowayApi';
7
+ this.displayName = 'AstroWay API';
8
+ this.icon = { light: 'file:astroway.svg', dark: 'file:astroway.dark.svg' };
9
+ this.documentationUrl = 'https://api.astroway.info/en/authentication/';
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: { password: true },
16
+ default: '',
17
+ required: true,
18
+ placeholder: 'aw_live_...',
19
+ description: 'Create a key in the AstroWay dashboard at https://api.astroway.info/dashboard/keys',
20
+ },
21
+ ];
22
+ this.authenticate = {
23
+ type: 'generic',
24
+ properties: {
25
+ headers: {
26
+ 'X-Api-Key': '={{$credentials.apiKey}}',
27
+ },
28
+ },
29
+ };
30
+ this.test = {
31
+ request: {
32
+ baseURL: 'https://api.astroway.info/v1',
33
+ url: '/auth/keys/me',
34
+ method: 'GET',
35
+ },
36
+ };
37
+ }
38
+ }
39
+ exports.AstrowayApi = AstrowayApi;
40
+ //# sourceMappingURL=AstrowayApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AstrowayApi.credentials.js","sourceRoot":"","sources":["../../credentials/AstrowayApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,cAAc,CAAC;QAE7B,SAAI,GAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;QAE5E,qBAAgB,GAAG,8CAA8C,CAAC;QAElE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,oFAAoF;aACjG;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,8BAA8B;gBACvC,GAAG,EAAE,eAAe;gBACpB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAvCD,kCAuCC"}
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
2
+ <g stroke="#38bdf8" fill="#38bdf8">
3
+ <rect x="5" y="5" width="30" height="30" rx="3" fill="none" stroke-width="1.8"/>
4
+ <circle cx="20" cy="20" r="10" fill="none" stroke-width="1.8" opacity="0.5" stroke-dasharray="2.4 2.4"/>
5
+ <circle cx="20" cy="10" r="2"/>
6
+ <circle cx="30" cy="20" r="2"/>
7
+ <circle cx="20" cy="30" r="2"/>
8
+ <circle cx="10" cy="20" r="2"/>
9
+ <circle cx="20" cy="20" r="2.5" opacity="0.85"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
2
+ <g stroke="#0b5fbf" fill="#0b5fbf">
3
+ <rect x="5" y="5" width="30" height="30" rx="3" fill="none" stroke-width="1.8"/>
4
+ <circle cx="20" cy="20" r="10" fill="none" stroke-width="1.8" opacity="0.5" stroke-dasharray="2.4 2.4"/>
5
+ <circle cx="20" cy="10" r="2"/>
6
+ <circle cx="30" cy="20" r="2"/>
7
+ <circle cx="20" cy="30" r="2"/>
8
+ <circle cx="10" cy="20" r="2"/>
9
+ <circle cx="20" cy="20" r="2.5" opacity="0.85"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,10 @@
1
+ import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodeType, INodeTypeDescription, ResourceMapperFields } from 'n8n-workflow';
2
+ export declare class Astroway implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ resourceMapping: {
6
+ getOperationFields(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
7
+ };
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Astroway = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const fields_1 = require("./fields");
6
+ const operations_generated_1 = require("./operations.generated");
7
+ const BASE_URL = 'https://api.astroway.info/v1';
8
+ let specCache = null;
9
+ const SPEC_TTL_MS = 30 * 60 * 1000;
10
+ function toValue(raw, type) {
11
+ if (raw === null || raw === undefined || raw === '')
12
+ return undefined;
13
+ if ((type === 'object' || type === 'array') && typeof raw === 'string') {
14
+ try {
15
+ return JSON.parse(raw);
16
+ }
17
+ catch {
18
+ return raw;
19
+ }
20
+ }
21
+ if (type === 'number' && typeof raw === 'string') {
22
+ const n = Number(raw);
23
+ return Number.isNaN(n) ? raw : n;
24
+ }
25
+ if (type === 'boolean' && typeof raw === 'string')
26
+ return raw === 'true';
27
+ return raw;
28
+ }
29
+ function apiError(error) {
30
+ var _a, _b, _c, _d, _e;
31
+ const e = error;
32
+ for (const raw of [(_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.body, (_b = e === null || e === void 0 ? void 0 : e.response) === null || _b === void 0 ? void 0 : _b.data, (_d = (_c = e === null || e === void 0 ? void 0 : e.cause) === null || _c === void 0 ? void 0 : _c.response) === null || _d === void 0 ? void 0 : _d.data]) {
33
+ const body = typeof raw === 'string' ? safeJson(raw) : raw;
34
+ const inner = body === null || body === void 0 ? void 0 : body.error;
35
+ if (inner && typeof inner.code === 'string')
36
+ return { code: inner.code, message: String((_e = inner.message) !== null && _e !== void 0 ? _e : '') };
37
+ }
38
+ return undefined;
39
+ }
40
+ function safeJson(text) {
41
+ try {
42
+ return JSON.parse(text);
43
+ }
44
+ catch {
45
+ return undefined;
46
+ }
47
+ }
48
+ class Astroway {
49
+ constructor() {
50
+ this.description = {
51
+ displayName: 'AstroWay',
52
+ name: 'astroway',
53
+ icon: { light: 'file:astroway.svg', dark: 'file:astroway.dark.svg' },
54
+ group: ['transform'],
55
+ version: [1],
56
+ subtitle: '={{$parameter["operation"]}}',
57
+ description: 'Astrology calculations: natal charts, synastry, transits, Vedic, Human Design, BaZi, numerology, tarot and more',
58
+ defaults: { name: 'AstroWay' },
59
+ usableAsTool: true,
60
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
61
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
62
+ credentials: [{ name: 'astrowayApi', required: true }],
63
+ properties: [
64
+ operations_generated_1.resourceProperty,
65
+ ...operations_generated_1.operationProperties,
66
+ {
67
+ displayName: 'Fields',
68
+ name: 'fields',
69
+ type: 'resourceMapper',
70
+ noDataExpression: true,
71
+ default: { mappingMode: 'defineBelow', value: null },
72
+ required: true,
73
+ typeOptions: {
74
+ loadOptionsDependsOn: ['resource', 'operation'],
75
+ resourceMapper: {
76
+ resourceMapperMethod: 'getOperationFields',
77
+ mode: 'add',
78
+ addAllFields: false,
79
+ supportAutoMap: false,
80
+ fieldWords: { singular: 'field', plural: 'fields' },
81
+ },
82
+ },
83
+ },
84
+ ],
85
+ };
86
+ this.methods = {
87
+ resourceMapping: {
88
+ async getOperationFields() {
89
+ const value = this.getNodeParameter('operation', '');
90
+ const op = operations_generated_1.ROUTES[value];
91
+ if (!op)
92
+ return { fields: [], emptyFieldsNotice: 'Pick an operation first' };
93
+ if (!specCache || Date.now() - specCache.at > SPEC_TTL_MS) {
94
+ const spec = await this.helpers.httpRequest({ method: 'GET', url: fields_1.SPEC_URL, json: true });
95
+ specCache = { at: Date.now(), spec };
96
+ }
97
+ const fields = (0, fields_1.operationFields)(specCache.spec, op);
98
+ return { fields, emptyFieldsNotice: 'This operation takes no fields' };
99
+ },
100
+ },
101
+ };
102
+ }
103
+ async execute() {
104
+ var _a, _b;
105
+ const items = this.getInputData();
106
+ const out = [];
107
+ for (let i = 0; i < items.length; i++) {
108
+ try {
109
+ const value = this.getNodeParameter('operation', i);
110
+ const op = operations_generated_1.ROUTES[value];
111
+ if (!op) {
112
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation "${value}"`, { itemIndex: i });
113
+ }
114
+ const mapper = this.getNodeParameter('fields', i, null);
115
+ const types = new Map(((_a = mapper === null || mapper === void 0 ? void 0 : mapper.schema) !== null && _a !== void 0 ? _a : []).map((f) => [f.id, f.type]));
116
+ let path = op.path;
117
+ const qs = {};
118
+ const body = {};
119
+ for (const [id, raw] of Object.entries((_b = mapper === null || mapper === void 0 ? void 0 : mapper.value) !== null && _b !== void 0 ? _b : {})) {
120
+ const v = toValue(raw, types.get(id));
121
+ if (v === undefined)
122
+ continue;
123
+ if (id.startsWith(fields_1.QUERY_PREFIX))
124
+ qs[id.slice(fields_1.QUERY_PREFIX.length)] = v;
125
+ else if (op.pathParams.includes(id))
126
+ path = path.replace(`{${id}}`, encodeURIComponent(String(v)));
127
+ else if (op.query.includes(id))
128
+ qs[id] = v;
129
+ else
130
+ body[id] = v;
131
+ }
132
+ const missing = path.match(/\{([^}]+)\}/);
133
+ if (missing) {
134
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Field "${missing[1]}" is required`, { itemIndex: i });
135
+ }
136
+ const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'astrowayApi', {
137
+ method: op.method,
138
+ url: `${BASE_URL}${path}`,
139
+ qs,
140
+ body: op.hasBody ? body : undefined,
141
+ json: true,
142
+ }));
143
+ const data = (response === null || response === void 0 ? void 0 : response.ok) === true && response.data !== undefined ? response.data : response;
144
+ const json = Array.isArray(data) ? { items: data } : data;
145
+ out.push({ json, pairedItem: { item: i } });
146
+ }
147
+ catch (error) {
148
+ const api = apiError(error);
149
+ if (this.continueOnFail()) {
150
+ const json = api ? { error: api.message, code: api.code } : { error: error.message };
151
+ out.push({ json, pairedItem: { item: i } });
152
+ continue;
153
+ }
154
+ if (error instanceof n8n_workflow_1.NodeOperationError)
155
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
156
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
157
+ itemIndex: i,
158
+ ...(api ? { message: `${api.code}: ${api.message}`, description: `AstroWay API error ${api.code}` } : {}),
159
+ });
160
+ }
161
+ }
162
+ return [out];
163
+ }
164
+ }
165
+ exports.Astroway = Astroway;
166
+ //# sourceMappingURL=Astroway.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Astroway.node.js","sourceRoot":"","sources":["../../../nodes/Astroway/Astroway.node.ts"],"names":[],"mappings":";;;AAYA,+CAAqF;AACrF,qCAAmE;AACnE,iEAAuF;AAEvF,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAGhD,IAAI,SAAS,GAAuE,IA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AO,EAAE,EAAE,KAAmB,EAAE;oBAC3D,SAAS,EAAE,CAAC;oBACZ,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACzG,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACD;AAjHD,4BAiHC"}
@@ -0,0 +1,10 @@
1
+ {
2
+ "node": "@astroway/n8n-nodes-astroway.astroway",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Data & Storage", "Utility"],
6
+ "resources": {
7
+ "credentialDocumentation": [{ "url": "https://api.astroway.info/en/authentication/" }],
8
+ "primaryDocumentation": [{ "url": "https://github.com/astroway/n8n-nodes-astroway#readme" }]
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
2
+ <g stroke="#38bdf8" fill="#38bdf8">
3
+ <rect x="5" y="5" width="30" height="30" rx="3" fill="none" stroke-width="1.8"/>
4
+ <circle cx="20" cy="20" r="10" fill="none" stroke-width="1.8" opacity="0.5" stroke-dasharray="2.4 2.4"/>
5
+ <circle cx="20" cy="10" r="2"/>
6
+ <circle cx="30" cy="20" r="2"/>
7
+ <circle cx="20" cy="30" r="2"/>
8
+ <circle cx="10" cy="20" r="2"/>
9
+ <circle cx="20" cy="20" r="2.5" opacity="0.85"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" fill="none">
2
+ <g stroke="#0b5fbf" fill="#0b5fbf">
3
+ <rect x="5" y="5" width="30" height="30" rx="3" fill="none" stroke-width="1.8"/>
4
+ <circle cx="20" cy="20" r="10" fill="none" stroke-width="1.8" opacity="0.5" stroke-dasharray="2.4 2.4"/>
5
+ <circle cx="20" cy="10" r="2"/>
6
+ <circle cx="30" cy="20" r="2"/>
7
+ <circle cx="20" cy="30" r="2"/>
8
+ <circle cx="10" cy="20" r="2"/>
9
+ <circle cx="20" cy="20" r="2.5" opacity="0.85"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,37 @@
1
+ import type { ResourceMapperField } from 'n8n-workflow';
2
+ import type { AstrowayRoute } from './operations.generated';
3
+ export declare const SPEC_URL = "https://api.astroway.info/v1/openapi.json";
4
+ export declare const QUERY_PREFIX = "query:";
5
+ type Schema = {
6
+ $ref?: string;
7
+ type?: string | string[];
8
+ enum?: unknown[];
9
+ properties?: Record<string, Schema>;
10
+ required?: string[];
11
+ allOf?: Schema[];
12
+ anyOf?: Schema[];
13
+ oneOf?: Schema[];
14
+ items?: Schema;
15
+ default?: unknown;
16
+ nullable?: boolean;
17
+ };
18
+ type Parameter = {
19
+ $ref?: string;
20
+ in?: string;
21
+ name?: string;
22
+ required?: boolean;
23
+ schema?: Schema;
24
+ };
25
+ type Spec = {
26
+ components?: Record<string, Record<string, unknown>>;
27
+ paths: Record<string, Record<string, {
28
+ parameters?: Parameter[];
29
+ requestBody?: unknown;
30
+ }>>;
31
+ };
32
+ export declare function bodyProperties(spec: Spec, raw: Schema | undefined): {
33
+ properties: Record<string, Schema>;
34
+ required: Set<string>;
35
+ };
36
+ export declare function operationFields(spec: Spec, op: AstrowayRoute): ResourceMapperField[];
37
+ export {};
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QUERY_PREFIX = exports.SPEC_URL = void 0;
4
+ exports.bodyProperties = bodyProperties;
5
+ exports.operationFields = operationFields;
6
+ exports.SPEC_URL = 'https://api.astroway.info/v1/openapi.json';
7
+ exports.QUERY_PREFIX = 'query:';
8
+ function deref(spec, node) {
9
+ let current = node;
10
+ for (let i = 0; i < 10 && current && current.$ref; i++) {
11
+ const parts = current.$ref.replace('#/', '').split('/');
12
+ current = parts.reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], spec);
13
+ }
14
+ return current;
15
+ }
16
+ function bodyProperties(spec, raw) {
17
+ var _a, _b, _c, _d, _e, _f;
18
+ const schema = deref(spec, raw);
19
+ if (!schema)
20
+ return { properties: {}, required: new Set() };
21
+ const properties = {};
22
+ let required = new Set((_a = schema.required) !== null && _a !== void 0 ? _a : []);
23
+ for (const [name, prop] of Object.entries((_b = schema.properties) !== null && _b !== void 0 ? _b : {}))
24
+ properties[name] = (_c = deref(spec, prop)) !== null && _c !== void 0 ? _c : {};
25
+ for (const part of (_d = schema.allOf) !== null && _d !== void 0 ? _d : []) {
26
+ const inner = bodyProperties(spec, part);
27
+ Object.assign(properties, inner.properties);
28
+ for (const r of inner.required)
29
+ required.add(r);
30
+ }
31
+ const branches = (_e = schema.anyOf) !== null && _e !== void 0 ? _e : schema.oneOf;
32
+ if (branches === null || branches === void 0 ? void 0 : branches.length) {
33
+ let common;
34
+ for (const branch of branches) {
35
+ const inner = bodyProperties(spec, branch);
36
+ for (const [name, prop] of Object.entries(inner.properties))
37
+ (_f = properties[name]) !== null && _f !== void 0 ? _f : (properties[name] = prop);
38
+ common = common === undefined ? [...inner.required] : common.filter((r) => inner.required.has(r));
39
+ }
40
+ required = new Set([...required, ...(common !== null && common !== void 0 ? common : [])]);
41
+ }
42
+ return { properties, required };
43
+ }
44
+ function fieldType(schema) {
45
+ var _a;
46
+ if ((_a = schema.enum) === null || _a === void 0 ? void 0 : _a.length) {
47
+ const options = schema.enum.map((v) => ({
48
+ name: String(v),
49
+ value: v,
50
+ }));
51
+ return { type: 'options', options };
52
+ }
53
+ const type = Array.isArray(schema.type) ? schema.type.find((t) => t !== 'null') : schema.type;
54
+ if (type === 'integer' || type === 'number')
55
+ return { type: 'number' };
56
+ if (type === 'boolean')
57
+ return { type: 'boolean' };
58
+ if (type === 'array')
59
+ return { type: 'array' };
60
+ if (type === 'object' || schema.properties || schema.allOf || schema.anyOf || schema.oneOf)
61
+ return { type: 'object' };
62
+ return { type: 'string' };
63
+ }
64
+ function field(id, displayName, schema, required) {
65
+ return {
66
+ id,
67
+ displayName,
68
+ required,
69
+ defaultMatch: false,
70
+ canBeUsedToMatch: false,
71
+ display: true,
72
+ ...fieldType(schema),
73
+ };
74
+ }
75
+ function operationFields(spec, op) {
76
+ var _a, _b, _c, _d, _e, _f;
77
+ const item = spec.paths[op.path];
78
+ const raw = item === null || item === void 0 ? void 0 : item[op.method.toLowerCase()];
79
+ if (!item || !raw)
80
+ return [];
81
+ const params = [...((_a = (item.parameters)) !== null && _a !== void 0 ? _a : []), ...((_b = raw.parameters) !== null && _b !== void 0 ? _b : [])]
82
+ .map((p) => deref(spec, p))
83
+ .filter((p) => Boolean(p === null || p === void 0 ? void 0 : p.name));
84
+ const fields = [];
85
+ for (const p of params.filter((x) => x.in === 'path')) {
86
+ fields.push(field(p.name, p.name, (_c = deref(spec, p.schema)) !== null && _c !== void 0 ? _c : {}, true));
87
+ }
88
+ const body = deref(spec, raw.requestBody);
89
+ const json = (_e = (_d = body === null || body === void 0 ? void 0 : body.content) === null || _d === void 0 ? void 0 : _d['application/json']) === null || _e === void 0 ? void 0 : _e.schema;
90
+ const { properties, required } = bodyProperties(spec, json);
91
+ for (const [name, schema] of Object.entries(properties)) {
92
+ fields.push(field(name, name, schema, required.has(name)));
93
+ }
94
+ for (const p of params.filter((x) => x.in === 'query')) {
95
+ const clash = p.name in properties;
96
+ fields.push(field(clash ? `${exports.QUERY_PREFIX}${p.name}` : p.name, clash ? `${p.name} (query)` : p.name, (_f = deref(spec, p.schema)) !== null && _f !== void 0 ? _f : {}, Boolean(p.required)));
97
+ }
98
+ return fields;
99
+ }
100
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../nodes/Astroway/fields.ts"],"names":[],"mappings":";;;A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6
+ pathParams: string[];
7
+ hasBody: boolean;
8
+ }
9
+ export declare const resourceProperty: INodeProperties;
10
+ export declare const operationProperties: INodeProperties[];
11
+ export declare const ROUTES: Record<string, AstrowayRoute>;