@digipair/skill-factory 0.19.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 +20 -0
- package/index.d.ts +1 -0
- package/index.esm.js +15 -0
- package/libs/skill-factory/src/index.d.ts +1 -0
- package/libs/skill-factory/src/lib/skill-factory.d.ts +3 -0
- package/package.json +7 -0
- package/schema.json +52 -0
package/index.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/index.cjs.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ let FactoryService = class FactoryService {
|
|
6
|
+
async initialize(path, startTask) {
|
|
7
|
+
this.path = path;
|
|
8
|
+
this.startTask = startTask;
|
|
9
|
+
}
|
|
10
|
+
async start(params, _pinsSettingsList, context) {
|
|
11
|
+
const { reasoning, digipair = context.request.digipair, body = {} } = params;
|
|
12
|
+
return await this.startTask(this.path, digipair, reasoning, body);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
let instance;
|
|
16
|
+
const initialize = (path, launcher)=>(instance = new FactoryService()).initialize(path, launcher);
|
|
17
|
+
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
18
|
+
|
|
19
|
+
exports.initialize = initialize;
|
|
20
|
+
exports.start = start;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './libs/skill-factory/src/index';
|
package/index.esm.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */ let FactoryService = class FactoryService {
|
|
2
|
+
async initialize(path, startTask) {
|
|
3
|
+
this.path = path;
|
|
4
|
+
this.startTask = startTask;
|
|
5
|
+
}
|
|
6
|
+
async start(params, _pinsSettingsList, context) {
|
|
7
|
+
const { reasoning, digipair = context.request.digipair, body = {} } = params;
|
|
8
|
+
return await this.startTask(this.path, digipair, reasoning, body);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
let instance;
|
|
12
|
+
const initialize = (path, launcher)=>(instance = new FactoryService()).initialize(path, launcher);
|
|
13
|
+
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
14
|
+
|
|
15
|
+
export { initialize, start };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/skill-factory';
|
package/package.json
ADDED
package/schema.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
"x-events": []
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"components": {
|
|
50
|
+
"schemas": {}
|
|
51
|
+
}
|
|
52
|
+
}
|