@plyaz/types 1.16.9 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client/types.d.ts +86 -0
- package/package.json +1 -1
|
@@ -280,6 +280,92 @@ export type ApiClientWithEvents<TEventManager, EndpointsList = UnknownRecord> =
|
|
|
280
280
|
updateConfig(updates: Partial<ApiClientOptions>, options?: UpdateConfigOptions): void;
|
|
281
281
|
clearTemporaryOverrides(): void;
|
|
282
282
|
getConfig(): ApiConfigWithMetadata;
|
|
283
|
+
/**
|
|
284
|
+
* Make a GET request to the specified URL path.
|
|
285
|
+
*
|
|
286
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
287
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
288
|
+
*
|
|
289
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* // WRONG - Don't do this in production:
|
|
294
|
+
* const response = await client.get('/users/123');
|
|
295
|
+
*
|
|
296
|
+
* // CORRECT - Use typed endpoints:
|
|
297
|
+
* const response = await client.getUser({ urlPathParams: { id: '123' } });
|
|
298
|
+
* ```
|
|
299
|
+
*
|
|
300
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
301
|
+
*/
|
|
302
|
+
get<TResponse = unknown, TParams = Record<string, unknown>>(url: string, config?: Partial<RequestConfig<TResponse, never, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
303
|
+
/**
|
|
304
|
+
* Make a POST request to the specified URL path.
|
|
305
|
+
*
|
|
306
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
307
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
308
|
+
*
|
|
309
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
310
|
+
*
|
|
311
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
312
|
+
*/
|
|
313
|
+
post<TResponse = unknown, TBody = unknown, TParams = Record<string, unknown>>(url: string, data?: TBody, config?: Partial<RequestConfig<TResponse, TBody, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
314
|
+
/**
|
|
315
|
+
* Make a PUT request to the specified URL path.
|
|
316
|
+
*
|
|
317
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
318
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
319
|
+
*
|
|
320
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
321
|
+
*
|
|
322
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
323
|
+
*/
|
|
324
|
+
put<TResponse = unknown, TBody = unknown, TParams = Record<string, unknown>>(url: string, data?: TBody, config?: Partial<RequestConfig<TResponse, TBody, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
325
|
+
/**
|
|
326
|
+
* Make a PATCH request to the specified URL path.
|
|
327
|
+
*
|
|
328
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
329
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
330
|
+
*
|
|
331
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
332
|
+
*
|
|
333
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
334
|
+
*/
|
|
335
|
+
patch<TResponse = unknown, TBody = unknown, TParams = Record<string, unknown>>(url: string, data?: TBody, config?: Partial<RequestConfig<TResponse, TBody, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
336
|
+
/**
|
|
337
|
+
* Make a DELETE request to the specified URL path.
|
|
338
|
+
*
|
|
339
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
340
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
341
|
+
*
|
|
342
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
343
|
+
*
|
|
344
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
345
|
+
*/
|
|
346
|
+
delete<TResponse = unknown, TParams = Record<string, unknown>>(url: string, config?: Partial<RequestConfig<TResponse, never, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
347
|
+
/**
|
|
348
|
+
* Make a HEAD request to the specified URL path.
|
|
349
|
+
*
|
|
350
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
351
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
352
|
+
*
|
|
353
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
354
|
+
*
|
|
355
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
356
|
+
*/
|
|
357
|
+
head<TParams = Record<string, unknown>>(url: string, config?: Partial<RequestConfig<void, never, TParams, Record<string, string>>>): Promise<FetchResponse<void>>;
|
|
358
|
+
/**
|
|
359
|
+
* Make an OPTIONS request to the specified URL path.
|
|
360
|
+
*
|
|
361
|
+
* @warning **TESTING/DEBUGGING ONLY** - Do NOT use in production code.
|
|
362
|
+
* @warning **DO NOT MERGE TO MAIN** - Use typed endpoint methods instead.
|
|
363
|
+
*
|
|
364
|
+
* For production, define endpoints in `src/api/endpoints/` and use typed methods.
|
|
365
|
+
*
|
|
366
|
+
* @deprecated Use typed endpoint methods for production code.
|
|
367
|
+
*/
|
|
368
|
+
options<TResponse = unknown, TParams = Record<string, unknown>>(url: string, config?: Partial<RequestConfig<TResponse, never, TParams, Record<string, string>>>): Promise<FetchResponse<TResponse>>;
|
|
283
369
|
};
|
|
284
370
|
/**
|
|
285
371
|
* Configuration for temporary override setup
|
package/package.json
CHANGED