agentfax 0.0.2 → 0.1.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/README.md +125 -4
- package/SPEC.md +188 -0
- package/dist/agent-section.d.ts +2 -0
- package/dist/agent-section.js +59 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +10 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.js +202 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +109 -0
- package/dist/fax.d.ts +168 -0
- package/dist/fax.js +50 -0
- package/dist/html-to-text.d.ts +1 -0
- package/dist/html-to-text.js +60 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/page.d.ts +11 -0
- package/dist/page.js +152 -0
- package/dist/reply-link.d.ts +4 -0
- package/dist/reply-link.js +33 -0
- package/dist/server.d.ts +15 -0
- package/dist/server.js +250 -0
- package/dist/sqlite.d.ts +2 -0
- package/dist/sqlite.js +104 -0
- package/dist/store.d.ts +47 -0
- package/dist/store.js +39 -0
- package/dist/token.d.ts +2 -0
- package/dist/token.js +17 -0
- package/package.json +59 -11
- package/spec/fax.schema.json +202 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://github.com/sptr11/agentfax/blob/main/spec/fax.schema.json",
|
|
3
|
+
"title": "AgentFax 0.1",
|
|
4
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"agentfax": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "0.1"
|
|
10
|
+
},
|
|
11
|
+
"title": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 200
|
|
15
|
+
},
|
|
16
|
+
"from": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 100
|
|
23
|
+
},
|
|
24
|
+
"origin": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "uri"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": [
|
|
30
|
+
"name",
|
|
31
|
+
"origin"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"to": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"maxLength": 100
|
|
37
|
+
},
|
|
38
|
+
"note": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"maxLength": 2000
|
|
41
|
+
},
|
|
42
|
+
"content": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"text": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"view": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"format": "uri"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"text"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"questions": {
|
|
58
|
+
"maxItems": 20,
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"oneOf": [
|
|
62
|
+
{
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"id": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^(?!(message|ack)$)[a-z][a-z0-9_]{0,39}$"
|
|
68
|
+
},
|
|
69
|
+
"label": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"maxLength": 200
|
|
73
|
+
},
|
|
74
|
+
"required": {
|
|
75
|
+
"type": "boolean"
|
|
76
|
+
},
|
|
77
|
+
"hint": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"maxLength": 200
|
|
81
|
+
},
|
|
82
|
+
"probes": {
|
|
83
|
+
"minItems": 1,
|
|
84
|
+
"maxItems": 3,
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"maxLength": 150
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"type": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": [
|
|
95
|
+
"text",
|
|
96
|
+
"longtext",
|
|
97
|
+
"number"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"id",
|
|
103
|
+
"label",
|
|
104
|
+
"type"
|
|
105
|
+
],
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"id": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^(?!(message|ack)$)[a-z][a-z0-9_]{0,39}$"
|
|
114
|
+
},
|
|
115
|
+
"label": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 1,
|
|
118
|
+
"maxLength": 200
|
|
119
|
+
},
|
|
120
|
+
"required": {
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"hint": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"minLength": 1,
|
|
126
|
+
"maxLength": 200
|
|
127
|
+
},
|
|
128
|
+
"probes": {
|
|
129
|
+
"minItems": 1,
|
|
130
|
+
"maxItems": 3,
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1,
|
|
135
|
+
"maxLength": 150
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"type": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"const": "choice"
|
|
141
|
+
},
|
|
142
|
+
"options": {
|
|
143
|
+
"minItems": 1,
|
|
144
|
+
"maxItems": 20,
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"minLength": 1,
|
|
149
|
+
"maxLength": 100
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": [
|
|
154
|
+
"id",
|
|
155
|
+
"label",
|
|
156
|
+
"type",
|
|
157
|
+
"options"
|
|
158
|
+
],
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"ack": {
|
|
165
|
+
"type": "boolean"
|
|
166
|
+
},
|
|
167
|
+
"reply": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"link": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"format": "ends_with",
|
|
173
|
+
"pattern": ".*#$"
|
|
174
|
+
},
|
|
175
|
+
"format": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"link",
|
|
181
|
+
"format"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"expires": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"format": "date-time",
|
|
187
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
|
|
188
|
+
},
|
|
189
|
+
"about": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"format": "uri"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"required": [
|
|
195
|
+
"agentfax",
|
|
196
|
+
"title",
|
|
197
|
+
"from",
|
|
198
|
+
"content",
|
|
199
|
+
"questions",
|
|
200
|
+
"about"
|
|
201
|
+
]
|
|
202
|
+
}
|