@contractspec/lib.contracts-transformers 3.7.5 → 3.7.7

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.
@@ -3,8 +3,8 @@
3
3
  * Used for sync operations to detect changes.
4
4
  */
5
5
  import type { AnyOperationSpec } from '@contractspec/lib.contracts-spec';
6
- import type { ParsedOperation } from './types';
7
6
  import type { DiffChange, ImportedOperationSpec, SpecDiff } from '../common/types';
7
+ import type { ParsedOperation } from './types';
8
8
  /**
9
9
  * Options for diffing specs.
10
10
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Exporter module index - re-exports all exporter functions.
3
3
  */
4
- export { exportOperations, generateOperationsRegistry, toOperationId, toSchemaName, toHttpMethod, defaultRestPath, toRestPath, schemaModelToJsonSchema, jsonSchemaForSpec, type OperationsExportResult, } from './operations';
5
- export { exportEvents, generateEventsExports, type ExportedEvent, } from './events';
6
- export { exportFeatures, generateFeaturesRegistry, type ExportedFeature, } from './features';
7
- export { exportPresentations, exportPresentationsFromArray, generatePresentationsRegistry, type ExportedPresentation, } from './presentations';
8
- export { exportForms, generateFormsRegistry, type ExportedForm } from './forms';
9
- export { exportDataViews, generateDataViewsRegistry, type ExportedDataView, } from './data-views';
10
- export { exportWorkflows, generateWorkflowsRegistry, type ExportedWorkflow, } from './workflows';
4
+ export { type ExportedDataView, exportDataViews, generateDataViewsRegistry, } from './data-views';
5
+ export { type ExportedEvent, exportEvents, generateEventsExports, } from './events';
6
+ export { type ExportedFeature, exportFeatures, generateFeaturesRegistry, } from './features';
7
+ export { type ExportedForm, exportForms, generateFormsRegistry } from './forms';
8
+ export { defaultRestPath, exportOperations, generateOperationsRegistry, jsonSchemaForSpec, type OperationsExportResult, schemaModelToJsonSchema, toHttpMethod, toOperationId, toRestPath, toSchemaName, } from './operations';
9
+ export { type ExportedPresentation, exportPresentations, exportPresentationsFromArray, generatePresentationsRegistry, } from './presentations';
11
10
  export { generateRegistryIndex, type RegistryGenerationOptions, } from './registries';
11
+ export { type ExportedWorkflow, exportWorkflows, generateWorkflowsRegistry, } from './workflows';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Presentations exporter - exports PresentationSpec to OpenAPI extensions.
3
3
  */
4
- import type { PresentationSpec, PresentationRegistry, Stability } from '@contractspec/lib.contracts-spec';
4
+ import type { PresentationRegistry, PresentationSpec, Stability } from '@contractspec/lib.contracts-spec';
5
5
  import type { GeneratedRegistryCode } from '../types';
6
6
  /**
7
7
  * Exported presentation structure for OpenAPI extensions.
@@ -2,12 +2,12 @@
2
2
  * Export ContractSpec specs to OpenAPI 3.1 format.
3
3
  * Refactored to use modular exporters for all surfaces.
4
4
  */
5
- import type { OperationSpecRegistry, FeatureRegistry, PresentationRegistry, FormRegistry, EventSpec, PresentationSpec } from '@contractspec/lib.contracts-spec';
5
+ import type { EventSpec, FeatureRegistry, FormRegistry, OperationSpecRegistry, PresentationRegistry, PresentationSpec } from '@contractspec/lib.contracts-spec';
6
6
  import type { DataViewRegistry } from '@contractspec/lib.contracts-spec/data-views';
7
7
  import type { WorkflowRegistry } from '@contractspec/lib.contracts-spec/workflow';
8
8
  import type { AnySchemaModel } from '@contractspec/lib.schema';
9
- import type { ContractSpecOpenApiDocument, OpenApiExportOptions, ContractSpecExportOptions, ContractSpecExportResult } from './types';
10
9
  import { defaultRestPath as defaultRestPathFn } from './exporter/operations';
10
+ import type { ContractSpecExportOptions, ContractSpecExportResult, ContractSpecOpenApiDocument, OpenApiExportOptions } from './types';
11
11
  /**
12
12
  * Input registries for unified export.
13
13
  */
@@ -1,5 +1,5 @@
1
- import type { ParsedEvent } from '../types';
2
1
  import type { ResolvedContractsrcConfig } from '@contractspec/lib.contracts-spec';
2
+ import type { ParsedEvent } from '../types';
3
3
  /**
4
4
  * Generate code for an event.
5
5
  */
@@ -1,6 +1,6 @@
1
- import type { ParsedOperation } from '../types';
1
+ import type { OpenApiSourceConfig, ResolvedContractsrcConfig } from '@contractspec/lib.contracts-spec';
2
2
  import { type GeneratedModel } from '../schema-converter';
3
- import type { ResolvedContractsrcConfig, OpenApiSourceConfig } from '@contractspec/lib.contracts-spec';
3
+ import type { ParsedOperation } from '../types';
4
4
  /**
5
5
  * Generate ContractSpec TypeScript code for an operation.
6
6
  */
@@ -1,12 +1,12 @@
1
- import type { ParsedOperation, ParseResult } from '../types';
1
+ import type { OpenApiSourceConfig, ResolvedContractsrcConfig } from '@contractspec/lib.contracts-spec';
2
2
  import type { ImportResult } from '../../common/types';
3
- import type { ResolvedContractsrcConfig, OpenApiSourceConfig } from '@contractspec/lib.contracts-spec';
3
+ import type { ParsedOperation, ParseResult } from '../types';
4
4
  export * from './analyzer';
5
- export * from './schemas';
6
- export * from './generator';
7
- export * from './models';
8
5
  export * from './events';
6
+ export * from './generator';
9
7
  export * from './grouping';
8
+ export * from './models';
9
+ export * from './schemas';
10
10
  /**
11
11
  * Import operations from a parsed OpenAPI document.
12
12
  */
@@ -1,5 +1,5 @@
1
- import type { OpenApiSchema } from '../types';
2
1
  import type { ResolvedContractsrcConfig } from '@contractspec/lib.contracts-spec';
2
+ import type { OpenApiSchema } from '../types';
3
3
  /**
4
4
  * Generate code for a standalone model.
5
5
  */
@@ -2,10 +2,10 @@
2
2
  * OpenAPI transformation module.
3
3
  * Import/export between ContractSpec and OpenAPI 3.x.
4
4
  */
5
- export type { OpenApiDocument, OpenApiOperation, OpenApiSchema, OpenApiParameter, OpenApiServer, OpenApiExportOptions, OpenApiParseOptions, OpenApiVersion, HttpMethod, ParameterLocation, ParsedOperation, ParsedParameter, ParseResult, OpenApiTransportHints, OpenApiSource, ContractSpecOpenApiDocument, } from './types';
6
- export { parseOpenApi, parseOpenApiString, parseOpenApiDocument, detectFormat, detectVersion, } from './parser';
7
- export { openApiForRegistry, openApiToJson, openApiToYaml, defaultRestPath, exportContractSpec, contractSpecToJson, contractSpecToYaml, type ContractSpecRegistries, } from './exporter';
5
+ export { createSpecDiff, type DiffOptions, diffAll, diffSpecs, diffSpecVsOperation, formatDiffChanges, } from './differ';
6
+ export { type ContractSpecRegistries, contractSpecToJson, contractSpecToYaml, defaultRestPath, exportContractSpec, openApiForRegistry, openApiToJson, openApiToYaml, } from './exporter';
8
7
  export * from './exporter/index';
9
8
  export { importFromOpenApi, importOperation } from './importer';
10
- export { jsonSchemaToType, generateSchemaModelCode, generateImports, getScalarType, type TypescriptType, type SchemaField, type GeneratedModel, } from './schema-converter';
11
- export { diffSpecVsOperation, diffSpecs, createSpecDiff, diffAll, formatDiffChanges, type DiffOptions, } from './differ';
9
+ export { detectFormat, detectVersion, parseOpenApi, parseOpenApiDocument, parseOpenApiString, } from './parser';
10
+ export { type GeneratedModel, generateImports, generateSchemaModelCode, getScalarType, jsonSchemaToType, type SchemaField, type TypescriptType, } from './schema-converter';
11
+ export type { ContractSpecOpenApiDocument, HttpMethod, OpenApiDocument, OpenApiExportOptions, OpenApiOperation, OpenApiParameter, OpenApiParseOptions, OpenApiSchema, OpenApiServer, OpenApiSource, OpenApiTransportHints, OpenApiVersion, ParameterLocation, ParsedOperation, ParsedParameter, ParseResult, } from './types';