@mdbase-dev/connect-protocol 0.1.0-beta.82 → 0.1.0-beta.84
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/operations.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const MUTATING_OPERATION_IDENTIFIERS: readonly ["create_view_sour
|
|
|
8
8
|
export type MutationOperationIdentifier = typeof MUTATING_OPERATION_IDENTIFIERS[number];
|
|
9
9
|
export declare function isCollectionOperation(value: string): value is CollectionOperation;
|
|
10
10
|
export declare function areCollectionOperations(values: readonly string[]): values is readonly CollectionOperation[];
|
|
11
|
+
export declare function operationRequiresTimerCriterion(operation: CollectionOperation): boolean;
|
|
11
12
|
export declare function isFileControlMessageType(value: string): value is FileControlMessageType;
|
|
12
13
|
export declare function operationInputSchemaVersion(operation: EncryptedOperation, input: unknown): number;
|
|
13
14
|
export declare function mutationOperationIdentifier(operation: EncryptedOperation, input: unknown): MutationOperationIdentifier | null;
|
package/dist/operations.js
CHANGED
|
@@ -136,6 +136,12 @@ export const MUTATING_OPERATION_IDENTIFIERS = [
|
|
|
136
136
|
"file_control:commit_file_upload",
|
|
137
137
|
"file_control:abort_file_transfer"
|
|
138
138
|
];
|
|
139
|
+
const TIMER_CRITERION_OPERATIONS = new Set([
|
|
140
|
+
"list_timers",
|
|
141
|
+
"put_timer",
|
|
142
|
+
"cancel_timer",
|
|
143
|
+
"reconcile_timers"
|
|
144
|
+
]);
|
|
139
145
|
const COLLECTION_OPERATION_SET = new Set(COLLECTION_OPERATIONS);
|
|
140
146
|
const FILE_CONTROL_MESSAGE_TYPE_SET = new Set(FILE_CONTROL_MESSAGE_TYPES);
|
|
141
147
|
export function isCollectionOperation(value) {
|
|
@@ -144,6 +150,9 @@ export function isCollectionOperation(value) {
|
|
|
144
150
|
export function areCollectionOperations(values) {
|
|
145
151
|
return values.every(isCollectionOperation);
|
|
146
152
|
}
|
|
153
|
+
export function operationRequiresTimerCriterion(operation) {
|
|
154
|
+
return TIMER_CRITERION_OPERATIONS.has(operation);
|
|
155
|
+
}
|
|
147
156
|
export function isFileControlMessageType(value) {
|
|
148
157
|
return FILE_CONTROL_MESSAGE_TYPE_SET.has(value);
|
|
149
158
|
}
|
package/package.json
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
{ "id": "apply_type_pack", "input_schema_version": 1, "mutation": "always" },
|
|
24
24
|
{ "id": "assess_collection_setup", "input_schema_version": 1, "mutation": "never" },
|
|
25
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" },
|
|
26
|
+
{ "id": "list_timers", "input_schema_version": 1, "mutation": "never", "requires_timer_criterion": true },
|
|
27
|
+
{ "id": "put_timer", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
28
|
+
{ "id": "cancel_timer", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
29
|
+
{ "id": "reconcile_timers", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
30
30
|
{ "id": "sync", "input_schema_version": 1, "mutation": "sync_action" }
|
|
31
31
|
],
|
|
32
32
|
"file_control_messages": [
|