@ac-codeprod/n8n-nodes-alexa-remote 0.2.3
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 +21 -0
- package/README.fr.md +300 -0
- package/README.md +300 -0
- package/dist/credentials/AlexaRemoteApi.credentials.d.ts +9 -0
- package/dist/credentials/AlexaRemoteApi.credentials.js +162 -0
- package/dist/credentials/AlexaRemoteApi.credentials.js.map +1 -0
- package/dist/credentials/alexa.svg +15 -0
- package/dist/nodes/AlexaRemote/AlexaRemote.node.d.ts +18 -0
- package/dist/nodes/AlexaRemote/AlexaRemote.node.js +330 -0
- package/dist/nodes/AlexaRemote/AlexaRemote.node.js.map +1 -0
- package/dist/nodes/AlexaRemote/AlexaRemote.node.json +18 -0
- package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.d.ts +5 -0
- package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.js +131 -0
- package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.js.map +1 -0
- package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.json +18 -0
- package/dist/nodes/AlexaRemote/alexa.svg +15 -0
- package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.d.ts +57 -0
- package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.js +667 -0
- package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.js.map +1 -0
- package/dist/nodes/AlexaRemote/lib/cookie-crypto.d.ts +2 -0
- package/dist/nodes/AlexaRemote/lib/cookie-crypto.js +65 -0
- package/dist/nodes/AlexaRemote/lib/cookie-crypto.js.map +1 -0
- package/dist/nodes/AlexaRemote/lib/helpers.d.ts +14 -0
- package/dist/nodes/AlexaRemote/lib/helpers.js +174 -0
- package/dist/nodes/AlexaRemote/lib/helpers.js.map +1 -0
- package/dist/nodes/AlexaRemote/lib/types.d.ts +208 -0
- package/dist/nodes/AlexaRemote/lib/types.js +3 -0
- package/dist/nodes/AlexaRemote/lib/types.js.map +1 -0
- package/dist/nodes/AlexaRemote/properties/index.d.ts +14 -0
- package/dist/nodes/AlexaRemote/properties/index.js +90 -0
- package/dist/nodes/AlexaRemote/properties/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/account/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/account/index.js +56 -0
- package/dist/nodes/AlexaRemote/resources/account/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/auth/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/auth/index.js +108 -0
- package/dist/nodes/AlexaRemote/resources/auth/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/bluetooth/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/bluetooth/index.js +108 -0
- package/dist/nodes/AlexaRemote/resources/bluetooth/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/conversation/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/conversation/index.js +86 -0
- package/dist/nodes/AlexaRemote/resources/conversation/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/device/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/device/index.js +164 -0
- package/dist/nodes/AlexaRemote/resources/device/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/interaction/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/interaction/index.js +365 -0
- package/dist/nodes/AlexaRemote/resources/interaction/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/list/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/list/index.js +142 -0
- package/dist/nodes/AlexaRemote/resources/list/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/notification/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/notification/index.js +146 -0
- package/dist/nodes/AlexaRemote/resources/notification/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/routine/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/routine/index.js +49 -0
- package/dist/nodes/AlexaRemote/resources/routine/index.js.map +1 -0
- package/dist/nodes/AlexaRemote/resources/smarthome/index.d.ts +4 -0
- package/dist/nodes/AlexaRemote/resources/smarthome/index.js +92 -0
- package/dist/nodes/AlexaRemote/resources/smarthome/index.js.map +1 -0
- package/dist/package.json +71 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlexaRemoteApi = void 0;
|
|
4
|
+
class AlexaRemoteApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
var _a;
|
|
7
|
+
this.name = 'alexaRemoteApi';
|
|
8
|
+
this.displayName = 'Alexa Remote API';
|
|
9
|
+
this.testedBy = 'alexaRemoteApiTest';
|
|
10
|
+
this.icon = 'file:alexa.svg';
|
|
11
|
+
this.documentationUrl = 'https://github.com/AC-CodeProd/n8n-nodes-alexa-remote';
|
|
12
|
+
this.properties = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Proxy IP',
|
|
15
|
+
name: 'proxyOwnIp',
|
|
16
|
+
type: 'string',
|
|
17
|
+
default: 'localhost',
|
|
18
|
+
description: 'IP address of your n8n server (for proxy authentication)',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Proxy Port',
|
|
22
|
+
name: 'proxyPort',
|
|
23
|
+
type: 'number',
|
|
24
|
+
default: 3456,
|
|
25
|
+
description: 'Port for proxy authentication',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Cookie File Path',
|
|
29
|
+
name: 'cookieFile',
|
|
30
|
+
type: 'string',
|
|
31
|
+
default: `${(_a = process.env.N8N_USER_FOLDER) !== null && _a !== void 0 ? _a : '/home/node/.n8n'}/.alexa-cookie.json`,
|
|
32
|
+
placeholder: '/home/node/.n8n/.alexa-cookie.json',
|
|
33
|
+
description: 'Absolute path where the Amazon authentication cookie is stored on disk. Defaults to the n8n data directory (N8N_USER_FOLDER). The file is encrypted with AES-256-GCM when N8N_ENCRYPTION_KEY is set (recommended for production). Restrict directory permissions to the n8n process only (chmod 700).',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Amazon Service Host',
|
|
37
|
+
name: 'alexaServiceHost',
|
|
38
|
+
type: 'options',
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'USA (pitangui.amazon.com)',
|
|
42
|
+
value: 'pitangui.amazon.com',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'UK (alexa.amazon.co.uk)',
|
|
46
|
+
value: 'alexa.amazon.co.uk',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Germany (layla.amazon.de)',
|
|
50
|
+
value: 'layla.amazon.de',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'France (layla.amazon.de)',
|
|
54
|
+
value: 'layla.amazon.de',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Italy (alexa.amazon.it)',
|
|
58
|
+
value: 'alexa.amazon.it',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'Australia (alexa.amazon.com.au)',
|
|
62
|
+
value: 'alexa.amazon.com.au',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Spain (alexa.amazon.es)',
|
|
66
|
+
value: 'alexa.amazon.es',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Brazil (alexa.amazon.com.br)',
|
|
70
|
+
value: 'alexa.amazon.com.br',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
default: 'pitangui.amazon.com',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayName: 'Amazon Page',
|
|
77
|
+
name: 'amazonPage',
|
|
78
|
+
type: 'options',
|
|
79
|
+
options: [
|
|
80
|
+
{
|
|
81
|
+
name: 'amazon.com (USA)',
|
|
82
|
+
value: 'amazon.com',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'amazon.co.uk (UK)',
|
|
86
|
+
value: 'amazon.co.uk',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'amazon.de (Germany)',
|
|
90
|
+
value: 'amazon.de',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'amazon.fr (France)',
|
|
94
|
+
value: 'amazon.fr',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'amazon.it (Italy)',
|
|
98
|
+
value: 'amazon.it',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'amazon.es (Spain)',
|
|
102
|
+
value: 'amazon.es',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'amazon.com.au (Australia)',
|
|
106
|
+
value: 'amazon.com.au',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'amazon.com.br (Brazil)',
|
|
110
|
+
value: 'amazon.com.br',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
default: 'amazon.com',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Language',
|
|
117
|
+
name: 'acceptLanguage',
|
|
118
|
+
type: 'options',
|
|
119
|
+
options: [
|
|
120
|
+
{
|
|
121
|
+
name: 'English (US)',
|
|
122
|
+
value: 'en-US',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'English (UK)',
|
|
126
|
+
value: 'en-GB',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'German',
|
|
130
|
+
value: 'de-DE',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'French',
|
|
134
|
+
value: 'de-DE',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'Italian',
|
|
138
|
+
value: 'it-IT',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'Spanish',
|
|
142
|
+
value: 'es-ES',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Portuguese (BR)',
|
|
146
|
+
value: 'pt-BR',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
default: 'en-US',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Refresh Interval (Days)',
|
|
153
|
+
name: 'refreshInterval',
|
|
154
|
+
type: 'number',
|
|
155
|
+
default: 3,
|
|
156
|
+
description: 'Auto-refresh cookie interval in days',
|
|
157
|
+
},
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.AlexaRemoteApi = AlexaRemoteApi;
|
|
162
|
+
//# sourceMappingURL=AlexaRemoteApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlexaRemoteApi.credentials.js","sourceRoot":"","sources":["../../credentials/AlexaRemoteApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IAA3B;;QACE,SAAI,GAAG,gBAAgB,CAAC;QAExB,gBAAW,GAAG,kBAAkB,CAAC;QAEjC,aAAQ,GAAG,oBAAoB,CAAC;QAEhC,SAAI,GAAG,gBAAyB,CAAC;QAEjC,qBAAgB,GAAG,uDAAuD,CAAC;QAE3E,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,0DAA0D;aACxE;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,+BAA+B;aAC7C;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,eAAe,mCAAI,iBA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AK,EAAE,WAAW;qBACnB;oBACD;wBACE,IAAI,EAAE,2BAA2B;wBACjC,KAAK,EAAE,eAAe;qBACvB;oBACD;wBACE,IAAI,EAAE,wBAAwB;wBAC9B,KAAK,EAAE,eAAe;qBACvB;iBACF;gBACD,OAAO,EAAE,YAAY;aACtB;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,cAAc;wBACpB,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,IAAI,EAAE,iBAAiB;wBACvB,KAAK,EAAE,OAAO;qBACf;iBACF;gBACD,OAAO,EAAE,OAAO;aACjB;YAED;gBACE,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,sCAAsC;aACpD;SACF,CAAC;IACJ,CAAC;CAAA;AAjKD,wCAiKC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" fill="none">
|
|
2
|
+
<!-- Background -->
|
|
3
|
+
<circle cx="30" cy="30" r="30" fill="#1a2a3a"/>
|
|
4
|
+
<!-- Ring shadow -->
|
|
5
|
+
<circle cx="30" cy="30" r="21" fill="none" stroke="#0a1520" stroke-width="8"/>
|
|
6
|
+
<!-- Main Alexa ring -->
|
|
7
|
+
<circle cx="30" cy="30" r="21" fill="none" stroke="#00C2E0" stroke-width="5"/>
|
|
8
|
+
<!-- Top-left highlight arc -->
|
|
9
|
+
<path d="M 13.5 20 A 19 19 0 0 1 30 11" fill="none" stroke="#5DE8FF" stroke-width="2.5" stroke-linecap="round" opacity="0.7"/>
|
|
10
|
+
<!-- Bottom glow arc -->
|
|
11
|
+
<path d="M 14 38 A 18 18 0 0 0 46 38" fill="none" stroke="#00E5FF" stroke-width="2.5" stroke-linecap="round" opacity="0.5"/>
|
|
12
|
+
<!-- Center dot -->
|
|
13
|
+
<circle cx="30" cy="30" r="5" fill="#00C2E0"/>
|
|
14
|
+
<circle cx="30" cy="30" r="2.5" fill="#7FF0FF"/>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ICredentialTestFunctions, ICredentialsDecrypted, IExecuteFunctions, ILoadOptionsFunctions, INodeCredentialTestResult, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class AlexaRemote implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getEchoDevices(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
getRoutinesList(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
8
|
+
getSmarthomeEntities(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
9
|
+
getNotificationsList(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
10
|
+
getAlexaLists(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
11
|
+
getAlexaListItems(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
12
|
+
};
|
|
13
|
+
credentialTest: {
|
|
14
|
+
alexaRemoteApiTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AlexaRemote = void 0;
|
|
37
|
+
const node_fs_1 = require("node:fs");
|
|
38
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
39
|
+
const alexa_remote_ext_1 = require("./lib/alexa-remote-ext");
|
|
40
|
+
const cookie_crypto_1 = require("./lib/cookie-crypto");
|
|
41
|
+
const properties_1 = __importStar(require("./properties"));
|
|
42
|
+
const CACHE_TTL = 5 * 60 * 1000;
|
|
43
|
+
const deviceOptionsCache = new Map();
|
|
44
|
+
const routineOptionsCache = new Map();
|
|
45
|
+
function getCacheKey(credentials) {
|
|
46
|
+
var _a;
|
|
47
|
+
return `${credentials.alexaServiceHost}|${credentials.amazonPage}|${(_a = credentials.cookieFile) !== null && _a !== void 0 ? _a : ''}`;
|
|
48
|
+
}
|
|
49
|
+
class AlexaRemote {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.description = {
|
|
52
|
+
displayName: 'Alexa Remote',
|
|
53
|
+
name: 'alexaRemote',
|
|
54
|
+
icon: 'file:alexa.svg',
|
|
55
|
+
group: ['transform'],
|
|
56
|
+
version: 1,
|
|
57
|
+
usableAsTool: true,
|
|
58
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
59
|
+
description: 'Interact with Amazon Alexa API',
|
|
60
|
+
defaults: {
|
|
61
|
+
name: 'Alexa Remote',
|
|
62
|
+
},
|
|
63
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
64
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
65
|
+
credentials: [
|
|
66
|
+
{
|
|
67
|
+
name: 'alexaRemoteApi',
|
|
68
|
+
required: true,
|
|
69
|
+
testedBy: 'alexaRemoteApiTest',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
properties: properties_1.default,
|
|
73
|
+
};
|
|
74
|
+
this.methods = {
|
|
75
|
+
loadOptions: {
|
|
76
|
+
async getEchoDevices() {
|
|
77
|
+
try {
|
|
78
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
79
|
+
const creds = credentials;
|
|
80
|
+
const key = getCacheKey(creds);
|
|
81
|
+
const cached = deviceOptionsCache.get(key);
|
|
82
|
+
if (cached && Date.now() - cached.ts < CACHE_TTL)
|
|
83
|
+
return cached.data;
|
|
84
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(creds);
|
|
85
|
+
const [devices, groups] = await Promise.all([
|
|
86
|
+
alexa.getDevices(),
|
|
87
|
+
alexa.getMultiRoomGroups().catch(() => []),
|
|
88
|
+
]);
|
|
89
|
+
alexa.disconnect();
|
|
90
|
+
const deviceOptions = devices.map((d) => ({
|
|
91
|
+
name: `${d.accountName} (${d.deviceFamily})`,
|
|
92
|
+
value: d.serialNumber,
|
|
93
|
+
}));
|
|
94
|
+
const groupOptions = groups.map((g) => ({
|
|
95
|
+
name: `[Group] ${g.name}`,
|
|
96
|
+
value: g.id,
|
|
97
|
+
}));
|
|
98
|
+
const data = [...deviceOptions, ...groupOptions];
|
|
99
|
+
deviceOptionsCache.set(key, { data, ts: Date.now() });
|
|
100
|
+
return data;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
async getRoutinesList() {
|
|
107
|
+
try {
|
|
108
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
109
|
+
const creds = credentials;
|
|
110
|
+
const key = getCacheKey(creds);
|
|
111
|
+
const cached = routineOptionsCache.get(key);
|
|
112
|
+
if (cached && Date.now() - cached.ts < CACHE_TTL)
|
|
113
|
+
return cached.data;
|
|
114
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(creds);
|
|
115
|
+
const routines = await alexa.getAutomationRoutines();
|
|
116
|
+
alexa.disconnect();
|
|
117
|
+
const data = routines
|
|
118
|
+
.filter((r) => r.automationId)
|
|
119
|
+
.map((r) => ({
|
|
120
|
+
name: r.name || r.automationId,
|
|
121
|
+
value: r.automationId,
|
|
122
|
+
}));
|
|
123
|
+
routineOptionsCache.set(key, { data, ts: Date.now() });
|
|
124
|
+
return data;
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
async getSmarthomeEntities() {
|
|
131
|
+
try {
|
|
132
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
133
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(credentials);
|
|
134
|
+
const entities = await alexa.getSmarthomeDevices();
|
|
135
|
+
alexa.disconnect();
|
|
136
|
+
return entities
|
|
137
|
+
.filter((e) => e.friendlyName)
|
|
138
|
+
.map((e) => {
|
|
139
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
140
|
+
const id = ((_d = (_c = (_b = (_a = e.legacyAppliance) === null || _a === void 0 ? void 0 : _a.applianceId) !== null && _b !== void 0 ? _b : e.applianceId) !== null && _c !== void 0 ? _c : e.endpointId) !== null && _d !== void 0 ? _d : e.id);
|
|
141
|
+
const desc = (_g = (_f = (_e = e.legacyAppliance) === null || _e === void 0 ? void 0 : _e.friendlyDescription) !== null && _f !== void 0 ? _f : e.friendlyDescription) !== null && _g !== void 0 ? _g : '';
|
|
142
|
+
return {
|
|
143
|
+
name: e.friendlyName,
|
|
144
|
+
value: id,
|
|
145
|
+
description: desc,
|
|
146
|
+
};
|
|
147
|
+
})
|
|
148
|
+
.filter((e) => e.value);
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
async getNotificationsList() {
|
|
155
|
+
try {
|
|
156
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
157
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(credentials);
|
|
158
|
+
const notifications = await alexa.getNotifications();
|
|
159
|
+
alexa.disconnect();
|
|
160
|
+
return notifications.map((n) => {
|
|
161
|
+
var _a;
|
|
162
|
+
const label = (_a = n.reminderLabel) !== null && _a !== void 0 ? _a : `[${n.type}]`;
|
|
163
|
+
const date = n.alarmTime ? new Date(n.alarmTime).toLocaleString() : '?';
|
|
164
|
+
return {
|
|
165
|
+
name: `${label} — ${date}`,
|
|
166
|
+
value: n.id,
|
|
167
|
+
description: `Device: ${n.deviceSerialNumber} | Status: ${n.status}`,
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
async getAlexaLists() {
|
|
176
|
+
try {
|
|
177
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
178
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(credentials);
|
|
179
|
+
const lists = await alexa.getLists();
|
|
180
|
+
alexa.disconnect();
|
|
181
|
+
return lists.map((l) => {
|
|
182
|
+
var _a;
|
|
183
|
+
return ({
|
|
184
|
+
name: l.listName || l.name || l.listType || l.listId,
|
|
185
|
+
value: `${l.listId}|${(_a = l.version) !== null && _a !== void 0 ? _a : 1}`,
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
async getAlexaListItems() {
|
|
194
|
+
try {
|
|
195
|
+
const listRaw = this.getCurrentNodeParameter('listId');
|
|
196
|
+
if (!listRaw)
|
|
197
|
+
return [{ name: '— Select a List First —', value: '' }];
|
|
198
|
+
const [listId] = listRaw.split('|');
|
|
199
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
200
|
+
const alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(credentials);
|
|
201
|
+
const items = await alexa.getListItems(listId);
|
|
202
|
+
alexa.disconnect();
|
|
203
|
+
return items
|
|
204
|
+
.filter((i) => !i.completed)
|
|
205
|
+
.map((i) => ({
|
|
206
|
+
name: i.value,
|
|
207
|
+
value: `${i.id}|${i.version}`,
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
catch {
|
|
211
|
+
return [{ name: '— Run Auth → Authenticate First —', value: '' }];
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
credentialTest: {
|
|
216
|
+
async alexaRemoteApiTest(credential) {
|
|
217
|
+
const creds = credential.data;
|
|
218
|
+
const cookiePath = creds.cookieFile;
|
|
219
|
+
if (!cookiePath) {
|
|
220
|
+
return {
|
|
221
|
+
status: 'Error',
|
|
222
|
+
message: 'Cookie File Path is required',
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if ((0, node_fs_1.existsSync)(cookiePath)) {
|
|
226
|
+
try {
|
|
227
|
+
JSON.parse((0, cookie_crypto_1.readCookieFile)(cookiePath));
|
|
228
|
+
return {
|
|
229
|
+
status: 'OK',
|
|
230
|
+
message: `Cookie file found and valid at: ${cookiePath}`,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
return {
|
|
235
|
+
status: 'Error',
|
|
236
|
+
message: `Cookie file at "${cookiePath}" is not valid JSON`,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
status: 'Error',
|
|
242
|
+
message: `No cookie file found at "${cookiePath}". Run Auth → Authenticate first.`,
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
async execute() {
|
|
249
|
+
const items = this.getInputData();
|
|
250
|
+
const returnData = [];
|
|
251
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
252
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
253
|
+
const credentials = await this.getCredentials('alexaRemoteApi');
|
|
254
|
+
if (resource === 'auth') {
|
|
255
|
+
return await properties_1.auth.execute.call(this, credentials);
|
|
256
|
+
}
|
|
257
|
+
properties_1.auth.guardCookieFile.call(this, credentials);
|
|
258
|
+
let alexa;
|
|
259
|
+
try {
|
|
260
|
+
alexa = await (0, alexa_remote_ext_1.createAlexaFromCredentials)(credentials, false);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
264
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Alexa initialization failed: ${message}`, {
|
|
265
|
+
description: 'Ensure your cookie file is valid and not expired. Run “Auth → Authenticate” to refresh your session.',
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
269
|
+
try {
|
|
270
|
+
let responseData;
|
|
271
|
+
const creds = credentials;
|
|
272
|
+
if (resource === 'interaction') {
|
|
273
|
+
responseData = await properties_1.interaction.execute.call(this, alexa, operation, itemIndex, creds);
|
|
274
|
+
}
|
|
275
|
+
else if (resource === 'routine') {
|
|
276
|
+
responseData = await properties_1.routine.execute.call(this, alexa, operation, itemIndex);
|
|
277
|
+
}
|
|
278
|
+
else if (resource === 'device') {
|
|
279
|
+
responseData = await properties_1.device.execute.call(this, alexa, operation, itemIndex);
|
|
280
|
+
}
|
|
281
|
+
else if (resource === 'account') {
|
|
282
|
+
responseData = await properties_1.account.execute.call(this, alexa, operation);
|
|
283
|
+
}
|
|
284
|
+
else if (resource === 'smarthome') {
|
|
285
|
+
responseData = await properties_1.smarthome.execute.call(this, alexa, operation, itemIndex);
|
|
286
|
+
}
|
|
287
|
+
else if (resource === 'notification') {
|
|
288
|
+
responseData = await properties_1.notification.execute.call(this, alexa, operation, itemIndex);
|
|
289
|
+
}
|
|
290
|
+
else if (resource === 'bluetooth') {
|
|
291
|
+
responseData = await properties_1.bluetooth.execute.call(this, alexa, operation, itemIndex);
|
|
292
|
+
}
|
|
293
|
+
else if (resource === 'conversation') {
|
|
294
|
+
responseData = await properties_1.conversation.execute.call(this, alexa, operation, itemIndex);
|
|
295
|
+
}
|
|
296
|
+
else if (resource === 'list') {
|
|
297
|
+
responseData = await properties_1.list.execute.call(this, alexa, operation, itemIndex);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: "${resource}"`);
|
|
301
|
+
}
|
|
302
|
+
if (responseData === null || responseData === undefined) {
|
|
303
|
+
responseData = { success: true };
|
|
304
|
+
}
|
|
305
|
+
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: itemIndex } });
|
|
306
|
+
returnData.push(...executionData);
|
|
307
|
+
}
|
|
308
|
+
catch (error) {
|
|
309
|
+
if (this.continueOnFail()) {
|
|
310
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
311
|
+
returnData.push({
|
|
312
|
+
json: {
|
|
313
|
+
error: message,
|
|
314
|
+
},
|
|
315
|
+
pairedItem: { item: itemIndex },
|
|
316
|
+
});
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
alexa.disconnect();
|
|
320
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
|
|
321
|
+
itemIndex,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
alexa.disconnect();
|
|
326
|
+
return [returnData];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
exports.AlexaRemote = AlexaRemote;
|
|
330
|
+
//# sourceMappingURL=AlexaRemote.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlexaRemote.node.js","sourceRoot":"","sources":["../../../nodes/AlexaRemote/AlexaRemote.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AAarC,+CAAuE;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.0",
|
|
5
|
+
"categories": ["Communication", "Utility"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/AC-CodeProd/n8n-nodes-alexa-remote?tab=readme-ov-file#credentials"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/AC-CodeProd/n8n-nodes-alexa-remote?tab=readme-ov-file"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { INodeType, INodeTypeDescription, ITriggerFunctions, ITriggerResponse } from 'n8n-workflow';
|
|
2
|
+
export declare class AlexaRemoteTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
trigger(this: ITriggerFunctions): Promise<ITriggerResponse | undefined>;
|
|
5
|
+
}
|