@effect-app/infra 0.27.4 → 0.27.5
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/CHANGELOG.md +7 -0
- package/dist/api/express/makeOpenApiSpecs.d.ts +1 -1
- package/dist/services/Repository.d.ts +14 -14
- package/dist/services/simpledb/cosmosdb.d.ts +2 -2
- package/dist/services/simpledb/diskdb.d.ts +2 -2
- package/dist/services/simpledb/memdb.d.ts +2 -2
- package/dist/services/simpledb/mongodb.d.ts +2 -2
- package/dist/services/simpledb/redisdb.d.ts +2 -2
- package/dist/services/simpledb/simpledb.d.ts +3 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -18,7 +18,7 @@ export declare function makeOpenApiSpecs(rdescs: Iterable<RouteDescriptorAny>, i
|
|
|
18
18
|
version: string;
|
|
19
19
|
};
|
|
20
20
|
tags: never[];
|
|
21
|
-
paths: Record<string, Record<"
|
|
21
|
+
paths: Record<string, Record<"GET" | "POST" | "PUT" | "PATCH" | "DELETE", {
|
|
22
22
|
[x: string]: {
|
|
23
23
|
responses: any;
|
|
24
24
|
tags: readonly string[] | undefined;
|
|
@@ -182,7 +182,7 @@ export declare function queryAndSavePureEffect<Id extends string, T extends {
|
|
|
182
182
|
skip?: number;
|
|
183
183
|
}>): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>, E2, A>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | R | Exclude<R2, {
|
|
184
184
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
185
|
-
}>,
|
|
185
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E | E2, A>;
|
|
186
186
|
/**
|
|
187
187
|
* @tsplus fluent Repository queryAndSavePure
|
|
188
188
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -198,7 +198,7 @@ export declare function queryAndSavePure<Id extends string, T extends {
|
|
|
198
198
|
skip?: number;
|
|
199
199
|
}): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>, E2, A>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R2, {
|
|
200
200
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
201
|
-
}>,
|
|
201
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E2, A>;
|
|
202
202
|
/**
|
|
203
203
|
* @tsplus getter Repository saveManyWithPure
|
|
204
204
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -209,7 +209,7 @@ export declare function saveManyWithPure<Id extends string, T extends {
|
|
|
209
209
|
id: string;
|
|
210
210
|
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
211
211
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
212
|
-
}>,
|
|
212
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E, A>;
|
|
213
213
|
/**
|
|
214
214
|
* @tsplus fluent Repository byIdAndSaveWithPure
|
|
215
215
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -220,7 +220,7 @@ export declare function byIdAndSaveWithPure<Id extends string, T extends {
|
|
|
220
220
|
id: string;
|
|
221
221
|
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>, id: Id): <R, A, E, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
222
222
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
|
|
223
|
-
}>,
|
|
223
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E | NotFoundError<ItemType>, A>;
|
|
224
224
|
/**
|
|
225
225
|
* NOTE: it's not as composable, only useful when the request is simple, and only this part needs request args.
|
|
226
226
|
* @tsplus getter Repository handleByIdAndSaveWithPure
|
|
@@ -234,7 +234,7 @@ export declare function handleByIdAndSaveWithPure<Id extends string, T extends {
|
|
|
234
234
|
id: Id;
|
|
235
235
|
}, Context_1, R, A, E, S2 extends T>(pure: (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<FixEnv<R, Evt, T, S2>, E, A>) => (req: Req, ctx: Context_1) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
236
236
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, T, S2>;
|
|
237
|
-
}>,
|
|
237
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E | NotFoundError<ItemType>, A>;
|
|
238
238
|
/**
|
|
239
239
|
* @tsplus fluent Repository saveManyWithPure_
|
|
240
240
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -245,7 +245,7 @@ export declare function saveManyWithPure_<Id extends string, R, T extends {
|
|
|
245
245
|
id: string;
|
|
246
246
|
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, Chunk<S1>, Chunk<S2>>, E, A>): import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
247
247
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
248
|
-
}>,
|
|
248
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E, A>;
|
|
249
249
|
/**
|
|
250
250
|
* @tsplus fluent Repository saveWithPure_
|
|
251
251
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -256,12 +256,12 @@ export declare function saveWithPure_<Id extends string, R, T extends {
|
|
|
256
256
|
id: string;
|
|
257
257
|
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>, item: S1, pure: Effect<FixEnv<R, Evt, S1, S2>, E, A>): import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
258
258
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, S1, S2>;
|
|
259
|
-
}>,
|
|
259
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E, A>;
|
|
260
260
|
export declare function saveAllWithEffectInt<Id extends string, T extends {
|
|
261
261
|
id: Id;
|
|
262
262
|
}, PM extends {
|
|
263
263
|
id: string;
|
|
264
|
-
}, P extends T, Evt, ItemType extends string, R, E, A>(self: Repository<T, PM, Evt, Id, ItemType>, gen: Effect<R, E, readonly [Iterable<P>, Iterable<Evt>, A]>): import("@effect/io/Effect").Effect<RequestContext | ContextMap | R,
|
|
264
|
+
}, P extends T, Evt, ItemType extends string, R, E, A>(self: Repository<T, PM, Evt, Id, ItemType>, gen: Effect<R, E, readonly [Iterable<P>, Iterable<Evt>, A]>): import("@effect/io/Effect").Effect<RequestContext | ContextMap | R, OptimisticConcurrencyException | InvalidStateError | E, A>;
|
|
265
265
|
/**
|
|
266
266
|
* @tsplus fluent Repository queryAndSavePureEffectBatched
|
|
267
267
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -277,7 +277,7 @@ export declare function queryAndSavePureEffectBatched<Id extends string, T exten
|
|
|
277
277
|
skip?: number;
|
|
278
278
|
}>, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>, E2, A>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | R | Exclude<R2, {
|
|
279
279
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
280
|
-
}>,
|
|
280
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E | E2, import("@effect/data/Chunk").Chunk<A>>;
|
|
281
281
|
/**
|
|
282
282
|
* @tsplus fluent Repository queryAndSavePureBatched
|
|
283
283
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -293,7 +293,7 @@ export declare function queryAndSavePureBatched<Id extends string, T extends {
|
|
|
293
293
|
skip?: number;
|
|
294
294
|
}, batchSize?: number): <R2, A, E2, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R2, Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>, E2, A>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R2, {
|
|
295
295
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
296
|
-
}>,
|
|
296
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E2, import("@effect/data/Chunk").Chunk<A>>;
|
|
297
297
|
/**
|
|
298
298
|
* @tsplus fluent Repository saveManyWithPureBatched
|
|
299
299
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -304,7 +304,7 @@ export declare function saveManyWithPureBatched<Id extends string, T extends {
|
|
|
304
304
|
id: string;
|
|
305
305
|
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>, batchSize?: number): <R, A, E, S1 extends T, S2 extends T>(pure: import("@effect/io/Effect").Effect<FixEnv<R, Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>, E, A>) => (items: Iterable<S1>) => import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
306
306
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
307
|
-
}>,
|
|
307
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E, import("@effect/data/Chunk").Chunk<A>>;
|
|
308
308
|
/**
|
|
309
309
|
* @tsplus fluent Repository saveManyWithPureBatched_
|
|
310
310
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -315,7 +315,7 @@ export declare function saveManyWithPureBatched_<Id extends string, R, T extends
|
|
|
315
315
|
id: string;
|
|
316
316
|
}, A, E, Evt, S1 extends T, S2 extends T, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>, items: Iterable<S1>, pure: Effect<FixEnv<R, Evt, Chunk<S1>, Chunk<S2>>, E, A>, batchSize?: number): import("@effect/io/Effect").Effect<RequestContext | ContextMap | Exclude<R, {
|
|
317
317
|
env: import("@effect-app/prelude/Pure").PureEnv<Evt, import("@effect/data/Chunk").Chunk<S1>, import("@effect/data/Chunk").Chunk<S2>>;
|
|
318
|
-
}>,
|
|
318
|
+
}>, OptimisticConcurrencyException | InvalidStateError | E, import("@effect/data/Chunk").Chunk<A>>;
|
|
319
319
|
export type AllDSL<T, Evt> = (<R, A, E, S1 extends T, S2 extends T>(pure: (dsl: PureDSL<Chunk<S1>, Chunk<S2>, Evt>) => Effect<R, E, A>) => Effect<FixEnv<R, Evt, Chunk<S1>, Chunk<S2>>, E, A>) & AllDSLExt<T, Evt>;
|
|
320
320
|
/**
|
|
321
321
|
* @tsplus type DSLExt
|
|
@@ -364,7 +364,7 @@ export declare function save<Id extends string, T extends {
|
|
|
364
364
|
id: Id;
|
|
365
365
|
}, PM extends {
|
|
366
366
|
id: string;
|
|
367
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>): (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<RequestContext | ContextMap,
|
|
367
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>): (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<RequestContext | ContextMap, OptimisticConcurrencyException | InvalidStateError, void>;
|
|
368
368
|
/**
|
|
369
369
|
* @tsplus getter Repository saveWithEvents
|
|
370
370
|
* @tsplus location "@effect-app/infra/services/Repository"
|
|
@@ -373,5 +373,5 @@ export declare function saveWithEvents<Id extends string, T extends {
|
|
|
373
373
|
id: Id;
|
|
374
374
|
}, PM extends {
|
|
375
375
|
id: string;
|
|
376
|
-
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<RequestContext | ContextMap,
|
|
376
|
+
}, Evt, ItemType extends string>(self: Repository<T, PM, Evt, Id, ItemType>): (events: Iterable<Evt>) => (items_0: T, ...items_1: T[]) => import("@effect/io/Effect").Effect<RequestContext | ContextMap, OptimisticConcurrencyException | InvalidStateError, void>;
|
|
377
377
|
//# sourceMappingURL=Repository.d.ts.map
|
|
@@ -6,8 +6,8 @@ import type { DBRecord } from "./shared.js";
|
|
|
6
6
|
import { OptimisticLockException } from "./shared.js";
|
|
7
7
|
import * as simpledb from "./simpledb.js";
|
|
8
8
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, indexes: IndexingPolicy) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient, unknown, {
|
|
9
|
-
find: (id: string) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | Cosmos.CosmosClient | simpledb.RecordCache, unknown, import("@fp-ts/core/Option").Option<A>>;
|
|
10
10
|
findBy: (parameters: Record<string, string>) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient, unknown, import("@fp-ts/core/Option").Option<any>>;
|
|
11
|
-
save: (record: A) => import("@effect/io/Effect").Effect<Cosmos.CosmosClient | simpledb.RecordCache
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | Cosmos.CosmosClient | simpledb.RecordCache, OptimisticLockException, A>;
|
|
12
12
|
}>;
|
|
13
13
|
//# sourceMappingURL=cosmosdb.d.ts.map
|
|
@@ -4,9 +4,9 @@ import type { DBRecord, Index } from "./shared.js";
|
|
|
4
4
|
import { CouldNotAquireDbLockException } from "./shared.js";
|
|
5
5
|
import * as simpledb from "./simpledb.js";
|
|
6
6
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index, dir?: string) => {
|
|
7
|
-
find: (id: string) => import("@effect/io/Effect").Effect<simpledb.RecordCache
|
|
7
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | simpledb.RecordCache, simpledb.InvalidStateError, import("@fp-ts/core/Option").Option<A>>;
|
|
8
8
|
findByIndex: (index: Index) => import("@effect/io/Effect").Effect<never, never, import("@fp-ts/core/Option").Option<TKey & {}>>;
|
|
9
|
-
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache
|
|
9
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
10
10
|
};
|
|
11
11
|
export declare function initialise(dir: string): void;
|
|
12
12
|
//# sourceMappingURL=diskdb.d.ts.map
|
|
@@ -5,8 +5,8 @@ import * as MO from "@effect-app/schema";
|
|
|
5
5
|
import type { DBRecord } from "./shared.js";
|
|
6
6
|
import * as simpledb from "./simpledb.js";
|
|
7
7
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>) => {
|
|
8
|
-
find: (id: string) => import("@effect/io/Effect").Effect<simpledb.RecordCache
|
|
8
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | simpledb.RecordCache, MO.CondemnException | simpledb.InvalidStateError, import("@fp-ts/core/Option").Option<A>>;
|
|
9
9
|
findBy: <V extends Partial<A>>(keys: V, eq: import("@fp-ts/core/typeclass/Equivalence").Equivalence<V>) => import("@effect/io/Effect").Effect<RDecode, MO.CondemnException, import("@fp-ts/core/Option").Option<A & {}>>;
|
|
10
|
-
save: (record: A) => import("@effect/io/Effect").Effect<simpledb.RecordCache
|
|
10
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | simpledb.RecordCache, MO.CondemnException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=memdb.d.ts.map
|
|
@@ -6,8 +6,8 @@ import type { DBRecord } from "./shared.js";
|
|
|
6
6
|
import { OptimisticLockException } from "./shared.js";
|
|
7
7
|
import * as simpledb from "./simpledb.js";
|
|
8
8
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, indexes: IndexDescription[]) => import("@effect/io/Effect").Effect<Mongo.MongoClient, unknown, {
|
|
9
|
-
find: (id: string) => import("@effect/io/Effect").Effect<
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | Mongo.MongoClient | simpledb.RecordCache, unknown, import("@fp-ts/core/Option").Option<A>>;
|
|
10
10
|
findBy: (keys: Record<string, string>) => import("@effect/io/Effect").Effect<Mongo.MongoClient, unknown, import("@fp-ts/core/Option").Option<TKey>>;
|
|
11
|
-
save: (record: A) => import("@effect/io/Effect").Effect<
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | Mongo.MongoClient | simpledb.RecordCache, OptimisticLockException, A>;
|
|
12
12
|
}>;
|
|
13
13
|
//# sourceMappingURL=mongodb.d.ts.map
|
|
@@ -6,9 +6,9 @@ import type { DBRecord, Index } from "./shared.js";
|
|
|
6
6
|
import { CouldNotAquireDbLockException } from "./shared.js";
|
|
7
7
|
import * as simpledb from "./simpledb.js";
|
|
8
8
|
export declare function createContext<TKey extends string, EA, A extends DBRecord<TKey>>(): <REncode, RDecode, EDecode>(type: string, encode: (record: A) => import("@effect/io/Effect").Effect<REncode, never, EA>, decode: (d: EA) => import("@effect/io/Effect").Effect<RDecode, EDecode, A>, schemaVersion: string, makeIndexKey: (r: A) => Index) => {
|
|
9
|
-
find: (id: string) => import("@effect/io/Effect").Effect<RED.RedisClient | simpledb.RecordCache
|
|
9
|
+
find: (id: string) => import("@effect/io/Effect").Effect<RDecode | RED.RedisClient | simpledb.RecordCache, simpledb.InvalidStateError, import("@fp-ts/core/Option").Option<A>>;
|
|
10
10
|
findByIndex: (index: Index) => import("@effect/io/Effect").Effect<RED.RedisClient, RED.ConnectionException, import("@fp-ts/core/Option").Option<TKey>>;
|
|
11
|
-
save: (record: A) => import("@effect/io/Effect").Effect<RED.RedisClient | simpledb.RecordCache
|
|
11
|
+
save: (record: A) => import("@effect/io/Effect").Effect<REncode | RED.RedisClient | simpledb.RecordCache, CouldNotAquireDbLockException | import("./shared.js").OptimisticLockException | simpledb.InvalidStateError, A>;
|
|
12
12
|
};
|
|
13
13
|
declare const RedisSerializedDBRecord_base: MO.Model<RedisSerializedDBRecord, MO.SchemaProperties<{
|
|
14
14
|
version: MO.Property<MO.SchemaDefaultSchema<unknown, string, string, string, {}>, "required", import("@fp-ts/core/Option").None, import("@fp-ts/core/Option").None>;
|
|
@@ -17,7 +17,7 @@ export interface RecordCache extends ReturnType<typeof makeLiveRecordCache> {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const RecordCache: import("@effect/data/Context").Tag<RecordCache>;
|
|
19
19
|
export declare const LiveRecordCache: import("@effect/io/Layer").Layer<never, never, RecordCache>;
|
|
20
|
-
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("@effect/io/Effect").Effect<
|
|
21
|
-
export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("@effect/io/Effect").Effect<
|
|
22
|
-
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("@effect/io/Effect").Effect<
|
|
20
|
+
export declare function find<R, RDecode, EDecode, E, EA, A>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, decode: (d: EA) => Effect<RDecode, EDecode, A>, type: string): (id: string) => import("@effect/io/Effect").Effect<R | RDecode | RecordCache, E | InvalidStateError, import("@fp-ts/core/Option").Option<A>>;
|
|
21
|
+
export declare function storeDirectly<R, E, TKey extends string, A extends DBRecord<TKey>>(save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, type: string): (record: A) => import("@effect/io/Effect").Effect<R | RecordCache, E, A>;
|
|
22
|
+
export declare function store<R, E, R2, E2, TKey extends string, EA, A extends DBRecord<TKey>>(tryRead: (id: string) => Effect<R, E, Option<CachedRecord<EA>>>, save: (r: A, version: Option<Version>) => Effect<R, E, CachedRecord<A>>, lock: (id: string) => Effect<R2 | Scope, E2, unknown>, type: string): (record: A) => import("@effect/io/Effect").Effect<R | RecordCache | Exclude<R2, import("@effect/io/Scope").Scope>, E | E2 | OptimisticLockException | InvalidStateError, A>;
|
|
23
23
|
//# sourceMappingURL=simpledb.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/infra",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"proper-lockfile": "^4.1.2",
|
|
21
21
|
"pure-rand": "^6.0.0",
|
|
22
22
|
"redlock": "^4.2.0",
|
|
23
|
-
"@effect-app/prelude": "0.21.13",
|
|
24
23
|
"@effect-app/core": "0.28.0",
|
|
25
|
-
"@effect-app/
|
|
26
|
-
"@effect-app/
|
|
24
|
+
"@effect-app/schema": "0.19.4",
|
|
25
|
+
"@effect-app/prelude": "0.21.14",
|
|
26
|
+
"@effect-app/infra-adapters": "0.21.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/cli": "^7.21.0",
|