@green-api/n8n-nodes-telegram-greenapi 0.0.1

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 (108) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +113 -0
  3. package/dist/credentials/GreenApiAuthApi.credentials.d.ts +8 -0
  4. package/dist/credentials/GreenApiAuthApi.credentials.js +64 -0
  5. package/dist/credentials/GreenApiAuthApi.credentials.js.map +1 -0
  6. package/dist/nodes/Greenapi/Greenapi.node.d.ts +5 -0
  7. package/dist/nodes/Greenapi/Greenapi.node.js +123 -0
  8. package/dist/nodes/Greenapi/Greenapi.node.js.map +1 -0
  9. package/dist/nodes/Greenapi/GreenapiTrigger.node.d.ts +6 -0
  10. package/dist/nodes/Greenapi/GreenapiTrigger.node.js +163 -0
  11. package/dist/nodes/Greenapi/GreenapiTrigger.node.js.map +1 -0
  12. package/dist/nodes/Greenapi/greenapi.svg +47 -0
  13. package/dist/nodes/Greenapi/helpers/executePerItem.d.ts +2 -0
  14. package/dist/nodes/Greenapi/helpers/executePerItem.js +30 -0
  15. package/dist/nodes/Greenapi/helpers/executePerItem.js.map +1 -0
  16. package/dist/nodes/Greenapi/helpers/getParams.d.ts +8 -0
  17. package/dist/nodes/Greenapi/helpers/getParams.js +11 -0
  18. package/dist/nodes/Greenapi/helpers/getParams.js.map +1 -0
  19. package/dist/nodes/Greenapi/helpers/request.d.ts +2 -0
  20. package/dist/nodes/Greenapi/helpers/request.js +19 -0
  21. package/dist/nodes/Greenapi/helpers/request.js.map +1 -0
  22. package/dist/nodes/Greenapi/operations/checkAccount.d.ts +2 -0
  23. package/dist/nodes/Greenapi/operations/checkAccount.js +14 -0
  24. package/dist/nodes/Greenapi/operations/checkAccount.js.map +1 -0
  25. package/dist/nodes/Greenapi/operations/getAccountSettings.d.ts +2 -0
  26. package/dist/nodes/Greenapi/operations/getAccountSettings.js +10 -0
  27. package/dist/nodes/Greenapi/operations/getAccountSettings.js.map +1 -0
  28. package/dist/nodes/Greenapi/operations/getAvatar.d.ts +2 -0
  29. package/dist/nodes/Greenapi/operations/getAvatar.js +14 -0
  30. package/dist/nodes/Greenapi/operations/getAvatar.js.map +1 -0
  31. package/dist/nodes/Greenapi/operations/getChatHistory.d.ts +2 -0
  32. package/dist/nodes/Greenapi/operations/getChatHistory.js +16 -0
  33. package/dist/nodes/Greenapi/operations/getChatHistory.js.map +1 -0
  34. package/dist/nodes/Greenapi/operations/getChats.d.ts +2 -0
  35. package/dist/nodes/Greenapi/operations/getChats.js +10 -0
  36. package/dist/nodes/Greenapi/operations/getChats.js.map +1 -0
  37. package/dist/nodes/Greenapi/operations/getContactInfo.d.ts +2 -0
  38. package/dist/nodes/Greenapi/operations/getContactInfo.js +14 -0
  39. package/dist/nodes/Greenapi/operations/getContactInfo.js.map +1 -0
  40. package/dist/nodes/Greenapi/operations/getContacts.d.ts +2 -0
  41. package/dist/nodes/Greenapi/operations/getContacts.js +10 -0
  42. package/dist/nodes/Greenapi/operations/getContacts.js.map +1 -0
  43. package/dist/nodes/Greenapi/operations/getGroupData.d.ts +2 -0
  44. package/dist/nodes/Greenapi/operations/getGroupData.js +14 -0
  45. package/dist/nodes/Greenapi/operations/getGroupData.js.map +1 -0
  46. package/dist/nodes/Greenapi/operations/getMessage.d.ts +2 -0
  47. package/dist/nodes/Greenapi/operations/getMessage.js +16 -0
  48. package/dist/nodes/Greenapi/operations/getMessage.js.map +1 -0
  49. package/dist/nodes/Greenapi/operations/getStateInstance.d.ts +2 -0
  50. package/dist/nodes/Greenapi/operations/getStateInstance.js +10 -0
  51. package/dist/nodes/Greenapi/operations/getStateInstance.js.map +1 -0
  52. package/dist/nodes/Greenapi/operations/lastIncomingMessages.d.ts +2 -0
  53. package/dist/nodes/Greenapi/operations/lastIncomingMessages.js +23 -0
  54. package/dist/nodes/Greenapi/operations/lastIncomingMessages.js.map +1 -0
  55. package/dist/nodes/Greenapi/operations/lastOutgoingMessages.d.ts +2 -0
  56. package/dist/nodes/Greenapi/operations/lastOutgoingMessages.js +23 -0
  57. package/dist/nodes/Greenapi/operations/lastOutgoingMessages.js.map +1 -0
  58. package/dist/nodes/Greenapi/operations/readChat.d.ts +2 -0
  59. package/dist/nodes/Greenapi/operations/readChat.js +14 -0
  60. package/dist/nodes/Greenapi/operations/readChat.js.map +1 -0
  61. package/dist/nodes/Greenapi/operations/reboot.d.ts +2 -0
  62. package/dist/nodes/Greenapi/operations/reboot.js +10 -0
  63. package/dist/nodes/Greenapi/operations/reboot.js.map +1 -0
  64. package/dist/nodes/Greenapi/operations/sendFileByUrl.d.ts +2 -0
  65. package/dist/nodes/Greenapi/operations/sendFileByUrl.js +22 -0
  66. package/dist/nodes/Greenapi/operations/sendFileByUrl.js.map +1 -0
  67. package/dist/nodes/Greenapi/operations/sendMessage.d.ts +2 -0
  68. package/dist/nodes/Greenapi/operations/sendMessage.js +20 -0
  69. package/dist/nodes/Greenapi/operations/sendMessage.js.map +1 -0
  70. package/dist/nodes/Greenapi/operations/sendPoll.d.ts +2 -0
  71. package/dist/nodes/Greenapi/operations/sendPoll.js +32 -0
  72. package/dist/nodes/Greenapi/operations/sendPoll.js.map +1 -0
  73. package/dist/nodes/Greenapi/properties/account/account.description.d.ts +1 -0
  74. package/dist/nodes/Greenapi/properties/account/account.description.js +16 -0
  75. package/dist/nodes/Greenapi/properties/account/account.description.js.map +1 -0
  76. package/dist/nodes/Greenapi/properties/account/accountOperations.d.ts +2 -0
  77. package/dist/nodes/Greenapi/properties/account/accountOperations.js +24 -0
  78. package/dist/nodes/Greenapi/properties/account/accountOperations.js.map +1 -0
  79. package/dist/nodes/Greenapi/properties/account/fields/getAccountSettings.d.ts +2 -0
  80. package/dist/nodes/Greenapi/properties/account/fields/getAccountSettings.js +5 -0
  81. package/dist/nodes/Greenapi/properties/account/fields/getAccountSettings.js.map +1 -0
  82. package/dist/nodes/Greenapi/properties/account/fields/getStateInstance.d.ts +2 -0
  83. package/dist/nodes/Greenapi/properties/account/fields/getStateInstance.js +5 -0
  84. package/dist/nodes/Greenapi/properties/account/fields/getStateInstance.js.map +1 -0
  85. package/dist/nodes/Greenapi/properties/account/fields/reboot.d.ts +2 -0
  86. package/dist/nodes/Greenapi/properties/account/fields/reboot.js +5 -0
  87. package/dist/nodes/Greenapi/properties/account/fields/reboot.js.map +1 -0
  88. package/dist/nodes/Greenapi/properties/account/fields/setSettings.d.ts +2 -0
  89. package/dist/nodes/Greenapi/properties/account/fields/setSettings.js +121 -0
  90. package/dist/nodes/Greenapi/properties/account/fields/setSettings.js.map +1 -0
  91. package/dist/nodes/Greenapi/properties/index.d.ts +4 -0
  92. package/dist/nodes/Greenapi/properties/index.js +32 -0
  93. package/dist/nodes/Greenapi/properties/index.js.map +1 -0
  94. package/dist/nodes/Greenapi/properties/journal.d.ts +2 -0
  95. package/dist/nodes/Greenapi/properties/journal.js +78 -0
  96. package/dist/nodes/Greenapi/properties/journal.js.map +1 -0
  97. package/dist/nodes/Greenapi/properties/sending.d.ts +2 -0
  98. package/dist/nodes/Greenapi/properties/sending.js +153 -0
  99. package/dist/nodes/Greenapi/properties/sending.js.map +1 -0
  100. package/dist/nodes/Greenapi/properties/service.d.ts +2 -0
  101. package/dist/nodes/Greenapi/properties/service.js +55 -0
  102. package/dist/nodes/Greenapi/properties/service.js.map +1 -0
  103. package/dist/nodes/Greenapi/types/types.d.ts +60 -0
  104. package/dist/nodes/Greenapi/types/types.js +3 -0
  105. package/dist/nodes/Greenapi/types/types.js.map +1 -0
  106. package/dist/package.json +56 -0
  107. package/dist/tsconfig.tsbuildinfo +1 -0
  108. package/package.json +56 -0
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, IHttpRequestMethods } from 'n8n-workflow';
2
+ export declare function greenApiRequest(ctx: IExecuteFunctions, method: IHttpRequestMethods, endpoint: string, body: unknown): Promise<any>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.greenApiRequest = greenApiRequest;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ async function greenApiRequest(ctx, method, endpoint, body) {
6
+ const credentials = await ctx.getCredentials('greenApiAuthApi');
7
+ try {
8
+ return await ctx.helpers.httpRequest({
9
+ method,
10
+ url: `https://api.green-api.com/waInstance${credentials.idInstance}/${endpoint}/${credentials.apiTokenKey}`,
11
+ body,
12
+ json: true,
13
+ });
14
+ }
15
+ catch (error) {
16
+ throw new n8n_workflow_1.NodeApiError(ctx.getNode(), error);
17
+ }
18
+ }
19
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/helpers/request.ts"],"names":[],"mappings":";;AAEA,0CAqBC;AAvBD,+CAAoF;AAE7E,KAAK,UAAU,eAAe,CACnC,GAAsB,EACtB,MAA2B,EAC3B,QAAgB,EAChB,IAAa;IAEb,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAG7D,CAAC;IAEF,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC;YACnC,MAAM;YACN,GAAG,EAAE,uCAAuC,WAAW,CAAC,UAAU,IAAI,QAAQ,IAAI,WAAW,CAAC,WAAW,EAAE;YAC3G,IAAI;YACJ,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,2BAAY,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function checkAccount(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkAccount = checkAccount;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function checkAccount(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ phoneNumber: {},
10
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'checkAccount', {
11
+ phoneNumber: params.phoneNumber,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=checkAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkAccount.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/checkAccount.ts"],"names":[],"mappings":";;AAMA,oCAgBC;AArBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,YAAY,CAEhC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAqB,IAAI,EAAE,CAAC,EAAE;QACrC,WAAW,EAAE,EAAE;KAChB,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE;QAC5C,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getAccountSettings(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAccountSettings = getAccountSettings;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getAccountSettings(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {}), (params) => (0, request_1.greenApiRequest)(this, 'GET', 'getAccountSettings', {}));
9
+ }
10
+ //# sourceMappingURL=getAccountSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccountSettings.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getAccountSettings.ts"],"names":[],"mappings":";;AAMA,gDAYC;AAjBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,kBAAkB,CAEtC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAA2B,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAClD,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,CAAC,CACzD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getAvatar(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAvatar = getAvatar;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getAvatar(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'getAvatar', {
11
+ chatId: params.chatId,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=getAvatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAvatar.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getAvatar.ts"],"names":[],"mappings":";;AAMA,8BAgBC;AArBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,SAAS,CAE7B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAkB,IAAI,EAAE,CAAC,EAAE;QAClC,MAAM,EAAE,EAAE;KACX,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE;QACzC,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getChatHistory(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChatHistory = getChatHistory;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getChatHistory(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ count: {},
11
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'getChatHistory', {
12
+ chatId: params.chatId,
13
+ count: params.count,
14
+ }));
15
+ }
16
+ //# sourceMappingURL=getChatHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChatHistory.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getChatHistory.ts"],"names":[],"mappings":";;AAMA,wCAkBC;AAvBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,cAAc,CAElC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAuB,IAAI,EAAE,CAAC,EAAE;QACvC,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE;QAC9C,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getChats(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChats = getChats;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getChats(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {}), (params) => (0, request_1.greenApiRequest)(this, 'GET', 'getChats', {}));
9
+ }
10
+ //# sourceMappingURL=getChats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChats.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getChats.ts"],"names":[],"mappings":";;AAMA,4BAYC;AAjBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,QAAQ,CAE5B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAiB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EACxC,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC,CAC/C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getContactInfo(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContactInfo = getContactInfo;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getContactInfo(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'getContactInfo', {
11
+ chatId: params.chatId,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=getContactInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getContactInfo.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getContactInfo.ts"],"names":[],"mappings":";;AAMA,wCAgBC;AArBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,cAAc,CAElC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAuB,IAAI,EAAE,CAAC,EAAE;QACvC,MAAM,EAAE,EAAE;KACX,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE;QAC9C,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getContacts(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContacts = getContacts;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getContacts(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {}), (params) => (0, request_1.greenApiRequest)(this, 'GET', 'getContacts', {}));
9
+ }
10
+ //# sourceMappingURL=getContacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getContacts.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getContacts.ts"],"names":[],"mappings":";;AAMA,kCAYC;AAjBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,WAAW,CAE/B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAoB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAC3C,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC,CAClD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getGroupData(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGroupData = getGroupData;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getGroupData(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'getGroupData', {
11
+ chatId: params.chatId,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=getGroupData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGroupData.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getGroupData.ts"],"names":[],"mappings":";;AAMA,oCAgBC;AArBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,YAAY,CAEhC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAqB,IAAI,EAAE,CAAC,EAAE;QACrC,MAAM,EAAE,EAAE;KACX,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE;QAC5C,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getMessage(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMessage = getMessage;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getMessage(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ idMessage: {},
11
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'getMessage', {
12
+ chatId: params.chatId,
13
+ idMessage: params.idMessage,
14
+ }));
15
+ }
16
+ //# sourceMappingURL=getMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMessage.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getMessage.ts"],"names":[],"mappings":";;AAMA,gCAkBC;AAvBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,UAAU,CAE9B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAmB,IAAI,EAAE,CAAC,EAAE;QACnC,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,EAAE;KACd,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE;QAC1C,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function getStateInstance(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStateInstance = getStateInstance;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function getStateInstance(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {}), (params) => (0, request_1.greenApiRequest)(this, 'GET', 'getStateInstance', {}));
9
+ }
10
+ //# sourceMappingURL=getStateInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStateInstance.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/getStateInstance.ts"],"names":[],"mappings":";;AAMA,4CAYC;AAjBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,gBAAgB,CAEpC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAyB,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EAChD,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,CAAC,CACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function lastIncomingMessages(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lastIncomingMessages = lastIncomingMessages;
4
+ async function lastIncomingMessages(items) {
5
+ const returnData = [];
6
+ for (let i = 0; i < items.length; i++) {
7
+ const minutes = this.getNodeParameter('minutes', i, '');
8
+ const credentials = await this.getCredentials('greenApiAuthApi');
9
+ let url = `https://api.green-api.com/waInstance${credentials.idInstance}/lastIncomingMessages/${credentials.apiTokenKey}`;
10
+ if (minutes) {
11
+ url = url + '?minutes=' + minutes;
12
+ }
13
+ const response = await this.helpers.httpRequest({
14
+ method: 'GET',
15
+ url: url,
16
+ headers: { 'Content-Type': 'application/json' },
17
+ json: true,
18
+ });
19
+ returnData.push(response);
20
+ }
21
+ return returnData;
22
+ }
23
+ //# sourceMappingURL=lastIncomingMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lastIncomingMessages.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/lastIncomingMessages.ts"],"names":[],"mappings":";;AAEA,oDAwBC;AAxBM,KAAK,UAAU,oBAAoB,CAA0B,KAA2B;IAC3F,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;QAClE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAG9D,CAAC;QAEF,IAAI,GAAG,GAAG,uCAAuC,WAAW,CAAC,UAAU,yBAAyB,WAAW,CAAC,WAAW,EAAE,CAAC;QAC1H,IAAI,OAAO,EAAE,CAAC;YAAA,GAAG,GAAG,GAAG,GAAG,WAAW,GAAG,OAAO,CAAA;QAAA,CAAC;QAEhD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;YAC5C,MAAM,EAAE,KAAK;YACb,GAAG,EAAG,GAAG;YACT,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI;SACb,CAAC,CAAC;QAEH,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function lastOutgoingMessages(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lastOutgoingMessages = lastOutgoingMessages;
4
+ async function lastOutgoingMessages(items) {
5
+ const returnData = [];
6
+ for (let i = 0; i < items.length; i++) {
7
+ const minutes = this.getNodeParameter('minutes', i, '');
8
+ const credentials = await this.getCredentials('greenApiAuthApi');
9
+ let url = `https://api.green-api.com/waInstance${credentials.idInstance}/lastOutgoingMessages/${credentials.apiTokenKey}`;
10
+ if (minutes) {
11
+ url = url + '?minutes=' + minutes;
12
+ }
13
+ const response = await this.helpers.httpRequest({
14
+ method: 'GET',
15
+ url: url,
16
+ headers: { 'Content-Type': 'application/json' },
17
+ json: true,
18
+ });
19
+ returnData.push(response);
20
+ }
21
+ return returnData;
22
+ }
23
+ //# sourceMappingURL=lastOutgoingMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lastOutgoingMessages.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/lastOutgoingMessages.ts"],"names":[],"mappings":";;AAEA,oDAwBC;AAxBM,KAAK,UAAU,oBAAoB,CAA0B,KAA2B;IAC3F,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;QAClE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAG9D,CAAC;QAEF,IAAI,GAAG,GAAG,uCAAuC,WAAW,CAAC,UAAU,yBAAyB,WAAW,CAAC,WAAW,EAAE,CAAC;QAC1H,IAAI,OAAO,EAAE,CAAC;YAAA,GAAG,GAAG,GAAG,GAAG,WAAW,GAAG,OAAO,CAAA;QAAA,CAAC;QAEhD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;YAC5C,MAAM,EAAE,KAAK;YACb,GAAG,EAAG,GAAG;YACT,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI;SACb,CAAC,CAAC;QAEH,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function readChat(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readChat = readChat;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function readChat(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'readChat', {
11
+ chatId: params.chatId,
12
+ }));
13
+ }
14
+ //# sourceMappingURL=readChat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readChat.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/readChat.ts"],"names":[],"mappings":";;AAMA,4BAgBC;AArBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,QAAQ,CAE5B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAiB,IAAI,EAAE,CAAC,EAAE;QACjC,MAAM,EAAE,EAAE;KACX,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;QACxC,MAAM,EAAE,MAAM,CAAC,MAAM;KACtB,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function reboot(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reboot = reboot;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function reboot(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {}), (params) => (0, request_1.greenApiRequest)(this, 'GET', 'reboot', {}));
9
+ }
10
+ //# sourceMappingURL=reboot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reboot.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/reboot.ts"],"names":[],"mappings":";;AAMA,wBAYC;AAjBD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,MAAM,CAE1B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAe,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,EACtC,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAC7C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function sendFileByUrl(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendFileByUrl = sendFileByUrl;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function sendFileByUrl(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ urlFile: {},
11
+ fileName: { default: '' },
12
+ caption: {},
13
+ typingTime: { default: 0 },
14
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'sendFileByUrl', {
15
+ chatId: params.chatId,
16
+ urlFile: params.urlFile,
17
+ fileName: params.fileName,
18
+ caption: params.caption,
19
+ typingTime: params.typingTime,
20
+ }));
21
+ }
22
+ //# sourceMappingURL=sendFileByUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendFileByUrl.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/sendFileByUrl.ts"],"names":[],"mappings":";;AAMA,sCAwBC;AA7BD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,aAAa,CAEjC,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAsB,IAAI,EAAE,CAAC,EAAE;QACtC,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACzB,OAAO,EAAE,EAAE;QACX,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;KAC3B,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;QAC7C,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,OAAO,EAAE,MAAM,CAAE,OAAO;QACxB,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function sendMessage(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendMessage = sendMessage;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function sendMessage(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => (0, getParams_1.getParams)(this, i, {
9
+ chatId: {},
10
+ message: {},
11
+ quotedMessageId: { default: '' },
12
+ typingTime: { default: 0 },
13
+ }), (params) => (0, request_1.greenApiRequest)(this, 'POST', 'sendMessage', {
14
+ chatId: params.chatId,
15
+ message: params.message,
16
+ quotedMessageId: params.quotedMessageId,
17
+ typingTime: params.typingTime,
18
+ }));
19
+ }
20
+ //# sourceMappingURL=sendMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendMessage.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/sendMessage.ts"],"names":[],"mappings":";;AAMA,kCAsBC;AA3BD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,WAAW,CAE/B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE,CACJ,IAAA,qBAAS,EAAoB,IAAI,EAAE,CAAC,EAAE;QACpC,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;KAC3B,CAAC,EACJ,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE;QAC3C,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function sendPoll(this: IExecuteFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendPoll = sendPoll;
4
+ const executePerItem_1 = require("../helpers/executePerItem");
5
+ const getParams_1 = require("../helpers/getParams");
6
+ const request_1 = require("../helpers/request");
7
+ async function sendPoll(items) {
8
+ return (0, executePerItem_1.executePerItem)(this, items, (i) => {
9
+ var _a;
10
+ const params = (0, getParams_1.getParams)(this, i, {
11
+ chatId: {},
12
+ message: {},
13
+ quotedMessageId: { default: '' },
14
+ options: {},
15
+ multipleAnswers: {},
16
+ typingTime: { default: 0 },
17
+ });
18
+ const optionsArray = ((_a = params.options) === null || _a === void 0 ? void 0 : _a.option) || [];
19
+ return {
20
+ ...params,
21
+ options: optionsArray,
22
+ };
23
+ }, (params) => (0, request_1.greenApiRequest)(this, 'POST', 'sendPoll', {
24
+ chatId: params.chatId,
25
+ message: params.message,
26
+ quotedMessageId: params.quotedMessageId,
27
+ options: params.options,
28
+ multipleAnswers: params.multipleAnswers,
29
+ typingTime: params.typingTime,
30
+ }));
31
+ }
32
+ //# sourceMappingURL=sendPoll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendPoll.js","sourceRoot":"","sources":["../../../../nodes/Greenapi/operations/sendPoll.ts"],"names":[],"mappings":";;AAMA,4BAiCC;AAtCD,8DAA2D;AAC3D,oDAAiD;AACjD,gDAAqD;AAG9C,KAAK,UAAU,QAAQ,CAE5B,KAA2B;IAE3B,OAAO,IAAA,+BAAc,EACnB,IAAI,EACJ,KAAK,EACL,CAAC,CAAC,EAAE,EAAE;;QACJ,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAM,IAAI,EAAE,CAAC,EAAE;YACrC,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAChC,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,EAAE;YACnB,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;SAC3B,CAAC,CAAC;QACH,MAAM,YAAY,GAAG,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,MAAM,KAAI,EAAE,CAAC;QAElD,OAAO;YACL,GAAG,MAAM;YACT,OAAO,EAAE,YAAY;SACtB,CAAC;IACJ,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CACT,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;QACxC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const accountDescription: import("n8n-workflow").INodeProperties[];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountDescription = void 0;
4
+ const accountOperations_1 = require("./accountOperations");
5
+ const setSettings_1 = require("./fields/setSettings");
6
+ const getStateInstance_1 = require("./fields/getStateInstance");
7
+ const getAccountSettings_1 = require("./fields/getAccountSettings");
8
+ const reboot_1 = require("./fields/reboot");
9
+ exports.accountDescription = [
10
+ ...accountOperations_1.accountOperations,
11
+ ...setSettings_1.setSettingsFields,
12
+ ...getStateInstance_1.getStateInstanceFields,
13
+ ...getAccountSettings_1.getAccountSettingsFields,
14
+ ...reboot_1.rebootFields,
15
+ ];
16
+ //# sourceMappingURL=account.description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.description.js","sourceRoot":"","sources":["../../../../../nodes/Greenapi/properties/account/account.description.ts"],"names":[],"mappings":";;;AAAA,2DAAwD;AACxD,sDAAyD;AACzD,gEAAmE;AACnE,oEAAuE;AACvE,4CAA+C;AAElC,QAAA,kBAAkB,GAAG;IACjC,GAAG,qCAAiB;IACpB,GAAG,+BAAiB;IACpB,GAAG,yCAAsB;IACzB,GAAG,6CAAwB;IAC3B,GAAG,qBAAY;CACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const accountOperations: INodeProperties[];
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountOperations = void 0;
4
+ exports.accountOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['account'],
13
+ },
14
+ },
15
+ options: [
16
+ { name: 'Get State Instance', value: 'getStateInstance', action: 'Get state instance' },
17
+ { name: 'Get Account Settings', value: 'getAccountSettings', action: 'Get information about the account' },
18
+ { name: 'Reboot', value: 'reboot', action: 'Reboot instance' },
19
+ { name: 'Set Settings', value: 'setSettings', action: 'Set settings' },
20
+ ],
21
+ default: 'getAccountSettings',
22
+ },
23
+ ];
24
+ //# sourceMappingURL=accountOperations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountOperations.js","sourceRoot":"","sources":["../../../../../nodes/Greenapi/properties/account/accountOperations.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE;YACvF,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,mCAAmC,EAAE;YAC1G,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE;YAC9D,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE;SACtE;QACD,OAAO,EAAE,oBAAoB;KAC7B;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const getAccountSettingsFields: INodeProperties[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAccountSettingsFields = void 0;
4
+ exports.getAccountSettingsFields = [];
5
+ //# sourceMappingURL=getAccountSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccountSettings.js","sourceRoot":"","sources":["../../../../../../nodes/Greenapi/properties/account/fields/getAccountSettings.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const getStateInstanceFields: INodeProperties[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStateInstanceFields = void 0;
4
+ exports.getStateInstanceFields = [];
5
+ //# sourceMappingURL=getStateInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStateInstance.js","sourceRoot":"","sources":["../../../../../../nodes/Greenapi/properties/account/fields/getStateInstance.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const rebootFields: INodeProperties[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rebootFields = void 0;
4
+ exports.rebootFields = [];
5
+ //# sourceMappingURL=reboot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reboot.js","sourceRoot":"","sources":["../../../../../../nodes/Greenapi/properties/account/fields/reboot.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAsB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const setSettingsFields: INodeProperties[];