@kubun/protocol 0.1.0 → 0.2.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/lib/index.d.ts +8 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/models/cluster.d.ts +1274 -3
- package/lib/models/cluster.d.ts.map +1 -1
- package/lib/models/cluster.js +106 -9
- package/lib/models/document.d.ts +442 -247
- package/lib/models/document.d.ts.map +1 -1
- package/lib/models/document.js +12 -14
- package/lib/models/graph.d.ts +3 -2
- package/lib/models/graph.d.ts.map +1 -1
- package/lib/models/graph.js +4 -7
- package/lib/models/json-schema.d.ts +92 -43
- package/lib/models/json-schema.d.ts.map +1 -1
- package/lib/models/json-schema.js +24 -16
- package/lib/models/value.d.ts.map +1 -1
- package/lib/models/value.js +1 -0
- package/lib/services/document.d.ts +86 -0
- package/lib/services/document.d.ts.map +1 -0
- package/lib/services/document.js +50 -0
- package/lib/services/graph.d.ts +4346 -1463
- package/lib/services/graph.d.ts.map +1 -1
- package/lib/services/graph.js +76 -14
- package/package.json +5 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { FromSchema } from '@enkaku/schema';
|
|
2
|
+
export declare const documentSyncParams: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly documents: {
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly additionalProperties: {
|
|
8
|
+
readonly oneOf: readonly [{
|
|
9
|
+
readonly title: "KubunBinaryValue";
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "null";
|
|
14
|
+
}];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly required: readonly ["documents"];
|
|
19
|
+
readonly additionalProperties: false;
|
|
20
|
+
};
|
|
21
|
+
export type DocumentSyncParams = FromSchema<typeof documentSyncParams>;
|
|
22
|
+
export declare const documentSyncResult: {
|
|
23
|
+
readonly type: "object";
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly states: {
|
|
26
|
+
readonly type: "object";
|
|
27
|
+
readonly additionalProperties: {
|
|
28
|
+
readonly oneOf: readonly [{
|
|
29
|
+
readonly title: "KubunBinaryValue";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
32
|
+
}, {
|
|
33
|
+
readonly type: "null";
|
|
34
|
+
}];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly required: readonly ["states"];
|
|
39
|
+
readonly additionalProperties: false;
|
|
40
|
+
};
|
|
41
|
+
export type DocumentSyncResult = FromSchema<typeof documentSyncResult>;
|
|
42
|
+
export declare const documentProtocol: {
|
|
43
|
+
readonly 'document/sync': {
|
|
44
|
+
readonly type: "request";
|
|
45
|
+
readonly param: {
|
|
46
|
+
readonly type: "object";
|
|
47
|
+
readonly properties: {
|
|
48
|
+
readonly documents: {
|
|
49
|
+
readonly type: "object";
|
|
50
|
+
readonly additionalProperties: {
|
|
51
|
+
readonly oneOf: readonly [{
|
|
52
|
+
readonly title: "KubunBinaryValue";
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "null";
|
|
57
|
+
}];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly required: readonly ["documents"];
|
|
62
|
+
readonly additionalProperties: false;
|
|
63
|
+
};
|
|
64
|
+
readonly result: {
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly properties: {
|
|
67
|
+
readonly states: {
|
|
68
|
+
readonly type: "object";
|
|
69
|
+
readonly additionalProperties: {
|
|
70
|
+
readonly oneOf: readonly [{
|
|
71
|
+
readonly title: "KubunBinaryValue";
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$";
|
|
74
|
+
}, {
|
|
75
|
+
readonly type: "null";
|
|
76
|
+
}];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly required: readonly ["states"];
|
|
81
|
+
readonly additionalProperties: false;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type DocumentProtocol = typeof documentProtocol;
|
|
86
|
+
//# sourceMappingURL=document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/services/document.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,gBAAgB,CAAA;AAKxD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAUJ,CAAA;AAC3B,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAGtE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAUJ,CAAA;AAC3B,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMU,CAAA;AACvC,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { binaryStringValue } from '../models/value.js';
|
|
2
|
+
// TODO: use pattern properties with DocumentID keys
|
|
3
|
+
export const documentSyncParams = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
properties: {
|
|
6
|
+
documents: {
|
|
7
|
+
type: 'object',
|
|
8
|
+
additionalProperties: {
|
|
9
|
+
oneOf: [
|
|
10
|
+
binaryStringValue,
|
|
11
|
+
{
|
|
12
|
+
type: 'null'
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
required: [
|
|
19
|
+
'documents'
|
|
20
|
+
],
|
|
21
|
+
additionalProperties: false
|
|
22
|
+
};
|
|
23
|
+
// TODO: use pattern properties with DocumentID keys
|
|
24
|
+
export const documentSyncResult = {
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
states: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
additionalProperties: {
|
|
30
|
+
oneOf: [
|
|
31
|
+
binaryStringValue,
|
|
32
|
+
{
|
|
33
|
+
type: 'null'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
required: [
|
|
40
|
+
'states'
|
|
41
|
+
],
|
|
42
|
+
additionalProperties: false
|
|
43
|
+
};
|
|
44
|
+
export const documentProtocol = {
|
|
45
|
+
'document/sync': {
|
|
46
|
+
type: 'request',
|
|
47
|
+
param: documentSyncParams,
|
|
48
|
+
result: documentSyncResult
|
|
49
|
+
}
|
|
50
|
+
};
|