convex-ents 0.3.0 → 0.4.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/deletion.d.ts +4 -2
- package/dist/deletion.js +111 -1094
- package/dist/deletion.js.map +1 -1
- package/dist/index.js +111 -50
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/deletion.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as convex_values from 'convex/values';
|
|
2
|
+
import { Infer } from 'convex/values';
|
|
1
3
|
import { FunctionReference, RegisteredMutation } from 'convex/server';
|
|
2
4
|
import { GenericEntsDataModel } from './schema.js';
|
|
3
|
-
import 'convex/values';
|
|
4
5
|
|
|
5
6
|
type ScheduledDeleteFuncRef = FunctionReference<"mutation", "internal", {
|
|
6
7
|
origin: Origin;
|
|
@@ -12,6 +13,8 @@ type Origin = {
|
|
|
12
13
|
table: string;
|
|
13
14
|
deletionTime: number;
|
|
14
15
|
};
|
|
16
|
+
declare const vApproach: convex_values.Validator<"cascade" | "paginate", false, never>;
|
|
17
|
+
type Approach = Infer<typeof vApproach>;
|
|
15
18
|
declare function scheduledDeleteFactory<EntsDataModel extends GenericEntsDataModel>(entDefinitions: EntsDataModel, options?: {
|
|
16
19
|
scheduledDelete: ScheduledDeleteFuncRef;
|
|
17
20
|
}): RegisteredMutation<"internal", {
|
|
@@ -19,7 +22,6 @@ declare function scheduledDeleteFactory<EntsDataModel extends GenericEntsDataMod
|
|
|
19
22
|
stack: Stack;
|
|
20
23
|
inProgress: boolean;
|
|
21
24
|
}, Promise<void>>;
|
|
22
|
-
type Approach = "schedule" | "deleteOne" | "paginate";
|
|
23
25
|
type PaginationArgs = {
|
|
24
26
|
approach: Approach;
|
|
25
27
|
table: string;
|