@digipair/skill-factory 0.67.0 → 0.69.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.js +17 -17
- package/index.esm.js +20 -20
- package/{src → libs/skill-factory/src}/lib/skill-factory.d.ts +3 -3
- package/package.json +1 -1
- package/schema.fr.json +134 -50
- package/schema.json +135 -51
- /package/{src → libs/skill-factory/src}/index.d.ts +0 -0
package/index.cjs.js
CHANGED
|
@@ -27,32 +27,32 @@ let FactoryService = class FactoryService {
|
|
|
27
27
|
async keepAlive(_params, _pinsSettingsList, _context) {
|
|
28
28
|
throw 'DIGIPAIR_KEEPALIVE';
|
|
29
29
|
}
|
|
30
|
-
async
|
|
31
|
-
const {
|
|
32
|
-
return
|
|
30
|
+
async task(params, _pinsSettingsList, context) {
|
|
31
|
+
const { execute } = params;
|
|
32
|
+
return await engine.executePinsList(execute, context);
|
|
33
33
|
}
|
|
34
|
-
async
|
|
35
|
-
const {
|
|
36
|
-
return
|
|
34
|
+
async action(params, _pinsSettingsList, context) {
|
|
35
|
+
const { execute } = params;
|
|
36
|
+
return await engine.executePinsList(execute, context);
|
|
37
37
|
}
|
|
38
|
-
async
|
|
39
|
-
const {
|
|
40
|
-
return
|
|
38
|
+
async trigger(params, _pinsSettingsList, context) {
|
|
39
|
+
const { execute } = params;
|
|
40
|
+
return await engine.executePinsList(execute, context);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
let instance;
|
|
44
44
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
45
45
|
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
46
|
-
const executeWithContext = (params, pinsSettingsList, context)=>
|
|
47
|
-
const keepAlive = (params, pinsSettingsList, context)=>
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
46
|
+
const executeWithContext = (params, pinsSettingsList, context)=>new FactoryService().executeWithContext(params, pinsSettingsList, context);
|
|
47
|
+
const keepAlive = (params, pinsSettingsList, context)=>new FactoryService().keepAlive(params, pinsSettingsList, context);
|
|
48
|
+
const task = (params, pinsSettingsList, context)=>new FactoryService().task(params, pinsSettingsList, context);
|
|
49
|
+
const action = (params, pinsSettingsList, context)=>new FactoryService().action(params, pinsSettingsList, context);
|
|
50
|
+
const trigger = (params, pinsSettingsList, context)=>new FactoryService().trigger(params, pinsSettingsList, context);
|
|
51
51
|
|
|
52
|
+
exports.action = action;
|
|
52
53
|
exports.executeWithContext = executeWithContext;
|
|
53
|
-
exports.headers = headers;
|
|
54
54
|
exports.initialize = initialize;
|
|
55
55
|
exports.keepAlive = keepAlive;
|
|
56
|
-
exports.send = send;
|
|
57
56
|
exports.start = start;
|
|
58
|
-
exports.
|
|
57
|
+
exports.task = task;
|
|
58
|
+
exports.trigger = trigger;
|
package/index.esm.js
CHANGED
|
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
|
|
|
23899
23899
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23900
23900
|
// match is required
|
|
23901
23901
|
if (!match) {
|
|
23902
|
-
return
|
|
23902
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23903
23903
|
v: nextMatch1
|
|
23904
23904
|
};
|
|
23905
23905
|
}
|
|
23906
23906
|
var token = match.token, offset = match.offset;
|
|
23907
23907
|
i1 += offset;
|
|
23908
23908
|
if (token === " ") {
|
|
23909
|
-
return
|
|
23909
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23910
23910
|
}
|
|
23911
23911
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23912
23912
|
token
|
|
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
|
|
|
23925
23925
|
if (contextKeys.some(function(el) {
|
|
23926
23926
|
return el.startsWith(name);
|
|
23927
23927
|
})) {
|
|
23928
|
-
return
|
|
23928
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23929
23929
|
}
|
|
23930
23930
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23931
23931
|
return el === name;
|
|
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
|
|
|
23944
23944
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23945
23945
|
return el.startsWith(name);
|
|
23946
23946
|
})) {
|
|
23947
|
-
return
|
|
23947
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23948
23948
|
}
|
|
23949
|
-
return
|
|
23949
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23950
23950
|
v: nextMatch1
|
|
23951
23951
|
};
|
|
23952
23952
|
};
|
|
@@ -27998,26 +27998,26 @@ let FactoryService = class FactoryService {
|
|
|
27998
27998
|
async keepAlive(_params, _pinsSettingsList, _context) {
|
|
27999
27999
|
throw 'DIGIPAIR_KEEPALIVE';
|
|
28000
28000
|
}
|
|
28001
|
-
async
|
|
28002
|
-
const {
|
|
28003
|
-
return context
|
|
28001
|
+
async task(params, _pinsSettingsList, context) {
|
|
28002
|
+
const { execute } = params;
|
|
28003
|
+
return await executePinsList(execute, context);
|
|
28004
28004
|
}
|
|
28005
|
-
async
|
|
28006
|
-
const {
|
|
28007
|
-
return context
|
|
28005
|
+
async action(params, _pinsSettingsList, context) {
|
|
28006
|
+
const { execute } = params;
|
|
28007
|
+
return await executePinsList(execute, context);
|
|
28008
28008
|
}
|
|
28009
|
-
async
|
|
28010
|
-
const {
|
|
28011
|
-
return context
|
|
28009
|
+
async trigger(params, _pinsSettingsList, context) {
|
|
28010
|
+
const { execute } = params;
|
|
28011
|
+
return await executePinsList(execute, context);
|
|
28012
28012
|
}
|
|
28013
28013
|
};
|
|
28014
28014
|
let instance;
|
|
28015
28015
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
28016
28016
|
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
28017
|
-
const executeWithContext = (params, pinsSettingsList, context)=>
|
|
28018
|
-
const keepAlive = (params, pinsSettingsList, context)=>
|
|
28019
|
-
const
|
|
28020
|
-
const
|
|
28021
|
-
const
|
|
28017
|
+
const executeWithContext = (params, pinsSettingsList, context)=>new FactoryService().executeWithContext(params, pinsSettingsList, context);
|
|
28018
|
+
const keepAlive = (params, pinsSettingsList, context)=>new FactoryService().keepAlive(params, pinsSettingsList, context);
|
|
28019
|
+
const task = (params, pinsSettingsList, context)=>new FactoryService().task(params, pinsSettingsList, context);
|
|
28020
|
+
const action = (params, pinsSettingsList, context)=>new FactoryService().action(params, pinsSettingsList, context);
|
|
28021
|
+
const trigger = (params, pinsSettingsList, context)=>new FactoryService().trigger(params, pinsSettingsList, context);
|
|
28022
28022
|
|
|
28023
|
-
export {
|
|
28023
|
+
export { action, executeWithContext, initialize, keepAlive, start, task, trigger };
|
|
@@ -3,6 +3,6 @@ export declare const initialize: (launcher: Function) => Promise<void>;
|
|
|
3
3
|
export declare const start: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
4
|
export declare const executeWithContext: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
5
|
export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
6
|
+
export declare const task: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
7
|
+
export declare const action: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
8
|
+
export declare const trigger: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
|
@@ -93,66 +93,150 @@
|
|
|
93
93
|
"parameters": [],
|
|
94
94
|
"x-events": []
|
|
95
95
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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"
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
115
118
|
},
|
|
116
|
-
"/
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
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"
|
|
129
133
|
}
|
|
130
134
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
+
]
|
|
134
163
|
},
|
|
135
|
-
"/
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
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"
|
|
148
178
|
}
|
|
149
179
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
+
]
|
|
153
208
|
}
|
|
154
209
|
},
|
|
155
210
|
"components": {
|
|
156
|
-
"schemas": {
|
|
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
|
+
}
|
|
157
241
|
}
|
|
158
242
|
}
|
package/schema.json
CHANGED
|
@@ -93,66 +93,150 @@
|
|
|
93
93
|
"parameters": [],
|
|
94
94
|
"x-events": []
|
|
95
95
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"components": {
|
|
99
|
+
"schemas": {
|
|
100
|
+
"Parameter": {
|
|
101
|
+
"type": "object",
|
|
99
102
|
"tags": ["service"],
|
|
100
|
-
"summary": "
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
"summary": "Parameter",
|
|
104
|
+
"properties": {
|
|
105
|
+
"name": {
|
|
106
|
+
"summary": "Name",
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"summary": {
|
|
110
|
+
"summary": "Summary",
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"required": {
|
|
114
|
+
"summary": "Required",
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
},
|
|
117
|
+
"schema": {
|
|
118
|
+
"summary": "Schema",
|
|
119
|
+
"type": "object"
|
|
120
|
+
},
|
|
121
|
+
"description": {
|
|
122
|
+
"summary": "Summary",
|
|
123
|
+
"type": "string"
|
|
111
124
|
}
|
|
112
|
-
|
|
113
|
-
"
|
|
125
|
+
},
|
|
126
|
+
"required": ["name", "summary", "required", "schema"]
|
|
114
127
|
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"x-scene-blocks": {
|
|
131
|
+
"/task": {
|
|
132
|
+
"summary": "Task",
|
|
133
|
+
"description": "Execution of a task.",
|
|
134
|
+
"tags": ["service"],
|
|
135
|
+
"metadata": [],
|
|
136
|
+
"parameters": [
|
|
137
|
+
{
|
|
138
|
+
"name": "execute",
|
|
139
|
+
"summary": "Execute",
|
|
140
|
+
"required": true,
|
|
141
|
+
"description": "Commands to execute",
|
|
142
|
+
"schema": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
115
150
|
},
|
|
116
|
-
"/
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
151
|
+
"/action": {
|
|
152
|
+
"summary": "Action",
|
|
153
|
+
"description": "Executable action.",
|
|
154
|
+
"tags": ["service"],
|
|
155
|
+
"metadata": [
|
|
156
|
+
{
|
|
157
|
+
"name": "tags",
|
|
158
|
+
"summary": "Tags",
|
|
159
|
+
"required": true,
|
|
160
|
+
"description": "Action tags",
|
|
161
|
+
"schema": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": {
|
|
164
|
+
"type": "string"
|
|
129
165
|
}
|
|
130
166
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "parameters",
|
|
170
|
+
"summary": "Parameters",
|
|
171
|
+
"required": true,
|
|
172
|
+
"description": "Input parameters",
|
|
173
|
+
"schema": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {
|
|
176
|
+
"$ref": "#/components/schemas/Parameter"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"parameters": [
|
|
182
|
+
{
|
|
183
|
+
"name": "execute",
|
|
184
|
+
"summary": "Execute",
|
|
185
|
+
"required": true,
|
|
186
|
+
"description": "Commands to execute",
|
|
187
|
+
"schema": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
]
|
|
134
195
|
},
|
|
135
|
-
"/
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
|
|
196
|
+
"/trigger": {
|
|
197
|
+
"summary": "Trigger",
|
|
198
|
+
"description": "Executable trigger.",
|
|
199
|
+
"tags": ["service"],
|
|
200
|
+
"metadata": [
|
|
201
|
+
{
|
|
202
|
+
"name": "tags",
|
|
203
|
+
"summary": "Tags",
|
|
204
|
+
"required": true,
|
|
205
|
+
"description": "Trigger tags",
|
|
206
|
+
"schema": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"type": "string"
|
|
148
210
|
}
|
|
149
211
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "parameters",
|
|
215
|
+
"summary": "Parameters",
|
|
216
|
+
"required": true,
|
|
217
|
+
"description": "Input parameters",
|
|
218
|
+
"schema": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"items": {
|
|
221
|
+
"$ref": "#/components/schemas/Parameter"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"parameters": [
|
|
227
|
+
{
|
|
228
|
+
"name": "execute",
|
|
229
|
+
"summary": "Execute",
|
|
230
|
+
"required": true,
|
|
231
|
+
"description": "Commands to execute",
|
|
232
|
+
"schema": {
|
|
233
|
+
"type": "array",
|
|
234
|
+
"items": {
|
|
235
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
]
|
|
153
240
|
}
|
|
154
|
-
},
|
|
155
|
-
"components": {
|
|
156
|
-
"schemas": {}
|
|
157
241
|
}
|
|
158
242
|
}
|
|
File without changes
|