pl-api: add server directory client

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-30 19:28:12 +02:00
parent 977872ff62
commit db19522a54
8 changed files with 112 additions and 1 deletions

View File

@ -42,7 +42,7 @@ interface RequestBody<Params = Record<string, any>> {
type RequestMeta = Pick<RequestBody, 'idempotencyKey' | 'onUploadProgress' | 'signal'>;
function request<T = any>(this: PlApiClient, input: URL | RequestInfo, {
function request<T = any>(this: Pick<PlApiClient, 'accessToken' | 'baseURL'>, input: URL | RequestInfo, {
body,
method = body ? 'POST' : 'GET',
params,