@contractspec/lib.testing 1.56.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/jest-adapter.d.ts.map +1 -1
- package/dist/adapters/vitest-adapter.d.ts.map +1 -1
- package/dist/generator/assertion-builder.d.ts.map +1 -1
- package/dist/generator/golden-test-generator.d.ts.map +1 -1
- package/dist/recorder/traffic-recorder.d.ts.map +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/contracts/src/app-config/lifecycle.d.ts +0 -1
- package/dist/contracts/src/app-config/runtime.d.ts +0 -13
- package/dist/contracts/src/app-config/spec.d.ts +0 -9
- package/dist/contracts/src/app-config/validation.d.ts +0 -8
- package/dist/contracts/src/capabilities/capabilities.d.ts +0 -13
- package/dist/contracts/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/contracts/src/capabilities/context.d.ts +0 -1
- package/dist/contracts/src/capabilities/guards.d.ts +0 -4
- package/dist/contracts/src/capabilities/index.d.ts +0 -5
- package/dist/contracts/src/capabilities/openbanking.d.ts +0 -1
- package/dist/contracts/src/capabilities/validation.d.ts +0 -4
- package/dist/contracts/src/client/index.d.ts +0 -1
- package/dist/contracts/src/client/react/drivers/rn-reusables.d.ts +0 -1
- package/dist/contracts/src/client/react/drivers/shadcn.d.ts +0 -1
- package/dist/contracts/src/client/react/feature-render.d.ts +0 -3
- package/dist/contracts/src/client/react/form-render.d.ts +0 -4
- package/dist/contracts/src/client/react/index.d.ts +0 -4
- package/dist/contracts/src/contract-registry/index.d.ts +0 -2
- package/dist/contracts/src/contract-registry/schemas.d.ts +0 -2
- package/dist/contracts/src/contract-registry/types.d.ts +0 -1
- package/dist/contracts/src/data-views/index.d.ts +0 -3
- package/dist/contracts/src/data-views/registry.d.ts +0 -2
- package/dist/contracts/src/data-views/report/contractVerificationTable.d.ts +0 -1
- package/dist/contracts/src/data-views/spec.d.ts +0 -3
- package/dist/contracts/src/data-views/types.d.ts +0 -2
- package/dist/contracts/src/docs/accessibility_wcag_compliance_specs.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/capabilities/documentationSystem.capability.d.ts +0 -1
- package/dist/contracts/src/docs/capabilities/index.d.ts +0 -1
- package/dist/contracts/src/docs/commands/docsGenerate.command.d.ts +0 -2
- package/dist/contracts/src/docs/commands/docsPublish.command.d.ts +0 -2
- package/dist/contracts/src/docs/commands/index.d.ts +0 -2
- package/dist/contracts/src/docs/contracts.d.ts +0 -7
- package/dist/contracts/src/docs/events/docsGenerated.event.d.ts +0 -2
- package/dist/contracts/src/docs/events/docsPublished.event.d.ts +0 -2
- package/dist/contracts/src/docs/events/index.d.ts +0 -2
- package/dist/contracts/src/docs/forms/docsSearch.form.d.ts +0 -2
- package/dist/contracts/src/docs/forms/index.d.ts +0 -1
- package/dist/contracts/src/docs/index.d.ts +0 -33
- package/dist/contracts/src/docs/presentations/docsLayout.presentation.d.ts +0 -1
- package/dist/contracts/src/docs/presentations/docsReferencePage.presentation.d.ts +0 -1
- package/dist/contracts/src/docs/presentations/index.d.ts +0 -2
- package/dist/contracts/src/docs/presentations.d.ts +0 -2
- package/dist/contracts/src/docs/queries/contractReference.query.d.ts +0 -2
- package/dist/contracts/src/docs/queries/docsIndex.query.d.ts +0 -2
- package/dist/contracts/src/docs/queries/index.d.ts +0 -2
- package/dist/contracts/src/docs/registry.d.ts +0 -10
- package/dist/contracts/src/docs/registry.d.ts.map +0 -1
- package/dist/contracts/src/docs/tech/auth/better-auth-nextjs.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/contracts/README.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/contracts/openapi-export.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/contracts/openapi-import.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/lifecycle-stage-system.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/llm/llm-integration.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/mcp-endpoints.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/presentation-runtime.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/schema/README.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/learning-events.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/learning-journeys.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/platform-admin-panel.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/project-access-teams.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/project-routing.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/sandbox-unlogged.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/team-invitations.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/workspace-ops.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/studio/workspaces.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/telemetry-ingest.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/tech/vscode-extension.docblock.d.ts +0 -1
- package/dist/contracts/src/docs/views/contractReference.dataView.d.ts +0 -1
- package/dist/contracts/src/docs/views/docsIndex.dataView.d.ts +0 -1
- package/dist/contracts/src/docs/views/exampleCatalog.dataView.d.ts +0 -1
- package/dist/contracts/src/docs/views/index.d.ts +0 -3
- package/dist/contracts/src/events.d.ts +0 -45
- package/dist/contracts/src/events.d.ts.map +0 -1
- package/dist/contracts/src/examples/index.d.ts +0 -4
- package/dist/contracts/src/examples/registry.d.ts +0 -2
- package/dist/contracts/src/examples/schema.d.ts +0 -2
- package/dist/contracts/src/examples/types.d.ts +0 -3
- package/dist/contracts/src/examples/validation.d.ts +0 -1
- package/dist/contracts/src/experiments/evaluator.d.ts +0 -2
- package/dist/contracts/src/experiments/spec-resolver.d.ts +0 -4
- package/dist/contracts/src/experiments/spec.d.ts +0 -4
- package/dist/contracts/src/features/index.d.ts +0 -4
- package/dist/contracts/src/features/install.d.ts +0 -6
- package/dist/contracts/src/features/registry.d.ts +0 -2
- package/dist/contracts/src/features/types.d.ts +0 -5
- package/dist/contracts/src/features/validation.d.ts +0 -2
- package/dist/contracts/src/forms/forms.d.ts +0 -3
- package/dist/contracts/src/forms/index.d.ts +0 -1
- package/dist/contracts/src/index.d.ts +0 -51
- package/dist/contracts/src/install.d.ts +0 -7
- package/dist/contracts/src/integrations/connection.d.ts +0 -1
- package/dist/contracts/src/integrations/index.d.ts +0 -6
- package/dist/contracts/src/integrations/openbanking/contracts/accounts.d.ts +0 -4
- package/dist/contracts/src/integrations/openbanking/contracts/balances.d.ts +0 -4
- package/dist/contracts/src/integrations/openbanking/contracts/index.d.ts +0 -5
- package/dist/contracts/src/integrations/openbanking/contracts/transactions.d.ts +0 -4
- package/dist/contracts/src/integrations/openbanking/guards.d.ts +0 -1
- package/dist/contracts/src/integrations/openbanking/models.d.ts +0 -1
- package/dist/contracts/src/integrations/openbanking/openbanking.feature.d.ts +0 -1
- package/dist/contracts/src/integrations/operations.d.ts +0 -4
- package/dist/contracts/src/integrations/providers/elevenlabs.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/gcs-storage.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/gmail.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/google-calendar.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/index.d.ts +0 -11
- package/dist/contracts/src/integrations/providers/mistral.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/postmark.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/powens.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/qdrant.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/registry.d.ts +0 -1
- package/dist/contracts/src/integrations/providers/stripe.d.ts +0 -2
- package/dist/contracts/src/integrations/providers/twilio-sms.d.ts +0 -2
- package/dist/contracts/src/integrations/spec.d.ts +0 -3
- package/dist/contracts/src/jsonschema.d.ts +0 -4
- package/dist/contracts/src/knowledge/index.d.ts +0 -2
- package/dist/contracts/src/knowledge/operations.d.ts +0 -4
- package/dist/contracts/src/knowledge/spaces/email-threads.d.ts +0 -1
- package/dist/contracts/src/knowledge/spaces/financial-docs.d.ts +0 -1
- package/dist/contracts/src/knowledge/spaces/financial-overview.d.ts +0 -1
- package/dist/contracts/src/knowledge/spaces/index.d.ts +0 -6
- package/dist/contracts/src/knowledge/spaces/product-canon.d.ts +0 -1
- package/dist/contracts/src/knowledge/spaces/support-faq.d.ts +0 -1
- package/dist/contracts/src/knowledge/spaces/uploaded-docs.d.ts +0 -1
- package/dist/contracts/src/knowledge/spec.d.ts +0 -3
- package/dist/contracts/src/llm/exporters.d.ts +0 -7
- package/dist/contracts/src/llm/index.d.ts +0 -3
- package/dist/contracts/src/llm/prompts.d.ts +0 -2
- package/dist/contracts/src/llm/types.d.ts +0 -5
- package/dist/contracts/src/migrations.d.ts +0 -1
- package/dist/contracts/src/model-registry.d.ts +0 -1
- package/dist/contracts/src/onboarding-base.d.ts +0 -2
- package/dist/contracts/src/openapi.d.ts +0 -1
- package/dist/contracts/src/operations/index.d.ts +0 -3
- package/dist/contracts/src/operations/operation.d.ts +0 -176
- package/dist/contracts/src/operations/operation.d.ts.map +0 -1
- package/dist/contracts/src/operations/registry.d.ts +0 -6
- package/dist/contracts/src/operations/report/getContractVerificationStatus.d.ts +0 -3
- package/dist/contracts/src/operations/report/index.d.ts +0 -4
- package/dist/contracts/src/ownership.d.ts +0 -164
- package/dist/contracts/src/ownership.d.ts.map +0 -1
- package/dist/contracts/src/policy/engine.d.ts +0 -3
- package/dist/contracts/src/policy/guards.d.ts +0 -1
- package/dist/contracts/src/policy/index.d.ts +0 -6
- package/dist/contracts/src/policy/opa-adapter.d.ts +0 -3
- package/dist/contracts/src/policy/registry.d.ts +0 -2
- package/dist/contracts/src/policy/spec.d.ts +0 -13
- package/dist/contracts/src/policy/spec.d.ts.map +0 -1
- package/dist/contracts/src/policy/validation.d.ts +0 -3
- package/dist/contracts/src/presentations/index.d.ts +0 -3
- package/dist/contracts/src/presentations/presentations.d.ts +0 -3
- package/dist/contracts/src/presentations/registry.d.ts +0 -2
- package/dist/contracts/src/presentations/transform-engine.d.ts +0 -2
- package/dist/contracts/src/prompt.d.ts +0 -2
- package/dist/contracts/src/promptRegistry.d.ts +0 -2
- package/dist/contracts/src/regenerator/adapters.d.ts +0 -1
- package/dist/contracts/src/regenerator/executor.d.ts +0 -1
- package/dist/contracts/src/regenerator/index.d.ts +0 -6
- package/dist/contracts/src/regenerator/service.d.ts +0 -2
- package/dist/contracts/src/regenerator/sinks.d.ts +0 -2
- package/dist/contracts/src/regenerator/types.d.ts +0 -3
- package/dist/contracts/src/regenerator/utils.d.ts +0 -1
- package/dist/contracts/src/registry-utils.d.ts +0 -1
- package/dist/contracts/src/registry.d.ts +0 -3
- package/dist/contracts/src/resources.d.ts +0 -19
- package/dist/contracts/src/resources.d.ts.map +0 -1
- package/dist/contracts/src/schema-to-markdown.d.ts +0 -1
- package/dist/contracts/src/serialization/index.d.ts +0 -1
- package/dist/contracts/src/serialization/serializers.d.ts +0 -7
- package/dist/contracts/src/server/graphql-pothos.d.ts +0 -7
- package/dist/contracts/src/server/index.d.ts +0 -7
- package/dist/contracts/src/server/mcp/createMcpServer.d.ts +0 -5
- package/dist/contracts/src/server/mcp/mcpTypes.d.ts +0 -2
- package/dist/contracts/src/server/provider-mcp.d.ts +0 -1
- package/dist/contracts/src/server/rest-elysia.d.ts +0 -3
- package/dist/contracts/src/server/rest-express.d.ts +0 -3
- package/dist/contracts/src/server/rest-generic.d.ts +0 -2
- package/dist/contracts/src/server/rest-next-app.d.ts +0 -3
- package/dist/contracts/src/server/rest-next-pages.d.ts +0 -3
- package/dist/contracts/src/telemetry/anomaly.d.ts +0 -2
- package/dist/contracts/src/telemetry/index.d.ts +0 -3
- package/dist/contracts/src/telemetry/spec.d.ts +0 -2
- package/dist/contracts/src/telemetry/tracker.d.ts +0 -3
- package/dist/contracts/src/tests/index.d.ts +0 -2
- package/dist/contracts/src/tests/runner.d.ts +0 -3
- package/dist/contracts/src/tests/spec.d.ts +0 -13
- package/dist/contracts/src/tests/spec.d.ts.map +0 -1
- package/dist/contracts/src/themes.d.ts +0 -2
- package/dist/contracts/src/types.d.ts +0 -5
- package/dist/contracts/src/versioning/refs.d.ts +0 -47
- package/dist/contracts/src/versioning/refs.d.ts.map +0 -1
- package/dist/contracts/src/workflow/adapters/db-adapter.d.ts +0 -1
- package/dist/contracts/src/workflow/adapters/file-adapter.d.ts +0 -1
- package/dist/contracts/src/workflow/adapters/index.d.ts +0 -3
- package/dist/contracts/src/workflow/adapters/memory-store.d.ts +0 -1
- package/dist/contracts/src/workflow/context.d.ts +0 -2
- package/dist/contracts/src/workflow/index.d.ts +0 -7
- package/dist/contracts/src/workflow/overview.docblock.d.ts +0 -1
- package/dist/contracts/src/workflow/runner.d.ts +0 -5
- package/dist/contracts/src/workflow/sla-monitor.d.ts +0 -2
- package/dist/contracts/src/workflow/spec.d.ts +0 -5
- package/dist/contracts/src/workflow/state.d.ts +0 -1
- package/dist/contracts/src/workflow/validation.d.ts +0 -5
- package/dist/contracts/src/workspace-config/contractsrc-schema.d.ts +0 -1
- package/dist/contracts/src/workspace-config/index.d.ts +0 -1
- package/dist/contracts/src/workspace-config/workspace-config.docblock.d.ts +0 -1
- package/dist/schema/src/EnumType.d.ts +0 -36
- package/dist/schema/src/EnumType.d.ts.map +0 -1
- package/dist/schema/src/FieldType.d.ts +0 -30
- package/dist/schema/src/FieldType.d.ts.map +0 -1
- package/dist/schema/src/GraphQLSchemaType.d.ts +0 -2
- package/dist/schema/src/JsonSchemaType.d.ts +0 -2
- package/dist/schema/src/ScalarTypeEnum.d.ts +0 -1
- package/dist/schema/src/SchemaModel.d.ts +0 -70
- package/dist/schema/src/SchemaModel.d.ts.map +0 -1
- package/dist/schema/src/SchemaModelType.d.ts +0 -38
- package/dist/schema/src/SchemaModelType.d.ts.map +0 -1
- package/dist/schema/src/ZodSchemaType.d.ts +0 -2
- package/dist/schema/src/entity/defineEntity.d.ts +0 -1
- package/dist/schema/src/entity/generator.d.ts +0 -1
- package/dist/schema/src/entity/index.d.ts +0 -3
- package/dist/schema/src/entity/types.d.ts +0 -1
- package/dist/schema/src/index.d.ts +0 -9
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { VersionedSpecRef } from "../versioning/refs.js";
|
|
2
|
-
import "../ownership.js";
|
|
3
|
-
|
|
4
|
-
//#region ../contracts/src/policy/spec.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Reference to a policy spec.
|
|
8
|
-
* Uses key and version to identify a specific policy.
|
|
9
|
-
*/
|
|
10
|
-
type PolicyRef = VersionedSpecRef;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { PolicyRef };
|
|
13
|
-
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/policy/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAyHY,SAAA,GAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./ownership.js";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "./ownership.js";
|
|
2
|
-
import "zod";
|
|
3
|
-
|
|
4
|
-
//#region ../contracts/src/resources.d.ts
|
|
5
|
-
|
|
6
|
-
interface ResourceRefDescriptor<Many extends boolean> {
|
|
7
|
-
kind: 'resource_ref';
|
|
8
|
-
/** URI template, e.g. 'strit://spot/{id}' */
|
|
9
|
-
uriTemplate: string;
|
|
10
|
-
/** Variable name inside result payload to substitute into template; defaults to 'id' */
|
|
11
|
-
varName?: string;
|
|
12
|
-
/** Optional GraphQL type name to use when exposing over GraphQL (e.g., 'Spot') */
|
|
13
|
-
graphQLType: string;
|
|
14
|
-
/** Cardinality: when present and true, the handler returns an array of resources */
|
|
15
|
-
many: Many;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { ResourceRefDescriptor };
|
|
19
|
-
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","names":[],"sources":["../../../../contracts/src/resources.ts"],"sourcesContent":[],"mappings":";;;;;UAiFiB;;;;;;;;;QAST"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../../schema/src/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./serializers.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./mcp/createMcpServer.js";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OptionalVersionedSpecRef } from "../versioning/refs.js";
|
|
2
|
-
import "../ownership.js";
|
|
3
|
-
|
|
4
|
-
//#region ../contracts/src/tests/spec.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Reference to a test spec.
|
|
8
|
-
* Version is optional; when omitted, refers to the latest version.
|
|
9
|
-
*/
|
|
10
|
-
type TestSpecRef = OptionalVersionedSpecRef;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { TestSpecRef };
|
|
13
|
-
//# sourceMappingURL=spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spec.d.ts","names":[],"sources":["../../../../../contracts/src/tests/spec.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAwFY,WAAA,GAAc"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region ../contracts/src/versioning/refs.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Base reference types for ContractSpec versioning.
|
|
4
|
-
*
|
|
5
|
-
* Provides canonical reference types for linking between specs.
|
|
6
|
-
* Domain-specific refs (OpRef, EventRef, etc.) should alias these
|
|
7
|
-
* base types for consistency and maintainability.
|
|
8
|
-
*
|
|
9
|
-
* @module versioning/refs
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Base reference type for versioned specs.
|
|
13
|
-
* Used to reference any spec by its key and version.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const opRef: VersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
interface VersionedSpecRef {
|
|
21
|
-
/** Unique key identifying the spec (e.g., "auth.login", "user.created"). */
|
|
22
|
-
key: string;
|
|
23
|
-
/** Semantic version of the spec (e.g., "1.0.0", "2.1.0"). */
|
|
24
|
-
version: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Base reference type for specs with optional version.
|
|
28
|
-
* When version is omitted, typically refers to the latest version.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* // Reference to latest version
|
|
33
|
-
* const latestRef: OptionalVersionedSpecRef = { key: 'auth.login' };
|
|
34
|
-
*
|
|
35
|
-
* // Reference to specific version
|
|
36
|
-
* const specificRef: OptionalVersionedSpecRef = { key: 'auth.login', version: '1.0.0' };
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
interface OptionalVersionedSpecRef {
|
|
40
|
-
/** Unique key identifying the spec. */
|
|
41
|
-
key: string;
|
|
42
|
-
/** Optional semantic version. When omitted, refers to the latest version. */
|
|
43
|
-
version?: string;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
export { OptionalVersionedSpecRef, VersionedSpecRef };
|
|
47
|
-
//# sourceMappingURL=refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refs.d.ts","names":[],"sources":["../../../../../contracts/src/versioning/refs.ts"],"sourcesContent":[],"mappings":";;AAuBA;AAoBA;;;;;;;;;;;;;;;;UApBiB,gBAAA;;;;;;;;;;;;;;;;;;;UAoBA,wBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../state.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../state.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../state.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../docs/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./spec.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "zod";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./contractsrc-schema.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../docs/index.js";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { GraphQLEnumType } from "graphql";
|
|
3
|
-
|
|
4
|
-
//#region ../schema/src/EnumType.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Strongly-typed string enum wrapper with one source of truth for zod, GraphQL, and JSON Schema.
|
|
8
|
-
*/
|
|
9
|
-
declare class EnumType<T extends [string, ...string[]]> {
|
|
10
|
-
private readonly name;
|
|
11
|
-
private readonly values;
|
|
12
|
-
private readonly gqlEnum;
|
|
13
|
-
constructor(name: string, values: T);
|
|
14
|
-
/** Enum type name (used by GraphQL and JSON Schema). */
|
|
15
|
-
getName(): string;
|
|
16
|
-
/** Returns the literal tuple of allowed values. */
|
|
17
|
-
getEnumValues(): T;
|
|
18
|
-
/** GraphQL enum instance suitable for Pothos or vanilla GraphQL schemas. */
|
|
19
|
-
getPothos(): GraphQLEnumType;
|
|
20
|
-
/** zod schema representing this enum. */
|
|
21
|
-
getZod(): z.ZodEnum<{ [K in T[number]]: K }>;
|
|
22
|
-
/** Minimal JSON representation (alias of getJsonSchema). */
|
|
23
|
-
getJson(): {
|
|
24
|
-
type: 'string';
|
|
25
|
-
enum: T;
|
|
26
|
-
};
|
|
27
|
-
/** JSON Schema for this enum. */
|
|
28
|
-
getJsonSchema(): {
|
|
29
|
-
type: 'string';
|
|
30
|
-
enum: T;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
type AnyEnumType = EnumType<[string, ...string[]]>;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { AnyEnumType, EnumType };
|
|
36
|
-
//# sourceMappingURL=EnumType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnumType.d.ts","names":[],"sources":["../../../../schema/src/EnumType.ts"],"sourcesContent":[],"mappings":";;;;;;;AAMA;AAKoC,cALvB,QAKuB,CAAA,UAAA,CAAA,MAAA,EAAA,GAAA,MAAA,EAAA,CAAA,CAAA,CAAA;EAejB,iBAAA,IAAA;EAMJ,iBAAA,MAAA;EAKe,iBAAA,OAAA;EAAY,WAAA,CAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EA1BN,CA0BM;EAA5B;EAKuB,OAAA,CAAA,CAAA,EAAA,MAAA;EAKM;EAAC,aAAA,CAAA,CAAA,EArBzB,CAqByB;EAKhC;eApBG;;YAKH,CAAA,CAAE,gBAAgB,YAAY;;;;UAKL;;;;;UAKM;;;KAK/B,WAAA,GAAc"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { GraphQLScalarType, GraphQLScalarTypeConfig } from "graphql";
|
|
3
|
-
|
|
4
|
-
//#region ../schema/src/FieldType.d.ts
|
|
5
|
-
interface FieldTypeConfig<TInternal, TExternal = TInternal> extends GraphQLScalarTypeConfig<TInternal, TExternal> {
|
|
6
|
-
zod: z.ZodType<TInternal>;
|
|
7
|
-
jsonSchema: unknown | (() => unknown);
|
|
8
|
-
}
|
|
9
|
-
type AnyFieldType = FieldType<any, any>;
|
|
10
|
-
/**
|
|
11
|
-
* GraphQL scalar wrapper that carries zod and JSON Schema metadata.
|
|
12
|
-
*
|
|
13
|
-
* TInternal is the runtime representation; TExternal is the GraphQL output.
|
|
14
|
-
*/
|
|
15
|
-
declare class FieldType<TInternal, TExternal = TInternal> extends GraphQLScalarType<TInternal, TExternal> {
|
|
16
|
-
private zodSchema;
|
|
17
|
-
private readonly jsonSchemaDef?;
|
|
18
|
-
constructor(config: FieldTypeConfig<TInternal, TExternal>);
|
|
19
|
-
/** Return the attached zod schema for validation. */
|
|
20
|
-
getZod(): z.ZodType<TInternal>;
|
|
21
|
-
/** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
|
|
22
|
-
getPothos(): GraphQLScalarType<TInternal, TExternal>;
|
|
23
|
-
/** Return the JSON Schema (evaluates factory if provided). */
|
|
24
|
-
getJson(): unknown;
|
|
25
|
-
getJsonSchemaDef(): unknown | (() => unknown);
|
|
26
|
-
getJsonSchema(): unknown;
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { AnyFieldType, FieldType, FieldTypeConfig };
|
|
30
|
-
//# sourceMappingURL=FieldType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldType.d.ts","names":[],"sources":["../../../../schema/src/FieldType.ts"],"sourcesContent":[],"mappings":";;;;UAGiB,uCAEH,mBACJ,wBAAwB,WAAW;OACtC,CAAA,CAAE,QAAQ;EAJA,UAAA,EAAA,OAAe,GAAA,CAAA,GAAA,GAAA,OAAA,CAAA;;AAGE,KAMtB,YAAA,GAAe,SANO,CAAA,GAAA,EAAA,GAAA,CAAA;;;;;;AAMtB,cAOC,SAPW,CAAG,SAAA,EAAS,YAStB,SATsB,CAAA,SAU1B,iBAV0B,CAUR,SAVQ,EAUG,SAVH,CAAA,CAAA;EAOvB,QAAA,SAAS;EAER,iBAAA,aAAA;EACc,WAAA,CAAA,MAAA,EAIN,eAJM,CAIU,SAJV,EAIqB,SAJrB,CAAA;EAAW;EAID,MAAA,CAAA,CAAA,EAO1B,CAAA,CAAE,OAPwB,CAOhB,SAPgB,CAAA;EAAW;EAA3B,SAAA,CAAA,CAAA,EAYP,iBAZO,CAYW,SAZX,EAYsB,SAZtB,CAAA;EAOA;EAAR,OAAA,CAAA,CAAA,EAAA,OAAA;EAKmB,gBAAA,CAAA,CAAA,EAAA,OAAA,GAAA,CAAA,GAAA,GAAA,OAAA,CAAA;EAAW,aAAA,CAAA,CAAA,EAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./FieldType.js";
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { AnyFieldType } from "./FieldType.js";
|
|
2
|
-
import { AnyEnumType } from "./EnumType.js";
|
|
3
|
-
import { SchemaModelType } from "./SchemaModelType.js";
|
|
4
|
-
import * as z from "zod";
|
|
5
|
-
import { Maybe } from "graphql/jsutils/Maybe";
|
|
6
|
-
|
|
7
|
-
//#region ../schema/src/SchemaModel.d.ts
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* All types that can be used as field types in a SchemaModel.
|
|
11
|
-
* Supports FieldType, EnumType, nested SchemaModel, or any SchemaType implementation.
|
|
12
|
-
*/
|
|
13
|
-
type FieldLike = AnyFieldType | AnyEnumType | AnySchemaModel | SchemaModelType;
|
|
14
|
-
/** Field configuration for a SchemaModel property. */
|
|
15
|
-
interface SchemaFieldConfig<Type extends FieldLike = FieldLike> {
|
|
16
|
-
type: Type;
|
|
17
|
-
isOptional: boolean;
|
|
18
|
-
/** When present and true, the field is an array */
|
|
19
|
-
isArray?: true;
|
|
20
|
-
}
|
|
21
|
-
type SchemaModelFieldsAnyConfig<Type extends FieldLike = FieldLike> = Record<string, SchemaFieldConfig<Type>>;
|
|
22
|
-
/** Model definition: name and fields. */
|
|
23
|
-
interface SchemaModelConfig<Fields extends SchemaModelFieldsAnyConfig> {
|
|
24
|
-
name: string;
|
|
25
|
-
description?: Maybe<string>;
|
|
26
|
-
fields: Fields;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Named object model built from FieldType/EnumType/SchemaModel fields.
|
|
30
|
-
* Provides zod and GraphQL input helpers, and supports arrays/optional fields.
|
|
31
|
-
*/
|
|
32
|
-
declare class SchemaModel<Fields extends SchemaModelFieldsAnyConfig> implements SchemaModelType {
|
|
33
|
-
readonly config: SchemaModelConfig<Fields>;
|
|
34
|
-
constructor(config: SchemaModelConfig<Fields>);
|
|
35
|
-
/**
|
|
36
|
-
* Build a typed ZodObject from the model fields, preserving each field's
|
|
37
|
-
* Zod schema and optionality at the type level when possible.
|
|
38
|
-
*/
|
|
39
|
-
getZod(): TopLevelZodFromModel<Fields>;
|
|
40
|
-
/** Input object name for GraphQL builder adapters. */
|
|
41
|
-
getPothosInput(): string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Union of all types that can serve as a schema model.
|
|
45
|
-
* This is the main type expected by OperationSpec, EventSpec, FormSpec, etc.
|
|
46
|
-
*
|
|
47
|
-
* Supports:
|
|
48
|
-
* - SchemaModel instances (native ContractSpec types)
|
|
49
|
-
* - Any SchemaType implementation (ZodSchemaType, JsonSchemaType, etc.)
|
|
50
|
-
*/
|
|
51
|
-
type AnySchemaModel = SchemaModel<SchemaModelFieldsAnyConfig> | SchemaModelType;
|
|
52
|
-
type InferZodFromType<T> = T extends SchemaModel<SchemaModelFieldsAnyConfig> ? z.ZodObject<z.ZodRawShape> : T extends AnyFieldType ? ReturnType<T['getZod']> : T extends AnyEnumType ? ReturnType<T['getZod']> : T extends SchemaModelType ? ReturnType<T['getZod']> : z.ZodUnknown;
|
|
53
|
-
type MaybeArray<Z extends z.ZodType, A> = A extends true ? z.ZodArray<Z> : Z;
|
|
54
|
-
type MaybeOptional<Z extends z.ZodType, O> = O extends true ? z.ZodOptional<Z> : Z;
|
|
55
|
-
/**
|
|
56
|
-
* Helper type: derive the Zod shape from the field config.
|
|
57
|
-
* Supports nested SchemaModel and arrays, preserving optionality and list-ness.
|
|
58
|
-
*/
|
|
59
|
-
type FieldIsArray<FC> = FC extends {
|
|
60
|
-
isArray: true;
|
|
61
|
-
} ? true : false;
|
|
62
|
-
type ZodShapeFromFields<F extends SchemaModelFieldsAnyConfig> = { [K in keyof F]: MaybeOptional<MaybeArray<InferZodFromType<F[K]['type']>, FieldIsArray<F[K]>>, F[K]['isOptional']> };
|
|
63
|
-
/**
|
|
64
|
-
* The top-level Zod schema returned by getZod():
|
|
65
|
-
* either ZodObject<...> or ZodArray<ZodObject<...>> when config.isArray.
|
|
66
|
-
*/
|
|
67
|
-
type TopLevelZodFromModel<F extends SchemaModelFieldsAnyConfig> = z.ZodObject<ZodShapeFromFields<F>>;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { AnySchemaModel, SchemaFieldConfig, SchemaModel, SchemaModelConfig, SchemaModelFieldsAnyConfig, TopLevelZodFromModel, ZodShapeFromFields };
|
|
70
|
-
//# sourceMappingURL=SchemaModel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaModel.d.ts","names":[],"sources":["../../../../schema/src/SchemaModel.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAImD;;KAM9C,SAAA,GAAY,YAAe,GAAA,WAAA,GAAc,cAAd,GAA+B,eAA/B;;AAA+B,UAG9C,iBAH8C,CAAA,aAGf,SAHe,GAGH,SAHG,CAAA,CAAA;EAAe,IAAA,EAItE,IAJsE;EAG7D,UAAA,EAAA,OAAA;EAA+B;EAAY,OAAA,CAAA,EAAA,IAAA;;AAChD,KAMA,0BANA,CAAA,aAMwC,SANxC,GAMoD,SANpD,CAAA,GAOV,MAPU,CAAA,MAAA,EAOK,iBAPL,CAOuB,IAPvB,CAAA,CAAA;AAMZ;AAAoD,UAInC,iBAJmC,CAAA,eAIF,0BAJE,CAAA,CAAA;EAAY,IAAA,EAAA,MAAA;EAC7B,WAAA,CAAA,EAKnB,KALmB,CAAA,MAAA,CAAA;EAAlB,MAAA,EAMP,MANO;;;AAGjB;;;AAGU,cAOG,WAPH,CAAA,eAQO,0BARP,CAAA,YASG,eATH,CAAA;EAAM,SAAA,MAAA,EAUsB,iBAVtB,CAUwC,MAVxC,CAAA;EAOH,WAAA,CAAA,MAAW,EAGc,iBAHd,CAGgC,MAHhC,CAAA;EACP;;;;EAEqB,MAAA,CAAA,CAAA,EAM1B,oBAN0B,CAML,MANK,CAAA;EAML;EAArB,cAAA,CAAA,CAAA,EAAA,MAAA;;;AA8BZ;;;;;AAkCE;;AAGsB,KArCZ,cAAA,GACR,WAoCoB,CApCR,0BAoCQ,CAAA,GAnCpB,eAmCoB;AAQA,KATnB,gBAWU,CAAA,CAAA,CAAA,GAVb,CAUa,SAVH,WAUG,CAVS,0BAUT,CAAA,GATT,CAAA,CAAE,SASO,CATG,CAAA,CAAE,WASL,CAAA,GART,CAQS,SARC,YAQD,GAPP,UAOO,CAPI,CAOJ,CAAA,QAAA,CAAA,CAAA,GANP,CAMO,SANG,WAMH,GALL,UAKK,CALM,CAKN,CAAA,QAAA,CAAA,CAAA,GAJL,CAIK,SAJK,eAIL,GAHH,UAGG,CAHQ,CAGR,CAAA,QAAA,CAAA,CAAA,GAFH,CAAA,CAAE,UAEC;KAAV,UAAuB,CAAA,UAAF,CAAA,CAAE,OAAA,EAAA,CAAA,CAAA,GAAc,CAAd,SAAA,IAAA,GAA+B,CAAA,CAAE,QAAjC,CAA0C,CAA1C,CAAA,GAA+C,CAA/C;KACvB,aADqC,CAAA,UACb,CAAA,CAAE,OADW,EAAA,CAAA,CAAA,GACG,CADH,SAAA,IAAA,GAEtC,CAAA,CAAE,WAFoC,CAExB,CAFwB,CAAA,GAGtC,CAHsC;;;;;AAAkC,KASvE,YARA,CAAA,EAAa,CAAA,GAQM,EARN,SAAA;EAAa,OAAA,EAAA,IAAA;CAAc,GAAA,IAAA,GAAA,KAAA;AAC3B,KASN,kBATM,CAAA,UASuB,0BATvB,CAAA,GAAA,QAAZ,MAUQ,CAVR,GAUY,aAVZ,CAWF,UAXE,CAWS,gBAXT,CAW0B,CAX1B,CAW4B,CAX5B,CAAA,CAAA,MAAA,CAAA,CAAA,EAWyC,YAXzC,CAWsD,CAXtD,CAWwD,CAXxD,CAAA,CAAA,CAAA,EAYF,CAZE,CAYA,CAZA,CAAA,CAAA,YAAA,CAAA,CAAA,EACF;;AAAC;AAQL;;AACc,KAUF,oBAVE,CAAA,UAU6B,0BAV7B,CAAA,GAWZ,CAAA,CAAE,SAXU,CAWA,kBAXA,CAWmB,CAXnB,CAAA,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
|
|
3
|
-
//#region ../schema/src/SchemaModelType.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Unified interface for all schema-compatible types.
|
|
7
|
-
* Any type used in ContractSpec schemas must implement this interface.
|
|
8
|
-
*
|
|
9
|
-
* @template T - The TypeScript type this schema represents
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* // All of these implement SchemaType:
|
|
14
|
-
* const fieldType = ScalarTypeEnum.String_unsecure();
|
|
15
|
-
* const schemaModel = new SchemaModel({ name: 'User', fields: {...} });
|
|
16
|
-
* const zodWrapper = fromZod(z.object({ name: z.string() }));
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
interface SchemaModelType<T = unknown> {
|
|
20
|
-
/**
|
|
21
|
-
* Return the Zod schema for runtime validation.
|
|
22
|
-
* This is the primary method - all schema types must provide Zod conversion.
|
|
23
|
-
*/
|
|
24
|
-
getZod(): z.ZodType<T>;
|
|
25
|
-
/**
|
|
26
|
-
* Return GraphQL type info for Pothos/GraphQL integration.
|
|
27
|
-
* Optional - types without GraphQL representation return undefined.
|
|
28
|
-
*/
|
|
29
|
-
getPothos?(): unknown;
|
|
30
|
-
/**
|
|
31
|
-
* Return JSON Schema representation.
|
|
32
|
-
* Optional - types without JSON Schema representation return undefined.
|
|
33
|
-
*/
|
|
34
|
-
getJsonSchema?(): unknown;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { SchemaModelType };
|
|
38
|
-
//# sourceMappingURL=SchemaModelType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaModelType.d.ts","names":[],"sources":["../../../../schema/src/SchemaModelType.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;UA8BiB;;;;;YAKL,CAAA,CAAE,QAAQ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./types.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "zod";
|