@korajs/core 1.0.0-beta.11 → 1.0.0-beta.12
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/bindings/index.d.cts +2 -2
- package/dist/bindings/index.d.ts +2 -2
- package/dist/{build-scope-map--0H8l6Tw.d.cts → build-scope-map-CItP1gsz.d.cts} +1 -1
- package/dist/{build-scope-map-B3R_emUU.d.ts → build-scope-map-Cv5HfCQP.d.ts} +1 -1
- package/dist/{events-BPbYUbrE.d.cts → events-D7JCtQSD.d.cts} +11 -0
- package/dist/{events-BPbYUbrE.d.ts → events-D7JCtQSD.d.ts} +11 -0
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{operation-Dt0AtT8u.d.ts → operation-BX4ok7U4.d.ts} +1 -1
- package/dist/{operation-DbynlVcp.d.cts → operation-BXvJ6RiA.d.cts} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as KoraEventEmitter } from '../events-
|
|
2
|
-
import { S as ScopeMap } from '../build-scope-map
|
|
1
|
+
import { p as KoraEventEmitter } from '../events-D7JCtQSD.cjs';
|
|
2
|
+
import { S as ScopeMap } from '../build-scope-map-CItP1gsz.cjs';
|
|
3
3
|
|
|
4
4
|
/** Sync status shape consumed by framework binding hooks (matches {@link SyncStatusInfo} in `@korajs/sync`). */
|
|
5
5
|
interface KoraBindingSyncStatus {
|
package/dist/bindings/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as KoraEventEmitter } from '../events-
|
|
2
|
-
import { S as ScopeMap } from '../build-scope-map-
|
|
1
|
+
import { p as KoraEventEmitter } from '../events-D7JCtQSD.js';
|
|
2
|
+
import { S as ScopeMap } from '../build-scope-map-Cv5HfCQP.js';
|
|
3
3
|
|
|
4
4
|
/** Sync status shape consumed by framework binding hooks (matches {@link SyncStatusInfo} in `@korajs/sync`). */
|
|
5
5
|
interface KoraBindingSyncStatus {
|
|
@@ -840,9 +840,18 @@ type KoraEvent = {
|
|
|
840
840
|
type: 'sync:received';
|
|
841
841
|
operations: Operation[];
|
|
842
842
|
batchSize: number;
|
|
843
|
+
/** Server-ingest outcomes. Omitted for ordinary client-side receive events. */
|
|
844
|
+
uniqueOperations?: number;
|
|
845
|
+
duplicateOperations?: number;
|
|
846
|
+
rejectedOperations?: number;
|
|
843
847
|
} | {
|
|
844
848
|
type: 'sync:acknowledged';
|
|
845
849
|
sequenceNumber: number;
|
|
850
|
+
} | {
|
|
851
|
+
type: 'sync:scope-retracted';
|
|
852
|
+
collection: string;
|
|
853
|
+
recordId: string;
|
|
854
|
+
quarantinedOperationIds: string[];
|
|
846
855
|
} | {
|
|
847
856
|
type: 'sync:apply-failed';
|
|
848
857
|
operationId: string;
|
|
@@ -877,7 +886,9 @@ type KoraEvent = {
|
|
|
877
886
|
type: 'sync:delivery-stalled';
|
|
878
887
|
sessionId: string;
|
|
879
888
|
watermark: number;
|
|
889
|
+
outstandingMaxDeliverySequence: number;
|
|
880
890
|
repeatCount: number;
|
|
891
|
+
reason: 'unacknowledged-delivery';
|
|
881
892
|
} | {
|
|
882
893
|
type: 'query:subscribed';
|
|
883
894
|
queryId: string;
|
|
@@ -840,9 +840,18 @@ type KoraEvent = {
|
|
|
840
840
|
type: 'sync:received';
|
|
841
841
|
operations: Operation[];
|
|
842
842
|
batchSize: number;
|
|
843
|
+
/** Server-ingest outcomes. Omitted for ordinary client-side receive events. */
|
|
844
|
+
uniqueOperations?: number;
|
|
845
|
+
duplicateOperations?: number;
|
|
846
|
+
rejectedOperations?: number;
|
|
843
847
|
} | {
|
|
844
848
|
type: 'sync:acknowledged';
|
|
845
849
|
sequenceNumber: number;
|
|
850
|
+
} | {
|
|
851
|
+
type: 'sync:scope-retracted';
|
|
852
|
+
collection: string;
|
|
853
|
+
recordId: string;
|
|
854
|
+
quarantinedOperationIds: string[];
|
|
846
855
|
} | {
|
|
847
856
|
type: 'sync:apply-failed';
|
|
848
857
|
operationId: string;
|
|
@@ -877,7 +886,9 @@ type KoraEvent = {
|
|
|
877
886
|
type: 'sync:delivery-stalled';
|
|
878
887
|
sessionId: string;
|
|
879
888
|
watermark: number;
|
|
889
|
+
outstandingMaxDeliverySequence: number;
|
|
880
890
|
repeatCount: number;
|
|
891
|
+
reason: 'unacknowledged-delivery';
|
|
881
892
|
} | {
|
|
882
893
|
type: 'query:subscribed';
|
|
883
894
|
queryId: string;
|
package/dist/index.cjs
CHANGED
|
@@ -3194,15 +3194,20 @@ var KORA_OPERATION_MESSAGE = `message KoraOperation {
|
|
|
3194
3194
|
var OPERATION_BATCH_MESSAGE = `message OperationBatch {
|
|
3195
3195
|
repeated KoraOperation operations = 1;
|
|
3196
3196
|
bool is_final = 2;
|
|
3197
|
+
bytes retractions_json = 3;
|
|
3197
3198
|
}`;
|
|
3198
3199
|
var HANDSHAKE_MESSAGE = `message HandshakeMessage {
|
|
3199
3200
|
map<string, int64> version_vector = 1;
|
|
3200
3201
|
int32 schema_version = 2;
|
|
3201
3202
|
string node_id = 3;
|
|
3203
|
+
string scope_exit_policy = 4;
|
|
3202
3204
|
}`;
|
|
3203
3205
|
var HANDSHAKE_RESPONSE_MESSAGE = `message HandshakeResponse {
|
|
3204
3206
|
map<string, int64> version_vector = 1;
|
|
3205
3207
|
int32 schema_version = 2;
|
|
3208
|
+
bytes accepted_scope_json = 3;
|
|
3209
|
+
bytes accepted_downlink_scopes_json = 4;
|
|
3210
|
+
bytes accepted_uplink_scopes_json = 5;
|
|
3206
3211
|
}`;
|
|
3207
3212
|
var ACKNOWLEDGMENT_MESSAGE = `message Acknowledgment {
|
|
3208
3213
|
int64 sequence_number = 1;
|
|
@@ -3268,20 +3273,25 @@ function buildJsonDescriptor(schema) {
|
|
|
3268
3273
|
nested.OperationBatch = {
|
|
3269
3274
|
fields: {
|
|
3270
3275
|
operations: { type: "KoraOperation", id: 1, rule: "repeated" },
|
|
3271
|
-
is_final: { type: "bool", id: 2 }
|
|
3276
|
+
is_final: { type: "bool", id: 2 },
|
|
3277
|
+
retractions_json: { type: "bytes", id: 3 }
|
|
3272
3278
|
}
|
|
3273
3279
|
};
|
|
3274
3280
|
nested.HandshakeMessage = {
|
|
3275
3281
|
fields: {
|
|
3276
3282
|
version_vector: { keyType: "string", type: "int64", id: 1 },
|
|
3277
3283
|
schema_version: { type: "int32", id: 2 },
|
|
3278
|
-
node_id: { type: "string", id: 3 }
|
|
3284
|
+
node_id: { type: "string", id: 3 },
|
|
3285
|
+
scope_exit_policy: { type: "string", id: 4 }
|
|
3279
3286
|
}
|
|
3280
3287
|
};
|
|
3281
3288
|
nested.HandshakeResponse = {
|
|
3282
3289
|
fields: {
|
|
3283
3290
|
version_vector: { keyType: "string", type: "int64", id: 1 },
|
|
3284
|
-
schema_version: { type: "int32", id: 2 }
|
|
3291
|
+
schema_version: { type: "int32", id: 2 },
|
|
3292
|
+
accepted_scope_json: { type: "bytes", id: 3 },
|
|
3293
|
+
accepted_downlink_scopes_json: { type: "bytes", id: 4 },
|
|
3294
|
+
accepted_uplink_scopes_json: { type: "bytes", id: 5 }
|
|
3285
3295
|
}
|
|
3286
3296
|
};
|
|
3287
3297
|
nested.Acknowledgment = {
|