kaafil-js 0.1.0 → 0.3.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/client-entry.cjs +134 -7
- package/dist/client-entry.cjs.map +1 -1
- package/dist/client-entry.d.cts +164 -33
- package/dist/client-entry.d.ts +164 -33
- package/dist/client-entry.js +134 -8
- package/dist/client-entry.js.map +1 -1
- package/package.json +1 -1
package/dist/client-entry.d.cts
CHANGED
|
@@ -126,6 +126,27 @@ interface OutboxEntityRef {
|
|
|
126
126
|
readonly listName: string;
|
|
127
127
|
readonly id?: string;
|
|
128
128
|
readonly arrayKey?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Set ONLY by a create, and set to the same value as `id`: the id this
|
|
131
|
+
* device minted locally because the server had not assigned one yet.
|
|
132
|
+
*
|
|
133
|
+
* A create is the one write whose optimistic row cannot be keyed on the
|
|
134
|
+
* server's identity, and without a local key there is nothing to key it on
|
|
135
|
+
* at all — so before this existed, creates simply had no optimistic row.
|
|
136
|
+
* The manager added a checklist item out of signal and watched it not
|
|
137
|
+
* appear: queued, durable, landing on reconnect, and invisible until it
|
|
138
|
+
* did. Indistinguishable, from where they were standing, from having lost
|
|
139
|
+
* it.
|
|
140
|
+
*
|
|
141
|
+
* Its presence is what lets `applySuccess` clean up after itself. The
|
|
142
|
+
* canonical row comes back under the SERVER's id, so writing it would leave
|
|
143
|
+
* the local row beside it and show the same item twice; the drainer purges
|
|
144
|
+
* this id in the same step, and the swap is one `snapshot.updated`.
|
|
145
|
+
*
|
|
146
|
+
* A temporary id is NEVER sent to the server — it is not in `body`, not in
|
|
147
|
+
* `path`, and no request carries it. It exists only as a snapshot key.
|
|
148
|
+
*/
|
|
149
|
+
readonly temporaryId?: string;
|
|
129
150
|
}
|
|
130
151
|
/**
|
|
131
152
|
* WHY an op is waiting out a backoff rung. Recorded because the two causes
|
|
@@ -460,8 +481,21 @@ interface SnapshotUpdatedEvent {
|
|
|
460
481
|
* from the pull never appears here — absence is not a change, and it is
|
|
461
482
|
* emphatically not a purge (`06 §4.1`). */
|
|
462
483
|
readonly lists: readonly string[];
|
|
463
|
-
/**
|
|
464
|
-
|
|
484
|
+
/**
|
|
485
|
+
* The cursor now stored: the pull response's own `meta.serverTime`.
|
|
486
|
+
*
|
|
487
|
+
* ABSENT for a change that never involved the server — an optimistic create
|
|
488
|
+
* painted while offline, or a queued op the host discarded. Those move rows
|
|
489
|
+
* and must repaint, but they carry no server reading, and putting a device
|
|
490
|
+
* clock in this field would be exactly the lie `../delta/cursor.ts` exists
|
|
491
|
+
* to prevent: a subscriber deriving "now" from it would age every other row
|
|
492
|
+
* against a phone's wall clock.
|
|
493
|
+
*
|
|
494
|
+
* A subscriber that only needs "something changed" ignores this field. One
|
|
495
|
+
* that shows an "as of" time, or derives the current server time, must skip
|
|
496
|
+
* an event without it and keep the last reading it had.
|
|
497
|
+
*/
|
|
498
|
+
readonly serverTime?: string;
|
|
465
499
|
}
|
|
466
500
|
interface ShareInvalidatedEvent {
|
|
467
501
|
/** The server-authored code when one arrived; absent when local
|
|
@@ -1036,36 +1070,10 @@ declare function createDrainer(options: CreateDrainerOptions): Drainer;
|
|
|
1036
1070
|
/** Every section the vendored spec can send. */
|
|
1037
1071
|
declare const SYNC_PULL_SECTIONS: readonly ["rooming", "stayWindows", "pickups", "seating", "bookings", "expenses", "checklist", "float", "collections", "itinerary", "closeout"];
|
|
1038
1072
|
type SyncPullSection = (typeof SYNC_PULL_SECTIONS)[number];
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
*
|
|
1042
|
-
|
|
1043
|
-
*
|
|
1044
|
-
* NEVER GUESSES. An array of identified rows is taken as-is; an object with
|
|
1045
|
-
* EXACTLY ONE array-valued property whose elements carry `id` is taken from
|
|
1046
|
-
* that property. Zero such properties, or two, and this returns `undefined`,
|
|
1047
|
-
* which the caller treats exactly like an absent section: rows untouched,
|
|
1048
|
-
* cursor untouched. Picking the likelier of two arrays would be a silent
|
|
1049
|
-
* wrong answer, and the failure mode of a silent wrong answer here is a
|
|
1050
|
-
* manager's screen showing the wrong list.
|
|
1051
|
-
*
|
|
1052
|
-
* TWO ARRAYS IS USUALLY NOT AMBIGUITY — IT IS ONE FEED PLUS A PROJECTION.
|
|
1053
|
-
* `rooming` is the worked example. `RoomingBoardResponse` carries three
|
|
1054
|
-
* arrays, and only `rooms[]` is delta-shaped: its items are `anyOf` a live
|
|
1055
|
-
* row (`id`/`version`/`updatedAt`) or a tombstone (`_tombstone`/`id`/
|
|
1056
|
-
* `version`/`deletedAt`). `windows[]` and `unassigned[]` are plain objects
|
|
1057
|
-
* keyed on `stayWindowId`/`travellerId`, with no tombstone branch and no
|
|
1058
|
-
* version — they are DERIVED projections the engine recomputes per read
|
|
1059
|
-
* (`windows[]` carries `assignedCount`/`roomCount`; `unassigned[]` carries
|
|
1060
|
-
* `assignSource`). So this function selecting `rooms[]` alone is the correct
|
|
1061
|
-
* answer here, not a limitation to route around: caching `unassigned[]` as
|
|
1062
|
-
* delta rows would be a real bug, because no tombstone can ever arrive for a
|
|
1063
|
-
* traveller who GETS a bed, and `applyPull` rebases by id rather than
|
|
1064
|
-
* replacing — the cached pool would grow monotonically and never shrink.
|
|
1065
|
-
* A consumer that needs a derived projection reads it live from its own
|
|
1066
|
-
* resource call; it is not cache-first data and must not be made to look so.
|
|
1067
|
-
*/
|
|
1068
|
-
declare function extractSectionRows(data: unknown): readonly DeltaRow<SnapshotRow>[] | undefined;
|
|
1073
|
+
declare function extractSectionRows(data: unknown,
|
|
1074
|
+
/** The section this `data` came from, when the caller knows it. An external
|
|
1075
|
+
* caller inspecting an arbitrary payload omits it and gets the heuristic. */
|
|
1076
|
+
section?: SyncPullSection): readonly DeltaRow<SnapshotRow>[] | undefined;
|
|
1069
1077
|
interface PullTripResult {
|
|
1070
1078
|
readonly tripRef: string;
|
|
1071
1079
|
/** The cursor now stored for every section that was PRESENT: this
|
|
@@ -1107,6 +1115,92 @@ declare function createPullCoordinator(options: {
|
|
|
1107
1115
|
readonly onServerTime?: (serverTime: string) => void;
|
|
1108
1116
|
}): PullCoordinator;
|
|
1109
1117
|
|
|
1118
|
+
/**
|
|
1119
|
+
* The THIRD half of the local store: last-known-good whole responses for
|
|
1120
|
+
* reads that are not delta lists.
|
|
1121
|
+
*
|
|
1122
|
+
* ── WHY THIS IS NOT THE SNAPSHOT STORE ────────────────────────────────────
|
|
1123
|
+
*
|
|
1124
|
+
* `./snapshot.ts` merges by `id` + `version`, in both directions, and that
|
|
1125
|
+
* guarantee is the reason it is safe. It can only hold rows that genuinely
|
|
1126
|
+
* carry a `DeltaIdentity`, because a fabricated `version` turns a
|
|
1127
|
+
* version-guarded merge into a coin toss: the same row written twice either
|
|
1128
|
+
* silently wins or silently loses depending on a number that means nothing.
|
|
1129
|
+
*
|
|
1130
|
+
* Some reads this SDK exposes are not delta lists and never will be.
|
|
1131
|
+
* `GET /manager/me/trips` is the motivating one — its rows carry a
|
|
1132
|
+
* `tripRef`, a name and a status, but no `id` and no `version`, because it
|
|
1133
|
+
* is a projection of the caller's assignments rather than a table. It has no
|
|
1134
|
+
* `?since=` window, no tombstones, and no per-row identity to merge on. It
|
|
1135
|
+
* is a whole answer or it is nothing.
|
|
1136
|
+
*
|
|
1137
|
+
* Forcing such a response through the snapshot store would mean inventing
|
|
1138
|
+
* the identity that makes the snapshot store correct. So it gets its own
|
|
1139
|
+
* lane instead, with a deliberately smaller promise.
|
|
1140
|
+
*
|
|
1141
|
+
* ── THE PROMISE, AND ITS LIMITS ───────────────────────────────────────────
|
|
1142
|
+
*
|
|
1143
|
+
* Exactly one thing: **the last response that actually landed, and when the
|
|
1144
|
+
* SERVER said that was.** Whole-value replace, last writer wins, no merge,
|
|
1145
|
+
* no cursor, no tombstones, no events.
|
|
1146
|
+
*
|
|
1147
|
+
* That is enough for the case it exists for — a field surface that must
|
|
1148
|
+
* paint what it last knew rather than blank when the read cannot be made —
|
|
1149
|
+
* and it is deliberately not enough to build a sync lane on. Anything with a
|
|
1150
|
+
* per-row identity and a delta window belongs in the snapshot store, and
|
|
1151
|
+
* putting it here instead would lose rows the moment two writers overlap.
|
|
1152
|
+
*
|
|
1153
|
+
* `syncedAt` is the response's own `meta.serverTime` and there is no setter
|
|
1154
|
+
* that takes anything else, for the same reason `applyPull` has none: a
|
|
1155
|
+
* device clock would make "as of 14:02" a lie on exactly the devices whose
|
|
1156
|
+
* clocks are worst.
|
|
1157
|
+
*
|
|
1158
|
+
* Keys are opaque to this module and chosen by the caller. They are
|
|
1159
|
+
* namespaced under the engine's credential scope by `keyPrefix`, so one
|
|
1160
|
+
* manager's cached answer can never be read under another's session.
|
|
1161
|
+
*/
|
|
1162
|
+
|
|
1163
|
+
/** One cached response, as it sits on disk. */
|
|
1164
|
+
interface CachedRead<T = unknown> {
|
|
1165
|
+
readonly value: T;
|
|
1166
|
+
/** The `meta.serverTime` of the response this came from — never a device
|
|
1167
|
+
* clock. */
|
|
1168
|
+
readonly syncedAt: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface ReadCacheStore {
|
|
1171
|
+
/**
|
|
1172
|
+
* The last response that landed for this key, or `undefined` if none ever
|
|
1173
|
+
* has. Resolves from memory once `load()` has run — a first paint must not
|
|
1174
|
+
* wait on a disk read it already did.
|
|
1175
|
+
*
|
|
1176
|
+
* The value is returned as it was stored. This module does not know the
|
|
1177
|
+
* shape and does not validate it: a caller that changes what it puts under
|
|
1178
|
+
* a key is responsible for tolerating the old shape, exactly as it would
|
|
1179
|
+
* be for anything else that outlives a deploy.
|
|
1180
|
+
*/
|
|
1181
|
+
get<T>(key: string): CachedRead<T> | undefined;
|
|
1182
|
+
/**
|
|
1183
|
+
* Replaces the value under `key` wholesale.
|
|
1184
|
+
*
|
|
1185
|
+
* `serverTime` MUST be the `meta.serverTime` of the response `value` came
|
|
1186
|
+
* in. There is no overload that omits it, because a cached read whose age
|
|
1187
|
+
* is unknown is worse than no cached read: a surface will render it with
|
|
1188
|
+
* confidence.
|
|
1189
|
+
*/
|
|
1190
|
+
set(key: string, value: unknown, serverTime: string): Promise<void>;
|
|
1191
|
+
/** Drops one key. Nothing in this SDK calls it; it exists so a host that
|
|
1192
|
+
* caches something sensitive can stop. */
|
|
1193
|
+
purge(key: string): Promise<void>;
|
|
1194
|
+
/** Hydrates from the durable adapter. Call once, before first paint. */
|
|
1195
|
+
load(): Promise<void>;
|
|
1196
|
+
}
|
|
1197
|
+
interface CreateReadCacheStoreOptions {
|
|
1198
|
+
readonly storage: KaafilStorageAdapter;
|
|
1199
|
+
/** Namespacing key prefix, already credential-scoped by the engine. */
|
|
1200
|
+
readonly keyPrefix: string;
|
|
1201
|
+
}
|
|
1202
|
+
declare function createReadCacheStore(options: CreateReadCacheStoreOptions): ReadCacheStore;
|
|
1203
|
+
|
|
1110
1204
|
/**
|
|
1111
1205
|
* Share-token offline: local expiry enforcement, reconnect re-validation, the
|
|
1112
1206
|
* minimal write set, and the 7-day post-expiry grace.
|
|
@@ -1248,6 +1342,22 @@ interface EnqueueWriteOptions {
|
|
|
1248
1342
|
/** The row to paint immediately, rebased later from the server's canonical
|
|
1249
1343
|
* entity. Omit for a write with nothing to show optimistically. */
|
|
1250
1344
|
readonly optimistic?: SnapshotRow;
|
|
1345
|
+
/**
|
|
1346
|
+
* Set on a CREATE, where there is no server id yet to key the optimistic
|
|
1347
|
+
* row on. This engine mints a temporary one, writes `optimistic` under it,
|
|
1348
|
+
* and records it on the op so the drainer can swap it for the canonical row
|
|
1349
|
+
* the moment the write lands (`OutboxEntityRef.temporaryId`).
|
|
1350
|
+
*
|
|
1351
|
+
* The caller does not mint the id and cannot see it before this resolves:
|
|
1352
|
+
* identity comes from the engine's own `newId`, which keeps it injectable
|
|
1353
|
+
* and keeps a UI layer out of the business of inventing identifiers. Read
|
|
1354
|
+
* it back off the returned op's `entity.temporaryId` if you need it.
|
|
1355
|
+
*
|
|
1356
|
+
* `entity.listName` is required alongside it — without a list there is
|
|
1357
|
+
* nowhere to paint — and any `entity.id` passed here is ignored, because a
|
|
1358
|
+
* create has no server identity to pass.
|
|
1359
|
+
*/
|
|
1360
|
+
readonly creates?: boolean;
|
|
1251
1361
|
readonly idempotencyKey?: string;
|
|
1252
1362
|
readonly enqueuedAt?: string;
|
|
1253
1363
|
}
|
|
@@ -1264,6 +1374,12 @@ interface EnqueueWithBlobOptions extends EnqueueWriteOptions {
|
|
|
1264
1374
|
interface OfflineEngine {
|
|
1265
1375
|
readonly events: OfflineEvents;
|
|
1266
1376
|
readonly snapshot: SnapshotStore;
|
|
1377
|
+
/**
|
|
1378
|
+
* Last-known-good whole responses for reads that are NOT delta lists —
|
|
1379
|
+
* see `./reads.ts` for why those cannot live in `snapshot`. Durable and
|
|
1380
|
+
* credential-scoped like every other store here.
|
|
1381
|
+
*/
|
|
1382
|
+
readonly reads: ReadCacheStore;
|
|
1267
1383
|
readonly outbox: Outbox;
|
|
1268
1384
|
readonly drainer: Drainer;
|
|
1269
1385
|
readonly pull: PullCoordinator;
|
|
@@ -1276,6 +1392,21 @@ interface OfflineEngine {
|
|
|
1276
1392
|
open(): Promise<void>;
|
|
1277
1393
|
/** Write-ahead, optimistic apply, kick — in that order. */
|
|
1278
1394
|
enqueue(options: EnqueueWriteOptions): Promise<OutboxOp>;
|
|
1395
|
+
/**
|
|
1396
|
+
* Abandons a queued op AND undoes its optimistic paint — the host-initiated
|
|
1397
|
+
* "discard my change" that a conflict surface or a sync centre offers.
|
|
1398
|
+
*
|
|
1399
|
+
* Use this rather than `outbox.drop()` directly. `drop()` is a queue
|
|
1400
|
+
* operation and knows nothing about the snapshot, so dropping a CREATE
|
|
1401
|
+
* through it leaves the locally-keyed row on screen forever: an item the
|
|
1402
|
+
* manager chose to discard, which no longer exists anywhere, and which no
|
|
1403
|
+
* pull can ever remove because the server never had it.
|
|
1404
|
+
*
|
|
1405
|
+
* Only a create's own temporary row is purged. An update's optimistic row
|
|
1406
|
+
* belongs to a server row that still exists, and the next pull rebases it —
|
|
1407
|
+
* removing it here would blank a row that is really there.
|
|
1408
|
+
*/
|
|
1409
|
+
discard(opId: string): Promise<void>;
|
|
1279
1410
|
/** The structured op enqueues NOW with `receiptPending: true`; the bytes
|
|
1280
1411
|
* upload opportunistically and back-fill later (`06 §3.1`). */
|
|
1281
1412
|
enqueueWithBlob(options: EnqueueWithBlobOptions): Promise<OutboxOp>;
|
|
@@ -2720,4 +2851,4 @@ declare class KaafilClient {
|
|
|
2720
2851
|
static newIdempotencyKey(): string;
|
|
2721
2852
|
}
|
|
2722
2853
|
|
|
2723
|
-
export { AgenciesResource, AgencyAdminMeResource, AgencyAdminRefreshResult, type ApplyPullResult, BATCH_THRESHOLD_OPS, type BlobBackfill, type BlobBytes, type BlobDrainReport, type BlobLane, type BlobRecord, type BlobSource, BlobStatus, type BlobUploader, BookingsResource, type BoundAgenciesResource, type BoundChecklistsResource, type BoundCreateAgencyChecklistTemplateOptions, type BoundCreateFormOptions, type BoundCreateTravellerOptions, type BoundCreateVendorOptions, type BoundDeleteAgencyChecklistTemplateOptions, type BoundDeleteVendorOptions, type BoundFeedbackNpsResource, type BoundFormsResource, type BoundGetAgencyManagerProfileOptions, type BoundGetAgencyTripOptions, type BoundGetTravellerAgencyProfileOptions, type BoundJourneyResource, type BoundListAgencyChecklistTemplatesOptions, type BoundListAgencyManagersOptions, type BoundListAgencyManagersPageOptions, type BoundListAgencyTripsOptions, type BoundListAgencyTripsPageOptions, type BoundListForAgencyOptions, type BoundListForAgencyPageOptions, type BoundListFormsOptions, type BoundListJourneyTriggersOptions, type BoundListTripManifestOptions, type BoundListTripManifestPageOptions, type BoundPatchAgencyChecklistTemplateOptions, type BoundPatchAgencySettingsOptions, type BoundPatchJourneyTriggerOptions, type BoundPublishAgencyChecklistTemplateOptions, type BoundReadAgencyFeedbackSummaryOptions, type BoundReadAgencySettingsOptions, type BoundTravellersResource, type BoundUpsertVendorOptions, type BoundVendorsResource, CONSOLIDATED_PULL_THRESHOLD_LISTS, ChecklistsResource, CloseoutResource, CollectionsResource, type CompressImageOptions, type CompressedImage, CompressionOutcome, type ConflictContext, type ConflictResolution, type ConflictResolver, CreateAgencyChecklistTemplateOptions, type CreateDrainerOptions, CreateFormOptions, type CreateOfflineEngineOptions, type CreateOutboxOptions, CreateTravellerOptions, CreateVendorOptions, DeleteAgencyChecklistTemplateOptions, DeleteVendorOptions, DeltaIdentity, DeltaMergeStats, DeltaRow, type DrainOptions, type DrainReport, type Drainer, type EnqueueOptions, type EnqueueWithBlobOptions, type EnqueueWriteOptions, type EntityReadResult, type EntityReader, Environment, ExpensesResource, FeedbackNpsResource, FilesResource, FloatResource, FormsResource, GetAgencyManagerProfileOptions, GetAgencyTripOptions, GetTravellerAgencyProfileOptions, type IndexedDbStorageAdapterOptions, ItineraryResource, JourneyResource, KaafilClient, KaafilClientAlreadyOpenError, KaafilClientNotOpenError, type KaafilClientOptions, KaafilError, KaafilErrorCode, KaafilIndexedDbUnavailableError, KaafilResponse, KaafilShareLinkExpiredError, type KaafilStorageAdapter, ListAgencyChecklistTemplatesOptions, ListAgencyManagersOptions, ListAgencyManagersPageOptions, ListAgencyTripsOptions, ListAgencyTripsPageOptions, ListForAgencyOptions, ListForAgencyPageOptions, ListFormsOptions, type ListManagerExpensesOptions, type ListManagerNotificationsOptions, type ListOwnManagerTripsOptions, type ListShareFormsOptions, ListTripManifestOptions, ListTripManifestPageOptions, type LosslessImageOptions, MAX_BATCH_OPS, type ManagerExpenseFilters, type ManagerExpensesResource, type ManagerMeResource, type ManagerOwnTrip, type ManagerOwnTripsResponse, ManagerRefreshResult, ManagerTodayResource, type MarkNotificationReadOptions, type MonotonicClock, type NotificationsResource, type OfflineEngine, type OfflineEventHandler, type OfflineEventMap, type OfflineEventName, type OfflineEvents, type OfflineTransport, type OpOutcome, type OpenAgencyAdminSessionOptions, type OpenManagerSessionOptions, type OpenOfflineOptions, type OpenShareTokenOptions, type Outbox, type OutboxCounts, type OutboxEntityRef, type OutboxOp, type OutboxParkReason, OutboxRetryCause, OutboxStatus, PatchAgencyChecklistTemplateOptions, PatchAgencySettingsOptions, PickupsResource, PublishAgencyChecklistTemplateOptions, type PullCoordinator, type PullResult, type PullSection, type PullTripResult, ReadAgencyFeedbackSummaryOptions, ReadAgencySettingsOptions, type ReadManagerExpenseLogMetaOptions, type ReadManagerExpenseOptions, type ReadShareFormOptions, type ReadShareManifestOptions, type ReadShareSnapshotOptions, type ReconcileOutcome, Resolvable, RoomingResource, SHARE_WRITE_GRACE_MS, SYNC_PULL_SECTIONS, type SaveShareFormOptions, SeatingResource, type ShareFormsResource, type ShareGuard, type ShareInvalidatedEvent, type ShareResource, ShareTokensResource, type SnapshotList, type SnapshotRow, type SnapshotStore, type SnapshotUpdatedEvent, type SubmitShareFormOptions, type SyncDrainedEvent, type SyncErrorEvent, SyncOpMethod, type SyncPullSection, SyncResource, TravellersResource, TreksResource, TripsResource, type Unsubscribe, UpsertVendorOptions, VendorsResource, compressImage, convertImageLossless, createBlobLane, createDrainer, createHttpOfflineTransport, createInMemoryStorageAdapter, createIndexedDbStorageAdapter, createOfflineEngine, createOfflineEvents, createOutbox, createPullCoordinator, createShareGuard, createSnapshotStore, extractSectionRows, isCompressibleType, isImageCompressionSupported, readCurrentVersion, reconcileConflict, scaledDimensions, shouldUseBatchTransport };
|
|
2854
|
+
export { AgenciesResource, AgencyAdminMeResource, AgencyAdminRefreshResult, type ApplyPullResult, BATCH_THRESHOLD_OPS, type BlobBackfill, type BlobBytes, type BlobDrainReport, type BlobLane, type BlobRecord, type BlobSource, BlobStatus, type BlobUploader, BookingsResource, type BoundAgenciesResource, type BoundChecklistsResource, type BoundCreateAgencyChecklistTemplateOptions, type BoundCreateFormOptions, type BoundCreateTravellerOptions, type BoundCreateVendorOptions, type BoundDeleteAgencyChecklistTemplateOptions, type BoundDeleteVendorOptions, type BoundFeedbackNpsResource, type BoundFormsResource, type BoundGetAgencyManagerProfileOptions, type BoundGetAgencyTripOptions, type BoundGetTravellerAgencyProfileOptions, type BoundJourneyResource, type BoundListAgencyChecklistTemplatesOptions, type BoundListAgencyManagersOptions, type BoundListAgencyManagersPageOptions, type BoundListAgencyTripsOptions, type BoundListAgencyTripsPageOptions, type BoundListForAgencyOptions, type BoundListForAgencyPageOptions, type BoundListFormsOptions, type BoundListJourneyTriggersOptions, type BoundListTripManifestOptions, type BoundListTripManifestPageOptions, type BoundPatchAgencyChecklistTemplateOptions, type BoundPatchAgencySettingsOptions, type BoundPatchJourneyTriggerOptions, type BoundPublishAgencyChecklistTemplateOptions, type BoundReadAgencyFeedbackSummaryOptions, type BoundReadAgencySettingsOptions, type BoundTravellersResource, type BoundUpsertVendorOptions, type BoundVendorsResource, CONSOLIDATED_PULL_THRESHOLD_LISTS, type CachedRead, ChecklistsResource, CloseoutResource, CollectionsResource, type CompressImageOptions, type CompressedImage, CompressionOutcome, type ConflictContext, type ConflictResolution, type ConflictResolver, CreateAgencyChecklistTemplateOptions, type CreateDrainerOptions, CreateFormOptions, type CreateOfflineEngineOptions, type CreateOutboxOptions, type CreateReadCacheStoreOptions, CreateTravellerOptions, CreateVendorOptions, DeleteAgencyChecklistTemplateOptions, DeleteVendorOptions, DeltaIdentity, DeltaMergeStats, DeltaRow, type DrainOptions, type DrainReport, type Drainer, type EnqueueOptions, type EnqueueWithBlobOptions, type EnqueueWriteOptions, type EntityReadResult, type EntityReader, Environment, ExpensesResource, FeedbackNpsResource, FilesResource, FloatResource, FormsResource, GetAgencyManagerProfileOptions, GetAgencyTripOptions, GetTravellerAgencyProfileOptions, type IndexedDbStorageAdapterOptions, ItineraryResource, JourneyResource, KaafilClient, KaafilClientAlreadyOpenError, KaafilClientNotOpenError, type KaafilClientOptions, KaafilError, KaafilErrorCode, KaafilIndexedDbUnavailableError, KaafilResponse, KaafilShareLinkExpiredError, type KaafilStorageAdapter, ListAgencyChecklistTemplatesOptions, ListAgencyManagersOptions, ListAgencyManagersPageOptions, ListAgencyTripsOptions, ListAgencyTripsPageOptions, ListForAgencyOptions, ListForAgencyPageOptions, ListFormsOptions, type ListManagerExpensesOptions, type ListManagerNotificationsOptions, type ListOwnManagerTripsOptions, type ListShareFormsOptions, ListTripManifestOptions, ListTripManifestPageOptions, type LosslessImageOptions, MAX_BATCH_OPS, type ManagerExpenseFilters, type ManagerExpensesResource, type ManagerMeResource, type ManagerOwnTrip, type ManagerOwnTripsResponse, ManagerRefreshResult, ManagerTodayResource, type MarkNotificationReadOptions, type MonotonicClock, type NotificationsResource, type OfflineEngine, type OfflineEventHandler, type OfflineEventMap, type OfflineEventName, type OfflineEvents, type OfflineTransport, type OpOutcome, type OpenAgencyAdminSessionOptions, type OpenManagerSessionOptions, type OpenOfflineOptions, type OpenShareTokenOptions, type Outbox, type OutboxCounts, type OutboxEntityRef, type OutboxOp, type OutboxParkReason, OutboxRetryCause, OutboxStatus, PatchAgencyChecklistTemplateOptions, PatchAgencySettingsOptions, PickupsResource, PublishAgencyChecklistTemplateOptions, type PullCoordinator, type PullResult, type PullSection, type PullTripResult, ReadAgencyFeedbackSummaryOptions, ReadAgencySettingsOptions, type ReadCacheStore, type ReadManagerExpenseLogMetaOptions, type ReadManagerExpenseOptions, type ReadShareFormOptions, type ReadShareManifestOptions, type ReadShareSnapshotOptions, type ReconcileOutcome, Resolvable, RoomingResource, SHARE_WRITE_GRACE_MS, SYNC_PULL_SECTIONS, type SaveShareFormOptions, SeatingResource, type ShareFormsResource, type ShareGuard, type ShareInvalidatedEvent, type ShareResource, ShareTokensResource, type SnapshotList, type SnapshotRow, type SnapshotStore, type SnapshotUpdatedEvent, type SubmitShareFormOptions, type SyncDrainedEvent, type SyncErrorEvent, SyncOpMethod, type SyncPullSection, SyncResource, TravellersResource, TreksResource, TripsResource, type Unsubscribe, UpsertVendorOptions, VendorsResource, compressImage, convertImageLossless, createBlobLane, createDrainer, createHttpOfflineTransport, createInMemoryStorageAdapter, createIndexedDbStorageAdapter, createOfflineEngine, createOfflineEvents, createOutbox, createPullCoordinator, createReadCacheStore, createShareGuard, createSnapshotStore, extractSectionRows, isCompressibleType, isImageCompressionSupported, readCurrentVersion, reconcileConflict, scaledDimensions, shouldUseBatchTransport };
|
package/dist/client-entry.d.ts
CHANGED
|
@@ -126,6 +126,27 @@ interface OutboxEntityRef {
|
|
|
126
126
|
readonly listName: string;
|
|
127
127
|
readonly id?: string;
|
|
128
128
|
readonly arrayKey?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Set ONLY by a create, and set to the same value as `id`: the id this
|
|
131
|
+
* device minted locally because the server had not assigned one yet.
|
|
132
|
+
*
|
|
133
|
+
* A create is the one write whose optimistic row cannot be keyed on the
|
|
134
|
+
* server's identity, and without a local key there is nothing to key it on
|
|
135
|
+
* at all — so before this existed, creates simply had no optimistic row.
|
|
136
|
+
* The manager added a checklist item out of signal and watched it not
|
|
137
|
+
* appear: queued, durable, landing on reconnect, and invisible until it
|
|
138
|
+
* did. Indistinguishable, from where they were standing, from having lost
|
|
139
|
+
* it.
|
|
140
|
+
*
|
|
141
|
+
* Its presence is what lets `applySuccess` clean up after itself. The
|
|
142
|
+
* canonical row comes back under the SERVER's id, so writing it would leave
|
|
143
|
+
* the local row beside it and show the same item twice; the drainer purges
|
|
144
|
+
* this id in the same step, and the swap is one `snapshot.updated`.
|
|
145
|
+
*
|
|
146
|
+
* A temporary id is NEVER sent to the server — it is not in `body`, not in
|
|
147
|
+
* `path`, and no request carries it. It exists only as a snapshot key.
|
|
148
|
+
*/
|
|
149
|
+
readonly temporaryId?: string;
|
|
129
150
|
}
|
|
130
151
|
/**
|
|
131
152
|
* WHY an op is waiting out a backoff rung. Recorded because the two causes
|
|
@@ -460,8 +481,21 @@ interface SnapshotUpdatedEvent {
|
|
|
460
481
|
* from the pull never appears here — absence is not a change, and it is
|
|
461
482
|
* emphatically not a purge (`06 §4.1`). */
|
|
462
483
|
readonly lists: readonly string[];
|
|
463
|
-
/**
|
|
464
|
-
|
|
484
|
+
/**
|
|
485
|
+
* The cursor now stored: the pull response's own `meta.serverTime`.
|
|
486
|
+
*
|
|
487
|
+
* ABSENT for a change that never involved the server — an optimistic create
|
|
488
|
+
* painted while offline, or a queued op the host discarded. Those move rows
|
|
489
|
+
* and must repaint, but they carry no server reading, and putting a device
|
|
490
|
+
* clock in this field would be exactly the lie `../delta/cursor.ts` exists
|
|
491
|
+
* to prevent: a subscriber deriving "now" from it would age every other row
|
|
492
|
+
* against a phone's wall clock.
|
|
493
|
+
*
|
|
494
|
+
* A subscriber that only needs "something changed" ignores this field. One
|
|
495
|
+
* that shows an "as of" time, or derives the current server time, must skip
|
|
496
|
+
* an event without it and keep the last reading it had.
|
|
497
|
+
*/
|
|
498
|
+
readonly serverTime?: string;
|
|
465
499
|
}
|
|
466
500
|
interface ShareInvalidatedEvent {
|
|
467
501
|
/** The server-authored code when one arrived; absent when local
|
|
@@ -1036,36 +1070,10 @@ declare function createDrainer(options: CreateDrainerOptions): Drainer;
|
|
|
1036
1070
|
/** Every section the vendored spec can send. */
|
|
1037
1071
|
declare const SYNC_PULL_SECTIONS: readonly ["rooming", "stayWindows", "pickups", "seating", "bookings", "expenses", "checklist", "float", "collections", "itinerary", "closeout"];
|
|
1038
1072
|
type SyncPullSection = (typeof SYNC_PULL_SECTIONS)[number];
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
*
|
|
1042
|
-
|
|
1043
|
-
*
|
|
1044
|
-
* NEVER GUESSES. An array of identified rows is taken as-is; an object with
|
|
1045
|
-
* EXACTLY ONE array-valued property whose elements carry `id` is taken from
|
|
1046
|
-
* that property. Zero such properties, or two, and this returns `undefined`,
|
|
1047
|
-
* which the caller treats exactly like an absent section: rows untouched,
|
|
1048
|
-
* cursor untouched. Picking the likelier of two arrays would be a silent
|
|
1049
|
-
* wrong answer, and the failure mode of a silent wrong answer here is a
|
|
1050
|
-
* manager's screen showing the wrong list.
|
|
1051
|
-
*
|
|
1052
|
-
* TWO ARRAYS IS USUALLY NOT AMBIGUITY — IT IS ONE FEED PLUS A PROJECTION.
|
|
1053
|
-
* `rooming` is the worked example. `RoomingBoardResponse` carries three
|
|
1054
|
-
* arrays, and only `rooms[]` is delta-shaped: its items are `anyOf` a live
|
|
1055
|
-
* row (`id`/`version`/`updatedAt`) or a tombstone (`_tombstone`/`id`/
|
|
1056
|
-
* `version`/`deletedAt`). `windows[]` and `unassigned[]` are plain objects
|
|
1057
|
-
* keyed on `stayWindowId`/`travellerId`, with no tombstone branch and no
|
|
1058
|
-
* version — they are DERIVED projections the engine recomputes per read
|
|
1059
|
-
* (`windows[]` carries `assignedCount`/`roomCount`; `unassigned[]` carries
|
|
1060
|
-
* `assignSource`). So this function selecting `rooms[]` alone is the correct
|
|
1061
|
-
* answer here, not a limitation to route around: caching `unassigned[]` as
|
|
1062
|
-
* delta rows would be a real bug, because no tombstone can ever arrive for a
|
|
1063
|
-
* traveller who GETS a bed, and `applyPull` rebases by id rather than
|
|
1064
|
-
* replacing — the cached pool would grow monotonically and never shrink.
|
|
1065
|
-
* A consumer that needs a derived projection reads it live from its own
|
|
1066
|
-
* resource call; it is not cache-first data and must not be made to look so.
|
|
1067
|
-
*/
|
|
1068
|
-
declare function extractSectionRows(data: unknown): readonly DeltaRow<SnapshotRow>[] | undefined;
|
|
1073
|
+
declare function extractSectionRows(data: unknown,
|
|
1074
|
+
/** The section this `data` came from, when the caller knows it. An external
|
|
1075
|
+
* caller inspecting an arbitrary payload omits it and gets the heuristic. */
|
|
1076
|
+
section?: SyncPullSection): readonly DeltaRow<SnapshotRow>[] | undefined;
|
|
1069
1077
|
interface PullTripResult {
|
|
1070
1078
|
readonly tripRef: string;
|
|
1071
1079
|
/** The cursor now stored for every section that was PRESENT: this
|
|
@@ -1107,6 +1115,92 @@ declare function createPullCoordinator(options: {
|
|
|
1107
1115
|
readonly onServerTime?: (serverTime: string) => void;
|
|
1108
1116
|
}): PullCoordinator;
|
|
1109
1117
|
|
|
1118
|
+
/**
|
|
1119
|
+
* The THIRD half of the local store: last-known-good whole responses for
|
|
1120
|
+
* reads that are not delta lists.
|
|
1121
|
+
*
|
|
1122
|
+
* ── WHY THIS IS NOT THE SNAPSHOT STORE ────────────────────────────────────
|
|
1123
|
+
*
|
|
1124
|
+
* `./snapshot.ts` merges by `id` + `version`, in both directions, and that
|
|
1125
|
+
* guarantee is the reason it is safe. It can only hold rows that genuinely
|
|
1126
|
+
* carry a `DeltaIdentity`, because a fabricated `version` turns a
|
|
1127
|
+
* version-guarded merge into a coin toss: the same row written twice either
|
|
1128
|
+
* silently wins or silently loses depending on a number that means nothing.
|
|
1129
|
+
*
|
|
1130
|
+
* Some reads this SDK exposes are not delta lists and never will be.
|
|
1131
|
+
* `GET /manager/me/trips` is the motivating one — its rows carry a
|
|
1132
|
+
* `tripRef`, a name and a status, but no `id` and no `version`, because it
|
|
1133
|
+
* is a projection of the caller's assignments rather than a table. It has no
|
|
1134
|
+
* `?since=` window, no tombstones, and no per-row identity to merge on. It
|
|
1135
|
+
* is a whole answer or it is nothing.
|
|
1136
|
+
*
|
|
1137
|
+
* Forcing such a response through the snapshot store would mean inventing
|
|
1138
|
+
* the identity that makes the snapshot store correct. So it gets its own
|
|
1139
|
+
* lane instead, with a deliberately smaller promise.
|
|
1140
|
+
*
|
|
1141
|
+
* ── THE PROMISE, AND ITS LIMITS ───────────────────────────────────────────
|
|
1142
|
+
*
|
|
1143
|
+
* Exactly one thing: **the last response that actually landed, and when the
|
|
1144
|
+
* SERVER said that was.** Whole-value replace, last writer wins, no merge,
|
|
1145
|
+
* no cursor, no tombstones, no events.
|
|
1146
|
+
*
|
|
1147
|
+
* That is enough for the case it exists for — a field surface that must
|
|
1148
|
+
* paint what it last knew rather than blank when the read cannot be made —
|
|
1149
|
+
* and it is deliberately not enough to build a sync lane on. Anything with a
|
|
1150
|
+
* per-row identity and a delta window belongs in the snapshot store, and
|
|
1151
|
+
* putting it here instead would lose rows the moment two writers overlap.
|
|
1152
|
+
*
|
|
1153
|
+
* `syncedAt` is the response's own `meta.serverTime` and there is no setter
|
|
1154
|
+
* that takes anything else, for the same reason `applyPull` has none: a
|
|
1155
|
+
* device clock would make "as of 14:02" a lie on exactly the devices whose
|
|
1156
|
+
* clocks are worst.
|
|
1157
|
+
*
|
|
1158
|
+
* Keys are opaque to this module and chosen by the caller. They are
|
|
1159
|
+
* namespaced under the engine's credential scope by `keyPrefix`, so one
|
|
1160
|
+
* manager's cached answer can never be read under another's session.
|
|
1161
|
+
*/
|
|
1162
|
+
|
|
1163
|
+
/** One cached response, as it sits on disk. */
|
|
1164
|
+
interface CachedRead<T = unknown> {
|
|
1165
|
+
readonly value: T;
|
|
1166
|
+
/** The `meta.serverTime` of the response this came from — never a device
|
|
1167
|
+
* clock. */
|
|
1168
|
+
readonly syncedAt: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface ReadCacheStore {
|
|
1171
|
+
/**
|
|
1172
|
+
* The last response that landed for this key, or `undefined` if none ever
|
|
1173
|
+
* has. Resolves from memory once `load()` has run — a first paint must not
|
|
1174
|
+
* wait on a disk read it already did.
|
|
1175
|
+
*
|
|
1176
|
+
* The value is returned as it was stored. This module does not know the
|
|
1177
|
+
* shape and does not validate it: a caller that changes what it puts under
|
|
1178
|
+
* a key is responsible for tolerating the old shape, exactly as it would
|
|
1179
|
+
* be for anything else that outlives a deploy.
|
|
1180
|
+
*/
|
|
1181
|
+
get<T>(key: string): CachedRead<T> | undefined;
|
|
1182
|
+
/**
|
|
1183
|
+
* Replaces the value under `key` wholesale.
|
|
1184
|
+
*
|
|
1185
|
+
* `serverTime` MUST be the `meta.serverTime` of the response `value` came
|
|
1186
|
+
* in. There is no overload that omits it, because a cached read whose age
|
|
1187
|
+
* is unknown is worse than no cached read: a surface will render it with
|
|
1188
|
+
* confidence.
|
|
1189
|
+
*/
|
|
1190
|
+
set(key: string, value: unknown, serverTime: string): Promise<void>;
|
|
1191
|
+
/** Drops one key. Nothing in this SDK calls it; it exists so a host that
|
|
1192
|
+
* caches something sensitive can stop. */
|
|
1193
|
+
purge(key: string): Promise<void>;
|
|
1194
|
+
/** Hydrates from the durable adapter. Call once, before first paint. */
|
|
1195
|
+
load(): Promise<void>;
|
|
1196
|
+
}
|
|
1197
|
+
interface CreateReadCacheStoreOptions {
|
|
1198
|
+
readonly storage: KaafilStorageAdapter;
|
|
1199
|
+
/** Namespacing key prefix, already credential-scoped by the engine. */
|
|
1200
|
+
readonly keyPrefix: string;
|
|
1201
|
+
}
|
|
1202
|
+
declare function createReadCacheStore(options: CreateReadCacheStoreOptions): ReadCacheStore;
|
|
1203
|
+
|
|
1110
1204
|
/**
|
|
1111
1205
|
* Share-token offline: local expiry enforcement, reconnect re-validation, the
|
|
1112
1206
|
* minimal write set, and the 7-day post-expiry grace.
|
|
@@ -1248,6 +1342,22 @@ interface EnqueueWriteOptions {
|
|
|
1248
1342
|
/** The row to paint immediately, rebased later from the server's canonical
|
|
1249
1343
|
* entity. Omit for a write with nothing to show optimistically. */
|
|
1250
1344
|
readonly optimistic?: SnapshotRow;
|
|
1345
|
+
/**
|
|
1346
|
+
* Set on a CREATE, where there is no server id yet to key the optimistic
|
|
1347
|
+
* row on. This engine mints a temporary one, writes `optimistic` under it,
|
|
1348
|
+
* and records it on the op so the drainer can swap it for the canonical row
|
|
1349
|
+
* the moment the write lands (`OutboxEntityRef.temporaryId`).
|
|
1350
|
+
*
|
|
1351
|
+
* The caller does not mint the id and cannot see it before this resolves:
|
|
1352
|
+
* identity comes from the engine's own `newId`, which keeps it injectable
|
|
1353
|
+
* and keeps a UI layer out of the business of inventing identifiers. Read
|
|
1354
|
+
* it back off the returned op's `entity.temporaryId` if you need it.
|
|
1355
|
+
*
|
|
1356
|
+
* `entity.listName` is required alongside it — without a list there is
|
|
1357
|
+
* nowhere to paint — and any `entity.id` passed here is ignored, because a
|
|
1358
|
+
* create has no server identity to pass.
|
|
1359
|
+
*/
|
|
1360
|
+
readonly creates?: boolean;
|
|
1251
1361
|
readonly idempotencyKey?: string;
|
|
1252
1362
|
readonly enqueuedAt?: string;
|
|
1253
1363
|
}
|
|
@@ -1264,6 +1374,12 @@ interface EnqueueWithBlobOptions extends EnqueueWriteOptions {
|
|
|
1264
1374
|
interface OfflineEngine {
|
|
1265
1375
|
readonly events: OfflineEvents;
|
|
1266
1376
|
readonly snapshot: SnapshotStore;
|
|
1377
|
+
/**
|
|
1378
|
+
* Last-known-good whole responses for reads that are NOT delta lists —
|
|
1379
|
+
* see `./reads.ts` for why those cannot live in `snapshot`. Durable and
|
|
1380
|
+
* credential-scoped like every other store here.
|
|
1381
|
+
*/
|
|
1382
|
+
readonly reads: ReadCacheStore;
|
|
1267
1383
|
readonly outbox: Outbox;
|
|
1268
1384
|
readonly drainer: Drainer;
|
|
1269
1385
|
readonly pull: PullCoordinator;
|
|
@@ -1276,6 +1392,21 @@ interface OfflineEngine {
|
|
|
1276
1392
|
open(): Promise<void>;
|
|
1277
1393
|
/** Write-ahead, optimistic apply, kick — in that order. */
|
|
1278
1394
|
enqueue(options: EnqueueWriteOptions): Promise<OutboxOp>;
|
|
1395
|
+
/**
|
|
1396
|
+
* Abandons a queued op AND undoes its optimistic paint — the host-initiated
|
|
1397
|
+
* "discard my change" that a conflict surface or a sync centre offers.
|
|
1398
|
+
*
|
|
1399
|
+
* Use this rather than `outbox.drop()` directly. `drop()` is a queue
|
|
1400
|
+
* operation and knows nothing about the snapshot, so dropping a CREATE
|
|
1401
|
+
* through it leaves the locally-keyed row on screen forever: an item the
|
|
1402
|
+
* manager chose to discard, which no longer exists anywhere, and which no
|
|
1403
|
+
* pull can ever remove because the server never had it.
|
|
1404
|
+
*
|
|
1405
|
+
* Only a create's own temporary row is purged. An update's optimistic row
|
|
1406
|
+
* belongs to a server row that still exists, and the next pull rebases it —
|
|
1407
|
+
* removing it here would blank a row that is really there.
|
|
1408
|
+
*/
|
|
1409
|
+
discard(opId: string): Promise<void>;
|
|
1279
1410
|
/** The structured op enqueues NOW with `receiptPending: true`; the bytes
|
|
1280
1411
|
* upload opportunistically and back-fill later (`06 §3.1`). */
|
|
1281
1412
|
enqueueWithBlob(options: EnqueueWithBlobOptions): Promise<OutboxOp>;
|
|
@@ -2720,4 +2851,4 @@ declare class KaafilClient {
|
|
|
2720
2851
|
static newIdempotencyKey(): string;
|
|
2721
2852
|
}
|
|
2722
2853
|
|
|
2723
|
-
export { AgenciesResource, AgencyAdminMeResource, AgencyAdminRefreshResult, type ApplyPullResult, BATCH_THRESHOLD_OPS, type BlobBackfill, type BlobBytes, type BlobDrainReport, type BlobLane, type BlobRecord, type BlobSource, BlobStatus, type BlobUploader, BookingsResource, type BoundAgenciesResource, type BoundChecklistsResource, type BoundCreateAgencyChecklistTemplateOptions, type BoundCreateFormOptions, type BoundCreateTravellerOptions, type BoundCreateVendorOptions, type BoundDeleteAgencyChecklistTemplateOptions, type BoundDeleteVendorOptions, type BoundFeedbackNpsResource, type BoundFormsResource, type BoundGetAgencyManagerProfileOptions, type BoundGetAgencyTripOptions, type BoundGetTravellerAgencyProfileOptions, type BoundJourneyResource, type BoundListAgencyChecklistTemplatesOptions, type BoundListAgencyManagersOptions, type BoundListAgencyManagersPageOptions, type BoundListAgencyTripsOptions, type BoundListAgencyTripsPageOptions, type BoundListForAgencyOptions, type BoundListForAgencyPageOptions, type BoundListFormsOptions, type BoundListJourneyTriggersOptions, type BoundListTripManifestOptions, type BoundListTripManifestPageOptions, type BoundPatchAgencyChecklistTemplateOptions, type BoundPatchAgencySettingsOptions, type BoundPatchJourneyTriggerOptions, type BoundPublishAgencyChecklistTemplateOptions, type BoundReadAgencyFeedbackSummaryOptions, type BoundReadAgencySettingsOptions, type BoundTravellersResource, type BoundUpsertVendorOptions, type BoundVendorsResource, CONSOLIDATED_PULL_THRESHOLD_LISTS, ChecklistsResource, CloseoutResource, CollectionsResource, type CompressImageOptions, type CompressedImage, CompressionOutcome, type ConflictContext, type ConflictResolution, type ConflictResolver, CreateAgencyChecklistTemplateOptions, type CreateDrainerOptions, CreateFormOptions, type CreateOfflineEngineOptions, type CreateOutboxOptions, CreateTravellerOptions, CreateVendorOptions, DeleteAgencyChecklistTemplateOptions, DeleteVendorOptions, DeltaIdentity, DeltaMergeStats, DeltaRow, type DrainOptions, type DrainReport, type Drainer, type EnqueueOptions, type EnqueueWithBlobOptions, type EnqueueWriteOptions, type EntityReadResult, type EntityReader, Environment, ExpensesResource, FeedbackNpsResource, FilesResource, FloatResource, FormsResource, GetAgencyManagerProfileOptions, GetAgencyTripOptions, GetTravellerAgencyProfileOptions, type IndexedDbStorageAdapterOptions, ItineraryResource, JourneyResource, KaafilClient, KaafilClientAlreadyOpenError, KaafilClientNotOpenError, type KaafilClientOptions, KaafilError, KaafilErrorCode, KaafilIndexedDbUnavailableError, KaafilResponse, KaafilShareLinkExpiredError, type KaafilStorageAdapter, ListAgencyChecklistTemplatesOptions, ListAgencyManagersOptions, ListAgencyManagersPageOptions, ListAgencyTripsOptions, ListAgencyTripsPageOptions, ListForAgencyOptions, ListForAgencyPageOptions, ListFormsOptions, type ListManagerExpensesOptions, type ListManagerNotificationsOptions, type ListOwnManagerTripsOptions, type ListShareFormsOptions, ListTripManifestOptions, ListTripManifestPageOptions, type LosslessImageOptions, MAX_BATCH_OPS, type ManagerExpenseFilters, type ManagerExpensesResource, type ManagerMeResource, type ManagerOwnTrip, type ManagerOwnTripsResponse, ManagerRefreshResult, ManagerTodayResource, type MarkNotificationReadOptions, type MonotonicClock, type NotificationsResource, type OfflineEngine, type OfflineEventHandler, type OfflineEventMap, type OfflineEventName, type OfflineEvents, type OfflineTransport, type OpOutcome, type OpenAgencyAdminSessionOptions, type OpenManagerSessionOptions, type OpenOfflineOptions, type OpenShareTokenOptions, type Outbox, type OutboxCounts, type OutboxEntityRef, type OutboxOp, type OutboxParkReason, OutboxRetryCause, OutboxStatus, PatchAgencyChecklistTemplateOptions, PatchAgencySettingsOptions, PickupsResource, PublishAgencyChecklistTemplateOptions, type PullCoordinator, type PullResult, type PullSection, type PullTripResult, ReadAgencyFeedbackSummaryOptions, ReadAgencySettingsOptions, type ReadManagerExpenseLogMetaOptions, type ReadManagerExpenseOptions, type ReadShareFormOptions, type ReadShareManifestOptions, type ReadShareSnapshotOptions, type ReconcileOutcome, Resolvable, RoomingResource, SHARE_WRITE_GRACE_MS, SYNC_PULL_SECTIONS, type SaveShareFormOptions, SeatingResource, type ShareFormsResource, type ShareGuard, type ShareInvalidatedEvent, type ShareResource, ShareTokensResource, type SnapshotList, type SnapshotRow, type SnapshotStore, type SnapshotUpdatedEvent, type SubmitShareFormOptions, type SyncDrainedEvent, type SyncErrorEvent, SyncOpMethod, type SyncPullSection, SyncResource, TravellersResource, TreksResource, TripsResource, type Unsubscribe, UpsertVendorOptions, VendorsResource, compressImage, convertImageLossless, createBlobLane, createDrainer, createHttpOfflineTransport, createInMemoryStorageAdapter, createIndexedDbStorageAdapter, createOfflineEngine, createOfflineEvents, createOutbox, createPullCoordinator, createShareGuard, createSnapshotStore, extractSectionRows, isCompressibleType, isImageCompressionSupported, readCurrentVersion, reconcileConflict, scaledDimensions, shouldUseBatchTransport };
|
|
2854
|
+
export { AgenciesResource, AgencyAdminMeResource, AgencyAdminRefreshResult, type ApplyPullResult, BATCH_THRESHOLD_OPS, type BlobBackfill, type BlobBytes, type BlobDrainReport, type BlobLane, type BlobRecord, type BlobSource, BlobStatus, type BlobUploader, BookingsResource, type BoundAgenciesResource, type BoundChecklistsResource, type BoundCreateAgencyChecklistTemplateOptions, type BoundCreateFormOptions, type BoundCreateTravellerOptions, type BoundCreateVendorOptions, type BoundDeleteAgencyChecklistTemplateOptions, type BoundDeleteVendorOptions, type BoundFeedbackNpsResource, type BoundFormsResource, type BoundGetAgencyManagerProfileOptions, type BoundGetAgencyTripOptions, type BoundGetTravellerAgencyProfileOptions, type BoundJourneyResource, type BoundListAgencyChecklistTemplatesOptions, type BoundListAgencyManagersOptions, type BoundListAgencyManagersPageOptions, type BoundListAgencyTripsOptions, type BoundListAgencyTripsPageOptions, type BoundListForAgencyOptions, type BoundListForAgencyPageOptions, type BoundListFormsOptions, type BoundListJourneyTriggersOptions, type BoundListTripManifestOptions, type BoundListTripManifestPageOptions, type BoundPatchAgencyChecklistTemplateOptions, type BoundPatchAgencySettingsOptions, type BoundPatchJourneyTriggerOptions, type BoundPublishAgencyChecklistTemplateOptions, type BoundReadAgencyFeedbackSummaryOptions, type BoundReadAgencySettingsOptions, type BoundTravellersResource, type BoundUpsertVendorOptions, type BoundVendorsResource, CONSOLIDATED_PULL_THRESHOLD_LISTS, type CachedRead, ChecklistsResource, CloseoutResource, CollectionsResource, type CompressImageOptions, type CompressedImage, CompressionOutcome, type ConflictContext, type ConflictResolution, type ConflictResolver, CreateAgencyChecklistTemplateOptions, type CreateDrainerOptions, CreateFormOptions, type CreateOfflineEngineOptions, type CreateOutboxOptions, type CreateReadCacheStoreOptions, CreateTravellerOptions, CreateVendorOptions, DeleteAgencyChecklistTemplateOptions, DeleteVendorOptions, DeltaIdentity, DeltaMergeStats, DeltaRow, type DrainOptions, type DrainReport, type Drainer, type EnqueueOptions, type EnqueueWithBlobOptions, type EnqueueWriteOptions, type EntityReadResult, type EntityReader, Environment, ExpensesResource, FeedbackNpsResource, FilesResource, FloatResource, FormsResource, GetAgencyManagerProfileOptions, GetAgencyTripOptions, GetTravellerAgencyProfileOptions, type IndexedDbStorageAdapterOptions, ItineraryResource, JourneyResource, KaafilClient, KaafilClientAlreadyOpenError, KaafilClientNotOpenError, type KaafilClientOptions, KaafilError, KaafilErrorCode, KaafilIndexedDbUnavailableError, KaafilResponse, KaafilShareLinkExpiredError, type KaafilStorageAdapter, ListAgencyChecklistTemplatesOptions, ListAgencyManagersOptions, ListAgencyManagersPageOptions, ListAgencyTripsOptions, ListAgencyTripsPageOptions, ListForAgencyOptions, ListForAgencyPageOptions, ListFormsOptions, type ListManagerExpensesOptions, type ListManagerNotificationsOptions, type ListOwnManagerTripsOptions, type ListShareFormsOptions, ListTripManifestOptions, ListTripManifestPageOptions, type LosslessImageOptions, MAX_BATCH_OPS, type ManagerExpenseFilters, type ManagerExpensesResource, type ManagerMeResource, type ManagerOwnTrip, type ManagerOwnTripsResponse, ManagerRefreshResult, ManagerTodayResource, type MarkNotificationReadOptions, type MonotonicClock, type NotificationsResource, type OfflineEngine, type OfflineEventHandler, type OfflineEventMap, type OfflineEventName, type OfflineEvents, type OfflineTransport, type OpOutcome, type OpenAgencyAdminSessionOptions, type OpenManagerSessionOptions, type OpenOfflineOptions, type OpenShareTokenOptions, type Outbox, type OutboxCounts, type OutboxEntityRef, type OutboxOp, type OutboxParkReason, OutboxRetryCause, OutboxStatus, PatchAgencyChecklistTemplateOptions, PatchAgencySettingsOptions, PickupsResource, PublishAgencyChecklistTemplateOptions, type PullCoordinator, type PullResult, type PullSection, type PullTripResult, ReadAgencyFeedbackSummaryOptions, ReadAgencySettingsOptions, type ReadCacheStore, type ReadManagerExpenseLogMetaOptions, type ReadManagerExpenseOptions, type ReadShareFormOptions, type ReadShareManifestOptions, type ReadShareSnapshotOptions, type ReconcileOutcome, Resolvable, RoomingResource, SHARE_WRITE_GRACE_MS, SYNC_PULL_SECTIONS, type SaveShareFormOptions, SeatingResource, type ShareFormsResource, type ShareGuard, type ShareInvalidatedEvent, type ShareResource, ShareTokensResource, type SnapshotList, type SnapshotRow, type SnapshotStore, type SnapshotUpdatedEvent, type SubmitShareFormOptions, type SyncDrainedEvent, type SyncErrorEvent, SyncOpMethod, type SyncPullSection, SyncResource, TravellersResource, TreksResource, TripsResource, type Unsubscribe, UpsertVendorOptions, VendorsResource, compressImage, convertImageLossless, createBlobLane, createDrainer, createHttpOfflineTransport, createInMemoryStorageAdapter, createIndexedDbStorageAdapter, createOfflineEngine, createOfflineEvents, createOutbox, createPullCoordinator, createReadCacheStore, createShareGuard, createSnapshotStore, extractSectionRows, isCompressibleType, isImageCompressionSupported, readCurrentVersion, reconcileConflict, scaledDimensions, shouldUseBatchTransport };
|