@textbee/n8n-nodes-textbee 0.0.0-stage → 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 (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 +79 -5
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const deviceDescription: INodeProperties[];
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deviceDescription = void 0;
4
+ const get_1 = require("./get");
5
+ const getAll_1 = require("./getAll");
6
+ const showOnlyForDevice = {
7
+ resource: ['device'],
8
+ };
9
+ exports.deviceDescription = [
10
+ {
11
+ displayName: 'Operation',
12
+ name: 'operation',
13
+ type: 'options',
14
+ noDataExpression: true,
15
+ displayOptions: {
16
+ show: showOnlyForDevice,
17
+ },
18
+ options: [
19
+ {
20
+ name: 'Get Many',
21
+ value: 'getAll',
22
+ action: 'Get many devices',
23
+ description: 'List every phone paired with your account',
24
+ routing: getAll_1.deviceGetManyRouting,
25
+ },
26
+ {
27
+ name: 'Get',
28
+ value: 'get',
29
+ action: 'Get a device',
30
+ description: 'Get full state of one device including heartbeat and SIM list',
31
+ routing: get_1.deviceGetRouting,
32
+ },
33
+ ],
34
+ default: 'getAll',
35
+ },
36
+ ...getAll_1.deviceGetManyDescription,
37
+ ...get_1.deviceGetDescription,
38
+ ];
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Textbee/resources/device/index.ts"],"names":[],"mappings":";;;AAEA,+BAA+D;AAC/D,qCAA0E;AAE1E,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACpB,CAAC;AAEW,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,iBAAiB;SACvB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,kBAAkB;gBAC1B,WAAW,EAAE,2CAA2C;gBACxD,OAAO,EAAE,6BAAoB;aAC7B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,cAAc;gBACtB,WAAW,EAAE,+DAA+D;gBAC5E,OAAO,EAAE,sBAAgB;aACzB;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;IACD,GAAG,iCAAwB;IAC3B,GAAG,0BAAoB;CACvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageGetDescription: INodeProperties[];
3
+ export declare const messageGetRouting: {
4
+ send: {
5
+ preSend: ((this: import("n8n-workflow").IExecuteSingleFunctions, requestOptions: import("n8n-workflow").IHttpRequestOptions) => Promise<import("n8n-workflow").IHttpRequestOptions>)[];
6
+ };
7
+ request: {
8
+ method: "GET";
9
+ url: string;
10
+ };
11
+ output: {
12
+ postReceive: {
13
+ type: "rootProperty";
14
+ properties: {
15
+ property: string;
16
+ };
17
+ }[];
18
+ };
19
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageGetRouting = exports.messageGetDescription = void 0;
4
+ const validation_1 = require("../../shared/validation");
5
+ const descriptions_1 = require("../../shared/descriptions");
6
+ const showOnlyForMessageGet = {
7
+ operation: ['get'],
8
+ resource: ['message'],
9
+ };
10
+ exports.messageGetDescription = [
11
+ {
12
+ ...descriptions_1.deviceIdProperty,
13
+ required: true,
14
+ displayOptions: {
15
+ show: showOnlyForMessageGet,
16
+ },
17
+ },
18
+ {
19
+ displayName: 'Message ID',
20
+ name: 'smsId',
21
+ type: 'string',
22
+ default: '',
23
+ required: true,
24
+ description: 'Message ID from the message history response',
25
+ displayOptions: {
26
+ show: showOnlyForMessageGet,
27
+ },
28
+ },
29
+ ];
30
+ exports.messageGetRouting = {
31
+ send: {
32
+ preSend: [(0, validation_1.requireObjectIds)('deviceId', 'smsId')],
33
+ },
34
+ request: {
35
+ method: 'GET',
36
+ url: '=/gateway/devices/{{$parameter.deviceId.value}}/sms/{{$parameter.smsId}}',
37
+ },
38
+ output: {
39
+ postReceive: descriptions_1.unwrapDataPostReceive,
40
+ },
41
+ };
42
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/Textbee/resources/message/get.ts"],"names":[],"mappings":";;;AAEA,wDAA2D;AAC3D,4DAAoF;AAEpF,MAAM,qBAAqB,GAAG;IAC7B,SAAS,EAAE,CAAC,KAAK,CAAC;IAClB,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEW,QAAA,qBAAqB,GAAsB;IACvD;QACC,GAAG,+BAAgB;QACnB,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,qBAAqB;SAC3B;KACD;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,8CAA8C;QAC3D,cAAc,EAAE;YACf,IAAI,EAAE,qBAAqB;SAC3B;KACD;CACD,CAAC;AAEW,QAAA,iBAAiB,GAAG;IAChC,IAAI,EAAE;QACL,OAAO,EAAE,CAAC,IAAA,6BAAgB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;KAChD;IACD,OAAO,EAAE;QACR,MAAM,EAAE,KAAc;QACtB,GAAG,EAAE,0EAA0E;KAC/E;IACD,MAAM,EAAE;QACP,WAAW,EAAE,oCAAqB;KAClC;CACD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageGetManyDescription: INodeProperties[];
3
+ export declare const messageGetManyRouting: {
4
+ request: {
5
+ method: "GET";
6
+ url: string;
7
+ };
8
+ output: {
9
+ postReceive: {
10
+ type: "rootProperty";
11
+ properties: {
12
+ property: string;
13
+ };
14
+ }[];
15
+ };
16
+ };
@@ -0,0 +1,240 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageGetManyRouting = exports.messageGetManyDescription = void 0;
4
+ const descriptions_1 = require("../../shared/descriptions");
5
+ const showOnlyForMessageGetMany = {
6
+ operation: ['getAll'],
7
+ resource: ['message'],
8
+ };
9
+ exports.messageGetManyDescription = [
10
+ {
11
+ displayName: 'Return All',
12
+ name: 'returnAll',
13
+ type: 'boolean',
14
+ displayOptions: {
15
+ show: showOnlyForMessageGetMany,
16
+ },
17
+ default: false,
18
+ description: 'Whether to return all results or only up to a given limit',
19
+ routing: {
20
+ send: {
21
+ paginate: '={{ $value }}',
22
+ type: 'query',
23
+ property: 'limit',
24
+ value: '100',
25
+ },
26
+ operations: {
27
+ pagination: {
28
+ type: 'generic',
29
+ properties: {
30
+ continue: '={{ Boolean($response.body?.meta?.hasMore && $response.body?.meta?.nextCursor) }}',
31
+ request: {
32
+ qs: {
33
+ cursor: '={{ $response.body.meta.nextCursor }}',
34
+ limit: 100,
35
+ },
36
+ },
37
+ },
38
+ },
39
+ },
40
+ },
41
+ },
42
+ {
43
+ displayName: 'Limit',
44
+ name: 'limit',
45
+ type: 'number',
46
+ displayOptions: {
47
+ show: {
48
+ ...showOnlyForMessageGetMany,
49
+ returnAll: [false],
50
+ },
51
+ },
52
+ typeOptions: {
53
+ minValue: 1,
54
+ maxValue: 100,
55
+ },
56
+ default: 50,
57
+ description: 'Max number of results to return',
58
+ routing: {
59
+ send: {
60
+ type: 'query',
61
+ property: 'limit',
62
+ },
63
+ output: {
64
+ maxResults: '={{$value}}',
65
+ },
66
+ },
67
+ },
68
+ {
69
+ displayName: 'Filters',
70
+ name: 'filters',
71
+ type: 'collection',
72
+ placeholder: 'Add Filter',
73
+ default: {},
74
+ displayOptions: {
75
+ show: showOnlyForMessageGetMany,
76
+ },
77
+ options: [
78
+ {
79
+ displayName: 'Cursor',
80
+ name: 'cursor',
81
+ type: 'string',
82
+ default: '',
83
+ description: 'Opaque position from a previous response nextCursor. Switches to cursor pagination mode.',
84
+ routing: {
85
+ send: {
86
+ type: 'query',
87
+ property: 'cursor',
88
+ },
89
+ },
90
+ },
91
+ {
92
+ displayName: 'Device IDs',
93
+ name: 'deviceIds',
94
+ type: 'string',
95
+ default: '',
96
+ description: 'Comma-separated device IDs to include',
97
+ routing: {
98
+ send: {
99
+ type: 'query',
100
+ property: 'deviceIds',
101
+ },
102
+ },
103
+ },
104
+ {
105
+ displayName: 'Direction',
106
+ name: 'direction',
107
+ type: 'options',
108
+ options: [
109
+ { name: 'All', value: 'all' },
110
+ { name: 'Received', value: 'received' },
111
+ { name: 'Sent', value: 'sent' },
112
+ ],
113
+ default: 'all',
114
+ description: 'Message direction filter (not the same as status)',
115
+ routing: {
116
+ send: {
117
+ type: 'query',
118
+ property: 'direction',
119
+ },
120
+ },
121
+ },
122
+ {
123
+ displayName: 'From',
124
+ name: 'from',
125
+ type: 'dateTime',
126
+ default: '',
127
+ description: 'Inclusive lower bound on createdAt (ISO 8601 with timezone, or a date like 2026-08-01)',
128
+ routing: {
129
+ send: {
130
+ type: 'query',
131
+ property: 'from',
132
+ value: '={{ $value ? new Date($value).toISOString() : undefined }}',
133
+ },
134
+ },
135
+ },
136
+ {
137
+ displayName: 'Order',
138
+ name: 'order',
139
+ type: 'options',
140
+ options: [
141
+ { name: 'Ascending', value: 'asc' },
142
+ { name: 'Descending', value: 'desc' },
143
+ ],
144
+ default: 'desc',
145
+ description: 'Desc for newest first; asc to walk forward when polling',
146
+ routing: {
147
+ send: {
148
+ type: 'query',
149
+ property: 'order',
150
+ },
151
+ },
152
+ },
153
+ {
154
+ displayName: 'Page',
155
+ name: 'page',
156
+ type: 'number',
157
+ default: 1,
158
+ description: 'Page to return (mutually exclusive with cursor)',
159
+ routing: {
160
+ send: {
161
+ type: 'query',
162
+ property: 'page',
163
+ },
164
+ },
165
+ },
166
+ {
167
+ displayName: 'Search',
168
+ name: 'search',
169
+ type: 'string',
170
+ default: '',
171
+ description: 'Match against message text and the other party number',
172
+ routing: {
173
+ send: {
174
+ type: 'query',
175
+ property: 'search',
176
+ },
177
+ },
178
+ },
179
+ {
180
+ displayName: 'SMS Batch ID',
181
+ name: 'smsBatchId',
182
+ type: 'string',
183
+ default: '',
184
+ description: 'Only messages from this send batch',
185
+ routing: {
186
+ send: {
187
+ type: 'query',
188
+ property: 'smsBatchId',
189
+ },
190
+ },
191
+ },
192
+ {
193
+ displayName: 'Status',
194
+ name: 'status',
195
+ type: 'options',
196
+ options: [
197
+ { name: 'Delivered', value: 'delivered' },
198
+ { name: 'Dispatched', value: 'dispatched' },
199
+ { name: 'Failed', value: 'failed' },
200
+ { name: 'Pending', value: 'pending' },
201
+ { name: 'Received', value: 'received' },
202
+ { name: 'Sent', value: 'sent' },
203
+ { name: 'Unknown', value: 'unknown' },
204
+ ],
205
+ default: 'sent',
206
+ description: 'Delivery state filter',
207
+ routing: {
208
+ send: {
209
+ type: 'query',
210
+ property: 'status',
211
+ },
212
+ },
213
+ },
214
+ {
215
+ displayName: 'To',
216
+ name: 'to',
217
+ type: 'dateTime',
218
+ default: '',
219
+ description: 'Exclusive upper bound on createdAt',
220
+ routing: {
221
+ send: {
222
+ type: 'query',
223
+ property: 'to',
224
+ value: '={{ $value ? new Date($value).toISOString() : undefined }}',
225
+ },
226
+ },
227
+ },
228
+ ],
229
+ },
230
+ ];
231
+ exports.messageGetManyRouting = {
232
+ request: {
233
+ method: 'GET',
234
+ url: '/gateway/messages',
235
+ },
236
+ output: {
237
+ postReceive: descriptions_1.unwrapDataPostReceive,
238
+ },
239
+ };
240
+ //# sourceMappingURL=getAll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/Textbee/resources/message/getAll.ts"],"names":[],"mappings":";;;AAEA,4DAAkE;AAElE,MAAM,yBAAyB,GAAG;IACjC,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE,yBAAyB;SAC/B;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,2DAA2D;QACxE,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,OAAO;gBACjB,KAAK,EAAE,KAAK;aACZ;YACD,UAAU,EAAE;gBACX,UAAU,EAAE;oBACX,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE;wBACX,QAAQ,EACP,mFAAmF;wBACpF,OAAO,EAAE;4BACR,EAAE,EAAE;gCACH,MAAM,EAAE,uCAAuC;gCAC/C,KAAK,EAAE,GAAG;6BACV;yBACD;qBACD;iBACD;aACD;SACD;KACD;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,GAAG,yBAAyB;gBAC5B,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,GAAG;SACb;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,I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,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageGetBatchDescription: INodeProperties[];
3
+ export declare const messageGetBatchRouting: {
4
+ send: {
5
+ preSend: ((this: import("n8n-workflow").IExecuteSingleFunctions, requestOptions: import("n8n-workflow").IHttpRequestOptions) => Promise<import("n8n-workflow").IHttpRequestOptions>)[];
6
+ };
7
+ request: {
8
+ method: "GET";
9
+ url: string;
10
+ };
11
+ output: {
12
+ postReceive: {
13
+ type: "rootProperty";
14
+ properties: {
15
+ property: string;
16
+ };
17
+ }[];
18
+ };
19
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageGetBatchRouting = exports.messageGetBatchDescription = void 0;
4
+ const validation_1 = require("../../shared/validation");
5
+ const descriptions_1 = require("../../shared/descriptions");
6
+ const showOnlyForMessageGetBatch = {
7
+ operation: ['getBatch'],
8
+ resource: ['message'],
9
+ };
10
+ exports.messageGetBatchDescription = [
11
+ {
12
+ ...descriptions_1.deviceIdProperty,
13
+ required: true,
14
+ displayOptions: {
15
+ show: showOnlyForMessageGetBatch,
16
+ },
17
+ },
18
+ {
19
+ displayName: 'SMS Batch ID',
20
+ name: 'smsBatchId',
21
+ type: 'string',
22
+ default: '',
23
+ required: true,
24
+ description: 'Batch ID returned as smsBatchId by the send endpoints',
25
+ displayOptions: {
26
+ show: showOnlyForMessageGetBatch,
27
+ },
28
+ },
29
+ ];
30
+ exports.messageGetBatchRouting = {
31
+ send: {
32
+ preSend: [(0, validation_1.requireObjectIds)('deviceId', 'smsBatchId')],
33
+ },
34
+ request: {
35
+ method: 'GET',
36
+ url: '=/gateway/devices/{{$parameter.deviceId.value}}/sms-batch/{{$parameter.smsBatchId}}',
37
+ },
38
+ output: {
39
+ postReceive: descriptions_1.unwrapDataPostReceive,
40
+ },
41
+ };
42
+ //# sourceMappingURL=getBatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBatch.js","sourceRoot":"","sources":["../../../../../nodes/Textbee/resources/message/getBatch.ts"],"names":[],"mappings":";;;AAEA,wDAA2D;AAC3D,4DAAoF;AAEpF,MAAM,0BAA0B,GAAG;IAClC,SAAS,EAAE,CAAC,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEW,QAAA,0BAA0B,GAAsB;IAC5D;QACC,GAAG,+BAAgB;QACnB,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,0BAA0B;SAChC;KACD;IACD;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,uDAAuD;QACpE,cAAc,EAAE;YACf,IAAI,EAAE,0BAA0B;SAChC;KACD;CACD,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACrC,IAAI,EAAE;QACL,OAAO,EAAE,CAAC,IAAA,6BAAgB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;KACrD;IACD,OAAO,EAAE;QACR,MAAM,EAAE,KAAc;QACtB,GAAG,EAAE,qFAAqF;KAC1F;IACD,MAAM,EAAE;QACP,WAAW,EAAE,oCAAqB;KAClC;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageDescription: INodeProperties[];
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageDescription = void 0;
4
+ const get_1 = require("./get");
5
+ const getAll_1 = require("./getAll");
6
+ const getBatch_1 = require("./getBatch");
7
+ const send_1 = require("./send");
8
+ const sendBulk_1 = require("./sendBulk");
9
+ const showOnlyForMessage = {
10
+ resource: ['message'],
11
+ };
12
+ exports.messageDescription = [
13
+ {
14
+ displayName: 'Operation',
15
+ name: 'operation',
16
+ type: 'options',
17
+ noDataExpression: true,
18
+ displayOptions: {
19
+ show: showOnlyForMessage,
20
+ },
21
+ options: [
22
+ {
23
+ name: 'Get',
24
+ value: 'get',
25
+ action: 'Get a message',
26
+ description: 'Get one sent or received message by device and message ID',
27
+ routing: get_1.messageGetRouting,
28
+ },
29
+ {
30
+ name: 'Get Batch',
31
+ value: 'getBatch',
32
+ action: 'Get a send batch',
33
+ description: 'Get a send batch and its per-recipient messages',
34
+ routing: getBatch_1.messageGetBatchRouting,
35
+ },
36
+ {
37
+ name: 'Get Many',
38
+ value: 'getAll',
39
+ action: 'Get many messages',
40
+ description: 'List sent and received messages with filters and pagination',
41
+ routing: getAll_1.messageGetManyRouting,
42
+ },
43
+ {
44
+ name: 'Send',
45
+ value: 'send',
46
+ action: 'Send an SMS',
47
+ description: 'Send one message to one or more recipients',
48
+ routing: send_1.messageSendRouting,
49
+ },
50
+ {
51
+ name: 'Send Bulk',
52
+ value: 'sendBulk',
53
+ action: 'Send bulk SMS',
54
+ description: 'Send several messages with their own text and recipients in one call',
55
+ routing: sendBulk_1.messageSendBulkRouting,
56
+ },
57
+ ],
58
+ default: 'send',
59
+ },
60
+ ...send_1.messageSendDescription,
61
+ ...sendBulk_1.messageSendBulkDescription,
62
+ ...getAll_1.messageGetManyDescription,
63
+ ...get_1.messageGetDescription,
64
+ ...getBatch_1.messageGetBatchDescription,
65
+ ];
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Textbee/resources/message/index.ts"],"names":[],"mappings":";;;AAEA,+BAAiE;AACjE,qCAA4E;AAC5E,yCAAgF;AAChF,iCAAoE;AACpE,yCAAgF;AAEhF,MAAM,kBAAkB,GAAG;IAC1B,QAAQ,EAAE,CAAC,SAAS,CAAC;CACrB,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,kBAAkB;SACxB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,eAAe;gBACvB,WAAW,EAAE,2DAA2D;gBACxE,OAAO,EAAE,uBAAiB;aAC1B;YACD;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,kBAAkB;gBAC1B,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE,iCAAsB;aAC/B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,MAAM,EAAE,mBAAmB;gBAC3B,WAAW,EAAE,6DAA6D;gBAC1E,OAAO,EAAE,8BAAqB;aAC9B;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,aAAa;gBACrB,WAAW,EAAE,4CAA4C;gBACzD,OAAO,EAAE,yBAAkB;aAC3B;YACD;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,eAAe;gBACvB,WAAW,EAAE,sEAAsE;gBACnF,OAAO,EAAE,iCAAsB;aAC/B;SACD;QACD,OAAO,EAAE,MAAM;KACf;IACD,GAAG,6BAAsB;IACzB,GAAG,qCAA0B;IAC7B,GAAG,kCAAyB;IAC5B,GAAG,2BAAqB;IACxB,GAAG,qCAA0B;CAC7B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageSendDescription: INodeProperties[];
3
+ export declare const messageSendRouting: {
4
+ send: {
5
+ preSend: ((this: import("n8n-workflow").IExecuteSingleFunctions, requestOptions: import("n8n-workflow").IHttpRequestOptions) => Promise<import("n8n-workflow").IHttpRequestOptions>)[];
6
+ };
7
+ request: {
8
+ method: "POST";
9
+ url: string;
10
+ };
11
+ output: {
12
+ postReceive: {
13
+ type: "rootProperty";
14
+ properties: {
15
+ property: string;
16
+ };
17
+ }[];
18
+ };
19
+ };
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageSendRouting = exports.messageSendDescription = void 0;
4
+ const validation_1 = require("../../shared/validation");
5
+ const descriptions_1 = require("../../shared/descriptions");
6
+ const showOnlyForMessageSend = {
7
+ operation: ['send'],
8
+ resource: ['message'],
9
+ };
10
+ exports.messageSendDescription = [
11
+ {
12
+ displayName: 'Message',
13
+ name: 'message',
14
+ type: 'string',
15
+ typeOptions: {
16
+ rows: 4,
17
+ },
18
+ default: '',
19
+ required: true,
20
+ description: 'Text of the SMS. Long messages are split into segments by the carrier.',
21
+ displayOptions: {
22
+ show: showOnlyForMessageSend,
23
+ },
24
+ routing: {
25
+ send: {
26
+ type: 'body',
27
+ property: 'message',
28
+ },
29
+ },
30
+ },
31
+ {
32
+ displayName: 'Recipients',
33
+ name: 'recipients',
34
+ type: 'string',
35
+ default: '',
36
+ required: true,
37
+ placeholder: '+12015550123, +12015550124',
38
+ description: 'Phone numbers in E.164 format. Separate multiple recipients with commas. Each recipient counts as one message against your plan.',
39
+ displayOptions: {
40
+ show: showOnlyForMessageSend,
41
+ },
42
+ routing: {
43
+ send: {
44
+ type: 'body',
45
+ property: 'recipients',
46
+ value: '={{ String($value).split(/[,\\n]/).map((r) => r.trim()).filter(Boolean) }}',
47
+ },
48
+ },
49
+ },
50
+ {
51
+ ...descriptions_1.deviceIdProperty,
52
+ displayOptions: {
53
+ show: showOnlyForMessageSend,
54
+ },
55
+ routing: {
56
+ send: {
57
+ type: 'body',
58
+ property: 'deviceId',
59
+ value: '={{ $value && $value.value ? $value.value : undefined }}',
60
+ },
61
+ },
62
+ },
63
+ {
64
+ displayName: 'Additional Fields',
65
+ name: 'additionalFields',
66
+ type: 'collection',
67
+ placeholder: 'Add Field',
68
+ default: {},
69
+ displayOptions: {
70
+ show: showOnlyForMessageSend,
71
+ },
72
+ options: [
73
+ {
74
+ displayName: 'SIM Subscription ID',
75
+ name: 'simSubscriptionId',
76
+ type: 'number',
77
+ default: 0,
78
+ description: 'SIM to send from (subscriptionId from the device simInfo). Defaults to the device default SIM. IDs can change after a SIM swap.',
79
+ routing: {
80
+ send: {
81
+ type: 'body',
82
+ property: 'simSubscriptionId',
83
+ },
84
+ },
85
+ },
86
+ {
87
+ displayName: 'Scheduled At',
88
+ name: 'scheduledAt',
89
+ type: 'dateTime',
90
+ default: '',
91
+ description: 'ISO 8601 time to send the message (must be in the future, up to 72 hours ahead). Omit to send now.',
92
+ routing: {
93
+ send: {
94
+ type: 'body',
95
+ property: 'scheduledAt',
96
+ value: '={{ $value ? new Date($value).toISOString() : undefined }}',
97
+ },
98
+ },
99
+ },
100
+ ],
101
+ },
102
+ {
103
+ displayName: 'A 200 response means textbee accepted and queued the message. It is not a delivery confirmation. Use Get Batch or List with smsBatchId to follow status.',
104
+ name: 'sendNotice',
105
+ type: 'notice',
106
+ default: '',
107
+ displayOptions: {
108
+ show: showOnlyForMessageSend,
109
+ },
110
+ },
111
+ ];
112
+ exports.messageSendRouting = {
113
+ send: {
114
+ preSend: [(0, validation_1.requireObjectIds)('deviceId?')],
115
+ },
116
+ request: {
117
+ method: 'POST',
118
+ url: '/gateway/send-sms',
119
+ },
120
+ output: {
121
+ postReceive: descriptions_1.unwrapDataPostReceive,
122
+ },
123
+ };
124
+ //# sourceMappingURL=send.js.map