@digipair/skill-cron 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +37542 -0
- package/index.d.ts +1 -0
- package/index.esm.js +37509 -0
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/engine.d.ts +10 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +21 -0
- package/libs/skill-cron/src/index.d.ts +1 -0
- package/libs/skill-cron/src/lib/skill-cron.d.ts +16 -0
- package/package.json +7 -0
- package/schema.json +181 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PinsSettings } from './pins-settings.interface';
|
2
|
+
type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES';
|
3
|
+
export declare const config: {
|
4
|
+
set: (key: CONFIG_KEY, value: any) => void;
|
5
|
+
};
|
6
|
+
export declare const applyTemplate: (value: any, context: any) => any;
|
7
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
8
|
+
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any) => Promise<Element | void>;
|
9
|
+
export declare const preparePinsSettings: (settings: PinsSettings, context: any) => Promise<PinsSettings>;
|
10
|
+
export {};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export interface PinsSettings {
|
2
|
+
element: string;
|
3
|
+
name: string;
|
4
|
+
description: string;
|
5
|
+
library: string;
|
6
|
+
properties?: {
|
7
|
+
[key: string]: any;
|
8
|
+
};
|
9
|
+
variables?: {
|
10
|
+
[key: string]: any;
|
11
|
+
};
|
12
|
+
conditions?: {
|
13
|
+
if?: boolean;
|
14
|
+
each?: any[];
|
15
|
+
};
|
16
|
+
pins?: PinsSettings[];
|
17
|
+
events?: {
|
18
|
+
[key: string]: PinsSettings[];
|
19
|
+
};
|
20
|
+
context?: any;
|
21
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/skill-cron';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
2
|
+
export declare const initialize: (launcher: Function) => Promise<void>;
|
3
|
+
export declare const start: (path: string) => Promise<void>;
|
4
|
+
export declare const crons: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
5
|
+
export declare const addCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<{
|
6
|
+
id: string;
|
7
|
+
time: any;
|
8
|
+
digipair: any;
|
9
|
+
reasoning: any;
|
10
|
+
}>;
|
11
|
+
export declare const deleteCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<{
|
12
|
+
id: any;
|
13
|
+
}>;
|
14
|
+
export declare const enableCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
15
|
+
export declare const disableCron: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
16
|
+
export declare const task: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
ADDED
package/schema.json
ADDED
@@ -0,0 +1,181 @@
|
|
1
|
+
{
|
2
|
+
"openapi": "3.0.0",
|
3
|
+
"info": {
|
4
|
+
"title": "@digipair/skill-cron",
|
5
|
+
"summary": "Gestion des taches planifiées",
|
6
|
+
"description": "La compétence permet de gérer l'exécutions des taches planifiées",
|
7
|
+
"version": "0.1.0",
|
8
|
+
"x-icon": "📆"
|
9
|
+
},
|
10
|
+
"paths": {
|
11
|
+
"/crons": {
|
12
|
+
"post": {
|
13
|
+
"tags": ["service"],
|
14
|
+
"summary": "Liste des taches planifiées",
|
15
|
+
"parameters": [
|
16
|
+
{
|
17
|
+
"name": "path",
|
18
|
+
"summary": "Chemin d'accès",
|
19
|
+
"required": false,
|
20
|
+
"description": "Chemin d'accès vers le répertoire des digipairs",
|
21
|
+
"schema": {
|
22
|
+
"type": "string"
|
23
|
+
}
|
24
|
+
}
|
25
|
+
],
|
26
|
+
"x-events": []
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"/addCron": {
|
30
|
+
"post": {
|
31
|
+
"tags": ["service"],
|
32
|
+
"summary": "Ajoute une plannification",
|
33
|
+
"parameters": [
|
34
|
+
{
|
35
|
+
"name": "path",
|
36
|
+
"summary": "Chemin d'accès",
|
37
|
+
"required": false,
|
38
|
+
"description": "Chemin d'accès vers le répertoire des digipairs",
|
39
|
+
"schema": {
|
40
|
+
"type": "string"
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"name": "time",
|
45
|
+
"summary": "Plannification",
|
46
|
+
"required": true,
|
47
|
+
"description": "Plannification au format cron",
|
48
|
+
"schema": {
|
49
|
+
"type": "string"
|
50
|
+
}
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"name": "digipair",
|
54
|
+
"summary": "Digipair",
|
55
|
+
"required": true,
|
56
|
+
"description": "Nom du digipair qui exécute le raisonnement",
|
57
|
+
"schema": {
|
58
|
+
"type": "string"
|
59
|
+
}
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"name": "reasoning",
|
63
|
+
"summary": "Raisonnement",
|
64
|
+
"required": true,
|
65
|
+
"description": "Nom du raisonnement à exécuter",
|
66
|
+
"schema": {
|
67
|
+
"type": "string"
|
68
|
+
}
|
69
|
+
}
|
70
|
+
],
|
71
|
+
"x-events": []
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"/deleteCron": {
|
75
|
+
"post": {
|
76
|
+
"tags": ["service"],
|
77
|
+
"summary": "Supprime une plannification",
|
78
|
+
"parameters": [
|
79
|
+
{
|
80
|
+
"name": "path",
|
81
|
+
"summary": "Chemin d'accès",
|
82
|
+
"required": false,
|
83
|
+
"description": "Chemin d'accès vers le répertoire des digipairs",
|
84
|
+
"schema": {
|
85
|
+
"type": "string"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"name": "id",
|
90
|
+
"summary": "Identifiant",
|
91
|
+
"required": true,
|
92
|
+
"description": "Identifiant de la plannification",
|
93
|
+
"schema": {
|
94
|
+
"type": "string"
|
95
|
+
}
|
96
|
+
}
|
97
|
+
],
|
98
|
+
"x-events": []
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"/enableCron": {
|
102
|
+
"post": {
|
103
|
+
"tags": ["service"],
|
104
|
+
"summary": "Active une plannification",
|
105
|
+
"parameters": [
|
106
|
+
{
|
107
|
+
"name": "path",
|
108
|
+
"summary": "Chemin d'accès",
|
109
|
+
"required": false,
|
110
|
+
"description": "Chemin d'accès vers le répertoire des digipairs",
|
111
|
+
"schema": {
|
112
|
+
"type": "string"
|
113
|
+
}
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"name": "id",
|
117
|
+
"summary": "Identifiant",
|
118
|
+
"required": true,
|
119
|
+
"description": "Identifiant de la plannification",
|
120
|
+
"schema": {
|
121
|
+
"type": "string"
|
122
|
+
}
|
123
|
+
}
|
124
|
+
],
|
125
|
+
"x-events": []
|
126
|
+
}
|
127
|
+
},
|
128
|
+
"/disableCron": {
|
129
|
+
"post": {
|
130
|
+
"tags": ["service"],
|
131
|
+
"summary": "Désactive une plannification",
|
132
|
+
"parameters": [
|
133
|
+
{
|
134
|
+
"name": "path",
|
135
|
+
"summary": "Chemin d'accès",
|
136
|
+
"required": false,
|
137
|
+
"description": "Chemin d'accès vers le répertoire des digipairs",
|
138
|
+
"schema": {
|
139
|
+
"type": "string"
|
140
|
+
}
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"name": "id",
|
144
|
+
"summary": "Identifiant",
|
145
|
+
"required": true,
|
146
|
+
"description": "Identifiant de la plannification",
|
147
|
+
"schema": {
|
148
|
+
"type": "string"
|
149
|
+
}
|
150
|
+
}
|
151
|
+
],
|
152
|
+
"x-events": []
|
153
|
+
}
|
154
|
+
}
|
155
|
+
},
|
156
|
+
"components": {
|
157
|
+
"schemas": {}
|
158
|
+
},
|
159
|
+
"x-scene-blocks": {
|
160
|
+
"/task": {
|
161
|
+
"summary": "Tache plannifiée",
|
162
|
+
"description": "Exécution d'une tache plannifiée.",
|
163
|
+
"tags": ["service"],
|
164
|
+
"metadata": [],
|
165
|
+
"parameters": [
|
166
|
+
{
|
167
|
+
"name": "execute",
|
168
|
+
"summary": "Exécute",
|
169
|
+
"required": true,
|
170
|
+
"description": "Commandes à exécuter",
|
171
|
+
"schema": {
|
172
|
+
"type": "array",
|
173
|
+
"items": {
|
174
|
+
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
]
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|