cvx-kit 0.1.35 → 2.0.0-beta.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/README.md +92 -49
- package/dist/agent-tools.d.mts +21 -25
- package/dist/agent-tools.mjs +1 -1
- package/dist/agent-tools.mjs.map +1 -1
- package/dist/auth.d.mts +20 -14
- package/dist/auth.mjs +1 -1
- package/dist/auth.mjs.map +1 -1
- package/dist/components/approvals/_generated/api.d.mts +4 -5
- package/dist/components/approvals/_generated/api.mjs.map +1 -1
- package/dist/components/approvals/_generated/component.d.mts +0 -2
- package/dist/components/approvals/_generated/dataModel.d.mts +1 -3
- package/dist/components/approvals/_generated/server.d.mts +0 -2
- package/dist/components/approvals/_generated/server.mjs.map +1 -1
- package/dist/components/approvals/audit.d.mts +0 -1
- package/dist/components/approvals/audit.mjs +1 -1
- package/dist/components/approvals/audit.mjs.map +1 -1
- package/dist/components/approvals/client.d.mts +0 -1
- package/dist/components/approvals/client.mjs +1 -1
- package/dist/components/approvals/client.mjs.map +1 -1
- package/dist/components/approvals/constants.d.mts +0 -1
- package/dist/components/approvals/constants.mjs.map +1 -1
- package/dist/components/approvals/convex.config.d.mts +0 -2
- package/dist/components/approvals/convex.config.mjs.map +1 -1
- package/dist/components/approvals/decisions.d.mts +1 -4
- package/dist/components/approvals/decisions.mjs +1 -1
- package/dist/components/approvals/decisions.mjs.map +1 -1
- package/dist/components/approvals/functions.d.mts +0 -1
- package/dist/components/approvals/functions.mjs.map +1 -1
- package/dist/components/approvals/health.d.mts +0 -1
- package/dist/components/approvals/health.mjs.map +1 -1
- package/dist/components/approvals/requests.d.mts +106 -123
- package/dist/components/approvals/requests.mjs +1 -1
- package/dist/components/approvals/requests.mjs.map +1 -1
- package/dist/components/approvals/schema.d.ts +106 -315
- package/dist/components/approvals/schema.js +1 -1
- package/dist/components/approvals/validators.d.mts +321 -393
- package/dist/components/approvals/validators.mjs +1 -1
- package/dist/components/approvals/validators.mjs.map +1 -1
- package/dist/components/approvals/workflow.d.mts +0 -1
- package/dist/components/approvals/workflow.mjs +1 -1
- package/dist/components/approvals/workflow.mjs.map +1 -1
- package/dist/components/approvals/workflow_steps.d.mts +1 -2
- package/dist/components/approvals/workflow_steps.mjs.map +1 -1
- package/dist/components/foundation/_generated/api.d.mts +3 -4
- package/dist/components/foundation/_generated/api.mjs.map +1 -1
- package/dist/components/foundation/_generated/component.d.mts +0 -2
- package/dist/components/foundation/_generated/dataModel.d.mts +1 -3
- package/dist/components/foundation/_generated/server.d.mts +0 -2
- package/dist/components/foundation/_generated/server.mjs.map +1 -1
- package/dist/components/foundation/client.d.mts +0 -1
- package/dist/components/foundation/client.mjs +1 -1
- package/dist/components/foundation/client.mjs.map +1 -1
- package/dist/components/foundation/convex.config.d.mts +0 -2
- package/dist/components/foundation/convex.config.mjs.map +1 -1
- package/dist/components/foundation/functions.d.mts +0 -1
- package/dist/components/foundation/functions.mjs.map +1 -1
- package/dist/components/foundation/modules/command/command.d.mts +0 -1
- package/dist/components/foundation/modules/command/command.mjs.map +1 -1
- package/dist/components/foundation/modules/command/lifecycle.d.mts +0 -2
- package/dist/components/foundation/modules/command/lifecycle.mjs.map +1 -1
- package/dist/components/foundation/modules/observability/observability.d.mts +0 -1
- package/dist/components/foundation/modules/observability/observability.mjs.map +1 -1
- package/dist/components/foundation/modules/query/query.d.mts +0 -1
- package/dist/components/foundation/modules/query/query.mjs.map +1 -1
- package/dist/components/foundation/operation.d.mts +2 -3
- package/dist/components/foundation/operation.mjs.map +1 -1
- package/dist/components/foundation/result.d.mts +0 -1
- package/dist/components/foundation/result.mjs.map +1 -1
- package/dist/components/foundation/schema.d.ts +0 -2
- package/dist/components/foundation/telemetry.d.mts +0 -1
- package/dist/components/foundation/telemetry.mjs +1 -1
- package/dist/components/foundation/telemetry.mjs.map +1 -1
- package/dist/contracts.d.mts +2 -2
- package/dist/contracts.mjs +1 -1
- package/dist/crud.d.mts +93 -97
- package/dist/crud.mjs +1 -1
- package/dist/crud.mjs.map +1 -1
- package/dist/effect.d.mts +2 -3
- package/dist/effect.mjs +1 -1
- package/dist/errors.d.mts +2 -4
- package/dist/errors.mjs +1 -1
- package/dist/errors.mjs.map +1 -1
- package/dist/filters.d.mts +1 -1
- package/dist/filters.mjs +1 -1
- package/dist/idempotency.mjs +1 -1
- package/dist/index.d.mts +10 -7
- package/dist/index.mjs +1 -1
- package/dist/json-schema.d.mts +40 -0
- package/dist/json-schema.mjs +2 -0
- package/dist/json-schema.mjs.map +1 -0
- package/dist/k/compile.d.mts +17 -0
- package/dist/k/compile.mjs +2 -0
- package/dist/k/compile.mjs.map +1 -0
- package/dist/k/dates.d.mts +23 -0
- package/dist/k/dates.mjs +2 -0
- package/dist/k/dates.mjs.map +1 -0
- package/dist/k/formats.d.mts +24 -0
- package/dist/k/formats.mjs +2 -0
- package/dist/k/formats.mjs.map +1 -0
- package/dist/k/index.d.mts +32 -0
- package/dist/k/index.mjs +2 -0
- package/dist/k/index.mjs.map +1 -0
- package/dist/k/issues.d.mts +31 -0
- package/dist/k/issues.mjs +2 -0
- package/dist/k/issues.mjs.map +1 -0
- package/dist/k/kinds.d.mts +81 -0
- package/dist/k/kinds.mjs +2 -0
- package/dist/k/kinds.mjs.map +1 -0
- package/dist/k/object.d.mts +43 -0
- package/dist/k/object.mjs +2 -0
- package/dist/k/object.mjs.map +1 -0
- package/dist/k/parse.d.mts +29 -0
- package/dist/k/parse.mjs +2 -0
- package/dist/k/parse.mjs.map +1 -0
- package/dist/k/schema.d.mts +100 -0
- package/dist/k/schema.mjs +2 -0
- package/dist/k/schema.mjs.map +1 -0
- package/dist/k/standard.d.mts +8 -0
- package/dist/k/standard.mjs +2 -0
- package/dist/k/standard.mjs.map +1 -0
- package/dist/k/types.d.mts +64 -0
- package/dist/k/types.mjs +1 -0
- package/dist/k.d.mts +8 -0
- package/dist/k.mjs +1 -0
- package/dist/middleware.d.mts +0 -2
- package/dist/middleware.mjs +1 -1
- package/dist/middleware.mjs.map +1 -1
- package/dist/modules/contracts/binding.d.mts +1 -2
- package/dist/modules/contracts/binding.mjs.map +1 -1
- package/dist/modules/contracts/contract.d.mts +0 -2
- package/dist/modules/contracts/contract.mjs.map +1 -1
- package/dist/modules/contracts/convex.d.mts +1 -3
- package/dist/modules/contracts/convex.mjs.map +1 -1
- package/dist/modules/contracts/domain.d.mts +1 -2
- package/dist/modules/contracts/domain.mjs.map +1 -1
- package/dist/modules/contracts/errors.d.mts +161 -2
- package/dist/modules/contracts/errors.mjs +1 -1
- package/dist/modules/contracts/errors.mjs.map +1 -1
- package/dist/modules/contracts/exposure.d.mts +1 -2
- package/dist/modules/contracts/exposure.mjs.map +1 -1
- package/dist/modules/contracts/idempotency.d.mts +1 -2
- package/dist/modules/contracts/idempotency.mjs +1 -1
- package/dist/modules/contracts/idempotency.mjs.map +1 -1
- package/dist/modules/contracts/lazy.d.mts +0 -2
- package/dist/modules/contracts/lazy.mjs.map +1 -1
- package/dist/modules/contracts/standard.d.mts +7 -5
- package/dist/modules/contracts/standard.mjs +1 -1
- package/dist/modules/contracts/standard.mjs.map +1 -1
- package/dist/modules/contracts/workflow.d.mts +1 -2
- package/dist/modules/contracts/workflow.mjs.map +1 -1
- package/dist/modules/effect/action.d.mts +6 -7
- package/dist/modules/effect/action.mjs +1 -1
- package/dist/modules/effect/action.mjs.map +1 -1
- package/dist/modules/effect/agent-tools.mjs +1 -1
- package/dist/modules/effect/api-runtime.d.mts +1 -2
- package/dist/modules/effect/api-runtime.mjs +1 -1
- package/dist/modules/effect/api-runtime.mjs.map +1 -1
- package/dist/modules/effect/api.d.mts +41 -15
- package/dist/modules/effect/api.mjs +1 -1
- package/dist/modules/effect/api.mjs.map +1 -1
- package/dist/modules/effect/auth.d.mts +5 -6
- package/dist/modules/effect/auth.mjs +1 -1
- package/dist/modules/effect/auth.mjs.map +1 -1
- package/dist/modules/effect/client.d.mts +7 -8
- package/dist/modules/effect/client.mjs +1 -1
- package/dist/modules/effect/command.d.mts +7 -5
- package/dist/modules/effect/command.mjs +1 -1
- package/dist/modules/effect/command.mjs.map +1 -1
- package/dist/modules/effect/crud.d.mts +272 -206
- package/dist/modules/effect/crud.mjs +1 -1
- package/dist/modules/effect/crud.mjs.map +1 -1
- package/dist/modules/effect/domain.d.mts +5 -6
- package/dist/modules/effect/domain.mjs.map +1 -1
- package/dist/modules/effect/errors.d.mts +4 -2
- package/dist/modules/effect/errors.mjs +1 -1
- package/dist/modules/effect/errors.mjs.map +1 -1
- package/dist/modules/effect/failure-audit.d.mts +2 -2
- package/dist/modules/effect/failure-audit.mjs +1 -1
- package/dist/modules/effect/failure-audit.mjs.map +1 -1
- package/dist/modules/effect/failures.d.mts +1 -2
- package/dist/modules/effect/failures.mjs.map +1 -1
- package/dist/modules/effect/foundation.d.mts +0 -2
- package/dist/modules/effect/foundation.mjs.map +1 -1
- package/dist/modules/effect/idempotency.d.mts +2 -3
- package/dist/modules/effect/idempotency.mjs +1 -1
- package/dist/modules/effect/idempotency.mjs.map +1 -1
- package/dist/modules/effect/input.d.mts +10 -0
- package/dist/modules/effect/input.mjs +2 -0
- package/dist/modules/effect/input.mjs.map +1 -0
- package/dist/modules/effect/normalize.d.mts +0 -2
- package/dist/modules/effect/normalize.mjs.map +1 -1
- package/dist/modules/effect/operation.d.mts +2 -3
- package/dist/modules/effect/operation.mjs.map +1 -1
- package/dist/modules/effect/query.d.mts +6 -4
- package/dist/modules/effect/query.mjs +1 -1
- package/dist/modules/effect/query.mjs.map +1 -1
- package/dist/modules/effect/schema.d.mts +0 -2
- package/dist/modules/effect/schema.mjs.map +1 -1
- package/dist/modules/effect/scope.d.mts +0 -2
- package/dist/modules/effect/scope.mjs.map +1 -1
- package/dist/modules/effect/workflow.d.mts +4 -5
- package/dist/modules/effect/workflow.mjs +1 -1
- package/dist/modules/effect/workflow.mjs.map +1 -1
- package/dist/modules/foundation/foundation.d.mts +4 -5
- package/dist/modules/foundation/foundation.mjs +1 -1
- package/dist/modules/foundation/foundation.mjs.map +1 -1
- package/dist/modules/foundation/operation.d.mts +2 -3
- package/dist/modules/foundation/operation.mjs.map +1 -1
- package/dist/namespace.d.mts +104 -0
- package/dist/namespace.mjs +2 -0
- package/dist/namespace.mjs.map +1 -0
- package/dist/oxlint/architecture.d.mts +0 -2
- package/dist/oxlint/architecture.mjs +1 -1
- package/dist/oxlint/architecture.mjs.map +1 -1
- package/dist/oxlint/ast.d.mts +16 -8
- package/dist/oxlint/ast.mjs +1 -1
- package/dist/oxlint/ast.mjs.map +1 -1
- package/dist/oxlint/components.d.mts +0 -2
- package/dist/oxlint/components.mjs.map +1 -1
- package/dist/oxlint/ownership.d.mts +0 -2
- package/dist/oxlint/ownership.mjs +1 -1
- package/dist/oxlint/ownership.mjs.map +1 -1
- package/dist/oxlint/reserved-files.d.mts +0 -2
- package/dist/oxlint/reserved-files.mjs +1 -1
- package/dist/oxlint/reserved-files.mjs.map +1 -1
- package/dist/oxlint.d.mts +0 -2
- package/dist/oxlint.mjs +1 -1
- package/dist/oxlint.mjs.map +1 -1
- package/dist/querying/cursors.d.mts +27 -9
- package/dist/querying/cursors.mjs +1 -1
- package/dist/querying/cursors.mjs.map +1 -1
- package/dist/querying/execution.d.mts +6 -7
- package/dist/querying/execution.mjs +1 -1
- package/dist/querying/execution.mjs.map +1 -1
- package/dist/querying/failures.d.mts +0 -2
- package/dist/querying/failures.mjs +1 -1
- package/dist/querying/failures.mjs.map +1 -1
- package/dist/querying/filter-boundary.d.mts +18 -9
- package/dist/querying/filter-boundary.mjs +1 -1
- package/dist/querying/filter-boundary.mjs.map +1 -1
- package/dist/querying/filters.d.mts +71 -35
- package/dist/querying/filters.mjs +1 -1
- package/dist/querying/filters.mjs.map +1 -1
- package/dist/querying/planner.d.mts +16 -20
- package/dist/querying/planner.mjs +1 -1
- package/dist/querying/planner.mjs.map +1 -1
- package/dist/querying/relationships.d.mts +6 -6
- package/dist/querying/relationships.mjs +1 -1
- package/dist/querying/relationships.mjs.map +1 -1
- package/dist/querying/search.d.mts +12 -12
- package/dist/querying/search.mjs +1 -1
- package/dist/querying/search.mjs.map +1 -1
- package/dist/querying/security.d.mts +2 -3
- package/dist/querying/security.mjs.map +1 -1
- package/dist/querying/shared/ast.d.mts +0 -2
- package/dist/querying/shared/ast.mjs.map +1 -1
- package/dist/querying/shared/contract.d.mts +17 -23
- package/dist/querying/shared/contract.mjs +1 -1
- package/dist/querying/shared/contract.mjs.map +1 -1
- package/dist/querying/shared/evaluate.d.mts +0 -2
- package/dist/querying/shared/evaluate.mjs.map +1 -1
- package/dist/querying/shared/filters.d.mts +47 -29
- package/dist/querying/shared/filters.mjs +1 -1
- package/dist/querying/shared/filters.mjs.map +1 -1
- package/dist/querying/shared/native-json.d.mts +7 -0
- package/dist/querying/shared/native-json.mjs +2 -0
- package/dist/querying/shared/native-json.mjs.map +1 -0
- package/dist/querying/shared/page.d.mts +19 -22
- package/dist/querying/shared/page.mjs +1 -1
- package/dist/querying/shared/page.mjs.map +1 -1
- package/dist/querying.d.mts +6 -9
- package/dist/querying.mjs +1 -1
- package/dist/querying.mjs.map +1 -1
- package/dist/react/failures.d.mts +0 -2
- package/dist/react/failures.mjs.map +1 -1
- package/dist/react/optimistic.d.mts +2 -3
- package/dist/react/optimistic.mjs.map +1 -1
- package/dist/react/pagination-state.d.mts +1 -2
- package/dist/react/pagination-state.mjs.map +1 -1
- package/dist/react/use-command.d.mts +0 -2
- package/dist/react/use-command.mjs.map +1 -1
- package/dist/react/use-paginated-list.d.mts +1 -3
- package/dist/react/use-paginated-list.mjs +1 -1
- package/dist/react/use-paginated-list.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.mjs +1 -1
- package/dist/registration.d.mts +65 -0
- package/dist/registration.mjs +2 -0
- package/dist/registration.mjs.map +1 -0
- package/dist/relations-public.d.mts +2 -2
- package/dist/relations-public.mjs +1 -1
- package/dist/relations.d.mts +55 -46
- package/dist/relations.mjs +1 -1
- package/dist/relations.mjs.map +1 -1
- package/dist/state-machine.d.mts +0 -2
- package/dist/state-machine.mjs.map +1 -1
- package/dist/table.d.mts +222 -0
- package/dist/table.mjs +2 -0
- package/dist/table.mjs.map +1 -0
- package/dist/tenancy.d.mts +0 -2
- package/dist/tenancy.mjs.map +1 -1
- package/dist/triggers.d.mts +2 -4
- package/dist/triggers.mjs +1 -1
- package/dist/triggers.mjs.map +1 -1
- package/dist/webhooks.d.mts +9 -9
- package/dist/webhooks.mjs +1 -1
- package/dist/webhooks.mjs.map +1 -1
- package/dist/workflow.mjs +1 -1
- package/dist/zod.d.mts +30 -0
- package/dist/zod.mjs +2 -0
- package/dist/zod.mjs.map +1 -0
- package/package.json +51 -29
- package/dist/modules/effect/api-zod.d.mts +0 -34
- package/dist/modules/effect/api-zod.mjs +0 -2
- package/dist/modules/effect/api-zod.mjs.map +0 -1
- package/dist/querying/schema-snapshot.d.mts +0 -49
- package/dist/querying/schema-snapshot.mjs +0 -2
- package/dist/querying/schema-snapshot.mjs.map +0 -1
- package/dist/zod-convex.d.mts +0 -10
- package/dist/zod-convex.mjs +0 -2
- package/dist/zod-convex.mjs.map +0 -1
- package/dist/zod-registration.d.mts +0 -15
- package/dist/zod-registration.mjs +0 -2
- package/dist/zod-registration.mjs.map +0 -1
- package/dist/zod-table.d.mts +0 -351
- package/dist/zod-table.mjs +0 -2
- package/dist/zod-table.mjs.map +0 -1
|
@@ -1,34 +1,50 @@
|
|
|
1
|
-
import { ContractSchema, LegacyParser, StandardSchema } from "../contracts/contract.mjs";
|
|
2
|
-
import { Observability } from "../../components/foundation/modules/observability/observability.mjs";
|
|
3
1
|
import { RequestScope } from "./scope.mjs";
|
|
2
|
+
import { KNullable, KOptional } from "../../k/schema.mjs";
|
|
3
|
+
import { KArray, KBoolean, KEnum, KLiteral, KNumber, KString } from "../../k/kinds.mjs";
|
|
4
4
|
import { CallbackError, CallbackRequirements, CheckedEffectDefinition, EffectMiddlewareInput, EffectOperationArgument, EffectOperationError, EffectOperationRequirements, EffectOperationResult, EffectValue, UnwrappedDefaultError, UnwrappedDefaultRequirements } from "./operation.mjs";
|
|
5
|
+
import "../../k.mjs";
|
|
6
|
+
import { Flat, KAnyDiffers, KType } from "../../k/types.mjs";
|
|
7
|
+
import { KObject } from "../../k/object.mjs";
|
|
5
8
|
import { EffectFoundation, EffectFoundationOptions } from "./foundation.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
9
|
+
import { Observability } from "../../components/foundation/modules/observability/observability.mjs";
|
|
10
|
+
import { ContractSchema, LegacyParser, StandardSchema } from "../contracts/contract.mjs";
|
|
8
11
|
import { GenericId } from "convex/values";
|
|
12
|
+
import { PaginationOptions, PaginationResult } from "convex/server";
|
|
9
13
|
import { Effect } from "effect";
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Table masks and branded IDs come from the same kit-owned table boundary: a `kTable`, `createTable`
|
|
16
|
+
* or `tenantTable` result. Every mask is a strict `k` object, so unknown fields are rejected.
|
|
17
|
+
*/
|
|
12
18
|
export type EffectCrudTable = {
|
|
13
|
-
tableName: string;
|
|
14
|
-
commandInput:
|
|
15
|
-
storage:
|
|
16
|
-
publicDto:
|
|
17
|
-
tools: {
|
|
18
|
-
id:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
readonly tableName: string;
|
|
20
|
+
readonly commandInput: CrudSchema;
|
|
21
|
+
readonly storage: CrudSchema;
|
|
22
|
+
readonly publicDto: CrudSchema;
|
|
23
|
+
readonly tools: {
|
|
24
|
+
readonly id: CrudSchema & {
|
|
25
|
+
readonly _output: {
|
|
26
|
+
readonly id: GenericId<string>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly update: CrudSchema & {
|
|
30
|
+
readonly _output: {
|
|
31
|
+
readonly id: GenericId<string>;
|
|
32
|
+
readonly data: object;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
25
35
|
};
|
|
26
36
|
};
|
|
27
|
-
|
|
28
|
-
type
|
|
37
|
+
/** A `k` schema seen as the contract it already is: a Standard Schema and a parser. */
|
|
38
|
+
type CrudSchema = KType & StandardSchema<unknown, unknown> & LegacyParser;
|
|
39
|
+
/** Input (`k.input`) and output (`k.infer`) of one boundary schema. */
|
|
40
|
+
type In<Schema extends CrudSchema> = Schema['validator']['type'];
|
|
41
|
+
type Input<Table extends EffectCrudTable> = Table['commandInput']['_output'];
|
|
42
|
+
type Storage<Table extends EffectCrudTable> = In<Table['storage']>;
|
|
29
43
|
type Id<Table extends EffectCrudTable> = GenericId<Table['tableName']>;
|
|
30
|
-
type Update<Table extends EffectCrudTable> =
|
|
31
|
-
type IdInput<Table extends EffectCrudTable> =
|
|
44
|
+
type Update<Table extends EffectCrudTable> = Table['tools']['update']['_output'];
|
|
45
|
+
type IdInput<Table extends EffectCrudTable> = Table['tools']['id']['_output'];
|
|
46
|
+
type PublicInput<Table extends EffectCrudTable> = In<Table['publicDto']>;
|
|
47
|
+
type PublicOutput<Table extends EffectCrudTable> = Table['publicDto']['_output'];
|
|
32
48
|
type IdContext<Table extends EffectCrudTable> = {
|
|
33
49
|
db: {
|
|
34
50
|
normalizeId: (table: Table['tableName'], id: string) => Id<Table> | null;
|
|
@@ -123,7 +139,7 @@ export type EffectCrudConfig<Options extends EffectFoundationOptions, Host, Cont
|
|
|
123
139
|
checkId: (context: EffectValue<ContextReturned>, id: string) => CheckId;
|
|
124
140
|
}) & StorageOverrides<Table>;
|
|
125
141
|
/** Generate operations through the Foundation's bound helpers; no runner or policy lives here. */
|
|
126
|
-
export declare function createEffectCrud<const Options extends EffectFoundationOptions, Host extends PolicyHost<Options>, ContextReturned, const Table extends EffectCrudTable, Actor extends Supported<string>, Enrich extends Supported<Partial<Storage<Table>>> = never, Insert extends Supported<Id<Table>> = never, Patch extends Supported<void> = never, Get extends Supported<Storage<Table> | null> = never, List extends Supported<EffectCrudPage<Storage<Table>>> = never, Project extends Supported<
|
|
142
|
+
export declare function createEffectCrud<const Options extends EffectFoundationOptions, Host extends PolicyHost<Options>, ContextReturned, const Table extends EffectCrudTable, Actor extends Supported<string>, Enrich extends Supported<Partial<Storage<Table>>> = never, Insert extends Supported<Id<Table>> = never, Patch extends Supported<void> = never, Get extends Supported<Storage<Table> | null> = never, List extends Supported<EffectCrudPage<Storage<Table>>> = never, Project extends Supported<PublicInput<Table>> = never, Policy extends Supported<void> = never, CreateGuard extends Supported<void> = never, UpdateGuard extends Supported<void> = never, ArchiveGuard extends Supported<void> = never, GetGuard extends Supported<void> = never, ListGuard extends Supported<void> = never, CreateOverride extends Supported<{
|
|
127
143
|
id: Id<Table>;
|
|
128
144
|
}> = never, UpdateOverride extends Supported<{
|
|
129
145
|
ok: true;
|
|
@@ -131,17 +147,17 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
131
147
|
ok: true;
|
|
132
148
|
}> = never, CheckId extends Supported<boolean> = never, const Configuration extends object = object>(config: Configuration & ProtectedOverrides<Configuration> & EffectCrudConfig<Options, Host, ContextReturned, Table, Actor, Enrich, Insert, Patch, Get, List, Project, Policy, CreateGuard, UpdateGuard, ArchiveGuard, GetGuard, ListGuard, CreateOverride, UpdateOverride, ArchiveOverride, CheckId>): {
|
|
133
149
|
commands: CrudExecutor<Host, NamedOperation<`${Table["tableName"]}.create`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
134
|
-
input: StandardSchema<
|
|
150
|
+
input: StandardSchema<In<Table["commandInput"]>, Table["commandInput"]["_output"]> & LegacyParser<Table["commandInput"]["_output"]>;
|
|
135
151
|
result: StandardSchema<{
|
|
136
|
-
id:
|
|
152
|
+
id: Id<Table>;
|
|
137
153
|
}, {
|
|
138
154
|
id: Id<Table>;
|
|
139
155
|
}> & LegacyParser<{
|
|
140
156
|
id: Id<Table>;
|
|
141
157
|
}>;
|
|
142
|
-
handler: (input:
|
|
158
|
+
handler: (input: Table["commandInput"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Chosen<CreateOverride, Effect.Effect<{
|
|
143
159
|
id: EffectValue<Insert> | Id<Table>;
|
|
144
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
160
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>;
|
|
145
161
|
classification?: string;
|
|
146
162
|
permission?: string;
|
|
147
163
|
metadata?: Record<never, never> | undefined;
|
|
@@ -153,10 +169,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
153
169
|
id: Id<Table>;
|
|
154
170
|
}) => unknown;
|
|
155
171
|
} | undefined;
|
|
156
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
157
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
172
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["commandInput"]["_output"]) => CreateGuard) | undefined;
|
|
173
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["commandInput"]["_output"]) => never) | undefined;
|
|
158
174
|
audit?: ((resolution: {
|
|
159
|
-
command:
|
|
175
|
+
command: Table["commandInput"]["_output"];
|
|
160
176
|
result: {
|
|
161
177
|
id: Id<Table>;
|
|
162
178
|
};
|
|
@@ -169,18 +185,18 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
169
185
|
};
|
|
170
186
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
171
187
|
} & {
|
|
172
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
173
|
-
id:
|
|
188
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["commandInput"]["_output"], {
|
|
189
|
+
id: Id<Table>;
|
|
174
190
|
}, Record<never, never>, CallbackError<CreateGuard> | CallbackError<Policy> | CallbackError<Chosen<CreateOverride, Effect.Effect<{
|
|
175
191
|
id: EffectValue<Insert> | Id<Table>;
|
|
176
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
192
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>>, CallbackRequirements<CreateGuard> | CallbackRequirements<Policy> | CallbackRequirements<Chosen<CreateOverride, Effect.Effect<{
|
|
177
193
|
id: EffectValue<Insert> | Id<Table>;
|
|
178
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
194
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>>>) => never) | undefined;
|
|
179
195
|
} & {
|
|
180
196
|
classification: string;
|
|
181
197
|
} & {
|
|
182
198
|
audit: (resolution: {
|
|
183
|
-
command:
|
|
199
|
+
command: Table["commandInput"]["_output"];
|
|
184
200
|
result: {
|
|
185
201
|
id: Id<Table>;
|
|
186
202
|
};
|
|
@@ -193,11 +209,11 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
193
209
|
};
|
|
194
210
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
195
211
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.update`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
196
|
-
input: StandardSchema<
|
|
197
|
-
result:
|
|
198
|
-
ok:
|
|
199
|
-
}
|
|
200
|
-
handler: (input:
|
|
212
|
+
input: StandardSchema<In<Table["tools"]["update"]>, Table["tools"]["update"]["_output"]> & LegacyParser<Table["tools"]["update"]["_output"]>;
|
|
213
|
+
result: KObject<{
|
|
214
|
+
ok: KLiteral<true>;
|
|
215
|
+
}>;
|
|
216
|
+
handler: (input: Table["tools"]["update"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<EffectValue<Chosen<UpdateOverride, Effect.Effect<{
|
|
201
217
|
ok: true;
|
|
202
218
|
}, CallbackError<Patch>, CallbackRequirements<Patch>>, RequiredOverride<Configuration, "update">>>, CallbackError<CheckId> | CallbackError<Chosen<UpdateOverride, Effect.Effect<{
|
|
203
219
|
ok: true;
|
|
@@ -215,10 +231,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
215
231
|
ok: true;
|
|
216
232
|
}) => unknown;
|
|
217
233
|
} | undefined;
|
|
218
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
219
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
234
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["update"]["_output"]) => UpdateGuard) | undefined;
|
|
235
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["update"]["_output"]) => never) | undefined;
|
|
220
236
|
audit?: ((resolution: {
|
|
221
|
-
command:
|
|
237
|
+
command: Table["tools"]["update"]["_output"];
|
|
222
238
|
result: {
|
|
223
239
|
ok: true;
|
|
224
240
|
};
|
|
@@ -231,7 +247,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
231
247
|
};
|
|
232
248
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
233
249
|
} & {
|
|
234
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
250
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["update"]["_output"], {
|
|
235
251
|
ok: true;
|
|
236
252
|
}, Record<never, never>, CallbackError<CheckId> | CallbackError<Policy> | CallbackError<UpdateGuard> | CallbackError<Chosen<UpdateOverride, Effect.Effect<{
|
|
237
253
|
ok: true;
|
|
@@ -246,7 +262,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
246
262
|
classification: string;
|
|
247
263
|
} & {
|
|
248
264
|
audit: (resolution: {
|
|
249
|
-
command:
|
|
265
|
+
command: Table["tools"]["update"]["_output"];
|
|
250
266
|
result: {
|
|
251
267
|
ok: true;
|
|
252
268
|
};
|
|
@@ -259,11 +275,11 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
259
275
|
};
|
|
260
276
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
261
277
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.archive`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
262
|
-
input: StandardSchema<
|
|
263
|
-
result:
|
|
264
|
-
ok:
|
|
265
|
-
}
|
|
266
|
-
handler: (input:
|
|
278
|
+
input: StandardSchema<In<Table["tools"]["id"]>, Table["tools"]["id"]["_output"]> & LegacyParser<Table["tools"]["id"]["_output"]>;
|
|
279
|
+
result: KObject<{
|
|
280
|
+
ok: KLiteral<true>;
|
|
281
|
+
}>;
|
|
282
|
+
handler: (input: Table["tools"]["id"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<EffectValue<Chosen<ArchiveOverride, Effect.Effect<{
|
|
267
283
|
ok: true;
|
|
268
284
|
}, CallbackError<Patch>, CallbackRequirements<Patch>>, RequiredOverride<Configuration, "archive">>>, CallbackError<CheckId> | CallbackError<Chosen<ArchiveOverride, Effect.Effect<{
|
|
269
285
|
ok: true;
|
|
@@ -281,10 +297,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
281
297
|
ok: true;
|
|
282
298
|
}) => unknown;
|
|
283
299
|
} | undefined;
|
|
284
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
285
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
300
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["id"]["_output"]) => ArchiveGuard) | undefined;
|
|
301
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["id"]["_output"]) => never) | undefined;
|
|
286
302
|
audit?: ((resolution: {
|
|
287
|
-
command:
|
|
303
|
+
command: Table["tools"]["id"]["_output"];
|
|
288
304
|
result: {
|
|
289
305
|
ok: true;
|
|
290
306
|
};
|
|
@@ -297,7 +313,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
297
313
|
};
|
|
298
314
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
299
315
|
} & {
|
|
300
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
316
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["id"]["_output"], {
|
|
301
317
|
ok: true;
|
|
302
318
|
}, Record<never, never>, CallbackError<ArchiveGuard> | CallbackError<CheckId> | CallbackError<Policy> | CallbackError<Chosen<ArchiveOverride, Effect.Effect<{
|
|
303
319
|
ok: true;
|
|
@@ -312,7 +328,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
312
328
|
classification: string;
|
|
313
329
|
} & {
|
|
314
330
|
audit: (resolution: {
|
|
315
|
-
command:
|
|
331
|
+
command: Table["tools"]["id"]["_output"];
|
|
316
332
|
result: {
|
|
317
333
|
ok: true;
|
|
318
334
|
};
|
|
@@ -326,9 +342,9 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
326
342
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
327
343
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>>, ((host: Host) => ContextReturned) | Options[keyof Options], Policy>;
|
|
328
344
|
queries: CrudExecutor<Host, NamedOperation<`${Table["tableName"]}.get`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
329
|
-
input: StandardSchema<
|
|
330
|
-
result: StandardSchema<
|
|
331
|
-
handler: (input:
|
|
345
|
+
input: StandardSchema<In<Table["tools"]["id"]>, Table["tools"]["id"]["_output"]> & LegacyParser<Table["tools"]["id"]["_output"]>;
|
|
346
|
+
result: StandardSchema<PublicInput<Table> | null, PublicOutput<Table> | null> & LegacyParser<PublicOutput<Table> | null>;
|
|
347
|
+
handler: (input: Table["tools"]["id"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<PublicInput<Table> | null, CallbackError<CheckId> | CallbackError<Get> | CallbackError<Project>, CallbackRequirements<CheckId> | CallbackRequirements<Get> | CallbackRequirements<Project>>;
|
|
332
348
|
classification?: string;
|
|
333
349
|
permission?: string;
|
|
334
350
|
metadata?: Record<never, never> | undefined;
|
|
@@ -336,61 +352,52 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
336
352
|
replayResult?: undefined;
|
|
337
353
|
wire?: {
|
|
338
354
|
schema: ContractSchema;
|
|
339
|
-
project: (value:
|
|
355
|
+
project: (value: PublicOutput<Table> | null) => unknown;
|
|
340
356
|
} | undefined;
|
|
341
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
342
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
357
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["id"]["_output"]) => GetGuard) | undefined;
|
|
358
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["id"]["_output"]) => never) | undefined;
|
|
343
359
|
audit?: ((resolution: {
|
|
344
|
-
command:
|
|
345
|
-
result:
|
|
360
|
+
command: Table["tools"]["id"]["_output"];
|
|
361
|
+
result: PublicOutput<Table> | null;
|
|
346
362
|
}, context: EffectValue<ContextReturned>, scope: RequestScope | undefined) => never) | undefined;
|
|
347
363
|
} & {
|
|
348
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
364
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["id"]["_output"], PublicInput<Table> | null, Record<never, never>, CallbackError<CheckId> | CallbackError<Get> | CallbackError<GetGuard> | CallbackError<Policy> | CallbackError<Project> | CallbackError<PublicInput<Table>>, CallbackRequirements<CheckId> | CallbackRequirements<Get> | CallbackRequirements<GetGuard> | CallbackRequirements<Policy> | CallbackRequirements<Project> | CallbackRequirements<PublicInput<Table>>>) => never) | undefined;
|
|
349
365
|
} & {
|
|
350
366
|
prepare?: never;
|
|
351
367
|
audit?: never;
|
|
352
368
|
aggregates?: never;
|
|
353
369
|
replayResult?: never;
|
|
354
370
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.list`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
355
|
-
input:
|
|
356
|
-
numItems:
|
|
357
|
-
cursor:
|
|
358
|
-
endCursor:
|
|
359
|
-
id:
|
|
360
|
-
maximumRowsRead:
|
|
361
|
-
maximumBytesRead:
|
|
362
|
-
}
|
|
363
|
-
result:
|
|
364
|
-
page:
|
|
365
|
-
paginationMode:
|
|
366
|
-
isDone:
|
|
367
|
-
continueCursor:
|
|
368
|
-
splitCursor:
|
|
369
|
-
pageStatus:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}>>>;
|
|
373
|
-
completeness: z.ZodOptional<z.ZodEnum<{
|
|
374
|
-
"byte-budget": "byte-budget";
|
|
375
|
-
complete: "complete";
|
|
376
|
-
"native-limit": "native-limit";
|
|
377
|
-
"result-cap": "result-cap";
|
|
378
|
-
"row-budget": "row-budget";
|
|
379
|
-
}>>;
|
|
380
|
-
}, z.core.$strip>;
|
|
371
|
+
input: KObject<{
|
|
372
|
+
numItems: KNumber;
|
|
373
|
+
cursor: KNullable<KString>;
|
|
374
|
+
endCursor: KOptional<KNullable<KString>>;
|
|
375
|
+
id: KOptional<KNumber>;
|
|
376
|
+
maximumRowsRead: KOptional<KNumber>;
|
|
377
|
+
maximumBytesRead: KOptional<KNumber>;
|
|
378
|
+
}>;
|
|
379
|
+
result: KObject<{
|
|
380
|
+
page: KArray<Table["publicDto"]>;
|
|
381
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
382
|
+
isDone: KBoolean;
|
|
383
|
+
continueCursor: KString;
|
|
384
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
385
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
386
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
387
|
+
}>;
|
|
381
388
|
handler: (input: {
|
|
382
|
-
numItems: number;
|
|
383
389
|
cursor: string | null;
|
|
384
390
|
endCursor?: string | null | undefined;
|
|
385
391
|
id?: number | undefined;
|
|
386
|
-
maximumRowsRead?: number | undefined;
|
|
387
392
|
maximumBytesRead?: number | undefined;
|
|
393
|
+
maximumRowsRead?: number | undefined;
|
|
394
|
+
numItems: number;
|
|
388
395
|
}, context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<{
|
|
389
396
|
isDone: boolean;
|
|
390
397
|
continueCursor: import("convex/server").Cursor;
|
|
391
398
|
splitCursor?: import("convex/server").Cursor | null;
|
|
392
399
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
393
|
-
page:
|
|
400
|
+
page: PublicInput<Table>[];
|
|
394
401
|
}, CallbackError<List> | CallbackError<Project>, CallbackRequirements<List> | CallbackRequirements<Project>>;
|
|
395
402
|
classification?: string;
|
|
396
403
|
permission?: string;
|
|
@@ -399,67 +406,101 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
399
406
|
replayResult?: undefined;
|
|
400
407
|
wire?: {
|
|
401
408
|
schema: ContractSchema;
|
|
402
|
-
project: (value: {
|
|
403
|
-
page:
|
|
409
|
+
project: (value: KAnyDiffers<{
|
|
410
|
+
page: KArray<Table["publicDto"]>;
|
|
411
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
412
|
+
isDone: KBoolean;
|
|
413
|
+
continueCursor: KString;
|
|
414
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
415
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
416
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
417
|
+
}> extends true ? Flat<{
|
|
404
418
|
paginationMode?: "native-search" | undefined;
|
|
405
|
-
isDone: boolean;
|
|
406
|
-
continueCursor: string;
|
|
407
419
|
splitCursor?: string | null | undefined;
|
|
408
420
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
409
421
|
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
422
|
+
} & {
|
|
423
|
+
page: Table["publicDto"]["_output"][];
|
|
424
|
+
isDone: boolean;
|
|
425
|
+
continueCursor: string;
|
|
426
|
+
}> : {
|
|
427
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
428
|
+
continueCursor: string;
|
|
429
|
+
isDone: boolean;
|
|
430
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
431
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
432
|
+
paginationMode?: "native-search" | undefined;
|
|
433
|
+
splitCursor?: string | null | undefined;
|
|
410
434
|
}) => unknown;
|
|
411
435
|
} | undefined;
|
|
412
436
|
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: {
|
|
413
|
-
numItems: number;
|
|
414
437
|
cursor: string | null;
|
|
415
438
|
endCursor?: string | null | undefined;
|
|
416
439
|
id?: number | undefined;
|
|
417
|
-
maximumRowsRead?: number | undefined;
|
|
418
440
|
maximumBytesRead?: number | undefined;
|
|
441
|
+
maximumRowsRead?: number | undefined;
|
|
442
|
+
numItems: number;
|
|
419
443
|
}) => ListGuard) | undefined;
|
|
420
444
|
prepare?: ((context: EffectValue<ContextReturned>, input: {
|
|
421
|
-
numItems: number;
|
|
422
445
|
cursor: string | null;
|
|
423
446
|
endCursor?: string | null | undefined;
|
|
424
447
|
id?: number | undefined;
|
|
425
|
-
maximumRowsRead?: number | undefined;
|
|
426
448
|
maximumBytesRead?: number | undefined;
|
|
449
|
+
maximumRowsRead?: number | undefined;
|
|
450
|
+
numItems: number;
|
|
427
451
|
}) => never) | undefined;
|
|
428
452
|
audit?: ((resolution: {
|
|
429
453
|
command: {
|
|
430
|
-
numItems: number;
|
|
431
454
|
cursor: string | null;
|
|
432
455
|
endCursor?: string | null | undefined;
|
|
433
456
|
id?: number | undefined;
|
|
434
|
-
maximumRowsRead?: number | undefined;
|
|
435
457
|
maximumBytesRead?: number | undefined;
|
|
458
|
+
maximumRowsRead?: number | undefined;
|
|
459
|
+
numItems: number;
|
|
436
460
|
};
|
|
437
|
-
result: {
|
|
438
|
-
page:
|
|
461
|
+
result: KAnyDiffers<{
|
|
462
|
+
page: KArray<Table["publicDto"]>;
|
|
463
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
464
|
+
isDone: KBoolean;
|
|
465
|
+
continueCursor: KString;
|
|
466
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
467
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
468
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
469
|
+
}> extends true ? Flat<{
|
|
439
470
|
paginationMode?: "native-search" | undefined;
|
|
440
|
-
isDone: boolean;
|
|
441
|
-
continueCursor: string;
|
|
442
471
|
splitCursor?: string | null | undefined;
|
|
443
472
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
444
473
|
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
474
|
+
} & {
|
|
475
|
+
page: Table["publicDto"]["_output"][];
|
|
476
|
+
isDone: boolean;
|
|
477
|
+
continueCursor: string;
|
|
478
|
+
}> : {
|
|
479
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
480
|
+
continueCursor: string;
|
|
481
|
+
isDone: boolean;
|
|
482
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
483
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
484
|
+
paginationMode?: "native-search" | undefined;
|
|
485
|
+
splitCursor?: string | null | undefined;
|
|
445
486
|
};
|
|
446
487
|
}, context: EffectValue<ContextReturned>, scope: RequestScope | undefined) => never) | undefined;
|
|
447
488
|
} & {
|
|
448
489
|
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, {
|
|
449
|
-
numItems: number;
|
|
450
490
|
cursor: string | null;
|
|
451
491
|
endCursor?: string | null | undefined;
|
|
452
492
|
id?: number | undefined;
|
|
453
|
-
maximumRowsRead?: number | undefined;
|
|
454
493
|
maximumBytesRead?: number | undefined;
|
|
494
|
+
maximumRowsRead?: number | undefined;
|
|
495
|
+
numItems: number;
|
|
455
496
|
}, {
|
|
456
|
-
|
|
457
|
-
paginationMode?: "native-search" | undefined;
|
|
458
|
-
isDone: boolean;
|
|
497
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
459
498
|
continueCursor: string;
|
|
460
|
-
|
|
499
|
+
isDone: boolean;
|
|
500
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
461
501
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
462
|
-
|
|
502
|
+
paginationMode?: "native-search" | undefined;
|
|
503
|
+
splitCursor?: string | null | undefined;
|
|
463
504
|
}, Record<never, never>, CallbackError<List> | CallbackError<ListGuard> | CallbackError<Policy> | CallbackError<Project>, CallbackRequirements<List> | CallbackRequirements<ListGuard> | CallbackRequirements<Policy> | CallbackRequirements<Project>>) => never) | undefined;
|
|
464
505
|
} & {
|
|
465
506
|
prepare?: never;
|
|
@@ -470,17 +511,17 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
470
511
|
observability: Observability;
|
|
471
512
|
}>>, Policy>;
|
|
472
513
|
operations: NamedOperation<`${Table["tableName"]}.create`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
473
|
-
input: StandardSchema<
|
|
514
|
+
input: StandardSchema<In<Table["commandInput"]>, Table["commandInput"]["_output"]> & LegacyParser<Table["commandInput"]["_output"]>;
|
|
474
515
|
result: StandardSchema<{
|
|
475
|
-
id:
|
|
516
|
+
id: Id<Table>;
|
|
476
517
|
}, {
|
|
477
518
|
id: Id<Table>;
|
|
478
519
|
}> & LegacyParser<{
|
|
479
520
|
id: Id<Table>;
|
|
480
521
|
}>;
|
|
481
|
-
handler: (input:
|
|
522
|
+
handler: (input: Table["commandInput"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Chosen<CreateOverride, Effect.Effect<{
|
|
482
523
|
id: EffectValue<Insert> | Id<Table>;
|
|
483
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
524
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>;
|
|
484
525
|
classification?: string;
|
|
485
526
|
permission?: string;
|
|
486
527
|
metadata?: Record<never, never> | undefined;
|
|
@@ -492,10 +533,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
492
533
|
id: Id<Table>;
|
|
493
534
|
}) => unknown;
|
|
494
535
|
} | undefined;
|
|
495
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
496
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
536
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["commandInput"]["_output"]) => CreateGuard) | undefined;
|
|
537
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["commandInput"]["_output"]) => never) | undefined;
|
|
497
538
|
audit?: ((resolution: {
|
|
498
|
-
command:
|
|
539
|
+
command: Table["commandInput"]["_output"];
|
|
499
540
|
result: {
|
|
500
541
|
id: Id<Table>;
|
|
501
542
|
};
|
|
@@ -508,18 +549,18 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
508
549
|
};
|
|
509
550
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
510
551
|
} & {
|
|
511
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
512
|
-
id:
|
|
552
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["commandInput"]["_output"], {
|
|
553
|
+
id: Id<Table>;
|
|
513
554
|
}, Record<never, never>, CallbackError<CreateGuard> | CallbackError<Policy> | CallbackError<Chosen<CreateOverride, Effect.Effect<{
|
|
514
555
|
id: EffectValue<Insert> | Id<Table>;
|
|
515
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
556
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>>, CallbackRequirements<CreateGuard> | CallbackRequirements<Policy> | CallbackRequirements<Chosen<CreateOverride, Effect.Effect<{
|
|
516
557
|
id: EffectValue<Insert> | Id<Table>;
|
|
517
|
-
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<
|
|
558
|
+
}, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A, infer E, infer _R>] ? E : never, [Effect.Effect<EffectValue<Insert>, CallbackError<Insert>, CallbackRequirements<Insert>> | Effect.Effect<Partial<Storage<Table>> | undefined, CallbackError<Enrich>, CallbackRequirements<Enrich>> | Effect.Effect<Id<Table>, never, never>] extends [Effect.Effect<infer _A_1, infer _E, infer R>] ? R : never>, RequiredOverride<Configuration, "create">>>>) => never) | undefined;
|
|
518
559
|
} & {
|
|
519
560
|
classification: string;
|
|
520
561
|
} & {
|
|
521
562
|
audit: (resolution: {
|
|
522
|
-
command:
|
|
563
|
+
command: Table["commandInput"]["_output"];
|
|
523
564
|
result: {
|
|
524
565
|
id: Id<Table>;
|
|
525
566
|
};
|
|
@@ -532,11 +573,11 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
532
573
|
};
|
|
533
574
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
534
575
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.update`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
535
|
-
input: StandardSchema<
|
|
536
|
-
result:
|
|
537
|
-
ok:
|
|
538
|
-
}
|
|
539
|
-
handler: (input:
|
|
576
|
+
input: StandardSchema<In<Table["tools"]["update"]>, Table["tools"]["update"]["_output"]> & LegacyParser<Table["tools"]["update"]["_output"]>;
|
|
577
|
+
result: KObject<{
|
|
578
|
+
ok: KLiteral<true>;
|
|
579
|
+
}>;
|
|
580
|
+
handler: (input: Table["tools"]["update"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<EffectValue<Chosen<UpdateOverride, Effect.Effect<{
|
|
540
581
|
ok: true;
|
|
541
582
|
}, CallbackError<Patch>, CallbackRequirements<Patch>>, RequiredOverride<Configuration, "update">>>, CallbackError<CheckId> | CallbackError<Chosen<UpdateOverride, Effect.Effect<{
|
|
542
583
|
ok: true;
|
|
@@ -554,10 +595,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
554
595
|
ok: true;
|
|
555
596
|
}) => unknown;
|
|
556
597
|
} | undefined;
|
|
557
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
558
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
598
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["update"]["_output"]) => UpdateGuard) | undefined;
|
|
599
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["update"]["_output"]) => never) | undefined;
|
|
559
600
|
audit?: ((resolution: {
|
|
560
|
-
command:
|
|
601
|
+
command: Table["tools"]["update"]["_output"];
|
|
561
602
|
result: {
|
|
562
603
|
ok: true;
|
|
563
604
|
};
|
|
@@ -570,7 +611,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
570
611
|
};
|
|
571
612
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
572
613
|
} & {
|
|
573
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
614
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["update"]["_output"], {
|
|
574
615
|
ok: true;
|
|
575
616
|
}, Record<never, never>, CallbackError<CheckId> | CallbackError<Policy> | CallbackError<UpdateGuard> | CallbackError<Chosen<UpdateOverride, Effect.Effect<{
|
|
576
617
|
ok: true;
|
|
@@ -585,7 +626,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
585
626
|
classification: string;
|
|
586
627
|
} & {
|
|
587
628
|
audit: (resolution: {
|
|
588
|
-
command:
|
|
629
|
+
command: Table["tools"]["update"]["_output"];
|
|
589
630
|
result: {
|
|
590
631
|
ok: true;
|
|
591
632
|
};
|
|
@@ -598,11 +639,11 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
598
639
|
};
|
|
599
640
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
600
641
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.archive`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
601
|
-
input: StandardSchema<
|
|
602
|
-
result:
|
|
603
|
-
ok:
|
|
604
|
-
}
|
|
605
|
-
handler: (input:
|
|
642
|
+
input: StandardSchema<In<Table["tools"]["id"]>, Table["tools"]["id"]["_output"]> & LegacyParser<Table["tools"]["id"]["_output"]>;
|
|
643
|
+
result: KObject<{
|
|
644
|
+
ok: KLiteral<true>;
|
|
645
|
+
}>;
|
|
646
|
+
handler: (input: Table["tools"]["id"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<EffectValue<Chosen<ArchiveOverride, Effect.Effect<{
|
|
606
647
|
ok: true;
|
|
607
648
|
}, CallbackError<Patch>, CallbackRequirements<Patch>>, RequiredOverride<Configuration, "archive">>>, CallbackError<CheckId> | CallbackError<Chosen<ArchiveOverride, Effect.Effect<{
|
|
608
649
|
ok: true;
|
|
@@ -620,10 +661,10 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
620
661
|
ok: true;
|
|
621
662
|
}) => unknown;
|
|
622
663
|
} | undefined;
|
|
623
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
624
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
664
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["id"]["_output"]) => ArchiveGuard) | undefined;
|
|
665
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["id"]["_output"]) => never) | undefined;
|
|
625
666
|
audit?: ((resolution: {
|
|
626
|
-
command:
|
|
667
|
+
command: Table["tools"]["id"]["_output"];
|
|
627
668
|
result: {
|
|
628
669
|
ok: true;
|
|
629
670
|
};
|
|
@@ -636,7 +677,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
636
677
|
};
|
|
637
678
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>) | undefined;
|
|
638
679
|
} & {
|
|
639
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
680
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["id"]["_output"], {
|
|
640
681
|
ok: true;
|
|
641
682
|
}, Record<never, never>, CallbackError<ArchiveGuard> | CallbackError<CheckId> | CallbackError<Policy> | CallbackError<Chosen<ArchiveOverride, Effect.Effect<{
|
|
642
683
|
ok: true;
|
|
@@ -651,7 +692,7 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
651
692
|
classification: string;
|
|
652
693
|
} & {
|
|
653
694
|
audit: (resolution: {
|
|
654
|
-
command:
|
|
695
|
+
command: Table["tools"]["id"]["_output"];
|
|
655
696
|
result: {
|
|
656
697
|
ok: true;
|
|
657
698
|
};
|
|
@@ -665,9 +706,9 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
665
706
|
}, CallbackError<Actor>, CallbackRequirements<Actor>>;
|
|
666
707
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>>;
|
|
667
708
|
queryOperations: NamedOperation<`${Table["tableName"]}.get`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
668
|
-
input: StandardSchema<
|
|
669
|
-
result: StandardSchema<
|
|
670
|
-
handler: (input:
|
|
709
|
+
input: StandardSchema<In<Table["tools"]["id"]>, Table["tools"]["id"]["_output"]> & LegacyParser<Table["tools"]["id"]["_output"]>;
|
|
710
|
+
result: StandardSchema<PublicInput<Table> | null, PublicOutput<Table> | null> & LegacyParser<PublicOutput<Table> | null>;
|
|
711
|
+
handler: (input: Table["tools"]["id"]["_output"], context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<PublicInput<Table> | null, CallbackError<CheckId> | CallbackError<Get> | CallbackError<Project>, CallbackRequirements<CheckId> | CallbackRequirements<Get> | CallbackRequirements<Project>>;
|
|
671
712
|
classification?: string;
|
|
672
713
|
permission?: string;
|
|
673
714
|
metadata?: Record<never, never> | undefined;
|
|
@@ -675,61 +716,52 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
675
716
|
replayResult?: undefined;
|
|
676
717
|
wire?: {
|
|
677
718
|
schema: ContractSchema;
|
|
678
|
-
project: (value:
|
|
719
|
+
project: (value: PublicOutput<Table> | null) => unknown;
|
|
679
720
|
} | undefined;
|
|
680
|
-
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input:
|
|
681
|
-
prepare?: ((context: EffectValue<ContextReturned>, input:
|
|
721
|
+
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: Table["tools"]["id"]["_output"]) => GetGuard) | undefined;
|
|
722
|
+
prepare?: ((context: EffectValue<ContextReturned>, input: Table["tools"]["id"]["_output"]) => never) | undefined;
|
|
682
723
|
audit?: ((resolution: {
|
|
683
|
-
command:
|
|
684
|
-
result:
|
|
724
|
+
command: Table["tools"]["id"]["_output"];
|
|
725
|
+
result: PublicOutput<Table> | null;
|
|
685
726
|
}, context: EffectValue<ContextReturned>, scope: RequestScope | undefined) => never) | undefined;
|
|
686
727
|
} & {
|
|
687
|
-
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>,
|
|
728
|
+
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, Table["tools"]["id"]["_output"], PublicInput<Table> | null, Record<never, never>, CallbackError<CheckId> | CallbackError<Get> | CallbackError<GetGuard> | CallbackError<Policy> | CallbackError<Project> | CallbackError<PublicInput<Table>>, CallbackRequirements<CheckId> | CallbackRequirements<Get> | CallbackRequirements<GetGuard> | CallbackRequirements<Policy> | CallbackRequirements<Project> | CallbackRequirements<PublicInput<Table>>>) => never) | undefined;
|
|
688
729
|
} & {
|
|
689
730
|
prepare?: never;
|
|
690
731
|
audit?: never;
|
|
691
732
|
aggregates?: never;
|
|
692
733
|
replayResult?: never;
|
|
693
734
|
}, CallbackError<Policy>, CallbackRequirements<Policy>>> & NamedOperation<`${Table["tableName"]}.list`, CheckedEffectDefinition<EffectValue<ContextReturned>, object & {
|
|
694
|
-
input:
|
|
695
|
-
numItems:
|
|
696
|
-
cursor:
|
|
697
|
-
endCursor:
|
|
698
|
-
id:
|
|
699
|
-
maximumRowsRead:
|
|
700
|
-
maximumBytesRead:
|
|
701
|
-
}
|
|
702
|
-
result:
|
|
703
|
-
page:
|
|
704
|
-
paginationMode:
|
|
705
|
-
isDone:
|
|
706
|
-
continueCursor:
|
|
707
|
-
splitCursor:
|
|
708
|
-
pageStatus:
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}>>>;
|
|
712
|
-
completeness: z.ZodOptional<z.ZodEnum<{
|
|
713
|
-
"byte-budget": "byte-budget";
|
|
714
|
-
complete: "complete";
|
|
715
|
-
"native-limit": "native-limit";
|
|
716
|
-
"result-cap": "result-cap";
|
|
717
|
-
"row-budget": "row-budget";
|
|
718
|
-
}>>;
|
|
719
|
-
}, z.core.$strip>;
|
|
735
|
+
input: KObject<{
|
|
736
|
+
numItems: KNumber;
|
|
737
|
+
cursor: KNullable<KString>;
|
|
738
|
+
endCursor: KOptional<KNullable<KString>>;
|
|
739
|
+
id: KOptional<KNumber>;
|
|
740
|
+
maximumRowsRead: KOptional<KNumber>;
|
|
741
|
+
maximumBytesRead: KOptional<KNumber>;
|
|
742
|
+
}>;
|
|
743
|
+
result: KObject<{
|
|
744
|
+
page: KArray<Table["publicDto"]>;
|
|
745
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
746
|
+
isDone: KBoolean;
|
|
747
|
+
continueCursor: KString;
|
|
748
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
749
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
750
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
751
|
+
}>;
|
|
720
752
|
handler: (input: {
|
|
721
|
-
numItems: number;
|
|
722
753
|
cursor: string | null;
|
|
723
754
|
endCursor?: string | null | undefined;
|
|
724
755
|
id?: number | undefined;
|
|
725
|
-
maximumRowsRead?: number | undefined;
|
|
726
756
|
maximumBytesRead?: number | undefined;
|
|
757
|
+
maximumRowsRead?: number | undefined;
|
|
758
|
+
numItems: number;
|
|
727
759
|
}, context: EffectValue<ContextReturned> & Record<never, never>) => Effect.Effect<{
|
|
728
760
|
isDone: boolean;
|
|
729
761
|
continueCursor: import("convex/server").Cursor;
|
|
730
762
|
splitCursor?: import("convex/server").Cursor | null;
|
|
731
763
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
732
|
-
page:
|
|
764
|
+
page: PublicInput<Table>[];
|
|
733
765
|
}, CallbackError<List> | CallbackError<Project>, CallbackRequirements<List> | CallbackRequirements<Project>>;
|
|
734
766
|
classification?: string;
|
|
735
767
|
permission?: string;
|
|
@@ -738,67 +770,101 @@ export declare function createEffectCrud<const Options extends EffectFoundationO
|
|
|
738
770
|
replayResult?: undefined;
|
|
739
771
|
wire?: {
|
|
740
772
|
schema: ContractSchema;
|
|
741
|
-
project: (value: {
|
|
742
|
-
page:
|
|
773
|
+
project: (value: KAnyDiffers<{
|
|
774
|
+
page: KArray<Table["publicDto"]>;
|
|
775
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
776
|
+
isDone: KBoolean;
|
|
777
|
+
continueCursor: KString;
|
|
778
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
779
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
780
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
781
|
+
}> extends true ? Flat<{
|
|
743
782
|
paginationMode?: "native-search" | undefined;
|
|
744
|
-
isDone: boolean;
|
|
745
|
-
continueCursor: string;
|
|
746
783
|
splitCursor?: string | null | undefined;
|
|
747
784
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
748
785
|
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
786
|
+
} & {
|
|
787
|
+
page: Table["publicDto"]["_output"][];
|
|
788
|
+
isDone: boolean;
|
|
789
|
+
continueCursor: string;
|
|
790
|
+
}> : {
|
|
791
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
792
|
+
continueCursor: string;
|
|
793
|
+
isDone: boolean;
|
|
794
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
795
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
796
|
+
paginationMode?: "native-search" | undefined;
|
|
797
|
+
splitCursor?: string | null | undefined;
|
|
749
798
|
}) => unknown;
|
|
750
799
|
} | undefined;
|
|
751
800
|
guard?: ((context: EffectValue<ContextReturned> & Record<never, never>, input: {
|
|
752
|
-
numItems: number;
|
|
753
801
|
cursor: string | null;
|
|
754
802
|
endCursor?: string | null | undefined;
|
|
755
803
|
id?: number | undefined;
|
|
756
|
-
maximumRowsRead?: number | undefined;
|
|
757
804
|
maximumBytesRead?: number | undefined;
|
|
805
|
+
maximumRowsRead?: number | undefined;
|
|
806
|
+
numItems: number;
|
|
758
807
|
}) => ListGuard) | undefined;
|
|
759
808
|
prepare?: ((context: EffectValue<ContextReturned>, input: {
|
|
760
|
-
numItems: number;
|
|
761
809
|
cursor: string | null;
|
|
762
810
|
endCursor?: string | null | undefined;
|
|
763
811
|
id?: number | undefined;
|
|
764
|
-
maximumRowsRead?: number | undefined;
|
|
765
812
|
maximumBytesRead?: number | undefined;
|
|
813
|
+
maximumRowsRead?: number | undefined;
|
|
814
|
+
numItems: number;
|
|
766
815
|
}) => never) | undefined;
|
|
767
816
|
audit?: ((resolution: {
|
|
768
817
|
command: {
|
|
769
|
-
numItems: number;
|
|
770
818
|
cursor: string | null;
|
|
771
819
|
endCursor?: string | null | undefined;
|
|
772
820
|
id?: number | undefined;
|
|
773
|
-
maximumRowsRead?: number | undefined;
|
|
774
821
|
maximumBytesRead?: number | undefined;
|
|
822
|
+
maximumRowsRead?: number | undefined;
|
|
823
|
+
numItems: number;
|
|
775
824
|
};
|
|
776
|
-
result: {
|
|
777
|
-
page:
|
|
825
|
+
result: KAnyDiffers<{
|
|
826
|
+
page: KArray<Table["publicDto"]>;
|
|
827
|
+
paginationMode: KOptional<KLiteral<"native-search">>;
|
|
828
|
+
isDone: KBoolean;
|
|
829
|
+
continueCursor: KString;
|
|
830
|
+
splitCursor: KOptional<KNullable<KString>>;
|
|
831
|
+
pageStatus: KOptional<KNullable<KEnum<readonly ["SplitRecommended", "SplitRequired"]>>>;
|
|
832
|
+
completeness: KOptional<KEnum<readonly ["complete", "row-budget", "byte-budget", "native-limit", "result-cap"]>>;
|
|
833
|
+
}> extends true ? Flat<{
|
|
778
834
|
paginationMode?: "native-search" | undefined;
|
|
779
|
-
isDone: boolean;
|
|
780
|
-
continueCursor: string;
|
|
781
835
|
splitCursor?: string | null | undefined;
|
|
782
836
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
783
837
|
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
838
|
+
} & {
|
|
839
|
+
page: Table["publicDto"]["_output"][];
|
|
840
|
+
isDone: boolean;
|
|
841
|
+
continueCursor: string;
|
|
842
|
+
}> : {
|
|
843
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
844
|
+
continueCursor: string;
|
|
845
|
+
isDone: boolean;
|
|
846
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
847
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
848
|
+
paginationMode?: "native-search" | undefined;
|
|
849
|
+
splitCursor?: string | null | undefined;
|
|
784
850
|
};
|
|
785
851
|
}, context: EffectValue<ContextReturned>, scope: RequestScope | undefined) => never) | undefined;
|
|
786
852
|
} & {
|
|
787
853
|
middleware?: ((input: EffectMiddlewareInput<EffectValue<ContextReturned>, {
|
|
788
|
-
numItems: number;
|
|
789
854
|
cursor: string | null;
|
|
790
855
|
endCursor?: string | null | undefined;
|
|
791
856
|
id?: number | undefined;
|
|
792
|
-
maximumRowsRead?: number | undefined;
|
|
793
857
|
maximumBytesRead?: number | undefined;
|
|
858
|
+
maximumRowsRead?: number | undefined;
|
|
859
|
+
numItems: number;
|
|
794
860
|
}, {
|
|
795
|
-
|
|
796
|
-
paginationMode?: "native-search" | undefined;
|
|
797
|
-
isDone: boolean;
|
|
861
|
+
completeness?: "byte-budget" | "complete" | "native-limit" | "result-cap" | "row-budget" | undefined;
|
|
798
862
|
continueCursor: string;
|
|
799
|
-
|
|
863
|
+
isDone: boolean;
|
|
864
|
+
page: Table["publicDto"]["_req"]["type"][];
|
|
800
865
|
pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined;
|
|
801
|
-
|
|
866
|
+
paginationMode?: "native-search" | undefined;
|
|
867
|
+
splitCursor?: string | null | undefined;
|
|
802
868
|
}, Record<never, never>, CallbackError<List> | CallbackError<ListGuard> | CallbackError<Policy> | CallbackError<Project>, CallbackRequirements<List> | CallbackRequirements<ListGuard> | CallbackRequirements<Policy> | CallbackRequirements<Project>>) => never) | undefined;
|
|
803
869
|
} & {
|
|
804
870
|
prepare?: never;
|
|
@@ -815,5 +881,5 @@ type RequiredOverride<Configuration, Key extends string> = Configuration extends
|
|
|
815
881
|
overrides: { [K in Key]: Function; };
|
|
816
882
|
} ? true : false;
|
|
817
883
|
type Chosen<Override, Default, Required extends boolean> = Required extends true ? Override : [Override] extends [never] ? Default : Override | Default;
|
|
818
|
-
|
|
884
|
+
export {};
|
|
819
885
|
//# sourceMappingURL=crud.d.mts.map
|