openclaw-channel-dmwork 0.5.16 → 0.5.17
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/package.json +1 -1
- package/src/actions.test.ts +183 -0
- package/src/actions.ts +44 -8
- package/src/inbound.ts +10 -1
- package/node_modules/json-schema-typed/dist-node/index.js.map +0 -1
- package/node_modules/json-schema-typed/dist-src/index.js +0 -51
- package/node_modules/json-schema-typed/dist-types/__tests__/index.test.d.ts +0 -1
- package/node_modules/json-schema-typed/dist-types/index.d.ts +0 -909
- package/node_modules/json-schema-typed/dist-web/index.js +0 -52
- package/node_modules/json-schema-typed/dist-web/index.js.map +0 -1
- package/node_modules/request/CHANGELOG.md +0 -717
package/package.json
CHANGED
package/src/actions.test.ts
CHANGED
|
@@ -148,6 +148,189 @@ describe("handleDmworkMessageAction", () => {
|
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
+
// -----------------------------------------------------------------------
|
|
152
|
+
// send — v2 structured mentions (@[uid:name])
|
|
153
|
+
// -----------------------------------------------------------------------
|
|
154
|
+
describe("send — v2 structured mentions converted to @name + entities", () => {
|
|
155
|
+
it("should convert @[uid:name] to @name with correct entities", async () => {
|
|
156
|
+
let sentPayload: any = null;
|
|
157
|
+
globalThis.fetch = mockFetch({
|
|
158
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
159
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
160
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
const uidToNameMap = new Map([
|
|
165
|
+
["uid_chen", "陈皮皮"],
|
|
166
|
+
["uid_bob", "bob"],
|
|
167
|
+
]);
|
|
168
|
+
|
|
169
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
170
|
+
const result = await handleDmworkMessageAction({
|
|
171
|
+
action: "send",
|
|
172
|
+
args: { target: "group:grp1", message: "Hello @[uid_chen:陈皮皮] and @[uid_bob:bob]!" },
|
|
173
|
+
apiUrl: "http://localhost:8090",
|
|
174
|
+
botToken: "test-token",
|
|
175
|
+
uidToNameMap,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
expect(result.ok).toBe(true);
|
|
179
|
+
// Content should have @name format (not @[uid:name])
|
|
180
|
+
expect(sentPayload.payload.content).toBe("Hello @陈皮皮 and @bob!");
|
|
181
|
+
// Entities should have correct offset/length/uid
|
|
182
|
+
const entities = sentPayload.payload.mention.entities;
|
|
183
|
+
expect(entities).toHaveLength(2);
|
|
184
|
+
expect(entities[0]).toMatchObject({ uid: "uid_chen", offset: 6, length: 4 });
|
|
185
|
+
expect(entities[1]).toMatchObject({ uid: "uid_bob", offset: 15, length: 4 });
|
|
186
|
+
// UIDs should be present
|
|
187
|
+
expect(sentPayload.payload.mention.uids).toEqual(["uid_chen", "uid_bob"]);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
describe("send — @all detection", () => {
|
|
192
|
+
it("should set mentionAll when @all is present", async () => {
|
|
193
|
+
let sentPayload: any = null;
|
|
194
|
+
globalThis.fetch = mockFetch({
|
|
195
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
196
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
197
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
202
|
+
const result = await handleDmworkMessageAction({
|
|
203
|
+
action: "send",
|
|
204
|
+
args: { target: "group:grp1", message: "Attention @all please read" },
|
|
205
|
+
apiUrl: "http://localhost:8090",
|
|
206
|
+
botToken: "test-token",
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
expect(result.ok).toBe(true);
|
|
210
|
+
expect(sentPayload.payload.mention.all).toBe(1);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
describe("send — @所有人 detection", () => {
|
|
215
|
+
it("should set mentionAll when @所有人 is present", async () => {
|
|
216
|
+
let sentPayload: any = null;
|
|
217
|
+
globalThis.fetch = mockFetch({
|
|
218
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
219
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
220
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
225
|
+
const result = await handleDmworkMessageAction({
|
|
226
|
+
action: "send",
|
|
227
|
+
args: { target: "group:grp1", message: "大家注意 @所有人 请查收" },
|
|
228
|
+
apiUrl: "http://localhost:8090",
|
|
229
|
+
botToken: "test-token",
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
expect(result.ok).toBe(true);
|
|
233
|
+
expect(sentPayload.payload.mention.all).toBe(1);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
describe("send — mixed v1+v2 mentions", () => {
|
|
238
|
+
it("should resolve both @[uid:name] and @name in same message", async () => {
|
|
239
|
+
let sentPayload: any = null;
|
|
240
|
+
globalThis.fetch = mockFetch({
|
|
241
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
242
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
243
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
const memberMap = new Map([["alice", "uid_alice"]]);
|
|
248
|
+
const uidToNameMap = new Map([
|
|
249
|
+
["uid_chen", "陈皮皮"],
|
|
250
|
+
["uid_alice", "alice"],
|
|
251
|
+
]);
|
|
252
|
+
|
|
253
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
254
|
+
const result = await handleDmworkMessageAction({
|
|
255
|
+
action: "send",
|
|
256
|
+
args: { target: "group:grp1", message: "Hey @[uid_chen:陈皮皮] and @alice!" },
|
|
257
|
+
apiUrl: "http://localhost:8090",
|
|
258
|
+
botToken: "test-token",
|
|
259
|
+
memberMap,
|
|
260
|
+
uidToNameMap,
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
expect(result.ok).toBe(true);
|
|
264
|
+
// Content should have both converted
|
|
265
|
+
expect(sentPayload.payload.content).toBe("Hey @陈皮皮 and @alice!");
|
|
266
|
+
const entities = sentPayload.payload.mention.entities;
|
|
267
|
+
expect(entities).toHaveLength(2);
|
|
268
|
+
// First entity from v2 conversion
|
|
269
|
+
expect(entities[0]).toMatchObject({ uid: "uid_chen", offset: 4, length: 4 });
|
|
270
|
+
// Second entity from v1 fallback
|
|
271
|
+
expect(entities[1]).toMatchObject({ uid: "uid_alice", offset: 13, length: 6 });
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
describe("send — v2 without uidToNameMap graceful fallback", () => {
|
|
276
|
+
it("should leave @[uid:name] unchanged when uidToNameMap is not provided", async () => {
|
|
277
|
+
let sentPayload: any = null;
|
|
278
|
+
globalThis.fetch = mockFetch({
|
|
279
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
280
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
281
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
286
|
+
const result = await handleDmworkMessageAction({
|
|
287
|
+
action: "send",
|
|
288
|
+
args: { target: "group:grp1", message: "Hello @[uid_chen:陈皮皮]!" },
|
|
289
|
+
apiUrl: "http://localhost:8090",
|
|
290
|
+
botToken: "test-token",
|
|
291
|
+
// no uidToNameMap provided
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
expect(result.ok).toBe(true);
|
|
295
|
+
// Content should be unchanged — no conversion without uidToNameMap
|
|
296
|
+
expect(sentPayload.payload.content).toBe("Hello @[uid_chen:陈皮皮]!");
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
describe("send — invalid uid in v2 (uid not in uidToNameMap)", () => {
|
|
301
|
+
it("should convert format but not create entity for unknown uid", async () => {
|
|
302
|
+
let sentPayload: any = null;
|
|
303
|
+
globalThis.fetch = mockFetch({
|
|
304
|
+
"/v1/bot/sendMessage": async (_url, init) => {
|
|
305
|
+
sentPayload = JSON.parse(init?.body as string);
|
|
306
|
+
return jsonResponse({ message_id: 1, message_seq: 1 });
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
const uidToNameMap = new Map([
|
|
311
|
+
["uid_bob", "bob"],
|
|
312
|
+
]);
|
|
313
|
+
// uid_unknown is NOT in uidToNameMap
|
|
314
|
+
|
|
315
|
+
const { handleDmworkMessageAction } = await import("./actions.js");
|
|
316
|
+
const result = await handleDmworkMessageAction({
|
|
317
|
+
action: "send",
|
|
318
|
+
args: { target: "group:grp1", message: "Hello @[uid_unknown:Ghost] and @[uid_bob:bob]!" },
|
|
319
|
+
apiUrl: "http://localhost:8090",
|
|
320
|
+
botToken: "test-token",
|
|
321
|
+
uidToNameMap,
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
expect(result.ok).toBe(true);
|
|
325
|
+
// Format is still converted for both
|
|
326
|
+
expect(sentPayload.payload.content).toBe("Hello @Ghost and @bob!");
|
|
327
|
+
// Only valid uid gets an entity
|
|
328
|
+
const entities = sentPayload.payload.mention.entities;
|
|
329
|
+
expect(entities).toHaveLength(1);
|
|
330
|
+
expect(entities[0]).toMatchObject({ uid: "uid_bob" });
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
|
|
151
334
|
describe("send — unresolvable @mentions still sends", () => {
|
|
152
335
|
it("should send without mentionUids when names are unresolvable", async () => {
|
|
153
336
|
let sentPayload: any = null;
|
package/src/actions.ts
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
updateGroupMd,
|
|
17
17
|
} from "./api-fetch.js";
|
|
18
18
|
import { uploadAndSendMedia } from "./inbound.js";
|
|
19
|
-
import { buildEntitiesFromFallback } from "./mention-utils.js";
|
|
19
|
+
import { buildEntitiesFromFallback, parseStructuredMentions, convertStructuredMentions } from "./mention-utils.js";
|
|
20
20
|
import type { MentionEntity } from "./types.js";
|
|
21
21
|
import { getKnownGroupIds } from "./group-md.js";
|
|
22
22
|
|
|
@@ -110,7 +110,7 @@ export async function handleDmworkMessageAction(params: {
|
|
|
110
110
|
|
|
111
111
|
switch (action) {
|
|
112
112
|
case "send":
|
|
113
|
-
return handleSend({ args, apiUrl, botToken, memberMap, currentChannelId, log });
|
|
113
|
+
return handleSend({ args, apiUrl, botToken, memberMap, uidToNameMap, currentChannelId, log });
|
|
114
114
|
case "read":
|
|
115
115
|
return handleRead({ args, apiUrl, botToken, uidToNameMap, currentChannelId, log });
|
|
116
116
|
case "member-info":
|
|
@@ -137,10 +137,11 @@ async function handleSend(params: {
|
|
|
137
137
|
apiUrl: string;
|
|
138
138
|
botToken: string;
|
|
139
139
|
memberMap?: Map<string, string>;
|
|
140
|
+
uidToNameMap?: Map<string, string>;
|
|
140
141
|
currentChannelId?: string;
|
|
141
142
|
log?: LogSink;
|
|
142
143
|
}): Promise<MessageActionResult> {
|
|
143
|
-
const { args, apiUrl, botToken, memberMap, currentChannelId, log } = params;
|
|
144
|
+
const { args, apiUrl, botToken, memberMap, uidToNameMap, currentChannelId, log } = params;
|
|
144
145
|
|
|
145
146
|
const target = args.target as string | undefined;
|
|
146
147
|
if (!target) {
|
|
@@ -166,21 +167,56 @@ async function handleSend(params: {
|
|
|
166
167
|
if (message) {
|
|
167
168
|
let mentionUids: string[] = [];
|
|
168
169
|
let mentionEntities: MentionEntity[] = [];
|
|
170
|
+
let finalMessage = message;
|
|
171
|
+
|
|
172
|
+
if (channelType === ChannelType.Group) {
|
|
173
|
+
// v2 path: convert @[uid:name] → @name + entities
|
|
174
|
+
if (uidToNameMap) {
|
|
175
|
+
const structuredMentions = parseStructuredMentions(finalMessage);
|
|
176
|
+
if (structuredMentions.length > 0) {
|
|
177
|
+
const validUids = new Set(uidToNameMap.keys());
|
|
178
|
+
const converted = convertStructuredMentions(finalMessage, structuredMentions, validUids);
|
|
179
|
+
finalMessage = converted.content;
|
|
180
|
+
mentionEntities = [...converted.entities];
|
|
181
|
+
mentionUids = [...converted.uids];
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// v1 fallback: resolve remaining @name via memberMap
|
|
186
|
+
if (memberMap) {
|
|
187
|
+
const { entities, uids } = buildEntitiesFromFallback(finalMessage, memberMap);
|
|
188
|
+
const existingOffsets = new Set(mentionEntities.map(e => e.offset));
|
|
189
|
+
for (const entity of entities) {
|
|
190
|
+
if (!existingOffsets.has(entity.offset)) {
|
|
191
|
+
mentionEntities.push(entity);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
for (const uid of uids) {
|
|
195
|
+
if (!mentionUids.includes(uid)) {
|
|
196
|
+
mentionUids.push(uid);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
169
200
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
201
|
+
// Sort entities by offset and rebuild uids from sorted entities
|
|
202
|
+
if (mentionEntities.length > 0) {
|
|
203
|
+
mentionEntities.sort((a, b) => a.offset - b.offset);
|
|
204
|
+
mentionUids = mentionEntities.map(e => e.uid);
|
|
205
|
+
}
|
|
174
206
|
}
|
|
175
207
|
|
|
208
|
+
// Detect @all/@所有人 in final content
|
|
209
|
+
const hasAtAll = /(?:^|(?<=\s))@(?:all|所有人)(?=\s|[^\w]|$)/i.test(finalMessage);
|
|
210
|
+
|
|
176
211
|
await sendMessage({
|
|
177
212
|
apiUrl,
|
|
178
213
|
botToken,
|
|
179
214
|
channelId,
|
|
180
215
|
channelType,
|
|
181
|
-
content:
|
|
216
|
+
content: finalMessage,
|
|
182
217
|
...(mentionUids.length > 0 ? { mentionUids } : {}),
|
|
183
218
|
...(mentionEntities.length > 0 ? { mentionEntities } : {}),
|
|
219
|
+
mentionAll: hasAtAll || undefined,
|
|
184
220
|
});
|
|
185
221
|
}
|
|
186
222
|
|
package/src/inbound.ts
CHANGED
|
@@ -1416,8 +1416,17 @@ export async function handleInboundMessage(params: {
|
|
|
1416
1416
|
replyOptions: {
|
|
1417
1417
|
onPartialReply: async (partial: { text?: string; mediaUrls?: string[] }) => {
|
|
1418
1418
|
if (streamFailed) return;
|
|
1419
|
-
|
|
1419
|
+
let text = partial.text?.trim();
|
|
1420
1420
|
if (!text) return;
|
|
1421
|
+
// Convert @[uid:name] → @name for display (no entities — streaming should not trigger notifications)
|
|
1422
|
+
if (isGroup) {
|
|
1423
|
+
const structuredMentions = parseStructuredMentions(text);
|
|
1424
|
+
if (structuredMentions.length > 0) {
|
|
1425
|
+
const validUids = new Set(uidToNameMap.keys());
|
|
1426
|
+
const converted = convertStructuredMentions(text, structuredMentions, validUids);
|
|
1427
|
+
text = converted.content;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1421
1430
|
try {
|
|
1422
1431
|
if (!streamNo) {
|
|
1423
1432
|
// Start stream
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["\"use strict\";\n\nexport let JSONSchemaFormat;\n\n(function (JSONSchemaFormat) {\n JSONSchemaFormat[\"Date\"] = \"date\";\n JSONSchemaFormat[\"DateTime\"] = \"date-time\";\n JSONSchemaFormat[\"Email\"] = \"email\";\n JSONSchemaFormat[\"Hostname\"] = \"hostname\";\n JSONSchemaFormat[\"IDNEmail\"] = \"idn-email\";\n JSONSchemaFormat[\"IDNHostname\"] = \"idn-hostname\";\n JSONSchemaFormat[\"IPv4\"] = \"ipv4\";\n JSONSchemaFormat[\"IPv6\"] = \"ipv6\";\n JSONSchemaFormat[\"IRI\"] = \"iri\";\n JSONSchemaFormat[\"IRIReference\"] = \"iri-reference\";\n JSONSchemaFormat[\"JSONPointer\"] = \"json-pointer\";\n JSONSchemaFormat[\"JSONPointerURIFragment\"] = \"json-pointer-uri-fragment\";\n JSONSchemaFormat[\"RegEx\"] = \"regex\";\n JSONSchemaFormat[\"RelativeJSONPointer\"] = \"relative-json-pointer\";\n JSONSchemaFormat[\"Time\"] = \"time\";\n JSONSchemaFormat[\"URI\"] = \"uri\";\n JSONSchemaFormat[\"URIReference\"] = \"uri-reference\";\n JSONSchemaFormat[\"URITemplate\"] = \"uri-template\";\n JSONSchemaFormat[\"UUID\"] = \"uuid\";\n})(JSONSchemaFormat || (JSONSchemaFormat = {}));\n\nexport let JSONSchemaType;\n\n(function (JSONSchemaType) {\n JSONSchemaType[\"Array\"] = \"array\";\n JSONSchemaType[\"Boolean\"] = \"boolean\";\n JSONSchemaType[\"Integer\"] = \"integer\";\n JSONSchemaType[\"Null\"] = \"null\";\n JSONSchemaType[\"Number\"] = \"number\";\n JSONSchemaType[\"Object\"] = \"object\";\n JSONSchemaType[\"String\"] = \"string\";\n})(JSONSchemaType || (JSONSchemaType = {}));\n\nexport let JSONSchemaContentEncoding;\n\n(function (JSONSchemaContentEncoding) {\n JSONSchemaContentEncoding[\"7bit\"] = \"7bit\";\n JSONSchemaContentEncoding[\"8bit\"] = \"8bit\";\n JSONSchemaContentEncoding[\"Binary\"] = \"binary\";\n JSONSchemaContentEncoding[\"QuotedPrintable\"] = \"quoted-printable\";\n JSONSchemaContentEncoding[\"Base64\"] = \"base64\";\n JSONSchemaContentEncoding[\"IETFToken\"] = \"ietf-token\";\n JSONSchemaContentEncoding[\"XToken\"] = \"x-token\";\n})(JSONSchemaContentEncoding || (JSONSchemaContentEncoding = {}));\n\nexport const JSONSchemaKeys = ['$comment', '$id', '$ref', '$schema', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'contentEncoding', 'contentMediaType', 'default', 'definitions', 'dependencies', 'description', 'else', 'enum', 'examples', 'exclusiveMaximum', 'exclusiveMinimum', 'format', 'if', 'items', 'maximum', 'maxItems', 'maxLength', 'maxProperties', 'minimum', 'minItems', 'minLength', 'minProperties', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'propertyNames', 'readOnly', 'required', 'then', 'title', 'type', 'uniqueItems', 'writeOnly'];"],"names":["JSONSchemaFormat","JSONSchemaType","JSONSchemaContentEncoding","JSONSchemaKeys"],"mappings":"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"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
export let JSONSchemaFormat;
|
|
4
|
-
|
|
5
|
-
(function (JSONSchemaFormat) {
|
|
6
|
-
JSONSchemaFormat["Date"] = "date";
|
|
7
|
-
JSONSchemaFormat["DateTime"] = "date-time";
|
|
8
|
-
JSONSchemaFormat["Email"] = "email";
|
|
9
|
-
JSONSchemaFormat["Hostname"] = "hostname";
|
|
10
|
-
JSONSchemaFormat["IDNEmail"] = "idn-email";
|
|
11
|
-
JSONSchemaFormat["IDNHostname"] = "idn-hostname";
|
|
12
|
-
JSONSchemaFormat["IPv4"] = "ipv4";
|
|
13
|
-
JSONSchemaFormat["IPv6"] = "ipv6";
|
|
14
|
-
JSONSchemaFormat["IRI"] = "iri";
|
|
15
|
-
JSONSchemaFormat["IRIReference"] = "iri-reference";
|
|
16
|
-
JSONSchemaFormat["JSONPointer"] = "json-pointer";
|
|
17
|
-
JSONSchemaFormat["JSONPointerURIFragment"] = "json-pointer-uri-fragment";
|
|
18
|
-
JSONSchemaFormat["RegEx"] = "regex";
|
|
19
|
-
JSONSchemaFormat["RelativeJSONPointer"] = "relative-json-pointer";
|
|
20
|
-
JSONSchemaFormat["Time"] = "time";
|
|
21
|
-
JSONSchemaFormat["URI"] = "uri";
|
|
22
|
-
JSONSchemaFormat["URIReference"] = "uri-reference";
|
|
23
|
-
JSONSchemaFormat["URITemplate"] = "uri-template";
|
|
24
|
-
JSONSchemaFormat["UUID"] = "uuid";
|
|
25
|
-
})(JSONSchemaFormat || (JSONSchemaFormat = {}));
|
|
26
|
-
|
|
27
|
-
export let JSONSchemaType;
|
|
28
|
-
|
|
29
|
-
(function (JSONSchemaType) {
|
|
30
|
-
JSONSchemaType["Array"] = "array";
|
|
31
|
-
JSONSchemaType["Boolean"] = "boolean";
|
|
32
|
-
JSONSchemaType["Integer"] = "integer";
|
|
33
|
-
JSONSchemaType["Null"] = "null";
|
|
34
|
-
JSONSchemaType["Number"] = "number";
|
|
35
|
-
JSONSchemaType["Object"] = "object";
|
|
36
|
-
JSONSchemaType["String"] = "string";
|
|
37
|
-
})(JSONSchemaType || (JSONSchemaType = {}));
|
|
38
|
-
|
|
39
|
-
export let JSONSchemaContentEncoding;
|
|
40
|
-
|
|
41
|
-
(function (JSONSchemaContentEncoding) {
|
|
42
|
-
JSONSchemaContentEncoding["7bit"] = "7bit";
|
|
43
|
-
JSONSchemaContentEncoding["8bit"] = "8bit";
|
|
44
|
-
JSONSchemaContentEncoding["Binary"] = "binary";
|
|
45
|
-
JSONSchemaContentEncoding["QuotedPrintable"] = "quoted-printable";
|
|
46
|
-
JSONSchemaContentEncoding["Base64"] = "base64";
|
|
47
|
-
JSONSchemaContentEncoding["IETFToken"] = "ietf-token";
|
|
48
|
-
JSONSchemaContentEncoding["XToken"] = "x-token";
|
|
49
|
-
})(JSONSchemaContentEncoding || (JSONSchemaContentEncoding = {}));
|
|
50
|
-
|
|
51
|
-
export const JSONSchemaKeys = ['$comment', '$id', '$ref', '$schema', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'contentEncoding', 'contentMediaType', 'default', 'definitions', 'dependencies', 'description', 'else', 'enum', 'examples', 'exclusiveMaximum', 'exclusiveMinimum', 'format', 'if', 'items', 'maximum', 'maxItems', 'maxLength', 'maxProperties', 'minimum', 'minItems', 'minLength', 'minProperties', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'propertyNames', 'readOnly', 'required', 'then', 'title', 'type', 'uniqueItems', 'writeOnly'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|