@zimic/interceptor 0.19.1-canary.2 → 0.19.1-canary.4

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.
Files changed (42) hide show
  1. package/dist/{chunk-6PRFBMY7.mjs → chunk-7BR57OM2.mjs} +3 -3
  2. package/dist/chunk-7BR57OM2.mjs.map +1 -0
  3. package/dist/{chunk-3NJLJSD6.js → chunk-QB2A2272.js} +3 -3
  4. package/dist/chunk-QB2A2272.js.map +1 -0
  5. package/dist/cli.js +20 -20
  6. package/dist/cli.js.map +1 -1
  7. package/dist/cli.mjs +4 -4
  8. package/dist/cli.mjs.map +1 -1
  9. package/dist/http.d.ts +268 -479
  10. package/dist/http.js +5 -5
  11. package/dist/http.js.map +1 -1
  12. package/dist/http.mjs +5 -5
  13. package/dist/http.mjs.map +1 -1
  14. package/dist/server.d.ts +14 -15
  15. package/dist/server.js +6 -6
  16. package/dist/server.mjs +1 -1
  17. package/package.json +3 -3
  18. package/src/cli/server/start.ts +1 -1
  19. package/src/cli/server/token/create.ts +1 -1
  20. package/src/http/interceptor/errors/NotRunningHttpInterceptorError.ts +3 -3
  21. package/src/http/interceptor/errors/RequestSavingSafeLimitExceededError.ts +2 -2
  22. package/src/http/interceptor/errors/RunningHttpInterceptorError.ts +3 -3
  23. package/src/http/interceptor/errors/UnknownHttpInterceptorPlatformError.ts +1 -1
  24. package/src/http/interceptor/factory.ts +1 -9
  25. package/src/http/interceptor/types/options.ts +32 -132
  26. package/src/http/interceptor/types/public.ts +160 -248
  27. package/src/http/interceptor/types/schema.ts +2 -3
  28. package/src/http/interceptorWorker/HttpInterceptorWorker.ts +1 -1
  29. package/src/http/interceptorWorker/errors/UnregisteredBrowserServiceWorkerError.ts +2 -2
  30. package/src/http/requestHandler/errors/DisabledRequestSavingError.ts +2 -2
  31. package/src/http/requestHandler/errors/TimesCheckError.ts +1 -1
  32. package/src/http/requestHandler/types/public.ts +60 -73
  33. package/src/http/requestHandler/types/restrictions.ts +6 -6
  34. package/src/server/errors/InvalidInterceptorTokenError.ts +1 -1
  35. package/src/server/errors/InvalidInterceptorTokenFileError.ts +1 -1
  36. package/src/server/errors/InvalidInterceptorTokenValueError.ts +1 -1
  37. package/src/server/errors/RunningInterceptorServerError.ts +1 -1
  38. package/src/server/factory.ts +3 -3
  39. package/src/server/types/options.ts +2 -3
  40. package/src/server/types/public.ts +8 -8
  41. package/dist/chunk-3NJLJSD6.js.map +0 -1
  42. package/dist/chunk-6PRFBMY7.mjs.map +0 -1
package/dist/http.d.ts CHANGED
@@ -3,9 +3,9 @@ import { HttpMethodSchema, HttpRequest, HttpHeaders, HttpRequestHeadersSchema, I
3
3
  /**
4
4
  * An error thrown when the interceptor is running and some operation requires it to be stopped first.
5
5
  *
6
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstart `interceptor.start()` API reference}
7
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstop `interceptor.stop()` API reference}
8
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorisrunning `interceptor.isRunning` API reference}
6
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstart `interceptor.start()` API reference}
7
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstop `interceptor.stop()` API reference}
8
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorisrunning `interceptor.isRunning` API reference}
9
9
  */
10
10
  declare class RunningHttpInterceptorError extends Error {
11
11
  constructor(additionalMessage: string);
@@ -14,9 +14,9 @@ declare class RunningHttpInterceptorError extends Error {
14
14
  /**
15
15
  * An error thrown when the interceptor is not running and it's not possible to use the mocking utilities.
16
16
  *
17
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstart `interceptor.start()` API reference}
18
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstop `interceptor.stop()` API reference}
19
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorisrunning `interceptor.isRunning` API reference}
17
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstart `interceptor.start()` API reference}
18
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstop `interceptor.stop()` API reference}
19
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorisrunning `interceptor.isRunning` API reference}
20
20
  */
21
21
  declare class NotRunningHttpInterceptorError extends Error {
22
22
  constructor();
@@ -26,7 +26,7 @@ declare class NotRunningHttpInterceptorError extends Error {
26
26
  * An error thrown when an unknown interceptor platform is detected. Currently, the platforms `node` and `browser` are
27
27
  * supported.
28
28
  *
29
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorplatform `interceptor.platform` API reference}
29
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorplatform `interceptor.platform` API reference}
30
30
  */
31
31
  declare class UnknownHttpInterceptorPlatformError extends Error {
32
32
  constructor();
@@ -39,7 +39,7 @@ declare class UnknownHttpInterceptorTypeError extends TypeError {
39
39
  /**
40
40
  * Error thrown when the safe limit of saved intercepted requests is exceeded.
41
41
  *
42
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
42
+ * @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference}
43
43
  */
44
44
  declare class RequestSavingSafeLimitExceededError extends TypeError {
45
45
  constructor(numberOfSavedRequests: number, safeLimit: number);
@@ -66,7 +66,7 @@ declare class InvalidJSONError extends SyntaxError {
66
66
  /**
67
67
  * An error thrown when the browser mock service worker is not found.
68
68
  *
69
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐browser#zimic-browser-init `zimic-interceptor browser init` API reference}
69
+ * @see {@link https://zimic.dev/docs/interceptor/cli/browser#zimic-interceptor-browser-init `zimic-interceptor browser init` API reference}
70
70
  */
71
71
  declare class UnregisteredBrowserServiceWorkerError extends Error {
72
72
  constructor();
@@ -76,7 +76,7 @@ declare class UnregisteredBrowserServiceWorkerError extends Error {
76
76
  /**
77
77
  * Error thrown when trying to access requests when the interceptor is not configured to do so.
78
78
  *
79
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
79
+ * @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference}
80
80
  */
81
81
  declare class DisabledRequestSavingError extends TypeError {
82
82
  constructor();
@@ -173,198 +173,97 @@ type UnhandledHttpInterceptorRequestMethodSchema = HttpSchema.Method<{
173
173
  }>;
174
174
  type UnhandledHttpInterceptorRequest = Omit<HttpInterceptorRequest<string, UnhandledHttpInterceptorRequestMethodSchema>, 'response'>;
175
175
 
176
- /**
177
- * An type of an HTTP interceptor.
178
- *
179
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor `HttpInterceptor` API reference}
180
- */
176
+ /** @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptortype `interceptor.type` API reference} */
181
177
  type HttpInterceptorType = 'local' | 'remote';
182
- /**
183
- * The platform where an HTTP interceptor is running.
184
- *
185
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorplatform `interceptor.platform` API reference}
186
- */
178
+ /** @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorplatform `interceptor.platform` API reference} */
187
179
  type HttpInterceptorPlatform = 'node' | 'browser';
188
- /**
189
- * The strategy to treat unhandled requests.
190
- *
191
- * When `log` is `true` or `undefined`, warnings about unhandled requests are logged to the console. If provided a
192
- * factory, unhandled request warnings will be logged if the function returns a
193
- * {@link UnhandledRequestStrategy.Declaration strategy declaration} containing `log` as `true` or `undefined`.
194
- *
195
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
196
- */
180
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
197
181
  declare namespace UnhandledRequestStrategy {
198
- /**
199
- * The action to take when an unhandled request is intercepted.
200
- *
201
- * In a {@link https://github.com/zimicjs/zimic/wiki/getting‐started#local-http-interceptors local interceptor}, the
202
- * action is always `bypass`, meaning that unhandled requests pass through the interceptor and reach the real network.
203
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#local-http-interceptors Remote interceptors} always use
204
- * `reject`, since unhandled requests that react an
205
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server} cannot be bypassed.
206
- *
207
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
208
- */
182
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
209
183
  type Action = 'bypass' | 'reject';
210
- /**
211
- * A static declaration of the strategy to use for unhandled requests.
212
- *
213
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
214
- */
184
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
215
185
  interface Declaration<DeclarationAction extends Action = Action> {
216
- /** The action to take when an unhandled request is intercepted. */
186
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
217
187
  action: DeclarationAction;
218
- /**
219
- * Whether to log unhandled requests to the console.
220
- *
221
- * @default true
222
- */
188
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
223
189
  log?: boolean;
224
190
  }
225
- /**
226
- * A factory to create dynamic unhandled request strategies based on the intercepted request.
227
- *
228
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
229
- */
191
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
230
192
  type DeclarationFactory<DeclarationAction extends Action = Action> = (request: UnhandledHttpInterceptorRequest) => PossiblePromise<Declaration<DeclarationAction>>;
231
- /**
232
- * A static declaration of the strategy to use for unhandled requests in local interceptors.
233
- *
234
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
235
- */
193
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
236
194
  type LocalDeclaration = Declaration;
237
- /**
238
- * A factory to create dynamic unhandled request strategies based on the intercepted request in local interceptors.
239
- *
240
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
241
- */
195
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
242
196
  type LocalDeclarationFactory = DeclarationFactory;
243
- /**
244
- * A static declaration of the strategy to use for unhandled requests in remote interceptors.
245
- *
246
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
247
- */
197
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
248
198
  type RemoteDeclaration = Declaration<'reject'>;
249
- /**
250
- * A factory to create dynamic unhandled request strategies based on the intercepted request in remote interceptors.
251
- *
252
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
253
- */
199
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
254
200
  type RemoteDeclarationFactory = DeclarationFactory<'reject'>;
255
- /** The static declaration or a factory of the strategy to use for unhandled requests in local interceptors. */
201
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
256
202
  type Local = LocalDeclaration | LocalDeclarationFactory;
257
- /** The static declaration or a factory of the strategy to use for unhandled requests in remote interceptors. */
203
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
258
204
  type Remote = RemoteDeclaration | RemoteDeclarationFactory;
259
205
  }
260
206
  type UnhandledRequestStrategy = UnhandledRequestStrategy.Local | UnhandledRequestStrategy.Remote;
261
207
  interface SharedHttpInterceptorOptions {
262
- /**
263
- * The type of the HTTP interceptor.
264
- *
265
- * @default 'local'
266
- */
208
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference} */
267
209
  type?: HttpInterceptorType;
268
- /**
269
- * Represents the URL that should be matched by the interceptor. Any request starting with this base URL will be
270
- * intercepted if a matching
271
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler handler} exists.
272
- *
273
- * For {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptors}, this
274
- * base URL should point to an
275
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}. It may include
276
- * additional paths to differentiate between conflicting mocks.
277
- */
210
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference} */
278
211
  baseURL: string;
279
- /**
280
- * Configures if the intercepted requests are saved and how they are handled.
281
- *
282
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
283
- * @see {@link https://github.com/zimicjs/zimic/wiki/guides‐testing‐interceptor Testing}
284
- */
212
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference} */
285
213
  requestSaving?: Partial<HttpInterceptorRequestSaving>;
286
214
  }
287
215
  /**
288
- * The options to create a
289
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#local-http-interceptors local HTTP interceptor}.
290
- *
291
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#creating-a-local-http-interceptor Creating a local HTTP interceptor}
216
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/local-interceptors#creating-a-local-http-interceptor Creating a local HTTP interceptor}
217
+ * @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference}
292
218
  */
293
219
  interface LocalHttpInterceptorOptions extends SharedHttpInterceptorOptions {
294
220
  type?: 'local';
295
- /**
296
- * The strategy to use for unhandled requests. If a request starts with the base URL of the interceptor, but no
297
- * matching handler exists, this strategy will be used. If a function is provided, it will be called with the
298
- * unhandled request.
299
- *
300
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
301
- */
221
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
302
222
  onUnhandledRequest?: UnhandledRequestStrategy.Local;
303
223
  }
224
+ interface HttpInterceptorAuthOptions {
225
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors#interceptor-server-authentication Interceptor server authentication} */
226
+ token: string;
227
+ }
304
228
  /**
305
- * The options to create a
306
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote HTTP interceptor}.
307
- *
308
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#creating-a-remote-http-interceptor Creating a remote HTTP interceptor}
229
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors#creating-a-remote-http-interceptor Creating a remote HTTP interceptor}
230
+ * @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference}
309
231
  */
310
232
  interface RemoteHttpInterceptorOptions extends SharedHttpInterceptorOptions {
311
233
  type: 'remote';
312
- /**
313
- * Options to authenticate the interceptor when connecting to an interceptor server. This is required if the
314
- * interceptor server was started with the `--tokens-dir` option.
315
- *
316
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
317
- */
318
- auth?: {
319
- /**
320
- * The authentication token to use.
321
- *
322
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
323
- */
324
- token: string;
325
- };
326
- /**
327
- * The strategy to use for unhandled requests. If a request starts with the base URL of the interceptor, but no
328
- * matching handler exists, this strategy will be used. If a function is provided, it will be called with the
329
- * unhandled request.
330
- *
331
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
332
- */
234
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors#interceptor-server-authentication Interceptor server authentication} */
235
+ auth?: HttpInterceptorAuthOptions;
236
+ /** @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests} */
333
237
  onUnhandledRequest?: UnhandledRequestStrategy.Remote;
334
238
  }
335
- /**
336
- * The options to create an
337
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor HTTP interceptor}.
338
- *
339
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#createhttpinterceptoroptions `createHttpInterceptor(options)` API reference}
340
- */
239
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference} */
341
240
  type HttpInterceptorOptions = LocalHttpInterceptorOptions | RemoteHttpInterceptorOptions;
342
241
 
343
242
  type PartialHttpHeadersOrSchema<Schema extends HttpHeadersSchema.Loose> = IfNever<Schema, never, Partial<Schema> | HttpHeaders<Partial<Schema>> | HttpHeaders<Schema>>;
344
243
  /**
345
244
  * A static headers restriction to match intercepted requests.
346
245
  *
347
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
246
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
348
247
  */
349
248
  type HttpRequestHandlerHeadersStaticRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> = PartialHttpHeadersOrSchema<Default<HttpRequestHeadersSchema<Default<Schema[Path][Method]>>>>;
350
249
  type PartialHttpSearchParamsOrSchema<Schema extends HttpSearchParamsSchema.Loose> = IfNever<Schema, never, Partial<Schema> | HttpSearchParams<Partial<Schema>> | HttpSearchParams<Schema>>;
351
250
  /**
352
251
  * A static search params restriction to match intercepted requests.
353
252
  *
354
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
253
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
355
254
  */
356
255
  type HttpRequestHandlerSearchParamsStaticRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> = PartialHttpSearchParamsOrSchema<Default<HttpRequestSearchParamsSchema<Default<Schema[Path][Method]>>>>;
357
256
  type PartialBodyOrSchema<Body extends HttpBody> = Body extends HttpFormData<infer Schema> ? HttpFormData<Partial<Schema>> | HttpFormData<Schema> : Body extends HttpSearchParams<infer Schema> ? HttpSearchParams<Partial<Schema>> | HttpSearchParams<Schema> : Body extends Blob ? Body : DeepPartial<Body>;
358
257
  /**
359
258
  * A static body restriction to match intercepted requests.
360
259
  *
361
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
260
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
362
261
  */
363
262
  type HttpRequestHandlerBodyStaticRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> = PartialBodyOrSchema<HttpRequestBodySchema<Default<Schema[Path][Method]>>>;
364
263
  /**
365
264
  * A static restriction to match intercepted requests.
366
265
  *
367
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
266
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
368
267
  */
369
268
  interface HttpRequestHandlerStaticRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> {
370
269
  /**
@@ -391,13 +290,13 @@ interface HttpRequestHandlerStaticRestriction<Schema extends HttpSchema, Method
391
290
  /**
392
291
  * A computed restriction to match intercepted requests.
393
292
  *
394
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
293
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
395
294
  */
396
295
  type HttpRequestHandlerComputedRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> = (request: HttpInterceptorRequest<Path, Default<Schema[Path][Method]>>) => PossiblePromise<boolean>;
397
296
  /**
398
297
  * A restriction to match intercepted requests.
399
298
  *
400
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
299
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
401
300
  */
402
301
  type HttpRequestHandlerRestriction<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> = HttpRequestHandlerStaticRestriction<Schema, Method, Path> | HttpRequestHandlerComputedRestriction<Schema, Method, Path>;
403
302
  interface RestrictionDiff<Value> {
@@ -419,17 +318,17 @@ interface UnmatchedHttpInterceptorRequestGroup {
419
318
  * An HTTP request handler to declare responses for intercepted requests.
420
319
  *
421
320
  * When multiple handlers of the same interceptor match the same method and path, the _last_ handler created with
422
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)`}
321
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptormethodpath `interceptor.<method>(path)`}
423
322
  * will be used.
424
323
  *
425
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler` API reference}
324
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler` API reference}
426
325
  */
427
326
  interface HttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>> {
428
327
  /**
429
328
  * The method that matches this handler.
430
329
  *
431
330
  * @readonly
432
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlermethod `handler.method` API reference}
331
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlermethod `handler.method` API reference}
433
332
  */
434
333
  get method(): Method;
435
334
  /**
@@ -437,7 +336,7 @@ interface HttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchem
437
336
  * requests.
438
337
  *
439
338
  * @readonly
440
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerpath `handler.path` API reference}
339
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerpath `handler.path` API reference}
441
340
  */
442
341
  get path(): Path;
443
342
  }
@@ -446,10 +345,10 @@ interface HttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchem
446
345
  * operations are synchronous and are executed in the same process where it was created.
447
346
  *
448
347
  * When multiple handlers of the same interceptor match the same method and path, the _last_ handler created with
449
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)`}
348
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptormethodpath `interceptor.<method>(path)`}
450
349
  * will be used.
451
350
  *
452
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler` API reference}
351
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler` API reference}
453
352
  */
454
353
  interface LocalHttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>, StatusCode extends HttpStatusCode = never> extends HttpRequestHandler<Schema, Method, Path> {
455
354
  /** @readonly */
@@ -468,7 +367,7 @@ interface LocalHttpRequestHandler<Schema extends HttpSchema, Method extends Http
468
367
  *
469
368
  * @param restriction The restriction to match intercepted requests.
470
369
  * @returns The same handler, now considering the specified restriction.
471
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
370
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
472
371
  */
473
372
  with: (restriction: HttpRequestHandlerRestriction<Schema, Method, Path>) => this;
474
373
  /**
@@ -480,7 +379,7 @@ interface LocalHttpRequestHandler<Schema extends HttpSchema, Method extends Http
480
379
  * @param declaration The response declaration or a factory to create it.
481
380
  * @returns The same handler, now including type information about the response declaration based on the specified
482
381
  * status code.
483
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrespond `handler.respond()` API reference}
382
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrespond `handler.respond()` API reference}
484
383
  */
485
384
  respond: <NewStatusCode extends HttpResponseSchemaStatusCode<Default<Default<Schema[Path][Method]>['response']>>>(declaration: HttpRequestHandlerResponseDeclaration<Default<Schema[Path][Method]>, NewStatusCode> | HttpRequestHandlerResponseDeclarationFactory<Path, Default<Schema[Path][Method]>, NewStatusCode>) => LocalHttpRequestHandler<Schema, Method, Path, NewStatusCode>;
486
385
  /**
@@ -494,55 +393,53 @@ interface LocalHttpRequestHandler<Schema extends HttpSchema, Method extends Http
494
393
  * returning its response. In this case, Zimic will try other handlers until one eligible is found, otherwise the
495
394
  * request will be either bypassed or rejected. Learn more about how Zimic decides which handler to use for an
496
395
  * intercepted request in the
497
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}.
396
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}.
498
397
  *
499
398
  * **Important**: To make sure that all expected requests were made, use
500
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()`}
501
- * or {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()`}.
502
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()`}
503
- * is generally preferred, as it checks all handlers created by the interceptor with a single call.
399
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorchecktimes `interceptor.checkTimes()`} or
400
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()`}.
401
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorchecktimes `interceptor.checkTimes()`} is
402
+ * generally preferred, as it checks all handlers created by the interceptor with a single call.
504
403
  *
505
404
  * @param numberOfRequests The number of times the handler should match intercepted requests.
506
405
  * @param minNumberOfRequests The minimum number of times the handler should match intercepted requests.
507
406
  * @param maxNumberOfRequests The maximum number of times the handler should match intercepted requests.
508
407
  * @returns The same handler, now considering the specified number of times.
509
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()` API reference}
408
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()` API reference}
510
409
  */
511
410
  times: ((numberOfRequests: number) => this) & ((minNumberOfRequests: number, maxNumberOfRequests: number) => this);
512
411
  /**
513
412
  * Checks if the handler has matched the expected number of requests declared with
514
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()`}.
413
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()`}.
515
414
  *
516
415
  * If the handler has matched fewer or more requests than expected, this method will throw a `TimesCheckError` error
517
416
  * pointing to the
518
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()` API reference}
417
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()` API reference}
519
418
  * that was not satisfied.
520
419
  *
521
- * When
522
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests
523
- * `requestSaving.enabled`} is
524
- * `true` in your interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the
525
- * expected and received data. This is useful for debugging requests that did not match a handler with
526
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions}.
420
+ * When {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `requestSaving.enabled`} is `true` in
421
+ * your interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the expected and
422
+ * received data. This is useful for debugging requests that did not match a handler with
423
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}.
527
424
  *
528
425
  * @throws {TimesCheckError} If the handler has matched less or more requests than the expected number of requests.
529
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerchecktimes `handler.checkTimes()` API reference}
426
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerchecktimes `handler.checkTimes()` API reference}
530
427
  */
531
428
  checkTimes: () => void;
532
429
  /**
533
430
  * Clears any response declared with
534
- * [`handler.respond(declaration)`](https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerresponddeclaration),
431
+ * [`handler.respond(declaration)`](https://zimic.dev/docs/interceptor/api/http-request-handler#handlerresponddeclaration),
535
432
  * restrictions declared with
536
- * [`handler.with(restriction)`](https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction),
433
+ * [`handler.with(restriction)`](https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction),
537
434
  * and intercepted requests, making the handler stop matching requests. The next handler, created before this one,
538
435
  * that matches the same method and path will be used if present. If not, the requests of the method and path will not
539
436
  * be intercepted.
540
437
  *
541
438
  * To make the handler match requests again, register a new response with
542
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrespond `handler.respond()`}.
439
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrespond `handler.respond()`}.
543
440
  *
544
441
  * @returns The same handler, now cleared of any declared responses, restrictions, and intercepted requests.
545
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerclear `handler.clear()` API reference}
442
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerclear `handler.clear()` API reference}
546
443
  */
547
444
  clear: () => this;
548
445
  /**
@@ -550,24 +447,20 @@ interface LocalHttpRequestHandler<Schema extends HttpSchema, Method extends Http
550
447
  * useful for testing that the correct requests were made by your application.
551
448
  *
552
449
  * **Important**: This method can only be used if
553
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests
554
- * `requestSaving.enabled`} is
555
- * `true` in the interceptor. See
556
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
557
- * for more information.
450
+ * {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `requestSaving.enabled`} is `true` in the
451
+ * interceptor.
558
452
  *
559
453
  * @throws {DisabledRequestSavingError} If the interceptor has `requestSaving.enabled: false`.
560
454
  * @readonly
561
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrequests `handler.requests` API reference}
455
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrequests `handler.requests` API reference}
562
456
  */
563
457
  get requests(): readonly InterceptedHttpInterceptorRequest<Path, Default<Schema[Path][Method]>, StatusCode>[];
564
458
  }
565
459
  /**
566
460
  * A synced remote HTTP request handler. When a remote handler is synced, it is guaranteed that all of the mocking
567
- * operations were committed to the connected
568
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
461
+ * operations were committed to the connected {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
569
462
  *
570
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler` API reference}
463
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler` API reference}
571
464
  */
572
465
  interface SyncedRemoteHttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>, StatusCode extends HttpStatusCode = never> extends HttpRequestHandler<Schema, Method, Path> {
573
466
  /** @readonly */
@@ -586,7 +479,7 @@ interface SyncedRemoteHttpRequestHandler<Schema extends HttpSchema, Method exten
586
479
  *
587
480
  * @param restriction The restriction to match intercepted requests.
588
481
  * @returns The same handler, now considering the specified restriction.
589
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction `handler.with()` API reference}
482
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction `handler.with()` API reference}
590
483
  */
591
484
  with: (restriction: HttpRequestHandlerRestriction<Schema, Method, Path>) => PendingRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>;
592
485
  /**
@@ -598,7 +491,7 @@ interface SyncedRemoteHttpRequestHandler<Schema extends HttpSchema, Method exten
598
491
  * @param declaration The response declaration or a factory to create it.
599
492
  * @returns The same handler, now including type information about the response declaration based on the specified
600
493
  * status code.
601
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrespond `handler.respond()` API reference}
494
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrespond `handler.respond()` API reference}
602
495
  */
603
496
  respond: <NewStatusCode extends HttpResponseSchemaStatusCode<Default<Default<Schema[Path][Method]>['response']>>>(declaration: HttpRequestHandlerResponseDeclaration<Default<Schema[Path][Method]>, NewStatusCode> | HttpRequestHandlerResponseDeclarationFactory<Path, Default<Schema[Path][Method]>, NewStatusCode>) => PendingRemoteHttpRequestHandler<Schema, Method, Path, NewStatusCode>;
604
497
  /**
@@ -612,56 +505,53 @@ interface SyncedRemoteHttpRequestHandler<Schema extends HttpSchema, Method exten
612
505
  * returning its response. In this case, Zimic will try other handlers until one eligible is found, otherwise the
613
506
  * request will be either bypassed or rejected. Learn more about how Zimic decides which handler to use for an
614
507
  * intercepted request in the
615
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}.
508
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}.
616
509
  *
617
510
  * **Important**: To make sure that all expected requests were made, use
618
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()`}
619
- * or
620
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerchecktimes `handler.checkTimes()`}.
621
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()`}
622
- * is generally preferred, as it checks all handlers created by the interceptor with a single call.
511
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorchecktimes `interceptor.checkTimes()`} or
512
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerchecktimes `handler.checkTimes()`}.
513
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorchecktimes `interceptor.checkTimes()`} is
514
+ * generally preferred, as it checks all handlers created by the interceptor with a single call.
623
515
  *
624
516
  * @param numberOfRequests The number of times the handler should match intercepted requests.
625
517
  * @param minNumberOfRequests The minimum number of times the handler should match intercepted requests.
626
518
  * @param maxNumberOfRequests The maximum number of times the handler should match intercepted requests.
627
519
  * @returns The same handler, now considering the specified number of times.
628
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()` API reference}
520
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()` API reference}
629
521
  */
630
522
  times: ((numberOfRequests: number) => PendingRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>) & ((minNumberOfRequests: number, maxNumberOfRequests: number) => PendingRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>);
631
523
  /**
632
524
  * Checks if the handler has matched the expected number of requests declared with
633
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()`}.
525
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()`}.
634
526
  *
635
527
  * If the handler has matched fewer or more requests than expected, this method will throw a `TimesCheckError` error
636
528
  * pointing to the
637
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()` API reference}
529
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()` API reference}
638
530
  * that was not satisfied.
639
531
  *
640
- * When
641
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests
642
- * `requestSaving.enabled`} is
643
- * true in your interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the
644
- * expected and received data. This is useful for debugging requests that did not match a handler with
645
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions}.
532
+ * When {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `requestSaving.enabled`} is true in your
533
+ * interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the expected and
534
+ * received data. This is useful for debugging requests that did not match a handler with
535
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}.
646
536
  *
647
537
  * @throws {TimesCheckError} If the handler has matched less or more requests than the expected number of requests.
648
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerchecktimes `handler.checkTimes()` API reference}
538
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerchecktimes `handler.checkTimes()` API reference}
649
539
  */
650
540
  checkTimes: () => Promise<void>;
651
541
  /**
652
542
  * Clears any response declared with
653
- * [`handler.respond(declaration)`](https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerresponddeclaration),
543
+ * [`handler.respond(declaration)`](https://zimic.dev/docs/interceptor/api/http-request-handler#handlerresponddeclaration),
654
544
  * restrictions declared with
655
- * [`handler.with(restriction)`](https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction),
545
+ * [`handler.with(restriction)`](https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction),
656
546
  * and intercepted requests, making the handler stop matching requests. The next handler, created before this one,
657
547
  * that matches the same method and path will be used if present. If not, the requests of the method and path will not
658
548
  * be intercepted.
659
549
  *
660
550
  * To make the handler match requests again, register a new response with
661
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrespond `handler.respond()`}.
551
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrespond `handler.respond()`}.
662
552
  *
663
553
  * @returns The same handler, now cleared of any declared responses, restrictions, and intercepted requests.
664
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerclear `handler.clear()` API reference}
554
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerclear `handler.clear()` API reference}
665
555
  */
666
556
  clear: () => PendingRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>;
667
557
  /**
@@ -669,130 +559,104 @@ interface SyncedRemoteHttpRequestHandler<Schema extends HttpSchema, Method exten
669
559
  * useful for testing that the correct requests were made by your application.
670
560
  *
671
561
  * **Important**: This method can only be used if
672
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests
673
- * `requestSaving.enabled`} is
674
- * `true` in the interceptor. See
675
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
676
- * for more information.
562
+ * {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `requestSaving.enabled`} is `true` in the
563
+ * interceptor.
677
564
  *
678
565
  * @throws {DisabledRequestSavingError} If the interceptor has `requestSaving.enabled: false`.
679
566
  * @readonly
680
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrequests `handler.requests` API reference}
567
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerrequests `handler.requests` API reference}
681
568
  */
682
569
  get requests(): readonly InterceptedHttpInterceptorRequest<Path, Default<Schema[Path][Method]>, StatusCode>[];
683
570
  }
684
571
  /**
685
572
  * A pending remote HTTP request handler. When a remote handler is pending, it is not guaranteed that all of the mocking
686
- * operations were committed to the connected
687
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
573
+ * operations were committed to the connected {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
688
574
  *
689
575
  * To commit a remote interceptor, you can `await` it or use the methods {@link then handler.then()},
690
576
  * {@link catch handler.catch()}, and {@link finally handler.finally()}.
691
577
  *
692
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler` API reference}
578
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler` API reference}
693
579
  */
694
580
  interface PendingRemoteHttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>, StatusCode extends HttpStatusCode = never> extends SyncedRemoteHttpRequestHandler<Schema, Method, Path, StatusCode> {
695
581
  /**
696
582
  * Waits for the remote handler to be synced with the connected
697
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
583
+ * {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
698
584
  */
699
585
  then: <FulfilledResult = SyncedRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>, RejectedResult = never>(onFulfilled?: ((handler: SyncedRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>) => PossiblePromise<FulfilledResult>) | null, onRejected?: ((reason: unknown) => PossiblePromise<RejectedResult>) | null) => Promise<FulfilledResult | RejectedResult>;
700
586
  /**
701
587
  * Waits for the remote handler to be synced with the connected
702
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
588
+ * {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
703
589
  */
704
590
  catch: <RejectedResult = never>(onRejected?: ((reason: unknown) => PossiblePromise<RejectedResult>) | null) => Promise<SyncedRemoteHttpRequestHandler<Schema, Method, Path, StatusCode> | RejectedResult>;
705
591
  /**
706
592
  * Waits for the remote handler to be synced with the connected
707
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
593
+ * {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
708
594
  */
709
595
  finally: (onFinally?: (() => void) | null) => Promise<SyncedRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>>;
710
596
  }
711
597
  /**
712
598
  * A remote HTTP request handler to declare responses for intercepted requests. In a remote handler, the mocking
713
599
  * operations are asynchronous and include remote calls to the connected
714
- * {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server}.
600
+ * {@link https://zimic.dev/docs/interceptor/cli/server interceptor server}.
715
601
  *
716
602
  * When multiple handlers of the same interceptor match the same method and path, the _last_ handler created with
717
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)`}
603
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptormethodpath `interceptor.<method>(path)`}
718
604
  * will be used.
719
605
  *
720
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler` API reference}
606
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler` API reference}
721
607
  */
722
608
  type RemoteHttpRequestHandler<Schema extends HttpSchema, Method extends HttpSchemaMethod<Schema>, Path extends HttpSchemaPath<Schema, Method>, StatusCode extends HttpStatusCode = never> = PendingRemoteHttpRequestHandler<Schema, Method, Path, StatusCode>;
723
609
 
724
610
  type SyncHttpInterceptorMethodHandler<Schema extends HttpSchema, Method extends HttpMethod> = Method extends HttpSchemaMethod<Schema> ? <Path extends HttpSchemaPath.NonLiteral<Schema, Method>>(path: Path) => LocalHttpRequestHandler<Schema, Method, LiteralHttpSchemaPathFromNonLiteral<Schema, Method, Path>> : (path: never) => LocalHttpRequestHandler<any, any, never>;
725
611
  type AsyncHttpInterceptorMethodHandler<Schema extends HttpSchema, Method extends HttpMethod> = Method extends HttpSchemaMethod<Schema> ? <Path extends HttpSchemaPath.NonLiteral<Schema, Method>>(path: Path) => RemoteHttpRequestHandler<Schema, Method, LiteralHttpSchemaPathFromNonLiteral<Schema, Method, Path>> : (path: never) => RemoteHttpRequestHandler<any, any, never>;
726
612
 
727
- /**
728
- * Configures if the intercepted requests are saved and how they are handled.
729
- *
730
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
731
- * @see {@link https://github.com/zimicjs/zimic/wiki/guides‐testing‐interceptor Testing}
732
- */
613
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference} */
733
614
  interface HttpInterceptorRequestSaving {
734
- /**
735
- * Whether {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler request handlers}
736
- * should save their intercepted requests in memory and make them accessible through
737
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerrequests `handler.requests`}.
738
- *
739
- * If you are using
740
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()`}
741
- * or
742
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerchecktimes `handler.checkTimes()`}
743
- * during tests, consider enabling this option to get more detailed information in `TimesCheckError` errors.
744
- *
745
- * **Important**: If `requestSaving.enabled` is `true`, make sure to regularly clear the interceptor to avoid requests
746
- * accumulating in memory. A common practice is to call
747
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorclear `interceptor.clear()`}
748
- * after each test.
749
- *
750
- * @default process.env.NODE_ENV === 'test'
751
- */
615
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference} */
752
616
  enabled: boolean;
753
- /**
754
- * The safe number of requests to save in memory before logging warnings in the console. If `requestSaving.enabled` is
755
- * `true` and the interceptor is not regularly cleared with
756
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorclear `interceptor.clear()`},
757
- * the requests may accumulate in memory and cause performance issues. This option does not limit the number of
758
- * requests saved in memory, only when to log warnings.
759
- *
760
- * @default 1000
761
- */
617
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference} */
762
618
  safeLimit: number;
763
619
  }
764
620
  /**
765
621
  * An interceptor to handle HTTP requests and return mock responses. The methods, paths, status codes, parameters, and
766
622
  * responses are statically-typed based on the provided service schema.
767
623
  *
768
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor `HttpInterceptor` API reference}
624
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor `HttpInterceptor` API reference}
769
625
  */
770
626
  interface HttpInterceptor<_Schema extends HttpSchema> {
771
627
  /**
772
628
  * The base URL used by the interceptor.
773
629
  *
774
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorbaseurl `interceptor.baseURL` API reference}
630
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorbaseurl `interceptor.baseURL` API reference}
775
631
  */
776
632
  baseURL: string;
777
633
  /**
778
634
  * Configures if the intercepted requests are saved and how they are handled.
779
635
  *
780
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests Saving intercepted requests}
781
- * @see {@link https://github.com/zimicjs/zimic/wiki/guides‐testing‐interceptor Testing}
636
+ * @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor` API reference}
637
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/testing Testing}
782
638
  */
783
639
  requestSaving: HttpInterceptorRequestSaving;
640
+ /**
641
+ * The strategy to use for unhandled requests. If a request starts with the base URL of the interceptor, but no
642
+ * matching handler exists, this strategy will be used. If a function is provided, it will be called with the
643
+ * unhandled request.
644
+ *
645
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/unhandled-requests Unhandled requests}
646
+ */
647
+ onUnhandledRequest?: UnhandledRequestStrategy;
784
648
  /**
785
649
  * The platform the interceptor is running on.
786
650
  *
787
651
  * @readonly
788
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorplatform `interceptor.platform` API reference}
652
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorplatform `interceptor.platform` API reference}
789
653
  */
790
654
  get platform(): HttpInterceptorPlatform | null;
791
655
  /**
792
656
  * Whether the interceptor is currently running and ready to use.
793
657
  *
794
658
  * @readonly
795
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorisrunning `interceptor.isRunning` API reference}
659
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorisrunning `interceptor.isRunning` API reference}
796
660
  */
797
661
  get isRunning(): boolean;
798
662
  /**
@@ -803,52 +667,50 @@ interface HttpInterceptor<_Schema extends HttpSchema> {
803
667
  *
804
668
  * @throws {UnregisteredServiceWorkerError} When the worker is targeting a browser environment and the mock service
805
669
  * worker is not registered.
806
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstart `interceptor.start()` API reference}
670
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstart `interceptor.start()` API reference}
807
671
  */
808
672
  start: () => Promise<void>;
809
673
  /**
810
674
  * Stops the interceptor, preventing it from intercepting HTTP requests. Stopped interceptors are automatically
811
675
  * cleared, exactly as if
812
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorclear `interceptor.clear()`}
813
- * had been called.
676
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorclear `interceptor.clear()`} had been
677
+ * called.
814
678
  *
815
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstop `interceptor.stop()` API reference}
679
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstop `interceptor.stop()` API reference}
816
680
  */
817
681
  stop: () => Promise<void>;
818
682
  /**
819
683
  * Checks if all handlers created by this interceptor have matched the number of requests declared with
820
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()`}.
684
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()`}.
821
685
  *
822
686
  * If some handler has matched fewer or more requests than expected, this method will throw a `TimesCheckError` error,
823
687
  * including a stack trace to the
824
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes `handler.times()`} that
825
- * was not satisfied.
688
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes `handler.times()`} that was not
689
+ * satisfied.
826
690
  *
827
691
  * This is useful in an `afterEach` hook (or equivalent) to make sure that all expected requests were made at the end
828
692
  * of each test.
829
693
  *
830
- * When
831
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#saving-requests
832
- * `requestSaving.enabled`} is
833
- * `true` in your interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the
834
- * expected and received data. This is useful for debugging requests that did not match a handler with
835
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions}.
694
+ * When {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `requestSaving.enabled`} is `true` in
695
+ * your interceptor, the `TimesCheckError` errors will also list each unmatched request with diff of the expected and
696
+ * received data. This is useful for debugging requests that did not match a handler with
697
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}.
836
698
  *
837
699
  * @throws {TimesCheckError} If some handler has matched less or more requests than the expected number of requests.
838
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorchecktimes `interceptor.checkTimes()` API reference}
839
- * @see {@link https://github.com/zimicjs/zimic/wiki/guides‐teting Testing guide}
700
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorchecktimes `interceptor.checkTimes()` API reference}
701
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/testing Testing guide}
840
702
  */
841
703
  checkTimes: (() => void) | (() => Promise<void>);
842
704
  /**
843
705
  * Clears the interceptor and all of its
844
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
845
- * instances, including their registered responses and intercepted requests. After calling this method, the
846
- * interceptor will no longer intercept any requests until new mock responses are registered.
706
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} instances, including their
707
+ * registered responses and intercepted requests. After calling this method, the interceptor will no longer intercept
708
+ * any requests until new mock responses are registered.
847
709
  *
848
710
  * This method is useful to reset the interceptor mocks between tests.
849
711
  *
850
712
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
851
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorclear `interceptor.clear()` API reference}
713
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorclear `interceptor.clear()` API reference}
852
714
  */
853
715
  clear: (() => void) | (() => Promise<void>);
854
716
  }
@@ -857,32 +719,23 @@ interface HttpInterceptor<_Schema extends HttpSchema> {
857
719
  * and responses are statically-typed based on the provided service schema.
858
720
  *
859
721
  * To intercept HTTP requests, the interceptor must have been started with
860
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstart `interceptor.start()`}.
722
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstart `interceptor.start()`}.
861
723
  *
862
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor `HttpInterceptor` API reference}
724
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor `HttpInterceptor` API reference}
863
725
  */
864
726
  interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpInterceptor<Schema> {
865
727
  /** @readonly */
866
728
  get type(): 'local';
867
- /**
868
- * The strategy to use for unhandled requests. If a request starts with the base URL of the interceptor, but no
869
- * matching handler exists, this strategy will be used. If a function is provided, it will be called with the
870
- * unhandled request.
871
- *
872
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
873
- */
874
729
  onUnhandledRequest?: UnhandledRequestStrategy.Local;
875
730
  /**
876
- * Creates a GET
877
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
878
- * a path. The path and method must be declared in the interceptor schema.
731
+ * Creates a GET {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
732
+ * The path and method must be declared in the interceptor schema.
879
733
  *
880
734
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
881
735
  * interceptor, and the method, path,
882
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
883
- * and
884
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
885
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
736
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
737
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
738
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
886
739
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
887
740
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
888
741
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -890,24 +743,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
890
743
  *
891
744
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
892
745
  * to specify the original path as a type parameter to get type-inference and type-validation.
893
- * @returns A GET
894
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
895
- * for the provided path. The path and method must be declared in the interceptor schema.
746
+ * @returns A GET {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
747
+ * provided path. The path and method must be declared in the interceptor schema.
896
748
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
897
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
749
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
898
750
  */
899
751
  get: SyncHttpInterceptorMethodHandler<Schema, 'GET'>;
900
752
  /**
901
- * Creates a POST
902
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
903
- * a path. The path and method must be declared in the interceptor schema.
753
+ * Creates a POST {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
754
+ * The path and method must be declared in the interceptor schema.
904
755
  *
905
756
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
906
757
  * interceptor, and the method, path,
907
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
908
- * and
909
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
910
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
758
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
759
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
760
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
911
761
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
912
762
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
913
763
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -915,24 +765,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
915
765
  *
916
766
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
917
767
  * to specify the original path as a type parameter to get type-inference and type-validation.
918
- * @returns A POST
919
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
920
- * for the provided path. The path and method must be declared in the interceptor schema.
768
+ * @returns A POST {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
769
+ * provided path. The path and method must be declared in the interceptor schema.
921
770
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
922
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
771
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
923
772
  */
924
773
  post: SyncHttpInterceptorMethodHandler<Schema, 'POST'>;
925
774
  /**
926
- * Creates a PATCH
927
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
928
- * a path. The path and method must be declared in the interceptor schema.
775
+ * Creates a PATCH {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
776
+ * The path and method must be declared in the interceptor schema.
929
777
  *
930
778
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
931
779
  * interceptor, and the method, path,
932
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
933
- * and
934
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
935
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
780
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
781
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
782
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
936
783
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
937
784
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
938
785
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -940,24 +787,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
940
787
  *
941
788
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
942
789
  * to specify the original path as a type parameter to get type-inference and type-validation.
943
- * @returns A PATCH
944
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
945
- * for the provided path. The path and method must be declared in the interceptor schema.
790
+ * @returns A PATCH {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
791
+ * provided path. The path and method must be declared in the interceptor schema.
946
792
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
947
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
793
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
948
794
  */
949
795
  patch: SyncHttpInterceptorMethodHandler<Schema, 'PATCH'>;
950
796
  /**
951
- * Creates a PUT
952
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
953
- * a path. The path and method must be declared in the interceptor schema.
797
+ * Creates a PUT {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
798
+ * The path and method must be declared in the interceptor schema.
954
799
  *
955
800
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
956
801
  * interceptor, and the method, path,
957
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
958
- * and
959
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
960
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
802
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
803
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
804
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
961
805
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
962
806
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
963
807
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -965,24 +809,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
965
809
  *
966
810
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
967
811
  * to specify the original path as a type parameter to get type-inference and type-validation.
968
- * @returns A PUT
969
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
970
- * for the provided path. The path and method must be declared in the interceptor schema.
812
+ * @returns A PUT {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
813
+ * provided path. The path and method must be declared in the interceptor schema.
971
814
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
972
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
815
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
973
816
  */
974
817
  put: SyncHttpInterceptorMethodHandler<Schema, 'PUT'>;
975
818
  /**
976
- * Creates a DELETE
977
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
978
- * a path. The path and method must be declared in the interceptor schema.
819
+ * Creates a DELETE {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a
820
+ * path. The path and method must be declared in the interceptor schema.
979
821
  *
980
822
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
981
823
  * interceptor, and the method, path,
982
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
983
- * and
984
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
985
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
824
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
825
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
826
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
986
827
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
987
828
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
988
829
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -990,24 +831,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
990
831
  *
991
832
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
992
833
  * to specify the original path as a type parameter to get type-inference and type-validation.
993
- * @returns A DELETE
994
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
995
- * for the provided path. The path and method must be declared in the interceptor schema.
834
+ * @returns A DELETE {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
835
+ * provided path. The path and method must be declared in the interceptor schema.
996
836
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
997
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
837
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
998
838
  */
999
839
  delete: SyncHttpInterceptorMethodHandler<Schema, 'DELETE'>;
1000
840
  /**
1001
- * Creates a HEAD
1002
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1003
- * a path. The path and method must be declared in the interceptor schema.
841
+ * Creates a HEAD {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
842
+ * The path and method must be declared in the interceptor schema.
1004
843
  *
1005
844
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1006
845
  * interceptor, and the method, path,
1007
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1008
- * and
1009
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1010
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
846
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
847
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
848
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1011
849
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1012
850
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1013
851
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1015,24 +853,21 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
1015
853
  *
1016
854
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1017
855
  * to specify the original path as a type parameter to get type-inference and type-validation.
1018
- * @returns A HEAD
1019
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1020
- * for the provided path. The path and method must be declared in the interceptor schema.
856
+ * @returns A HEAD {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
857
+ * provided path. The path and method must be declared in the interceptor schema.
1021
858
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1022
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
859
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1023
860
  */
1024
861
  head: SyncHttpInterceptorMethodHandler<Schema, 'HEAD'>;
1025
862
  /**
1026
- * Creates an OPTIONS
1027
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1028
- * a path. The path and method must be declared in the interceptor schema.
863
+ * Creates an OPTIONS {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a
864
+ * path. The path and method must be declared in the interceptor schema.
1029
865
  *
1030
866
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1031
867
  * interceptor, and the method, path,
1032
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1033
- * and
1034
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1035
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
868
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
869
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
870
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1036
871
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1037
872
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1038
873
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1040,11 +875,10 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
1040
875
  *
1041
876
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1042
877
  * to specify the original path as a type parameter to get type-inference and type-validation.
1043
- * @returns An OPTIONS
1044
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1045
- * for the provided path. The path and method must be declared in the interceptor schema.
878
+ * @returns An OPTIONS {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
879
+ * provided path. The path and method must be declared in the interceptor schema.
1046
880
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1047
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
881
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1048
882
  */
1049
883
  options: SyncHttpInterceptorMethodHandler<Schema, 'OPTIONS'>;
1050
884
  checkTimes: () => void;
@@ -1055,11 +889,10 @@ interface LocalHttpInterceptor<Schema extends HttpSchema> extends HttpIntercepto
1055
889
  * and responses are statically-typed based on the provided service schema.
1056
890
  *
1057
891
  * To intercept HTTP requests, the interceptor must have been started with
1058
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptorstart `interceptor.start()`}
1059
- * and an {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#zimic-server interceptor server} should be
1060
- * running.
892
+ * {@link https://zimic.dev/docs/interceptor/api/http-interceptor#interceptorstart `interceptor.start()`} and an
893
+ * {@link https://zimic.dev/docs/interceptor/cli/server interceptor server} should be running.
1061
894
  *
1062
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor `HttpInterceptor` API reference}
895
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor `HttpInterceptor` API reference}
1063
896
  */
1064
897
  interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpInterceptor<Schema> {
1065
898
  /** @readonly */
@@ -1068,33 +901,23 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1068
901
  * Options to authenticate the interceptor when connecting to an interceptor server. This is required if the
1069
902
  * interceptor server was started with the `--tokens-dir` option.
1070
903
  *
1071
- * @see {@link https://github.com/zimicjs/zimic/wiki/cli‐zimic‐server#authentication Interceptor server authentication}
904
+ * @see {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors#interceptor-server-authentication Interceptor server authentication}
1072
905
  */
1073
906
  auth?: RemoteHttpInterceptorOptions['auth'];
1074
- /**
1075
- * The strategy to use for unhandled requests. If a request starts with the base URL of the interceptor, but no
1076
- * matching handler exists, this strategy will be used. If a function is provided, it will be called with the
1077
- * unhandled request.
1078
- *
1079
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#unhandled-requests Unhandled requests}
1080
- */
1081
907
  onUnhandledRequest?: UnhandledRequestStrategy.Remote;
1082
908
  /**
1083
- * Creates a GET
1084
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1085
- * a path. The path and method must be declared in the interceptor schema.
909
+ * Creates a GET {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
910
+ * The path and method must be declared in the interceptor schema.
1086
911
  *
1087
- * When using a
1088
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
912
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1089
913
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1090
914
  * apply them by awaiting the handler.
1091
915
  *
1092
916
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1093
917
  * interceptor, and the method, path,
1094
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1095
- * and
1096
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1097
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
918
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
919
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
920
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1098
921
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1099
922
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1100
923
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1102,29 +925,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1102
925
  *
1103
926
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1104
927
  * to specify the original path as a type parameter to get type-inference and type-validation.
1105
- * @returns A GET
1106
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1107
- * for the provided path. The path and method must be declared in the interceptor schema.
928
+ * @returns A GET {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
929
+ * provided path. The path and method must be declared in the interceptor schema.
1108
930
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1109
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
931
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1110
932
  */
1111
933
  get: AsyncHttpInterceptorMethodHandler<Schema, 'GET'>;
1112
934
  /**
1113
- * Creates a POST
1114
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1115
- * a path. The path and method must be declared in the interceptor schema.
935
+ * Creates a POST {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
936
+ * The path and method must be declared in the interceptor schema.
1116
937
  *
1117
- * When using a
1118
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
938
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1119
939
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1120
940
  * apply them by awaiting the handler.
1121
941
  *
1122
942
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1123
943
  * interceptor, and the method, path,
1124
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1125
- * and
1126
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1127
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
944
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
945
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
946
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1128
947
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1129
948
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1130
949
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1132,29 +951,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1132
951
  *
1133
952
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1134
953
  * to specify the original path as a type parameter to get type-inference and type-validation.
1135
- * @returns A POST
1136
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1137
- * for the provided path. The path and method must be declared in the interceptor schema.
954
+ * @returns A POST {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
955
+ * provided path. The path and method must be declared in the interceptor schema.
1138
956
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1139
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
957
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1140
958
  */
1141
959
  post: AsyncHttpInterceptorMethodHandler<Schema, 'POST'>;
1142
960
  /**
1143
- * Creates a PATCH
1144
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1145
- * a path. The path and method must be declared in the interceptor schema.
961
+ * Creates a PATCH {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
962
+ * The path and method must be declared in the interceptor schema.
1146
963
  *
1147
- * When using a
1148
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
964
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1149
965
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1150
966
  * apply them by awaiting the handler.
1151
967
  *
1152
968
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1153
969
  * interceptor, and the method, path,
1154
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1155
- * and
1156
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1157
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
970
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
971
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
972
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1158
973
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1159
974
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1160
975
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1162,29 +977,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1162
977
  *
1163
978
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1164
979
  * to specify the original path as a type parameter to get type-inference and type-validation.
1165
- * @returns A PATCH
1166
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1167
- * for the provided path. The path and method must be declared in the interceptor schema.
980
+ * @returns A PATCH {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
981
+ * provided path. The path and method must be declared in the interceptor schema.
1168
982
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1169
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
983
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1170
984
  */
1171
985
  patch: AsyncHttpInterceptorMethodHandler<Schema, 'PATCH'>;
1172
986
  /**
1173
- * Creates a PUT
1174
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1175
- * a path. The path and method must be declared in the interceptor schema.
987
+ * Creates a PUT {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
988
+ * The path and method must be declared in the interceptor schema.
1176
989
  *
1177
- * When using a
1178
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
990
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1179
991
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1180
992
  * apply them by awaiting the handler.
1181
993
  *
1182
994
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1183
995
  * interceptor, and the method, path,
1184
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1185
- * and
1186
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1187
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
996
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
997
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
998
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1188
999
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1189
1000
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1190
1001
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1192,29 +1003,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1192
1003
  *
1193
1004
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1194
1005
  * to specify the original path as a type parameter to get type-inference and type-validation.
1195
- * @returns A PUT
1196
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1197
- * for the provided path. The path and method must be declared in the interceptor schema.
1006
+ * @returns A PUT {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
1007
+ * provided path. The path and method must be declared in the interceptor schema.
1198
1008
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1199
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
1009
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1200
1010
  */
1201
1011
  put: AsyncHttpInterceptorMethodHandler<Schema, 'PUT'>;
1202
1012
  /**
1203
- * Creates a DELETE
1204
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1205
- * a path. The path and method must be declared in the interceptor schema.
1013
+ * Creates a DELETE {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a
1014
+ * path. The path and method must be declared in the interceptor schema.
1206
1015
  *
1207
- * When using a
1208
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
1016
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1209
1017
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1210
1018
  * apply them by awaiting the handler.
1211
1019
  *
1212
1020
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1213
1021
  * interceptor, and the method, path,
1214
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1215
- * and
1216
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1217
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1022
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
1023
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
1024
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1218
1025
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1219
1026
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1220
1027
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1222,29 +1029,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1222
1029
  *
1223
1030
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1224
1031
  * to specify the original path as a type parameter to get type-inference and type-validation.
1225
- * @returns A DELETE
1226
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1227
- * for the provided path. The path and method must be declared in the interceptor schema.
1032
+ * @returns A DELETE {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
1033
+ * provided path. The path and method must be declared in the interceptor schema.
1228
1034
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1229
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
1035
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1230
1036
  */
1231
1037
  delete: AsyncHttpInterceptorMethodHandler<Schema, 'DELETE'>;
1232
1038
  /**
1233
- * Creates a HEAD
1234
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1235
- * a path. The path and method must be declared in the interceptor schema.
1039
+ * Creates a HEAD {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a path.
1040
+ * The path and method must be declared in the interceptor schema.
1236
1041
  *
1237
- * When using a
1238
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
1042
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1239
1043
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1240
1044
  * apply them by awaiting the handler.
1241
1045
  *
1242
1046
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1243
1047
  * interceptor, and the method, path,
1244
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1245
- * and
1246
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1247
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1048
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
1049
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
1050
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1248
1051
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1249
1052
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1250
1053
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1252,29 +1055,25 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1252
1055
  *
1253
1056
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1254
1057
  * to specify the original path as a type parameter to get type-inference and type-validation.
1255
- * @returns A HEAD
1256
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1257
- * for the provided path. The path and method must be declared in the interceptor schema.
1058
+ * @returns A HEAD {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
1059
+ * provided path. The path and method must be declared in the interceptor schema.
1258
1060
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1259
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
1061
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1260
1062
  */
1261
1063
  head: AsyncHttpInterceptorMethodHandler<Schema, 'HEAD'>;
1262
1064
  /**
1263
- * Creates an OPTIONS
1264
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`} for
1265
- * a path. The path and method must be declared in the interceptor schema.
1065
+ * Creates an OPTIONS {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for a
1066
+ * path. The path and method must be declared in the interceptor schema.
1266
1067
  *
1267
- * When using a
1268
- * {@link https://github.com/zimicjs/zimic/wiki/getting‐started#remote-http-interceptors remote interceptor}, creating
1068
+ * When using a {@link https://zimic.dev/docs/interceptor/guides/http/remote-interceptors remote interceptor}, creating
1269
1069
  * a handler is an asynchronous operation, so you need to `await` it. You can also chain any number of operations and
1270
1070
  * apply them by awaiting the handler.
1271
1071
  *
1272
1072
  * After a request is intercepted, Zimic tries to find a handler that matches it, considering the base URL of the
1273
1073
  * interceptor, and the method, path,
1274
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlerwithrestriction restrictions},
1275
- * and
1276
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-handlertimes limits on the number of requests}
1277
- * of the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1074
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlerwithrestriction restrictions}, and
1075
+ * {@link https://zimic.dev/docs/interceptor/api/http-request-handler#handlertimes limits on the number of requests} of
1076
+ * the handler. The handlers are checked from the **last** one created to the first one, so new handlers have
1278
1077
  * preference over older ones. This allows you to declare generic and specific handlers based on their order of
1279
1078
  * creation. For example, a generic handler for `GET /users` can return an empty list, while a specific handler in a
1280
1079
  * test case can return a list with some users. In this case, the specific handler will be considered first as long as
@@ -1282,11 +1081,10 @@ interface RemoteHttpInterceptor<Schema extends HttpSchema> extends HttpIntercept
1282
1081
  *
1283
1082
  * @param path The path to intercept. Paths with dynamic parameters, such as `/users/:id`, are supported, but you need
1284
1083
  * to specify the original path as a type parameter to get type-inference and type-validation.
1285
- * @returns An OPTIONS
1286
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httprequesthandler `HttpRequestHandler`}
1287
- * for the provided path. The path and method must be declared in the interceptor schema.
1084
+ * @returns An OPTIONS {@link https://zimic.dev/docs/interceptor/api/http-request-handler `HttpRequestHandler`} for the
1085
+ * provided path. The path and method must be declared in the interceptor schema.
1288
1086
  * @throws {NotRunningHttpInterceptorError} If the interceptor is not running.
1289
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#http-interceptormethodpath `interceptor.<method>(path)` API reference}
1087
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor#declaring-request-handlers Declaring request handlers}
1290
1088
  */
1291
1089
  options: AsyncHttpInterceptorMethodHandler<Schema, 'OPTIONS'>;
1292
1090
  checkTimes: () => Promise<void>;
@@ -1310,8 +1108,7 @@ declare class TimesCheckError extends TypeError {
1310
1108
  }
1311
1109
 
1312
1110
  /**
1313
- * Infers the schema of an
1314
- * {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#httpinterceptor `HttpInterceptor`}.
1111
+ * Infers the schema of an {@link https://zimic.dev/docs/interceptor/api/http-interceptor `HttpInterceptor`}.
1315
1112
  *
1316
1113
  * @example
1317
1114
  * import { type InferHttpInterceptorSchema } from '@zimic/http';
@@ -1335,19 +1132,11 @@ declare class TimesCheckError extends TypeError {
1335
1132
  * // };
1336
1133
  * // }
1337
1134
  *
1338
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐http‐schemas Declaring service schemas}
1135
+ * @see {@link https://zimic.dev/docs/interceptor/api/http-interceptor `HttpInterceptor` API reference}
1339
1136
  */
1340
1137
  type InferHttpInterceptorSchema<Interceptor> = Interceptor extends LocalHttpInterceptor<infer Schema> ? Schema : Interceptor extends RemoteHttpInterceptor<infer Schema> ? Schema : never;
1341
1138
 
1342
- /**
1343
- * Creates an HTTP interceptor.
1344
- *
1345
- * @param options The options for the interceptor.
1346
- * @returns The created HTTP interceptor.
1347
- * @throws {InvalidURLError} If the base URL is invalid.
1348
- * @throws {UnsupportedURLProtocolError} If the base URL protocol is not either `http` or `https`.
1349
- * @see {@link https://github.com/zimicjs/zimic/wiki/api‐zimic‐interceptor‐http#createhttpinterceptoroptions `createHttpInterceptor(options)` API reference}
1350
- */
1139
+ /** @see {@link https://zimic.dev/docs/interceptor/api/create-http-interceptor `createHttpInterceptor()` API reference} */
1351
1140
  declare function createHttpInterceptor<Schema extends HttpSchema>(options: LocalHttpInterceptorOptions): LocalHttpInterceptor<Schema>;
1352
1141
  declare function createHttpInterceptor<Schema extends HttpSchema>(options: RemoteHttpInterceptorOptions): RemoteHttpInterceptor<Schema>;
1353
1142
  declare function createHttpInterceptor<Schema extends HttpSchema>(options: HttpInterceptorOptions): LocalHttpInterceptor<Schema> | RemoteHttpInterceptor<Schema>;