@winning-sales/nexo 0.7.1 → 0.9.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.
- package/README.md +53 -3
- package/assets/connect/connect-sdk.d.ts +294 -11
- package/assets/connect/manifest.schema.json +598 -9
- package/assets/docs/pages.json +1 -1
- package/assets/skills/nexo-api/SKILL.md +8 -0
- package/assets/skills/nexo-automations/SKILL.md +10 -0
- package/assets/skills/nexo-connect/SKILL.md +15 -4
- package/assets/skills/nexo-dashboards/SKILL.md +2 -0
- package/dist/commands/agents.js +241 -0
- package/dist/commands/automations.js +32 -17
- package/dist/commands/brain.js +16 -1
- package/dist/commands/connect-access.js +64 -23
- package/dist/commands/context-company.js +137 -0
- package/dist/commands/knowledge.js +261 -0
- package/dist/connect/access.js +81 -7
- package/dist/connect/changes.js +12 -1
- package/dist/connect/runs.js +1 -1
- package/dist/program-agents.js +65 -0
- package/dist/program-brain.js +1 -0
- package/dist/program-connect-access.js +16 -9
- package/dist/program-context.js +61 -0
- package/dist/program-knowledge.js +130 -0
- package/dist/program.js +10 -1
- package/dist/tools/tool-manifest.js +30 -1
- package/package.json +1 -1
- package/reference.json +945 -132
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
"maximum": 1
|
|
13
13
|
},
|
|
14
14
|
"triggers": {
|
|
15
|
-
"description": "What starts a run: up to five, any mix of cron, webhook and Nexo
|
|
15
|
+
"description": "What starts a run: up to five, any mix of cron, webhook, Nexo event and call (called by a flow of the Nexo); none only when the connector declares operations",
|
|
16
16
|
"type": "array",
|
|
17
|
-
"minItems": 1,
|
|
18
17
|
"maxItems": 5,
|
|
19
18
|
"items": {
|
|
20
19
|
"oneOf": [
|
|
@@ -22,33 +21,194 @@
|
|
|
22
21
|
"type": "object",
|
|
23
22
|
"properties": {
|
|
24
23
|
"type": {
|
|
25
|
-
"description": "Runs on a schedule
|
|
24
|
+
"description": "Runs on a schedule: every everyMinutes minutes, or at fixed times of the day (at, and the days) in the company time zone",
|
|
26
25
|
"type": "string",
|
|
27
26
|
"enum": [
|
|
28
27
|
"cron"
|
|
29
28
|
]
|
|
30
29
|
},
|
|
31
30
|
"everyMinutes": {
|
|
32
|
-
"description": "Interval between runs, in minutes",
|
|
31
|
+
"description": "Interval between runs, in minutes; use it or at, never both",
|
|
33
32
|
"type": "integer",
|
|
34
33
|
"minimum": 5,
|
|
35
34
|
"maximum": 1440
|
|
35
|
+
},
|
|
36
|
+
"at": {
|
|
37
|
+
"description": "Time of day (HH:MM, company time zone) or a list of times, up to 24, none repeated; use it or everyMinutes, never both",
|
|
38
|
+
"oneOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "array",
|
|
45
|
+
"minItems": 1,
|
|
46
|
+
"maxItems": 24,
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"days": {
|
|
55
|
+
"description": "Days of the week the fixed times run (mon, tue, wed, thu, fri, sat, sun); every day when left out; only with at",
|
|
56
|
+
"type": "array",
|
|
57
|
+
"minItems": 1,
|
|
58
|
+
"maxItems": 7,
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"enum": [
|
|
62
|
+
"mon",
|
|
63
|
+
"tue",
|
|
64
|
+
"wed",
|
|
65
|
+
"thu",
|
|
66
|
+
"fri",
|
|
67
|
+
"sat",
|
|
68
|
+
"sun"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
36
71
|
}
|
|
37
72
|
},
|
|
38
73
|
"required": [
|
|
39
|
-
"type"
|
|
40
|
-
"everyMinutes"
|
|
74
|
+
"type"
|
|
41
75
|
]
|
|
42
76
|
},
|
|
43
77
|
{
|
|
44
78
|
"type": "object",
|
|
45
79
|
"properties": {
|
|
46
80
|
"type": {
|
|
47
|
-
"description": "Runs when the other system calls the connector's
|
|
81
|
+
"description": "Runs when the other system calls the connector's webhook",
|
|
48
82
|
"type": "string",
|
|
49
83
|
"enum": [
|
|
50
84
|
"webhook"
|
|
51
85
|
]
|
|
86
|
+
},
|
|
87
|
+
"auth": {
|
|
88
|
+
"description": "How the other system proves the call is its own: without it, the token of the webhook's address is enough; with it, a call that fails the check runs nothing",
|
|
89
|
+
"oneOf": [
|
|
90
|
+
{
|
|
91
|
+
"type": "object",
|
|
92
|
+
"properties": {
|
|
93
|
+
"type": {
|
|
94
|
+
"description": "The call carries the value of the secret in a header",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enum": [
|
|
97
|
+
"header"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"header": {
|
|
101
|
+
"description": "Name of the header that carries the value",
|
|
102
|
+
"type": "string",
|
|
103
|
+
"pattern": "^[A-Za-z0-9-]{1,100}$"
|
|
104
|
+
},
|
|
105
|
+
"secret": {
|
|
106
|
+
"description": "Name of the secret, declared in secrets, whose value the header must carry",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,63}$"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": [
|
|
112
|
+
"type",
|
|
113
|
+
"header",
|
|
114
|
+
"secret"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"type": {
|
|
121
|
+
"description": "The call carries a user and a password, in the authorization header (HTTP Basic)",
|
|
122
|
+
"type": "string",
|
|
123
|
+
"enum": [
|
|
124
|
+
"basic"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"user": {
|
|
128
|
+
"description": "Name of the secret, declared in secrets, that holds the user",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,63}$"
|
|
131
|
+
},
|
|
132
|
+
"secret": {
|
|
133
|
+
"description": "Name of the secret, declared in secrets, that holds the password",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,63}$"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"type",
|
|
140
|
+
"user",
|
|
141
|
+
"secret"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"type": {
|
|
148
|
+
"description": "The call carries a signature of the raw body, made with the secret",
|
|
149
|
+
"type": "string",
|
|
150
|
+
"enum": [
|
|
151
|
+
"hmac"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"header": {
|
|
155
|
+
"description": "Name of the header that carries the signature",
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^[A-Za-z0-9-]{1,100}$"
|
|
158
|
+
},
|
|
159
|
+
"secret": {
|
|
160
|
+
"description": "Name of the secret, declared in secrets, that signs",
|
|
161
|
+
"type": "string",
|
|
162
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,63}$"
|
|
163
|
+
},
|
|
164
|
+
"algorithm": {
|
|
165
|
+
"description": "sha256 (the default) or sha1",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": [
|
|
168
|
+
"sha256",
|
|
169
|
+
"sha1"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"encoding": {
|
|
173
|
+
"description": "How the signature is written: hex (the default) or base64",
|
|
174
|
+
"type": "string",
|
|
175
|
+
"enum": [
|
|
176
|
+
"hex",
|
|
177
|
+
"base64"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"prefix": {
|
|
181
|
+
"description": "Text before the signature in the header, such as sha256=",
|
|
182
|
+
"type": "string",
|
|
183
|
+
"maxLength": 40
|
|
184
|
+
},
|
|
185
|
+
"signed": {
|
|
186
|
+
"description": "What is signed: body (the default) or timestamp.body, the timestamp of timestampHeader, a dot and the body",
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": [
|
|
189
|
+
"body",
|
|
190
|
+
"timestamp.body"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"timestampHeader": {
|
|
194
|
+
"description": "Header with the moment of the call, in seconds since 1970; only with timestamp.body, where it is required",
|
|
195
|
+
"type": "string",
|
|
196
|
+
"pattern": "^[A-Za-z0-9-]{1,100}$"
|
|
197
|
+
},
|
|
198
|
+
"toleranceSeconds": {
|
|
199
|
+
"description": "How old the moment of the call may be, in seconds (300 by default); only with timestamp.body",
|
|
200
|
+
"type": "integer",
|
|
201
|
+
"minimum": 1,
|
|
202
|
+
"maximum": 86400
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": [
|
|
206
|
+
"type",
|
|
207
|
+
"header",
|
|
208
|
+
"secret"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
52
212
|
}
|
|
53
213
|
},
|
|
54
214
|
"required": [
|
|
@@ -87,6 +247,61 @@
|
|
|
87
247
|
"type",
|
|
88
248
|
"event"
|
|
89
249
|
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"type": {
|
|
255
|
+
"description": "Runs when another module of the Nexo calls the connector, with an input of the call contract (ctx.input)",
|
|
256
|
+
"type": "string",
|
|
257
|
+
"enum": [
|
|
258
|
+
"call"
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"args": {
|
|
262
|
+
"description": "Extra values the caller fills in for each call, read in ctx.input.args by key",
|
|
263
|
+
"type": "array",
|
|
264
|
+
"maxItems": 10,
|
|
265
|
+
"items": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"properties": {
|
|
268
|
+
"key": {
|
|
269
|
+
"description": "Name of the argument in ctx.input.args",
|
|
270
|
+
"type": "string",
|
|
271
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
272
|
+
},
|
|
273
|
+
"label": {
|
|
274
|
+
"description": "What the argument is, in Portuguese",
|
|
275
|
+
"type": "string",
|
|
276
|
+
"minLength": 1,
|
|
277
|
+
"maxLength": 80
|
|
278
|
+
},
|
|
279
|
+
"type": {
|
|
280
|
+
"description": "text, number or boolean",
|
|
281
|
+
"type": "string",
|
|
282
|
+
"enum": [
|
|
283
|
+
"text",
|
|
284
|
+
"number",
|
|
285
|
+
"boolean"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"required": {
|
|
289
|
+
"description": "Whether the caller must fill it in",
|
|
290
|
+
"type": "boolean",
|
|
291
|
+
"default": false
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": [
|
|
295
|
+
"key",
|
|
296
|
+
"label",
|
|
297
|
+
"type"
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": [
|
|
303
|
+
"type"
|
|
304
|
+
]
|
|
90
305
|
}
|
|
91
306
|
]
|
|
92
307
|
}
|
|
@@ -206,7 +421,7 @@
|
|
|
206
421
|
"reads": {
|
|
207
422
|
"description": "Nexo objects the connector searches",
|
|
208
423
|
"type": "array",
|
|
209
|
-
"maxItems":
|
|
424
|
+
"maxItems": 14,
|
|
210
425
|
"items": {
|
|
211
426
|
"type": "string",
|
|
212
427
|
"enum": [
|
|
@@ -216,7 +431,14 @@
|
|
|
216
431
|
"lead",
|
|
217
432
|
"ticket",
|
|
218
433
|
"product",
|
|
219
|
-
"
|
|
434
|
+
"whatsapp_chat",
|
|
435
|
+
"meeting",
|
|
436
|
+
"task",
|
|
437
|
+
"document",
|
|
438
|
+
"negotiation",
|
|
439
|
+
"temperature",
|
|
440
|
+
"lead_arrival",
|
|
441
|
+
"person"
|
|
220
442
|
]
|
|
221
443
|
}
|
|
222
444
|
},
|
|
@@ -273,6 +495,144 @@
|
|
|
273
495
|
"description": "Whether the connector writes into the other system",
|
|
274
496
|
"type": "boolean"
|
|
275
497
|
},
|
|
498
|
+
"users": {
|
|
499
|
+
"description": "What the connector does with the company people besides finding them: ensure adds a missing e-mail as a person only on the list (viewer seat, read-only profile, no login, no e-mail) with ctx.nexo.users.ensure",
|
|
500
|
+
"type": "array",
|
|
501
|
+
"maxItems": 1,
|
|
502
|
+
"items": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"enum": [
|
|
505
|
+
"ensure"
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"output": {
|
|
510
|
+
"description": "What the code returns as { output } for whoever called it: checked against these fields when the run closes",
|
|
511
|
+
"type": "object",
|
|
512
|
+
"properties": {
|
|
513
|
+
"fields": {
|
|
514
|
+
"description": "The fields of the returned object",
|
|
515
|
+
"type": "array",
|
|
516
|
+
"minItems": 1,
|
|
517
|
+
"maxItems": 20,
|
|
518
|
+
"items": {
|
|
519
|
+
"type": "object",
|
|
520
|
+
"properties": {
|
|
521
|
+
"key": {
|
|
522
|
+
"description": "Name of the field in the object the code returns",
|
|
523
|
+
"type": "string",
|
|
524
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
525
|
+
},
|
|
526
|
+
"label": {
|
|
527
|
+
"description": "What the field is, in Portuguese",
|
|
528
|
+
"type": "string",
|
|
529
|
+
"minLength": 1,
|
|
530
|
+
"maxLength": 80
|
|
531
|
+
},
|
|
532
|
+
"type": {
|
|
533
|
+
"description": "text, number, boolean, date (ISO 8601), option (one of options), list (items with itemFields), html (an e-mail body, cleaned when the run closes) or json (a free object or list, checked only by its size; only in an operation)",
|
|
534
|
+
"type": "string",
|
|
535
|
+
"enum": [
|
|
536
|
+
"text",
|
|
537
|
+
"number",
|
|
538
|
+
"boolean",
|
|
539
|
+
"date",
|
|
540
|
+
"option",
|
|
541
|
+
"list",
|
|
542
|
+
"html",
|
|
543
|
+
"json"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
"options": {
|
|
547
|
+
"description": "The allowed values of an option field",
|
|
548
|
+
"type": "array",
|
|
549
|
+
"minItems": 1,
|
|
550
|
+
"maxItems": 30,
|
|
551
|
+
"items": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"minLength": 1,
|
|
554
|
+
"maxLength": 80
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"itemFields": {
|
|
558
|
+
"description": "The simple fields of each item of a list field: up to 10 fields, and the list has up to 50 items",
|
|
559
|
+
"type": "array",
|
|
560
|
+
"minItems": 1,
|
|
561
|
+
"maxItems": 10,
|
|
562
|
+
"items": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"properties": {
|
|
565
|
+
"key": {
|
|
566
|
+
"description": "Name of the field in each item of the list",
|
|
567
|
+
"type": "string",
|
|
568
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
569
|
+
},
|
|
570
|
+
"label": {
|
|
571
|
+
"description": "What the field is, in Portuguese",
|
|
572
|
+
"type": "string",
|
|
573
|
+
"minLength": 1,
|
|
574
|
+
"maxLength": 80
|
|
575
|
+
},
|
|
576
|
+
"type": {
|
|
577
|
+
"description": "text, number, boolean, date (ISO 8601) or option (one of options)",
|
|
578
|
+
"type": "string",
|
|
579
|
+
"enum": [
|
|
580
|
+
"text",
|
|
581
|
+
"number",
|
|
582
|
+
"boolean",
|
|
583
|
+
"date",
|
|
584
|
+
"option"
|
|
585
|
+
]
|
|
586
|
+
},
|
|
587
|
+
"options": {
|
|
588
|
+
"description": "The allowed values of an option field",
|
|
589
|
+
"type": "array",
|
|
590
|
+
"minItems": 1,
|
|
591
|
+
"maxItems": 30,
|
|
592
|
+
"items": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"minLength": 1,
|
|
595
|
+
"maxLength": 80
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
"required": {
|
|
599
|
+
"description": "Whether every item always has the field",
|
|
600
|
+
"type": "boolean",
|
|
601
|
+
"default": false
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"required": [
|
|
605
|
+
"key",
|
|
606
|
+
"label",
|
|
607
|
+
"type"
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
"required": {
|
|
612
|
+
"description": "Whether the code always returns the field",
|
|
613
|
+
"type": "boolean",
|
|
614
|
+
"default": false
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"required": [
|
|
618
|
+
"key",
|
|
619
|
+
"label",
|
|
620
|
+
"type"
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"maxBytes": {
|
|
625
|
+
"description": "Largest output, serialized, in bytes",
|
|
626
|
+
"type": "integer",
|
|
627
|
+
"minimum": 64,
|
|
628
|
+
"maximum": 65536,
|
|
629
|
+
"default": 4096
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"required": [
|
|
633
|
+
"fields"
|
|
634
|
+
]
|
|
635
|
+
},
|
|
276
636
|
"agents": {
|
|
277
637
|
"description": "Local agents inside the customer's network and what the connector reaches through each: internal APIs and databases",
|
|
278
638
|
"type": "array",
|
|
@@ -381,6 +741,235 @@
|
|
|
381
741
|
]
|
|
382
742
|
}
|
|
383
743
|
},
|
|
744
|
+
"operations": {
|
|
745
|
+
"description": "Queries and actions the connector runs on request, each with its args, its output and the profiles that may run it",
|
|
746
|
+
"type": "array",
|
|
747
|
+
"minItems": 1,
|
|
748
|
+
"maxItems": 50,
|
|
749
|
+
"items": {
|
|
750
|
+
"type": "object",
|
|
751
|
+
"properties": {
|
|
752
|
+
"key": {
|
|
753
|
+
"description": "Name of the operation, unique in the connector: ctx.input.operation",
|
|
754
|
+
"type": "string",
|
|
755
|
+
"pattern": "^[a-z][a-z0-9_]{0,63}$"
|
|
756
|
+
},
|
|
757
|
+
"kind": {
|
|
758
|
+
"description": "query (reads the other system) or action (writes there)",
|
|
759
|
+
"type": "string",
|
|
760
|
+
"enum": [
|
|
761
|
+
"query",
|
|
762
|
+
"action"
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
"label": {
|
|
766
|
+
"description": "Name of the operation as a person reads it, in Portuguese",
|
|
767
|
+
"type": "string",
|
|
768
|
+
"minLength": 1,
|
|
769
|
+
"maxLength": 500
|
|
770
|
+
},
|
|
771
|
+
"description": {
|
|
772
|
+
"description": "What the operation does and returns, in Portuguese",
|
|
773
|
+
"type": "string",
|
|
774
|
+
"minLength": 1,
|
|
775
|
+
"maxLength": 500
|
|
776
|
+
},
|
|
777
|
+
"args": {
|
|
778
|
+
"description": "Values whoever runs the operation fills in, read in ctx.input.args by key",
|
|
779
|
+
"type": "array",
|
|
780
|
+
"maxItems": 15,
|
|
781
|
+
"items": {
|
|
782
|
+
"type": "object",
|
|
783
|
+
"properties": {
|
|
784
|
+
"key": {
|
|
785
|
+
"description": "Name of the argument in ctx.input.args",
|
|
786
|
+
"type": "string",
|
|
787
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
788
|
+
},
|
|
789
|
+
"description": {
|
|
790
|
+
"description": "What the argument is and how to fill it, in Portuguese",
|
|
791
|
+
"type": "string",
|
|
792
|
+
"minLength": 1,
|
|
793
|
+
"maxLength": 500
|
|
794
|
+
},
|
|
795
|
+
"type": {
|
|
796
|
+
"description": "text, number, boolean, date (ISO 8601) or json (a free object of up to 8 KB)",
|
|
797
|
+
"type": "string",
|
|
798
|
+
"enum": [
|
|
799
|
+
"text",
|
|
800
|
+
"number",
|
|
801
|
+
"boolean",
|
|
802
|
+
"date",
|
|
803
|
+
"json"
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
"required": {
|
|
807
|
+
"description": "Whether whoever runs the operation must fill it in",
|
|
808
|
+
"type": "boolean",
|
|
809
|
+
"default": false
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"required": [
|
|
813
|
+
"key",
|
|
814
|
+
"description",
|
|
815
|
+
"type"
|
|
816
|
+
]
|
|
817
|
+
},
|
|
818
|
+
"default": []
|
|
819
|
+
},
|
|
820
|
+
"output": {
|
|
821
|
+
"description": "What the operation returns as { output }: checked against these fields when it ends",
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"fields": {
|
|
825
|
+
"description": "The fields of the returned object",
|
|
826
|
+
"type": "array",
|
|
827
|
+
"minItems": 1,
|
|
828
|
+
"maxItems": 20,
|
|
829
|
+
"items": {
|
|
830
|
+
"type": "object",
|
|
831
|
+
"properties": {
|
|
832
|
+
"key": {
|
|
833
|
+
"description": "Name of the field in the object the code returns",
|
|
834
|
+
"type": "string",
|
|
835
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
836
|
+
},
|
|
837
|
+
"label": {
|
|
838
|
+
"description": "What the field is, in Portuguese",
|
|
839
|
+
"type": "string",
|
|
840
|
+
"minLength": 1,
|
|
841
|
+
"maxLength": 80
|
|
842
|
+
},
|
|
843
|
+
"type": {
|
|
844
|
+
"description": "text, number, boolean, date (ISO 8601), option (one of options), list (items with itemFields), html (an e-mail body, cleaned when the run closes) or json (a free object or list, checked only by its size; only in an operation)",
|
|
845
|
+
"type": "string",
|
|
846
|
+
"enum": [
|
|
847
|
+
"text",
|
|
848
|
+
"number",
|
|
849
|
+
"boolean",
|
|
850
|
+
"date",
|
|
851
|
+
"option",
|
|
852
|
+
"list",
|
|
853
|
+
"html",
|
|
854
|
+
"json"
|
|
855
|
+
]
|
|
856
|
+
},
|
|
857
|
+
"options": {
|
|
858
|
+
"description": "The allowed values of an option field",
|
|
859
|
+
"type": "array",
|
|
860
|
+
"minItems": 1,
|
|
861
|
+
"maxItems": 30,
|
|
862
|
+
"items": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"minLength": 1,
|
|
865
|
+
"maxLength": 80
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
"itemFields": {
|
|
869
|
+
"description": "The simple fields of each item of a list field: up to 10 fields, and the list has up to 50 items",
|
|
870
|
+
"type": "array",
|
|
871
|
+
"minItems": 1,
|
|
872
|
+
"maxItems": 10,
|
|
873
|
+
"items": {
|
|
874
|
+
"type": "object",
|
|
875
|
+
"properties": {
|
|
876
|
+
"key": {
|
|
877
|
+
"description": "Name of the field in each item of the list",
|
|
878
|
+
"type": "string",
|
|
879
|
+
"pattern": "^[a-z][a-zA-Z0-9]{0,39}$"
|
|
880
|
+
},
|
|
881
|
+
"label": {
|
|
882
|
+
"description": "What the field is, in Portuguese",
|
|
883
|
+
"type": "string",
|
|
884
|
+
"minLength": 1,
|
|
885
|
+
"maxLength": 80
|
|
886
|
+
},
|
|
887
|
+
"type": {
|
|
888
|
+
"description": "text, number, boolean, date (ISO 8601) or option (one of options)",
|
|
889
|
+
"type": "string",
|
|
890
|
+
"enum": [
|
|
891
|
+
"text",
|
|
892
|
+
"number",
|
|
893
|
+
"boolean",
|
|
894
|
+
"date",
|
|
895
|
+
"option"
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
"options": {
|
|
899
|
+
"description": "The allowed values of an option field",
|
|
900
|
+
"type": "array",
|
|
901
|
+
"minItems": 1,
|
|
902
|
+
"maxItems": 30,
|
|
903
|
+
"items": {
|
|
904
|
+
"type": "string",
|
|
905
|
+
"minLength": 1,
|
|
906
|
+
"maxLength": 80
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"required": {
|
|
910
|
+
"description": "Whether every item always has the field",
|
|
911
|
+
"type": "boolean",
|
|
912
|
+
"default": false
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"required": [
|
|
916
|
+
"key",
|
|
917
|
+
"label",
|
|
918
|
+
"type"
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
"required": {
|
|
923
|
+
"description": "Whether the code always returns the field",
|
|
924
|
+
"type": "boolean",
|
|
925
|
+
"default": false
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
"required": [
|
|
929
|
+
"key",
|
|
930
|
+
"label",
|
|
931
|
+
"type"
|
|
932
|
+
]
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"maxBytes": {
|
|
936
|
+
"description": "Largest output of the operation, serialized, in bytes (up to 262144)",
|
|
937
|
+
"type": "integer",
|
|
938
|
+
"minimum": 64,
|
|
939
|
+
"maximum": 262144,
|
|
940
|
+
"default": 4096
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
"required": [
|
|
944
|
+
"fields"
|
|
945
|
+
]
|
|
946
|
+
},
|
|
947
|
+
"profiles": {
|
|
948
|
+
"description": "Access profiles of the company that may run it: a profile's name as the Nexo shows it, or admin, sales_lead, rep, read_only; without profiles, only the admin",
|
|
949
|
+
"type": "array",
|
|
950
|
+
"minItems": 1,
|
|
951
|
+
"maxItems": 20,
|
|
952
|
+
"items": {
|
|
953
|
+
"type": "string",
|
|
954
|
+
"minLength": 1,
|
|
955
|
+
"maxLength": 80
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
"required": [
|
|
960
|
+
"key",
|
|
961
|
+
"kind",
|
|
962
|
+
"label",
|
|
963
|
+
"description",
|
|
964
|
+
"output"
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"guide": {
|
|
969
|
+
"description": "Guide that teaches the assistant to use this connector's operations, in Portuguese, up to 4 KB: which operation answers which question, what the other system calls things, the format of dates. It speaks of the Nexo's operations, never of the other system's raw API; it goes with the published version",
|
|
970
|
+
"type": "string",
|
|
971
|
+
"minLength": 1
|
|
972
|
+
},
|
|
384
973
|
"oauth": {
|
|
385
974
|
"description": "Whether the code calls the other system with the OAuth token the person authorized: ctx.secret(\"OAUTH_ACCESS_TOKEN\"), renewed by the gateway",
|
|
386
975
|
"type": "boolean"
|