@rdlabo/ionic-angular-kit 22.0.5 → 22.0.7
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/docs/auth-http.md +21 -0
- package/docs/offline-realtime.md +47 -0
- package/fesm2022/rdlabo-ionic-angular-kit-offline-storage-generation.mjs +16 -0
- package/fesm2022/rdlabo-ionic-angular-kit-offline-storage-generation.mjs.map +1 -0
- package/fesm2022/rdlabo-ionic-angular-kit-offline.mjs +169 -10
- package/fesm2022/rdlabo-ionic-angular-kit-offline.mjs.map +1 -1
- package/fesm2022/rdlabo-ionic-angular-kit.mjs +11 -3
- package/fesm2022/rdlabo-ionic-angular-kit.mjs.map +1 -1
- package/package.json +5 -1
- package/types/rdlabo-ionic-angular-kit-offline-storage-generation.d.ts +23 -0
- package/types/rdlabo-ionic-angular-kit-offline.d.ts +149 -94
- package/types/rdlabo-ionic-angular-kit.d.ts +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdlabo/ionic-angular-kit",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rdlabo-dev/ionic-angular-library.git"
|
|
@@ -124,6 +124,10 @@
|
|
|
124
124
|
"types": "./types/rdlabo-ionic-angular-kit-offline.d.ts",
|
|
125
125
|
"default": "./fesm2022/rdlabo-ionic-angular-kit-offline.mjs"
|
|
126
126
|
},
|
|
127
|
+
"./offline/storage-generation": {
|
|
128
|
+
"types": "./types/rdlabo-ionic-angular-kit-offline-storage-generation.d.ts",
|
|
129
|
+
"default": "./fesm2022/rdlabo-ionic-angular-kit-offline-storage-generation.mjs"
|
|
130
|
+
},
|
|
127
131
|
"./printer": {
|
|
128
132
|
"types": "./types/rdlabo-ionic-angular-kit-printer.d.ts",
|
|
129
133
|
"default": "./fesm2022/rdlabo-ionic-angular-kit-printer.mjs"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Lightweight storage marker inspection with no Angular, SQLite, or replica-runtime imports. @experimental */
|
|
2
|
+
/** Persistent identity of an explicitly disposable local replica, independent of the wire protocol. */
|
|
3
|
+
interface OfflineStorageGenerationOptions {
|
|
4
|
+
markerStore: {
|
|
5
|
+
get(options: {
|
|
6
|
+
key: string;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
value: string | null;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
generationKey: string;
|
|
12
|
+
markerKey: string;
|
|
13
|
+
generation: string | (() => Promise<string>);
|
|
14
|
+
}
|
|
15
|
+
/** Reads the generation and durable reset intent without opening or modifying any replica. */
|
|
16
|
+
declare function inspectOfflineStorageGeneration(options: OfflineStorageGenerationOptions): Promise<{
|
|
17
|
+
generation: string;
|
|
18
|
+
matches: boolean;
|
|
19
|
+
requested: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
export { inspectOfflineStorageGeneration };
|
|
23
|
+
export type { OfflineStorageGenerationOptions };
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
import * as i0 from '@angular/core';
|
|
12
12
|
import { InjectionToken, Type, Provider, EnvironmentProviders } from '@angular/core';
|
|
13
13
|
import { RouterStateSnapshot } from '@angular/router';
|
|
14
|
-
import { KitAuthAccessLease, KitAuthConfig } from '@rdlabo/ionic-angular-kit';
|
|
14
|
+
import { KitStorageService, KitAuthAccessLease, KitAuthConfig } from '@rdlabo/ionic-angular-kit';
|
|
15
15
|
import { Observable } from 'rxjs';
|
|
16
16
|
import * as _rdlabo_ionic_angular_kit_offline from '@rdlabo/ionic-angular-kit/offline';
|
|
17
|
+
import { OfflineStorageGenerationOptions } from '@rdlabo/ionic-angular-kit/offline/storage-generation';
|
|
18
|
+
export * from '@rdlabo/ionic-angular-kit/offline/storage-generation';
|
|
17
19
|
import { HttpErrorResponse, HttpContextToken, HttpRequest, HttpResponse, HttpEvent, HttpInterceptorFn } from '@angular/common/http';
|
|
18
20
|
import { PluginListenerHandle } from '@capacitor/core';
|
|
19
21
|
|
|
@@ -899,6 +901,148 @@ declare const DEFAULT_OFFLINE_COMMAND_HOOKS: OfflineCommandHooks;
|
|
|
899
901
|
/** DI token for optional product-specific synchronization hooks. */
|
|
900
902
|
declare const OFFLINE_COMMAND_HOOKS: InjectionToken<OfflineCommandHooks>;
|
|
901
903
|
|
|
904
|
+
/** Durable marker store used to request a cold-start local reset. */
|
|
905
|
+
interface OfflineLocalResetMarkerStore {
|
|
906
|
+
get(options: {
|
|
907
|
+
key: string;
|
|
908
|
+
}): Promise<{
|
|
909
|
+
value: string | null;
|
|
910
|
+
}>;
|
|
911
|
+
set(options: {
|
|
912
|
+
key: string;
|
|
913
|
+
value: string;
|
|
914
|
+
}): Promise<void>;
|
|
915
|
+
remove(options: {
|
|
916
|
+
key: string;
|
|
917
|
+
}): Promise<void>;
|
|
918
|
+
}
|
|
919
|
+
/** Minimal page reload surface used after a reset request is persisted. */
|
|
920
|
+
interface OfflineLocalResetReloadTarget {
|
|
921
|
+
reload(): void;
|
|
922
|
+
}
|
|
923
|
+
/** Native SQLite connection lifecycle required to delete Kit's database safely. */
|
|
924
|
+
interface OfflineLocalResetSqliteConnection {
|
|
925
|
+
checkConnectionsConsistency(): Promise<{
|
|
926
|
+
result?: boolean;
|
|
927
|
+
}>;
|
|
928
|
+
isDatabase(database: string): Promise<{
|
|
929
|
+
result?: boolean;
|
|
930
|
+
}>;
|
|
931
|
+
isDatabaseEncrypted?(database: string): Promise<{
|
|
932
|
+
result?: boolean;
|
|
933
|
+
}>;
|
|
934
|
+
createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise<{
|
|
935
|
+
delete(): Promise<void>;
|
|
936
|
+
}>;
|
|
937
|
+
closeConnection(database: string, readonly: boolean): Promise<void>;
|
|
938
|
+
clearEncryptionSecret?(): Promise<void>;
|
|
939
|
+
}
|
|
940
|
+
/** Options for {@link requestOfflineLocalReset}. */
|
|
941
|
+
interface RequestOfflineLocalResetOptions {
|
|
942
|
+
markerStore: OfflineLocalResetMarkerStore;
|
|
943
|
+
markerKey: string;
|
|
944
|
+
reloadTarget?: OfflineLocalResetReloadTarget;
|
|
945
|
+
}
|
|
946
|
+
/** Options for {@link recoverOfflineLocalReset}. */
|
|
947
|
+
interface RecoverOfflineLocalResetOptions {
|
|
948
|
+
markerStore: OfflineLocalResetMarkerStore;
|
|
949
|
+
markerKey: string;
|
|
950
|
+
sqliteConnection: OfflineLocalResetSqliteConnection;
|
|
951
|
+
/**
|
|
952
|
+
* Kit database followed only by product databases using Kit's same encryption
|
|
953
|
+
* mode, connection-version-1, read/write lifecycle.
|
|
954
|
+
* Delete databases with other connection settings in {@link additionalCleanup}.
|
|
955
|
+
*/
|
|
956
|
+
kitCompatibleDatabaseNames: readonly [string, ...string[]];
|
|
957
|
+
/** Connection mode used only to obtain the public `delete()` handle. Defaults to encrypted for compatibility. */
|
|
958
|
+
databaseEncryption?: boolean;
|
|
959
|
+
nativePlatform?: boolean;
|
|
960
|
+
/** Product-owned cleanup, such as a media database or files, run before the marker is removed. */
|
|
961
|
+
additionalCleanup?: () => Promise<void>;
|
|
962
|
+
}
|
|
963
|
+
/** Options for a versioned destructive encryption-mode migration. */
|
|
964
|
+
interface MigrateOfflineDatabaseEncryptionOptions {
|
|
965
|
+
markerStore: OfflineLocalResetMarkerStore;
|
|
966
|
+
markerKey: string;
|
|
967
|
+
migrationVersion: string;
|
|
968
|
+
sqliteConnection: OfflineLocalResetSqliteConnection;
|
|
969
|
+
kitCompatibleDatabaseNames: readonly [string, ...string[]];
|
|
970
|
+
/** Existing database mode used only to obtain a valid public `delete()` handle. */
|
|
971
|
+
sourceDatabaseEncryption: boolean | 'detect';
|
|
972
|
+
/** Removes the obsolete plugin secret after every database and product cleanup succeeds. */
|
|
973
|
+
clearEncryptionSecret?: boolean;
|
|
974
|
+
nativePlatform?: boolean;
|
|
975
|
+
additionalCleanup?: () => Promise<void>;
|
|
976
|
+
}
|
|
977
|
+
/** Persists an explicit destructive reset request, then reloads into a cold bootstrap. */
|
|
978
|
+
declare function requestOfflineLocalReset(options: RequestOfflineLocalResetOptions): Promise<void>;
|
|
979
|
+
/**
|
|
980
|
+
* Recovers an explicit reset request before Angular and Kit open native SQLite.
|
|
981
|
+
*
|
|
982
|
+
* The marker is removed only after the Kit database and every product cleanup succeed.
|
|
983
|
+
* Kit never invokes this helper automatically in response to a storage failure.
|
|
984
|
+
*/
|
|
985
|
+
declare function recoverOfflineLocalReset(options: RecoverOfflineLocalResetOptions): Promise<boolean>;
|
|
986
|
+
/**
|
|
987
|
+
* Deletes native databases once when changing their encryption mode.
|
|
988
|
+
*
|
|
989
|
+
* Products with a remote source of truth can use this before Angular bootstrap instead of
|
|
990
|
+
* decrypting local replicas. The completion marker is written only after every deletion and
|
|
991
|
+
* product cleanup succeeds, so interruption retries safely on the next cold start.
|
|
992
|
+
*/
|
|
993
|
+
declare function migrateOfflineDatabaseEncryption(options: MigrateOfflineDatabaseEncryptionOptions): Promise<boolean>;
|
|
994
|
+
/** Native databases and product files to remove before recording a completed reset. */
|
|
995
|
+
interface OfflineLocalDatabaseResetOptions {
|
|
996
|
+
sqliteConnection: OfflineLocalResetSqliteConnection;
|
|
997
|
+
databaseNames: readonly [string, ...string[]];
|
|
998
|
+
databaseEncryption: boolean | 'detect';
|
|
999
|
+
additionalCleanup?: () => Promise<void>;
|
|
1000
|
+
}
|
|
1001
|
+
/** Deletes only explicitly configured databases and files; leaves markers and authentication untouched. */
|
|
1002
|
+
declare function clearOfflineLocalDatabases(options: OfflineLocalDatabaseResetOptions): Promise<void>;
|
|
1003
|
+
|
|
1004
|
+
/** Destructive storage preparation configured by the consuming product. */
|
|
1005
|
+
interface OfflineStorageLifecycleOptions extends OfflineStorageGenerationOptions {
|
|
1006
|
+
markerStore: OfflineLocalResetMarkerStore;
|
|
1007
|
+
/** Explicit acknowledgement that the replica and all pending Outbox commands may be discarded. */
|
|
1008
|
+
discardPendingCommands: true;
|
|
1009
|
+
target: ({
|
|
1010
|
+
kind: 'sqlite';
|
|
1011
|
+
} & OfflineLocalDatabaseResetOptions) | {
|
|
1012
|
+
kind: 'web';
|
|
1013
|
+
storage: Pick<KitStorageService, 'keys' | 'remove'>;
|
|
1014
|
+
locks?: Pick<LockManager, 'request'>;
|
|
1015
|
+
};
|
|
1016
|
+
/** Defer existing storage to a cold reload after the product renders its update UI. */
|
|
1017
|
+
rebuild?: 'immediate' | 'after-reload';
|
|
1018
|
+
/** Product hook, e.g. Live Update readiness, awaited before any destructive operation. */
|
|
1019
|
+
beforeCleanup?: () => Promise<unknown>;
|
|
1020
|
+
}
|
|
1021
|
+
/** Preparation result; callers must not open a repository while a reload is required. */
|
|
1022
|
+
type OfflineStoragePreparation = 'ready' | 'rebuilt' | 'reload-required';
|
|
1023
|
+
/** A different runtime has rebuilt this storage. Reload before using the local replica again. */
|
|
1024
|
+
declare class OfflineStorageGenerationChangedError extends Error {
|
|
1025
|
+
constructor();
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Opt-in lifecycle for disposable local replicas. Never infer a reset from a network, auth,
|
|
1029
|
+
* wire-protocol or generic storage error. Use one instance for preparation and repository access.
|
|
1030
|
+
*/
|
|
1031
|
+
declare class OfflineStorageLifecycle {
|
|
1032
|
+
#private;
|
|
1033
|
+
private readonly options;
|
|
1034
|
+
constructor(options: OfflineStorageLifecycleOptions);
|
|
1035
|
+
/** Prepares storage once, before the repository is opened; failed attempts remain retryable. */
|
|
1036
|
+
prepare(): Promise<OfflineStoragePreparation>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Holds the same Web Lock used for reset throughout one repository operation.
|
|
1039
|
+
* A stale runtime fails before it can read or write the newly rebuilt storage.
|
|
1040
|
+
*/
|
|
1041
|
+
run<T>(mode: 'shared' | 'exclusive', operation: () => Promise<T>): Promise<T>;
|
|
1042
|
+
/** Waits for product readiness, rechecks the state, persists intent, then requests a cold reload. */
|
|
1043
|
+
requestRebuildAfterBootstrap(waitUntilReady: () => Promise<unknown>, reloadTarget: OfflineLocalResetReloadTarget): Promise<boolean>;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
902
1046
|
/**
|
|
903
1047
|
* Closed set of reasons local offline storage failed to become ready.
|
|
904
1048
|
*
|
|
@@ -991,6 +1135,8 @@ interface OfflineKitOptionsBase {
|
|
|
991
1135
|
* the replica schema fingerprint for backward compatibility.
|
|
992
1136
|
*/
|
|
993
1137
|
wireProtocol?: OfflineWireProtocolFingerprint;
|
|
1138
|
+
/** Opt-in disposable storage lifecycle. Shared with the product bootstrap before opening a repository. */
|
|
1139
|
+
storageLifecycle?: OfflineStorageLifecycle;
|
|
994
1140
|
/** Optional durable Outbox backpressure policy. */
|
|
995
1141
|
outboxLimits?: OfflineOutboxLimits;
|
|
996
1142
|
/**
|
|
@@ -1261,97 +1407,6 @@ type OfflineAuthBridgeConfig = Pick<KitAuthConfig, 'onAuthorized' | 'onUnavailab
|
|
|
1261
1407
|
*/
|
|
1262
1408
|
declare function createOfflineAuthBridge<TIdentity extends OfflineRemoteIdentity>(options: CreateOfflineAuthBridgeOptions<TIdentity>): OfflineAuthBridgeConfig;
|
|
1263
1409
|
|
|
1264
|
-
/** Durable marker store used to request a cold-start local reset. */
|
|
1265
|
-
interface OfflineLocalResetMarkerStore {
|
|
1266
|
-
get(options: {
|
|
1267
|
-
key: string;
|
|
1268
|
-
}): Promise<{
|
|
1269
|
-
value: string | null;
|
|
1270
|
-
}>;
|
|
1271
|
-
set(options: {
|
|
1272
|
-
key: string;
|
|
1273
|
-
value: string;
|
|
1274
|
-
}): Promise<void>;
|
|
1275
|
-
remove(options: {
|
|
1276
|
-
key: string;
|
|
1277
|
-
}): Promise<void>;
|
|
1278
|
-
}
|
|
1279
|
-
/** Minimal page reload surface used after a reset request is persisted. */
|
|
1280
|
-
interface OfflineLocalResetReloadTarget {
|
|
1281
|
-
reload(): void;
|
|
1282
|
-
}
|
|
1283
|
-
/** Native SQLite connection lifecycle required to delete Kit's database safely. */
|
|
1284
|
-
interface OfflineLocalResetSqliteConnection {
|
|
1285
|
-
checkConnectionsConsistency(): Promise<{
|
|
1286
|
-
result?: boolean;
|
|
1287
|
-
}>;
|
|
1288
|
-
isDatabase(database: string): Promise<{
|
|
1289
|
-
result?: boolean;
|
|
1290
|
-
}>;
|
|
1291
|
-
isDatabaseEncrypted?(database: string): Promise<{
|
|
1292
|
-
result?: boolean;
|
|
1293
|
-
}>;
|
|
1294
|
-
createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise<{
|
|
1295
|
-
delete(): Promise<void>;
|
|
1296
|
-
}>;
|
|
1297
|
-
closeConnection(database: string, readonly: boolean): Promise<void>;
|
|
1298
|
-
clearEncryptionSecret?(): Promise<void>;
|
|
1299
|
-
}
|
|
1300
|
-
/** Options for {@link requestOfflineLocalReset}. */
|
|
1301
|
-
interface RequestOfflineLocalResetOptions {
|
|
1302
|
-
markerStore: OfflineLocalResetMarkerStore;
|
|
1303
|
-
markerKey: string;
|
|
1304
|
-
reloadTarget?: OfflineLocalResetReloadTarget;
|
|
1305
|
-
}
|
|
1306
|
-
/** Options for {@link recoverOfflineLocalReset}. */
|
|
1307
|
-
interface RecoverOfflineLocalResetOptions {
|
|
1308
|
-
markerStore: OfflineLocalResetMarkerStore;
|
|
1309
|
-
markerKey: string;
|
|
1310
|
-
sqliteConnection: OfflineLocalResetSqliteConnection;
|
|
1311
|
-
/**
|
|
1312
|
-
* Kit database followed only by product databases using Kit's same encryption
|
|
1313
|
-
* mode, connection-version-1, read/write lifecycle.
|
|
1314
|
-
* Delete databases with other connection settings in {@link additionalCleanup}.
|
|
1315
|
-
*/
|
|
1316
|
-
kitCompatibleDatabaseNames: readonly [string, ...string[]];
|
|
1317
|
-
/** Connection mode used only to obtain the public `delete()` handle. Defaults to encrypted for compatibility. */
|
|
1318
|
-
databaseEncryption?: boolean;
|
|
1319
|
-
nativePlatform?: boolean;
|
|
1320
|
-
/** Product-owned cleanup, such as a media database or files, run before the marker is removed. */
|
|
1321
|
-
additionalCleanup?: () => Promise<void>;
|
|
1322
|
-
}
|
|
1323
|
-
/** Options for a versioned destructive encryption-mode migration. */
|
|
1324
|
-
interface MigrateOfflineDatabaseEncryptionOptions {
|
|
1325
|
-
markerStore: OfflineLocalResetMarkerStore;
|
|
1326
|
-
markerKey: string;
|
|
1327
|
-
migrationVersion: string;
|
|
1328
|
-
sqliteConnection: OfflineLocalResetSqliteConnection;
|
|
1329
|
-
kitCompatibleDatabaseNames: readonly [string, ...string[]];
|
|
1330
|
-
/** Existing database mode used only to obtain a valid public `delete()` handle. */
|
|
1331
|
-
sourceDatabaseEncryption: boolean | 'detect';
|
|
1332
|
-
/** Removes the obsolete plugin secret after every database and product cleanup succeeds. */
|
|
1333
|
-
clearEncryptionSecret?: boolean;
|
|
1334
|
-
nativePlatform?: boolean;
|
|
1335
|
-
additionalCleanup?: () => Promise<void>;
|
|
1336
|
-
}
|
|
1337
|
-
/** Persists an explicit destructive reset request, then reloads into a cold bootstrap. */
|
|
1338
|
-
declare function requestOfflineLocalReset(options: RequestOfflineLocalResetOptions): Promise<void>;
|
|
1339
|
-
/**
|
|
1340
|
-
* Recovers an explicit reset request before Angular and Kit open native SQLite.
|
|
1341
|
-
*
|
|
1342
|
-
* The marker is removed only after the Kit database and every product cleanup succeed.
|
|
1343
|
-
* Kit never invokes this helper automatically in response to a storage failure.
|
|
1344
|
-
*/
|
|
1345
|
-
declare function recoverOfflineLocalReset(options: RecoverOfflineLocalResetOptions): Promise<boolean>;
|
|
1346
|
-
/**
|
|
1347
|
-
* Deletes native databases once when changing their encryption mode.
|
|
1348
|
-
*
|
|
1349
|
-
* Products with a remote source of truth can use this before Angular bootstrap instead of
|
|
1350
|
-
* decrypting local replicas. The completion marker is written only after every deletion and
|
|
1351
|
-
* product cleanup succeeds, so interruption retries safely on the next cold start.
|
|
1352
|
-
*/
|
|
1353
|
-
declare function migrateOfflineDatabaseEncryption(options: MigrateOfflineDatabaseEncryptionOptions): Promise<boolean>;
|
|
1354
|
-
|
|
1355
1410
|
/** Identity policy for a successful offline mutation response. */
|
|
1356
1411
|
type OfflineMutationEnvelopeIdPolicy = 'required' | 'optional' | 'forbidden';
|
|
1357
1412
|
/** Values policy for a successful offline mutation response. */
|
|
@@ -1913,5 +1968,5 @@ declare class OfflineRequestFallbackService {
|
|
|
1913
1968
|
static ɵprov: i0.ɵɵInjectableDeclaration<OfflineRequestFallbackService>;
|
|
1914
1969
|
}
|
|
1915
1970
|
|
|
1916
|
-
export { COMMUNITY_SQLITE, DEFAULT_OFFLINE_COMMAND_HOOKS, DEFAULT_OFFLINE_CONNECTION_VERIFICATION_TIMEOUT_MS, IonicOfflineRepository, OFFLINE_AGGREGATE_INTENT_PROJECTOR, OFFLINE_BYPASS, OFFLINE_COMMAND_EXECUTOR, OFFLINE_COMMAND_HOOKS, OFFLINE_IGNORE_TRANSPORT_FAILURE, OFFLINE_KIT_OPTIONS, OFFLINE_MUTATION_REQUEST_POLICIES, OFFLINE_REPLICA_PROJECTOR, OFFLINE_REPLICA_PULLER, OFFLINE_REPOSITORY, OFFLINE_REQUEST_POLICIES, OFFLINE_RESPONSE_COMPLETE_HEADER, OFFLINE_RESPONSE_HEADER, OFFLINE_RETRY_RANDOM, OFFLINE_SCHEMA_VERSION, OFFLINE_SYNC_CONTEXT, OfflineCommandInFlightError, OfflineCoordinatorService, OfflineImmediateCommandRejectedError, OfflineMutationPersistenceDisabledError, OfflineMutationPersistencePendingError, OfflineMutationPersistenceRequiresOnlineError, OfflineMutationPersistenceService, OfflineMutationPolicyConflictError, OfflineMutationProtocolError, OfflineMutationRequestPolicyRegistry, OfflineNetworkService, OfflineOutboxCapacityError, OfflinePayloadValidationError, OfflineReplicaMutationCoordinator, OfflineReplicaPullService, OfflineReplicaSchemaMismatchError, OfflineRequestFallbackService, OfflineRequestPolicyRegistry, OfflineRouteInitializerService, OfflineSessionService, OfflineStorageUnavailableError, OfflineSyncService, SqliteOfflineRepository, assertOfflineLocalId, assertOfflineReplicaGeneratedRemoteId, assertOfflineReplicaNaturalKeyBaseline, assertSupportedOfflineMode, booleanColumn, canonicalOfflineCommandIdentity, canonicalOfflinePrincipalId, canonicalOfflineRemoteIdentity, canonicalOfflineReplicaIdentity, canonicalOfflineReplicaRowKey, commandFootprintKeys, commandIdentityFromReplicaIdentity, commandIdentityMatchesReplicaRow, createCommunitySqliteDriver, createOfflineAuthBridge, createRandomOfflineEncryptionKey, datetime, decodeOfflineReplicaValues, defineOfflineReplicaSchema, defineReplicaEntity, encodeOfflineReplicaValues, generatedId, ignored, integer, isOfflineAggregateIntentConflict, isOfflineFallbackError, isOfflineStorageUnavailableError, json, localOnly, migrateOfflineDatabaseEncryption, naturalKey, normalizeOfflineNaturalKey, normalizeOfflineReplicaPullPage, nullable, offlineAggregateIntentMutations, offlineCommandLookupIdentity, offlineCommandTargetFromReplicaRow, offlineCommandWithBaseRevision, offlineGeneratedReplicaIdentity, offlineInterceptor, offlineNaturalKeyFromValues, offlineNaturalReplicaIdentity, offlineReadEmission, offlineReadSource, offlineReplicaRemoteIdentity, offlineRetryDelayMs, offlineSessionManifestAllows, parseOfflineCommandIdentity, parseOfflineMutationEnvelope, parseOfflinePrincipalId, projectOfflineReplicaValues, provideOffline, provideOfflineMutationRequestPolicy, provideOfflineRequestPolicy, provideRouteScopedOffline, real, recoverOfflineLocalReset, replicaAddressFromIdentity, requestOfflineLocalReset, requirePositiveOfflineInteger, selectOfflineRepository, serializeOfflineCommandIdentity, sha256OfflineReplicaSchema, shouldCommitOfflineCollection, supportsSynchronizedOfflineRepository, text };
|
|
1917
|
-
export type { CommunitySqliteConnection, CommunitySqliteDatabase, CommunitySqliteDriver, CreateOfflineAuthBridgeOptions, EnqueueOfflineCommand, EnqueueOfflineCommandIdentity, EnqueueOfflineGeneratedIdentity, EnqueueOfflineNaturalIdentity, MigrateOfflineDatabaseEncryptionOptions, OfflineAggregateIntentConflict, OfflineAggregateIntentProjectInput, OfflineAggregateIntentProjectResult, OfflineAggregateIntentProjection, OfflineAggregateIntentProjector, OfflineAuthBridgeConfig, OfflineAuthExchangeContext, OfflineAuthExchangePhase, OfflineAuthResumeContext, OfflineCommand, OfflineCommandExecutor, OfflineCommandHooks, OfflineCommandIdentity, OfflineCommandResult, OfflineCommandState, OfflineCommandTarget, OfflineGeneratedCommandLocator, OfflineGeneratedRemoteId, OfflineKitEncryptionOptions, OfflineKitOptions, OfflineLocalResetMarkerStore, OfflineLocalResetReloadTarget, OfflineLocalResetSqliteConnection, OfflineLogoutAction, OfflineMutationEnvelope, OfflineMutationEnvelopeIdPolicy, OfflineMutationEnvelopeOptions, OfflineMutationEnvelopeValuesPolicy, OfflineMutationPersistenceAdapter, OfflineMutationPersistenceOptions, OfflineMutationRequestPlan, OfflineMutationRequestPolicy, OfflineNaturalKey, OfflineNaturalKeyValue, OfflineNetworkState, OfflineOutboxLimits, OfflinePrepareRemoteSessionOptions, OfflinePrincipalId, OfflinePullAttention, OfflinePullAttentionReason, OfflineReadEmission, OfflineReadRequestPlan, OfflineReadResponseSource, OfflineReadStrategy, OfflineRemoteIdentity, OfflineReplicaAddress, OfflineReplicaChange, OfflineReplicaChangeBase, OfflineReplicaChangeBatch, OfflineReplicaColumnDef, OfflineReplicaCursor, OfflineReplicaEntityDefinition, OfflineReplicaEntitySchema, OfflineReplicaEntityScope, OfflineReplicaFieldDescriptor, OfflineReplicaFieldPolicy, OfflineReplicaIdentity, OfflineReplicaIdentityDescriptor, OfflineReplicaIgnoredDef, OfflineReplicaLocalOnlyDef, OfflineReplicaMigration, OfflineReplicaMutation, OfflineReplicaNaturalKeyDef, OfflineReplicaProjector, OfflineReplicaPullPage, OfflineReplicaPullProjection, OfflineReplicaPullRequest, OfflineReplicaPuller, OfflineReplicaReconciliationTarget, OfflineReplicaRemoteIdDef, OfflineReplicaRemoteIdRelease, OfflineReplicaRemoteIdentity, OfflineReplicaRow, OfflineReplicaRowKey, OfflineReplicaSchemaBundle, OfflineReplicaSchemaDefinition, OfflineReplicaSqliteAffinity, OfflineReplicaStorageKind, OfflineReplicaSyncState, OfflineReplicaTransaction, OfflineReplicaVisibility, OfflineReplicaWebMigrationCallback, OfflineReplicaWebMigrationResult, OfflineReplicaWebMigrationRow, OfflineReplicaWireChange, OfflineReplicaWireIdentity, OfflineReplicaWirePullPage, OfflineRepository, OfflineRepositoryReader, OfflineRequestPlan, OfflineRequestPolicy, OfflineResponseSource, OfflineResumeRemoteSessionOptions, OfflineScope, OfflineSessionManifest, OfflineSessionTransitionLease, OfflineStorageState, OfflineStorageUnavailableReason, OfflineSyncContext, OfflineSyncSession, OfflineSyncState, OfflineWireProtocolFingerprint, PreparedOfflineBatchOptions, PreparedOfflineCommand, ProvideOfflineOptions, ProvideReadCacheOfflineOptions, ProvideSynchronizedOfflineOptions, RecoverOfflineLocalResetOptions, RequestOfflineLocalResetOptions };
|
|
1971
|
+
export { COMMUNITY_SQLITE, DEFAULT_OFFLINE_COMMAND_HOOKS, DEFAULT_OFFLINE_CONNECTION_VERIFICATION_TIMEOUT_MS, IonicOfflineRepository, OFFLINE_AGGREGATE_INTENT_PROJECTOR, OFFLINE_BYPASS, OFFLINE_COMMAND_EXECUTOR, OFFLINE_COMMAND_HOOKS, OFFLINE_IGNORE_TRANSPORT_FAILURE, OFFLINE_KIT_OPTIONS, OFFLINE_MUTATION_REQUEST_POLICIES, OFFLINE_REPLICA_PROJECTOR, OFFLINE_REPLICA_PULLER, OFFLINE_REPOSITORY, OFFLINE_REQUEST_POLICIES, OFFLINE_RESPONSE_COMPLETE_HEADER, OFFLINE_RESPONSE_HEADER, OFFLINE_RETRY_RANDOM, OFFLINE_SCHEMA_VERSION, OFFLINE_SYNC_CONTEXT, OfflineCommandInFlightError, OfflineCoordinatorService, OfflineImmediateCommandRejectedError, OfflineMutationPersistenceDisabledError, OfflineMutationPersistencePendingError, OfflineMutationPersistenceRequiresOnlineError, OfflineMutationPersistenceService, OfflineMutationPolicyConflictError, OfflineMutationProtocolError, OfflineMutationRequestPolicyRegistry, OfflineNetworkService, OfflineOutboxCapacityError, OfflinePayloadValidationError, OfflineReplicaMutationCoordinator, OfflineReplicaPullService, OfflineReplicaSchemaMismatchError, OfflineRequestFallbackService, OfflineRequestPolicyRegistry, OfflineRouteInitializerService, OfflineSessionService, OfflineStorageGenerationChangedError, OfflineStorageLifecycle, OfflineStorageUnavailableError, OfflineSyncService, SqliteOfflineRepository, assertOfflineLocalId, assertOfflineReplicaGeneratedRemoteId, assertOfflineReplicaNaturalKeyBaseline, assertSupportedOfflineMode, booleanColumn, canonicalOfflineCommandIdentity, canonicalOfflinePrincipalId, canonicalOfflineRemoteIdentity, canonicalOfflineReplicaIdentity, canonicalOfflineReplicaRowKey, clearOfflineLocalDatabases, commandFootprintKeys, commandIdentityFromReplicaIdentity, commandIdentityMatchesReplicaRow, createCommunitySqliteDriver, createOfflineAuthBridge, createRandomOfflineEncryptionKey, datetime, decodeOfflineReplicaValues, defineOfflineReplicaSchema, defineReplicaEntity, encodeOfflineReplicaValues, generatedId, ignored, integer, isOfflineAggregateIntentConflict, isOfflineFallbackError, isOfflineStorageUnavailableError, json, localOnly, migrateOfflineDatabaseEncryption, naturalKey, normalizeOfflineNaturalKey, normalizeOfflineReplicaPullPage, nullable, offlineAggregateIntentMutations, offlineCommandLookupIdentity, offlineCommandTargetFromReplicaRow, offlineCommandWithBaseRevision, offlineGeneratedReplicaIdentity, offlineInterceptor, offlineNaturalKeyFromValues, offlineNaturalReplicaIdentity, offlineReadEmission, offlineReadSource, offlineReplicaRemoteIdentity, offlineRetryDelayMs, offlineSessionManifestAllows, parseOfflineCommandIdentity, parseOfflineMutationEnvelope, parseOfflinePrincipalId, projectOfflineReplicaValues, provideOffline, provideOfflineMutationRequestPolicy, provideOfflineRequestPolicy, provideRouteScopedOffline, real, recoverOfflineLocalReset, replicaAddressFromIdentity, requestOfflineLocalReset, requirePositiveOfflineInteger, selectOfflineRepository, serializeOfflineCommandIdentity, sha256OfflineReplicaSchema, shouldCommitOfflineCollection, supportsSynchronizedOfflineRepository, text };
|
|
1972
|
+
export type { CommunitySqliteConnection, CommunitySqliteDatabase, CommunitySqliteDriver, CreateOfflineAuthBridgeOptions, EnqueueOfflineCommand, EnqueueOfflineCommandIdentity, EnqueueOfflineGeneratedIdentity, EnqueueOfflineNaturalIdentity, MigrateOfflineDatabaseEncryptionOptions, OfflineAggregateIntentConflict, OfflineAggregateIntentProjectInput, OfflineAggregateIntentProjectResult, OfflineAggregateIntentProjection, OfflineAggregateIntentProjector, OfflineAuthBridgeConfig, OfflineAuthExchangeContext, OfflineAuthExchangePhase, OfflineAuthResumeContext, OfflineCommand, OfflineCommandExecutor, OfflineCommandHooks, OfflineCommandIdentity, OfflineCommandResult, OfflineCommandState, OfflineCommandTarget, OfflineGeneratedCommandLocator, OfflineGeneratedRemoteId, OfflineKitEncryptionOptions, OfflineKitOptions, OfflineLocalDatabaseResetOptions, OfflineLocalResetMarkerStore, OfflineLocalResetReloadTarget, OfflineLocalResetSqliteConnection, OfflineLogoutAction, OfflineMutationEnvelope, OfflineMutationEnvelopeIdPolicy, OfflineMutationEnvelopeOptions, OfflineMutationEnvelopeValuesPolicy, OfflineMutationPersistenceAdapter, OfflineMutationPersistenceOptions, OfflineMutationRequestPlan, OfflineMutationRequestPolicy, OfflineNaturalKey, OfflineNaturalKeyValue, OfflineNetworkState, OfflineOutboxLimits, OfflinePrepareRemoteSessionOptions, OfflinePrincipalId, OfflinePullAttention, OfflinePullAttentionReason, OfflineReadEmission, OfflineReadRequestPlan, OfflineReadResponseSource, OfflineReadStrategy, OfflineRemoteIdentity, OfflineReplicaAddress, OfflineReplicaChange, OfflineReplicaChangeBase, OfflineReplicaChangeBatch, OfflineReplicaColumnDef, OfflineReplicaCursor, OfflineReplicaEntityDefinition, OfflineReplicaEntitySchema, OfflineReplicaEntityScope, OfflineReplicaFieldDescriptor, OfflineReplicaFieldPolicy, OfflineReplicaIdentity, OfflineReplicaIdentityDescriptor, OfflineReplicaIgnoredDef, OfflineReplicaLocalOnlyDef, OfflineReplicaMigration, OfflineReplicaMutation, OfflineReplicaNaturalKeyDef, OfflineReplicaProjector, OfflineReplicaPullPage, OfflineReplicaPullProjection, OfflineReplicaPullRequest, OfflineReplicaPuller, OfflineReplicaReconciliationTarget, OfflineReplicaRemoteIdDef, OfflineReplicaRemoteIdRelease, OfflineReplicaRemoteIdentity, OfflineReplicaRow, OfflineReplicaRowKey, OfflineReplicaSchemaBundle, OfflineReplicaSchemaDefinition, OfflineReplicaSqliteAffinity, OfflineReplicaStorageKind, OfflineReplicaSyncState, OfflineReplicaTransaction, OfflineReplicaVisibility, OfflineReplicaWebMigrationCallback, OfflineReplicaWebMigrationResult, OfflineReplicaWebMigrationRow, OfflineReplicaWireChange, OfflineReplicaWireIdentity, OfflineReplicaWirePullPage, OfflineRepository, OfflineRepositoryReader, OfflineRequestPlan, OfflineRequestPolicy, OfflineResponseSource, OfflineResumeRemoteSessionOptions, OfflineScope, OfflineSessionManifest, OfflineSessionTransitionLease, OfflineStorageLifecycleOptions, OfflineStoragePreparation, OfflineStorageState, OfflineStorageUnavailableReason, OfflineSyncContext, OfflineSyncSession, OfflineSyncState, OfflineWireProtocolFingerprint, PreparedOfflineBatchOptions, PreparedOfflineCommand, ProvideOfflineOptions, ProvideReadCacheOfflineOptions, ProvideSynchronizedOfflineOptions, RecoverOfflineLocalResetOptions, RequestOfflineLocalResetOptions };
|
|
@@ -1181,6 +1181,12 @@ declare function kitPreloadAuthLoginForNavigation(router: Pick<Router, 'currentN
|
|
|
1181
1181
|
* `remote` access requirement is deferred until that exchange succeeds.
|
|
1182
1182
|
*/
|
|
1183
1183
|
declare const KIT_AUTH_BOOTSTRAP_REQUEST: HttpContextToken<boolean>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Suppresses response-error notification hooks for requests whose caller owns the error UI.
|
|
1186
|
+
* Defaults to false. Errors still propagate unchanged; authentication recovery/replay,
|
|
1187
|
+
* access revocation, auth-header failure hooks, retries, and offline fallback remain active.
|
|
1188
|
+
*/
|
|
1189
|
+
declare const KIT_SKIP_ERROR_NOTIFICATIONS: HttpContextToken<boolean>;
|
|
1184
1190
|
/**
|
|
1185
1191
|
* True when the error is the fleet maintenance short-circuit (`503` + body `code: 'MAINTENANCE'`).
|
|
1186
1192
|
*
|
|
@@ -1352,7 +1358,7 @@ interface KitHttpConfig {
|
|
|
1352
1358
|
*/
|
|
1353
1359
|
onRateLimited?(retryAfterSeconds?: number): void;
|
|
1354
1360
|
/**
|
|
1355
|
-
* UX hook for `400` / `422` / `500` responses that carry a server-provided message.
|
|
1361
|
+
* UX hook for `400` / `409` / `422` / `500` responses that carry a server-provided message.
|
|
1356
1362
|
*
|
|
1357
1363
|
* @remarks
|
|
1358
1364
|
* Optional; defaults to a no-op. Note that the message comes straight from the API; prefer a
|
|
@@ -1488,7 +1494,7 @@ declare const provideKitHttp: (configFactory: () => KitHttpConfig) => Environmen
|
|
|
1488
1494
|
* For every other error, `offlineFallback` is consulted first; otherwise the error is classified by
|
|
1489
1495
|
* status (see {@link dispatchError}): `401`→`onUnauthorized`, `403`→`onForbidden`, `0`→
|
|
1490
1496
|
* `onNetworkError` (when connected), `429`→`onRateLimited`, maintenance `503`→`onMaintenance`,
|
|
1491
|
-
* other `502`/`503`/`504`→`onServerBusy`, and `400`/`422`/`500` with a body message→`onServerError`.
|
|
1497
|
+
* other `502`/`503`/`504`→`onServerBusy`, and `400`/`409`/`422`/`500` with a body message→`onServerError`.
|
|
1492
1498
|
*
|
|
1493
1499
|
* @param request - The outgoing request.
|
|
1494
1500
|
* @param next - The next handler in the interceptor chain.
|
|
@@ -1839,5 +1845,5 @@ type ComponentPropsType<T> = {
|
|
|
1839
1845
|
[K in keyof T]: InputSignal<T[K]> | InputSignalWithTransform<T[K], any>;
|
|
1840
1846
|
};
|
|
1841
1847
|
|
|
1842
|
-
export { AUTH_FAILURE_SCOPES, AUTH_IDENTITY_INVALID_CODE, KIT_AUTH_BOOTSTRAP_REQUEST, KIT_AUTH_CONFIG, KIT_AUTH_RECOVERY_CONFIG, KIT_HTTP_CONFIG, KIT_LAST_AUTH_EMAIL_KEY, KIT_OVERLAY_CONFIG, KIT_REALTIME_CLIENT_ID, KIT_THEME_STORAGE_KEY, KitAuthAccessService, KitAuthInputDirective, KitAuthLoginExchange, KitAuthRecoveryService, KitLoadingController, KitMaintenanceController, KitOverlayController, KitRealtimeConnection, KitRealtimeLivenessWatchdog, KitReloadAlertController, KitStorageService, arrayConcatById, disableHandler, getAuthFailureScope, isExplicitAuthDenial, isIdentityAuthFailure, isMaintenanceError, kitAuthInterceptor, kitChangeEventDisabled, kitClearStoragePreservingKeys, kitCreateDidEnter, kitForgetEmail, kitImpact, kitIsValidEmail, kitKeyboardInit, kitPreloadAuthLoginForNavigation, kitPresentAuthFailedAlert, kitPresentLanguageActionSheet, kitRealtimeProtocols, kitRecallEmail, kitRememberEmail, kitRequireAuthorizedGuard, kitRequireConfirmingGuard, kitRequiredUnauthorizedGuard, mountViewModel, objectEqual, provideKitAuth, provideKitHttp, provideKitOverlay, toKitWebSocketUrl };
|
|
1848
|
+
export { AUTH_FAILURE_SCOPES, AUTH_IDENTITY_INVALID_CODE, KIT_AUTH_BOOTSTRAP_REQUEST, KIT_AUTH_CONFIG, KIT_AUTH_RECOVERY_CONFIG, KIT_HTTP_CONFIG, KIT_LAST_AUTH_EMAIL_KEY, KIT_OVERLAY_CONFIG, KIT_REALTIME_CLIENT_ID, KIT_SKIP_ERROR_NOTIFICATIONS, KIT_THEME_STORAGE_KEY, KitAuthAccessService, KitAuthInputDirective, KitAuthLoginExchange, KitAuthRecoveryService, KitLoadingController, KitMaintenanceController, KitOverlayController, KitRealtimeConnection, KitRealtimeLivenessWatchdog, KitReloadAlertController, KitStorageService, arrayConcatById, disableHandler, getAuthFailureScope, isExplicitAuthDenial, isIdentityAuthFailure, isMaintenanceError, kitAuthInterceptor, kitChangeEventDisabled, kitClearStoragePreservingKeys, kitCreateDidEnter, kitForgetEmail, kitImpact, kitIsValidEmail, kitKeyboardInit, kitPreloadAuthLoginForNavigation, kitPresentAuthFailedAlert, kitPresentLanguageActionSheet, kitRealtimeProtocols, kitRecallEmail, kitRememberEmail, kitRequireAuthorizedGuard, kitRequireConfirmingGuard, kitRequiredUnauthorizedGuard, mountViewModel, objectEqual, provideKitAuth, provideKitHttp, provideKitOverlay, toKitWebSocketUrl };
|
|
1843
1849
|
export type { AuthFailureBody, AuthFailureScope, ComponentPropsType, KitAlertCloseOptions, KitAlertConfirmOptions, KitAuthAccessLease, KitAuthAccessMode, KitAuthConfig, KitAuthFailedAlertOptions, KitAuthGuardState, KitAuthInputMode, KitAuthRecoveryConfig, KitAuthRedirects, KitAuthState, KitClearableStore, KitClientRealtimeEvent, KitEmailStore, KitHttpConfig, KitKeyboardAdjust, KitLabels, KitLanguageActionSheetOptions, KitLanguageOption, KitMaintenanceOptions, KitModalPresentOptions, KitOverlayConfig, KitRealtimeConnectionOptions, KitRealtimeEvent, KitRealtimeSocketTarget, KitReloadAlertOptions, KitRemoteAccessRecovery, ModalMetadata, ReactiveHost, ViewModelHost };
|