@textbee/n8n-nodes-textbee 0.0.0-stage → 1.0.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.
Files changed (95) hide show
  1. package/LICENSE.md +22 -0
  2. package/NOTICE.md +20 -0
  3. package/README.md +109 -2
  4. package/dist/credentials/TextbeeApi.credentials.d.ts +10 -0
  5. package/dist/credentials/TextbeeApi.credentials.js +57 -0
  6. package/dist/credentials/TextbeeApi.credentials.js.map +1 -0
  7. package/dist/icons/textbee.dark.svg +1 -0
  8. package/dist/icons/textbee.svg +1 -0
  9. package/dist/nodes/Textbee/Textbee.node.d.ts +10 -0
  10. package/dist/nodes/Textbee/Textbee.node.js +80 -0
  11. package/dist/nodes/Textbee/Textbee.node.js.map +1 -0
  12. package/dist/nodes/Textbee/Textbee.node.json +19 -0
  13. package/dist/nodes/Textbee/listSearch/searchDevices.d.ts +2 -0
  14. package/dist/nodes/Textbee/listSearch/searchDevices.js +36 -0
  15. package/dist/nodes/Textbee/listSearch/searchDevices.js.map +1 -0
  16. package/dist/nodes/Textbee/resources/device/get.d.ts +19 -0
  17. package/dist/nodes/Textbee/resources/device/get.js +31 -0
  18. package/dist/nodes/Textbee/resources/device/get.js.map +1 -0
  19. package/dist/nodes/Textbee/resources/device/getAll.d.ts +16 -0
  20. package/dist/nodes/Textbee/resources/device/getAll.js +29 -0
  21. package/dist/nodes/Textbee/resources/device/getAll.js.map +1 -0
  22. package/dist/nodes/Textbee/resources/device/index.d.ts +2 -0
  23. package/dist/nodes/Textbee/resources/device/index.js +39 -0
  24. package/dist/nodes/Textbee/resources/device/index.js.map +1 -0
  25. package/dist/nodes/Textbee/resources/message/get.d.ts +19 -0
  26. package/dist/nodes/Textbee/resources/message/get.js +42 -0
  27. package/dist/nodes/Textbee/resources/message/get.js.map +1 -0
  28. package/dist/nodes/Textbee/resources/message/getAll.d.ts +16 -0
  29. package/dist/nodes/Textbee/resources/message/getAll.js +240 -0
  30. package/dist/nodes/Textbee/resources/message/getAll.js.map +1 -0
  31. package/dist/nodes/Textbee/resources/message/getBatch.d.ts +19 -0
  32. package/dist/nodes/Textbee/resources/message/getBatch.js +42 -0
  33. package/dist/nodes/Textbee/resources/message/getBatch.js.map +1 -0
  34. package/dist/nodes/Textbee/resources/message/index.d.ts +2 -0
  35. package/dist/nodes/Textbee/resources/message/index.js +66 -0
  36. package/dist/nodes/Textbee/resources/message/index.js.map +1 -0
  37. package/dist/nodes/Textbee/resources/message/send.d.ts +19 -0
  38. package/dist/nodes/Textbee/resources/message/send.js +124 -0
  39. package/dist/nodes/Textbee/resources/message/send.js.map +1 -0
  40. package/dist/nodes/Textbee/resources/message/sendBulk.d.ts +19 -0
  41. package/dist/nodes/Textbee/resources/message/sendBulk.js +110 -0
  42. package/dist/nodes/Textbee/resources/message/sendBulk.js.map +1 -0
  43. package/dist/nodes/Textbee/resources/stats/get.d.ts +16 -0
  44. package/dist/nodes/Textbee/resources/stats/get.js +29 -0
  45. package/dist/nodes/Textbee/resources/stats/get.js.map +1 -0
  46. package/dist/nodes/Textbee/resources/stats/index.d.ts +2 -0
  47. package/dist/nodes/Textbee/resources/stats/index.js +30 -0
  48. package/dist/nodes/Textbee/resources/stats/index.js.map +1 -0
  49. package/dist/nodes/Textbee/resources/webhook/create.d.ts +22 -0
  50. package/dist/nodes/Textbee/resources/webhook/create.js +98 -0
  51. package/dist/nodes/Textbee/resources/webhook/create.js.map +1 -0
  52. package/dist/nodes/Textbee/resources/webhook/delete.d.ts +19 -0
  53. package/dist/nodes/Textbee/resources/webhook/delete.js +35 -0
  54. package/dist/nodes/Textbee/resources/webhook/delete.js.map +1 -0
  55. package/dist/nodes/Textbee/resources/webhook/get.d.ts +20 -0
  56. package/dist/nodes/Textbee/resources/webhook/get.js +35 -0
  57. package/dist/nodes/Textbee/resources/webhook/get.js.map +1 -0
  58. package/dist/nodes/Textbee/resources/webhook/getAll.d.ts +17 -0
  59. package/dist/nodes/Textbee/resources/webhook/getAll.js +30 -0
  60. package/dist/nodes/Textbee/resources/webhook/getAll.js.map +1 -0
  61. package/dist/nodes/Textbee/resources/webhook/getNotifications.d.ts +20 -0
  62. package/dist/nodes/Textbee/resources/webhook/getNotifications.js +213 -0
  63. package/dist/nodes/Textbee/resources/webhook/getNotifications.js.map +1 -0
  64. package/dist/nodes/Textbee/resources/webhook/index.d.ts +2 -0
  65. package/dist/nodes/Textbee/resources/webhook/index.js +75 -0
  66. package/dist/nodes/Textbee/resources/webhook/index.js.map +1 -0
  67. package/dist/nodes/Textbee/resources/webhook/update.d.ts +20 -0
  68. package/dist/nodes/Textbee/resources/webhook/update.js +115 -0
  69. package/dist/nodes/Textbee/resources/webhook/update.js.map +1 -0
  70. package/dist/nodes/Textbee/shared/baseUrl.d.ts +2 -0
  71. package/dist/nodes/Textbee/shared/baseUrl.js +17 -0
  72. package/dist/nodes/Textbee/shared/baseUrl.js.map +1 -0
  73. package/dist/nodes/Textbee/shared/bulk.d.ts +20 -0
  74. package/dist/nodes/Textbee/shared/bulk.js +56 -0
  75. package/dist/nodes/Textbee/shared/bulk.js.map +1 -0
  76. package/dist/nodes/Textbee/shared/descriptions.d.ts +8 -0
  77. package/dist/nodes/Textbee/shared/descriptions.js +46 -0
  78. package/dist/nodes/Textbee/shared/descriptions.js.map +1 -0
  79. package/dist/nodes/Textbee/shared/signature.d.ts +2 -0
  80. package/dist/nodes/Textbee/shared/signature.js +16 -0
  81. package/dist/nodes/Textbee/shared/signature.js.map +1 -0
  82. package/dist/nodes/Textbee/shared/subscription.d.ts +15 -0
  83. package/dist/nodes/Textbee/shared/subscription.js +30 -0
  84. package/dist/nodes/Textbee/shared/subscription.js.map +1 -0
  85. package/dist/nodes/Textbee/shared/transport.d.ts +5 -0
  86. package/dist/nodes/Textbee/shared/transport.js +29 -0
  87. package/dist/nodes/Textbee/shared/transport.js.map +1 -0
  88. package/dist/nodes/Textbee/shared/validation.d.ts +5 -0
  89. package/dist/nodes/Textbee/shared/validation.js +52 -0
  90. package/dist/nodes/Textbee/shared/validation.js.map +1 -0
  91. package/dist/nodes/TextbeeTrigger/TextbeeTrigger.node.d.ts +12 -0
  92. package/dist/nodes/TextbeeTrigger/TextbeeTrigger.node.js +220 -0
  93. package/dist/nodes/TextbeeTrigger/TextbeeTrigger.node.js.map +1 -0
  94. package/dist/nodes/TextbeeTrigger/TextbeeTrigger.node.json +22 -0
  95. package/package.json +72 -3
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.planSubscription = planSubscription;
4
+ exports.isNotFoundError = isNotFoundError;
5
+ function sameEvents(a, b) {
6
+ return [...a].sort().join(',') === [...b].sort().join(',');
7
+ }
8
+ function planSubscription(existing, desired) {
9
+ var _a;
10
+ const matches = existing.isActive === true &&
11
+ existing.deliveryUrl === desired.deliveryUrl &&
12
+ sameEvents((_a = existing.events) !== null && _a !== void 0 ? _a : [], desired.events) &&
13
+ existing.signingSecret === desired.signingSecret;
14
+ return matches ? 'keep' : 'update';
15
+ }
16
+ function isNotFoundError(error) {
17
+ var _a, _b, _c, _d;
18
+ if (typeof error !== 'object' || error === null)
19
+ return false;
20
+ const e = error;
21
+ const codes = [
22
+ e.httpCode,
23
+ e.statusCode,
24
+ (_a = e.response) === null || _a === void 0 ? void 0 : _a.status,
25
+ (_c = (_b = e.cause) === null || _b === void 0 ? void 0 : _b.response) === null || _c === void 0 ? void 0 : _c.status,
26
+ (_d = e.cause) === null || _d === void 0 ? void 0 : _d.status,
27
+ ];
28
+ return codes.some((code) => String(code) === '404');
29
+ }
30
+ //# sourceMappingURL=subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../../nodes/Textbee/shared/subscription.ts"],"names":[],"mappings":";;AAyBA,4CAWC;AAGD,0CAgBC;AAvCD,SAAS,UAAU,CAAC,CAAW,EAAE,CAAW;IAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAOD,SAAgB,gBAAgB,CAC/B,QAA6B,EAC7B,OAA4B;;IAE5B,MAAM,OAAO,GACZ,QAAQ,CAAC,QAAQ,KAAK,IAAI;QAC1B,QAAQ,CAAC,WAAW,KAAK,OAAO,CAAC,WAAW;QAC5C,UAAU,CAAC,MAAA,QAAQ,CAAC,MAAM,mCAAI,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC;QACjD,QAAQ,CAAC,aAAa,KAAK,OAAO,CAAC,aAAa,CAAC;IAElD,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AACpC,CAAC;AAGD,SAAgB,eAAe,CAAC,KAAc;;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAKT,CAAC;IACF,MAAM,KAAK,GAAG;QACb,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,UAAU;QACZ,MAAA,CAAC,CAAC,QAAQ,0CAAE,MAAM;QAClB,MAAA,MAAA,CAAC,CAAC,KAAK,0CAAE,QAAQ,0CAAE,MAAM;QACzB,MAAA,CAAC,CAAC,KAAK,0CAAE,MAAM;KACf,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { NodeApiError, type IDataObject, type IExecuteFunctions, type IHookFunctions, type IHttpRequestMethods, type INode, type ILoadOptionsFunctions, type IWebhookFunctions } from 'n8n-workflow';
2
+ type TextbeeContext = IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions;
3
+ export declare function textbeeApiRequest(this: TextbeeContext, method: IHttpRequestMethods, resource: string, body?: IDataObject | undefined, qs?: IDataObject): Promise<any>;
4
+ export declare function toNodeApiError(node: INode, error: unknown): NodeApiError;
5
+ export {};
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.textbeeApiRequest = textbeeApiRequest;
4
+ exports.toNodeApiError = toNodeApiError;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const baseUrl_1 = require("./baseUrl");
7
+ async function textbeeApiRequest(method, resource, body = undefined, qs = {}) {
8
+ var _a;
9
+ const credentials = await this.getCredentials('textbeeApi');
10
+ const baseURL = (0, baseUrl_1.normalizeBaseUrl)(String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : ''));
11
+ const options = {
12
+ method,
13
+ qs,
14
+ body,
15
+ baseURL,
16
+ url: resource,
17
+ json: true,
18
+ };
19
+ try {
20
+ return await this.helpers.httpRequestWithAuthentication.call(this, 'textbeeApi', options);
21
+ }
22
+ catch (error) {
23
+ throw toNodeApiError(this.getNode(), error);
24
+ }
25
+ }
26
+ function toNodeApiError(node, error) {
27
+ return error instanceof n8n_workflow_1.NodeApiError ? error : new n8n_workflow_1.NodeApiError(node, error);
28
+ }
29
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/Textbee/shared/transport.ts"],"names":[],"mappings":";;AAkBA,8CAwBC;AAGD,wCAEC;AA/CD,+CAWsB;AAEtB,uCAA6C;AAKtC,KAAK,UAAU,iBAAiB,CAEtC,MAA2B,EAC3B,QAAgB,EAChB,OAAgC,SAAS,EACzC,KAAkB,EAAE;;IAEpB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,IAAA,0BAAgB,EAAC,MAAM,CAAC,MAAA,WAAW,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,CAAC;IAEpE,MAAM,OAAO,GAAwB;QACpC,MAAM;QACN,EAAE;QACF,IAAI;QACJ,OAAO;QACP,GAAG,EAAE,QAAQ;QACb,IAAI,EAAE,IAAI;KACV,CAAC;IAEF,IAAI,CAAC;QACJ,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;AACF,CAAC;AAGD,SAAgB,cAAc,CAAC,IAAW,EAAE,KAAc;IACzD,OAAO,KAAK,YAAY,2BAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,2BAAY,CAAC,IAAI,EAAE,KAAmB,CAAC,CAAC;AAC5F,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type IExecuteSingleFunctions, type IHttpRequestOptions, type INodeExecutionData } from 'n8n-workflow';
2
+ export declare function isObjectId(value: unknown): boolean;
3
+ export declare function requireObjectIds(...names: string[]): (this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions) => Promise<IHttpRequestOptions>;
4
+ export declare function stripSecrets(items: INodeExecutionData[]): INodeExecutionData[];
5
+ export declare function stripSecretsPostReceive(this: IExecuteSingleFunctions, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isObjectId = isObjectId;
4
+ exports.requireObjectIds = requireObjectIds;
5
+ exports.stripSecrets = stripSecrets;
6
+ exports.stripSecretsPostReceive = stripSecretsPostReceive;
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ const OBJECT_ID = /^[a-f0-9]{24}$/i;
9
+ function isObjectId(value) {
10
+ return typeof value === 'string' && OBJECT_ID.test(value);
11
+ }
12
+ function parameterValue(raw) {
13
+ var _a;
14
+ if (raw && typeof raw === 'object' && 'value' in raw) {
15
+ return String((_a = raw.value) !== null && _a !== void 0 ? _a : '');
16
+ }
17
+ return String(raw !== null && raw !== void 0 ? raw : '');
18
+ }
19
+ function requireObjectIds(...names) {
20
+ return async function (requestOptions) {
21
+ for (const name of names) {
22
+ const optional = name.endsWith('?');
23
+ const parameter = optional ? name.slice(0, -1) : name;
24
+ const value = parameterValue(this.getNodeParameter(parameter, ''));
25
+ if (optional && value === '')
26
+ continue;
27
+ if (!isObjectId(value)) {
28
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `"${parameter}" must be a 24-character textbee ID`);
29
+ }
30
+ }
31
+ return requestOptions;
32
+ };
33
+ }
34
+ function stripSecrets(items) {
35
+ for (const item of items) {
36
+ const json = item.json;
37
+ delete json.signingSecret;
38
+ const subscription = json.webhookSubscriptionData;
39
+ if (subscription && typeof subscription === 'object')
40
+ delete subscription.signingSecret;
41
+ const device = json.deviceData;
42
+ if (device && typeof device === 'object') {
43
+ delete device.fcmToken;
44
+ delete device.serial;
45
+ }
46
+ }
47
+ return items;
48
+ }
49
+ async function stripSecretsPostReceive(items) {
50
+ return stripSecrets(items);
51
+ }
52
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../nodes/Textbee/shared/validation.ts"],"names":[],"mappings":";;AAUA,gCAEC;AAeD,4CAmBC;AAMD,oCAaC;AAED,0DAKC;AAxED,+CAMsB;AAEtB,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAEpC,SAAgB,UAAU,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,cAAc,CAAC,GAAY;;IACnC,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,IA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AAI,CAAC,UAAqC,CAAC;QAC1D,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC1C,OAAO,MAAM,CAAC,QAAQ,CAAC;YACvB,OAAO,MAAM,CAAC,MAAM,CAAC;QACtB,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAE5C,KAA2B;IAE3B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type IHookFunctions, type INodeType, type INodeTypeDescription, type IWebhookFunctions, type IWebhookResponseData } from 'n8n-workflow';
2
+ export declare class TextbeeTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ webhookMethods: {
5
+ default: {
6
+ checkExists(this: IHookFunctions): Promise<boolean>;
7
+ create(this: IHookFunctions): Promise<boolean>;
8
+ delete(this: IHookFunctions): Promise<boolean>;
9
+ };
10
+ };
11
+ webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
12
+ }
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TextbeeTrigger = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const signature_1 = require("../Textbee/shared/signature");
6
+ const subscription_1 = require("../Textbee/shared/subscription");
7
+ const transport_1 = require("../Textbee/shared/transport");
8
+ const validation_1 = require("../Textbee/shared/validation");
9
+ const EVENT_OPTIONS = [
10
+ {
11
+ name: 'Message Delivered',
12
+ value: 'MESSAGE_DELIVERED',
13
+ description: 'Carrier reports delivery to the recipient handset',
14
+ },
15
+ {
16
+ name: 'Message Failed',
17
+ value: 'MESSAGE_FAILED',
18
+ description: 'Phone reports that an outgoing SMS failed',
19
+ },
20
+ {
21
+ name: 'Message Received',
22
+ value: 'MESSAGE_RECEIVED',
23
+ description: 'Phone uploads an incoming SMS',
24
+ },
25
+ {
26
+ name: 'Message Sent',
27
+ value: 'MESSAGE_SENT',
28
+ description: 'Phone reports that the carrier accepted an outgoing SMS',
29
+ },
30
+ {
31
+ name: 'Unknown State',
32
+ value: 'UNKNOWN_STATE',
33
+ description: 'Phone reports a status that textbee cannot map',
34
+ },
35
+ ];
36
+ const MIN_SECRET_LENGTH = 20;
37
+ function webhookPath(webhookId) {
38
+ if (!(0, validation_1.isObjectId)(webhookId)) {
39
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Stored textbee webhook ID is not a valid ID');
40
+ }
41
+ return `/webhooks/${webhookId}`;
42
+ }
43
+ async function desiredSubscription() {
44
+ var _a;
45
+ const credentials = await this.getCredentials('textbeeApi');
46
+ const signingSecret = String((_a = credentials.webhookSigningSecret) !== null && _a !== void 0 ? _a : '');
47
+ if (signingSecret.length < MIN_SECRET_LENGTH) {
48
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Set a Webhook Signing Secret of at least ${MIN_SECRET_LENGTH} characters on the textbee API credential`);
49
+ }
50
+ return {
51
+ deliveryUrl: this.getNodeWebhookUrl('default'),
52
+ events: this.getNodeParameter('events'),
53
+ signingSecret,
54
+ };
55
+ }
56
+ function subscriptionName() {
57
+ var _a;
58
+ return `n8n: ${(_a = this.getWorkflow().name) !== null && _a !== void 0 ? _a : 'workflow'}`.slice(0, 64);
59
+ }
60
+ async function updateSubscription(webhookId, desired) {
61
+ try {
62
+ await transport_1.textbeeApiRequest.call(this, 'PATCH', webhookPath.call(this, webhookId), {
63
+ name: subscriptionName.call(this),
64
+ deliveryUrl: desired.deliveryUrl,
65
+ events: desired.events,
66
+ signingSecret: desired.signingSecret,
67
+ isActive: true,
68
+ });
69
+ return true;
70
+ }
71
+ catch (error) {
72
+ if ((0, subscription_1.isNotFoundError)(error))
73
+ return false;
74
+ throw (0, transport_1.toNodeApiError)(this.getNode(), error);
75
+ }
76
+ }
77
+ class TextbeeTrigger {
78
+ constructor() {
79
+ this.description = {
80
+ displayName: 'textbee Trigger',
81
+ name: 'textbeeTrigger',
82
+ icon: { light: 'file:../../icons/textbee.svg', dark: 'file:../../icons/textbee.dark.svg' },
83
+ group: ['trigger'],
84
+ version: [1],
85
+ subtitle: '={{$parameter["events"].join(", ")}}',
86
+ description: 'Starts the workflow when textbee sends an SMS webhook event',
87
+ defaults: {
88
+ name: 'textbee Trigger',
89
+ },
90
+ inputs: [],
91
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
92
+ credentials: [
93
+ {
94
+ name: 'textbeeApi',
95
+ required: true,
96
+ },
97
+ ],
98
+ webhooks: [
99
+ {
100
+ name: 'default',
101
+ httpMethod: 'POST',
102
+ responseMode: 'onReceived',
103
+ path: 'webhook',
104
+ },
105
+ ],
106
+ properties: [
107
+ {
108
+ displayName: 'Events',
109
+ name: 'events',
110
+ type: 'multiOptions',
111
+ options: EVENT_OPTIONS,
112
+ default: ['MESSAGE_RECEIVED'],
113
+ required: true,
114
+ description: 'The textbee events that start this workflow',
115
+ },
116
+ {
117
+ displayName: 'Set a Webhook Signing Secret (at least 20 characters) on the textbee API credential. textbee only delivers to public URLs, so the n8n test URL on localhost does not work: use a tunnel in development. For Message Received, turn on Receive SMS in the textbee Android app.',
118
+ name: 'triggerNotice',
119
+ type: 'notice',
120
+ default: '',
121
+ },
122
+ ],
123
+ };
124
+ this.webhookMethods = {
125
+ default: {
126
+ async checkExists() {
127
+ const webhookData = this.getWorkflowStaticData('node');
128
+ const webhookId = webhookData.webhookId;
129
+ if (!webhookId)
130
+ return false;
131
+ let subscription;
132
+ try {
133
+ const response = (await transport_1.textbeeApiRequest.call(this, 'GET', webhookPath.call(this, webhookId)));
134
+ subscription = response.data;
135
+ }
136
+ catch (error) {
137
+ if (!(0, subscription_1.isNotFoundError)(error))
138
+ throw (0, transport_1.toNodeApiError)(this.getNode(), error);
139
+ }
140
+ if (!subscription) {
141
+ delete webhookData.webhookId;
142
+ return false;
143
+ }
144
+ const desired = await desiredSubscription.call(this);
145
+ return (0, subscription_1.planSubscription)(subscription, desired) === 'keep';
146
+ },
147
+ async create() {
148
+ var _a;
149
+ const webhookData = this.getWorkflowStaticData('node');
150
+ const desired = await desiredSubscription.call(this);
151
+ const storedId = webhookData.webhookId;
152
+ if (storedId && (await updateSubscription.call(this, storedId, desired))) {
153
+ return true;
154
+ }
155
+ delete webhookData.webhookId;
156
+ const list = (await transport_1.textbeeApiRequest.call(this, 'GET', '/webhooks'));
157
+ const existing = ((_a = list.data) !== null && _a !== void 0 ? _a : []).find((subscription) => subscription.deliveryUrl === desired.deliveryUrl);
158
+ if (existing && (await updateSubscription.call(this, existing._id, desired))) {
159
+ webhookData.webhookId = existing._id;
160
+ return true;
161
+ }
162
+ const response = (await transport_1.textbeeApiRequest.call(this, 'POST', '/webhooks', {
163
+ name: subscriptionName.call(this),
164
+ deliveryUrl: desired.deliveryUrl,
165
+ signingSecret: desired.signingSecret,
166
+ events: desired.events,
167
+ }));
168
+ webhookData.webhookId = response.data._id;
169
+ return true;
170
+ },
171
+ async delete() {
172
+ const webhookData = this.getWorkflowStaticData('node');
173
+ const webhookId = webhookData.webhookId;
174
+ if (!webhookId)
175
+ return true;
176
+ try {
177
+ await transport_1.textbeeApiRequest.call(this, 'DELETE', webhookPath.call(this, webhookId));
178
+ }
179
+ catch (error) {
180
+ if (!(0, subscription_1.isNotFoundError)(error))
181
+ throw (0, transport_1.toNodeApiError)(this.getNode(), error);
182
+ }
183
+ delete webhookData.webhookId;
184
+ return true;
185
+ },
186
+ },
187
+ };
188
+ }
189
+ async webhook() {
190
+ const credentials = await this.getCredentials('textbeeApi');
191
+ const signingSecret = credentials.webhookSigningSecret;
192
+ const headerData = this.getHeaderData();
193
+ const signatureHeader = headerData['x-signature'];
194
+ const rawBody = this.getRequestObject().rawBody;
195
+ const bodyBuffer = Buffer.isBuffer(rawBody)
196
+ ? rawBody
197
+ : Buffer.from(typeof rawBody === 'string' ? rawBody : JSON.stringify(this.getBodyData()));
198
+ if (!(0, signature_1.verifySignature)(bodyBuffer, signatureHeader, signingSecret)) {
199
+ this.getResponseObject().status(401).json({ error: 'Invalid signature' });
200
+ return { noWebhookResponse: true };
201
+ }
202
+ const bodyData = this.getBodyData();
203
+ const ownId = this.getWorkflowStaticData('node').webhookId;
204
+ const deliveredFor = bodyData.webhookSubscriptionId;
205
+ if (ownId && deliveredFor && String(deliveredFor) !== String(ownId)) {
206
+ this.getResponseObject().status(401).json({ error: 'Unknown subscription' });
207
+ return { noWebhookResponse: true };
208
+ }
209
+ const events = this.getNodeParameter('events');
210
+ const eventName = bodyData.webhookEvent;
211
+ if (!eventName || !events.includes(eventName)) {
212
+ return {};
213
+ }
214
+ return {
215
+ workflowData: [this.helpers.returnJsonArray([bodyData])],
216
+ };
217
+ }
218
+ }
219
+ exports.TextbeeTrigger = TextbeeTrigger;
220
+ //# sourceMappingURL=TextbeeTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextbeeTrigger.node.js","sourceRoot":"","sources":["../../../nodes/TextbeeTrigger/TextbeeTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CASsB;AAEtB,2DAA8D;AAC9D,iEAKwC;AACxC,2DAAgF;AAChF,6DAA0D;AAE1D,MAAM,aAAa,GAAG;IACrB;QACC,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,mDAAmD;KAChE;IACD;QACC,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,2CAA2C;KACxD;IACD;QACC,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,+BAA+B;KAC5C;IACD;QACC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,yDAAyD;KACtE;IACD;QACC,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,gDAAgD;KAC7D;CACD,CAAC;AAEF,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAG7B,SAAS,WAA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iB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAC1E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACpC,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAiB,CAAC;QAInD,MAAM,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,SAA+B,CAAC;QACjF,MAAM,YAAY,GAAG,QAAQ,CAAC,qBAA2C,CAAC;QAC1E,IAAI,KAAK,IAAI,YAAY,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACrE,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;YAC7E,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACpC,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAa,CAAC;QAC3D,MAAM,SAAS,GAAG,QAAQ,CAAC,YAAkC,CAAC;QAC9D,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAE/C,OAAO,EAAE,CAAC;QACX,CAAC;QAED,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;SACxD,CAAC;IACH,CAAC;CACD;AAzKD,wCAyKC"}
@@ -0,0 +1,22 @@
1
+ {
2
+ "node": "@textbee/n8n-nodes-textbee.textbeeTrigger",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Communication", "Marketing & Content"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://textbee.dev/docs/getting-started/api-keys"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://textbee.dev/docs/agents/n8n"
15
+ },
16
+ {
17
+ "url": "https://textbee.dev/docs/webhooks"
18
+ }
19
+ ]
20
+ },
21
+ "alias": ["SMS", "Incoming SMS", "Text message", "Webhook"]
22
+ }
package/package.json CHANGED
@@ -1,6 +1,75 @@
1
1
  {
2
2
  "name": "@textbee/n8n-nodes-textbee",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Official n8n nodes for textbee.dev: send and receive SMS through your own Android phone",
5
+ "license": "MIT",
6
+ "homepage": "https://textbee.dev/docs/agents/n8n",
7
+ "keywords": [
8
+ "n8n-community-node-package",
9
+ "n8n",
10
+ "textbee",
11
+ "sms",
12
+ "sms-gateway",
13
+ "android"
14
+ ],
15
+ "author": {
16
+ "name": "textbee",
17
+ "email": "contact@textbee.dev",
18
+ "url": "https://textbee.dev"
19
+ },
20
+ "contributors": [
21
+ "Julius Haring (https://github.com/JuliusHaring)"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/textbee/n8n-nodes-textbee.git"
26
+ },
27
+ "bugs": {
28
+ "url": "https://github.com/textbee/n8n-nodes-textbee/issues"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "engines": {
34
+ "node": ">=20.15.0"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "!dist/package.json",
39
+ "!dist/tsconfig.tsbuildinfo",
40
+ "LICENSE.md",
41
+ "NOTICE.md"
42
+ ],
43
+ "n8n": {
44
+ "n8nNodesApiVersion": 1,
45
+ "strict": true,
46
+ "credentials": [
47
+ "dist/credentials/TextbeeApi.credentials.js"
48
+ ],
49
+ "nodes": [
50
+ "dist/nodes/Textbee/Textbee.node.js",
51
+ "dist/nodes/TextbeeTrigger/TextbeeTrigger.node.js"
52
+ ]
53
+ },
54
+ "devDependencies": {
55
+ "@n8n/node-cli": "0.55.5",
56
+ "@types/node": "22.20.5",
57
+ "eslint": "9.29.0",
58
+ "n8n-workflow": "2.16.0",
59
+ "prettier": "3.9.10",
60
+ "typescript": "5.9.3",
61
+ "vitest": "5.1.0"
62
+ },
63
+ "peerDependencies": {
64
+ "n8n-workflow": "*"
65
+ },
66
+ "scripts": {
67
+ "build": "n8n-node build",
68
+ "dev": "n8n-node dev",
69
+ "lint": "n8n-node lint",
70
+ "lint:fix": "n8n-node lint --fix",
71
+ "typecheck": "tsc --noEmit",
72
+ "test": "vitest run --maxWorkers=2",
73
+ "check:hygiene": "node scripts/hygiene.mjs"
74
+ }
6
75
  }