@zveltio/sdk 3.0.0-beta.124 → 3.0.0-beta.133

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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/dist/build/index.d.ts.map +1 -1
  3. package/dist/build/index.js +9 -4
  4. package/dist/client.d.ts.map +1 -1
  5. package/dist/client.js +10 -3
  6. package/dist/extension/index.d.ts +15 -3
  7. package/dist/extension/index.d.ts.map +1 -1
  8. package/dist/extension/reserved-paths.d.ts +5 -1
  9. package/dist/extension/reserved-paths.d.ts.map +1 -1
  10. package/dist/extension/reserved-paths.js +8 -1
  11. package/dist/sync-manager.d.ts +5 -0
  12. package/dist/sync-manager.d.ts.map +1 -1
  13. package/dist/sync-manager.js +23 -4
  14. package/dist/tests/client.test.js +19 -0
  15. package/dist/tests/reserved-paths.test.js +4 -1
  16. package/dist/tests/runtime-deps.test.d.ts +2 -0
  17. package/dist/tests/runtime-deps.test.d.ts.map +1 -0
  18. package/dist/tests/runtime-deps.test.js +41 -0
  19. package/dist/tests/sync-manager.test.js +42 -0
  20. package/dist/tests/validate-manifest-actions.test.js +12 -0
  21. package/dist/tests/validate-manifest-routes.test.js +5 -0
  22. package/dist/tests/validate-sdui-data-endpoints.test.js +19 -3
  23. package/dist/tests/view-runtime.test.js +36 -2
  24. package/dist/tests/view.test.js +122 -3
  25. package/dist/validate/index.d.ts.map +1 -1
  26. package/dist/validate/index.js +178 -6
  27. package/dist/view/index.d.ts +17 -0
  28. package/dist/view/index.d.ts.map +1 -1
  29. package/dist/view/index.js +110 -1
  30. package/dist/view/runtime.d.ts +26 -0
  31. package/dist/view/runtime.d.ts.map +1 -1
  32. package/dist/view/runtime.js +60 -6
  33. package/dist/view/schema.d.ts.map +1 -1
  34. package/dist/view/schema.js +29 -5
  35. package/dist/view/types.generated.d.ts +17 -3
  36. package/dist/view/types.generated.d.ts.map +1 -1
  37. package/package.json +7 -4
  38. package/schemas/extension-manifest.schema.json +588 -0
  39. package/schemas/view-2.schema.json +73 -3
@@ -38,6 +38,14 @@
38
38
  "filter": {
39
39
  "$ref": "#/$defs/Conditions"
40
40
  },
41
+ "facets": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "#/$defs/Name"
45
+ },
46
+ "minItems": 1,
47
+ "description": "Fields drawn as quick filters: \"all\" and one per declared choice (true and false for a boolean), one value per field at a time. Not persisted."
48
+ },
41
49
  "sort": {
42
50
  "$ref": "#/$defs/Sort"
43
51
  },
@@ -229,6 +237,13 @@
229
237
  "action": {
230
238
  "$ref": "#/$defs/ActionName"
231
239
  },
240
+ "pick": {
241
+ "type": "object",
242
+ "description": "Inputs drawn as a picker of the records of a collection of the extension; the id is the value.",
243
+ "additionalProperties": {
244
+ "$ref": "#/$defs/Name"
245
+ }
246
+ },
232
247
  "fields": {
233
248
  "$ref": "#/$defs/Fields"
234
249
  },
@@ -1173,6 +1188,13 @@
1173
1188
  "minItems": 1,
1174
1189
  "description": "Input fields to ask for."
1175
1190
  },
1191
+ "pick": {
1192
+ "type": "object",
1193
+ "description": "Inputs drawn as a picker of the records of a collection of the extension (`prompt` names each); the id is the value.",
1194
+ "additionalProperties": {
1195
+ "$ref": "#/$defs/Name"
1196
+ }
1197
+ },
1176
1198
  "confirm": {
1177
1199
  "$ref": "#/$defs/Text"
1178
1200
  },
@@ -1241,12 +1263,28 @@
1241
1263
  },
1242
1264
  "FileHandoff": {
1243
1265
  "type": "object",
1244
- "description": "Stored files the caller hands the action's job (`$files`, ADR 0032).",
1266
+ "description": "Stored files the caller hands the action, or its job (`$files`, ADR 0032 and 0052).",
1245
1267
  "properties": {
1246
1268
  "read": {
1247
1269
  "$ref": "#/$defs/Value",
1248
1270
  "description": "File ids the job may read, or a `file` field's value (its files' ids)."
1249
1271
  },
1272
+ "prompt": {
1273
+ "type": "object",
1274
+ "description": "Asks the caller for one file: the front end uploads it as the caller and hands its id with `read` and as the input `input`.",
1275
+ "properties": {
1276
+ "input": {
1277
+ "$ref": "#/$defs/Name"
1278
+ },
1279
+ "label": {
1280
+ "$ref": "#/$defs/Text"
1281
+ }
1282
+ },
1283
+ "required": [
1284
+ "input"
1285
+ ],
1286
+ "additionalProperties": false
1287
+ },
1250
1288
  "write": {
1251
1289
  "type": "object",
1252
1290
  "description": "The one file the job may store.",
@@ -1296,6 +1334,14 @@
1296
1334
  "filter": {
1297
1335
  "$ref": "#/$defs/Conditions"
1298
1336
  },
1337
+ "facets": {
1338
+ "type": "array",
1339
+ "items": {
1340
+ "$ref": "#/$defs/Name"
1341
+ },
1342
+ "minItems": 1,
1343
+ "description": "Fields drawn as quick filters: \"all\" and one per declared choice (true and false for a boolean), one value per field at a time. Not persisted."
1344
+ },
1299
1345
  "sort": {
1300
1346
  "$ref": "#/$defs/Sort"
1301
1347
  },
@@ -1477,6 +1523,13 @@
1477
1523
  "action": {
1478
1524
  "$ref": "#/$defs/ActionName"
1479
1525
  },
1526
+ "pick": {
1527
+ "type": "object",
1528
+ "description": "Inputs drawn as a picker of the records of a collection of the extension; the id is the value.",
1529
+ "additionalProperties": {
1530
+ "$ref": "#/$defs/Name"
1531
+ }
1532
+ },
1480
1533
  "fields": {
1481
1534
  "$ref": "#/$defs/Fields"
1482
1535
  },
@@ -2020,7 +2073,7 @@
2020
2073
  ]
2021
2074
  },
2022
2075
  "ActionResult": {
2023
- "description": "What an action returns, as a front end reads it (ADR 0042 decision 4). An object with `view`, `file` or `reveal` is one of the closed forms; anything else is values.",
2076
+ "description": "What an action returns, as a front end reads it (ADR 0042 decision 4). An object with `view`, `file`, `reveal` or `redirect` is one of the closed forms; anything else is values.",
2024
2077
  "anyOf": [
2025
2078
  {
2026
2079
  "type": "object",
@@ -2083,13 +2136,27 @@
2083
2136
  ],
2084
2137
  "additionalProperties": false
2085
2138
  },
2139
+ {
2140
+ "type": "object",
2141
+ "description": "Sends the browser, top-level, to an https URL on a host the operator named for the extension (ADR 0061); the engine refuses any other.",
2142
+ "properties": {
2143
+ "redirect": {
2144
+ "type": "string",
2145
+ "pattern": "^https://"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "redirect"
2150
+ ],
2151
+ "additionalProperties": false
2152
+ },
2086
2153
  {
2087
2154
  "$ref": "#/$defs/ActionValues"
2088
2155
  }
2089
2156
  ]
2090
2157
  },
2091
2158
  "ActionValues": {
2092
- "description": "Values: a scalar, a list, or an object without `view`, `file` or `reveal` (a form `recalc` merges an object of them).",
2159
+ "description": "Values: a scalar, a list, or an object without `view`, `file`, `reveal` or `redirect` (a form `recalc` merges an object of them).",
2093
2160
  "anyOf": [
2094
2161
  {
2095
2162
  "type": [
@@ -2114,6 +2181,9 @@
2114
2181
  },
2115
2182
  "reveal": {
2116
2183
  "not": {}
2184
+ },
2185
+ "redirect": {
2186
+ "not": {}
2117
2187
  }
2118
2188
  }
2119
2189
  }