@digipair/skill-worker 0.76.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/index.cjs.d.ts +1 -0
- package/index.cjs.js +28019 -0
- package/index.d.ts +1 -0
- package/index.esm.js +27996 -0
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/alias.interface.d.ts +9 -0
- package/libs/engine/src/lib/engine.d.ts +13 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +15 -0
- package/libs/skill-worker/src/index.d.ts +1 -0
- package/libs/skill-worker/src/lib/skill-worker.d.ts +3 -0
- package/package.json +11 -0
- package/schema.fr.json +242 -0
- package/schema.json +110 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PinsSettings } from './pins-settings.interface';
|
|
2
|
+
type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS' | 'LOGGER';
|
|
3
|
+
export declare const config: {
|
|
4
|
+
set: (key: CONFIG_KEY, value: any) => void;
|
|
5
|
+
log: (level: string, path: string, message: string, context: any, data?: any) => any;
|
|
6
|
+
};
|
|
7
|
+
export declare const applyTemplate: (value: any, context: any) => any;
|
|
8
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, path?: string) => Promise<any>;
|
|
9
|
+
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, document?: Document, options?: {
|
|
10
|
+
import: boolean;
|
|
11
|
+
}) => Promise<Element | void>;
|
|
12
|
+
export declare const preparePinsSettings: (settings: PinsSettings, context: any) => PinsSettings;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface PinsSettings {
|
|
2
|
+
library: string;
|
|
3
|
+
element: string;
|
|
4
|
+
properties?: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
conditions?: {
|
|
8
|
+
if?: boolean;
|
|
9
|
+
each?: any[];
|
|
10
|
+
};
|
|
11
|
+
pins?: PinsSettings[];
|
|
12
|
+
events?: {
|
|
13
|
+
[key: string]: PinsSettings[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/skill-worker';
|
package/package.json
ADDED
package/schema.fr.json
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-factory",
|
|
5
|
+
"summary": "Actions dans la factory Digipair",
|
|
6
|
+
"description": "Actions dans la factory Digipair.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "🛠"
|
|
9
|
+
},
|
|
10
|
+
"paths": {
|
|
11
|
+
"/start": {
|
|
12
|
+
"post": {
|
|
13
|
+
"tags": ["service"],
|
|
14
|
+
"summary": "Démarrage d'un raisonnement",
|
|
15
|
+
"description": "Démarrage d'un raisonnement depuis la factory Digipair",
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"name": "digipair",
|
|
19
|
+
"summary": "Digipair",
|
|
20
|
+
"required": false,
|
|
21
|
+
"description": "Propriétaire du raisonnement",
|
|
22
|
+
"schema": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "reasoning",
|
|
28
|
+
"summary": "Raisonnement",
|
|
29
|
+
"required": true,
|
|
30
|
+
"description": "Nom du raisonnement",
|
|
31
|
+
"schema": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "body",
|
|
37
|
+
"summary": "Données",
|
|
38
|
+
"required": false,
|
|
39
|
+
"description": "Données à envoyer",
|
|
40
|
+
"schema": {
|
|
41
|
+
"type": "object"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "factory",
|
|
46
|
+
"summary": "Factory",
|
|
47
|
+
"required": false,
|
|
48
|
+
"description": "Nom de la factory",
|
|
49
|
+
"schema": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"x-events": []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"/execute": {
|
|
58
|
+
"post": {
|
|
59
|
+
"tags": ["service"],
|
|
60
|
+
"summary": "Execute avec un contexte",
|
|
61
|
+
"description": "Execute des Pin's avec un contexte donné",
|
|
62
|
+
"parameters": [
|
|
63
|
+
{
|
|
64
|
+
"name": "execute",
|
|
65
|
+
"required": true,
|
|
66
|
+
"summary": "Actions à exécuter",
|
|
67
|
+
"description": "Actions à exécuter",
|
|
68
|
+
"schema": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "context",
|
|
77
|
+
"required": false,
|
|
78
|
+
"summary": "Contexte",
|
|
79
|
+
"description": "Contexte d'exécution",
|
|
80
|
+
"schema": {
|
|
81
|
+
"type": "object"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"x-events": []
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"/keepAlive": {
|
|
89
|
+
"post": {
|
|
90
|
+
"tags": ["service"],
|
|
91
|
+
"summary": "Keep-alive",
|
|
92
|
+
"description": "Garder en vie le raisonnement",
|
|
93
|
+
"parameters": [],
|
|
94
|
+
"x-events": []
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"x-scene-blocks": {
|
|
99
|
+
"/task": {
|
|
100
|
+
"summary": "Tache",
|
|
101
|
+
"description": "Exécution d'une tache.",
|
|
102
|
+
"tags": ["service"],
|
|
103
|
+
"metadata": [],
|
|
104
|
+
"parameters": [
|
|
105
|
+
{
|
|
106
|
+
"name": "execute",
|
|
107
|
+
"summary": "Exécute",
|
|
108
|
+
"required": true,
|
|
109
|
+
"description": "Commandes à exécuter",
|
|
110
|
+
"schema": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"/action": {
|
|
120
|
+
"summary": "Action",
|
|
121
|
+
"description": "Action exécutable.",
|
|
122
|
+
"tags": ["service"],
|
|
123
|
+
"metadata": [
|
|
124
|
+
{
|
|
125
|
+
"name": "tags",
|
|
126
|
+
"summary": "Tags",
|
|
127
|
+
"required": true,
|
|
128
|
+
"description": "Tags de l'action",
|
|
129
|
+
"schema": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "parameters",
|
|
138
|
+
"summary": "Paramètres",
|
|
139
|
+
"required": true,
|
|
140
|
+
"description": "Paramètres de l'action",
|
|
141
|
+
"schema": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"items": {
|
|
144
|
+
"$ref": "#/components/schemas/Parameter"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"parameters": [
|
|
150
|
+
{
|
|
151
|
+
"name": "execute",
|
|
152
|
+
"summary": "Execute",
|
|
153
|
+
"required": true,
|
|
154
|
+
"description": "Commandes à exécuter.",
|
|
155
|
+
"schema": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"/trigger": {
|
|
165
|
+
"summary": "Déclencheur",
|
|
166
|
+
"description": "Déclenchement d'une exécution d'actions.",
|
|
167
|
+
"tags": ["service"],
|
|
168
|
+
"metadata": [
|
|
169
|
+
{
|
|
170
|
+
"name": "tags",
|
|
171
|
+
"summary": "Tags",
|
|
172
|
+
"required": true,
|
|
173
|
+
"description": "Tags du déclencheur",
|
|
174
|
+
"schema": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "parameters",
|
|
183
|
+
"summary": "Paramètres",
|
|
184
|
+
"required": true,
|
|
185
|
+
"description": "Paramètres du déclencheur",
|
|
186
|
+
"schema": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"$ref": "#/components/schemas/Parameter"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"parameters": [
|
|
195
|
+
{
|
|
196
|
+
"name": "execute",
|
|
197
|
+
"summary": "Execute",
|
|
198
|
+
"required": true,
|
|
199
|
+
"description": "Commandes à exécuter.",
|
|
200
|
+
"schema": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"components": {
|
|
211
|
+
"schemas": {
|
|
212
|
+
"Parameter": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"tags": ["service"],
|
|
215
|
+
"summary": "Parameter",
|
|
216
|
+
"properties": {
|
|
217
|
+
"name": {
|
|
218
|
+
"summary": "Nom",
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"summary": {
|
|
222
|
+
"summary": "Affichage",
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"required": {
|
|
226
|
+
"summary": "Requis",
|
|
227
|
+
"type": "boolean"
|
|
228
|
+
},
|
|
229
|
+
"schema": {
|
|
230
|
+
"summary": "Schema",
|
|
231
|
+
"type": "object"
|
|
232
|
+
},
|
|
233
|
+
"description": {
|
|
234
|
+
"summary": "Description",
|
|
235
|
+
"type": "string"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"required": ["name", "summary", "required", "schema"]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
package/schema.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "@digipair/skill-worker",
|
|
5
|
+
"summary": "Digiworker skill",
|
|
6
|
+
"description": "Digiworkers triggers and actions.",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"x-icon": "🛠"
|
|
9
|
+
},
|
|
10
|
+
"paths": {},
|
|
11
|
+
"components": {
|
|
12
|
+
"schemas": {
|
|
13
|
+
"Parameter": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"tags": ["service"],
|
|
16
|
+
"summary": "Parameter",
|
|
17
|
+
"properties": {
|
|
18
|
+
"name": {
|
|
19
|
+
"summary": "Name",
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"summary": {
|
|
23
|
+
"summary": "Summary",
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"required": {
|
|
27
|
+
"summary": "Required",
|
|
28
|
+
"type": "boolean"
|
|
29
|
+
},
|
|
30
|
+
"schema": {
|
|
31
|
+
"summary": "Schema",
|
|
32
|
+
"type": "object"
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"summary": "Summary",
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["name", "summary", "required", "schema"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"x-scene-blocks": {
|
|
44
|
+
"/task": {
|
|
45
|
+
"summary": "Task",
|
|
46
|
+
"description": "Execution of a task.",
|
|
47
|
+
"tags": ["service"],
|
|
48
|
+
"metadata": [],
|
|
49
|
+
"parameters": [
|
|
50
|
+
{
|
|
51
|
+
"name": "execute",
|
|
52
|
+
"summary": "Execute",
|
|
53
|
+
"required": true,
|
|
54
|
+
"description": "Commands to execute",
|
|
55
|
+
"schema": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"/action": {
|
|
65
|
+
"summary": "Action",
|
|
66
|
+
"description": "Executable action.",
|
|
67
|
+
"tags": ["service"],
|
|
68
|
+
"metadata": [
|
|
69
|
+
{
|
|
70
|
+
"name": "tags",
|
|
71
|
+
"summary": "Tags",
|
|
72
|
+
"required": true,
|
|
73
|
+
"description": "Action tags",
|
|
74
|
+
"schema": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "parameters",
|
|
83
|
+
"summary": "Parameters",
|
|
84
|
+
"required": true,
|
|
85
|
+
"description": "Input parameters",
|
|
86
|
+
"schema": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"$ref": "#/components/schemas/Parameter"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"parameters": [
|
|
95
|
+
{
|
|
96
|
+
"name": "execute",
|
|
97
|
+
"summary": "Execute",
|
|
98
|
+
"required": true,
|
|
99
|
+
"description": "Commands to execute",
|
|
100
|
+
"schema": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": {
|
|
103
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|