@abloatai/humans 0.57.0 → 0.59.0
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/Ablo.d.ts +8 -18
- package/dist/client.d.ts +6 -19
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/local/Database.d.ts +1 -1
- package/dist/local/Model.js +10 -1
- package/dist/local/SyncClient.js +5 -0
- package/dist/local/client/createInternalComponents.d.ts +1 -1
- package/dist/local/client/createInternalComponents.js +1 -1
- package/dist/local/client/{createModelProxy.d.ts → createModelOperations.d.ts} +11 -10
- package/dist/local/client/{createModelProxy.js → createModelOperations.js} +240 -313
- package/dist/local/client/options.d.ts +2 -2
- package/dist/local/client/reactiveEngine.js +34 -45
- package/dist/local/client/resourceTypes.d.ts +3 -3
- package/dist/local/client/resourceTypes.js +1 -1
- package/dist/local/client/schemaConfig.js +1 -0
- package/dist/local/client/wsMutationExecutor.d.ts +4 -4
- package/dist/local/client/wsMutationExecutor.js +3 -5
- package/dist/local/coordination/ClaimLog.d.ts +3 -3
- package/dist/local/coordination/ClaimLog.js +2 -2
- package/dist/local/interfaces/index.d.ts +10 -7
- package/dist/local/mutators/mutateActions.d.ts +3 -2
- package/dist/local/query/types.d.ts +2 -2
- package/dist/local/stores/syncAction.d.ts +1 -1
- package/dist/local/stores/syncAction.js +1 -1
- package/dist/local/sync/BootstrapFetcher.js +4 -4
- package/dist/local/sync/ConnectionManager.d.ts +1 -1
- package/dist/local/sync/ConnectionManager.js +1 -1
- package/dist/local/sync/OnDemandLoader.d.ts +1 -1
- package/dist/local/sync/OnDemandLoader.js +1 -1
- package/dist/local/sync/SyncWebSocket.d.ts +3 -3
- package/dist/local/sync/SyncWebSocket.js +2 -2
- package/dist/local/sync/commitFrames.d.ts +1 -1
- package/dist/local/sync/commitFrames.js +1 -1
- package/dist/local/sync/contextOnChange.d.ts +8 -0
- package/dist/local/sync/contextOnChange.js +65 -0
- package/dist/local/sync/createClaimStream.d.ts +1 -1
- package/dist/local/sync/createClaimStream.js +47 -28
- package/dist/local/sync/credentialLifecycle.d.ts +1 -1
- package/dist/local/sync/credentialLifecycle.js +1 -1
- package/dist/local/sync/participants.d.ts +1 -1
- package/dist/local/sync/schemaDrift.d.ts +15 -1
- package/dist/local/sync/schemaDrift.js +30 -13
- package/dist/local/sync/schemas.d.ts +2 -2
- package/dist/local/sync/schemas.js +1 -1
- package/dist/local/sync/wsFrameHandlers.d.ts +1 -1
- package/dist/local/sync/wsFrameHandlers.js +1 -1
- package/dist/local/transactions/databaseCommitOutbox.d.ts +2 -2
- package/dist/local/transactions/mutations/MutationQueue.d.ts +4 -19
- package/dist/local/transactions/mutations/MutationQueue.js +5 -70
- package/dist/local/transactions/mutations/batchProcessing.d.ts +2 -13
- package/dist/local/transactions/mutations/batchProcessing.js +0 -20
- package/dist/local/transactions/mutations/commitApi.d.ts +2 -3
- package/dist/local/transactions/mutations/commitApi.js +0 -4
- package/dist/local/transactions/mutations/commitLane.d.ts +3 -8
- package/dist/local/transactions/mutations/commitLane.js +0 -11
- package/dist/local/transactions/mutations/commitPayload.d.ts +2 -4
- package/dist/local/transactions/mutations/commitPayload.js +2 -6
- package/dist/local/transactions/mutations/commitTransport.d.ts +3 -4
- package/dist/local/transactions/mutations/commitTransport.js +2 -5
- package/dist/local/transactions/mutations/durableCommitRestore.d.ts +1 -1
- package/dist/local/transactions/mutations/durableCommitRestore.js +1 -4
- package/dist/local/transactions/mutations/durableWriteStore.d.ts +5 -5
- package/dist/local/transactions/mutations/durableWriteStore.js +3 -3
- package/dist/local/transactions/mutations/failurePolicy.d.ts +2 -2
- package/dist/local/transactions/mutations/mutationPersistence.d.ts +1 -1
- package/dist/local/transactions/mutations/pendingDrain.d.ts +2 -2
- package/dist/local/transactions/mutations/replayValidation.d.ts +0 -20
- package/dist/local/transactions/mutations/replayValidation.js +1 -3
- package/dist/local/transactions/persistedTransaction.d.ts +0 -2
- package/dist/plugin.d.ts +2 -2
- package/dist/presenceStream.d.ts +1 -1
- package/dist/react/createAbloReact.d.ts +1 -1
- package/dist/react/useAblo.d.ts +2 -2
- package/dist/react/useAblo.js +1 -1
- package/dist/surface.d.ts +1 -1
- package/dist/surface.js +1 -2
- package/package.json +2 -2
- package/src/Ablo.ts +9 -27
- package/src/client.ts +6 -22
- package/src/core.ts +1 -1
- package/src/local/Database.ts +1 -1
- package/src/local/Model.ts +12 -1
- package/src/local/SyncClient.ts +5 -0
- package/src/local/client/createInternalComponents.ts +2 -2
- package/src/local/client/{createModelProxy.ts → createModelOperations.ts} +292 -367
- package/src/local/client/options.ts +2 -2
- package/src/local/client/reactiveEngine.ts +63 -55
- package/src/local/client/resourceTypes.ts +4 -4
- package/src/local/client/schemaConfig.ts +3 -0
- package/src/local/client/wsMutationExecutor.ts +3 -9
- package/src/local/coordination/ClaimLog.ts +3 -3
- package/src/local/interfaces/index.ts +7 -7
- package/src/local/mutators/mutateActions.ts +3 -2
- package/src/local/query/types.ts +2 -2
- package/src/local/stores/syncAction.ts +1 -1
- package/src/local/sync/BootstrapFetcher.ts +5 -4
- package/src/local/sync/ConnectionManager.ts +1 -1
- package/src/local/sync/OnDemandLoader.ts +1 -1
- package/src/local/sync/SyncWebSocket.ts +3 -3
- package/src/local/sync/commitFrames.ts +1 -2
- package/src/local/sync/contextOnChange.ts +92 -0
- package/src/local/sync/createClaimStream.ts +77 -39
- package/src/local/sync/credentialLifecycle.ts +1 -1
- package/src/local/sync/participants.ts +1 -1
- package/src/local/sync/schemaDrift.ts +32 -16
- package/src/local/sync/schemas.ts +1 -1
- package/src/local/sync/wsFrameHandlers.ts +1 -1
- package/src/local/transactions/databaseCommitOutbox.ts +2 -2
- package/src/local/transactions/mutations/MutationQueue.ts +8 -95
- package/src/local/transactions/mutations/batchProcessing.ts +2 -38
- package/src/local/transactions/mutations/commitApi.ts +3 -7
- package/src/local/transactions/mutations/commitLane.ts +3 -17
- package/src/local/transactions/mutations/commitPayload.ts +3 -11
- package/src/local/transactions/mutations/commitTransport.ts +3 -7
- package/src/local/transactions/mutations/durableCommitRestore.ts +2 -5
- package/src/local/transactions/mutations/durableWriteStore.ts +5 -5
- package/src/local/transactions/mutations/failurePolicy.ts +2 -2
- package/src/local/transactions/mutations/mutationPersistence.ts +1 -1
- package/src/local/transactions/mutations/pendingDrain.ts +2 -2
- package/src/local/transactions/mutations/replayValidation.ts +1 -3
- package/src/local/transactions/persistedTransaction.ts +0 -3
- package/src/plugin.ts +2 -2
- package/src/presenceStream.ts +2 -2
- package/src/react/createAbloReact.ts +1 -1
- package/src/react/useAblo.ts +2 -2
- package/src/surface.ts +2 -3
- package/dist/local/sync/createSnapshot.d.ts +0 -29
- package/dist/local/sync/createSnapshot.js +0 -116
- package/src/local/sync/createSnapshot.ts +0 -160
|
@@ -87,17 +87,6 @@ export async function processBatch(ctx) {
|
|
|
87
87
|
}));
|
|
88
88
|
await ctx.persistDurableCommitAcceptance(durableEnvelope, result);
|
|
89
89
|
const lastSyncId = result.lastSyncId;
|
|
90
|
-
const notifications = result.notifications;
|
|
91
|
-
const { holdsEntireBatch, heldTargets, notificationsByTarget, } = ctx.classifyReceiptNotifications(batchOps.map(({ op }) => ({ model: op.model, id: op.id })), notifications ?? []);
|
|
92
|
-
for (const { tx } of batchOps) {
|
|
93
|
-
const txTarget = ctx.receiptTargetKey(tx.modelKey, tx.modelId);
|
|
94
|
-
const txNotifs = holdsEntireBatch
|
|
95
|
-
? notifications
|
|
96
|
-
: notificationsByTarget.get(txTarget);
|
|
97
|
-
if (txNotifs && txNotifs.length > 0) {
|
|
98
|
-
ctx.commitNotifications.set(tx.id, txNotifs);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
90
|
const missingIds = new Set(result.missingIds ?? []);
|
|
102
91
|
const settlingBatchOps = [];
|
|
103
92
|
for (const entry of batchOps) {
|
|
@@ -106,15 +95,6 @@ export async function processBatch(ctx) {
|
|
|
106
95
|
await ctx.handleFailure(tx, new AbloNotFoundError(`${tx.modelName}/${tx.modelId} was not found or is outside this credential's scope.`, [tx.modelId]));
|
|
107
96
|
continue;
|
|
108
97
|
}
|
|
109
|
-
if (holdsEntireBatch ||
|
|
110
|
-
heldTargets.has(ctx.receiptTargetKey(tx.modelKey, tx.modelId))) {
|
|
111
|
-
await ctx.rollbackOptimistic(tx, 'conflict_server_wins');
|
|
112
|
-
ctx.store.updateStatus(tx.id, 'completed');
|
|
113
|
-
ctx.emit('transaction:completed', tx);
|
|
114
|
-
ctx.emit(`transaction:completed:${tx.id}`, tx);
|
|
115
|
-
ctx.optimisticUpdates.delete(tx.id);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
98
|
settlingBatchOps.push(entry);
|
|
119
99
|
}
|
|
120
100
|
// A forwarded write has been accepted, but the source database
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ReadDependency
|
|
2
|
-
import type { DurableCommitEnvelope } from '@abloatai/transaction/
|
|
1
|
+
import type { ReadDependency } from '@abloatai/transaction/coordination/schema';
|
|
2
|
+
import type { DurableCommitEnvelope } from '@abloatai/transaction/commit';
|
|
3
3
|
import type { CommitTransaction } from './commitLane.js';
|
|
4
4
|
import type { SealDurableCommitInput } from './commitTransport.js';
|
|
5
5
|
export interface CommitApiContext {
|
|
@@ -15,5 +15,4 @@ export interface CommitApiContext {
|
|
|
15
15
|
}
|
|
16
16
|
export declare function enqueueCommit(ctx: CommitApiContext, clientTxId: string, operations: CommitTransaction['operations'], options?: {
|
|
17
17
|
reads?: ReadDependency[] | null;
|
|
18
|
-
track?: TrackDependency[] | null;
|
|
19
18
|
}): Promise<void>;
|
|
@@ -8,12 +8,10 @@ export async function enqueueCommit(ctx, clientTxId, operations, options = {}) {
|
|
|
8
8
|
const existingIntent = stableStringify({
|
|
9
9
|
operations: existing.operations,
|
|
10
10
|
reads: existing.reads ?? null,
|
|
11
|
-
track: existing.track ?? null,
|
|
12
11
|
});
|
|
13
12
|
const incomingIntent = stableStringify({
|
|
14
13
|
operations,
|
|
15
14
|
reads: options.reads ?? null,
|
|
16
|
-
track: options.track ?? null,
|
|
17
15
|
});
|
|
18
16
|
if (existingIntent !== incomingIntent) {
|
|
19
17
|
throw new AbloIdempotencyError('Idempotency key reused with a different atomic commit request', { code: 'idempotency_conflict' });
|
|
@@ -34,7 +32,6 @@ export async function enqueueCommit(ctx, clientTxId, operations, options = {}) {
|
|
|
34
32
|
kind: 'commit',
|
|
35
33
|
operations: [...operations],
|
|
36
34
|
...(options.reads ? { reads: options.reads } : {}),
|
|
37
|
-
...(options.track ? { track: options.track } : {}),
|
|
38
35
|
status: 'pending',
|
|
39
36
|
createdAt: now,
|
|
40
37
|
attempts: 0,
|
|
@@ -48,7 +45,6 @@ export async function enqueueCommit(ctx, clientTxId, operations, options = {}) {
|
|
|
48
45
|
operations: tx.operations,
|
|
49
46
|
commitOptions: {
|
|
50
47
|
...(tx.reads ? { reads: tx.reads } : {}),
|
|
51
|
-
...(tx.track ? { track: tx.track } : {}),
|
|
52
48
|
},
|
|
53
49
|
createdAt: tx.createdAt,
|
|
54
50
|
sealedAt: tx.sealedAt,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
2
|
-
import type { ReadDependency
|
|
3
|
-
import type { CommitOperationResult, MutationCommitResult } from '@abloatai/transaction/
|
|
4
|
-
import type { DurableCommitEnvelope, DurableCommitOperation } from '@abloatai/transaction/
|
|
2
|
+
import type { ReadDependency } from '@abloatai/transaction/coordination/schema';
|
|
3
|
+
import type { CommitOperationResult, MutationCommitResult } from '@abloatai/transaction/commit';
|
|
4
|
+
import type { DurableCommitEnvelope, DurableCommitOperation } from '@abloatai/transaction/commit';
|
|
5
5
|
import type { SealDurableCommitInput } from './commitTransport.js';
|
|
6
6
|
export interface CommitTransaction {
|
|
7
7
|
id: string;
|
|
@@ -13,10 +13,8 @@ export interface CommitTransaction {
|
|
|
13
13
|
input?: Record<string, unknown>;
|
|
14
14
|
transactionId?: string;
|
|
15
15
|
readAt?: number | null;
|
|
16
|
-
onStale?: OnStaleMode | null;
|
|
17
16
|
}[];
|
|
18
17
|
reads?: ReadDependency[] | null;
|
|
19
|
-
track?: TrackDependency[] | null;
|
|
20
18
|
status: 'pending' | 'executing' | 'awaiting_delta' | 'completed' | 'failed';
|
|
21
19
|
createdAt: number;
|
|
22
20
|
attempts: number;
|
|
@@ -44,7 +42,6 @@ export interface CommitLaneContext {
|
|
|
44
42
|
};
|
|
45
43
|
};
|
|
46
44
|
readonly commitLane: CommitTransaction[];
|
|
47
|
-
readonly commitNotifications: Map<string, StaleNotification[]>;
|
|
48
45
|
readonly commitMissingIds: Map<string, string[]>;
|
|
49
46
|
readonly commitProcessing: boolean;
|
|
50
47
|
readonly setCommitProcessing: (value: boolean) => void;
|
|
@@ -65,7 +62,6 @@ export interface CommitLaneContext {
|
|
|
65
62
|
}
|
|
66
63
|
export interface CommitReceiptContext {
|
|
67
64
|
readonly commitStore: Map<string, CommitTransaction>;
|
|
68
|
-
readonly commitNotifications: Map<string, StaleNotification[]>;
|
|
69
65
|
readonly commitMissingIds: Map<string, string[]>;
|
|
70
66
|
readonly replicationLagErrors: Map<string, Error>;
|
|
71
67
|
readonly on: (event: string, listener: (payload: object) => void) => void;
|
|
@@ -73,7 +69,6 @@ export interface CommitReceiptContext {
|
|
|
73
69
|
}
|
|
74
70
|
export declare function waitForCommitReceipt(ctx: CommitReceiptContext, clientTxId: string): Promise<{
|
|
75
71
|
lastSyncId: number;
|
|
76
|
-
notifications?: StaleNotification[];
|
|
77
72
|
missingIds?: string[];
|
|
78
73
|
operationResults?: CommitOperationResult[];
|
|
79
74
|
}>;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { transientRetryDelayMs } from './failureHandling.js';
|
|
2
2
|
export function waitForCommitReceipt(ctx, clientTxId) {
|
|
3
|
-
const drainNotifications = () => {
|
|
4
|
-
const notifications = ctx.commitNotifications.get(clientTxId);
|
|
5
|
-
if (!notifications)
|
|
6
|
-
return undefined;
|
|
7
|
-
ctx.commitNotifications.delete(clientTxId);
|
|
8
|
-
return notifications.length > 0 ? notifications : undefined;
|
|
9
|
-
};
|
|
10
3
|
const drainMissingIds = () => {
|
|
11
4
|
const ids = ctx.commitMissingIds.get(clientTxId);
|
|
12
5
|
if (!ids)
|
|
@@ -18,7 +11,6 @@ export function waitForCommitReceipt(ctx, clientTxId) {
|
|
|
18
11
|
const missingIds = drainMissingIds();
|
|
19
12
|
return {
|
|
20
13
|
lastSyncId,
|
|
21
|
-
notifications: drainNotifications(),
|
|
22
14
|
...(transaction.operationResults
|
|
23
15
|
? { operationResults: transaction.operationResults }
|
|
24
16
|
: {}),
|
|
@@ -81,7 +73,6 @@ export async function processCommitLane(ctx) {
|
|
|
81
73
|
sourceMutationIds: tx.sourceMutationIds,
|
|
82
74
|
commitOptions: {
|
|
83
75
|
...(tx.reads ? { reads: tx.reads } : {}),
|
|
84
|
-
...(tx.track ? { track: tx.track } : {}),
|
|
85
76
|
},
|
|
86
77
|
createdAt: tx.createdAt,
|
|
87
78
|
sealedAt: tx.sealedAt,
|
|
@@ -95,8 +86,6 @@ export async function processCommitLane(ctx) {
|
|
|
95
86
|
tx.lastSyncId = result.lastSyncId;
|
|
96
87
|
if (result.operationResults?.length)
|
|
97
88
|
tx.operationResults = [...result.operationResults];
|
|
98
|
-
if (result.notifications?.length)
|
|
99
|
-
ctx.commitNotifications.set(tx.id, result.notifications);
|
|
100
89
|
if (result.missingIds?.length)
|
|
101
90
|
ctx.commitMissingIds.set(tx.id, result.missingIds);
|
|
102
91
|
ctx.commitLane.shift();
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
12
12
|
import { MutationOperationType } from '@abloatai/transaction/types';
|
|
13
|
-
import type { OnStaleMode } from '@abloatai/transaction/coordination/schema';
|
|
14
13
|
import type { MutationOptions, WriteOptions } from '../../interfaces/index.js';
|
|
15
|
-
import type { CommitEnvelopeMember } from '@abloatai/transaction/
|
|
14
|
+
import type { CommitEnvelopeMember } from '@abloatai/transaction/commit';
|
|
16
15
|
export interface UserContext {
|
|
17
16
|
userId: string;
|
|
18
17
|
organizationId: string;
|
|
@@ -128,14 +127,13 @@ export declare function hasStaleWriteOptions(options?: WriteOptions): boolean;
|
|
|
128
127
|
export declare function hasCommitCoalescingBarrier(options?: WriteOptions): boolean;
|
|
129
128
|
export interface WriteOperationFields {
|
|
130
129
|
readAt?: number | null;
|
|
131
|
-
onStale?: OnStaleMode | null;
|
|
132
130
|
fenceToken?: number | null;
|
|
133
131
|
claimId?: string;
|
|
134
132
|
options?: Pick<MutationOptions, 'idempotencyKey' | 'label'>;
|
|
135
133
|
}
|
|
136
134
|
/**
|
|
137
135
|
* Copies a transaction's `writeOptions` onto the wire operation. The
|
|
138
|
-
* stale-context
|
|
136
|
+
* stale-context guard (`readAt`) sits at the operation's root,
|
|
139
137
|
* while `idempotencyKey` and `label` go in its `options` slot — the
|
|
140
138
|
* `mutation_log` cache key and audit tag. This is the one place caller-supplied
|
|
141
139
|
* write options cross onto the wire.
|
|
@@ -104,8 +104,7 @@ export const TX_TYPE_TO_MUTATION_OP = {
|
|
|
104
104
|
unarchive: MutationOperationType.UNARCHIVE,
|
|
105
105
|
};
|
|
106
106
|
export function hasStaleWriteOptions(options) {
|
|
107
|
-
return
|
|
108
|
-
options?.onStale !== undefined);
|
|
107
|
+
return options?.readAt !== undefined;
|
|
109
108
|
}
|
|
110
109
|
/** Options whose identity/audit semantics forbid merging two caller writes. */
|
|
111
110
|
export function hasCommitCoalescingBarrier(options) {
|
|
@@ -117,7 +116,7 @@ export function hasCommitCoalescingBarrier(options) {
|
|
|
117
116
|
}
|
|
118
117
|
/**
|
|
119
118
|
* Copies a transaction's `writeOptions` onto the wire operation. The
|
|
120
|
-
* stale-context
|
|
119
|
+
* stale-context guard (`readAt`) sits at the operation's root,
|
|
121
120
|
* while `idempotencyKey` and `label` go in its `options` slot — the
|
|
122
121
|
* `mutation_log` cache key and audit tag. This is the one place caller-supplied
|
|
123
122
|
* write options cross onto the wire.
|
|
@@ -130,9 +129,6 @@ export function applyWriteOptions(op, transaction) {
|
|
|
130
129
|
if (writeOptions.readAt !== undefined) {
|
|
131
130
|
operation.readAt = writeOptions.readAt;
|
|
132
131
|
}
|
|
133
|
-
if (writeOptions.onStale !== undefined) {
|
|
134
|
-
operation.onStale = writeOptions.onStale;
|
|
135
|
-
}
|
|
136
132
|
if (writeOptions.fenceToken !== undefined) {
|
|
137
133
|
operation.fenceToken = writeOptions.fenceToken;
|
|
138
134
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
2
2
|
import type { MutationExecutor } from '../../interfaces/index.js';
|
|
3
|
-
import type { ReadDependency
|
|
4
|
-
import { type MutationCommitResult } from '@abloatai/transaction/
|
|
5
|
-
import { type CommitOutboxScope, type DurableCommitEnvelope, type DurableCommitOperation } from '@abloatai/transaction/
|
|
3
|
+
import type { ReadDependency } from '@abloatai/transaction/coordination/schema';
|
|
4
|
+
import { type MutationCommitResult } from '@abloatai/transaction/commit';
|
|
5
|
+
import { type CommitOutboxScope, type DurableCommitEnvelope, type DurableCommitOperation } from '@abloatai/transaction/commit';
|
|
6
6
|
import type { DurableWriteStore } from './durableWriteStore.js';
|
|
7
7
|
export interface CommitTransportContext {
|
|
8
8
|
readonly runtime: RuntimeContext;
|
|
@@ -22,7 +22,6 @@ export interface SealDurableCommitInput {
|
|
|
22
22
|
sourceMutationIds?: string[];
|
|
23
23
|
commitOptions?: {
|
|
24
24
|
reads?: readonly ReadDependency[] | null;
|
|
25
|
-
track?: readonly TrackDependency[] | null;
|
|
26
25
|
};
|
|
27
26
|
createdAt: number;
|
|
28
27
|
sealedAt: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbloConnectionError, AbloError, AbloIdempotencyError, } from '@abloatai/transaction/errors';
|
|
2
|
-
import { mutationCommitResultSchema, } from '@abloatai/transaction/
|
|
3
|
-
import { createDurableCommitEnvelope, commitEnvelopeRecordId, durableCommitEnvelopeSchema, } from '@abloatai/transaction/
|
|
2
|
+
import { mutationCommitResultSchema, } from '@abloatai/transaction/commit';
|
|
3
|
+
import { createDurableCommitEnvelope, commitEnvelopeRecordId, durableCommitEnvelopeSchema, } from '@abloatai/transaction/commit';
|
|
4
4
|
export async function sealDurableCommit(ctx, input, pendingMutationRecordId) {
|
|
5
5
|
const sourceMutationIds = [...new Set(input.sourceMutationIds ?? [])];
|
|
6
6
|
const envelope = createDurableCommitEnvelope({
|
|
@@ -12,9 +12,6 @@ export async function sealDurableCommit(ctx, input, pendingMutationRecordId) {
|
|
|
12
12
|
...(input.commitOptions?.reads !== undefined
|
|
13
13
|
? { reads: input.commitOptions.reads === null ? null : [...input.commitOptions.reads] }
|
|
14
14
|
: {}),
|
|
15
|
-
...(input.commitOptions?.track !== undefined
|
|
16
|
-
? { track: input.commitOptions.track === null ? null : [...input.commitOptions.track] }
|
|
17
|
-
: {}),
|
|
18
15
|
},
|
|
19
16
|
...(ctx.commitOutboxScope ? { scope: ctx.commitOutboxScope } : {}),
|
|
20
17
|
createdAt: input.createdAt,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
2
2
|
import type { CommitTransaction } from './commitLane.js';
|
|
3
|
-
import type { CommitOutboxScope } from '@abloatai/transaction/
|
|
3
|
+
import type { CommitOutboxScope } from '@abloatai/transaction/commit';
|
|
4
4
|
import type { DurableWriteStore } from './durableWriteStore.js';
|
|
5
5
|
export interface DurableCommitRestoreContext {
|
|
6
6
|
readonly config: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbloIdempotencyError, AbloValidationError } from '@abloatai/transaction/errors';
|
|
2
|
-
import { durableCommitEnvelopeSchema } from '@abloatai/transaction/
|
|
2
|
+
import { durableCommitEnvelopeSchema } from '@abloatai/transaction/commit';
|
|
3
3
|
export async function restoreDurableCommits(ctx) {
|
|
4
4
|
if (!ctx.config.enablePersistence)
|
|
5
5
|
return new Set();
|
|
@@ -61,9 +61,6 @@ export async function restoreDurableCommits(ctx) {
|
|
|
61
61
|
...(envelope.commitOptions.reads
|
|
62
62
|
? { reads: [...envelope.commitOptions.reads] }
|
|
63
63
|
: {}),
|
|
64
|
-
...(envelope.commitOptions.track
|
|
65
|
-
? { track: [...envelope.commitOptions.track] }
|
|
66
|
-
: {}),
|
|
67
64
|
status: 'pending',
|
|
68
65
|
createdAt: envelope.createdAt,
|
|
69
66
|
sealedAt: envelope.sealedAt,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The port and its config live in the core's `durableWrites` module (a behavior
|
|
8
8
|
* contract, not a persisted shape); the records that cross it are owned by
|
|
9
|
-
* `
|
|
9
|
+
* `commit/confirmation/pendingWrite`.
|
|
10
10
|
*/
|
|
11
|
-
export { durableWriteStoreSchema, durableWritesConfigSchema, } from '@abloatai/transaction/
|
|
12
|
-
export type { DurableWriteStore, DurableWritesConfig, } from '@abloatai/transaction/
|
|
13
|
-
export { pendingWriteSchema } from '@abloatai/transaction/
|
|
14
|
-
export type { PendingWrite } from '@abloatai/transaction/
|
|
11
|
+
export { durableWriteStoreSchema, durableWritesConfigSchema, } from '@abloatai/transaction/commit';
|
|
12
|
+
export type { DurableWriteStore, DurableWritesConfig, } from '@abloatai/transaction/commit';
|
|
13
|
+
export { pendingWriteSchema } from '@abloatai/transaction/commit';
|
|
14
|
+
export type { PendingWrite } from '@abloatai/transaction/commit';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The port and its config live in the core's `durableWrites` module (a behavior
|
|
8
8
|
* contract, not a persisted shape); the records that cross it are owned by
|
|
9
|
-
* `
|
|
9
|
+
* `commit/confirmation/pendingWrite`.
|
|
10
10
|
*/
|
|
11
|
-
export { durableWriteStoreSchema, durableWritesConfigSchema, } from '@abloatai/transaction/
|
|
12
|
-
export { pendingWriteSchema } from '@abloatai/transaction/
|
|
11
|
+
export { durableWriteStoreSchema, durableWritesConfigSchema, } from '@abloatai/transaction/commit';
|
|
12
|
+
export { pendingWriteSchema } from '@abloatai/transaction/commit';
|
|
@@ -3,11 +3,11 @@ import type { MutationQueueConfig } from './MutationQueue.js';
|
|
|
3
3
|
import type { MutationStore } from './MutationStore.js';
|
|
4
4
|
export declare function isPermanentError(error: Error): boolean;
|
|
5
5
|
export declare function isDefinitiveRejection(error: Error): boolean;
|
|
6
|
-
export interface
|
|
6
|
+
export interface ConflictResolutionContext {
|
|
7
7
|
readonly config: Pick<MutationQueueConfig, 'conflictResolution'>;
|
|
8
8
|
readonly store: MutationStore;
|
|
9
9
|
readonly rollbackOptimistic: (transaction: QueuedMutation, reason: string) => Promise<void>;
|
|
10
10
|
readonly mergeData: (local: MutationInput | undefined, remote: MutationInput) => MutationInput;
|
|
11
11
|
readonly enqueue: (transaction: QueuedMutation) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare function handleConflict(ctx:
|
|
13
|
+
export declare function handleConflict(ctx: ConflictResolutionContext, transaction: QueuedMutation, serverData: MutationInput): Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
2
2
|
import type { MutationPersistencePort } from '../../mutationPersistence.js';
|
|
3
3
|
import type { MutationQueueConfig } from './MutationQueue.js';
|
|
4
|
-
import type { CommitOutboxScope } from '@abloatai/transaction/
|
|
4
|
+
import type { CommitOutboxScope } from '@abloatai/transaction/commit';
|
|
5
5
|
import type { QueuedMutation } from './commitPayload.js';
|
|
6
6
|
import { MutationStore } from './MutationStore.js';
|
|
7
7
|
import { deserializePersistedTransaction } from './replayValidation.js';
|
|
@@ -2,8 +2,8 @@ import type { RuntimeContext } from '../../RuntimeContext.js';
|
|
|
2
2
|
import type { QueuedMutation } from './commitPayload.js';
|
|
3
3
|
import type { MutationStore } from './MutationStore.js';
|
|
4
4
|
import type { OptimisticUpdateEntry } from './localMutation.js';
|
|
5
|
-
import type { MutationCommitResult } from '@abloatai/transaction/
|
|
6
|
-
import type { DurableCommitEnvelope } from '@abloatai/transaction/
|
|
5
|
+
import type { MutationCommitResult } from '@abloatai/transaction/commit';
|
|
6
|
+
import type { DurableCommitEnvelope } from '@abloatai/transaction/commit';
|
|
7
7
|
export interface PendingDrainContext {
|
|
8
8
|
readonly runtime: RuntimeContext;
|
|
9
9
|
readonly config: {
|
|
@@ -56,11 +56,6 @@ export declare const persistedTransactionSchema: z.ZodObject<{
|
|
|
56
56
|
sourceMutationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
57
57
|
writeOptions: z.ZodOptional<z.ZodObject<{
|
|
58
58
|
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
59
|
-
onStale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
60
|
-
reject: "reject";
|
|
61
|
-
overwrite: "overwrite";
|
|
62
|
-
notify: "notify";
|
|
63
|
-
}>>>;
|
|
64
59
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
65
60
|
label: z.ZodOptional<z.ZodString>;
|
|
66
61
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -102,11 +97,6 @@ export declare const persistedMutationSchema: z.ZodObject<{
|
|
|
102
97
|
capturedChanges: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
103
98
|
writeOptions: z.ZodOptional<z.ZodObject<{
|
|
104
99
|
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
105
|
-
onStale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
106
|
-
reject: "reject";
|
|
107
|
-
overwrite: "overwrite";
|
|
108
|
-
notify: "notify";
|
|
109
|
-
}>>>;
|
|
110
100
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
111
101
|
label: z.ZodOptional<z.ZodString>;
|
|
112
102
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -141,11 +131,6 @@ export declare const legacyPendingMutationRecordSchema: z.ZodObject<{
|
|
|
141
131
|
capturedChanges: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
132
|
writeOptions: z.ZodOptional<z.ZodObject<{
|
|
143
133
|
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
144
|
-
onStale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
145
|
-
reject: "reject";
|
|
146
|
-
overwrite: "overwrite";
|
|
147
|
-
notify: "notify";
|
|
148
|
-
}>>>;
|
|
149
134
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
150
135
|
label: z.ZodOptional<z.ZodString>;
|
|
151
136
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -179,11 +164,6 @@ export declare const pendingMutationRecordSchema: z.ZodObject<{
|
|
|
179
164
|
capturedChanges: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
180
165
|
writeOptions: z.ZodOptional<z.ZodObject<{
|
|
181
166
|
readAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
182
|
-
onStale: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
183
|
-
reject: "reject";
|
|
184
|
-
overwrite: "overwrite";
|
|
185
|
-
notify: "notify";
|
|
186
|
-
}>>>;
|
|
187
167
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
188
168
|
label: z.ZodOptional<z.ZodString>;
|
|
189
169
|
fenceToken: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -17,13 +17,11 @@
|
|
|
17
17
|
import { z } from 'zod';
|
|
18
18
|
import { computePriorityScore, normalizeModelKey } from './commitPayload.js';
|
|
19
19
|
import { globalRuntime } from '../../context.js';
|
|
20
|
-
import { commitEnvelopeMemberSchema, commitOutboxScopeSchema, } from '@abloatai/transaction/
|
|
21
|
-
import { onStaleModeSchema } from '@abloatai/transaction/coordination/schema';
|
|
20
|
+
import { commitEnvelopeMemberSchema, commitOutboxScopeSchema, } from '@abloatai/transaction/commit';
|
|
22
21
|
/** The subset of a write's options that is stored with each transaction or queued mutation. */
|
|
23
22
|
const persistedWriteOptionsSchema = z
|
|
24
23
|
.object({
|
|
25
24
|
readAt: z.number().nullable().optional(),
|
|
26
|
-
onStale: onStaleModeSchema.nullable().optional(),
|
|
27
25
|
idempotencyKey: z.string().optional(),
|
|
28
26
|
label: z.string().optional(),
|
|
29
27
|
// Aligned with the `WriteOptions` type: a claimed write persisted locally
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { OnStaleMode } from '@abloatai/transaction/coordination/schema';
|
|
2
1
|
type ModelData = Record<string, unknown>;
|
|
3
2
|
/** One mutation retained in the durable local transaction journal. */
|
|
4
3
|
interface PersistedMutation {
|
|
@@ -8,7 +7,6 @@ interface PersistedMutation {
|
|
|
8
7
|
timestamp: string;
|
|
9
8
|
writeOptions?: {
|
|
10
9
|
readAt?: number | null;
|
|
11
|
-
onStale?: OnStaleMode | null;
|
|
12
10
|
};
|
|
13
11
|
}
|
|
14
12
|
/**
|
package/dist/plugin.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ import type { ParticipantKind } from '@abloatai/transaction/types/participant';
|
|
|
17
17
|
import type { ErrorCodeSpec } from '@abloatai/transaction/errorCodes';
|
|
18
18
|
import type { Logger } from '@abloatai/transaction/logger';
|
|
19
19
|
import type { CoordinationObservability } from '@abloatai/transaction/observability';
|
|
20
|
-
import type { WsTransport } from '@abloatai/transaction/transport/
|
|
20
|
+
import type { WsTransport } from '@abloatai/transaction/transport/websocket';
|
|
21
21
|
import type { AuthCredentialSource } from '@abloatai/transaction/auth/credentialSource';
|
|
22
|
-
import type { SyncDeltaWireCore } from '@abloatai/transaction/
|
|
22
|
+
import type { SyncDeltaWireCore } from '@abloatai/transaction/observation';
|
|
23
23
|
import type { ModelData } from '@abloatai/transaction/types/modelData';
|
|
24
24
|
/**
|
|
25
25
|
* A string type that keeps literal inference alive: `id: 'humans'` stays the
|
package/dist/presenceStream.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* • Inbound — the same frame, with `kind` one of `enter`, `update`, or
|
|
23
23
|
* `leave`.
|
|
24
24
|
*/
|
|
25
|
-
import type { WsTransport } from '@abloatai/transaction/transport/
|
|
25
|
+
import type { WsTransport } from '@abloatai/transaction/transport/websocket';
|
|
26
26
|
import type { PresenceStream } from '@abloatai/transaction/types/streams';
|
|
27
27
|
import type { ParticipantKind } from '@abloatai/transaction/types/participant';
|
|
28
28
|
/**
|
|
@@ -23,7 +23,7 @@ import { type ReactElement } from 'react';
|
|
|
23
23
|
import { type AbloProviderProps } from './AbloProvider.js';
|
|
24
24
|
import { type AbloSelector, type ModelClientSelector, type UseAbloHydratedModelResult, type UseAbloModelOptions, type UseAbloModelResult } from './useAblo.js';
|
|
25
25
|
import type { AbloClient as Ablo } from '../client.js';
|
|
26
|
-
import type { ModelOperations } from '../local/client/
|
|
26
|
+
import type { ModelOperations } from '../local/client/createModelOperations.js';
|
|
27
27
|
import type { Schema, SchemaRecord } from '@abloatai/transaction/schema/schema';
|
|
28
28
|
/** What a binding returns: the provider and the hook, with `S` fixed. */
|
|
29
29
|
export interface AbloReactBinding<S extends SchemaRecord> {
|
package/dist/react/useAblo.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AbloClient as Ablo, AbloReads } from '../client.js';
|
|
2
2
|
import type { ModelClaim } from '@abloatai/transaction/coordination';
|
|
3
|
-
import { type ModelOperations } from '../local/client/
|
|
3
|
+
import { type ModelOperations } from '../local/client/createModelOperations.js';
|
|
4
4
|
import type { SchemaRecord } from '@abloatai/transaction/schema/schema';
|
|
5
5
|
import type { ResolveSchema } from '@abloatai/transaction/types/global';
|
|
6
6
|
/**
|
|
@@ -54,7 +54,7 @@ export type UseAbloHydratedModelResult<T> = Omit<UseAbloModelResult<T>, 'data'>
|
|
|
54
54
|
* // With the Register augmentation (recommended):
|
|
55
55
|
* const ablo = useAblo();
|
|
56
56
|
* if (!ablo) return <Loading />;
|
|
57
|
-
* const doc = await ablo.records.get({ id }); // async server read
|
|
57
|
+
* const doc = await ablo.records.get({ id }); // observational async server read
|
|
58
58
|
*
|
|
59
59
|
* // Reactive selector (a synchronous local snapshot). The selector's reads
|
|
60
60
|
* // are typed as snapshot rows — data fields + computeds, no relation
|
package/dist/react/useAblo.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useContext, useEffect, useState } from 'react';
|
|
3
3
|
import { AbloInternalContext } from './internalContext.js';
|
|
4
|
-
import { getModelClientMeta, } from '../local/client/
|
|
4
|
+
import { getModelClientMeta, } from '../local/client/createModelOperations.js';
|
|
5
5
|
import { Model } from '../local/Model.js';
|
|
6
6
|
import { useReactive } from '../useReactive.js';
|
|
7
7
|
const EMPTY_CLAIMS = Object.freeze([]);
|
package/dist/surface.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* tuple, so it is the one list of model-verb names a generated summary can
|
|
20
20
|
* describe.
|
|
21
21
|
*/
|
|
22
|
-
export declare const PUBLIC_MODEL_VERBS: readonly ["get", "
|
|
22
|
+
export declare const PUBLIC_MODEL_VERBS: readonly ["get", "read", "list", "listAll", "local", "create", "update", "delete", "claim", "join", "onChange"];
|
|
23
23
|
/**
|
|
24
24
|
* The option keys accepted by `local.list` and `onChange`, matching the
|
|
25
25
|
* keys of {@link LocalReadOptions}. Note that the lifecycle filter is named
|
package/dist/surface.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export const PUBLIC_MODEL_VERBS = [
|
|
24
24
|
'get',
|
|
25
|
-
'
|
|
25
|
+
'read',
|
|
26
26
|
'list',
|
|
27
27
|
'listAll',
|
|
28
28
|
'local',
|
|
@@ -30,7 +30,6 @@ export const PUBLIC_MODEL_VERBS = [
|
|
|
30
30
|
'update',
|
|
31
31
|
'delete',
|
|
32
32
|
'claim',
|
|
33
|
-
'track',
|
|
34
33
|
'join',
|
|
35
34
|
'onChange',
|
|
36
35
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abloatai/humans",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "The optional human-facing local-state package for Ablo: presence, live queries, and React bindings.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"directory": "packages/humans"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@abloatai/transaction": "^0.
|
|
87
|
+
"@abloatai/transaction": "^0.59.0",
|
|
88
88
|
"mobx": "^6.13.7",
|
|
89
89
|
"uuid": "^11.1.0",
|
|
90
90
|
"zod": "^4.4.3"
|
package/src/Ablo.ts
CHANGED
|
@@ -224,7 +224,7 @@ export function Ablo<const S extends SchemaRecord>(
|
|
|
224
224
|
//
|
|
225
225
|
// One default import, with types hung underneath via namespace dots:
|
|
226
226
|
// `import { Ablo } from "@abloatai/humans"` gets the factory, its return type, and
|
|
227
|
-
// every type a typical consumer references (`Ablo.Peer`,
|
|
227
|
+
// every type a typical consumer references (`Ablo.Peer`,
|
|
228
228
|
// and so on) — all purely type-level, with zero runtime cost.
|
|
229
229
|
//
|
|
230
230
|
// The types still live in their canonical homes (`types/streams`, `principal`,
|
|
@@ -233,7 +233,6 @@ export function Ablo<const S extends SchemaRecord>(
|
|
|
233
233
|
|
|
234
234
|
import type * as _Streams from '@abloatai/transaction/types/streams';
|
|
235
235
|
import type * as _Participants from './local/sync/participants.js';
|
|
236
|
-
import type * as _Policy from '@abloatai/transaction/policy/types';
|
|
237
236
|
import type * as _Mutators from './local/mutators/defineMutators.js';
|
|
238
237
|
import type * as _Tx from './local/mutators/Transaction.js';
|
|
239
238
|
import type * as _Undo from './local/mutators/UndoManager.js';
|
|
@@ -292,12 +291,6 @@ export namespace Ablo {
|
|
|
292
291
|
export type ClaimHeartbeat = _Streams.ClaimHeartbeat;
|
|
293
292
|
export type ClaimHeartbeatOptions = _Streams.ClaimHeartbeatOptions;
|
|
294
293
|
|
|
295
|
-
// ── Singletons (flat — no cohort) ─────────────────────────────────
|
|
296
|
-
export type Snapshot<
|
|
297
|
-
TSchema extends _SchemaTypes.Schema = _SchemaTypes.Schema,
|
|
298
|
-
K extends keyof TSchema['models'] = keyof TSchema['models'],
|
|
299
|
-
> = _Streams.Snapshot<TSchema, K>;
|
|
300
|
-
|
|
301
294
|
// ── Auth (sub-namespace — actor attribution) ──────────────────────
|
|
302
295
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
303
296
|
export namespace Auth {
|
|
@@ -359,17 +352,6 @@ export namespace Ablo {
|
|
|
359
352
|
export type InferModelNames<S extends _SchemaTypes.Schema> = _SchemaTypes.InferModelNames<S>;
|
|
360
353
|
}
|
|
361
354
|
|
|
362
|
-
// ── Conflict (type + sub-namespace via declaration merge) ─────────
|
|
363
|
-
export type Conflict = _Policy.Conflict;
|
|
364
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
365
|
-
export namespace Conflict {
|
|
366
|
-
export type Kind = _Policy.ConflictKind;
|
|
367
|
-
export type Operation = _Policy.ConflictOperation;
|
|
368
|
-
export type Decision = _Policy.ConflictDecision;
|
|
369
|
-
export type Policy = _Policy.ConflictPolicy;
|
|
370
|
-
export type Axis = _Policy.ConflictAxis;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
355
|
// ── Commit (sub-namespace — write-side cohort) ────────────────────
|
|
374
356
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
375
357
|
export namespace Commit {
|
|
@@ -389,11 +371,11 @@ export namespace Ablo {
|
|
|
389
371
|
export type CreateOptions = import('./local/client/resourceTypes.js').ClaimCreateOptions;
|
|
390
372
|
export type WaitOptions = import('./local/client/resourceTypes.js').ClaimWaitOptions;
|
|
391
373
|
export type ContentionOptions =
|
|
392
|
-
import('@abloatai/transaction/resources/modelOperations').ClaimContentionOptions;
|
|
374
|
+
import('@abloatai/transaction/client/resources/modelOperations').ClaimContentionOptions;
|
|
393
375
|
export type AttemptEvent =
|
|
394
|
-
import('@abloatai/transaction/resources/modelOperations').ClaimAttemptEvent;
|
|
376
|
+
import('@abloatai/transaction/client/resources/modelOperations').ClaimAttemptEvent;
|
|
395
377
|
export type QueueView =
|
|
396
|
-
import('@abloatai/transaction/resources/modelOperations').ClaimQueueView;
|
|
378
|
+
import('@abloatai/transaction/client/resources/modelOperations').ClaimQueueView;
|
|
397
379
|
export type Client = import('./local/client/resourceTypes.js').ClaimResource;
|
|
398
380
|
}
|
|
399
381
|
|
|
@@ -402,18 +384,18 @@ export namespace Ablo {
|
|
|
402
384
|
export namespace Model {
|
|
403
385
|
export type Target = import('./local/client/resourceTypes.js').ModelTarget;
|
|
404
386
|
export type Claim = import('./local/client/resourceTypes.js').ModelClaim;
|
|
405
|
-
export type Operations<T, CreateInput = T> = import('./local/client/
|
|
387
|
+
export type Operations<T, CreateInput = T> = import('./local/client/createModelOperations.js').ModelOperations<
|
|
406
388
|
T,
|
|
407
389
|
CreateInput
|
|
408
390
|
>;
|
|
409
391
|
export type ClaimOptions<T = Record<string, unknown>> =
|
|
410
|
-
import('./local/client/
|
|
392
|
+
import('./local/client/createModelOperations.js').ClaimOptions<T>;
|
|
411
393
|
export type ClaimParams<T = Record<string, unknown>> =
|
|
412
|
-
import('./local/client/
|
|
394
|
+
import('./local/client/createModelOperations.js').ClaimParams<T>;
|
|
413
395
|
export type ClaimLookupParams<T = Record<string, unknown>> =
|
|
414
|
-
import('./local/client/
|
|
396
|
+
import('./local/client/createModelOperations.js').ClaimLookupParams<T>;
|
|
415
397
|
export type ClaimReorderParams<T = Record<string, unknown>> =
|
|
416
|
-
import('./local/client/
|
|
398
|
+
import('./local/client/createModelOperations.js').ClaimReorderParams<T>;
|
|
417
399
|
export type MutationOptions = import('./local/client/resourceTypes.js').ModelMutationOptions;
|
|
418
400
|
}
|
|
419
401
|
|