@mdbase-dev/connect-protocol 0.1.0-beta.29 → 0.1.0-beta.31

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.
@@ -1 +1,9 @@
1
- export type CollectionOperation = "describe" | "changes" | "read" | "query" | "list_views" | "execute_view" | "read_view_source" | "create_view_source" | "update_view_source" | "delete_view_source" | "validate" | "create" | "update" | "delete" | "rename" | "read_type" | "create_type" | "update_type" | "assess_type_pack" | "apply_type_pack" | "list_timers" | "put_timer" | "cancel_timer" | "reconcile_timers" | "sync";
1
+ /**
2
+ * The executable collection-operation contract. Runtime parsers, capability
3
+ * compilation, and public types must all consume this value; do not maintain a
4
+ * second operation allow-list at an SDK or service boundary.
5
+ */
6
+ export declare const COLLECTION_OPERATIONS: readonly ["describe", "changes", "read", "query", "list_views", "execute_view", "read_view_source", "create_view_source", "update_view_source", "delete_view_source", "validate", "create", "update", "delete", "rename", "read_type", "create_type", "update_type", "assess_type_pack", "apply_type_pack", "list_timers", "put_timer", "cancel_timer", "reconcile_timers", "sync"];
7
+ export type CollectionOperation = typeof COLLECTION_OPERATIONS[number];
8
+ export declare function isCollectionOperation(value: string): value is CollectionOperation;
9
+ export declare function areCollectionOperations(values: readonly string[]): values is readonly CollectionOperation[];
@@ -1 +1,39 @@
1
- export {};
1
+ /**
2
+ * The executable collection-operation contract. Runtime parsers, capability
3
+ * compilation, and public types must all consume this value; do not maintain a
4
+ * second operation allow-list at an SDK or service boundary.
5
+ */
6
+ export const COLLECTION_OPERATIONS = [
7
+ "describe",
8
+ "changes",
9
+ "read",
10
+ "query",
11
+ "list_views",
12
+ "execute_view",
13
+ "read_view_source",
14
+ "create_view_source",
15
+ "update_view_source",
16
+ "delete_view_source",
17
+ "validate",
18
+ "create",
19
+ "update",
20
+ "delete",
21
+ "rename",
22
+ "read_type",
23
+ "create_type",
24
+ "update_type",
25
+ "assess_type_pack",
26
+ "apply_type_pack",
27
+ "list_timers",
28
+ "put_timer",
29
+ "cancel_timer",
30
+ "reconcile_timers",
31
+ "sync"
32
+ ];
33
+ const COLLECTION_OPERATION_SET = new Set(COLLECTION_OPERATIONS);
34
+ export function isCollectionOperation(value) {
35
+ return COLLECTION_OPERATION_SET.has(value);
36
+ }
37
+ export function areCollectionOperations(values) {
38
+ return values.every(isCollectionOperation);
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdbase-dev/connect-protocol",
3
- "version": "0.1.0-beta.29",
3
+ "version": "0.1.0-beta.31",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",