@mdbase-dev/connect-protocol 0.1.0-beta.31 → 0.1.0-beta.33
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/application-authorization.d.ts +4 -1
- package/dist/application-authorization.js +23 -5
- package/dist/capabilities.d.ts +1 -0
- package/dist/capabilities.js +1 -0
- package/dist/collection-setup.d.ts +83 -0
- package/dist/collection-setup.js +1 -0
- package/dist/compatibility.d.ts +26 -0
- package/dist/compatibility.js +35 -0
- package/dist/connect-problems.generated.d.ts +151 -2
- package/dist/connect-problems.generated.js +161 -0
- package/dist/files.d.ts +2 -0
- package/dist/index.d.ts +33 -14
- package/dist/index.js +16 -4
- package/dist/manifest.js +118 -5
- package/dist/mutation-fingerprint.d.ts +6 -0
- package/dist/mutation-fingerprint.js +116 -0
- package/dist/operations.d.ts +11 -6
- package/dist/operations.js +147 -5
- package/package.json +2 -2
- package/schemas/catalog.json +2 -1
- package/schemas/connect-problem.v1.schema.json +634 -32
- package/schemas/connect-problems.v1.catalog.json +78 -1
- package/schemas/connect-protocol.v1.schema.json +104 -14
- package/schemas/encrypted-relay.v1.schema.json +1 -1
- package/schemas/encrypted-relay.v2.schema.json +63 -0
- package/schemas/files.v1.schema.json +7 -2
- package/schemas/mdbase-app.schema.json +51 -0
- package/schemas/mdbase-query.v0.3.schema.json +171 -0
- package/schemas/operation-catalog.v1.json +42 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mdbase.dev/schemas/v0.3/query.schema.json",
|
|
4
|
+
"title": "mdbase v0.3 query object",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"types": { "$ref": "#/$defs/typeList" },
|
|
8
|
+
"context": { "$ref": "#/$defs/queryContext" },
|
|
9
|
+
"projections": { "$ref": "#/$defs/projectionSet" },
|
|
10
|
+
"where": { "$ref": "#/$defs/expression" },
|
|
11
|
+
"select": { "$ref": "#/$defs/select" },
|
|
12
|
+
"order_by": { "$ref": "#/$defs/orderBy" },
|
|
13
|
+
"group_by": { "$ref": "#/$defs/groupBy" },
|
|
14
|
+
"summary_functions": { "$ref": "#/$defs/summaryFunctionSet" },
|
|
15
|
+
"summaries": { "$ref": "#/$defs/summaries" },
|
|
16
|
+
"limit": { "type": "integer", "minimum": 0 },
|
|
17
|
+
"offset": { "type": "integer", "minimum": 0 },
|
|
18
|
+
"include_body": { "type": "boolean", "default": false },
|
|
19
|
+
"frontmatter_mode": {
|
|
20
|
+
"enum": ["effective", "persisted", "both"],
|
|
21
|
+
"default": "effective"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"patternProperties": {
|
|
25
|
+
"^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": { "$ref": "#/$defs/extension" }
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"$defs": {
|
|
29
|
+
"identifier": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^[A-Za-z][A-Za-z0-9._:-]*$"
|
|
32
|
+
},
|
|
33
|
+
"typeName": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,127}$"
|
|
36
|
+
},
|
|
37
|
+
"fieldName": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_:-]*$"
|
|
40
|
+
},
|
|
41
|
+
"expression": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"extension": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": true
|
|
48
|
+
},
|
|
49
|
+
"typeList": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 1,
|
|
52
|
+
"uniqueItems": true,
|
|
53
|
+
"items": { "$ref": "#/$defs/typeName" }
|
|
54
|
+
},
|
|
55
|
+
"queryContext": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": ["this"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"this": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["path"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"path": { "type": "string", "minLength": 1 }
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
70
|
+
"projectionSet": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"propertyNames": { "$ref": "#/$defs/fieldName" },
|
|
73
|
+
"additionalProperties": { "$ref": "#/$defs/projection" }
|
|
74
|
+
},
|
|
75
|
+
"projection": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["expr"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"expr": { "$ref": "#/$defs/expression" },
|
|
80
|
+
"description": { "type": "string" }
|
|
81
|
+
},
|
|
82
|
+
"patternProperties": {
|
|
83
|
+
"^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": { "$ref": "#/$defs/extension" }
|
|
84
|
+
},
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"select": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"minItems": 1,
|
|
90
|
+
"items": {
|
|
91
|
+
"oneOf": [
|
|
92
|
+
{ "type": "string", "minLength": 1 },
|
|
93
|
+
{ "$ref": "#/$defs/selectExpression" }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"selectExpression": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"required": ["name", "expr"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"name": { "$ref": "#/$defs/fieldName" },
|
|
102
|
+
"expr": { "$ref": "#/$defs/expression" },
|
|
103
|
+
"label": { "type": "string" },
|
|
104
|
+
"description": { "type": "string" }
|
|
105
|
+
},
|
|
106
|
+
"patternProperties": {
|
|
107
|
+
"^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": { "$ref": "#/$defs/extension" }
|
|
108
|
+
},
|
|
109
|
+
"additionalProperties": false
|
|
110
|
+
},
|
|
111
|
+
"orderBy": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": ["field"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"field": { "type": "string", "minLength": 1 },
|
|
119
|
+
"direction": { "enum": ["asc", "desc"], "default": "asc" }
|
|
120
|
+
},
|
|
121
|
+
"additionalProperties": false
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"groupBy": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"minItems": 1,
|
|
127
|
+
"items": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"required": ["field"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"field": { "type": "string", "minLength": 1 },
|
|
132
|
+
"direction": { "enum": ["asc", "desc"], "default": "asc" }
|
|
133
|
+
},
|
|
134
|
+
"additionalProperties": false
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"summaryFunctionSet": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"propertyNames": { "$ref": "#/$defs/fieldName" },
|
|
140
|
+
"additionalProperties": { "$ref": "#/$defs/summaryFunction" }
|
|
141
|
+
},
|
|
142
|
+
"summaryFunction": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["expr"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"expr": { "$ref": "#/$defs/expression" },
|
|
147
|
+
"description": { "type": "string" }
|
|
148
|
+
},
|
|
149
|
+
"patternProperties": {
|
|
150
|
+
"^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": { "$ref": "#/$defs/extension" }
|
|
151
|
+
},
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
},
|
|
154
|
+
"summaries": {
|
|
155
|
+
"type": "array",
|
|
156
|
+
"minItems": 1,
|
|
157
|
+
"items": { "$ref": "#/$defs/summary" }
|
|
158
|
+
},
|
|
159
|
+
"summary": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["field", "function"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"field": { "type": "string", "minLength": 1 },
|
|
164
|
+
"function": { "$ref": "#/$defs/identifier" },
|
|
165
|
+
"name": { "$ref": "#/$defs/fieldName" },
|
|
166
|
+
"label": { "type": "string" }
|
|
167
|
+
},
|
|
168
|
+
"additionalProperties": false
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"catalog_version": 1,
|
|
3
|
+
"collection_operations": [
|
|
4
|
+
{ "id": "describe", "input_schema_version": 1, "mutation": "never" },
|
|
5
|
+
{ "id": "changes", "input_schema_version": 1, "mutation": "never" },
|
|
6
|
+
{ "id": "read", "input_schema_version": 1, "mutation": "never" },
|
|
7
|
+
{ "id": "query", "input_schema_version": 1, "mutation": "never" },
|
|
8
|
+
{ "id": "list_views", "input_schema_version": 1, "mutation": "never" },
|
|
9
|
+
{ "id": "execute_view", "input_schema_version": 1, "mutation": "never" },
|
|
10
|
+
{ "id": "read_view_source", "input_schema_version": 1, "mutation": "never" },
|
|
11
|
+
{ "id": "create_view_source", "input_schema_version": 1, "mutation": "always" },
|
|
12
|
+
{ "id": "update_view_source", "input_schema_version": 1, "mutation": "always" },
|
|
13
|
+
{ "id": "delete_view_source", "input_schema_version": 1, "mutation": "always" },
|
|
14
|
+
{ "id": "validate", "input_schema_version": 1, "mutation": "never" },
|
|
15
|
+
{ "id": "create", "input_schema_version": 1, "mutation": "always" },
|
|
16
|
+
{ "id": "update", "input_schema_version": 1, "mutation": "always" },
|
|
17
|
+
{ "id": "delete", "input_schema_version": 1, "mutation": "always" },
|
|
18
|
+
{ "id": "rename", "input_schema_version": 1, "mutation": "always" },
|
|
19
|
+
{ "id": "read_type", "input_schema_version": 1, "mutation": "never" },
|
|
20
|
+
{ "id": "create_type", "input_schema_version": 1, "mutation": "always" },
|
|
21
|
+
{ "id": "update_type", "input_schema_version": 1, "mutation": "always" },
|
|
22
|
+
{ "id": "assess_type_pack", "input_schema_version": 1, "mutation": "never" },
|
|
23
|
+
{ "id": "apply_type_pack", "input_schema_version": 1, "mutation": "always" },
|
|
24
|
+
{ "id": "assess_collection_setup", "input_schema_version": 1, "mutation": "never" },
|
|
25
|
+
{ "id": "apply_collection_setup", "input_schema_version": 1, "mutation": "always" },
|
|
26
|
+
{ "id": "list_timers", "input_schema_version": 1, "mutation": "never" },
|
|
27
|
+
{ "id": "put_timer", "input_schema_version": 1, "mutation": "always" },
|
|
28
|
+
{ "id": "cancel_timer", "input_schema_version": 1, "mutation": "always" },
|
|
29
|
+
{ "id": "reconcile_timers", "input_schema_version": 1, "mutation": "always" },
|
|
30
|
+
{ "id": "sync", "input_schema_version": 1, "mutation": "sync_action" }
|
|
31
|
+
],
|
|
32
|
+
"file_control_messages": [
|
|
33
|
+
{ "id": "list_files", "input_schema_version": 1, "mutation": false },
|
|
34
|
+
{ "id": "open_file_upload", "input_schema_version": 1, "mutation": true },
|
|
35
|
+
{ "id": "open_file_download", "input_schema_version": 1, "mutation": false },
|
|
36
|
+
{ "id": "move_file", "input_schema_version": 1, "mutation": true },
|
|
37
|
+
{ "id": "delete_file", "input_schema_version": 1, "mutation": true },
|
|
38
|
+
{ "id": "get_file_transfer_status", "input_schema_version": 1, "mutation": false },
|
|
39
|
+
{ "id": "commit_file_upload", "input_schema_version": 1, "mutation": true },
|
|
40
|
+
{ "id": "abort_file_transfer", "input_schema_version": 1, "mutation": true }
|
|
41
|
+
]
|
|
42
|
+
}
|