@digipair/skill-service 0.68.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 +15 -15
- package/index.esm.js +18 -18
- package/libs/skill-service/src/lib/skill-service.d.ts +3 -3
- package/package.json +1 -1
- package/schema.fr.json +57 -138
- package/schema.json +58 -139
package/index.cjs.js
CHANGED
|
@@ -9,25 +9,25 @@ let ServiceService = class ServiceService {
|
|
|
9
9
|
const { execute } = params;
|
|
10
10
|
return await engine.executePinsList(execute, context);
|
|
11
11
|
}
|
|
12
|
-
async
|
|
13
|
-
const {
|
|
14
|
-
return
|
|
12
|
+
async send(params, _pinsSettingsList, context) {
|
|
13
|
+
const { body } = params;
|
|
14
|
+
return context.protected.res.send(body);
|
|
15
15
|
}
|
|
16
|
-
async
|
|
17
|
-
const {
|
|
18
|
-
return
|
|
16
|
+
async status(params, _pinsSettingsList, context) {
|
|
17
|
+
const { code = 200 } = params;
|
|
18
|
+
return context.protected.res.status(code);
|
|
19
19
|
}
|
|
20
|
-
async
|
|
21
|
-
const {
|
|
22
|
-
return
|
|
20
|
+
async headers(params, _pinsSettingsList, context) {
|
|
21
|
+
const { headers } = params;
|
|
22
|
+
return context.protected.res.set(headers);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const service = (params, pinsSettingsList, context)=>new ServiceService().service(params, pinsSettingsList, context);
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
26
|
+
const send = (params, pinsSettingsList, context)=>new ServiceService().send(params, pinsSettingsList, context);
|
|
27
|
+
const status = (params, pinsSettingsList, context)=>new ServiceService().status(params, pinsSettingsList, context);
|
|
28
|
+
const headers = (params, pinsSettingsList, context)=>new ServiceService().headers(params, pinsSettingsList, context);
|
|
29
29
|
|
|
30
|
-
exports.
|
|
30
|
+
exports.headers = headers;
|
|
31
|
+
exports.send = send;
|
|
31
32
|
exports.service = service;
|
|
32
|
-
exports.
|
|
33
|
-
exports.trigger = trigger;
|
|
33
|
+
exports.status = status;
|
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23948
23948
|
}
|
|
23949
|
-
return
|
|
23949
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23950
23950
|
v: nextMatch1
|
|
23951
23951
|
};
|
|
23952
23952
|
};
|
|
@@ -27980,22 +27980,22 @@ let ServiceService = class ServiceService {
|
|
|
27980
27980
|
const { execute } = params;
|
|
27981
27981
|
return await executePinsList(execute, context);
|
|
27982
27982
|
}
|
|
27983
|
-
async
|
|
27984
|
-
const {
|
|
27985
|
-
return
|
|
27983
|
+
async send(params, _pinsSettingsList, context) {
|
|
27984
|
+
const { body } = params;
|
|
27985
|
+
return context.protected.res.send(body);
|
|
27986
27986
|
}
|
|
27987
|
-
async
|
|
27988
|
-
const {
|
|
27989
|
-
return
|
|
27987
|
+
async status(params, _pinsSettingsList, context) {
|
|
27988
|
+
const { code = 200 } = params;
|
|
27989
|
+
return context.protected.res.status(code);
|
|
27990
27990
|
}
|
|
27991
|
-
async
|
|
27992
|
-
const {
|
|
27993
|
-
return
|
|
27991
|
+
async headers(params, _pinsSettingsList, context) {
|
|
27992
|
+
const { headers } = params;
|
|
27993
|
+
return context.protected.res.set(headers);
|
|
27994
27994
|
}
|
|
27995
27995
|
};
|
|
27996
27996
|
const service = (params, pinsSettingsList, context)=>new ServiceService().service(params, pinsSettingsList, context);
|
|
27997
|
-
const
|
|
27998
|
-
const
|
|
27999
|
-
const
|
|
27997
|
+
const send = (params, pinsSettingsList, context)=>new ServiceService().send(params, pinsSettingsList, context);
|
|
27998
|
+
const status = (params, pinsSettingsList, context)=>new ServiceService().status(params, pinsSettingsList, context);
|
|
27999
|
+
const headers = (params, pinsSettingsList, context)=>new ServiceService().headers(params, pinsSettingsList, context);
|
|
28000
28000
|
|
|
28001
|
-
export {
|
|
28001
|
+
export { headers, send, service, status };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PinsSettings } from '@digipair/engine';
|
|
2
2
|
export declare const service: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
3
|
+
export declare const send: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
|
+
export declare const status: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const headers: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
|
@@ -7,39 +7,68 @@
|
|
|
7
7
|
"version": "0.1.0",
|
|
8
8
|
"x-icon": "💻"
|
|
9
9
|
},
|
|
10
|
-
"paths": {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"Parameter": {
|
|
14
|
-
"type": "object",
|
|
10
|
+
"paths": {
|
|
11
|
+
"/send": {
|
|
12
|
+
"post": {
|
|
15
13
|
"tags": ["service"],
|
|
16
|
-
"summary": "
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
"summary": "Envoi de données HTTP",
|
|
15
|
+
"description": "Envoi de données à la connection HTTP",
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"name": "body",
|
|
19
|
+
"required": false,
|
|
20
|
+
"summary": "Body",
|
|
21
|
+
"description": "Corps de la réponse",
|
|
22
|
+
"schema": {
|
|
23
|
+
"type": "object"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"x-events": []
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"/status": {
|
|
31
|
+
"post": {
|
|
32
|
+
"tags": ["service"],
|
|
33
|
+
"summary": "Code de retour HTTP",
|
|
34
|
+
"description": "Envoi d'un code de retour à la connection HTTP",
|
|
35
|
+
"parameters": [
|
|
36
|
+
{
|
|
37
|
+
"name": "code",
|
|
38
|
+
"required": true,
|
|
39
|
+
"summary": "Code de retour",
|
|
40
|
+
"description": "Code de retour",
|
|
41
|
+
"schema": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
|
-
|
|
39
|
-
"
|
|
45
|
+
],
|
|
46
|
+
"x-events": []
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"/headers": {
|
|
50
|
+
"post": {
|
|
51
|
+
"tags": ["service"],
|
|
52
|
+
"summary": "Headers HTTP",
|
|
53
|
+
"description": "Envoi des headers à la connection HTTP",
|
|
54
|
+
"parameters": [
|
|
55
|
+
{
|
|
56
|
+
"name": "headers",
|
|
57
|
+
"required": true,
|
|
58
|
+
"summary": "Headers",
|
|
59
|
+
"description": "Headers",
|
|
60
|
+
"schema": {
|
|
61
|
+
"type": "object"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"x-events": []
|
|
40
66
|
}
|
|
41
67
|
}
|
|
42
68
|
},
|
|
69
|
+
"components": {
|
|
70
|
+
"schemas": {}
|
|
71
|
+
},
|
|
43
72
|
"x-scene-blocks": {
|
|
44
73
|
"/service": {
|
|
45
74
|
"summary": "Web service",
|
|
@@ -60,116 +89,6 @@
|
|
|
60
89
|
}
|
|
61
90
|
}
|
|
62
91
|
]
|
|
63
|
-
},
|
|
64
|
-
"/task": {
|
|
65
|
-
"summary": "Tache",
|
|
66
|
-
"description": "Exécution d'une tache.",
|
|
67
|
-
"tags": ["service"],
|
|
68
|
-
"metadata": [],
|
|
69
|
-
"parameters": [
|
|
70
|
-
{
|
|
71
|
-
"name": "execute",
|
|
72
|
-
"summary": "Exécute",
|
|
73
|
-
"required": true,
|
|
74
|
-
"description": "Commandes à exécuter",
|
|
75
|
-
"schema": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"items": {
|
|
78
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
"/action": {
|
|
85
|
-
"summary": "Action",
|
|
86
|
-
"description": "Action exécutable.",
|
|
87
|
-
"tags": ["service"],
|
|
88
|
-
"metadata": [
|
|
89
|
-
{
|
|
90
|
-
"name": "tags",
|
|
91
|
-
"summary": "Tags",
|
|
92
|
-
"required": true,
|
|
93
|
-
"description": "Tags de l'action",
|
|
94
|
-
"schema": {
|
|
95
|
-
"type": "array",
|
|
96
|
-
"items": {
|
|
97
|
-
"type": "string"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "parameters",
|
|
103
|
-
"summary": "Paramètres",
|
|
104
|
-
"required": true,
|
|
105
|
-
"description": "Paramètres de l'action",
|
|
106
|
-
"schema": {
|
|
107
|
-
"type": "array",
|
|
108
|
-
"items": {
|
|
109
|
-
"$ref": "#/components/schemas/Parameter"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"parameters": [
|
|
115
|
-
{
|
|
116
|
-
"name": "execute",
|
|
117
|
-
"summary": "Execute",
|
|
118
|
-
"required": true,
|
|
119
|
-
"description": "Commandes à exécuter.",
|
|
120
|
-
"schema": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"items": {
|
|
123
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"/trigger": {
|
|
130
|
-
"summary": "Déclencheur",
|
|
131
|
-
"description": "Déclenchement d'une exécution d'actions.",
|
|
132
|
-
"tags": ["service"],
|
|
133
|
-
"metadata": [
|
|
134
|
-
{
|
|
135
|
-
"name": "tags",
|
|
136
|
-
"summary": "Tags",
|
|
137
|
-
"required": true,
|
|
138
|
-
"description": "Tags du déclencheur",
|
|
139
|
-
"schema": {
|
|
140
|
-
"type": "array",
|
|
141
|
-
"items": {
|
|
142
|
-
"type": "string"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"name": "parameters",
|
|
148
|
-
"summary": "Paramètres",
|
|
149
|
-
"required": true,
|
|
150
|
-
"description": "Paramètres du déclencheur",
|
|
151
|
-
"schema": {
|
|
152
|
-
"type": "array",
|
|
153
|
-
"items": {
|
|
154
|
-
"$ref": "#/components/schemas/Parameter"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"parameters": [
|
|
160
|
-
{
|
|
161
|
-
"name": "execute",
|
|
162
|
-
"summary": "Execute",
|
|
163
|
-
"required": true,
|
|
164
|
-
"description": "Commandes à exécuter.",
|
|
165
|
-
"schema": {
|
|
166
|
-
"type": "array",
|
|
167
|
-
"items": {
|
|
168
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
92
|
}
|
|
174
93
|
}
|
|
175
94
|
}
|
package/schema.json
CHANGED
|
@@ -2,44 +2,73 @@
|
|
|
2
2
|
"openapi": "3.0.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@digipair/skill-service",
|
|
5
|
-
"summary": "
|
|
5
|
+
"summary": "Services",
|
|
6
6
|
"description": "This skill allows managing responses to HTTP calls.",
|
|
7
7
|
"version": "0.1.0",
|
|
8
8
|
"x-icon": "💻"
|
|
9
9
|
},
|
|
10
|
-
"paths": {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"Parameter": {
|
|
14
|
-
"type": "object",
|
|
10
|
+
"paths": {
|
|
11
|
+
"/send": {
|
|
12
|
+
"post": {
|
|
15
13
|
"tags": ["service"],
|
|
16
|
-
"summary": "
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
"summary": "Send HTTP",
|
|
15
|
+
"description": "Send an HTTP request",
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"name": "body",
|
|
19
|
+
"required": false,
|
|
20
|
+
"summary": "Body",
|
|
21
|
+
"description": "Body of the request",
|
|
22
|
+
"schema": {
|
|
23
|
+
"type": "object"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"x-events": []
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"/status": {
|
|
31
|
+
"post": {
|
|
32
|
+
"tags": ["service"],
|
|
33
|
+
"summary": "Send HTTP status",
|
|
34
|
+
"description": "Send an HTTP status",
|
|
35
|
+
"parameters": [
|
|
36
|
+
{
|
|
37
|
+
"name": "code",
|
|
38
|
+
"required": true,
|
|
39
|
+
"summary": "Return code",
|
|
40
|
+
"description": "HTTP return code",
|
|
41
|
+
"schema": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"x-events": []
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"/headers": {
|
|
50
|
+
"post": {
|
|
51
|
+
"tags": ["service"],
|
|
52
|
+
"summary": "Send HTTP headers",
|
|
53
|
+
"description": "Send HTTP headers",
|
|
54
|
+
"parameters": [
|
|
55
|
+
{
|
|
56
|
+
"name": "headers",
|
|
57
|
+
"required": true,
|
|
58
|
+
"summary": "Headers",
|
|
59
|
+
"description": "HTTP headers",
|
|
60
|
+
"schema": {
|
|
61
|
+
"type": "object"
|
|
62
|
+
}
|
|
37
63
|
}
|
|
38
|
-
|
|
39
|
-
"
|
|
64
|
+
],
|
|
65
|
+
"x-events": []
|
|
40
66
|
}
|
|
41
67
|
}
|
|
42
68
|
},
|
|
69
|
+
"components": {
|
|
70
|
+
"schemas": {}
|
|
71
|
+
},
|
|
43
72
|
"x-scene-blocks": {
|
|
44
73
|
"/service": {
|
|
45
74
|
"summary": "Web service",
|
|
@@ -60,116 +89,6 @@
|
|
|
60
89
|
}
|
|
61
90
|
}
|
|
62
91
|
]
|
|
63
|
-
},
|
|
64
|
-
"/task": {
|
|
65
|
-
"summary": "Task",
|
|
66
|
-
"description": "Execution of a task.",
|
|
67
|
-
"tags": ["service"],
|
|
68
|
-
"metadata": [],
|
|
69
|
-
"parameters": [
|
|
70
|
-
{
|
|
71
|
-
"name": "execute",
|
|
72
|
-
"summary": "Execute",
|
|
73
|
-
"required": true,
|
|
74
|
-
"description": "Commands to execute",
|
|
75
|
-
"schema": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"items": {
|
|
78
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
"/action": {
|
|
85
|
-
"summary": "Action",
|
|
86
|
-
"description": "Executable action.",
|
|
87
|
-
"tags": ["service"],
|
|
88
|
-
"metadata": [
|
|
89
|
-
{
|
|
90
|
-
"name": "tags",
|
|
91
|
-
"summary": "Tags",
|
|
92
|
-
"required": true,
|
|
93
|
-
"description": "Action tags",
|
|
94
|
-
"schema": {
|
|
95
|
-
"type": "array",
|
|
96
|
-
"items": {
|
|
97
|
-
"type": "string"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"name": "parameters",
|
|
103
|
-
"summary": "Parameters",
|
|
104
|
-
"required": true,
|
|
105
|
-
"description": "Input parameters",
|
|
106
|
-
"schema": {
|
|
107
|
-
"type": "array",
|
|
108
|
-
"items": {
|
|
109
|
-
"$ref": "#/components/schemas/Parameter"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"parameters": [
|
|
115
|
-
{
|
|
116
|
-
"name": "execute",
|
|
117
|
-
"summary": "Execute",
|
|
118
|
-
"required": true,
|
|
119
|
-
"description": "Commands to execute",
|
|
120
|
-
"schema": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"items": {
|
|
123
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"/trigger": {
|
|
130
|
-
"summary": "Trigger",
|
|
131
|
-
"description": "Executable trigger.",
|
|
132
|
-
"tags": ["service"],
|
|
133
|
-
"metadata": [
|
|
134
|
-
{
|
|
135
|
-
"name": "tags",
|
|
136
|
-
"summary": "Tags",
|
|
137
|
-
"required": true,
|
|
138
|
-
"description": "Trigger tags",
|
|
139
|
-
"schema": {
|
|
140
|
-
"type": "array",
|
|
141
|
-
"items": {
|
|
142
|
-
"type": "string"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"name": "parameters",
|
|
148
|
-
"summary": "Parameters",
|
|
149
|
-
"required": true,
|
|
150
|
-
"description": "Input parameters",
|
|
151
|
-
"schema": {
|
|
152
|
-
"type": "array",
|
|
153
|
-
"items": {
|
|
154
|
-
"$ref": "#/components/schemas/Parameter"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"parameters": [
|
|
160
|
-
{
|
|
161
|
-
"name": "execute",
|
|
162
|
-
"summary": "Execute",
|
|
163
|
-
"required": true,
|
|
164
|
-
"description": "Commands to execute",
|
|
165
|
-
"schema": {
|
|
166
|
-
"type": "array",
|
|
167
|
-
"items": {
|
|
168
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
92
|
}
|
|
174
93
|
}
|
|
175
94
|
}
|