From 8165e0b097d3534c084859b1b3bece786f5e5514 Mon Sep 17 00:00:00 2001 From: Gijsdeman Date: Mon, 17 Feb 2025 15:07:19 +0100 Subject: [PATCH] fix(types): update all types --- dist/planka-client.d.ts | 341 +++++++++++++++++++------- dist/planka-client.js | 485 +++++++++++++++++++------------------ dist/planka-client.umd.cjs | 2 +- package.json | 2 +- src/services.ts | 39 ++- src/types.ts | 306 +++++++++++++++++------ tsconfig.json | 5 +- 7 files changed, 777 insertions(+), 403 deletions(-) diff --git a/dist/planka-client.d.ts b/dist/planka-client.d.ts index 45de278..cd703e7 100644 --- a/dist/planka-client.d.ts +++ b/dist/planka-client.d.ts @@ -1,8 +1,9 @@ import { Client } from '@hey-api/client-fetch'; +import { ClientOptions as ClientOptions_2 } from '@hey-api/client-fetch'; import { Config } from '@hey-api/client-fetch'; -import { Options } from '@hey-api/client-fetch'; -import { RequestOptionsBase } from '@hey-api/client-fetch'; +import { Options as Options_2 } from '@hey-api/client-fetch'; import { RequestResult } from '@hey-api/client-fetch'; +import { TDataShape } from '@hey-api/client-fetch'; /** * Authentication @@ -70,12 +71,18 @@ export declare const authorizeOidc: (optio export declare type AuthorizeOidcRequest = { body: AccessTokenOidcRequest; + path?: never; + query?: never; + url: '/api/access-tokens/exchange-using-oidc'; }; export declare type AuthorizeOidcResponse = SingleResponse; export declare type AuthorizeRequest = { body: AccessTokenRequest; + path?: never; + query?: never; + url: '/api/access-tokens'; }; export declare type AuthorizeResponse = SingleResponse; @@ -154,9 +161,11 @@ export declare type CardMembership = { userId: string; }; -export declare const client: Client & Config & { -headers: Headers; -}>; +export declare const client: Client; + +export declare type ClientOptions = { + baseUrl: `${string}://${string}/api` | (string & {}); +}; /** * Comments @@ -182,12 +191,14 @@ export declare type CommentType = 'commentCard'; export declare const createAttachment: (options: Options) => RequestResult; export declare type CreateAttachmentRequest = { - path: { - cardId: string; - }; body: { file: File; }; + path: { + cardId: string; + }; + query?: never; + url: '/api/cards/{cardId}/attachments'; }; export declare type CreateAttachmentResponse = SingleResponse; @@ -207,25 +218,29 @@ export declare const createBoard: (options export declare const createBoardMembership: (options: Options) => RequestResult; export declare type CreateBoardMembershipRequest = { - path: { - boardId: string; - }; body: { userId: string; role: Role; }; + path: { + boardId: string; + }; + query?: never; + url: '/api/boards/{boardId}/memberships'; }; export declare type CreateBoardMembershipResponse = SingleResponse; export declare type CreateBoardRequest = { - path: { - projectId: string; - }; body: { position: number; name: string; }; + path: { + projectId: string; + }; + query?: never; + url: '/api/projects/{projectId}/boards'; }; export declare type CreateBoardResponse = SingleResponse; @@ -245,12 +260,14 @@ export declare const createCard: (options: export declare const createCardLabel: (options: Options) => RequestResult; export declare type CreateCardLabelRequest = { - path: { - cardId: string; - }; body: { labelId: string; }; + path: { + cardId: string; + }; + query?: never; + url: '/api/cards/{cardId}/labels'; }; export declare type CreateCardLabelResponse = SingleResponse; @@ -263,28 +280,34 @@ export declare type CreateCardLabelResponse = SingleResponse; export declare const createCardMembership: (options: Options) => RequestResult; export declare type CreateCardMembershipRequest = { - path: { - cardId: string; - }; body: { userId: string; }; + path: { + cardId: string; + }; + query?: never; + url: '/api/cards/{cardId}/memberships'; }; export declare type CreateCardMembershipResponse = SingleResponse; export declare type CreateCardRequest = { - path: { - listId: string; - }; body: { name: string; position: number; }; + path: { + listId: string; + }; + query?: never; + url: '/api/lists/{listId}/cards'; }; export declare type CreateCardResponse = SingleResponse; +export declare type CreateClientConfig = (override?: Config) => Config & T>; + /** * Create comment action * 'POST /api/cards/:cardId/comment-actions': 'comment-actions/create' @@ -293,12 +316,14 @@ export declare type CreateCardResponse = SingleResponse; export declare const createCommentAction: (options: Options) => RequestResult; export declare type CreateCommentActionRequest = { - path: { - cardId: string; - }; body: { text: string; }; + path: { + cardId: string; + }; + query?: never; + url: '/api/cards/{cardId}/comment-actions'; }; export declare type CreateCommentActionResponse = SingleResponse; @@ -311,14 +336,16 @@ export declare type CreateCommentActionResponse = SingleResponse; export declare const createLabel: (options: Options) => RequestResult; export declare type CreateLabelRequest = { - path: { - boardId: string; - }; body: { name: string; position: number; color: LabelColor; }; + path: { + boardId: string; + }; + query?: never; + url: '/api/boards/{boardId}/labels'; }; export declare type CreateLabelResponse = SingleResponse