n8n-nodes-happ 0.1.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 (27) hide show
  1. package/README.md +54 -0
  2. package/dist/credentials/HappApi.credentials.d.ts +9 -0
  3. package/dist/credentials/HappApi.credentials.js +54 -0
  4. package/dist/credentials/HappApi.credentials.js.map +1 -0
  5. package/dist/nodes/Happ/GenericFunctions.d.ts +3 -0
  6. package/dist/nodes/Happ/GenericFunctions.js +23 -0
  7. package/dist/nodes/Happ/GenericFunctions.js.map +1 -0
  8. package/dist/nodes/Happ/Happ.node.d.ts +10 -0
  9. package/dist/nodes/Happ/Happ.node.js +89 -0
  10. package/dist/nodes/Happ/Happ.node.js.map +1 -0
  11. package/dist/nodes/Happ/HappTrigger.node.d.ts +5 -0
  12. package/dist/nodes/Happ/HappTrigger.node.js +116 -0
  13. package/dist/nodes/Happ/HappTrigger.node.js.map +1 -0
  14. package/dist/nodes/Happ/descriptions/AssistantDescription.d.ts +3 -0
  15. package/dist/nodes/Happ/descriptions/AssistantDescription.js +440 -0
  16. package/dist/nodes/Happ/descriptions/AssistantDescription.js.map +1 -0
  17. package/dist/nodes/Happ/descriptions/ChatDescription.d.ts +3 -0
  18. package/dist/nodes/Happ/descriptions/ChatDescription.js +213 -0
  19. package/dist/nodes/Happ/descriptions/ChatDescription.js.map +1 -0
  20. package/dist/nodes/Happ/descriptions/MessageDescription.d.ts +6 -0
  21. package/dist/nodes/Happ/descriptions/MessageDescription.js +384 -0
  22. package/dist/nodes/Happ/descriptions/MessageDescription.js.map +1 -0
  23. package/dist/nodes/Happ/happ.svg +4 -0
  24. package/dist/nodes/Happ/triggerHelpers.d.ts +15 -0
  25. package/dist/nodes/Happ/triggerHelpers.js +55 -0
  26. package/dist/nodes/Happ/triggerHelpers.js.map +1 -0
  27. package/package.json +62 -0
@@ -0,0 +1,440 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assistantFields = exports.assistantOperations = void 0;
4
+ const audioFormatOptions = [
5
+ { name: 'PCM 8000', value: 'pcm_8000' },
6
+ { name: 'PCM 16000', value: 'pcm_16000' },
7
+ { name: 'PCM 22050', value: 'pcm_22050' },
8
+ { name: 'PCM 24000', value: 'pcm_24000' },
9
+ { name: 'PCM 44100', value: 'pcm_44100' },
10
+ { name: 'PCM 48000', value: 'pcm_48000' },
11
+ { name: 'ULAW 8000', value: 'ulaw_8000' },
12
+ ];
13
+ const assistantOptionalFields = [
14
+ {
15
+ displayName: 'Assistant Output Audio Format',
16
+ name: 'assistantOutputAudioFormat',
17
+ type: 'options',
18
+ options: audioFormatOptions,
19
+ default: 'pcm_16000',
20
+ description: 'Audio format of the assistant voice output',
21
+ routing: { send: { type: 'body', property: 'assistantOutputAudioFormat' } },
22
+ },
23
+ {
24
+ displayName: 'Disable First Message Interruption',
25
+ name: 'disableFirstMessageInterruption',
26
+ type: 'boolean',
27
+ default: false,
28
+ description: 'Whether to disable interruption of the first message',
29
+ routing: { send: { type: 'body', property: 'disableFirstMessageInterruption' } },
30
+ },
31
+ {
32
+ displayName: 'Eagerness',
33
+ name: 'eagerness',
34
+ type: 'options',
35
+ options: [
36
+ { name: 'Eager', value: 'eager' },
37
+ { name: 'Normal', value: 'normal' },
38
+ { name: 'Patient', value: 'patient' },
39
+ ],
40
+ default: 'normal',
41
+ description: 'How eagerly the assistant takes its turn in a conversation',
42
+ routing: { send: { type: 'body', property: 'eagerness' } },
43
+ },
44
+ {
45
+ displayName: 'ElevenLabs Voice ID',
46
+ name: 'elevenLabsVoiceId',
47
+ type: 'string',
48
+ default: '',
49
+ description: 'ElevenLabs voice identifier for speech synthesis',
50
+ routing: { send: { type: 'body', property: 'elevenLabsVoiceId' } },
51
+ },
52
+ {
53
+ displayName: 'First Message',
54
+ name: 'firstMessage',
55
+ type: 'string',
56
+ default: '',
57
+ description: 'Message the assistant says first when a conversation starts',
58
+ routing: { send: { type: 'body', property: 'firstMessage' } },
59
+ },
60
+ {
61
+ displayName: 'Language',
62
+ name: 'language',
63
+ type: 'string',
64
+ default: '',
65
+ description: 'Assistant language code, e.g. en or ru',
66
+ routing: { send: { type: 'body', property: 'language' } },
67
+ },
68
+ {
69
+ displayName: 'Provider ID',
70
+ name: 'providerId',
71
+ type: 'string',
72
+ default: '',
73
+ description: 'Provider ID for voice assistant integration',
74
+ routing: { send: { type: 'body', property: 'providerId' } },
75
+ },
76
+ {
77
+ displayName: 'Silence End Call Timeout',
78
+ name: 'silenceEndCallTimeout',
79
+ type: 'number',
80
+ default: -1,
81
+ description: 'Seconds of silence after which the call ends automatically. -1 disables, maximum 7200.',
82
+ routing: { send: { type: 'body', property: 'silenceEndCallTimeout' } },
83
+ },
84
+ {
85
+ displayName: 'Soft Timeout',
86
+ name: 'softTimeout',
87
+ type: 'number',
88
+ default: 0,
89
+ description: 'Soft timeout in seconds before the soft timeout message is played',
90
+ routing: { send: { type: 'body', property: 'softTimeout' } },
91
+ },
92
+ {
93
+ displayName: 'Soft Timeout Message',
94
+ name: 'softTimeoutMessage',
95
+ type: 'string',
96
+ default: '',
97
+ description: 'Message played when the soft timeout is reached',
98
+ routing: { send: { type: 'body', property: 'softTimeoutMessage' } },
99
+ },
100
+ {
101
+ displayName: 'Streaming Latency',
102
+ name: 'streamingLatency',
103
+ type: 'number',
104
+ typeOptions: { minValue: 0, maxValue: 4 },
105
+ default: 0,
106
+ description: 'Streaming latency optimization (0-4)',
107
+ routing: { send: { type: 'body', property: 'streamingLatency' } },
108
+ },
109
+ {
110
+ displayName: 'Text LLM Model ID',
111
+ name: 'textLlmModelId',
112
+ type: 'string',
113
+ default: '',
114
+ description: 'LLM model ID used for text chats',
115
+ routing: { send: { type: 'body', property: 'textLlmModelId' } },
116
+ },
117
+ {
118
+ displayName: 'TTS Model',
119
+ name: 'ttsModel',
120
+ type: 'string',
121
+ default: '',
122
+ description: 'Text-to-speech model name',
123
+ routing: { send: { type: 'body', property: 'ttsModel' } },
124
+ },
125
+ {
126
+ displayName: 'Turn After Silence',
127
+ name: 'turnAfterSilence',
128
+ type: 'number',
129
+ default: -1,
130
+ description: 'Max seconds since the user last spoke before the agent forces a turn. -1 waits indefinitely.',
131
+ routing: { send: { type: 'body', property: 'turnAfterSilence' } },
132
+ },
133
+ {
134
+ displayName: 'User Input Audio Format',
135
+ name: 'userInputAudioFormat',
136
+ type: 'options',
137
+ options: audioFormatOptions,
138
+ default: 'pcm_16000',
139
+ description: 'Audio format of the user voice input',
140
+ routing: { send: { type: 'body', property: 'userInputAudioFormat' } },
141
+ },
142
+ {
143
+ displayName: 'VA Voice',
144
+ name: 'vaVoice',
145
+ type: 'string',
146
+ default: '',
147
+ description: 'Voice assistant voice name',
148
+ routing: { send: { type: 'body', property: 'vaVoice' } },
149
+ },
150
+ {
151
+ displayName: 'Voice Assistant ID',
152
+ name: 'voiceAssistantId',
153
+ type: 'string',
154
+ default: '',
155
+ description: 'External voice assistant identifier',
156
+ routing: { send: { type: 'body', property: 'voiceAssistantId' } },
157
+ },
158
+ {
159
+ displayName: 'Voice LLM Model ID',
160
+ name: 'voiceLlmModelId',
161
+ type: 'string',
162
+ default: '',
163
+ description: 'LLM model ID used for voice calls',
164
+ routing: { send: { type: 'body', property: 'voiceLlmModelId' } },
165
+ },
166
+ ];
167
+ exports.assistantOperations = [
168
+ {
169
+ displayName: 'Operation',
170
+ name: 'operation',
171
+ type: 'options',
172
+ noDataExpression: true,
173
+ displayOptions: { show: { resource: ['assistant'] } },
174
+ options: [
175
+ {
176
+ name: 'Create',
177
+ value: 'create',
178
+ action: 'Create an assistant',
179
+ routing: { request: { method: 'POST', url: '/api/assistants' } },
180
+ },
181
+ {
182
+ name: 'Delete',
183
+ value: 'delete',
184
+ action: 'Delete an assistant',
185
+ routing: {
186
+ request: { method: 'DELETE', url: '=/api/assistants/{{$parameter.assistantId}}' },
187
+ },
188
+ },
189
+ {
190
+ name: 'Get',
191
+ value: 'get',
192
+ action: 'Get an assistant',
193
+ routing: {
194
+ request: { method: 'GET', url: '=/api/assistants/{{$parameter.assistantId}}' },
195
+ },
196
+ },
197
+ {
198
+ name: 'Get Many',
199
+ value: 'getMany',
200
+ action: 'Get many assistants',
201
+ routing: {
202
+ request: { method: 'GET', url: '/api/assistants' },
203
+ send: { paginate: '={{ $parameter.returnAll }}' },
204
+ operations: {
205
+ pagination: {
206
+ type: 'offset',
207
+ properties: {
208
+ limitParameter: 'take',
209
+ offsetParameter: 'skip',
210
+ pageSize: 100,
211
+ type: 'query',
212
+ },
213
+ },
214
+ },
215
+ },
216
+ },
217
+ {
218
+ name: 'Originate Call',
219
+ value: 'originateCall',
220
+ action: 'Start an outgoing call',
221
+ routing: {
222
+ request: {
223
+ method: 'POST',
224
+ url: '=/api/assistants/{{$parameter.assistantId}}/originate',
225
+ },
226
+ },
227
+ },
228
+ {
229
+ name: 'Update',
230
+ value: 'update',
231
+ action: 'Update an assistant',
232
+ routing: {
233
+ request: { method: 'PATCH', url: '=/api/assistants/{{$parameter.assistantId}}' },
234
+ },
235
+ },
236
+ ],
237
+ default: 'getMany',
238
+ },
239
+ ];
240
+ exports.assistantFields = [
241
+ {
242
+ displayName: 'Assistant Name or ID',
243
+ name: 'assistantId',
244
+ type: 'options',
245
+ typeOptions: { loadOptionsMethod: 'getAssistants' },
246
+ required: true,
247
+ default: '',
248
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
249
+ displayOptions: {
250
+ show: { resource: ['assistant'], operation: ['delete', 'get', 'originateCall', 'update'] },
251
+ },
252
+ },
253
+ {
254
+ displayName: 'Name',
255
+ name: 'name',
256
+ type: 'string',
257
+ required: true,
258
+ default: '',
259
+ description: 'Name of the assistant',
260
+ displayOptions: { show: { resource: ['assistant'], operation: ['create'] } },
261
+ routing: { send: { type: 'body', property: 'name' } },
262
+ },
263
+ {
264
+ displayName: 'Prompt Text',
265
+ name: 'promptText',
266
+ type: 'string',
267
+ typeOptions: { rows: 4 },
268
+ required: true,
269
+ default: '',
270
+ description: 'System prompt that defines the assistant behavior',
271
+ displayOptions: { show: { resource: ['assistant'], operation: ['create'] } },
272
+ routing: { send: { type: 'body', property: 'promptText' } },
273
+ },
274
+ {
275
+ displayName: 'Company Name or ID',
276
+ name: 'companyId',
277
+ type: 'options',
278
+ typeOptions: { loadOptionsMethod: 'getCompanies' },
279
+ required: true,
280
+ default: '',
281
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
282
+ displayOptions: { show: { resource: ['assistant'], operation: ['create'] } },
283
+ routing: { send: { type: 'body', property: 'companyId' } },
284
+ },
285
+ {
286
+ displayName: 'Additional Fields',
287
+ name: 'additionalFields',
288
+ type: 'collection',
289
+ placeholder: 'Add Field',
290
+ default: {},
291
+ displayOptions: { show: { resource: ['assistant'], operation: ['create'] } },
292
+ options: assistantOptionalFields,
293
+ },
294
+ {
295
+ displayName: 'Update Fields',
296
+ name: 'updateFields',
297
+ type: 'collection',
298
+ placeholder: 'Add Field',
299
+ default: {},
300
+ displayOptions: { show: { resource: ['assistant'], operation: ['update'] } },
301
+ options: [
302
+ {
303
+ displayName: 'Name',
304
+ name: 'name',
305
+ type: 'string',
306
+ default: '',
307
+ description: 'Name of the assistant',
308
+ routing: { send: { type: 'body', property: 'name' } },
309
+ },
310
+ {
311
+ displayName: 'Prompt Text',
312
+ name: 'promptText',
313
+ type: 'string',
314
+ typeOptions: { rows: 4 },
315
+ default: '',
316
+ description: 'System prompt that defines the assistant behavior',
317
+ routing: { send: { type: 'body', property: 'promptText' } },
318
+ },
319
+ ...assistantOptionalFields,
320
+ ],
321
+ },
322
+ {
323
+ displayName: 'Phone Number',
324
+ name: 'phoneNumber',
325
+ type: 'string',
326
+ required: true,
327
+ default: '',
328
+ description: 'Phone number to call: +&lt;digits&gt;, digits with country code (380...), or local format starting with 0',
329
+ displayOptions: { show: { resource: ['assistant'], operation: ['originateCall'] } },
330
+ routing: { send: { type: 'body', property: 'phoneNumber' } },
331
+ },
332
+ {
333
+ displayName: 'Additional Fields',
334
+ name: 'additionalFields',
335
+ type: 'collection',
336
+ placeholder: 'Add Field',
337
+ default: {},
338
+ displayOptions: { show: { resource: ['assistant'], operation: ['originateCall'] } },
339
+ options: [
340
+ {
341
+ displayName: 'Caller Assistant Name or ID',
342
+ name: 'callerAssistantId',
343
+ type: 'options',
344
+ typeOptions: { loadOptionsMethod: 'getAssistants' },
345
+ default: '',
346
+ description: 'Assistant to make the call as (must belong to the same company). If omitted, the route assistant is used. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
347
+ routing: { send: { type: 'body', property: 'callerAssistantId' } },
348
+ },
349
+ ],
350
+ },
351
+ {
352
+ displayName: 'Filters',
353
+ name: 'filters',
354
+ type: 'collection',
355
+ placeholder: 'Add Filter',
356
+ default: {},
357
+ displayOptions: { show: { resource: ['assistant'], operation: ['getMany'] } },
358
+ options: [
359
+ {
360
+ displayName: 'Company Name or ID',
361
+ name: 'companyId',
362
+ type: 'options',
363
+ typeOptions: { loadOptionsMethod: 'getCompanies' },
364
+ default: '',
365
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
366
+ routing: { send: { type: 'query', property: 'companyId' } },
367
+ },
368
+ {
369
+ displayName: 'Folder ID',
370
+ name: 'folderId',
371
+ type: 'string',
372
+ default: '',
373
+ description: 'Filter by folder ID',
374
+ routing: { send: { type: 'query', property: 'folderId' } },
375
+ },
376
+ {
377
+ displayName: 'Name',
378
+ name: 'name',
379
+ type: 'string',
380
+ default: '',
381
+ description: 'Filter by assistant name',
382
+ routing: { send: { type: 'query', property: 'name' } },
383
+ },
384
+ {
385
+ displayName: 'Search',
386
+ name: 'search',
387
+ type: 'string',
388
+ default: '',
389
+ description: 'Free-text search',
390
+ routing: { send: { type: 'query', property: 'search' } },
391
+ },
392
+ {
393
+ displayName: 'Type',
394
+ name: 'type',
395
+ type: 'options',
396
+ options: [
397
+ { name: 'Hybrid', value: 'hybrid' },
398
+ { name: 'Text', value: 'text' },
399
+ { name: 'Voice', value: 'voice' },
400
+ ],
401
+ default: 'text',
402
+ description: 'Filter by assistant type',
403
+ routing: { send: { type: 'query', property: 'type' } },
404
+ },
405
+ ],
406
+ },
407
+ {
408
+ displayName: 'Return All',
409
+ name: 'returnAll',
410
+ type: 'boolean',
411
+ default: false,
412
+ description: 'Whether to return all results or only up to a given limit',
413
+ displayOptions: { show: { resource: ['assistant'], operation: ['getMany'] } },
414
+ },
415
+ {
416
+ displayName: 'Limit',
417
+ name: 'limit',
418
+ type: 'number',
419
+ typeOptions: { minValue: 1 },
420
+ default: 50,
421
+ description: 'Max number of results to return',
422
+ displayOptions: {
423
+ show: { resource: ['assistant'], operation: ['getMany'], returnAll: [false] },
424
+ },
425
+ routing: { send: { type: 'query', property: 'take' } },
426
+ },
427
+ {
428
+ displayName: 'Skip',
429
+ name: 'skip',
430
+ type: 'number',
431
+ typeOptions: { minValue: 0 },
432
+ default: 0,
433
+ description: 'Number of results to skip from the start',
434
+ displayOptions: {
435
+ show: { resource: ['assistant'], operation: ['getMany'], returnAll: [false] },
436
+ },
437
+ routing: { send: { type: 'query', property: 'skip' } },
438
+ },
439
+ ];
440
+ //# sourceMappingURL=AssistantDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssistantDescription.js","sourceRoot":"","sources":["../../../../nodes/Happ/descriptions/AssistantDescription.ts"],"names":[],"mappings":";;;AAEA,MAAM,kBAAkB,GAA2B;IAClD,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACvC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IACzC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IACzC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IACzC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IACzC,EAAE,IAAI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AS,EAAE,CAAC,KAAK,CAAC,EAAE;SAC7E;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;KACtD;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE;QAC5B,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,0CAA0C;QACvD,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE;SAC7E;QACD,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;KACtD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const chatOperations: INodeProperties[];
3
+ export declare const chatFields: INodeProperties[];
@@ -0,0 +1,213 @@
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: { show: { resource: ['chat'] } },
11
+ options: [
12
+ {
13
+ name: 'Assign Assistant',
14
+ value: 'assignAssistant',
15
+ action: 'Assign an assistant to a chat',
16
+ routing: {
17
+ request: {
18
+ method: 'PATCH',
19
+ url: '=/api/chats/{{$parameter.chatId}}/assign-assistant',
20
+ },
21
+ },
22
+ },
23
+ {
24
+ name: 'Create',
25
+ value: 'create',
26
+ action: 'Create a chat',
27
+ routing: { request: { method: 'POST', url: '/api/chats' } },
28
+ },
29
+ {
30
+ name: 'Delete',
31
+ value: 'delete',
32
+ action: 'Delete a chat',
33
+ routing: { request: { method: 'DELETE', url: '=/api/chats/{{$parameter.chatId}}' } },
34
+ },
35
+ {
36
+ name: 'Get',
37
+ value: 'get',
38
+ action: 'Get a chat',
39
+ routing: { request: { method: 'GET', url: '=/api/chats/{{$parameter.chatId}}' } },
40
+ },
41
+ {
42
+ name: 'Get Many',
43
+ value: 'getMany',
44
+ action: 'Get many chats',
45
+ routing: {
46
+ request: { method: 'GET', url: '/api/chats' },
47
+ send: { paginate: '={{ $parameter.returnAll }}' },
48
+ operations: {
49
+ pagination: {
50
+ type: 'offset',
51
+ properties: {
52
+ limitParameter: 'take',
53
+ offsetParameter: 'skip',
54
+ pageSize: 100,
55
+ rootProperty: 'data',
56
+ type: 'query',
57
+ },
58
+ },
59
+ },
60
+ output: {
61
+ postReceive: [
62
+ {
63
+ type: 'rootProperty',
64
+ properties: { property: 'data' },
65
+ },
66
+ ],
67
+ },
68
+ },
69
+ },
70
+ {
71
+ name: 'Get Messengers',
72
+ value: 'getMessengers',
73
+ action: 'Get connected messengers',
74
+ routing: { request: { method: 'GET', url: '/api/chats/messengers' } },
75
+ },
76
+ {
77
+ name: 'Toggle AI Control',
78
+ value: 'toggleAiControl',
79
+ action: 'Toggle AI control for a chat',
80
+ routing: {
81
+ request: { method: 'PATCH', url: '=/api/chats/{{$parameter.chatId}}/ai-control' },
82
+ },
83
+ },
84
+ {
85
+ name: 'Unassign Assistant',
86
+ value: 'unassignAssistant',
87
+ action: 'Unassign the assistant from a chat',
88
+ routing: {
89
+ request: {
90
+ method: 'PATCH',
91
+ url: '=/api/chats/{{$parameter.chatId}}/unassign-assistant',
92
+ },
93
+ },
94
+ },
95
+ {
96
+ name: 'Update',
97
+ value: 'update',
98
+ action: 'Update a chat',
99
+ routing: { request: { method: 'PATCH', url: '=/api/chats/{{$parameter.chatId}}' } },
100
+ },
101
+ ],
102
+ default: 'getMany',
103
+ },
104
+ ];
105
+ exports.chatFields = [
106
+ {
107
+ displayName: 'Chat ID',
108
+ name: 'chatId',
109
+ type: 'string',
110
+ required: true,
111
+ default: '',
112
+ description: 'Unique identifier of the chat',
113
+ displayOptions: {
114
+ show: {
115
+ resource: ['chat'],
116
+ operation: [
117
+ 'assignAssistant',
118
+ 'delete',
119
+ 'get',
120
+ 'toggleAiControl',
121
+ 'unassignAssistant',
122
+ 'update',
123
+ ],
124
+ },
125
+ },
126
+ },
127
+ {
128
+ displayName: 'Include',
129
+ name: 'include',
130
+ type: 'string',
131
+ required: true,
132
+ default: 'messages',
133
+ description: 'Comma-separated list of related data to include, e.g. "messages"',
134
+ displayOptions: { show: { resource: ['chat'], operation: ['get'] } },
135
+ routing: { send: { type: 'query', property: 'include' } },
136
+ },
137
+ {
138
+ displayName: 'Assistant Name or ID',
139
+ name: 'assistantId',
140
+ type: 'options',
141
+ typeOptions: { loadOptionsMethod: 'getAssistants' },
142
+ required: true,
143
+ default: '',
144
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
145
+ displayOptions: { show: { resource: ['chat'], operation: ['assignAssistant'] } },
146
+ routing: { send: { type: 'body', property: 'assistantId' } },
147
+ },
148
+ {
149
+ displayName: 'AI Control Enabled',
150
+ name: 'isUnderAiControl',
151
+ type: 'boolean',
152
+ required: true,
153
+ default: true,
154
+ description: 'Whether the AI assistant handles this chat',
155
+ displayOptions: { show: { resource: ['chat'], operation: ['toggleAiControl'] } },
156
+ routing: { send: { type: 'body', property: 'isUnderAiControl' } },
157
+ },
158
+ {
159
+ displayName: 'AI Disable Reason',
160
+ name: 'aiDisableReason',
161
+ type: 'options',
162
+ options: [
163
+ { name: 'Auto', value: 'auto' },
164
+ { name: 'Manual', value: 'manual' },
165
+ ],
166
+ default: 'manual',
167
+ description: 'Reason for disabling AI control (applied only when disabling)',
168
+ displayOptions: {
169
+ show: { resource: ['chat'], operation: ['toggleAiControl'], isUnderAiControl: [false] },
170
+ },
171
+ routing: { send: { type: 'body', property: 'aiDisableReason' } },
172
+ },
173
+ {
174
+ displayName: 'Body (JSON)',
175
+ name: 'bodyJson',
176
+ type: 'json',
177
+ default: '{}',
178
+ description: 'Request body as JSON. The public API spec does not document chat fields — see the <a href="https://docs.happ.tools/en/docs/api">Happ docs</a>.',
179
+ displayOptions: { show: { resource: ['chat'], operation: ['create', 'update'] } },
180
+ routing: {
181
+ request: { body: '={{ typeof $value === "string" ? JSON.parse($value) : $value }}' },
182
+ },
183
+ },
184
+ {
185
+ displayName: 'Return All',
186
+ name: 'returnAll',
187
+ type: 'boolean',
188
+ default: false,
189
+ description: 'Whether to return all results or only up to a given limit',
190
+ displayOptions: { show: { resource: ['chat'], operation: ['getMany'] } },
191
+ },
192
+ {
193
+ displayName: 'Limit',
194
+ name: 'limit',
195
+ type: 'number',
196
+ typeOptions: { minValue: 1 },
197
+ default: 50,
198
+ description: 'Max number of results to return',
199
+ displayOptions: { show: { resource: ['chat'], operation: ['getMany'], returnAll: [false] } },
200
+ routing: { send: { type: 'query', property: 'take' } },
201
+ },
202
+ {
203
+ displayName: 'Skip',
204
+ name: 'skip',
205
+ type: 'number',
206
+ typeOptions: { minValue: 0 },
207
+ default: 0,
208
+ description: 'Number of results to skip from the start',
209
+ displayOptions: { show: { resource: ['chat'], operation: ['getMany'], returnAll: [false] } },
210
+ routing: { send: { type: 'query', property: 'skip' } },
211
+ },
212
+ ];
213
+ //# sourceMappingURL=ChatDescription.js.map