@igniter-js/caller 0.1.1 → 0.1.3
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/index.d.mts +165 -26
- package/dist/index.d.ts +165 -26
- package/dist/index.js +7 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -209,6 +209,36 @@ type SchemaMapPaths<TSchemas extends IgniterCallerSchemaMap> = keyof TSchemas &
|
|
|
209
209
|
* Get available methods for a specific path.
|
|
210
210
|
*/
|
|
211
211
|
type SchemaMapMethods<TSchemas extends IgniterCallerSchemaMap, TPath extends keyof TSchemas> = keyof TSchemas[TPath] & IgniterCallerSchemaMethod;
|
|
212
|
+
/**
|
|
213
|
+
* Get all paths that have a specific method defined.
|
|
214
|
+
*/
|
|
215
|
+
type PathsForMethod<TSchemas extends IgniterCallerSchemaMap, TMethod extends IgniterCallerSchemaMethod> = {
|
|
216
|
+
[K in keyof TSchemas]: TMethod extends keyof TSchemas[K] ? K : never;
|
|
217
|
+
}[keyof TSchemas] & string;
|
|
218
|
+
/**
|
|
219
|
+
* Get paths available for GET method.
|
|
220
|
+
*/
|
|
221
|
+
type GetPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'GET'>;
|
|
222
|
+
/**
|
|
223
|
+
* Get paths available for POST method.
|
|
224
|
+
*/
|
|
225
|
+
type PostPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'POST'>;
|
|
226
|
+
/**
|
|
227
|
+
* Get paths available for PUT method.
|
|
228
|
+
*/
|
|
229
|
+
type PutPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'PUT'>;
|
|
230
|
+
/**
|
|
231
|
+
* Get paths available for PATCH method.
|
|
232
|
+
*/
|
|
233
|
+
type PatchPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'PATCH'>;
|
|
234
|
+
/**
|
|
235
|
+
* Get paths available for DELETE method.
|
|
236
|
+
*/
|
|
237
|
+
type DeletePaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'DELETE'>;
|
|
238
|
+
/**
|
|
239
|
+
* Get paths available for HEAD method.
|
|
240
|
+
*/
|
|
241
|
+
type HeadPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'HEAD'>;
|
|
212
242
|
/**
|
|
213
243
|
* Get endpoint schema for a specific path and method.
|
|
214
244
|
*/
|
|
@@ -221,6 +251,23 @@ type SchemaMapResponseType<TSchemas extends IgniterCallerSchemaMap, TPath extend
|
|
|
221
251
|
* Infer request type from schema map for a specific path and method.
|
|
222
252
|
*/
|
|
223
253
|
type SchemaMapRequestType<TSchemas extends IgniterCallerSchemaMap, TPath extends keyof TSchemas, TMethod extends keyof TSchemas[TPath]> = TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<infer Request, any> ? Request extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Request> : never : never;
|
|
254
|
+
/**
|
|
255
|
+
* Infer endpoint info for a specific path and method.
|
|
256
|
+
* Returns an object with response, request, and params types.
|
|
257
|
+
*/
|
|
258
|
+
type EndpointInfo<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = TPath extends keyof TSchemas ? TMethod extends keyof TSchemas[TPath] ? {
|
|
259
|
+
response: TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<any, infer R> ? 200 extends keyof R ? R[200] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[200]> : unknown : 201 extends keyof R ? R[201] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[201]> : unknown : unknown : unknown;
|
|
260
|
+
request: TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<infer Req, any> ? Req extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Req> : never : never;
|
|
261
|
+
params: ExtractPathParams<TPath & string>;
|
|
262
|
+
} : {
|
|
263
|
+
response: unknown;
|
|
264
|
+
request: never;
|
|
265
|
+
params: Record<never, never>;
|
|
266
|
+
} : {
|
|
267
|
+
response: unknown;
|
|
268
|
+
request: never;
|
|
269
|
+
params: Record<never, never>;
|
|
270
|
+
};
|
|
224
271
|
/**
|
|
225
272
|
* Options for schema validation behavior.
|
|
226
273
|
*/
|
|
@@ -291,7 +338,7 @@ interface IgniterCallerStoreOptions {
|
|
|
291
338
|
fallbackToFetch?: boolean;
|
|
292
339
|
}
|
|
293
340
|
|
|
294
|
-
type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap =
|
|
341
|
+
type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> = {
|
|
295
342
|
baseURL?: string;
|
|
296
343
|
headers?: Record<string, string>;
|
|
297
344
|
cookies?: Record<string, string>;
|
|
@@ -303,7 +350,16 @@ type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap = any> =
|
|
|
303
350
|
schemas?: TSchemas;
|
|
304
351
|
schemaValidation?: IgniterCallerSchemaValidationOptions;
|
|
305
352
|
};
|
|
306
|
-
type IgniterCallerBuilderFactory<TCaller, TSchemas extends IgniterCallerSchemaMap =
|
|
353
|
+
type IgniterCallerBuilderFactory<TCaller, TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> = (state: IgniterCallerBuilderState<TSchemas>) => TCaller;
|
|
354
|
+
/**
|
|
355
|
+
* Utility type to replace the schema type in a caller.
|
|
356
|
+
* Used by withSchemas to properly type the returned caller.
|
|
357
|
+
*/
|
|
358
|
+
type ReplaceCallerSchema<TCaller, TNewSchemas extends IgniterCallerSchemaMap> = TCaller extends {
|
|
359
|
+
schemas?: infer _;
|
|
360
|
+
} ? Omit<TCaller, 'schemas'> & {
|
|
361
|
+
schemas?: TNewSchemas;
|
|
362
|
+
} : TCaller;
|
|
307
363
|
/**
|
|
308
364
|
* Builder used by developers to initialize the `IgniterCaller` client.
|
|
309
365
|
*
|
|
@@ -509,6 +565,14 @@ declare class IgniterCallerRequestBuilder<TResponse = unknown> {
|
|
|
509
565
|
* Used when creating requests via specific HTTP methods (get, post, etc.)
|
|
510
566
|
*/
|
|
511
567
|
type IgniterCallerMethodRequestBuilder<TResponse = unknown> = Omit<IgniterCallerRequestBuilder<TResponse>, '_setMethod' | '_setUrl'>;
|
|
568
|
+
/**
|
|
569
|
+
* Request builder with typed response based on schema inference.
|
|
570
|
+
* Used when creating requests via HTTP methods with URL that matches a schema.
|
|
571
|
+
*
|
|
572
|
+
* This type ensures that the execute() method returns the correct response type
|
|
573
|
+
* based on the schema map configuration.
|
|
574
|
+
*/
|
|
575
|
+
type IgniterCallerTypedRequestBuilder<TResponse = unknown> = Omit<IgniterCallerRequestBuilder<TResponse>, '_setMethod' | '_setUrl'>;
|
|
512
576
|
|
|
513
577
|
/**
|
|
514
578
|
* Callback function for event listeners.
|
|
@@ -523,13 +587,41 @@ type IgniterCallerEventCallback<T = any> = (result: IgniterCallerApiResponse<T>,
|
|
|
523
587
|
*/
|
|
524
588
|
type IgniterCallerUrlPattern = string | RegExp;
|
|
525
589
|
|
|
590
|
+
/**
|
|
591
|
+
* Infer success response type from endpoint schema (200 or 201).
|
|
592
|
+
*/
|
|
593
|
+
type InferSuccessResponse<T> = T extends IgniterCallerEndpointSchema<any, infer R> ? 200 extends keyof R ? R[200] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[200]> : unknown : 201 extends keyof R ? R[201] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[201]> : unknown : unknown : unknown;
|
|
594
|
+
/**
|
|
595
|
+
* Get the endpoint schema for a path and method from a schema map.
|
|
596
|
+
*/
|
|
597
|
+
type GetEndpoint<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = TPath extends keyof TSchemas ? TMethod extends keyof TSchemas[TPath] ? TSchemas[TPath][TMethod] : undefined : undefined;
|
|
598
|
+
/**
|
|
599
|
+
* Infer the response type for a given path and method.
|
|
600
|
+
* Returns `unknown` if the path/method is not in the schema.
|
|
601
|
+
*/
|
|
602
|
+
type InferResponse<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = InferSuccessResponse<GetEndpoint<TSchemas, TPath, TMethod>>;
|
|
603
|
+
/**
|
|
604
|
+
* Typed request builder with inferred body and params types.
|
|
605
|
+
*/
|
|
606
|
+
type TypedRequestBuilder<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = Omit<IgniterCallerMethodRequestBuilder<EndpointInfo<TSchemas, TPath, TMethod>['response']>, 'body' | 'params'> & {
|
|
607
|
+
/**
|
|
608
|
+
* Sets the request body with type inference from schema.
|
|
609
|
+
*/
|
|
610
|
+
body: EndpointInfo<TSchemas, TPath, TMethod>['request'] extends never ? <TBody>(body: TBody) => TypedRequestBuilder<TSchemas, TPath, TMethod> : (body: EndpointInfo<TSchemas, TPath, TMethod>['request']) => TypedRequestBuilder<TSchemas, TPath, TMethod>;
|
|
611
|
+
/**
|
|
612
|
+
* Sets URL path parameters with type inference from URL pattern.
|
|
613
|
+
*/
|
|
614
|
+
params: keyof EndpointInfo<TSchemas, TPath, TMethod>['params'] extends never ? (params: Record<string, string | number | boolean>) => TypedRequestBuilder<TSchemas, TPath, TMethod> : (params: EndpointInfo<TSchemas, TPath, TMethod>['params'] & Record<string, string | number | boolean>) => TypedRequestBuilder<TSchemas, TPath, TMethod>;
|
|
615
|
+
};
|
|
526
616
|
/**
|
|
527
617
|
* HTTP client runtime for Igniter.js.
|
|
528
618
|
*
|
|
529
619
|
* This module is intentionally structured to be extracted into a standalone package
|
|
530
620
|
* in the Igniter.js ecosystem as `@igniter-js/caller`.
|
|
621
|
+
*
|
|
622
|
+
* @template TSchemas - The schema map type for type-safe requests/responses.
|
|
531
623
|
*/
|
|
532
|
-
declare class IgniterCaller {
|
|
624
|
+
declare class IgniterCaller<TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> {
|
|
533
625
|
/** Global event emitter for observing HTTP responses */
|
|
534
626
|
private static readonly events;
|
|
535
627
|
private baseURL?;
|
|
@@ -546,7 +638,7 @@ declare class IgniterCaller {
|
|
|
546
638
|
logger?: IgniterLogger;
|
|
547
639
|
requestInterceptors?: IgniterCallerRequestInterceptor[];
|
|
548
640
|
responseInterceptors?: IgniterCallerResponseInterceptor[];
|
|
549
|
-
schemas?:
|
|
641
|
+
schemas?: TSchemas;
|
|
550
642
|
schemaValidation?: IgniterCallerSchemaValidationOptions;
|
|
551
643
|
});
|
|
552
644
|
/**
|
|
@@ -554,11 +646,11 @@ declare class IgniterCaller {
|
|
|
554
646
|
*
|
|
555
647
|
* This is designed to remain stable when extracted to `@igniter-js/caller`.
|
|
556
648
|
*/
|
|
557
|
-
static create(): IgniterCallerBuilder<IgniterCaller>;
|
|
649
|
+
static create<TInitSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap>(): IgniterCallerBuilder<IgniterCaller<TInitSchemas>, TInitSchemas>;
|
|
558
650
|
/**
|
|
559
651
|
* Returns a new client with the same config and a new logger.
|
|
560
652
|
*/
|
|
561
|
-
withLogger(logger: IgniterLogger): IgniterCaller
|
|
653
|
+
withLogger(logger: IgniterLogger): IgniterCaller<TSchemas>;
|
|
562
654
|
setBaseURL(baseURL: string): this;
|
|
563
655
|
setHeaders(headers: Record<string, string>): this;
|
|
564
656
|
setCookies(cookies: Record<string, string>): this;
|
|
@@ -566,71 +658,118 @@ declare class IgniterCaller {
|
|
|
566
658
|
* Creates common request builder params.
|
|
567
659
|
*/
|
|
568
660
|
private createBuilderParams;
|
|
661
|
+
/**
|
|
662
|
+
* Resolves the full URL path by prepending baseURL if needed.
|
|
663
|
+
*/
|
|
664
|
+
private resolveSchemaPath;
|
|
569
665
|
/**
|
|
570
666
|
* Creates a GET request.
|
|
571
667
|
*
|
|
572
|
-
*
|
|
668
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
669
|
+
* are automatically inferred from the schema definition.
|
|
670
|
+
*
|
|
671
|
+
* @param url Optional URL for the request. When provided and matching a schema path,
|
|
672
|
+
* enables full type inference for response, body, and path params.
|
|
573
673
|
*
|
|
574
674
|
* @example
|
|
575
675
|
* ```ts
|
|
576
|
-
* // With
|
|
577
|
-
* const result = await api.get('/users')
|
|
676
|
+
* // With typed schema - full type inference
|
|
677
|
+
* const result = await api.get('/users/:id')
|
|
678
|
+
* .params({ id: '123' }) // params are typed based on URL pattern
|
|
679
|
+
* .execute()
|
|
680
|
+
* // result.data is typed based on schema
|
|
578
681
|
*
|
|
579
|
-
* //
|
|
682
|
+
* // Without URL (set later with .url())
|
|
580
683
|
* const result = await api.get().url('/users').execute()
|
|
581
684
|
* ```
|
|
582
685
|
*/
|
|
583
|
-
get(url
|
|
686
|
+
get<TPath extends GetPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'GET'>;
|
|
687
|
+
get<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'GET'>>;
|
|
688
|
+
/**
|
|
689
|
+
* Creates a POST request.
|
|
690
|
+
*
|
|
691
|
+
* When a URL is provided and matches a schema, the response type is automatically inferred.
|
|
584
692
|
/**
|
|
585
693
|
* Creates a POST request.
|
|
586
694
|
*
|
|
587
|
-
*
|
|
695
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
696
|
+
* are automatically inferred from the schema definition.
|
|
697
|
+
*
|
|
698
|
+
* @param url Optional URL for the request.
|
|
588
699
|
*
|
|
589
700
|
* @example
|
|
590
701
|
* ```ts
|
|
591
|
-
*
|
|
702
|
+
* // With typed schema - body type is inferred from schema
|
|
703
|
+
* const result = await api.post('/users')
|
|
704
|
+
* .body({ name: 'John', email: 'john@example.com' }) // body is typed
|
|
705
|
+
* .execute()
|
|
592
706
|
* ```
|
|
593
707
|
*/
|
|
594
|
-
post(url
|
|
708
|
+
post<TPath extends PostPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'POST'>;
|
|
709
|
+
post<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'POST'>>;
|
|
595
710
|
/**
|
|
596
711
|
* Creates a PUT request.
|
|
597
712
|
*
|
|
598
|
-
*
|
|
713
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
714
|
+
* are automatically inferred from the schema definition.
|
|
715
|
+
*
|
|
716
|
+
* @param url Optional URL for the request.
|
|
599
717
|
*
|
|
600
718
|
* @example
|
|
601
719
|
* ```ts
|
|
602
|
-
* const result = await api.put('/users
|
|
720
|
+
* const result = await api.put('/users/:id')
|
|
721
|
+
* .params({ id: '1' })
|
|
722
|
+
* .body({ name: 'Jane' })
|
|
723
|
+
* .execute()
|
|
603
724
|
* ```
|
|
604
725
|
*/
|
|
605
|
-
put(url
|
|
726
|
+
put<TPath extends PutPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'PUT'>;
|
|
727
|
+
put<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'PUT'>>;
|
|
606
728
|
/**
|
|
607
729
|
* Creates a PATCH request.
|
|
608
730
|
*
|
|
609
|
-
*
|
|
731
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
732
|
+
* are automatically inferred from the schema definition.
|
|
733
|
+
*
|
|
734
|
+
* @param url Optional URL for the request.
|
|
610
735
|
*
|
|
611
736
|
* @example
|
|
612
737
|
* ```ts
|
|
613
|
-
* const result = await api.patch('/users
|
|
738
|
+
* const result = await api.patch('/users/:id')
|
|
739
|
+
* .params({ id: '1' })
|
|
740
|
+
* .body({ name: 'Jane' })
|
|
741
|
+
* .execute()
|
|
614
742
|
* ```
|
|
615
743
|
*/
|
|
616
|
-
patch(url
|
|
744
|
+
patch<TPath extends PatchPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'PATCH'>;
|
|
745
|
+
patch<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'PATCH'>>;
|
|
617
746
|
/**
|
|
618
747
|
* Creates a DELETE request.
|
|
619
748
|
*
|
|
620
|
-
*
|
|
749
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
750
|
+
* are automatically inferred from the schema definition.
|
|
751
|
+
*
|
|
752
|
+
* @param url Optional URL for the request.
|
|
621
753
|
*
|
|
622
754
|
* @example
|
|
623
755
|
* ```ts
|
|
624
|
-
* const result = await api.delete('/users
|
|
756
|
+
* const result = await api.delete('/users/:id')
|
|
757
|
+
* .params({ id: '1' })
|
|
758
|
+
* .execute()
|
|
625
759
|
* ```
|
|
626
760
|
*/
|
|
627
|
-
delete(url
|
|
761
|
+
delete<TPath extends DeletePaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'DELETE'>;
|
|
762
|
+
delete<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'DELETE'>>;
|
|
628
763
|
/**
|
|
629
764
|
* Creates a HEAD request.
|
|
630
765
|
*
|
|
631
|
-
*
|
|
766
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
767
|
+
* are automatically inferred from the schema definition.
|
|
768
|
+
*
|
|
769
|
+
* @param url Optional URL for the request.
|
|
632
770
|
*/
|
|
633
|
-
head(url
|
|
771
|
+
head<TPath extends HeadPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'HEAD'>;
|
|
772
|
+
head<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'HEAD'>>;
|
|
634
773
|
/**
|
|
635
774
|
* Executes a request directly with all options in one object (axios-style).
|
|
636
775
|
*
|
|
@@ -972,4 +1111,4 @@ declare class IgniterCallerUrlUtils {
|
|
|
972
1111
|
}): string;
|
|
973
1112
|
}
|
|
974
1113
|
|
|
975
|
-
export { type ExtractPathParams, IgniterCaller, type IgniterCallerApiResponse, type IgniterCallerBaseRequestOptions, IgniterCallerBodyUtils, IgniterCallerBuilder, type IgniterCallerBuilderFactory, type IgniterCallerBuilderState, IgniterCallerCacheUtils, type IgniterCallerDirectRequestOptions, type IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, type IgniterCallerEventCallback, IgniterCallerEvents, type IgniterCallerFileResponse, type IgniterCallerHttpMethod, type IgniterCallerMethodRequestBuilder, IgniterCallerMock, type IgniterCallerOperation, IgniterCallerRequestBuilder, type IgniterCallerRequestBuilderParams, type IgniterCallerRequestInterceptor, type IgniterCallerRequestOptions, type IgniterCallerResponseContentType, type IgniterCallerResponseInterceptor, type IgniterCallerResponseMarker, type IgniterCallerRetryOptions, type IgniterCallerSchemaMap, type IgniterCallerSchemaMethod, IgniterCallerSchemaUtils, type IgniterCallerSchemaValidationOptions, type IgniterCallerStoreAdapter, type IgniterCallerStoreOptions, type IgniterCallerUrlPattern, IgniterCallerUrlUtils, type IgniterCallerValidatableContentType, type InferAllResponseTypes, type InferRequestType, type InferResponseType, type InferSuccessResponseType, type SchemaMapEndpoint, type SchemaMapMethods, type SchemaMapPaths, type SchemaMapRequestType, type SchemaMapResponseType };
|
|
1114
|
+
export { type DeletePaths, type EndpointInfo, type ExtractPathParams, type GetPaths, type HeadPaths, IgniterCaller, type IgniterCallerApiResponse, type IgniterCallerBaseRequestOptions, IgniterCallerBodyUtils, IgniterCallerBuilder, type IgniterCallerBuilderFactory, type IgniterCallerBuilderState, IgniterCallerCacheUtils, type IgniterCallerDirectRequestOptions, type IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, type IgniterCallerEventCallback, IgniterCallerEvents, type IgniterCallerFileResponse, type IgniterCallerHttpMethod, type IgniterCallerMethodRequestBuilder, IgniterCallerMock, type IgniterCallerOperation, IgniterCallerRequestBuilder, type IgniterCallerRequestBuilderParams, type IgniterCallerRequestInterceptor, type IgniterCallerRequestOptions, type IgniterCallerResponseContentType, type IgniterCallerResponseInterceptor, type IgniterCallerResponseMarker, type IgniterCallerRetryOptions, type IgniterCallerSchemaMap, type IgniterCallerSchemaMethod, IgniterCallerSchemaUtils, type IgniterCallerSchemaValidationOptions, type IgniterCallerStoreAdapter, type IgniterCallerStoreOptions, type IgniterCallerTypedRequestBuilder, type IgniterCallerUrlPattern, IgniterCallerUrlUtils, type IgniterCallerValidatableContentType, type InferAllResponseTypes, type InferRequestType, type InferResponseType, type InferSuccessResponseType, type PatchPaths, type PathsForMethod, type PostPaths, type PutPaths, type ReplaceCallerSchema, type SchemaMapEndpoint, type SchemaMapMethods, type SchemaMapPaths, type SchemaMapRequestType, type SchemaMapResponseType, type TypedRequestBuilder };
|
package/dist/index.d.ts
CHANGED
|
@@ -209,6 +209,36 @@ type SchemaMapPaths<TSchemas extends IgniterCallerSchemaMap> = keyof TSchemas &
|
|
|
209
209
|
* Get available methods for a specific path.
|
|
210
210
|
*/
|
|
211
211
|
type SchemaMapMethods<TSchemas extends IgniterCallerSchemaMap, TPath extends keyof TSchemas> = keyof TSchemas[TPath] & IgniterCallerSchemaMethod;
|
|
212
|
+
/**
|
|
213
|
+
* Get all paths that have a specific method defined.
|
|
214
|
+
*/
|
|
215
|
+
type PathsForMethod<TSchemas extends IgniterCallerSchemaMap, TMethod extends IgniterCallerSchemaMethod> = {
|
|
216
|
+
[K in keyof TSchemas]: TMethod extends keyof TSchemas[K] ? K : never;
|
|
217
|
+
}[keyof TSchemas] & string;
|
|
218
|
+
/**
|
|
219
|
+
* Get paths available for GET method.
|
|
220
|
+
*/
|
|
221
|
+
type GetPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'GET'>;
|
|
222
|
+
/**
|
|
223
|
+
* Get paths available for POST method.
|
|
224
|
+
*/
|
|
225
|
+
type PostPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'POST'>;
|
|
226
|
+
/**
|
|
227
|
+
* Get paths available for PUT method.
|
|
228
|
+
*/
|
|
229
|
+
type PutPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'PUT'>;
|
|
230
|
+
/**
|
|
231
|
+
* Get paths available for PATCH method.
|
|
232
|
+
*/
|
|
233
|
+
type PatchPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'PATCH'>;
|
|
234
|
+
/**
|
|
235
|
+
* Get paths available for DELETE method.
|
|
236
|
+
*/
|
|
237
|
+
type DeletePaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'DELETE'>;
|
|
238
|
+
/**
|
|
239
|
+
* Get paths available for HEAD method.
|
|
240
|
+
*/
|
|
241
|
+
type HeadPaths<TSchemas extends IgniterCallerSchemaMap> = PathsForMethod<TSchemas, 'HEAD'>;
|
|
212
242
|
/**
|
|
213
243
|
* Get endpoint schema for a specific path and method.
|
|
214
244
|
*/
|
|
@@ -221,6 +251,23 @@ type SchemaMapResponseType<TSchemas extends IgniterCallerSchemaMap, TPath extend
|
|
|
221
251
|
* Infer request type from schema map for a specific path and method.
|
|
222
252
|
*/
|
|
223
253
|
type SchemaMapRequestType<TSchemas extends IgniterCallerSchemaMap, TPath extends keyof TSchemas, TMethod extends keyof TSchemas[TPath]> = TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<infer Request, any> ? Request extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Request> : never : never;
|
|
254
|
+
/**
|
|
255
|
+
* Infer endpoint info for a specific path and method.
|
|
256
|
+
* Returns an object with response, request, and params types.
|
|
257
|
+
*/
|
|
258
|
+
type EndpointInfo<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = TPath extends keyof TSchemas ? TMethod extends keyof TSchemas[TPath] ? {
|
|
259
|
+
response: TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<any, infer R> ? 200 extends keyof R ? R[200] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[200]> : unknown : 201 extends keyof R ? R[201] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[201]> : unknown : unknown : unknown;
|
|
260
|
+
request: TSchemas[TPath][TMethod] extends IgniterCallerEndpointSchema<infer Req, any> ? Req extends StandardSchemaV1 ? StandardSchemaV1.InferInput<Req> : never : never;
|
|
261
|
+
params: ExtractPathParams<TPath & string>;
|
|
262
|
+
} : {
|
|
263
|
+
response: unknown;
|
|
264
|
+
request: never;
|
|
265
|
+
params: Record<never, never>;
|
|
266
|
+
} : {
|
|
267
|
+
response: unknown;
|
|
268
|
+
request: never;
|
|
269
|
+
params: Record<never, never>;
|
|
270
|
+
};
|
|
224
271
|
/**
|
|
225
272
|
* Options for schema validation behavior.
|
|
226
273
|
*/
|
|
@@ -291,7 +338,7 @@ interface IgniterCallerStoreOptions {
|
|
|
291
338
|
fallbackToFetch?: boolean;
|
|
292
339
|
}
|
|
293
340
|
|
|
294
|
-
type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap =
|
|
341
|
+
type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> = {
|
|
295
342
|
baseURL?: string;
|
|
296
343
|
headers?: Record<string, string>;
|
|
297
344
|
cookies?: Record<string, string>;
|
|
@@ -303,7 +350,16 @@ type IgniterCallerBuilderState<TSchemas extends IgniterCallerSchemaMap = any> =
|
|
|
303
350
|
schemas?: TSchemas;
|
|
304
351
|
schemaValidation?: IgniterCallerSchemaValidationOptions;
|
|
305
352
|
};
|
|
306
|
-
type IgniterCallerBuilderFactory<TCaller, TSchemas extends IgniterCallerSchemaMap =
|
|
353
|
+
type IgniterCallerBuilderFactory<TCaller, TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> = (state: IgniterCallerBuilderState<TSchemas>) => TCaller;
|
|
354
|
+
/**
|
|
355
|
+
* Utility type to replace the schema type in a caller.
|
|
356
|
+
* Used by withSchemas to properly type the returned caller.
|
|
357
|
+
*/
|
|
358
|
+
type ReplaceCallerSchema<TCaller, TNewSchemas extends IgniterCallerSchemaMap> = TCaller extends {
|
|
359
|
+
schemas?: infer _;
|
|
360
|
+
} ? Omit<TCaller, 'schemas'> & {
|
|
361
|
+
schemas?: TNewSchemas;
|
|
362
|
+
} : TCaller;
|
|
307
363
|
/**
|
|
308
364
|
* Builder used by developers to initialize the `IgniterCaller` client.
|
|
309
365
|
*
|
|
@@ -509,6 +565,14 @@ declare class IgniterCallerRequestBuilder<TResponse = unknown> {
|
|
|
509
565
|
* Used when creating requests via specific HTTP methods (get, post, etc.)
|
|
510
566
|
*/
|
|
511
567
|
type IgniterCallerMethodRequestBuilder<TResponse = unknown> = Omit<IgniterCallerRequestBuilder<TResponse>, '_setMethod' | '_setUrl'>;
|
|
568
|
+
/**
|
|
569
|
+
* Request builder with typed response based on schema inference.
|
|
570
|
+
* Used when creating requests via HTTP methods with URL that matches a schema.
|
|
571
|
+
*
|
|
572
|
+
* This type ensures that the execute() method returns the correct response type
|
|
573
|
+
* based on the schema map configuration.
|
|
574
|
+
*/
|
|
575
|
+
type IgniterCallerTypedRequestBuilder<TResponse = unknown> = Omit<IgniterCallerRequestBuilder<TResponse>, '_setMethod' | '_setUrl'>;
|
|
512
576
|
|
|
513
577
|
/**
|
|
514
578
|
* Callback function for event listeners.
|
|
@@ -523,13 +587,41 @@ type IgniterCallerEventCallback<T = any> = (result: IgniterCallerApiResponse<T>,
|
|
|
523
587
|
*/
|
|
524
588
|
type IgniterCallerUrlPattern = string | RegExp;
|
|
525
589
|
|
|
590
|
+
/**
|
|
591
|
+
* Infer success response type from endpoint schema (200 or 201).
|
|
592
|
+
*/
|
|
593
|
+
type InferSuccessResponse<T> = T extends IgniterCallerEndpointSchema<any, infer R> ? 200 extends keyof R ? R[200] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[200]> : unknown : 201 extends keyof R ? R[201] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<R[201]> : unknown : unknown : unknown;
|
|
594
|
+
/**
|
|
595
|
+
* Get the endpoint schema for a path and method from a schema map.
|
|
596
|
+
*/
|
|
597
|
+
type GetEndpoint<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = TPath extends keyof TSchemas ? TMethod extends keyof TSchemas[TPath] ? TSchemas[TPath][TMethod] : undefined : undefined;
|
|
598
|
+
/**
|
|
599
|
+
* Infer the response type for a given path and method.
|
|
600
|
+
* Returns `unknown` if the path/method is not in the schema.
|
|
601
|
+
*/
|
|
602
|
+
type InferResponse<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = InferSuccessResponse<GetEndpoint<TSchemas, TPath, TMethod>>;
|
|
603
|
+
/**
|
|
604
|
+
* Typed request builder with inferred body and params types.
|
|
605
|
+
*/
|
|
606
|
+
type TypedRequestBuilder<TSchemas extends IgniterCallerSchemaMap, TPath extends string, TMethod extends IgniterCallerSchemaMethod> = Omit<IgniterCallerMethodRequestBuilder<EndpointInfo<TSchemas, TPath, TMethod>['response']>, 'body' | 'params'> & {
|
|
607
|
+
/**
|
|
608
|
+
* Sets the request body with type inference from schema.
|
|
609
|
+
*/
|
|
610
|
+
body: EndpointInfo<TSchemas, TPath, TMethod>['request'] extends never ? <TBody>(body: TBody) => TypedRequestBuilder<TSchemas, TPath, TMethod> : (body: EndpointInfo<TSchemas, TPath, TMethod>['request']) => TypedRequestBuilder<TSchemas, TPath, TMethod>;
|
|
611
|
+
/**
|
|
612
|
+
* Sets URL path parameters with type inference from URL pattern.
|
|
613
|
+
*/
|
|
614
|
+
params: keyof EndpointInfo<TSchemas, TPath, TMethod>['params'] extends never ? (params: Record<string, string | number | boolean>) => TypedRequestBuilder<TSchemas, TPath, TMethod> : (params: EndpointInfo<TSchemas, TPath, TMethod>['params'] & Record<string, string | number | boolean>) => TypedRequestBuilder<TSchemas, TPath, TMethod>;
|
|
615
|
+
};
|
|
526
616
|
/**
|
|
527
617
|
* HTTP client runtime for Igniter.js.
|
|
528
618
|
*
|
|
529
619
|
* This module is intentionally structured to be extracted into a standalone package
|
|
530
620
|
* in the Igniter.js ecosystem as `@igniter-js/caller`.
|
|
621
|
+
*
|
|
622
|
+
* @template TSchemas - The schema map type for type-safe requests/responses.
|
|
531
623
|
*/
|
|
532
|
-
declare class IgniterCaller {
|
|
624
|
+
declare class IgniterCaller<TSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap> {
|
|
533
625
|
/** Global event emitter for observing HTTP responses */
|
|
534
626
|
private static readonly events;
|
|
535
627
|
private baseURL?;
|
|
@@ -546,7 +638,7 @@ declare class IgniterCaller {
|
|
|
546
638
|
logger?: IgniterLogger;
|
|
547
639
|
requestInterceptors?: IgniterCallerRequestInterceptor[];
|
|
548
640
|
responseInterceptors?: IgniterCallerResponseInterceptor[];
|
|
549
|
-
schemas?:
|
|
641
|
+
schemas?: TSchemas;
|
|
550
642
|
schemaValidation?: IgniterCallerSchemaValidationOptions;
|
|
551
643
|
});
|
|
552
644
|
/**
|
|
@@ -554,11 +646,11 @@ declare class IgniterCaller {
|
|
|
554
646
|
*
|
|
555
647
|
* This is designed to remain stable when extracted to `@igniter-js/caller`.
|
|
556
648
|
*/
|
|
557
|
-
static create(): IgniterCallerBuilder<IgniterCaller>;
|
|
649
|
+
static create<TInitSchemas extends IgniterCallerSchemaMap = IgniterCallerSchemaMap>(): IgniterCallerBuilder<IgniterCaller<TInitSchemas>, TInitSchemas>;
|
|
558
650
|
/**
|
|
559
651
|
* Returns a new client with the same config and a new logger.
|
|
560
652
|
*/
|
|
561
|
-
withLogger(logger: IgniterLogger): IgniterCaller
|
|
653
|
+
withLogger(logger: IgniterLogger): IgniterCaller<TSchemas>;
|
|
562
654
|
setBaseURL(baseURL: string): this;
|
|
563
655
|
setHeaders(headers: Record<string, string>): this;
|
|
564
656
|
setCookies(cookies: Record<string, string>): this;
|
|
@@ -566,71 +658,118 @@ declare class IgniterCaller {
|
|
|
566
658
|
* Creates common request builder params.
|
|
567
659
|
*/
|
|
568
660
|
private createBuilderParams;
|
|
661
|
+
/**
|
|
662
|
+
* Resolves the full URL path by prepending baseURL if needed.
|
|
663
|
+
*/
|
|
664
|
+
private resolveSchemaPath;
|
|
569
665
|
/**
|
|
570
666
|
* Creates a GET request.
|
|
571
667
|
*
|
|
572
|
-
*
|
|
668
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
669
|
+
* are automatically inferred from the schema definition.
|
|
670
|
+
*
|
|
671
|
+
* @param url Optional URL for the request. When provided and matching a schema path,
|
|
672
|
+
* enables full type inference for response, body, and path params.
|
|
573
673
|
*
|
|
574
674
|
* @example
|
|
575
675
|
* ```ts
|
|
576
|
-
* // With
|
|
577
|
-
* const result = await api.get('/users')
|
|
676
|
+
* // With typed schema - full type inference
|
|
677
|
+
* const result = await api.get('/users/:id')
|
|
678
|
+
* .params({ id: '123' }) // params are typed based on URL pattern
|
|
679
|
+
* .execute()
|
|
680
|
+
* // result.data is typed based on schema
|
|
578
681
|
*
|
|
579
|
-
* //
|
|
682
|
+
* // Without URL (set later with .url())
|
|
580
683
|
* const result = await api.get().url('/users').execute()
|
|
581
684
|
* ```
|
|
582
685
|
*/
|
|
583
|
-
get(url
|
|
686
|
+
get<TPath extends GetPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'GET'>;
|
|
687
|
+
get<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'GET'>>;
|
|
688
|
+
/**
|
|
689
|
+
* Creates a POST request.
|
|
690
|
+
*
|
|
691
|
+
* When a URL is provided and matches a schema, the response type is automatically inferred.
|
|
584
692
|
/**
|
|
585
693
|
* Creates a POST request.
|
|
586
694
|
*
|
|
587
|
-
*
|
|
695
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
696
|
+
* are automatically inferred from the schema definition.
|
|
697
|
+
*
|
|
698
|
+
* @param url Optional URL for the request.
|
|
588
699
|
*
|
|
589
700
|
* @example
|
|
590
701
|
* ```ts
|
|
591
|
-
*
|
|
702
|
+
* // With typed schema - body type is inferred from schema
|
|
703
|
+
* const result = await api.post('/users')
|
|
704
|
+
* .body({ name: 'John', email: 'john@example.com' }) // body is typed
|
|
705
|
+
* .execute()
|
|
592
706
|
* ```
|
|
593
707
|
*/
|
|
594
|
-
post(url
|
|
708
|
+
post<TPath extends PostPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'POST'>;
|
|
709
|
+
post<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'POST'>>;
|
|
595
710
|
/**
|
|
596
711
|
* Creates a PUT request.
|
|
597
712
|
*
|
|
598
|
-
*
|
|
713
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
714
|
+
* are automatically inferred from the schema definition.
|
|
715
|
+
*
|
|
716
|
+
* @param url Optional URL for the request.
|
|
599
717
|
*
|
|
600
718
|
* @example
|
|
601
719
|
* ```ts
|
|
602
|
-
* const result = await api.put('/users
|
|
720
|
+
* const result = await api.put('/users/:id')
|
|
721
|
+
* .params({ id: '1' })
|
|
722
|
+
* .body({ name: 'Jane' })
|
|
723
|
+
* .execute()
|
|
603
724
|
* ```
|
|
604
725
|
*/
|
|
605
|
-
put(url
|
|
726
|
+
put<TPath extends PutPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'PUT'>;
|
|
727
|
+
put<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'PUT'>>;
|
|
606
728
|
/**
|
|
607
729
|
* Creates a PATCH request.
|
|
608
730
|
*
|
|
609
|
-
*
|
|
731
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
732
|
+
* are automatically inferred from the schema definition.
|
|
733
|
+
*
|
|
734
|
+
* @param url Optional URL for the request.
|
|
610
735
|
*
|
|
611
736
|
* @example
|
|
612
737
|
* ```ts
|
|
613
|
-
* const result = await api.patch('/users
|
|
738
|
+
* const result = await api.patch('/users/:id')
|
|
739
|
+
* .params({ id: '1' })
|
|
740
|
+
* .body({ name: 'Jane' })
|
|
741
|
+
* .execute()
|
|
614
742
|
* ```
|
|
615
743
|
*/
|
|
616
|
-
patch(url
|
|
744
|
+
patch<TPath extends PatchPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'PATCH'>;
|
|
745
|
+
patch<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'PATCH'>>;
|
|
617
746
|
/**
|
|
618
747
|
* Creates a DELETE request.
|
|
619
748
|
*
|
|
620
|
-
*
|
|
749
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
750
|
+
* are automatically inferred from the schema definition.
|
|
751
|
+
*
|
|
752
|
+
* @param url Optional URL for the request.
|
|
621
753
|
*
|
|
622
754
|
* @example
|
|
623
755
|
* ```ts
|
|
624
|
-
* const result = await api.delete('/users
|
|
756
|
+
* const result = await api.delete('/users/:id')
|
|
757
|
+
* .params({ id: '1' })
|
|
758
|
+
* .execute()
|
|
625
759
|
* ```
|
|
626
760
|
*/
|
|
627
|
-
delete(url
|
|
761
|
+
delete<TPath extends DeletePaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'DELETE'>;
|
|
762
|
+
delete<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'DELETE'>>;
|
|
628
763
|
/**
|
|
629
764
|
* Creates a HEAD request.
|
|
630
765
|
*
|
|
631
|
-
*
|
|
766
|
+
* When a URL is provided and matches a schema, the response, body, and params types
|
|
767
|
+
* are automatically inferred from the schema definition.
|
|
768
|
+
*
|
|
769
|
+
* @param url Optional URL for the request.
|
|
632
770
|
*/
|
|
633
|
-
head(url
|
|
771
|
+
head<TPath extends HeadPaths<TSchemas>>(url: TPath): TypedRequestBuilder<TSchemas, TPath, 'HEAD'>;
|
|
772
|
+
head<TPath extends string>(url?: TPath): IgniterCallerTypedRequestBuilder<InferResponse<TSchemas, TPath, 'HEAD'>>;
|
|
634
773
|
/**
|
|
635
774
|
* Executes a request directly with all options in one object (axios-style).
|
|
636
775
|
*
|
|
@@ -972,4 +1111,4 @@ declare class IgniterCallerUrlUtils {
|
|
|
972
1111
|
}): string;
|
|
973
1112
|
}
|
|
974
1113
|
|
|
975
|
-
export { type ExtractPathParams, IgniterCaller, type IgniterCallerApiResponse, type IgniterCallerBaseRequestOptions, IgniterCallerBodyUtils, IgniterCallerBuilder, type IgniterCallerBuilderFactory, type IgniterCallerBuilderState, IgniterCallerCacheUtils, type IgniterCallerDirectRequestOptions, type IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, type IgniterCallerEventCallback, IgniterCallerEvents, type IgniterCallerFileResponse, type IgniterCallerHttpMethod, type IgniterCallerMethodRequestBuilder, IgniterCallerMock, type IgniterCallerOperation, IgniterCallerRequestBuilder, type IgniterCallerRequestBuilderParams, type IgniterCallerRequestInterceptor, type IgniterCallerRequestOptions, type IgniterCallerResponseContentType, type IgniterCallerResponseInterceptor, type IgniterCallerResponseMarker, type IgniterCallerRetryOptions, type IgniterCallerSchemaMap, type IgniterCallerSchemaMethod, IgniterCallerSchemaUtils, type IgniterCallerSchemaValidationOptions, type IgniterCallerStoreAdapter, type IgniterCallerStoreOptions, type IgniterCallerUrlPattern, IgniterCallerUrlUtils, type IgniterCallerValidatableContentType, type InferAllResponseTypes, type InferRequestType, type InferResponseType, type InferSuccessResponseType, type SchemaMapEndpoint, type SchemaMapMethods, type SchemaMapPaths, type SchemaMapRequestType, type SchemaMapResponseType };
|
|
1114
|
+
export { type DeletePaths, type EndpointInfo, type ExtractPathParams, type GetPaths, type HeadPaths, IgniterCaller, type IgniterCallerApiResponse, type IgniterCallerBaseRequestOptions, IgniterCallerBodyUtils, IgniterCallerBuilder, type IgniterCallerBuilderFactory, type IgniterCallerBuilderState, IgniterCallerCacheUtils, type IgniterCallerDirectRequestOptions, type IgniterCallerEndpointSchema, IgniterCallerError, type IgniterCallerErrorCode, type IgniterCallerErrorPayload, type IgniterCallerEventCallback, IgniterCallerEvents, type IgniterCallerFileResponse, type IgniterCallerHttpMethod, type IgniterCallerMethodRequestBuilder, IgniterCallerMock, type IgniterCallerOperation, IgniterCallerRequestBuilder, type IgniterCallerRequestBuilderParams, type IgniterCallerRequestInterceptor, type IgniterCallerRequestOptions, type IgniterCallerResponseContentType, type IgniterCallerResponseInterceptor, type IgniterCallerResponseMarker, type IgniterCallerRetryOptions, type IgniterCallerSchemaMap, type IgniterCallerSchemaMethod, IgniterCallerSchemaUtils, type IgniterCallerSchemaValidationOptions, type IgniterCallerStoreAdapter, type IgniterCallerStoreOptions, type IgniterCallerTypedRequestBuilder, type IgniterCallerUrlPattern, IgniterCallerUrlUtils, type IgniterCallerValidatableContentType, type InferAllResponseTypes, type InferRequestType, type InferResponseType, type InferSuccessResponseType, type PatchPaths, type PathsForMethod, type PostPaths, type PutPaths, type ReplaceCallerSchema, type SchemaMapEndpoint, type SchemaMapMethods, type SchemaMapPaths, type SchemaMapRequestType, type SchemaMapResponseType, type TypedRequestBuilder };
|