cvx-kit 0.2.0 → 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 +556 -99
- package/dist/agent-tools.d.mts +39 -26
- package/dist/agent-tools.mjs +1 -1
- package/dist/agent-tools.mjs.map +1 -1
- package/dist/auth.d.mts +120 -308
- package/dist/auth.mjs +1 -1
- package/dist/auth.mjs.map +1 -1
- package/dist/components/approvals/_generated/api.d.mts +7 -9
- package/dist/components/approvals/_generated/api.mjs.map +1 -1
- package/dist/components/approvals/_generated/component.d.mts +1 -4
- package/dist/components/approvals/_generated/dataModel.d.mts +5 -8
- package/dist/components/approvals/_generated/server.d.mts +12 -15
- package/dist/components/approvals/_generated/server.mjs.map +1 -1
- package/dist/components/approvals/audit.d.mts +8 -9
- package/dist/components/approvals/audit.mjs +1 -1
- package/dist/components/approvals/audit.mjs.map +1 -1
- package/dist/components/approvals/client.d.mts +11 -12
- package/dist/components/approvals/client.mjs +1 -1
- package/dist/components/approvals/client.mjs.map +1 -1
- package/dist/components/approvals/constants.d.mts +30 -31
- 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 +13 -17
- package/dist/components/approvals/decisions.mjs +1 -1
- package/dist/components/approvals/decisions.mjs.map +1 -1
- package/dist/components/approvals/functions.d.mts +3 -4
- package/dist/components/approvals/functions.mjs +1 -1
- package/dist/components/approvals/functions.mjs.map +1 -1
- package/dist/components/approvals/health.d.mts +2 -3
- package/dist/components/approvals/health.mjs.map +1 -1
- package/dist/components/approvals/requests.d.mts +114 -131
- 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 +323 -395
- package/dist/components/approvals/validators.mjs +1 -1
- package/dist/components/approvals/validators.mjs.map +1 -1
- package/dist/components/approvals/workflow.d.mts +4 -5
- 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 +16 -17
- package/dist/components/approvals/workflow_steps.mjs +1 -1
- package/dist/components/approvals/workflow_steps.mjs.map +1 -1
- package/dist/components/foundation/_generated/api.d.mts +6 -8
- package/dist/components/foundation/_generated/api.mjs.map +1 -1
- package/dist/components/foundation/_generated/component.d.mts +1 -4
- package/dist/components/foundation/_generated/dataModel.d.mts +5 -8
- package/dist/components/foundation/_generated/server.d.mts +12 -15
- package/dist/components/foundation/_generated/server.mjs.map +1 -1
- package/dist/components/foundation/client.d.mts +45 -38
- 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 +2 -3
- package/dist/components/foundation/functions.mjs.map +1 -1
- package/dist/components/foundation/modules/command/command.d.mts +65 -17
- package/dist/components/foundation/modules/command/command.mjs +1 -1
- package/dist/components/foundation/modules/command/command.mjs.map +1 -1
- package/dist/components/foundation/modules/command/lifecycle.d.mts +78 -0
- package/dist/components/foundation/modules/command/lifecycle.mjs +2 -0
- package/dist/components/foundation/modules/command/lifecycle.mjs.map +1 -0
- package/dist/components/foundation/modules/observability/observability.d.mts +13 -6
- package/dist/components/foundation/modules/observability/observability.mjs +1 -1
- package/dist/components/foundation/modules/observability/observability.mjs.map +1 -1
- package/dist/components/foundation/modules/query/query.d.mts +11 -12
- package/dist/components/foundation/modules/query/query.mjs +1 -1
- package/dist/components/foundation/modules/query/query.mjs.map +1 -1
- package/dist/components/foundation/operation.d.mts +72 -0
- package/dist/components/foundation/operation.mjs +2 -0
- package/dist/components/foundation/operation.mjs.map +1 -0
- package/dist/components/foundation/result.d.mts +7 -8
- 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 +2 -3
- package/dist/components/foundation/telemetry.mjs +1 -1
- package/dist/components/foundation/telemetry.mjs.map +1 -1
- package/dist/contracts.d.mts +5 -0
- package/dist/contracts.mjs +1 -0
- package/dist/crud.d.mts +185 -27
- package/dist/crud.mjs +1 -1
- package/dist/crud.mjs.map +1 -1
- package/dist/effect.d.mts +16 -0
- package/dist/effect.mjs +1 -0
- package/dist/errors.d.mts +6 -6
- package/dist/errors.mjs +1 -1
- package/dist/errors.mjs.map +1 -1
- package/dist/filters.d.mts +4 -0
- package/dist/filters.mjs +1 -0
- package/dist/idempotency.d.mts +2 -0
- package/dist/idempotency.mjs +1 -0
- package/dist/index.d.mts +14 -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 +8 -11
- package/dist/middleware.mjs +1 -1
- package/dist/middleware.mjs.map +1 -1
- package/dist/modules/contracts/binding.d.mts +23 -0
- package/dist/modules/contracts/binding.mjs +2 -0
- package/dist/modules/contracts/binding.mjs.map +1 -0
- package/dist/modules/contracts/contract.d.mts +67 -0
- package/dist/modules/contracts/contract.mjs +2 -0
- package/dist/modules/contracts/contract.mjs.map +1 -0
- package/dist/modules/contracts/convex.d.mts +18 -0
- package/dist/modules/contracts/convex.mjs +2 -0
- package/dist/modules/contracts/convex.mjs.map +1 -0
- package/dist/modules/contracts/domain.d.mts +62 -0
- package/dist/modules/contracts/domain.mjs +2 -0
- package/dist/modules/contracts/domain.mjs.map +1 -0
- package/dist/modules/contracts/errors.d.mts +737 -0
- package/dist/modules/contracts/errors.mjs +2 -0
- package/dist/modules/contracts/errors.mjs.map +1 -0
- package/dist/modules/contracts/exposure.d.mts +103 -0
- package/dist/modules/contracts/exposure.mjs +2 -0
- package/dist/modules/contracts/exposure.mjs.map +1 -0
- package/dist/modules/contracts/idempotency.d.mts +85 -0
- package/dist/modules/contracts/idempotency.mjs +2 -0
- package/dist/modules/contracts/idempotency.mjs.map +1 -0
- package/dist/modules/contracts/lazy.d.mts +6 -0
- package/dist/modules/contracts/lazy.mjs +2 -0
- package/dist/modules/contracts/lazy.mjs.map +1 -0
- package/dist/modules/contracts/standard.d.mts +17 -0
- package/dist/modules/contracts/standard.mjs +2 -0
- package/dist/modules/contracts/standard.mjs.map +1 -0
- package/dist/modules/contracts/workflow.d.mts +165 -0
- package/dist/modules/contracts/workflow.mjs +2 -0
- package/dist/modules/contracts/workflow.mjs.map +1 -0
- package/dist/modules/effect/action.d.mts +63 -0
- package/dist/modules/effect/action.mjs +2 -0
- package/dist/modules/effect/action.mjs.map +1 -0
- package/dist/modules/effect/agent-tools.d.mts +2 -0
- package/dist/modules/effect/agent-tools.mjs +1 -0
- package/dist/modules/effect/api-runtime.d.mts +36 -0
- package/dist/modules/effect/api-runtime.mjs +2 -0
- package/dist/modules/effect/api-runtime.mjs.map +1 -0
- package/dist/modules/effect/api.d.mts +46 -0
- package/dist/modules/effect/api.mjs +2 -0
- package/dist/modules/effect/api.mjs.map +1 -0
- package/dist/modules/effect/auth.d.mts +46 -0
- package/dist/modules/effect/auth.mjs +2 -0
- package/dist/modules/effect/auth.mjs.map +1 -0
- package/dist/modules/effect/client.d.mts +15 -0
- package/dist/modules/effect/client.mjs +1 -0
- package/dist/modules/effect/command.d.mts +108 -0
- package/dist/modules/effect/command.mjs +2 -0
- package/dist/modules/effect/command.mjs.map +1 -0
- package/dist/modules/effect/crud.d.mts +885 -0
- package/dist/modules/effect/crud.mjs +2 -0
- package/dist/modules/effect/crud.mjs.map +1 -0
- package/dist/modules/effect/domain.d.mts +82 -0
- package/dist/modules/effect/domain.mjs +2 -0
- package/dist/modules/effect/domain.mjs.map +1 -0
- package/dist/modules/effect/errors.d.mts +13 -0
- package/dist/modules/effect/errors.mjs +2 -0
- package/dist/modules/effect/errors.mjs.map +1 -0
- package/dist/modules/effect/failure-audit.d.mts +48 -0
- package/dist/modules/effect/failure-audit.mjs +2 -0
- package/dist/modules/effect/failure-audit.mjs.map +1 -0
- package/dist/modules/effect/failures.d.mts +21 -0
- package/dist/modules/effect/failures.mjs +2 -0
- package/dist/modules/effect/failures.mjs.map +1 -0
- package/dist/modules/effect/foundation.d.mts +23 -0
- package/dist/modules/effect/foundation.mjs +2 -0
- package/dist/modules/effect/foundation.mjs.map +1 -0
- package/dist/modules/effect/idempotency.d.mts +29 -0
- package/dist/modules/effect/idempotency.mjs +2 -0
- package/dist/modules/effect/idempotency.mjs.map +1 -0
- 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 +7 -0
- package/dist/modules/effect/normalize.mjs +2 -0
- package/dist/modules/effect/normalize.mjs.map +1 -0
- package/dist/modules/effect/operation.d.mts +148 -0
- package/dist/modules/effect/operation.mjs +2 -0
- package/dist/modules/effect/operation.mjs.map +1 -0
- package/dist/modules/effect/query.d.mts +90 -0
- package/dist/modules/effect/query.mjs +2 -0
- package/dist/modules/effect/query.mjs.map +1 -0
- package/dist/modules/effect/schema.d.mts +30 -0
- package/dist/modules/effect/schema.mjs +2 -0
- package/dist/modules/effect/schema.mjs.map +1 -0
- package/dist/modules/effect/scope.d.mts +25 -0
- package/dist/modules/effect/scope.mjs +2 -0
- package/dist/modules/effect/scope.mjs.map +1 -0
- package/dist/modules/effect/workflow.d.mts +75 -0
- package/dist/modules/effect/workflow.mjs +2 -0
- package/dist/modules/effect/workflow.mjs.map +1 -0
- package/dist/modules/foundation/foundation.d.mts +108 -0
- package/dist/modules/foundation/foundation.mjs +2 -0
- package/dist/modules/foundation/foundation.mjs.map +1 -0
- package/dist/modules/foundation/operation.d.mts +139 -0
- package/dist/modules/foundation/operation.mjs +2 -0
- package/dist/modules/foundation/operation.mjs.map +1 -0
- 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 +23 -0
- package/dist/oxlint/architecture.mjs +2 -0
- package/dist/oxlint/architecture.mjs.map +1 -0
- package/dist/oxlint/ast.d.mts +51 -0
- package/dist/oxlint/ast.mjs +2 -0
- package/dist/oxlint/ast.mjs.map +1 -0
- package/dist/oxlint/components.d.mts +4 -0
- package/dist/oxlint/components.mjs +2 -0
- package/dist/oxlint/components.mjs.map +1 -0
- package/dist/oxlint/ownership.d.mts +59 -0
- package/dist/oxlint/ownership.mjs +2 -0
- package/dist/oxlint/ownership.mjs.map +1 -0
- package/dist/oxlint/reserved-files.d.mts +4 -0
- package/dist/oxlint/reserved-files.mjs +2 -0
- package/dist/oxlint/reserved-files.mjs.map +1 -0
- package/dist/oxlint.d.mts +9 -0
- package/dist/oxlint.mjs +2 -0
- package/dist/oxlint.mjs.map +1 -0
- package/dist/querying/cursors.d.mts +94 -0
- package/dist/querying/cursors.mjs +2 -0
- package/dist/querying/cursors.mjs.map +1 -0
- package/dist/querying/execution.d.mts +40 -0
- package/dist/querying/execution.mjs +2 -0
- package/dist/querying/execution.mjs.map +1 -0
- package/dist/querying/failures.d.mts +11 -0
- package/dist/querying/failures.mjs +2 -0
- package/dist/querying/failures.mjs.map +1 -0
- package/dist/querying/filter-boundary.d.mts +25 -0
- package/dist/querying/filter-boundary.mjs +2 -0
- package/dist/querying/filter-boundary.mjs.map +1 -0
- package/dist/querying/filters.d.mts +180 -0
- package/dist/querying/filters.mjs +2 -0
- package/dist/querying/filters.mjs.map +1 -0
- package/dist/querying/planner.d.mts +61 -0
- package/dist/querying/planner.mjs +2 -0
- package/dist/querying/planner.mjs.map +1 -0
- package/dist/querying/relationships.d.mts +58 -0
- package/dist/querying/relationships.mjs +2 -0
- package/dist/querying/relationships.mjs.map +1 -0
- package/dist/querying/search.d.mts +69 -0
- package/dist/querying/search.mjs +2 -0
- package/dist/querying/search.mjs.map +1 -0
- package/dist/querying/security.d.mts +123 -0
- package/dist/querying/security.mjs +2 -0
- package/dist/querying/security.mjs.map +1 -0
- package/dist/querying/shared/ast.d.mts +26 -0
- package/dist/querying/shared/ast.mjs +2 -0
- package/dist/querying/shared/ast.mjs.map +1 -0
- package/dist/querying/shared/contract.d.mts +98 -0
- package/dist/querying/shared/contract.mjs +2 -0
- package/dist/querying/shared/contract.mjs.map +1 -0
- package/dist/querying/shared/evaluate.d.mts +5 -0
- package/dist/querying/shared/evaluate.mjs +2 -0
- package/dist/querying/shared/evaluate.mjs.map +1 -0
- package/dist/querying/shared/filters.d.mts +65 -0
- package/dist/querying/shared/filters.mjs +2 -0
- package/dist/querying/shared/filters.mjs.map +1 -0
- 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 +20 -0
- package/dist/querying/shared/page.mjs +2 -0
- package/dist/querying/shared/page.mjs.map +1 -0
- package/dist/querying.d.mts +82 -0
- package/dist/querying.mjs +2 -0
- package/dist/querying.mjs.map +1 -0
- package/dist/react/failures.d.mts +24 -0
- package/dist/react/failures.mjs +2 -0
- package/dist/react/failures.mjs.map +1 -0
- package/dist/react/optimistic.d.mts +46 -0
- package/dist/react/optimistic.mjs +2 -0
- package/dist/react/optimistic.mjs.map +1 -0
- package/dist/react/pagination-state.d.mts +39 -0
- package/dist/react/pagination-state.mjs +2 -0
- package/dist/react/pagination-state.mjs.map +1 -0
- package/dist/react/use-command.d.mts +22 -0
- package/dist/react/use-command.mjs +2 -0
- package/dist/react/use-command.mjs.map +1 -0
- package/dist/react/use-paginated-list.d.mts +34 -0
- package/dist/react/use-paginated-list.mjs +2 -0
- package/dist/react/use-paginated-list.mjs.map +1 -0
- package/dist/react.d.mts +6 -0
- package/dist/react.mjs +1 -0
- 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 -0
- package/dist/relations-public.mjs +1 -0
- package/dist/relations.d.mts +274 -0
- package/dist/relations.mjs +2 -0
- package/dist/relations.mjs.map +1 -0
- package/dist/state-machine.d.mts +1 -4
- 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 +6 -8
- package/dist/tenancy.mjs +1 -1
- package/dist/tenancy.mjs.map +1 -1
- package/dist/triggers.d.mts +12 -10
- package/dist/triggers.mjs +1 -1
- package/dist/triggers.mjs.map +1 -1
- package/dist/webhooks.d.mts +22 -112
- package/dist/webhooks.mjs +1 -1
- package/dist/webhooks.mjs.map +1 -1
- package/dist/workflow.d.mts +2 -0
- package/dist/workflow.mjs +1 -0
- package/dist/zod.d.mts +30 -0
- package/dist/zod.mjs +2 -0
- package/dist/zod.mjs.map +1 -0
- package/package.json +145 -33
- package/src/test.ts +9 -17
- package/CHANGELOG.md +0 -145
- package/ROADMAP.md +0 -126
- package/dist/zod-table.d.mts +0 -175
- package/dist/zod-table.mjs +0 -2
- package/dist/zod-table.mjs.map +0 -1
- package/docs/agent-tools.md +0 -41
- package/docs/approvals.md +0 -200
- package/docs/architecture.md +0 -124
- package/docs/auth.md +0 -218
- package/docs/commands.md +0 -278
- package/docs/conventions.md +0 -291
- package/docs/crud.md +0 -62
- package/docs/llms.md +0 -220
- package/docs/maintainability.md +0 -124
- package/docs/migration.md +0 -351
- package/docs/plans/2026-08-14-001-feat-v0.1.0-feature-set-plan.md +0 -461
- package/docs/plans/2026-08-21-0930-feat-resolve-organization-hook-plan.md +0 -178
- package/docs/tenancy.md +0 -179
- package/docs/triggers.md +0 -75
- package/docs/upgrading.md +0 -175
- package/docs/webhooks.md +0 -58
- package/docs/zod-table.md +0 -173
- package/scripts/convex-config-bridge.mjs +0 -55
- package/scripts/extract-changelog.mjs +0 -29
- package/scripts/smoke-packed-components.mjs +0 -374
|
@@ -1,376 +1,167 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../k.mjs";
|
|
2
|
+
import { KOptional } from "../../k/schema.mjs";
|
|
3
|
+
import { KArray, KBoolean, KDiscriminatedUnion, KEnum, KId, KLiteral, KNumber, KRecord, KString, KUnion } from "../../k/kinds.mjs";
|
|
4
|
+
import { KObject } from "../../k/object.mjs";
|
|
5
|
+
import { KNativeFields } from "../../k/types.mjs";
|
|
2
6
|
declare const _default: import("convex/server").SchemaDefinition<{
|
|
3
7
|
approvalRuns: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
createdAt: number;
|
|
9
|
+
currentStepKey?: string | undefined;
|
|
10
|
+
executionFailedStepKey?: string | undefined;
|
|
11
|
+
expiresAt?: number | undefined;
|
|
12
|
+
metadata?: Record<string, string> | undefined;
|
|
7
13
|
requester: {
|
|
8
14
|
actorRef: string;
|
|
9
15
|
capabilities: string[];
|
|
10
|
-
metadata?:
|
|
11
|
-
[x: string]: string;
|
|
12
|
-
} | undefined;
|
|
16
|
+
metadata?: Record<string, string> | undefined;
|
|
13
17
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
resourceRef: string;
|
|
19
|
+
resourceType: string;
|
|
20
|
+
scopeRef: string;
|
|
21
|
+
state: "approved" | "canceled" | "expired" | "pending" | "rejected";
|
|
22
|
+
terminalAt?: number | undefined;
|
|
23
|
+
updatedAt: number;
|
|
17
24
|
workflow: {
|
|
18
|
-
schemaVersion: 1;
|
|
19
25
|
compatibilityKey: string;
|
|
20
26
|
name: string;
|
|
27
|
+
schemaVersion: 1;
|
|
21
28
|
steps: ({
|
|
22
|
-
kind: "mutation";
|
|
23
|
-
key: string;
|
|
24
|
-
callback: {
|
|
25
|
-
kind: "mutation";
|
|
26
|
-
handle: string;
|
|
27
|
-
retry: boolean;
|
|
28
|
-
};
|
|
29
|
-
} | {
|
|
30
|
-
kind: "action";
|
|
31
|
-
key: string;
|
|
32
29
|
callback: {
|
|
33
|
-
kind: "action";
|
|
34
|
-
handle: string;
|
|
35
|
-
retry: boolean;
|
|
36
|
-
};
|
|
37
|
-
} | {
|
|
38
|
-
kind: "notify";
|
|
39
|
-
key: string;
|
|
40
|
-
callback: {
|
|
41
|
-
kind: "action";
|
|
42
30
|
handle: string;
|
|
31
|
+
kind: "mutation";
|
|
43
32
|
retry: boolean;
|
|
44
33
|
};
|
|
45
|
-
} | {
|
|
46
|
-
kind: "decision";
|
|
47
|
-
key: string;
|
|
48
|
-
decisions: ("approved" | "rejected")[];
|
|
49
|
-
quorum: {
|
|
50
|
-
kind: "count";
|
|
51
|
-
approvals: number;
|
|
52
|
-
};
|
|
53
|
-
makerChecker: boolean;
|
|
54
|
-
expiresAfterMs?: number | undefined;
|
|
55
|
-
} | {
|
|
56
|
-
kind: "branch";
|
|
57
34
|
key: string;
|
|
58
|
-
approvedStepKey: string;
|
|
59
|
-
rejectedStepKey: string;
|
|
60
|
-
})[];
|
|
61
|
-
};
|
|
62
|
-
state: "approved" | "canceled" | "expired" | "pending" | "rejected";
|
|
63
|
-
currentStepKey?: string | undefined;
|
|
64
|
-
executionFailedStepKey?: string | undefined;
|
|
65
|
-
expiresAt?: number | undefined;
|
|
66
|
-
workflowId?: string | undefined;
|
|
67
|
-
createdAt: number;
|
|
68
|
-
updatedAt: number;
|
|
69
|
-
terminalAt?: number | undefined;
|
|
70
|
-
}, {
|
|
71
|
-
scopeRef: import("convex/values").VString<string, "required">;
|
|
72
|
-
resourceType: import("convex/values").VString<string, "required">;
|
|
73
|
-
resourceRef: import("convex/values").VString<string, "required">;
|
|
74
|
-
requester: import("convex/values").VObject<{
|
|
75
|
-
actorRef: string;
|
|
76
|
-
capabilities: string[];
|
|
77
|
-
metadata?: {
|
|
78
|
-
[x: string]: string;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
actorRef: import("convex/values").VString<string, "required">;
|
|
82
|
-
capabilities: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
83
|
-
metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
|
|
84
|
-
}, "required", "actorRef" | "capabilities" | "metadata" | `metadata.${string}`>;
|
|
85
|
-
metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
|
|
86
|
-
workflow: import("convex/values").VObject<{
|
|
87
|
-
schemaVersion: 1;
|
|
88
|
-
compatibilityKey: string;
|
|
89
|
-
name: string;
|
|
90
|
-
steps: ({
|
|
91
35
|
kind: "mutation";
|
|
92
|
-
key: string;
|
|
93
|
-
callback: {
|
|
94
|
-
kind: "mutation";
|
|
95
|
-
handle: string;
|
|
96
|
-
retry: boolean;
|
|
97
|
-
};
|
|
98
36
|
} | {
|
|
99
|
-
kind: "action";
|
|
100
|
-
key: string;
|
|
101
37
|
callback: {
|
|
102
|
-
kind: "action";
|
|
103
38
|
handle: string;
|
|
104
|
-
retry: boolean;
|
|
105
|
-
};
|
|
106
|
-
} | {
|
|
107
|
-
kind: "notify";
|
|
108
|
-
key: string;
|
|
109
|
-
callback: {
|
|
110
39
|
kind: "action";
|
|
111
|
-
handle: string;
|
|
112
40
|
retry: boolean;
|
|
113
41
|
};
|
|
114
|
-
} | {
|
|
115
|
-
kind: "decision";
|
|
116
42
|
key: string;
|
|
117
|
-
|
|
118
|
-
quorum: {
|
|
119
|
-
kind: "count";
|
|
120
|
-
approvals: number;
|
|
121
|
-
};
|
|
122
|
-
makerChecker: boolean;
|
|
123
|
-
expiresAfterMs?: number | undefined;
|
|
43
|
+
kind: "action";
|
|
124
44
|
} | {
|
|
125
|
-
kind: "branch";
|
|
126
|
-
key: string;
|
|
127
|
-
approvedStepKey: string;
|
|
128
|
-
rejectedStepKey: string;
|
|
129
|
-
})[];
|
|
130
|
-
}, {
|
|
131
|
-
schemaVersion: import("convex/values").VLiteral<1, "required">;
|
|
132
|
-
compatibilityKey: import("convex/values").VString<string, "required">;
|
|
133
|
-
name: import("convex/values").VString<string, "required">;
|
|
134
|
-
steps: import("convex/values").VArray<({
|
|
135
|
-
kind: "mutation";
|
|
136
|
-
key: string;
|
|
137
45
|
callback: {
|
|
138
|
-
kind: "mutation";
|
|
139
46
|
handle: string;
|
|
140
|
-
retry: boolean;
|
|
141
|
-
};
|
|
142
|
-
} | {
|
|
143
|
-
kind: "action";
|
|
144
|
-
key: string;
|
|
145
|
-
callback: {
|
|
146
47
|
kind: "action";
|
|
147
|
-
handle: string;
|
|
148
48
|
retry: boolean;
|
|
149
49
|
};
|
|
150
|
-
} | {
|
|
151
|
-
kind: "notify";
|
|
152
50
|
key: string;
|
|
153
|
-
|
|
154
|
-
kind: "action";
|
|
155
|
-
handle: string;
|
|
156
|
-
retry: boolean;
|
|
157
|
-
};
|
|
51
|
+
kind: "notify";
|
|
158
52
|
} | {
|
|
159
|
-
kind: "decision";
|
|
160
|
-
key: string;
|
|
161
53
|
decisions: ("approved" | "rejected")[];
|
|
162
|
-
quorum: {
|
|
163
|
-
kind: "count";
|
|
164
|
-
approvals: number;
|
|
165
|
-
};
|
|
166
|
-
makerChecker: boolean;
|
|
167
54
|
expiresAfterMs?: number | undefined;
|
|
168
|
-
} | {
|
|
169
|
-
kind: "branch";
|
|
170
55
|
key: string;
|
|
171
|
-
approvedStepKey: string;
|
|
172
|
-
rejectedStepKey: string;
|
|
173
|
-
})[], import("convex/values").VUnion<{
|
|
174
|
-
kind: "mutation";
|
|
175
|
-
key: string;
|
|
176
|
-
callback: {
|
|
177
|
-
kind: "mutation";
|
|
178
|
-
handle: string;
|
|
179
|
-
retry: boolean;
|
|
180
|
-
};
|
|
181
|
-
} | {
|
|
182
|
-
kind: "action";
|
|
183
|
-
key: string;
|
|
184
|
-
callback: {
|
|
185
|
-
kind: "action";
|
|
186
|
-
handle: string;
|
|
187
|
-
retry: boolean;
|
|
188
|
-
};
|
|
189
|
-
} | {
|
|
190
|
-
kind: "notify";
|
|
191
|
-
key: string;
|
|
192
|
-
callback: {
|
|
193
|
-
kind: "action";
|
|
194
|
-
handle: string;
|
|
195
|
-
retry: boolean;
|
|
196
|
-
};
|
|
197
|
-
} | {
|
|
198
56
|
kind: "decision";
|
|
199
|
-
|
|
200
|
-
decisions: ("approved" | "rejected")[];
|
|
57
|
+
makerChecker: boolean;
|
|
201
58
|
quorum: {
|
|
202
|
-
kind: "count";
|
|
203
59
|
approvals: number;
|
|
60
|
+
kind: "count";
|
|
204
61
|
};
|
|
205
|
-
makerChecker: boolean;
|
|
206
|
-
expiresAfterMs?: number | undefined;
|
|
207
62
|
} | {
|
|
208
|
-
kind: "branch";
|
|
209
|
-
key: string;
|
|
210
63
|
approvedStepKey: string;
|
|
211
|
-
rejectedStepKey: string;
|
|
212
|
-
}, [import("convex/values").VUnion<{
|
|
213
|
-
kind: "mutation";
|
|
214
|
-
key: string;
|
|
215
|
-
callback: {
|
|
216
|
-
kind: "mutation";
|
|
217
|
-
handle: string;
|
|
218
|
-
retry: boolean;
|
|
219
|
-
};
|
|
220
|
-
} | {
|
|
221
|
-
kind: "action";
|
|
222
64
|
key: string;
|
|
223
|
-
callback: {
|
|
224
|
-
kind: "action";
|
|
225
|
-
handle: string;
|
|
226
|
-
retry: boolean;
|
|
227
|
-
};
|
|
228
|
-
}, [import("convex/values").VObject<{
|
|
229
|
-
kind: "mutation";
|
|
230
|
-
key: string;
|
|
231
|
-
callback: {
|
|
232
|
-
kind: "mutation";
|
|
233
|
-
handle: string;
|
|
234
|
-
retry: boolean;
|
|
235
|
-
};
|
|
236
|
-
}, {
|
|
237
|
-
kind: import("convex/values").VLiteral<"mutation", "required">;
|
|
238
|
-
key: import("convex/values").VString<string, "required">;
|
|
239
|
-
callback: import("convex/values").VObject<{
|
|
240
|
-
kind: "mutation";
|
|
241
|
-
handle: string;
|
|
242
|
-
retry: boolean;
|
|
243
|
-
}, {
|
|
244
|
-
kind: import("convex/values").VLiteral<"mutation", "required">;
|
|
245
|
-
handle: import("convex/values").VString<string, "required">;
|
|
246
|
-
retry: import("convex/values").VBoolean<boolean, "required">;
|
|
247
|
-
}, "required", "handle" | "kind" | "retry">;
|
|
248
|
-
}, "required", "callback" | "callback.handle" | "callback.kind" | "callback.retry" | "key" | "kind">, import("convex/values").VObject<{
|
|
249
|
-
kind: "action";
|
|
250
|
-
key: string;
|
|
251
|
-
callback: {
|
|
252
|
-
kind: "action";
|
|
253
|
-
handle: string;
|
|
254
|
-
retry: boolean;
|
|
255
|
-
};
|
|
256
|
-
}, {
|
|
257
|
-
kind: import("convex/values").VLiteral<"action", "required">;
|
|
258
|
-
key: import("convex/values").VString<string, "required">;
|
|
259
|
-
callback: import("convex/values").VObject<{
|
|
260
|
-
kind: "action";
|
|
261
|
-
handle: string;
|
|
262
|
-
retry: boolean;
|
|
263
|
-
}, {
|
|
264
|
-
kind: import("convex/values").VLiteral<"action", "required">;
|
|
265
|
-
handle: import("convex/values").VString<string, "required">;
|
|
266
|
-
retry: import("convex/values").VBoolean<boolean, "required">;
|
|
267
|
-
}, "required", "handle" | "kind" | "retry">;
|
|
268
|
-
}, "required", "callback" | "callback.handle" | "callback.kind" | "callback.retry" | "key" | "kind">], "required", "callback" | "callback.handle" | "callback.kind" | "callback.retry" | "key" | "kind">, import("convex/values").VObject<{
|
|
269
|
-
kind: "notify";
|
|
270
|
-
key: string;
|
|
271
|
-
callback: {
|
|
272
|
-
kind: "action";
|
|
273
|
-
handle: string;
|
|
274
|
-
retry: boolean;
|
|
275
|
-
};
|
|
276
|
-
}, {
|
|
277
|
-
kind: import("convex/values").VLiteral<"notify", "required">;
|
|
278
|
-
key: import("convex/values").VString<string, "required">;
|
|
279
|
-
callback: import("convex/values").VObject<{
|
|
280
|
-
kind: "action";
|
|
281
|
-
handle: string;
|
|
282
|
-
retry: boolean;
|
|
283
|
-
}, {
|
|
284
|
-
kind: import("convex/values").VLiteral<"action", "required">;
|
|
285
|
-
handle: import("convex/values").VString<string, "required">;
|
|
286
|
-
retry: import("convex/values").VBoolean<boolean, "required">;
|
|
287
|
-
}, "required", "handle" | "kind" | "retry">;
|
|
288
|
-
}, "required", "callback" | "callback.handle" | "callback.kind" | "callback.retry" | "key" | "kind">, import("convex/values").VObject<{
|
|
289
|
-
kind: "decision";
|
|
290
|
-
key: string;
|
|
291
|
-
decisions: ("approved" | "rejected")[];
|
|
292
|
-
quorum: {
|
|
293
|
-
kind: "count";
|
|
294
|
-
approvals: number;
|
|
295
|
-
};
|
|
296
|
-
makerChecker: boolean;
|
|
297
|
-
expiresAfterMs?: number | undefined;
|
|
298
|
-
}, {
|
|
299
|
-
kind: import("convex/values").VLiteral<"decision", "required">;
|
|
300
|
-
key: import("convex/values").VString<string, "required">;
|
|
301
|
-
decisions: import("convex/values").VArray<("approved" | "rejected")[], import("convex/values").VUnion<"approved" | "rejected", (import("convex/values").VLiteral<"approved", "required"> | import("convex/values").VLiteral<"rejected", "required">)[], "required", never>, "required">;
|
|
302
|
-
quorum: import("convex/values").VObject<{
|
|
303
|
-
kind: "count";
|
|
304
|
-
approvals: number;
|
|
305
|
-
}, {
|
|
306
|
-
kind: import("convex/values").VUnion<"count", import("convex/values").VLiteral<"count", "required">[], "required", never>;
|
|
307
|
-
approvals: import("convex/values").VFloat64<number, "required">;
|
|
308
|
-
}, "required", "approvals" | "kind">;
|
|
309
|
-
makerChecker: import("convex/values").VBoolean<boolean, "required">;
|
|
310
|
-
expiresAfterMs: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
311
|
-
}, "required", "decisions" | "expiresAfterMs" | "key" | "kind" | "makerChecker" | "quorum" | "quorum.approvals" | "quorum.kind">, import("convex/values").VObject<{
|
|
312
65
|
kind: "branch";
|
|
313
|
-
key: string;
|
|
314
|
-
approvedStepKey: string;
|
|
315
66
|
rejectedStepKey: string;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
67
|
+
})[];
|
|
68
|
+
};
|
|
69
|
+
workflowId?: string | undefined;
|
|
70
|
+
}, KNativeFields<{
|
|
71
|
+
scopeRef: KString;
|
|
72
|
+
resourceType: KString;
|
|
73
|
+
resourceRef: KString;
|
|
74
|
+
requester: KObject<{
|
|
75
|
+
actorRef: KString;
|
|
76
|
+
capabilities: KArray<KString>;
|
|
77
|
+
metadata: KOptional<KRecord<KString, KString>>;
|
|
78
|
+
}>;
|
|
79
|
+
metadata: KOptional<KRecord<KString, KString>>;
|
|
80
|
+
workflow: KObject<{
|
|
81
|
+
schemaVersion: KLiteral<1>;
|
|
82
|
+
compatibilityKey: KString;
|
|
83
|
+
name: KString;
|
|
84
|
+
steps: KArray<KUnion<readonly [KDiscriminatedUnion<"kind", readonly [KObject<{
|
|
85
|
+
kind: KLiteral<"mutation">;
|
|
86
|
+
key: KString;
|
|
87
|
+
callback: KObject<{
|
|
88
|
+
kind: KLiteral<"mutation">;
|
|
89
|
+
handle: KString;
|
|
90
|
+
retry: KBoolean;
|
|
91
|
+
}>;
|
|
92
|
+
}>, KObject<{
|
|
93
|
+
kind: KLiteral<"action">;
|
|
94
|
+
key: KString;
|
|
95
|
+
callback: KObject<{
|
|
96
|
+
kind: KLiteral<"action">;
|
|
97
|
+
handle: KString;
|
|
98
|
+
retry: KBoolean;
|
|
99
|
+
}>;
|
|
100
|
+
}>]>, KObject<{
|
|
101
|
+
kind: KLiteral<"notify">;
|
|
102
|
+
key: KString;
|
|
103
|
+
callback: KObject<{
|
|
104
|
+
kind: KLiteral<"action">;
|
|
105
|
+
handle: KString;
|
|
106
|
+
retry: KBoolean;
|
|
107
|
+
}>;
|
|
108
|
+
}>, KObject<{
|
|
109
|
+
kind: KLiteral<"decision">;
|
|
110
|
+
key: KString;
|
|
111
|
+
decisions: KArray<KEnum<readonly ["approved", "rejected"]>>;
|
|
112
|
+
quorum: KObject<{
|
|
113
|
+
kind: KEnum<readonly ["count"]>;
|
|
114
|
+
approvals: KNumber;
|
|
115
|
+
}>;
|
|
116
|
+
makerChecker: KBoolean;
|
|
117
|
+
expiresAfterMs: KOptional<KNumber>;
|
|
118
|
+
}>, KObject<{
|
|
119
|
+
kind: KLiteral<"branch">;
|
|
120
|
+
key: KString;
|
|
121
|
+
approvedStepKey: KString;
|
|
122
|
+
rejectedStepKey: KString;
|
|
123
|
+
}>]>>;
|
|
124
|
+
}>;
|
|
125
|
+
state: KEnum<readonly ["pending", "approved", "rejected", "expired", "canceled"]>;
|
|
126
|
+
currentStepKey: KOptional<KString>;
|
|
127
|
+
executionFailedStepKey: KOptional<KString>;
|
|
128
|
+
expiresAt: KOptional<KNumber>;
|
|
129
|
+
workflowId: KOptional<KString>;
|
|
130
|
+
createdAt: KNumber;
|
|
131
|
+
updatedAt: KNumber;
|
|
132
|
+
terminalAt: KOptional<KNumber>;
|
|
133
|
+
}>, "required", "createdAt" | "currentStepKey" | "executionFailedStepKey" | "expiresAt" | "metadata" | "requester" | "requester.actorRef" | "requester.capabilities" | "requester.metadata" | "resourceRef" | "resourceType" | "scopeRef" | "state" | "terminalAt" | "updatedAt" | "workflow" | "workflow.compatibilityKey" | "workflow.name" | "workflow.schemaVersion" | "workflow.steps" | "workflowId" | `metadata.${string}` | `requester.metadata.${string}`>, {
|
|
332
134
|
by_resourceType_and_resourceRef: ["resourceType", "resourceRef", "_creationTime"];
|
|
333
135
|
by_scopeRef_and_state: ["scopeRef", "state", "_creationTime"];
|
|
334
136
|
by_state_and_expiresAt: ["state", "expiresAt", "_creationTime"];
|
|
335
137
|
}, {}, {}>;
|
|
336
138
|
approvalDecisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
337
|
-
runId: string & {
|
|
338
|
-
__tableName: "approvalRuns";
|
|
339
|
-
};
|
|
340
|
-
stepKey: string;
|
|
341
139
|
actor: {
|
|
342
140
|
actorRef: string;
|
|
343
141
|
capabilities: string[];
|
|
344
|
-
metadata?:
|
|
345
|
-
[x: string]: string;
|
|
346
|
-
} | undefined;
|
|
142
|
+
metadata?: Record<string, string> | undefined;
|
|
347
143
|
};
|
|
144
|
+
decidedAt: number;
|
|
348
145
|
decision: "approved" | "rejected";
|
|
349
146
|
reason?: string | undefined;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}, "required", "actorRef" | "capabilities" | "metadata" | `metadata.${string}`>;
|
|
365
|
-
decision: import("convex/values").VUnion<"approved" | "rejected", (import("convex/values").VLiteral<"approved", "required"> | import("convex/values").VLiteral<"rejected", "required">)[], "required", never>;
|
|
366
|
-
reason: import("convex/values").VString<string | undefined, "optional">;
|
|
367
|
-
decidedAt: import("convex/values").VFloat64<number, "required">;
|
|
368
|
-
}, "required", "actor" | "actor.actorRef" | "actor.capabilities" | "actor.metadata" | "decidedAt" | "decision" | "reason" | "runId" | "stepKey" | `actor.metadata.${string}`>, {
|
|
147
|
+
runId: import("convex/values").GenericId<"approvalRuns">;
|
|
148
|
+
stepKey: string;
|
|
149
|
+
}, KNativeFields<{
|
|
150
|
+
runId: KId<"approvalRuns">;
|
|
151
|
+
stepKey: KString;
|
|
152
|
+
actor: KObject<{
|
|
153
|
+
actorRef: KString;
|
|
154
|
+
capabilities: KArray<KString>;
|
|
155
|
+
metadata: KOptional<KRecord<KString, KString>>;
|
|
156
|
+
}>;
|
|
157
|
+
decision: KEnum<readonly ["approved", "rejected"]>;
|
|
158
|
+
reason: KOptional<KString>;
|
|
159
|
+
decidedAt: KNumber;
|
|
160
|
+
}>, "required", "actor" | "actor.actorRef" | "actor.capabilities" | "actor.metadata" | "decidedAt" | "decision" | "reason" | "runId" | "stepKey" | `actor.metadata.${string}`>, {
|
|
369
161
|
by_runId_and_decidedAt: ["runId", "decidedAt", "_creationTime"];
|
|
370
162
|
by_runId_and_stepKey_and_actor_actorRef: ["runId", "stepKey", "actor.actorRef", "_creationTime"];
|
|
371
163
|
by_runId_and_stepKey_and_decidedAt: ["runId", "stepKey", "decidedAt", "_creationTime"];
|
|
372
164
|
}, {}, {}>;
|
|
373
165
|
}, true>;
|
|
374
|
-
//#endregion
|
|
375
166
|
export { _default as default };
|
|
376
167
|
//# sourceMappingURL=schema.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{APPROVAL_ACTOR_DECISION_INDEX as e,APPROVAL_DECISION_HISTORY_INDEX as t}from"./constants.mjs";import{approvalDecisionDocument as n,approvalRunDocument as r}from"./validators.mjs";import{
|
|
1
|
+
import{APPROVAL_ACTOR_DECISION_INDEX as e,APPROVAL_DECISION_HISTORY_INDEX as t}from"./constants.mjs";import{approvalDecisionDocument as n,approvalRunDocument as r}from"./validators.mjs";import{defineSchema as i,defineTable as a}from"convex/server";var o=i({approvalRuns:a(r.validator).index(`by_resourceType_and_resourceRef`,[`resourceType`,`resourceRef`]).index(`by_scopeRef_and_state`,[`scopeRef`,`state`]).index(`by_state_and_expiresAt`,[`state`,`expiresAt`]),approvalDecisions:a(n.validator).index(e,[`runId`,`stepKey`,`actor.actorRef`]).index(`by_runId_and_stepKey_and_decidedAt`,[`runId`,`stepKey`,`decidedAt`]).index(t,[`runId`,`decidedAt`])});export{o as default};
|