@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.
Files changed (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.fr.md +300 -0
  3. package/README.md +300 -0
  4. package/dist/credentials/AlexaRemoteApi.credentials.d.ts +9 -0
  5. package/dist/credentials/AlexaRemoteApi.credentials.js +162 -0
  6. package/dist/credentials/AlexaRemoteApi.credentials.js.map +1 -0
  7. package/dist/credentials/alexa.svg +15 -0
  8. package/dist/nodes/AlexaRemote/AlexaRemote.node.d.ts +18 -0
  9. package/dist/nodes/AlexaRemote/AlexaRemote.node.js +330 -0
  10. package/dist/nodes/AlexaRemote/AlexaRemote.node.js.map +1 -0
  11. package/dist/nodes/AlexaRemote/AlexaRemote.node.json +18 -0
  12. package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.d.ts +5 -0
  13. package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.js +131 -0
  14. package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.js.map +1 -0
  15. package/dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.json +18 -0
  16. package/dist/nodes/AlexaRemote/alexa.svg +15 -0
  17. package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.d.ts +57 -0
  18. package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.js +667 -0
  19. package/dist/nodes/AlexaRemote/lib/alexa-remote-ext.js.map +1 -0
  20. package/dist/nodes/AlexaRemote/lib/cookie-crypto.d.ts +2 -0
  21. package/dist/nodes/AlexaRemote/lib/cookie-crypto.js +65 -0
  22. package/dist/nodes/AlexaRemote/lib/cookie-crypto.js.map +1 -0
  23. package/dist/nodes/AlexaRemote/lib/helpers.d.ts +14 -0
  24. package/dist/nodes/AlexaRemote/lib/helpers.js +174 -0
  25. package/dist/nodes/AlexaRemote/lib/helpers.js.map +1 -0
  26. package/dist/nodes/AlexaRemote/lib/types.d.ts +208 -0
  27. package/dist/nodes/AlexaRemote/lib/types.js +3 -0
  28. package/dist/nodes/AlexaRemote/lib/types.js.map +1 -0
  29. package/dist/nodes/AlexaRemote/properties/index.d.ts +14 -0
  30. package/dist/nodes/AlexaRemote/properties/index.js +90 -0
  31. package/dist/nodes/AlexaRemote/properties/index.js.map +1 -0
  32. package/dist/nodes/AlexaRemote/resources/account/index.d.ts +4 -0
  33. package/dist/nodes/AlexaRemote/resources/account/index.js +56 -0
  34. package/dist/nodes/AlexaRemote/resources/account/index.js.map +1 -0
  35. package/dist/nodes/AlexaRemote/resources/auth/index.d.ts +4 -0
  36. package/dist/nodes/AlexaRemote/resources/auth/index.js +108 -0
  37. package/dist/nodes/AlexaRemote/resources/auth/index.js.map +1 -0
  38. package/dist/nodes/AlexaRemote/resources/bluetooth/index.d.ts +4 -0
  39. package/dist/nodes/AlexaRemote/resources/bluetooth/index.js +108 -0
  40. package/dist/nodes/AlexaRemote/resources/bluetooth/index.js.map +1 -0
  41. package/dist/nodes/AlexaRemote/resources/conversation/index.d.ts +4 -0
  42. package/dist/nodes/AlexaRemote/resources/conversation/index.js +86 -0
  43. package/dist/nodes/AlexaRemote/resources/conversation/index.js.map +1 -0
  44. package/dist/nodes/AlexaRemote/resources/device/index.d.ts +4 -0
  45. package/dist/nodes/AlexaRemote/resources/device/index.js +164 -0
  46. package/dist/nodes/AlexaRemote/resources/device/index.js.map +1 -0
  47. package/dist/nodes/AlexaRemote/resources/interaction/index.d.ts +4 -0
  48. package/dist/nodes/AlexaRemote/resources/interaction/index.js +365 -0
  49. package/dist/nodes/AlexaRemote/resources/interaction/index.js.map +1 -0
  50. package/dist/nodes/AlexaRemote/resources/list/index.d.ts +4 -0
  51. package/dist/nodes/AlexaRemote/resources/list/index.js +142 -0
  52. package/dist/nodes/AlexaRemote/resources/list/index.js.map +1 -0
  53. package/dist/nodes/AlexaRemote/resources/notification/index.d.ts +4 -0
  54. package/dist/nodes/AlexaRemote/resources/notification/index.js +146 -0
  55. package/dist/nodes/AlexaRemote/resources/notification/index.js.map +1 -0
  56. package/dist/nodes/AlexaRemote/resources/routine/index.d.ts +4 -0
  57. package/dist/nodes/AlexaRemote/resources/routine/index.js +49 -0
  58. package/dist/nodes/AlexaRemote/resources/routine/index.js.map +1 -0
  59. package/dist/nodes/AlexaRemote/resources/smarthome/index.d.ts +4 -0
  60. package/dist/nodes/AlexaRemote/resources/smarthome/index.js +92 -0
  61. package/dist/nodes/AlexaRemote/resources/smarthome/index.js.map +1 -0
  62. package/dist/package.json +71 -0
  63. package/dist/tsconfig.tsbuildinfo +1 -0
  64. package/package.json +71 -0
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const helpers_1 = require("../../lib/helpers");
7
+ exports.description = [
8
+ {
9
+ displayName: 'Operation',
10
+ name: 'operation',
11
+ type: 'options',
12
+ noDataExpression: true,
13
+ displayOptions: {
14
+ show: {
15
+ resource: ['notification'],
16
+ },
17
+ },
18
+ options: [
19
+ {
20
+ name: 'Get Notifications',
21
+ value: 'getNotifications',
22
+ description: 'Get all notifications',
23
+ action: 'Get notifications',
24
+ },
25
+ {
26
+ name: 'Create Notification',
27
+ value: 'createNotification',
28
+ description: 'Create a new notification (alarm, reminder, timer)',
29
+ action: 'Create notification',
30
+ },
31
+ {
32
+ name: 'Delete Notification',
33
+ value: 'deleteNotification',
34
+ description: 'Delete a notification',
35
+ action: 'Delete notification',
36
+ },
37
+ ],
38
+ default: 'getNotifications',
39
+ },
40
+ {
41
+ displayName: 'Device Name or ID',
42
+ name: 'device',
43
+ type: 'options',
44
+ typeOptions: { loadOptionsMethod: 'getEchoDevices' },
45
+ default: '',
46
+ required: true,
47
+ displayOptions: {
48
+ show: {
49
+ resource: ['notification'],
50
+ operation: ['createNotification'],
51
+ },
52
+ },
53
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
54
+ },
55
+ {
56
+ displayName: 'Type',
57
+ name: 'notificationType',
58
+ type: 'options',
59
+ options: [
60
+ { name: 'Alarm', value: 'Alarm' },
61
+ { name: 'Reminder', value: 'Reminder' },
62
+ ],
63
+ default: 'Reminder',
64
+ displayOptions: {
65
+ show: {
66
+ resource: ['notification'],
67
+ operation: ['createNotification'],
68
+ },
69
+ },
70
+ description: 'Type of notification',
71
+ },
72
+ {
73
+ displayName: 'Label',
74
+ name: 'label',
75
+ type: 'string',
76
+ default: '',
77
+ required: true,
78
+ displayOptions: {
79
+ show: {
80
+ resource: ['notification'],
81
+ operation: ['createNotification'],
82
+ },
83
+ },
84
+ description: 'Notification label/message',
85
+ },
86
+ {
87
+ displayName: 'Time',
88
+ name: 'time',
89
+ type: 'dateTime',
90
+ default: '',
91
+ required: true,
92
+ displayOptions: {
93
+ show: {
94
+ resource: ['notification'],
95
+ operation: ['createNotification'],
96
+ },
97
+ },
98
+ description: 'Date and time for the notification',
99
+ },
100
+ {
101
+ displayName: 'Notification Name or ID',
102
+ name: 'notificationId',
103
+ type: 'options',
104
+ typeOptions: { loadOptionsMethod: 'getNotificationsList' },
105
+ default: '',
106
+ required: true,
107
+ displayOptions: {
108
+ show: {
109
+ resource: ['notification'],
110
+ operation: ['deleteNotification'],
111
+ },
112
+ },
113
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
114
+ },
115
+ ];
116
+ async function execute(alexa, operation, itemIndex) {
117
+ if (operation === 'getNotifications') {
118
+ return alexa.getNotifications();
119
+ }
120
+ if (operation === 'createNotification') {
121
+ const device = this.getNodeParameter('device', itemIndex);
122
+ if (!device) {
123
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Device is required — select an Echo device from the dropdown or provide a serial number via an expression.', { itemIndex });
124
+ }
125
+ const notifType = this.getNodeParameter('notificationType', itemIndex);
126
+ const label = this.getNodeParameter('label', itemIndex);
127
+ const time = this.getNodeParameter('time', itemIndex);
128
+ let formattedTime;
129
+ try {
130
+ formattedTime = (0, helpers_1.formatNotificationTime)(time);
131
+ }
132
+ catch {
133
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid notification time: "${time}"`, {
134
+ itemIndex,
135
+ description: 'Use ISO 8601 format, e.g. 2026-03-20T08:00:00.000',
136
+ });
137
+ }
138
+ return alexa.createNotification(device, notifType, label, formattedTime);
139
+ }
140
+ if (operation === 'deleteNotification') {
141
+ const notificationId = this.getNodeParameter('notificationId', itemIndex);
142
+ return alexa.deleteNotification(notificationId);
143
+ }
144
+ return undefined;
145
+ }
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/AlexaRemote/resources/notification/index.ts"],"names":[],"mappings":";;;AAsHA,0BAuCC;AA5JD,+CAAkD;AAGlD,+CAA2D;AAE9C,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,cAAc,CAAC;aAC3B;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,uBAAuB;gBACpC,MAAM,EAAE,mBAAmB;aAC5B;YACD;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,oDAAoD;gBACjE,MAAM,EAAE,qBAAqB;aAC9B;YACD;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,WAAW,EAAE,uBAAuB;gBACpC,MAAM,EAAE,qBAAqB;aAC9B;SACF;QACD,OAAO,EAAE,kBAAkB;KAC5B;IACD;QACE,WAAW,EAAE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,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,+BAA+B,IAAI,GAAG,EAAE;gBACnF,SAAS;gBACT,WAAW,EAAE,mDAAmD;aACjE,CAAC,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,SAAS,KAAK,oBAAoB,EAAE,CAAC;QACvC,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,SAAS,CAAW,CAAC;QACpF,OAAO,KAAK,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow';
2
+ import type { AlexaRemoteExt } from '../../lib/alexa-remote-ext';
3
+ export declare const description: INodeProperties[];
4
+ export declare function execute(this: IExecuteFunctions, alexa: AlexaRemoteExt, operation: string, itemIndex: number): Promise<unknown>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ exports.description = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['routine'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Execute Routine',
19
+ value: 'executeRoutine',
20
+ description: 'Execute an existing Alexa routine',
21
+ action: 'Execute routine',
22
+ },
23
+ ],
24
+ default: 'executeRoutine',
25
+ },
26
+ {
27
+ displayName: 'Routine Name or ID',
28
+ name: 'routineId',
29
+ type: 'options',
30
+ typeOptions: { loadOptionsMethod: 'getRoutinesList' },
31
+ default: '',
32
+ required: true,
33
+ displayOptions: {
34
+ show: {
35
+ resource: ['routine'],
36
+ operation: ['executeRoutine'],
37
+ },
38
+ },
39
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
40
+ },
41
+ ];
42
+ async function execute(alexa, operation, itemIndex) {
43
+ if (operation === 'executeRoutine') {
44
+ const routineId = this.getNodeParameter('routineId', itemIndex);
45
+ return alexa.executeRoutine(routineId);
46
+ }
47
+ return undefined;
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/AlexaRemote/resources/routine/index.ts"],"names":[],"mappings":";;;AA2CA,0BAWC;AAlDY,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;aACtB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,iBAAiB;gBACvB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,mCAAmC;gBAChD,MAAM,EAAE,iBAAiB;aAC1B;SACF;QACD,OAAO,EAAE,gBAAgB;KAC1B;IACD;QACE,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,EAAE,iBAAiB,EAAE,iBAAiB,EAAE;QACrD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC9B;SACF;QACD,WAAW,EACT,gHAAgH;KACnH;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAE3B,KAAqB,EACrB,SAAiB,EACjB,SAAiB;IAEjB,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAW,CAAC;QAC1E,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { INodeProperties, IExecuteFunctions } from 'n8n-workflow';
2
+ import type { AlexaRemoteExt } from '../../lib/alexa-remote-ext';
3
+ export declare const description: INodeProperties[];
4
+ export declare function execute(this: IExecuteFunctions, alexa: AlexaRemoteExt, operation: string, itemIndex: number): Promise<unknown>;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ exports.description = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['smarthome'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Get Devices',
19
+ value: 'getDevices',
20
+ description: 'Get all smart home devices',
21
+ action: 'Get smart home devices',
22
+ },
23
+ {
24
+ name: 'Control Device',
25
+ value: 'controlDevice',
26
+ description: 'Control a smart home device',
27
+ action: 'Control device',
28
+ },
29
+ ],
30
+ default: 'getDevices',
31
+ },
32
+ {
33
+ displayName: 'Entity Name or ID',
34
+ name: 'entity',
35
+ type: 'options',
36
+ typeOptions: { loadOptionsMethod: 'getSmarthomeEntities' },
37
+ default: '',
38
+ required: true,
39
+ displayOptions: {
40
+ show: {
41
+ resource: ['smarthome'],
42
+ operation: ['controlDevice'],
43
+ },
44
+ },
45
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
46
+ },
47
+ {
48
+ displayName: 'Action',
49
+ name: 'action',
50
+ type: 'options',
51
+ options: [
52
+ { name: 'Set Brightness', value: 'setBrightness', action: 'Set brightness of a smarthome device' },
53
+ { name: 'Set Color', value: 'setColor', action: 'Set color of a smarthome device' },
54
+ { name: 'Set Temperature', value: 'setTargetTemperature', action: 'Set temperature of a smarthome device' },
55
+ { name: 'Turn Off', value: 'turnOff', action: 'Turn off a smarthome device' },
56
+ { name: 'Turn On', value: 'turnOn', action: 'Turn on a smarthome device' },
57
+ ],
58
+ default: 'turnOn',
59
+ displayOptions: {
60
+ show: {
61
+ resource: ['smarthome'],
62
+ operation: ['controlDevice'],
63
+ },
64
+ },
65
+ },
66
+ {
67
+ displayName: 'Value',
68
+ name: 'actionValue',
69
+ type: 'string',
70
+ default: '',
71
+ displayOptions: {
72
+ show: {
73
+ resource: ['smarthome'],
74
+ operation: ['controlDevice'],
75
+ },
76
+ },
77
+ description: 'Action value (e.g. brightness level, color hex, temperature)',
78
+ },
79
+ ];
80
+ async function execute(alexa, operation, itemIndex) {
81
+ if (operation === 'getDevices') {
82
+ return alexa.getSmarthomeDevices();
83
+ }
84
+ if (operation === 'controlDevice') {
85
+ const entity = this.getNodeParameter('entity', itemIndex);
86
+ const action = this.getNodeParameter('action', itemIndex);
87
+ const actionValue = this.getNodeParameter('actionValue', itemIndex, '');
88
+ return alexa.controlSmarthomeDevice(entity, action, actionValue || undefined);
89
+ }
90
+ return undefined;
91
+ }
92
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/AlexaRemote/resources/smarthome/index.ts"],"names":[],"mappings":";;;AAiFA,0BAgBC;AA7FY,QAAA,WAAW,GAAsB;IAC5C;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,YAAY;gBACnB,WAAW,EAA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,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,WAAW,CAAC;gBACvB,SAAS,EAAE,CAAC,eAAe,CAAC;aAC7B;SACF;QACD,WAAW,EAAE,8DAA8D;KAC5E;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAE3B,KAAqB,EACrB,SAAiB,EACjB,SAAiB;IAEjB,IAAI,SAAS,KAAK,YAAY,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,mBAAmB,EAAE,CAAC;IACrC,CAAC;IACD,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW,CAAC;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW,CAAC;QACpE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,SAAS,EAAE,EAAE,CAAW,CAAC;QAClF,OAAO,KAAK,CAAC,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,IAAI,SAAS,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@ac-codeprod/n8n-nodes-alexa-remote",
3
+ "version": "0.2.3",
4
+ "description": "n8n node for interacting with Amazon Alexa API",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "license": "MIT",
9
+ "homepage": "https://github.com/AC-CodeProd/n8n-nodes-alexa-remote",
10
+ "keywords": [
11
+ "n8n-community-node-package",
12
+ "n8n",
13
+ "alexa",
14
+ "amazon",
15
+ "echo",
16
+ "smart-home"
17
+ ],
18
+ "author": {
19
+ "name": "Alain CAJUSTE",
20
+ "email": "alain.cajuste@gmail.com"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/AC-CodeProd/n8n-nodes-alexa-remote.git"
25
+ },
26
+ "scripts": {
27
+ "build": "n8n-node build",
28
+ "build:watch": "tsc --watch",
29
+ "dev": "n8n-node dev",
30
+ "lint": "n8n-node lint",
31
+ "lint:fix": "n8n-node lint --fix",
32
+ "release": "n8n-node release",
33
+ "prepublishOnly": "n8n-node prerelease",
34
+ "upgrade-packages": "npx npm-check -u"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "LICENSE",
39
+ "README.md"
40
+ ],
41
+ "n8n": {
42
+ "n8nNodesApiVersion": 1,
43
+ "strict": false,
44
+ "credentials": [
45
+ "dist/credentials/AlexaRemoteApi.credentials.js"
46
+ ],
47
+ "nodes": [
48
+ "dist/nodes/AlexaRemote/AlexaRemote.node.js",
49
+ "dist/nodes/AlexaRemote/AlexaRemoteTrigger.node.js"
50
+ ]
51
+ },
52
+ "dependencies": {
53
+ "alexa-remote2": "^8.0.4",
54
+ "tough-cookie": "^6.0.1"
55
+ },
56
+ "devDependencies": {
57
+ "@eslint/js": "^9.29.0",
58
+ "@n8n/node-cli": "*",
59
+ "@types/tough-cookie": "^4.0.5",
60
+ "eslint": "^9.29.0",
61
+ "prettier": "^3.8.1",
62
+ "release-it": "^19.2.4",
63
+ "typescript": "^5.9.3"
64
+ },
65
+ "peerDependencies": {
66
+ "n8n-workflow": "*"
67
+ },
68
+ "engines": {
69
+ "node": ">=18.0.0"
70
+ }
71
+ }