@conduit-client/model 3.12.0 → 3.13.1
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/types/v1/api/endpoint.d.ts +1 -1
- package/dist/types/v1/api/validation/bindings.d.ts +1 -1
- package/dist/types/v1/api/validation/endpoint/index.d.ts +1 -1
- package/dist/types/v1/api/validation/index.d.ts +1 -1
- package/dist/types/v1/api/validation/operation/BodyDataValidator.d.ts +2 -2
- package/dist/types/v1/api/validation/operation/InvalidationValidator.d.ts +6 -4
- package/dist/types/v1/api/validation/operation/KeyMatchValidator.d.ts +1 -1
- package/dist/types/v1/api/validation/operation/KeySourceValidator.d.ts +3 -3
- package/dist/types/v1/api/validation/operation/NoNormalizedTypesValidator.d.ts +1 -1
- package/dist/types/v1/api/validation/operation/Response200Validator.d.ts +1 -1
- package/dist/types/v1/api/validation/operation/index.d.ts +2 -2
- package/dist/types/v1/api/validation/operation/utils.d.ts +3 -2
- package/dist/types/v1/parser/amf/endpoints/amf-operation.d.ts +2 -2
- package/dist/types/v1/parser/amf/types/AMFDiscriminatedObjectType.d.ts +3 -2
- package/dist/types/v1/parser/parser-utils.d.ts +1 -1
- package/dist/types/v1/parser/swagger/SwaggerAPI.d.ts +3 -2
- package/dist/types/v1/parser/swagger/endpoints/swagger-operation.d.ts +2 -2
- package/dist/types/v1/parser/swagger/swagger-utils.d.ts +3 -0
- package/dist/types/v1/parser/swagger/version.d.ts +1 -1
- package/dist/types/v1/parser/zod-schemas.d.ts +2 -2
- package/dist/types/v1/types/types-equal.d.ts +1 -1
- package/dist/types/v1/types/utils.d.ts +1 -1
- package/dist/types/v1/types/validators/extensions/KeyFieldReferenceValidator.d.ts +1 -1
- package/dist/types/v1/types/validators/extensions/KeySourcesValidator.d.ts +2 -2
- package/dist/v1/index.js +225 -209
- package/dist/v1/index.js.map +1 -1
- package/package.json +5 -3
|
@@ -87,7 +87,7 @@ export type BaseOperation<ResponseType extends Type = Type, RequestType extends
|
|
|
87
87
|
defaults: API['defaults'];
|
|
88
88
|
serviceOverrides: ResolvedOperationServices;
|
|
89
89
|
};
|
|
90
|
-
export type BaseOperationWithRequestBody<ResponseType extends Type = Type, RequestType extends Type = Type> = BaseOperation & {
|
|
90
|
+
export type BaseOperationWithRequestBody<ResponseType extends Type = Type, RequestType extends Type = Type> = BaseOperation<ResponseType, RequestType> & {
|
|
91
91
|
configBodyParam: string;
|
|
92
92
|
};
|
|
93
93
|
export type BaseAuraOperation = BaseOperation & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ValidationResult, type Validator } from '../../validation';
|
|
2
|
-
import { API, Operation } from '..';
|
|
2
|
+
import type { API, Operation } from '..';
|
|
3
3
|
export declare class BindingsValidation<S extends API = API> implements Validator<S, Operation> {
|
|
4
4
|
constructor();
|
|
5
5
|
validate(api: S): ValidationResult<Operation>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import type { Validator } from '../../../validation';
|
|
1
2
|
import type { API, EndPoint, Operation, Type } from '../../..';
|
|
2
|
-
import { Validator } from '../../../validation';
|
|
3
3
|
export declare function buildEndpointValidator(api: API): Validator<EndPoint, EndPoint | Operation | Type>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { API } from '../api';
|
|
2
1
|
import { type Validator } from '../../validation';
|
|
2
|
+
import type { API } from '../api';
|
|
3
3
|
import type { Type } from '../../types';
|
|
4
4
|
import type { EndPoint, Operation } from '../endpoint';
|
|
5
5
|
type MessageSourceTypes = API | Type | EndPoint | Operation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { KeySourcesValidator } from '../../../types/validators/extensions';
|
|
2
|
+
import type { Validator } from '../../../validation';
|
|
1
3
|
import type { Operation, Type, Request, Response } from '../../..';
|
|
2
|
-
import { Validator } from '../../../validation';
|
|
3
|
-
import { KeySourcesValidator } from '../../../types/validators/extensions';
|
|
4
4
|
/**
|
|
5
5
|
* Validates the body of a request or response supports a key path
|
|
6
6
|
*/
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type Response } from '../../endpoint';
|
|
2
|
+
import { type ReadOnlyTypeRegistry } from '../../..';
|
|
3
|
+
import type { ValidationMessage, Validator } from '../../../validation';
|
|
4
|
+
import type { Operation } from '../../endpoint';
|
|
5
|
+
import type { Type } from '../../..';
|
|
6
|
+
import type { BodyDataValidator } from './BodyDataValidator';
|
|
5
7
|
/**
|
|
6
8
|
* Validates the configuration of 'invalidation'
|
|
7
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ValidationMessage, Validator } from '../../../validation';
|
|
1
2
|
import type { Operation, ReadOnlyTypeRegistry } from '../../..';
|
|
2
|
-
import { ValidationMessage, Validator } from '../../../validation';
|
|
3
3
|
export declare class KeyMatchValidator<T extends Operation = Operation> implements Validator<T, Operation> {
|
|
4
4
|
private types;
|
|
5
5
|
constructor(types: ReadOnlyTypeRegistry);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ValidationMessage, type Validator } from '../../../validation';
|
|
2
|
-
import { Operation, Parameter, QueryParameter, Request } from '../../endpoint';
|
|
3
|
-
import { Type } from '../../..';
|
|
4
|
-
import { BodyDataValidator } from './BodyDataValidator';
|
|
2
|
+
import type { Operation, Parameter, QueryParameter, Request } from '../../endpoint';
|
|
3
|
+
import type { Type } from '../../..';
|
|
4
|
+
import type { BodyDataValidator } from './BodyDataValidator';
|
|
5
5
|
type KeyBySourceCollection = {
|
|
6
6
|
path: string[];
|
|
7
7
|
query: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ValidationMessage, Validator } from '../../../validation';
|
|
1
2
|
import type { Operation, ReadOnlyTypeRegistry, Type } from '../../..';
|
|
2
|
-
import { ValidationMessage, Validator } from '../../../validation';
|
|
3
3
|
/**
|
|
4
4
|
* Validates that if an operation is not normalized, its responses payloads has
|
|
5
5
|
* NO references to identifiable (i.e., normalized) types
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Validator } from '../../../validation';
|
|
2
|
+
import type { API, Operation, Type } from '../../..';
|
|
3
3
|
export declare function buildOperationValidator(api: API): Validator<Operation, Operation | Type>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ValidationSeverity } from '../../../validation';
|
|
2
|
+
import type { NormalizedOperation, Operation } from '../../endpoint';
|
|
3
|
+
import type { ValidationMessage } from '../../../validation';
|
|
3
4
|
export declare function isNormalizedOperation(operation: Operation): operation is NormalizedOperation;
|
|
4
5
|
export declare function getFormattedMessage<T = Operation>(subject: T, message: string, severity?: ValidationSeverity): ValidationMessage<T>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type LoggerService, type FileParserLogger } from '@conduit-client/utils';
|
|
2
|
+
import { type ResolvedOperationServices } from '../../../api/service-overrides';
|
|
3
|
+
import { OperationSchemaBuilder } from '../../zod-schemas';
|
|
2
4
|
import type amf from 'amf-client-js';
|
|
3
5
|
import type { BaseAuraOperation, AuraOperationWithRequestBody, BaseOperation, HttpMethod, Parameter, Payload, Request, Response, CacheStrategy, ConfigSchemaType, OperationType, ErrorStrategy, Binding, BaseHttpOperation, HttpOperationWithRequestBody, BaseGraphQLOperation } from '../../../api/endpoint';
|
|
4
6
|
import type { AMFType, AMFTypeFactory } from '../types';
|
|
5
7
|
import type { TypeRegistry } from '../../../types';
|
|
6
8
|
import type { AmfEndPoint } from './amf-endpoint';
|
|
7
9
|
import type { API, Server } from '../../../api';
|
|
8
|
-
import { type ResolvedOperationServices } from '../../../api/service-overrides';
|
|
9
|
-
import { OperationSchemaBuilder } from '../../zod-schemas';
|
|
10
10
|
export declare abstract class AmfBaseOperation implements BaseOperation {
|
|
11
11
|
protected amfOperation: amf.Operation;
|
|
12
12
|
protected amfTypeFactory: AMFTypeFactory;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type AMFType, type AMFTypeFactory } from './index';
|
|
2
|
+
import { AMFBaseType } from './AMFBaseType';
|
|
3
|
+
import type { AMFObjectType, AMFTypeProps } from './index';
|
|
2
4
|
import type amf from 'amf-client-js';
|
|
3
5
|
import type { DiscriminatedObjectType, Type, TypeRegistry } from '../../../types';
|
|
4
6
|
import type { API } from '../../../api';
|
|
5
7
|
import type { FileParserLogger, LoggerService } from '@conduit-client/utils';
|
|
6
|
-
import { AMFBaseType } from './AMFBaseType';
|
|
7
8
|
export type AMFDiscriminatedObjectType = AMFTypeProps<amf.NodeShape> & DiscriminatedObjectType;
|
|
8
9
|
export declare class AMFDiscriminatedObjectTypeImpl extends AMFBaseType<'discriminatedObject', amf.NodeShape> implements AMFDiscriminatedObjectType {
|
|
9
10
|
shape: amf.NodeShape;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type FileParserLogger, type NamedLoggerService } from '@conduit-client/utils';
|
|
2
|
-
import { type SwaggerType } from './types';
|
|
3
2
|
import { type ResolvedServiceOverrides } from '../../api/service-overrides';
|
|
4
|
-
import {
|
|
3
|
+
import { type SwaggerType } from './types';
|
|
4
|
+
import { type Position } from './source-position-map';
|
|
5
|
+
import type { SourcePositionMap } from './source-position-map';
|
|
5
6
|
import type { API, EndPoint, Server } from '../../api';
|
|
6
7
|
import type { ReadOnlyTypeRegistry, TypeRegistry } from '../../types';
|
|
7
8
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type LoggerService, type FileParserLogger } from '@conduit-client/utils';
|
|
2
|
+
import { type ResolvedOperationServices } from '../../../api/service-overrides';
|
|
3
|
+
import { OperationSchemaBuilder } from '../../zod-schemas';
|
|
2
4
|
import type { Position } from '../source-position-map';
|
|
3
5
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
4
6
|
import type { BaseAuraOperation, AuraOperationWithRequestBody, BaseOperation, HttpMethod, Request, Response, CacheStrategy, ConfigSchemaType, OperationType, ErrorStrategy, Binding, BaseHttpOperation, HttpOperationWithRequestBody, BaseGraphQLOperation } from '../../../api/endpoint';
|
|
@@ -6,8 +8,6 @@ import type { SwaggerType, SwaggerTypeFactory } from '../types';
|
|
|
6
8
|
import type { TypeRegistry } from '../../../types';
|
|
7
9
|
import type { SwaggerEndPoint } from './swagger-endpoint';
|
|
8
10
|
import type { API, Server } from '../../../api';
|
|
9
|
-
import { type ResolvedOperationServices } from '../../../api/service-overrides';
|
|
10
|
-
import { OperationSchemaBuilder } from '../../zod-schemas';
|
|
11
11
|
export declare abstract class SwaggerBaseOperation implements BaseOperation {
|
|
12
12
|
protected operation: OpenAPIV3.OperationObject;
|
|
13
13
|
protected methodStr: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
2
|
import type { ScalarType } from '../../types';
|
|
3
|
+
import type { ResolverError, MissingPointerError } from '@apidevtools/json-schema-ref-parser';
|
|
3
4
|
export type OpenAPISchema = OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject;
|
|
4
5
|
/**
|
|
5
6
|
* Check if an object is a reference object ($ref)
|
|
@@ -49,3 +50,5 @@ export declare function isReferencePath(obj: OpenAPIV3.PathItemObject): obj is O
|
|
|
49
50
|
* and checking for schema-specific properties.
|
|
50
51
|
*/
|
|
51
52
|
export declare function extractRootLevelSchemas(file: OpenAPIV3.Document): Record<string, OpenAPISchema>;
|
|
53
|
+
export declare function isResolverError(error: unknown): error is ResolverError;
|
|
54
|
+
export declare function isMissingPointerError(error: unknown): error is MissingPointerError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CacheStrategy } from '../api';
|
|
3
|
-
import { HttpMethod } from '../api/endpoint';
|
|
2
|
+
import type { CacheStrategy } from '../api';
|
|
3
|
+
import type { HttpMethod } from '../api/endpoint';
|
|
4
4
|
export declare const rootExtensionSchema: z.ZodObject<{
|
|
5
5
|
onestore: z.ZodObject<{
|
|
6
6
|
version: z.ZodEffects<z.ZodString, import("@conduit-client/utils").Version, string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Type } from './Type';
|
|
1
|
+
import type { Type } from './Type';
|
|
2
2
|
export declare function typesEqual(a: Type, b: Type): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllOfType, AnyType, ArrayType, BooleanType, DateTimeOnlyType, DateTimeType, DateType, DiscriminatedObjectType, DoubleType, EnumType, IdentifiableType, IntegerType, NilType, NotType, NumberType, ObjectType, OneOf, RefType, ScalarType, StringType, TimeType, Type } from './Type';
|
|
1
|
+
import type { AllOfType, AnyType, ArrayType, BooleanType, DateTimeOnlyType, DateTimeType, DateType, DiscriminatedObjectType, DoubleType, EnumType, IdentifiableType, IntegerType, NilType, NotType, NumberType, ObjectType, OneOf, RefType, ScalarType, StringType, TimeType, Type } from './Type';
|
|
2
2
|
export declare function isRefType(type: Type): type is RefType;
|
|
3
3
|
export declare function isNilType(type: Type): type is NilType;
|
|
4
4
|
export declare function isBooleanType(type: Type): type is BooleanType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Validator } from '../../../validation';
|
|
2
|
+
import type { KeySourcesValidator } from './KeySourcesValidator';
|
|
2
3
|
import type { Type } from '../../Type';
|
|
3
|
-
import { KeySourcesValidator } from './KeySourcesValidator';
|
|
4
4
|
/**
|
|
5
5
|
* Validates that the fields in a key are valid.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ValidationResult, Validator } from '../../../validation';
|
|
1
|
+
import type { ValidationResult, Validator } from '../../../validation';
|
|
2
2
|
import type { Type } from '../../Type';
|
|
3
|
-
import { ReadOnlyTypeRegistry } from '../../TypeRegistry';
|
|
3
|
+
import type { ReadOnlyTypeRegistry } from '../../TypeRegistry';
|
|
4
4
|
/**
|
|
5
5
|
* Validates that sources used by a types key are valid
|
|
6
6
|
*/
|