n8n-nodes-bgos 0.3.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 (36) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +63 -0
  4. package/dist/credentials/BgosApi.credentials.d.ts +9 -0
  5. package/dist/credentials/BgosApi.credentials.js +42 -0
  6. package/dist/icons/bgos.png +0 -0
  7. package/dist/icons/bgos.svg +5 -0
  8. package/dist/nodes/BGOSAction/BGOSAction.node.d.ts +5 -0
  9. package/dist/nodes/BGOSAction/BGOSAction.node.js +141 -0
  10. package/dist/nodes/BGOSAction/EventTypes.d.ts +21 -0
  11. package/dist/nodes/BGOSAction/EventTypes.js +25 -0
  12. package/dist/nodes/BGOSAction/agentWebhook.d.ts +1 -0
  13. package/dist/nodes/BGOSAction/agentWebhook.js +66 -0
  14. package/dist/nodes/BGOSAction/handler/eventHandler.d.ts +12 -0
  15. package/dist/nodes/BGOSAction/handler/eventHandler.js +137 -0
  16. package/dist/nodes/BGOSAction/rateLimiter.d.ts +2 -0
  17. package/dist/nodes/BGOSAction/rateLimiter.js +37 -0
  18. package/dist/nodes/BGOSAction/techWebhook.d.ts +43 -0
  19. package/dist/nodes/BGOSAction/techWebhook.js +133 -0
  20. package/dist/nodes/Bgos/Bgos.node.d.ts +4 -0
  21. package/dist/nodes/Bgos/Bgos.node.js +64 -0
  22. package/dist/nodes/Bgos/resources/assistant/index.d.ts +3 -0
  23. package/dist/nodes/Bgos/resources/assistant/index.js +362 -0
  24. package/dist/nodes/Bgos/resources/chat/index.d.ts +3 -0
  25. package/dist/nodes/Bgos/resources/chat/index.js +286 -0
  26. package/dist/nodes/Bgos/resources/message/index.d.ts +3 -0
  27. package/dist/nodes/Bgos/resources/message/index.js +881 -0
  28. package/dist/nodes/Bgos/resources/scheduledTask/index.d.ts +3 -0
  29. package/dist/nodes/Bgos/resources/scheduledTask/index.js +85 -0
  30. package/dist/nodes/Bgos/resources/user/index.d.ts +3 -0
  31. package/dist/nodes/Bgos/resources/user/index.js +158 -0
  32. package/dist/nodes/BgosTrigger/BgosTrigger.node.d.ts +12 -0
  33. package/dist/nodes/BgosTrigger/BgosTrigger.node.js +142 -0
  34. package/dist/nodes/BgosTrigger/stubs.d.ts +4 -0
  35. package/dist/nodes/BgosTrigger/stubs.js +86 -0
  36. package/package.json +71 -0
@@ -0,0 +1,286 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chatFields = exports.chatOperations = void 0;
4
+ exports.chatOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['chat'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Create Chat',
18
+ value: 'createChat',
19
+ description: 'Create a new chat',
20
+ routing: {
21
+ request: {
22
+ method: 'POST',
23
+ url: '/api/v1/chats',
24
+ },
25
+ },
26
+ action: 'Create a chat',
27
+ },
28
+ {
29
+ name: 'Get Chat',
30
+ value: 'getChat',
31
+ description: 'Get a chat by ID',
32
+ routing: {
33
+ request: {
34
+ method: 'GET',
35
+ url: '=/api/v1/chats/{{$parameter.chatId}}/details',
36
+ },
37
+ },
38
+ action: 'Get a chat',
39
+ },
40
+ {
41
+ name: 'Rename Chat',
42
+ value: 'renameChat',
43
+ description: 'Rename a chat',
44
+ routing: {
45
+ request: {
46
+ method: 'PATCH',
47
+ url: '=/api/v1/chats/{{$parameter.chatId}}/title',
48
+ },
49
+ },
50
+ action: 'Rename a chat',
51
+ },
52
+ {
53
+ name: 'Delete Chat',
54
+ value: 'deleteChat',
55
+ description: 'Delete a chat',
56
+ routing: {
57
+ request: {
58
+ method: 'DELETE',
59
+ url: '=/api/v1/chats/{{$parameter.chatId}}',
60
+ },
61
+ },
62
+ action: 'Delete a chat',
63
+ },
64
+ {
65
+ name: 'Get Messages',
66
+ value: 'getMessages',
67
+ description: 'Get messages from a chat',
68
+ routing: {
69
+ request: {
70
+ method: 'GET',
71
+ url: '=/api/v1/chats/{{$parameter.chatId}}/messages',
72
+ },
73
+ },
74
+ action: 'Get messages from a chat',
75
+ },
76
+ {
77
+ name: 'Get Unread Counts',
78
+ value: 'getUnread',
79
+ description: 'Get unread message counts for a user',
80
+ routing: {
81
+ request: {
82
+ method: 'GET',
83
+ url: '=/api/v1/chats/unread/{{$parameter.userId}}',
84
+ },
85
+ },
86
+ action: 'Get unread counts',
87
+ },
88
+ {
89
+ name: 'Increment Unread',
90
+ value: 'incrementUnread',
91
+ description: 'Increment unread counter for a chat',
92
+ routing: {
93
+ request: {
94
+ method: 'PATCH',
95
+ url: '=/api/v1/chats/{{$parameter.chatId}}/unread',
96
+ },
97
+ },
98
+ action: 'Increment unread counter',
99
+ },
100
+ {
101
+ name: 'Mark as Read',
102
+ value: 'markAsRead',
103
+ description: 'Reset unread counter for a chat',
104
+ routing: {
105
+ request: {
106
+ method: 'PATCH',
107
+ url: '=/api/v1/chats/{{$parameter.chatId}}/unread/reset',
108
+ },
109
+ },
110
+ action: 'Mark chat as read',
111
+ },
112
+ ],
113
+ default: 'createChat',
114
+ },
115
+ ];
116
+ exports.chatFields = [
117
+ // --- chatId (shared by many ops) ---
118
+ {
119
+ displayName: 'Chat ID',
120
+ name: 'chatId',
121
+ type: 'number',
122
+ required: true,
123
+ default: 0,
124
+ displayOptions: {
125
+ show: {
126
+ resource: ['chat'],
127
+ operation: ['getChat', 'renameChat', 'deleteChat', 'getMessages', 'incrementUnread', 'markAsRead'],
128
+ },
129
+ },
130
+ description: 'The chat ID',
131
+ },
132
+ // --- userId (shared by multiple ops) ---
133
+ {
134
+ displayName: 'User ID',
135
+ name: 'userId',
136
+ type: 'string',
137
+ required: true,
138
+ default: '',
139
+ displayOptions: {
140
+ show: {
141
+ resource: ['chat'],
142
+ operation: ['getChat', 'getMessages', 'getUnread', 'markAsRead'],
143
+ },
144
+ },
145
+ description: 'The user ID',
146
+ },
147
+ // --- createChat fields ---
148
+ {
149
+ displayName: 'Assistant ID',
150
+ name: 'assistantId',
151
+ type: 'number',
152
+ required: true,
153
+ default: 0,
154
+ displayOptions: {
155
+ show: {
156
+ resource: ['chat'],
157
+ operation: ['createChat'],
158
+ },
159
+ },
160
+ routing: {
161
+ send: {
162
+ type: 'body',
163
+ property: 'assistantId',
164
+ },
165
+ },
166
+ description: 'The assistant ID to create the chat under',
167
+ },
168
+ {
169
+ displayName: 'Title',
170
+ name: 'title',
171
+ type: 'string',
172
+ default: '',
173
+ displayOptions: {
174
+ show: {
175
+ resource: ['chat'],
176
+ operation: ['createChat'],
177
+ },
178
+ },
179
+ routing: {
180
+ send: {
181
+ type: 'body',
182
+ property: 'title',
183
+ },
184
+ },
185
+ description: 'Optional chat title',
186
+ },
187
+ // --- renameChat fields ---
188
+ {
189
+ displayName: 'User ID',
190
+ name: 'userId',
191
+ type: 'string',
192
+ required: true,
193
+ default: '',
194
+ displayOptions: {
195
+ show: {
196
+ resource: ['chat'],
197
+ operation: ['renameChat'],
198
+ },
199
+ },
200
+ routing: {
201
+ send: {
202
+ type: 'body',
203
+ property: 'userId',
204
+ },
205
+ },
206
+ description: 'The user ID (for ownership validation)',
207
+ },
208
+ {
209
+ displayName: 'Title',
210
+ name: 'title',
211
+ type: 'string',
212
+ required: true,
213
+ default: '',
214
+ displayOptions: {
215
+ show: {
216
+ resource: ['chat'],
217
+ operation: ['renameChat'],
218
+ },
219
+ },
220
+ routing: {
221
+ send: {
222
+ type: 'body',
223
+ property: 'title',
224
+ },
225
+ },
226
+ description: 'The new chat title',
227
+ },
228
+ // --- markAsRead body ---
229
+ {
230
+ // Hidden userId for markAsRead body - we reuse the shared userId field via routing
231
+ displayName: 'Mark As Read User ID',
232
+ name: 'markAsReadUserId',
233
+ type: 'hidden',
234
+ default: '={{$parameter.userId}}',
235
+ displayOptions: {
236
+ show: {
237
+ resource: ['chat'],
238
+ operation: ['markAsRead'],
239
+ },
240
+ },
241
+ routing: {
242
+ send: {
243
+ type: 'body',
244
+ property: 'userId',
245
+ },
246
+ },
247
+ },
248
+ // --- getChat query param ---
249
+ {
250
+ displayName: 'Get Chat User ID Query',
251
+ name: 'getChatUserIdQuery',
252
+ type: 'hidden',
253
+ default: '={{$parameter.userId}}',
254
+ displayOptions: {
255
+ show: {
256
+ resource: ['chat'],
257
+ operation: ['getChat'],
258
+ },
259
+ },
260
+ routing: {
261
+ send: {
262
+ type: 'query',
263
+ property: 'userId',
264
+ },
265
+ },
266
+ },
267
+ // --- getMessages query param ---
268
+ {
269
+ displayName: 'Get Messages User ID Query',
270
+ name: 'getMessagesUserIdQuery',
271
+ type: 'hidden',
272
+ default: '={{$parameter.userId}}',
273
+ displayOptions: {
274
+ show: {
275
+ resource: ['chat'],
276
+ operation: ['getMessages'],
277
+ },
278
+ },
279
+ routing: {
280
+ send: {
281
+ type: 'query',
282
+ property: 'userId',
283
+ },
284
+ },
285
+ },
286
+ ];
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const messageOperations: INodeProperties[];
3
+ export declare const messageFields: INodeProperties[];