@igniter-js/caller 0.1.51 → 0.1.52
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/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +3 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -39
- package/dist/index.mjs.map +1 -1
- package/dist/{manager-DCFeR1Pd.d.ts → manager-DQcuAp3y.d.ts} +2 -2
- package/dist/{manager-Dl9t7GDO.d.mts → manager-DXmJbnQY.d.mts} +2 -2
- package/package.json +1 -1
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IgniterCallerManager, a as IgniterCallerApiResponse, b as IgniterCallerSchemaMap, c as IgniterCallerSchemaMethod, E as EndpointInfo, G as GetPaths, d as InferResponse, T as TypedRequestBuilder, e as IgniterCallerTypedRequestBuilder, P as PostPaths, f as PutPaths, g as PatchPaths, D as DeletePaths, H as HeadPaths } from '../manager-
|
|
1
|
+
import { I as IgniterCallerManager, a as IgniterCallerApiResponse, b as IgniterCallerSchemaMap, c as IgniterCallerSchemaMethod, E as EndpointInfo, G as GetPaths, d as InferResponse, T as TypedRequestBuilder, e as IgniterCallerTypedRequestBuilder, P as PostPaths, f as PutPaths, g as PatchPaths, D as DeletePaths, H as HeadPaths } from '../manager-DXmJbnQY.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
import { IgniterError } from '@igniter-js/common';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IgniterCallerManager, a as IgniterCallerApiResponse, b as IgniterCallerSchemaMap, c as IgniterCallerSchemaMethod, E as EndpointInfo, G as GetPaths, d as InferResponse, T as TypedRequestBuilder, e as IgniterCallerTypedRequestBuilder, P as PostPaths, f as PutPaths, g as PatchPaths, D as DeletePaths, H as HeadPaths } from '../manager-
|
|
1
|
+
import { I as IgniterCallerManager, a as IgniterCallerApiResponse, b as IgniterCallerSchemaMap, c as IgniterCallerSchemaMethod, E as EndpointInfo, G as GetPaths, d as InferResponse, T as TypedRequestBuilder, e as IgniterCallerTypedRequestBuilder, P as PostPaths, f as PutPaths, g as PatchPaths, D as DeletePaths, H as HeadPaths } from '../manager-DQcuAp3y.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
import { IgniterError } from '@igniter-js/common';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as IgniterCallerUrlPattern, i as IgniterCallerEventCallback, b as IgniterCallerSchemaMap, j as IIgniterCallerMockManager, k as IgniterCallerMockRegistry, c as IgniterCallerSchemaMethod, l as IgniterCallerMockResolvedHandler, m as IgniterCallerRequestInterceptor, n as IgniterCallerResponseInterceptor, o as
|
|
2
|
-
export { D as DeletePaths, E as EndpointInfo,
|
|
1
|
+
import { h as IgniterCallerUrlPattern, i as IgniterCallerEventCallback, b as IgniterCallerSchemaMap, j as IIgniterCallerMockManager, k as IgniterCallerMockRegistry, c as IgniterCallerSchemaMethod, l as IgniterCallerMockResolvedHandler, m as IgniterCallerRequestInterceptor, n as IgniterCallerResponseInterceptor, o as IgniterCallerSchemaValidationOptions, p as IgniterCallerSchemaRegistry, q as IgniterCallerSchemaBuildResult, r as IgniterCallerMockConfig, I as IgniterCallerManager, s as IgniterCallerEndpointSchema, S as SchemaArray, t as SchemaNullable, u as SchemaOptional, v as SchemaRecord, w as IgniterCallerSchemaEndpointConfig, x as SchemaMapPaths, y as IgniterCallerMockPathDefinition, a as IgniterCallerApiResponse, z as IgniterCallerFileResponse } from './manager-DXmJbnQY.mjs';
|
|
2
|
+
export { D as DeletePaths, E as EndpointInfo, O as ExtractPathParams, ak as GetEndpoint, G as GetPaths, H as HeadPaths, al as IIgniterCallerManager, C as IgniterCallerBaseRequestOptions, ag as IgniterCallerBuilderState, J as IgniterCallerDirectRequestOptions, B as IgniterCallerHttpMethod, ai as IgniterCallerMethodRequestBuilder, a9 as IgniterCallerMockDefaultStatus, ae as IgniterCallerMockHandler, af as IgniterCallerMockHandlerDefinition, aa as IgniterCallerMockRequest, ad as IgniterCallerMockResponse, ac as IgniterCallerMockResponseDefault, ab as IgniterCallerMockResponseForStatus, a8 as IgniterCallerMockStatus, A as IgniterCallerRequestBuilder, ah as IgniterCallerRequestBuilderParams, F as IgniterCallerRequestOptions, K as IgniterCallerResponseContentType, M as IgniterCallerResponseMarker, N as IgniterCallerRetryOptions, a5 as IgniterCallerSchemaGetters, a4 as IgniterCallerSchemaInfer, a6 as IgniterCallerSchemaInput, a7 as IgniterCallerSchemaMapFrom, e as IgniterCallerTypedRequestBuilder, L as IgniterCallerValidatableContentType, W as InferAllResponseTypes, Q as InferRequestType, d as InferResponse, U as InferResponseType, aj as InferSuccessResponse, V as InferSuccessResponseType, g as PatchPaths, Y as PathsForMethod, P as PostPaths, f as PutPaths, R as ResolveStatusKey, Z as SchemaMapEndpoint, X as SchemaMapMethods, a2 as SchemaMapRequestSchema, $ as SchemaMapRequestType, a3 as SchemaMapResponseSchema, _ as SchemaMapResponseType, a0 as SchemaMapResponses, a1 as SchemaMapResponsesType, T as TypedRequestBuilder } from './manager-DXmJbnQY.mjs';
|
|
3
3
|
import { IgniterLogger, StandardSchemaV1, IgniterError } from '@igniter-js/common';
|
|
4
4
|
import { IgniterTelemetryManager } from '@igniter-js/telemetry';
|
|
5
5
|
import { I as IgniterCallerStoreAdapter, a as IgniterCallerStoreOptions } from './store-D2p2dqGN.mjs';
|
|
@@ -176,7 +176,8 @@ declare class IgniterCallerBuilder<TSchemas extends IgniterCallerSchemaMap = Ign
|
|
|
176
176
|
* .build()
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
|
-
withSchemas<TNewSchemas extends
|
|
179
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap>(schemas: TNewSchemas, validation?: IgniterCallerSchemaValidationOptions): IgniterCallerBuilder<TNewSchemas>;
|
|
180
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap, TRegistry extends IgniterCallerSchemaRegistry>(schemas: IgniterCallerSchemaBuildResult<TNewSchemas, TRegistry>, validation?: IgniterCallerSchemaValidationOptions): IgniterCallerBuilder<TNewSchemas>;
|
|
180
181
|
/**
|
|
181
182
|
* Attaches telemetry for request monitoring and observability.
|
|
182
183
|
*
|
|
@@ -359,7 +360,8 @@ declare class IgniterCallerMockBuilder<TSchemas extends IgniterCallerSchemaMap =
|
|
|
359
360
|
*
|
|
360
361
|
* @param _schemas - Schema map or build result.
|
|
361
362
|
*/
|
|
362
|
-
withSchemas<TNewSchemas extends
|
|
363
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap>(_schemas: TNewSchemas): IgniterCallerMockBuilder<TNewSchemas>;
|
|
364
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap, TRegistry extends IgniterCallerSchemaRegistry>(_schemas: IgniterCallerSchemaBuildResult<TNewSchemas, TRegistry>): IgniterCallerMockBuilder<TNewSchemas>;
|
|
363
365
|
/**
|
|
364
366
|
* Registers mock handlers for a path.
|
|
365
367
|
*
|
|
@@ -656,4 +658,4 @@ declare class IgniterCallerHttpMock {
|
|
|
656
658
|
static mockFileError(message?: string): IgniterCallerFileResponse;
|
|
657
659
|
}
|
|
658
660
|
|
|
659
|
-
export { IIgniterCallerMockManager, IgniterCaller, IgniterCallerApiResponse, IgniterCallerBodyUtils, IgniterCallerBuilder, IgniterCallerCacheUtils, IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, IgniterCallerEventCallback, IgniterCallerEvents, IgniterCallerFileResponse, IgniterCallerHttpMock, IgniterCallerManager, IgniterCallerMock, IgniterCallerMockBuilder, IgniterCallerMockConfig, IgniterCallerMockManager, IgniterCallerMockPathDefinition, IgniterCallerMockRegistry, IgniterCallerMockResolvedHandler, type IgniterCallerOperation, IgniterCallerRequestInterceptor, IgniterCallerResponseInterceptor, IgniterCallerSchema, IgniterCallerSchemaBuildResult, IgniterCallerSchemaEndpointConfig,
|
|
661
|
+
export { IIgniterCallerMockManager, IgniterCaller, IgniterCallerApiResponse, IgniterCallerBodyUtils, IgniterCallerBuilder, IgniterCallerCacheUtils, IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, IgniterCallerEventCallback, IgniterCallerEvents, IgniterCallerFileResponse, IgniterCallerHttpMock, IgniterCallerManager, IgniterCallerMock, IgniterCallerMockBuilder, IgniterCallerMockConfig, IgniterCallerMockManager, IgniterCallerMockPathDefinition, IgniterCallerMockRegistry, IgniterCallerMockResolvedHandler, type IgniterCallerOperation, IgniterCallerRequestInterceptor, IgniterCallerResponseInterceptor, IgniterCallerSchema, IgniterCallerSchemaBuildResult, IgniterCallerSchemaEndpointConfig, IgniterCallerSchemaMap, IgniterCallerSchemaMethod, IgniterCallerSchemaPathBuilder, IgniterCallerSchemaRegistry, IgniterCallerSchemaUtils, IgniterCallerSchemaValidationOptions, IgniterCallerStoreAdapter, IgniterCallerStoreOptions, IgniterCallerUrlPattern, IgniterCallerUrlUtils, SchemaArray, SchemaMapPaths, SchemaNullable, SchemaOptional, SchemaRecord };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as IgniterCallerUrlPattern, i as IgniterCallerEventCallback, b as IgniterCallerSchemaMap, j as IIgniterCallerMockManager, k as IgniterCallerMockRegistry, c as IgniterCallerSchemaMethod, l as IgniterCallerMockResolvedHandler, m as IgniterCallerRequestInterceptor, n as IgniterCallerResponseInterceptor, o as
|
|
2
|
-
export { D as DeletePaths, E as EndpointInfo,
|
|
1
|
+
import { h as IgniterCallerUrlPattern, i as IgniterCallerEventCallback, b as IgniterCallerSchemaMap, j as IIgniterCallerMockManager, k as IgniterCallerMockRegistry, c as IgniterCallerSchemaMethod, l as IgniterCallerMockResolvedHandler, m as IgniterCallerRequestInterceptor, n as IgniterCallerResponseInterceptor, o as IgniterCallerSchemaValidationOptions, p as IgniterCallerSchemaRegistry, q as IgniterCallerSchemaBuildResult, r as IgniterCallerMockConfig, I as IgniterCallerManager, s as IgniterCallerEndpointSchema, S as SchemaArray, t as SchemaNullable, u as SchemaOptional, v as SchemaRecord, w as IgniterCallerSchemaEndpointConfig, x as SchemaMapPaths, y as IgniterCallerMockPathDefinition, a as IgniterCallerApiResponse, z as IgniterCallerFileResponse } from './manager-DQcuAp3y.js';
|
|
2
|
+
export { D as DeletePaths, E as EndpointInfo, O as ExtractPathParams, ak as GetEndpoint, G as GetPaths, H as HeadPaths, al as IIgniterCallerManager, C as IgniterCallerBaseRequestOptions, ag as IgniterCallerBuilderState, J as IgniterCallerDirectRequestOptions, B as IgniterCallerHttpMethod, ai as IgniterCallerMethodRequestBuilder, a9 as IgniterCallerMockDefaultStatus, ae as IgniterCallerMockHandler, af as IgniterCallerMockHandlerDefinition, aa as IgniterCallerMockRequest, ad as IgniterCallerMockResponse, ac as IgniterCallerMockResponseDefault, ab as IgniterCallerMockResponseForStatus, a8 as IgniterCallerMockStatus, A as IgniterCallerRequestBuilder, ah as IgniterCallerRequestBuilderParams, F as IgniterCallerRequestOptions, K as IgniterCallerResponseContentType, M as IgniterCallerResponseMarker, N as IgniterCallerRetryOptions, a5 as IgniterCallerSchemaGetters, a4 as IgniterCallerSchemaInfer, a6 as IgniterCallerSchemaInput, a7 as IgniterCallerSchemaMapFrom, e as IgniterCallerTypedRequestBuilder, L as IgniterCallerValidatableContentType, W as InferAllResponseTypes, Q as InferRequestType, d as InferResponse, U as InferResponseType, aj as InferSuccessResponse, V as InferSuccessResponseType, g as PatchPaths, Y as PathsForMethod, P as PostPaths, f as PutPaths, R as ResolveStatusKey, Z as SchemaMapEndpoint, X as SchemaMapMethods, a2 as SchemaMapRequestSchema, $ as SchemaMapRequestType, a3 as SchemaMapResponseSchema, _ as SchemaMapResponseType, a0 as SchemaMapResponses, a1 as SchemaMapResponsesType, T as TypedRequestBuilder } from './manager-DQcuAp3y.js';
|
|
3
3
|
import { IgniterLogger, StandardSchemaV1, IgniterError } from '@igniter-js/common';
|
|
4
4
|
import { IgniterTelemetryManager } from '@igniter-js/telemetry';
|
|
5
5
|
import { I as IgniterCallerStoreAdapter, a as IgniterCallerStoreOptions } from './store-D2p2dqGN.js';
|
|
@@ -176,7 +176,8 @@ declare class IgniterCallerBuilder<TSchemas extends IgniterCallerSchemaMap = Ign
|
|
|
176
176
|
* .build()
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
|
-
withSchemas<TNewSchemas extends
|
|
179
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap>(schemas: TNewSchemas, validation?: IgniterCallerSchemaValidationOptions): IgniterCallerBuilder<TNewSchemas>;
|
|
180
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap, TRegistry extends IgniterCallerSchemaRegistry>(schemas: IgniterCallerSchemaBuildResult<TNewSchemas, TRegistry>, validation?: IgniterCallerSchemaValidationOptions): IgniterCallerBuilder<TNewSchemas>;
|
|
180
181
|
/**
|
|
181
182
|
* Attaches telemetry for request monitoring and observability.
|
|
182
183
|
*
|
|
@@ -359,7 +360,8 @@ declare class IgniterCallerMockBuilder<TSchemas extends IgniterCallerSchemaMap =
|
|
|
359
360
|
*
|
|
360
361
|
* @param _schemas - Schema map or build result.
|
|
361
362
|
*/
|
|
362
|
-
withSchemas<TNewSchemas extends
|
|
363
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap>(_schemas: TNewSchemas): IgniterCallerMockBuilder<TNewSchemas>;
|
|
364
|
+
withSchemas<TNewSchemas extends IgniterCallerSchemaMap, TRegistry extends IgniterCallerSchemaRegistry>(_schemas: IgniterCallerSchemaBuildResult<TNewSchemas, TRegistry>): IgniterCallerMockBuilder<TNewSchemas>;
|
|
363
365
|
/**
|
|
364
366
|
* Registers mock handlers for a path.
|
|
365
367
|
*
|
|
@@ -656,4 +658,4 @@ declare class IgniterCallerHttpMock {
|
|
|
656
658
|
static mockFileError(message?: string): IgniterCallerFileResponse;
|
|
657
659
|
}
|
|
658
660
|
|
|
659
|
-
export { IIgniterCallerMockManager, IgniterCaller, IgniterCallerApiResponse, IgniterCallerBodyUtils, IgniterCallerBuilder, IgniterCallerCacheUtils, IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, IgniterCallerEventCallback, IgniterCallerEvents, IgniterCallerFileResponse, IgniterCallerHttpMock, IgniterCallerManager, IgniterCallerMock, IgniterCallerMockBuilder, IgniterCallerMockConfig, IgniterCallerMockManager, IgniterCallerMockPathDefinition, IgniterCallerMockRegistry, IgniterCallerMockResolvedHandler, type IgniterCallerOperation, IgniterCallerRequestInterceptor, IgniterCallerResponseInterceptor, IgniterCallerSchema, IgniterCallerSchemaBuildResult, IgniterCallerSchemaEndpointConfig,
|
|
661
|
+
export { IIgniterCallerMockManager, IgniterCaller, IgniterCallerApiResponse, IgniterCallerBodyUtils, IgniterCallerBuilder, IgniterCallerCacheUtils, IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, IgniterCallerEventCallback, IgniterCallerEvents, IgniterCallerFileResponse, IgniterCallerHttpMock, IgniterCallerManager, IgniterCallerMock, IgniterCallerMockBuilder, IgniterCallerMockConfig, IgniterCallerMockManager, IgniterCallerMockPathDefinition, IgniterCallerMockRegistry, IgniterCallerMockResolvedHandler, type IgniterCallerOperation, IgniterCallerRequestInterceptor, IgniterCallerResponseInterceptor, IgniterCallerSchema, IgniterCallerSchemaBuildResult, IgniterCallerSchemaEndpointConfig, IgniterCallerSchemaMap, IgniterCallerSchemaMethod, IgniterCallerSchemaPathBuilder, IgniterCallerSchemaRegistry, IgniterCallerSchemaUtils, IgniterCallerSchemaValidationOptions, IgniterCallerStoreAdapter, IgniterCallerStoreOptions, IgniterCallerUrlPattern, IgniterCallerUrlUtils, SchemaArray, SchemaMapPaths, SchemaNullable, SchemaOptional, SchemaRecord };
|
package/dist/index.js
CHANGED
|
@@ -2158,46 +2158,15 @@ var IgniterCallerBuilder = class _IgniterCallerBuilder {
|
|
|
2158
2158
|
storeOptions: options
|
|
2159
2159
|
});
|
|
2160
2160
|
}
|
|
2161
|
-
/**
|
|
2162
|
-
* Configures schema-based type safety and validation.
|
|
2163
|
-
*
|
|
2164
|
-
* Enables automatic type inference for requests/responses based on
|
|
2165
|
-
* route and method, with optional runtime validation via StandardSchemaV1
|
|
2166
|
-
* (Zod is supported).
|
|
2167
|
-
*
|
|
2168
|
-
* @param schemas - Schema map keyed by URL path and method.
|
|
2169
|
-
* @param validation - Validation options for request/response checks.
|
|
2170
|
-
*
|
|
2171
|
-
* @example
|
|
2172
|
-
* ```ts
|
|
2173
|
-
* const api = IgniterCaller.create()
|
|
2174
|
-
* .withSchemas({
|
|
2175
|
-
* '/users': {
|
|
2176
|
-
* GET: {
|
|
2177
|
-
* responses: {
|
|
2178
|
-
* 200: z.array(UserSchema),
|
|
2179
|
-
* 401: ErrorSchema,
|
|
2180
|
-
* },
|
|
2181
|
-
* },
|
|
2182
|
-
* POST: {
|
|
2183
|
-
* request: CreateUserSchema,
|
|
2184
|
-
* responses: {
|
|
2185
|
-
* 201: UserSchema,
|
|
2186
|
-
* 400: ValidationErrorSchema,
|
|
2187
|
-
* },
|
|
2188
|
-
* },
|
|
2189
|
-
* },
|
|
2190
|
-
* })
|
|
2191
|
-
* .build()
|
|
2192
|
-
* ```
|
|
2193
|
-
*/
|
|
2194
2161
|
withSchemas(schemas, validation) {
|
|
2195
2162
|
const nextState = {
|
|
2196
2163
|
...this.state,
|
|
2197
2164
|
schemas,
|
|
2198
2165
|
schemaValidation: validation
|
|
2199
2166
|
};
|
|
2200
|
-
return new _IgniterCallerBuilder(
|
|
2167
|
+
return new _IgniterCallerBuilder(
|
|
2168
|
+
nextState
|
|
2169
|
+
);
|
|
2201
2170
|
}
|
|
2202
2171
|
/**
|
|
2203
2172
|
* Attaches telemetry for request monitoring and observability.
|
|
@@ -2514,11 +2483,6 @@ var IgniterCallerMockBuilder = class _IgniterCallerMockBuilder {
|
|
|
2514
2483
|
static create() {
|
|
2515
2484
|
return new _IgniterCallerMockBuilder({ registry: {} });
|
|
2516
2485
|
}
|
|
2517
|
-
/**
|
|
2518
|
-
* Sets schemas to enable typed mock definitions.
|
|
2519
|
-
*
|
|
2520
|
-
* @param _schemas - Schema map or build result.
|
|
2521
|
-
*/
|
|
2522
2486
|
withSchemas(_schemas) {
|
|
2523
2487
|
return new _IgniterCallerMockBuilder({
|
|
2524
2488
|
registry: this.state.registry
|