@dpuse/dpuse-shared 1.0.218 → 1.0.220

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.
@@ -150,7 +150,9 @@ export interface EngineLoadObjectRecordsResult extends LoadObjectRecordsResult {
150
150
  }
151
151
  export type StoreRecord = StoreValue[];
152
152
  export type StoreValue = bigint | boolean | Date | number | string | null;
153
- export type OpenStoreOptions = EngineConnectorActionOptions;
153
+ export interface OpenStoreOptions extends EngineConnectorActionOptions {
154
+ takeOver?: boolean;
155
+ }
154
156
  export interface OpenStoreResult {
155
157
  storeStateId: StoreStateId;
156
158
  }
@@ -243,9 +245,10 @@ export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
243
245
  export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
244
246
  export { auditObjectContentWithParser, buildPreviewObjectResult, indexObjectStructureWithParser } from './objectParsing';
245
247
  export { listObjectStructureEntriesWithParser, retrieveRecordsWithParser } from './objectParsing';
248
+ export { constructStoreError, findStoreErrorId, type StoreErrorId } from './storeErrors';
246
249
  export { resolveStorePath } from './storePath';
247
250
  export { convertStoreRecordToParsedRecord, convertStoreValueToText } from './storeValues';
248
- export { acquireWebLock } from './webLock';
251
+ export { type AcquireWebLockOptions, acquireWebLock } from './webLock';
249
252
  export { readTableSchema } from './tableSchema';
250
253
  export declare function determineConnectorUsageId(actionNames: ConnectorActionName[]): ConnectorUsageId;
251
254
  export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
@@ -0,0 +1,4 @@
1
+ import { ConnectorError } from '../../../errors';
2
+ export type StoreErrorId = 'heldElsewhere' | 'notLoaded';
3
+ export declare function constructStoreError(storeErrorId: StoreErrorId, message: string, locator: string, options?: ErrorOptions): ConnectorError;
4
+ export declare function findStoreErrorId(error: unknown): StoreErrorId | undefined;
@@ -1 +1,5 @@
1
- export declare function acquireWebLock(name: string): Promise<(() => Promise<void>) | undefined>;
1
+ export interface AcquireWebLockOptions {
2
+ onLost?: () => void;
3
+ takeOver?: boolean;
4
+ }
5
+ export declare function acquireWebLock(name: string, options?: AcquireWebLockOptions): Promise<(() => Promise<void>) | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-shared",
3
- "version": "1.0.218",
3
+ "version": "1.0.220",
4
4
  "private": false,
5
5
  "description": "Common constants, types and utilities used across DPUse projects.",
6
6
  "license": "MIT",