@edifice.io/aifalc-node-api 0.0.0-stage → 0.2.2
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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/nats/types.d.ts +85 -0
- package/dist/nats/types.d.ts.map +1 -0
- package/package.json +55 -3
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict"});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A block of simplified text.
|
|
3
|
+
*/
|
|
4
|
+
export interface ContentBlock {
|
|
5
|
+
content?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Request of the simplification of a text.
|
|
9
|
+
*/
|
|
10
|
+
export interface ContentRequest {
|
|
11
|
+
/**
|
|
12
|
+
* User agent of the browser of the user.
|
|
13
|
+
*/
|
|
14
|
+
browser?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Text to simplify.
|
|
17
|
+
*/
|
|
18
|
+
content?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Kind of the content.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue `"FALC"`
|
|
23
|
+
*/
|
|
24
|
+
options?: 'FALC' | 'BLOG' | 'ACTUALITE' | 'CONVERSATION' | 'COURS';
|
|
25
|
+
/**
|
|
26
|
+
* Identifier of the platform.
|
|
27
|
+
*/
|
|
28
|
+
pf_id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Session of the user.
|
|
31
|
+
*/
|
|
32
|
+
session?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Identifier of the user who asked for the simplification.
|
|
35
|
+
*/
|
|
36
|
+
user_id?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The simplified text.
|
|
40
|
+
*/
|
|
41
|
+
export interface ContentResponse {
|
|
42
|
+
/**
|
|
43
|
+
* The simplified text.
|
|
44
|
+
*/
|
|
45
|
+
data?: Data;
|
|
46
|
+
/**
|
|
47
|
+
* Message describing the status.
|
|
48
|
+
*
|
|
49
|
+
* @defaultValue `"Your file has been successfully converted."`
|
|
50
|
+
*/
|
|
51
|
+
message?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Model that simplified the text.
|
|
54
|
+
*/
|
|
55
|
+
model?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Status of the simplification : `success` or `failure`.
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue `"success"`
|
|
60
|
+
*/
|
|
61
|
+
status?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Tokens used by the simplification.
|
|
64
|
+
*/
|
|
65
|
+
usage?: Usage;
|
|
66
|
+
/**
|
|
67
|
+
* Version of the generator.
|
|
68
|
+
*/
|
|
69
|
+
version?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The simplified text, in blocks.
|
|
73
|
+
*/
|
|
74
|
+
export interface Data {
|
|
75
|
+
body?: ContentBlock[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Tokens used by a simplification.
|
|
79
|
+
*/
|
|
80
|
+
export interface Usage {
|
|
81
|
+
completion_tokens?: number;
|
|
82
|
+
prompt_tokens?: number;
|
|
83
|
+
total_tokens?: number;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/nats/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,OAAO,CAAC;IACnE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/aifalc-node-api",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Clients to interact with aifalc-nats-service",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "Edifice",
|
|
11
|
+
"license": "AGPL-3.0",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": "22"
|
|
14
|
+
},
|
|
15
|
+
"engineStrict": true,
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"require": "./dist/index.umd.cjs",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.umd.cjs",
|
|
25
|
+
"module": "dist/index.js",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@nats-io/transport-node": "3.2.0",
|
|
32
|
+
"@nats-io/nats-core": "3.2.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "25.2.0",
|
|
36
|
+
"husky": "9.0.11",
|
|
37
|
+
"prettier": "3.2.5",
|
|
38
|
+
"semantic-release": "23.0.2",
|
|
39
|
+
"typescript": "5.2.2",
|
|
40
|
+
"vite": "5.1.4",
|
|
41
|
+
"vite-plugin-dts": "4.3.0",
|
|
42
|
+
"rxjs": "7.8.1"
|
|
43
|
+
},
|
|
44
|
+
"lint-staged": {
|
|
45
|
+
"*.{js,ts,jsx,tsx,json,css,md}": "pnpm format"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"build": "tsc && vite build",
|
|
50
|
+
"build:types": "tsc --build",
|
|
51
|
+
"preview": "vite preview",
|
|
52
|
+
"clean": "rm -Rf dist",
|
|
53
|
+
"format": "pnpm run format:write && pnpm run format:check",
|
|
54
|
+
"format:check": "npx prettier --check \"src/**/*.ts\"",
|
|
55
|
+
"format:write": "npx prettier --write \"src/**/*.ts\"",
|
|
56
|
+
"pre-commit": "pnpm run format"
|
|
57
|
+
}
|
|
6
58
|
}
|
package/README.md
DELETED