@digipair/skill-logger 0.29.4 → 0.29.5
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 +32 -54
- package/index.esm.js +30 -49
- package/libs/skill-logger/src/lib/skill-logger.d.ts +4 -7
- package/package.json +1 -1
- package/schema.en.json +24 -72
- package/schema.fr.json +24 -72
- package/schema.json +24 -72
package/index.cjs.js
CHANGED
@@ -20,6 +20,19 @@ let LoggerService = class LoggerService {
|
|
20
20
|
recursive: true
|
21
21
|
});
|
22
22
|
}
|
23
|
+
async addLog(context, type, message) {
|
24
|
+
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
25
|
+
const DIGIPAIR_LOGS_PATH = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs';
|
26
|
+
const current = new Date();
|
27
|
+
const line = {
|
28
|
+
date: current.getTime(),
|
29
|
+
digipair: context.request.digipair,
|
30
|
+
reasoning: context.request.reasoning,
|
31
|
+
type,
|
32
|
+
message
|
33
|
+
};
|
34
|
+
await fs.promises.appendFile(`${DIGIPAIR_LOGS_PATH}/factory/${current.toISOString().split('T')[0]}.jsonl`, '\n' + JSON.stringify(line), 'utf8');
|
35
|
+
}
|
23
36
|
async addConsumption(context, service, model, promptTokens, completionTokens) {
|
24
37
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
25
38
|
const DIGIPAIR_LOGS_PATH = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs';
|
@@ -45,6 +58,7 @@ let LoggerService = class LoggerService {
|
|
45
58
|
let line = acc.find((line)=>line.digipair === curr.digipair && line.reasoning === curr.reasoning && line.service === curr.service && line.model === curr.model);
|
46
59
|
if (!line) {
|
47
60
|
line = {
|
61
|
+
date,
|
48
62
|
digipair: curr.digipair,
|
49
63
|
reasoning: curr.reasoning,
|
50
64
|
service: curr.service,
|
@@ -59,56 +73,23 @@ let LoggerService = class LoggerService {
|
|
59
73
|
}, []);
|
60
74
|
await fs.promises.appendFile(`${path}/consumption-monthly/${date.substring(0, 7)}.jsonl`, '\n' + dayLines.map((line)=>JSON.stringify(line)).join('\n'), 'utf8');
|
61
75
|
}
|
62
|
-
async
|
63
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
64
|
-
const { date, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
65
|
-
const text = await fs.promises.readFile(`${path}/consumption-daily/${date}.jsonl`, 'utf8');
|
66
|
-
const lines = text.split('\n').filter((line)=>line !== '');
|
67
|
-
const result = lines.map((line)=>JSON.parse(line));
|
68
|
-
return result;
|
69
|
-
}
|
70
|
-
async dailyConsumptions(params, _pinsSettingsList, context) {
|
71
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
72
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
73
|
-
const files = (await fs.promises.readdir(`${path}/consumption-daily`)).map((file)=>file.split('.')[0]);
|
74
|
-
return files;
|
75
|
-
}
|
76
|
-
async monthlyConsumptions(params, _pinsSettingsList, context) {
|
77
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
78
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
79
|
-
const files = (await fs.promises.readdir(`${path}/consumption-monthly`)).map((file)=>file.split('.')[0]);
|
80
|
-
return files;
|
81
|
-
}
|
82
|
-
async addLog(context, type, message) {
|
76
|
+
async read(params, _pinsSettingsList, context) {
|
83
77
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
84
|
-
const
|
85
|
-
const
|
86
|
-
const line = {
|
87
|
-
date: current.getTime(),
|
88
|
-
digipair: context.request.digipair,
|
89
|
-
reasoning: context.request.reasoning,
|
90
|
-
type,
|
91
|
-
message
|
92
|
-
};
|
93
|
-
await fs.promises.appendFile(`${DIGIPAIR_LOGS_PATH}/factory/${current.toISOString().split('T')[0]}.jsonl`, '\n' + JSON.stringify(line), 'utf8');
|
94
|
-
}
|
95
|
-
async logs(params, _pinsSettingsList, context) {
|
96
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
97
|
-
const { date, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
98
|
-
const text = await fs.promises.readFile(`${path}/factory/${date}.jsonl`, 'utf8');
|
78
|
+
const { date, type = 'factory', path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
79
|
+
const text = await fs.promises.readFile(`${path}/${type}/${date}.jsonl`, 'utf8');
|
99
80
|
const lines = text.split('\n').filter((line)=>line !== '');
|
100
81
|
const result = lines.map((line)=>JSON.parse(line));
|
101
82
|
return result;
|
102
83
|
}
|
103
|
-
async
|
84
|
+
async list(params, _pinsSettingsList, context) {
|
104
85
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
105
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
106
|
-
const files = (await fs.promises.readdir(`${path}
|
86
|
+
const { type = 'factory', path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
87
|
+
const files = (await fs.promises.readdir(`${path}/${type}`)).filter((file)=>/\.jsonl$/g.test(file)).map((file)=>file.split('.')[0]);
|
107
88
|
return files;
|
108
89
|
}
|
109
|
-
async
|
90
|
+
async cleaning(params, _pinsSettingsList, context) {
|
110
91
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
111
|
-
const { type, to, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
92
|
+
const { type = 'factory', to, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
112
93
|
const files = await fs.promises.readdir(`${path}/${type}`);
|
113
94
|
for (const file of files){
|
114
95
|
const stats = await fs.promises.stat(`${path}/${type}/${file}`);
|
@@ -119,23 +100,20 @@ let LoggerService = class LoggerService {
|
|
119
100
|
}
|
120
101
|
};
|
121
102
|
const initialize = (path)=>new LoggerService().initialize(path);
|
103
|
+
const addLog = (context, type, message)=>new LoggerService().addLog(context, type, message);
|
122
104
|
const addConsumption = (context, service, model, promptTokens, completionTokens)=>new LoggerService().addConsumption(context, service, model, promptTokens, completionTokens);
|
105
|
+
// ----------------------------
|
106
|
+
// Methods for the skill
|
107
|
+
// ----------------------------
|
123
108
|
const computeDailyConsumption = (params, pinsSettingsList, context)=>new LoggerService().computeDailyConsumption(params, pinsSettingsList, context);
|
124
|
-
const
|
125
|
-
const
|
126
|
-
const
|
127
|
-
const addLog = (context, type, message)=>new LoggerService().addLog(context, type, message);
|
128
|
-
const logs = (params, pinsSettingsList, context)=>new LoggerService().logs(params, pinsSettingsList, context);
|
129
|
-
const dailyLogs = (params, pinsSettingsList, context)=>new LoggerService().dailyLogs(params, pinsSettingsList, context);
|
130
|
-
const clearOldLogs = (params, pinsSettingsList, context)=>new LoggerService().clearOldLogs(params, pinsSettingsList, context);
|
109
|
+
const read = (params, pinsSettingsList, context)=>new LoggerService().read(params, pinsSettingsList, context);
|
110
|
+
const list = (params, pinsSettingsList, context)=>new LoggerService().list(params, pinsSettingsList, context);
|
111
|
+
const cleaning = (params, pinsSettingsList, context)=>new LoggerService().cleaning(params, pinsSettingsList, context);
|
131
112
|
|
132
113
|
exports.addConsumption = addConsumption;
|
133
114
|
exports.addLog = addLog;
|
134
|
-
exports.
|
115
|
+
exports.cleaning = cleaning;
|
135
116
|
exports.computeDailyConsumption = computeDailyConsumption;
|
136
|
-
exports.consumptions = consumptions;
|
137
|
-
exports.dailyConsumptions = dailyConsumptions;
|
138
|
-
exports.dailyLogs = dailyLogs;
|
139
117
|
exports.initialize = initialize;
|
140
|
-
exports.
|
141
|
-
exports.
|
118
|
+
exports.list = list;
|
119
|
+
exports.read = read;
|
package/index.esm.js
CHANGED
@@ -16,6 +16,19 @@ let LoggerService = class LoggerService {
|
|
16
16
|
recursive: true
|
17
17
|
});
|
18
18
|
}
|
19
|
+
async addLog(context, type, message) {
|
20
|
+
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
21
|
+
const DIGIPAIR_LOGS_PATH = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs';
|
22
|
+
const current = new Date();
|
23
|
+
const line = {
|
24
|
+
date: current.getTime(),
|
25
|
+
digipair: context.request.digipair,
|
26
|
+
reasoning: context.request.reasoning,
|
27
|
+
type,
|
28
|
+
message
|
29
|
+
};
|
30
|
+
await promises.appendFile(`${DIGIPAIR_LOGS_PATH}/factory/${current.toISOString().split('T')[0]}.jsonl`, '\n' + JSON.stringify(line), 'utf8');
|
31
|
+
}
|
19
32
|
async addConsumption(context, service, model, promptTokens, completionTokens) {
|
20
33
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
21
34
|
const DIGIPAIR_LOGS_PATH = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs';
|
@@ -41,6 +54,7 @@ let LoggerService = class LoggerService {
|
|
41
54
|
let line = acc.find((line)=>line.digipair === curr.digipair && line.reasoning === curr.reasoning && line.service === curr.service && line.model === curr.model);
|
42
55
|
if (!line) {
|
43
56
|
line = {
|
57
|
+
date,
|
44
58
|
digipair: curr.digipair,
|
45
59
|
reasoning: curr.reasoning,
|
46
60
|
service: curr.service,
|
@@ -55,56 +69,23 @@ let LoggerService = class LoggerService {
|
|
55
69
|
}, []);
|
56
70
|
await promises.appendFile(`${path}/consumption-monthly/${date.substring(0, 7)}.jsonl`, '\n' + dayLines.map((line)=>JSON.stringify(line)).join('\n'), 'utf8');
|
57
71
|
}
|
58
|
-
async
|
59
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
60
|
-
const { date, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
61
|
-
const text = await promises.readFile(`${path}/consumption-daily/${date}.jsonl`, 'utf8');
|
62
|
-
const lines = text.split('\n').filter((line)=>line !== '');
|
63
|
-
const result = lines.map((line)=>JSON.parse(line));
|
64
|
-
return result;
|
65
|
-
}
|
66
|
-
async dailyConsumptions(params, _pinsSettingsList, context) {
|
67
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
68
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
69
|
-
const files = (await promises.readdir(`${path}/consumption-daily`)).map((file)=>file.split('.')[0]);
|
70
|
-
return files;
|
71
|
-
}
|
72
|
-
async monthlyConsumptions(params, _pinsSettingsList, context) {
|
73
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
74
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
75
|
-
const files = (await promises.readdir(`${path}/consumption-monthly`)).map((file)=>file.split('.')[0]);
|
76
|
-
return files;
|
77
|
-
}
|
78
|
-
async addLog(context, type, message) {
|
72
|
+
async read(params, _pinsSettingsList, context) {
|
79
73
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
80
|
-
const
|
81
|
-
const
|
82
|
-
const line = {
|
83
|
-
date: current.getTime(),
|
84
|
-
digipair: context.request.digipair,
|
85
|
-
reasoning: context.request.reasoning,
|
86
|
-
type,
|
87
|
-
message
|
88
|
-
};
|
89
|
-
await promises.appendFile(`${DIGIPAIR_LOGS_PATH}/factory/${current.toISOString().split('T')[0]}.jsonl`, '\n' + JSON.stringify(line), 'utf8');
|
90
|
-
}
|
91
|
-
async logs(params, _pinsSettingsList, context) {
|
92
|
-
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
93
|
-
const { date, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
94
|
-
const text = await promises.readFile(`${path}/factory/${date}.jsonl`, 'utf8');
|
74
|
+
const { date, type = 'factory', path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
75
|
+
const text = await promises.readFile(`${path}/${type}/${date}.jsonl`, 'utf8');
|
95
76
|
const lines = text.split('\n').filter((line)=>line !== '');
|
96
77
|
const result = lines.map((line)=>JSON.parse(line));
|
97
78
|
return result;
|
98
79
|
}
|
99
|
-
async
|
80
|
+
async list(params, _pinsSettingsList, context) {
|
100
81
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
101
|
-
const { path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
102
|
-
const files = (await promises.readdir(`${path}
|
82
|
+
const { type = 'factory', path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
83
|
+
const files = (await promises.readdir(`${path}/${type}`)).filter((file)=>/\.jsonl$/g.test(file)).map((file)=>file.split('.')[0]);
|
103
84
|
return files;
|
104
85
|
}
|
105
|
-
async
|
86
|
+
async cleaning(params, _pinsSettingsList, context) {
|
106
87
|
var _context_privates_DIGIPAIR_LOGS_PATH, _ref;
|
107
|
-
const { type, to, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
88
|
+
const { type = 'factory', to, path = (_ref = (_context_privates_DIGIPAIR_LOGS_PATH = context.privates.DIGIPAIR_LOGS_PATH) != null ? _context_privates_DIGIPAIR_LOGS_PATH : process.env['DIGIPAIR_LOGS_PATH']) != null ? _ref : './factory/logs' } = params;
|
108
89
|
const files = await promises.readdir(`${path}/${type}`);
|
109
90
|
for (const file of files){
|
110
91
|
const stats = await promises.stat(`${path}/${type}/${file}`);
|
@@ -115,14 +96,14 @@ let LoggerService = class LoggerService {
|
|
115
96
|
}
|
116
97
|
};
|
117
98
|
const initialize = (path)=>new LoggerService().initialize(path);
|
99
|
+
const addLog = (context, type, message)=>new LoggerService().addLog(context, type, message);
|
118
100
|
const addConsumption = (context, service, model, promptTokens, completionTokens)=>new LoggerService().addConsumption(context, service, model, promptTokens, completionTokens);
|
101
|
+
// ----------------------------
|
102
|
+
// Methods for the skill
|
103
|
+
// ----------------------------
|
119
104
|
const computeDailyConsumption = (params, pinsSettingsList, context)=>new LoggerService().computeDailyConsumption(params, pinsSettingsList, context);
|
120
|
-
const
|
121
|
-
const
|
122
|
-
const
|
123
|
-
const addLog = (context, type, message)=>new LoggerService().addLog(context, type, message);
|
124
|
-
const logs = (params, pinsSettingsList, context)=>new LoggerService().logs(params, pinsSettingsList, context);
|
125
|
-
const dailyLogs = (params, pinsSettingsList, context)=>new LoggerService().dailyLogs(params, pinsSettingsList, context);
|
126
|
-
const clearOldLogs = (params, pinsSettingsList, context)=>new LoggerService().clearOldLogs(params, pinsSettingsList, context);
|
105
|
+
const read = (params, pinsSettingsList, context)=>new LoggerService().read(params, pinsSettingsList, context);
|
106
|
+
const list = (params, pinsSettingsList, context)=>new LoggerService().list(params, pinsSettingsList, context);
|
107
|
+
const cleaning = (params, pinsSettingsList, context)=>new LoggerService().cleaning(params, pinsSettingsList, context);
|
127
108
|
|
128
|
-
export { addConsumption, addLog,
|
109
|
+
export { addConsumption, addLog, cleaning, computeDailyConsumption, initialize, list, read };
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import { PinsSettings } from '@digipair/engine';
|
2
2
|
export declare const initialize: (path?: string) => Promise<void>;
|
3
|
+
export declare const addLog: (context: any, type: string, message: string) => Promise<void>;
|
3
4
|
export declare const addConsumption: (context: any, service: string, model: string, promptTokens: number, completionTokens: number) => Promise<void>;
|
4
5
|
export declare const computeDailyConsumption: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
5
|
-
export declare const
|
6
|
-
export declare const
|
7
|
-
export declare const
|
8
|
-
export declare const addLog: (context: any, type: string, message: string) => Promise<void>;
|
9
|
-
export declare const logs: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
10
|
-
export declare const dailyLogs: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string[]>;
|
11
|
-
export declare const clearOldLogs: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
6
|
+
export declare const read: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
7
|
+
export declare const list: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string[]>;
|
8
|
+
export declare const cleaning: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
package/package.json
CHANGED
package/schema.en.json
CHANGED
@@ -8,40 +8,30 @@
|
|
8
8
|
"x-icon": "🔢"
|
9
9
|
},
|
10
10
|
"paths": {
|
11
|
-
"/
|
11
|
+
"/read": {
|
12
12
|
"post": {
|
13
13
|
"tags": ["service"],
|
14
|
-
"summary": "
|
15
|
-
"description": "Read
|
14
|
+
"summary": "Logs",
|
15
|
+
"description": "Read logs for a given day",
|
16
16
|
"parameters": [
|
17
17
|
{
|
18
18
|
"name": "date",
|
19
19
|
"summary": "Date",
|
20
20
|
"required": true,
|
21
|
-
"description": "Date of
|
21
|
+
"description": "Date of the logs",
|
22
22
|
"schema": {
|
23
23
|
"type": "string"
|
24
24
|
}
|
25
25
|
},
|
26
26
|
{
|
27
|
-
"name": "
|
28
|
-
"summary": "
|
27
|
+
"name": "type",
|
28
|
+
"summary": "Log Type",
|
29
29
|
"required": false,
|
30
|
-
"description": "
|
30
|
+
"description": "Type of logs to read (factory, consumption-daily, consumption-monthly)",
|
31
31
|
"schema": {
|
32
32
|
"type": "string"
|
33
33
|
}
|
34
|
-
}
|
35
|
-
],
|
36
|
-
"x-events": []
|
37
|
-
}
|
38
|
-
},
|
39
|
-
"/dailyConsumptions": {
|
40
|
-
"post": {
|
41
|
-
"tags": ["service"],
|
42
|
-
"summary": "List of LLM consumption days",
|
43
|
-
"description": "List the days of LLM consumption",
|
44
|
-
"parameters": [
|
34
|
+
},
|
45
35
|
{
|
46
36
|
"name": "path",
|
47
37
|
"summary": "Access Path",
|
@@ -55,36 +45,17 @@
|
|
55
45
|
"x-events": []
|
56
46
|
}
|
57
47
|
},
|
58
|
-
"/
|
48
|
+
"/list": {
|
59
49
|
"post": {
|
60
50
|
"tags": ["service"],
|
61
|
-
"summary": "List of
|
62
|
-
"description": "List the
|
51
|
+
"summary": "List of log days",
|
52
|
+
"description": "List the log days",
|
63
53
|
"parameters": [
|
64
54
|
{
|
65
|
-
"name": "
|
66
|
-
"summary": "
|
55
|
+
"name": "type",
|
56
|
+
"summary": "Log Type",
|
67
57
|
"required": false,
|
68
|
-
"description": "
|
69
|
-
"schema": {
|
70
|
-
"type": "string"
|
71
|
-
}
|
72
|
-
}
|
73
|
-
],
|
74
|
-
"x-events": []
|
75
|
-
}
|
76
|
-
},
|
77
|
-
"/logs": {
|
78
|
-
"post": {
|
79
|
-
"tags": ["service"],
|
80
|
-
"summary": "Logs",
|
81
|
-
"description": "Read logs for a given day",
|
82
|
-
"parameters": [
|
83
|
-
{
|
84
|
-
"name": "date",
|
85
|
-
"summary": "Date",
|
86
|
-
"required": true,
|
87
|
-
"description": "Date of the logs",
|
58
|
+
"description": "Type of logs to list (factory, consumption-daily, consumption-monthly)",
|
88
59
|
"schema": {
|
89
60
|
"type": "string"
|
90
61
|
}
|
@@ -102,25 +73,6 @@
|
|
102
73
|
"x-events": []
|
103
74
|
}
|
104
75
|
},
|
105
|
-
"/dailyLogs": {
|
106
|
-
"post": {
|
107
|
-
"tags": ["service"],
|
108
|
-
"summary": "List of log days",
|
109
|
-
"description": "List the log days",
|
110
|
-
"parameters": [
|
111
|
-
{
|
112
|
-
"name": "path",
|
113
|
-
"summary": "Access Path",
|
114
|
-
"required": false,
|
115
|
-
"description": "Access paths of the Digipair directory",
|
116
|
-
"schema": {
|
117
|
-
"type": "string"
|
118
|
-
}
|
119
|
-
}
|
120
|
-
],
|
121
|
-
"x-events": []
|
122
|
-
}
|
123
|
-
},
|
124
76
|
"/computeDailyConsumption": {
|
125
77
|
"post": {
|
126
78
|
"tags": ["service"],
|
@@ -149,21 +101,12 @@
|
|
149
101
|
"x-events": []
|
150
102
|
}
|
151
103
|
},
|
152
|
-
"/
|
104
|
+
"/cleaning": {
|
153
105
|
"post": {
|
154
106
|
"tags": ["service"],
|
155
107
|
"summary": "Delete old logs",
|
156
108
|
"description": "Delete old log files",
|
157
109
|
"parameters": [
|
158
|
-
{
|
159
|
-
"name": "type",
|
160
|
-
"summary": "Log Type",
|
161
|
-
"required": true,
|
162
|
-
"description": "Type of logs to delete (factory, consumption-daily, consumption-monthly)",
|
163
|
-
"schema": {
|
164
|
-
"type": "string"
|
165
|
-
}
|
166
|
-
},
|
167
110
|
{
|
168
111
|
"name": "to",
|
169
112
|
"summary": "Up To",
|
@@ -173,6 +116,15 @@
|
|
173
116
|
"type": "number"
|
174
117
|
}
|
175
118
|
},
|
119
|
+
{
|
120
|
+
"name": "type",
|
121
|
+
"summary": "Log Type",
|
122
|
+
"required": false,
|
123
|
+
"description": "Type of logs to delete (factory, consumption-daily, consumption-monthly)",
|
124
|
+
"schema": {
|
125
|
+
"type": "string"
|
126
|
+
}
|
127
|
+
},
|
176
128
|
{
|
177
129
|
"name": "path",
|
178
130
|
"summary": "Access Path",
|
package/schema.fr.json
CHANGED
@@ -8,40 +8,30 @@
|
|
8
8
|
"x-icon": "🔢"
|
9
9
|
},
|
10
10
|
"paths": {
|
11
|
-
"/
|
11
|
+
"/read": {
|
12
12
|
"post": {
|
13
13
|
"tags": ["service"],
|
14
|
-
"summary": "
|
15
|
-
"description": "Lecture des
|
14
|
+
"summary": "Logs",
|
15
|
+
"description": "Lecture des logs d'un jour donné",
|
16
16
|
"parameters": [
|
17
17
|
{
|
18
18
|
"name": "date",
|
19
19
|
"summary": "Date",
|
20
20
|
"required": true,
|
21
|
-
"description": "Date
|
21
|
+
"description": "Date des logs",
|
22
22
|
"schema": {
|
23
23
|
"type": "string"
|
24
24
|
}
|
25
25
|
},
|
26
26
|
{
|
27
|
-
"name": "
|
28
|
-
"summary": "
|
27
|
+
"name": "type",
|
28
|
+
"summary": "Type de logs",
|
29
29
|
"required": false,
|
30
|
-
"description": "
|
30
|
+
"description": "Type de logs à lire (factory, consumption-daily, consumption-monthly)",
|
31
31
|
"schema": {
|
32
32
|
"type": "string"
|
33
33
|
}
|
34
|
-
}
|
35
|
-
],
|
36
|
-
"x-events": []
|
37
|
-
}
|
38
|
-
},
|
39
|
-
"/dailyConsumptions": {
|
40
|
-
"post": {
|
41
|
-
"tags": ["service"],
|
42
|
-
"summary": "Liste des jours de consommation LLM",
|
43
|
-
"description": "Liste les jours de consommation LLM",
|
44
|
-
"parameters": [
|
34
|
+
},
|
45
35
|
{
|
46
36
|
"name": "path",
|
47
37
|
"summary": "Chemin d'accès",
|
@@ -55,36 +45,17 @@
|
|
55
45
|
"x-events": []
|
56
46
|
}
|
57
47
|
},
|
58
|
-
"/
|
48
|
+
"/list": {
|
59
49
|
"post": {
|
60
50
|
"tags": ["service"],
|
61
|
-
"summary": "Liste des
|
62
|
-
"description": "Liste les
|
51
|
+
"summary": "Liste des jours de logs",
|
52
|
+
"description": "Liste les jours logs",
|
63
53
|
"parameters": [
|
64
54
|
{
|
65
|
-
"name": "
|
66
|
-
"summary": "
|
55
|
+
"name": "type",
|
56
|
+
"summary": "Type de logs",
|
67
57
|
"required": false,
|
68
|
-
"description": "
|
69
|
-
"schema": {
|
70
|
-
"type": "string"
|
71
|
-
}
|
72
|
-
}
|
73
|
-
],
|
74
|
-
"x-events": []
|
75
|
-
}
|
76
|
-
},
|
77
|
-
"/logs": {
|
78
|
-
"post": {
|
79
|
-
"tags": ["service"],
|
80
|
-
"summary": "Logs",
|
81
|
-
"description": "Lecture des logs d'un jour donné",
|
82
|
-
"parameters": [
|
83
|
-
{
|
84
|
-
"name": "date",
|
85
|
-
"summary": "Date",
|
86
|
-
"required": true,
|
87
|
-
"description": "Date des logs",
|
58
|
+
"description": "Type de logs à lister (factory, consumption-daily, consumption-monthly)",
|
88
59
|
"schema": {
|
89
60
|
"type": "string"
|
90
61
|
}
|
@@ -102,25 +73,6 @@
|
|
102
73
|
"x-events": []
|
103
74
|
}
|
104
75
|
},
|
105
|
-
"/dailyLogs": {
|
106
|
-
"post": {
|
107
|
-
"tags": ["service"],
|
108
|
-
"summary": "Liste des jours de logs",
|
109
|
-
"description": "Liste les jours logs",
|
110
|
-
"parameters": [
|
111
|
-
{
|
112
|
-
"name": "path",
|
113
|
-
"summary": "Chemin d'accès",
|
114
|
-
"required": false,
|
115
|
-
"description": "Chemins d'accès du répertoire Digipair",
|
116
|
-
"schema": {
|
117
|
-
"type": "string"
|
118
|
-
}
|
119
|
-
}
|
120
|
-
],
|
121
|
-
"x-events": []
|
122
|
-
}
|
123
|
-
},
|
124
76
|
"/computeDailyConsumption": {
|
125
77
|
"post": {
|
126
78
|
"tags": ["service"],
|
@@ -149,21 +101,12 @@
|
|
149
101
|
"x-events": []
|
150
102
|
}
|
151
103
|
},
|
152
|
-
"/
|
104
|
+
"/cleaning": {
|
153
105
|
"post": {
|
154
106
|
"tags": ["service"],
|
155
107
|
"summary": "Efface les anciens logs",
|
156
108
|
"description": "Efface les anciens fichiers de logs",
|
157
109
|
"parameters": [
|
158
|
-
{
|
159
|
-
"name": "type",
|
160
|
-
"summary": "Type de logs",
|
161
|
-
"required": true,
|
162
|
-
"description": "Type de logs à effacer (factory, consumption-daily, consumption-monthly)",
|
163
|
-
"schema": {
|
164
|
-
"type": "string"
|
165
|
-
}
|
166
|
-
},
|
167
110
|
{
|
168
111
|
"name": "to",
|
169
112
|
"summary": "Jusqu'à",
|
@@ -173,6 +116,15 @@
|
|
173
116
|
"type": "number"
|
174
117
|
}
|
175
118
|
},
|
119
|
+
{
|
120
|
+
"name": "type",
|
121
|
+
"summary": "Type de logs",
|
122
|
+
"required": false,
|
123
|
+
"description": "Type de logs à effacer (factory, consumption-daily, consumption-monthly)",
|
124
|
+
"schema": {
|
125
|
+
"type": "string"
|
126
|
+
}
|
127
|
+
},
|
176
128
|
{
|
177
129
|
"name": "path",
|
178
130
|
"summary": "Chemin d'accès",
|
package/schema.json
CHANGED
@@ -8,40 +8,30 @@
|
|
8
8
|
"x-icon": "🔢"
|
9
9
|
},
|
10
10
|
"paths": {
|
11
|
-
"/
|
11
|
+
"/read": {
|
12
12
|
"post": {
|
13
13
|
"tags": ["service"],
|
14
|
-
"summary": "
|
15
|
-
"description": "Read
|
14
|
+
"summary": "Logs",
|
15
|
+
"description": "Read logs for a given day",
|
16
16
|
"parameters": [
|
17
17
|
{
|
18
18
|
"name": "date",
|
19
19
|
"summary": "Date",
|
20
20
|
"required": true,
|
21
|
-
"description": "Date of
|
21
|
+
"description": "Date of the logs",
|
22
22
|
"schema": {
|
23
23
|
"type": "string"
|
24
24
|
}
|
25
25
|
},
|
26
26
|
{
|
27
|
-
"name": "
|
28
|
-
"summary": "
|
27
|
+
"name": "type",
|
28
|
+
"summary": "Log Type",
|
29
29
|
"required": false,
|
30
|
-
"description": "
|
30
|
+
"description": "Type of logs to read (factory, consumption-daily, consumption-monthly)",
|
31
31
|
"schema": {
|
32
32
|
"type": "string"
|
33
33
|
}
|
34
|
-
}
|
35
|
-
],
|
36
|
-
"x-events": []
|
37
|
-
}
|
38
|
-
},
|
39
|
-
"/dailyConsumptions": {
|
40
|
-
"post": {
|
41
|
-
"tags": ["service"],
|
42
|
-
"summary": "List of LLM consumption days",
|
43
|
-
"description": "List the days of LLM consumption",
|
44
|
-
"parameters": [
|
34
|
+
},
|
45
35
|
{
|
46
36
|
"name": "path",
|
47
37
|
"summary": "Access Path",
|
@@ -55,36 +45,17 @@
|
|
55
45
|
"x-events": []
|
56
46
|
}
|
57
47
|
},
|
58
|
-
"/
|
48
|
+
"/list": {
|
59
49
|
"post": {
|
60
50
|
"tags": ["service"],
|
61
|
-
"summary": "List of
|
62
|
-
"description": "List the
|
51
|
+
"summary": "List of log days",
|
52
|
+
"description": "List the log days",
|
63
53
|
"parameters": [
|
64
54
|
{
|
65
|
-
"name": "
|
66
|
-
"summary": "
|
55
|
+
"name": "type",
|
56
|
+
"summary": "Log Type",
|
67
57
|
"required": false,
|
68
|
-
"description": "
|
69
|
-
"schema": {
|
70
|
-
"type": "string"
|
71
|
-
}
|
72
|
-
}
|
73
|
-
],
|
74
|
-
"x-events": []
|
75
|
-
}
|
76
|
-
},
|
77
|
-
"/logs": {
|
78
|
-
"post": {
|
79
|
-
"tags": ["service"],
|
80
|
-
"summary": "Logs",
|
81
|
-
"description": "Read logs for a given day",
|
82
|
-
"parameters": [
|
83
|
-
{
|
84
|
-
"name": "date",
|
85
|
-
"summary": "Date",
|
86
|
-
"required": true,
|
87
|
-
"description": "Date of the logs",
|
58
|
+
"description": "Type of logs to list (factory, consumption-daily, consumption-monthly)",
|
88
59
|
"schema": {
|
89
60
|
"type": "string"
|
90
61
|
}
|
@@ -102,25 +73,6 @@
|
|
102
73
|
"x-events": []
|
103
74
|
}
|
104
75
|
},
|
105
|
-
"/dailyLogs": {
|
106
|
-
"post": {
|
107
|
-
"tags": ["service"],
|
108
|
-
"summary": "List of log days",
|
109
|
-
"description": "List the log days",
|
110
|
-
"parameters": [
|
111
|
-
{
|
112
|
-
"name": "path",
|
113
|
-
"summary": "Access Path",
|
114
|
-
"required": false,
|
115
|
-
"description": "Access paths of the Digipair directory",
|
116
|
-
"schema": {
|
117
|
-
"type": "string"
|
118
|
-
}
|
119
|
-
}
|
120
|
-
],
|
121
|
-
"x-events": []
|
122
|
-
}
|
123
|
-
},
|
124
76
|
"/computeDailyConsumption": {
|
125
77
|
"post": {
|
126
78
|
"tags": ["service"],
|
@@ -149,21 +101,12 @@
|
|
149
101
|
"x-events": []
|
150
102
|
}
|
151
103
|
},
|
152
|
-
"/
|
104
|
+
"/cleaning": {
|
153
105
|
"post": {
|
154
106
|
"tags": ["service"],
|
155
107
|
"summary": "Delete old logs",
|
156
108
|
"description": "Delete old log files",
|
157
109
|
"parameters": [
|
158
|
-
{
|
159
|
-
"name": "type",
|
160
|
-
"summary": "Log Type",
|
161
|
-
"required": true,
|
162
|
-
"description": "Type of logs to delete (factory, consumption-daily, consumption-monthly)",
|
163
|
-
"schema": {
|
164
|
-
"type": "string"
|
165
|
-
}
|
166
|
-
},
|
167
110
|
{
|
168
111
|
"name": "to",
|
169
112
|
"summary": "Up To",
|
@@ -173,6 +116,15 @@
|
|
173
116
|
"type": "number"
|
174
117
|
}
|
175
118
|
},
|
119
|
+
{
|
120
|
+
"name": "type",
|
121
|
+
"summary": "Log Type",
|
122
|
+
"required": false,
|
123
|
+
"description": "Type of logs to delete (factory, consumption-daily, consumption-monthly)",
|
124
|
+
"schema": {
|
125
|
+
"type": "string"
|
126
|
+
}
|
127
|
+
},
|
176
128
|
{
|
177
129
|
"name": "path",
|
178
130
|
"summary": "Access Path",
|