diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 3cd804d..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Description - - -## Related issues/external references - - -## Types of changes - -- Bug fix _(non-breaking change which fixes an issue)_ -- New feature _(non-breaking change which adds functionality)_ -- Breaking change _(fix or feature that would cause existing functionality to change)_ -- Documentation improvement -- Style _(Change that do not affect the functionality of the code)_ -- CI/CD _(Changes to the CI/CD configuration)_ \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0d7c45b..3d26452 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,4 +11,16 @@ concurrency: jobs: versioning: - uses: GEWIS/actions/.github/workflows/versioning.yml@v1 \ No newline at end of file + uses: GEWIS/actions/.github/workflows/versioning.yml@v1 + with: + dry-run: 'true' + + publish-npm: + uses: GEWIS/actions/.github/workflows/npm-release.yml@v1 + needs: versioning + if: ${{ needs.versioning.outputs.next_version != '' }} + with: + node-version: '22.x' + version: ${{ needs.versioning.outputs.next_version }} + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index d9d299b..7529f10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .idea +dist diff --git a/dist/planka-client.d.ts b/dist/planka-client.d.ts deleted file mode 100644 index cd703e7..0000000 --- a/dist/planka-client.d.ts +++ /dev/null @@ -1,1406 +0,0 @@ -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 as Options_2 } from '@hey-api/client-fetch'; -import { RequestResult } from '@hey-api/client-fetch'; -import { TDataShape } from '@hey-api/client-fetch'; - -/** - * Authentication - */ -export declare type AccessTokenOidcRequest = { - code: string; - nonce: string; -}; - -export declare type AccessTokenRequest = { - emailOrUsername: string; - password: string; -}; - -export declare type Action = { - id: string; - createdAt: Date; - updatedAt?: Date; - type: CommentType; - data: ActionText; - cardId: string; - userId: string; -}; - -export declare type ActionText = { - text: string; -}; - -export declare type ArrayResponse = { - items: T[]; - included?: Partial; -}; - -/** - * Attachments - */ -export declare type Attachment = { - id: string; - name: string; - cardId: string; - url: string; - createUserId: string; - createdAt: Date; - updatedAt?: Date; - coverUrl?: string; - image?: Image_2; -}; - -/** - * Create access token - * 'POST /api/access-tokens': 'access-tokens/create' - * @param options - */ -export declare const authorize: (options: Options) => RequestResult; - -export declare type AuthorizeError = HttpError; - -/** - * Exchange access token using oidc - * 'POST /api/access-tokens/exchange-using-oidc': 'access-tokens/exchange-using-oidc' - * TODO -- this endpoint needs a written test - * @param options - */ -export declare const authorizeOidc: (options: Options) => RequestResult; - -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; - -export declare type Background = { - type: BackgroundType; - name?: BackgroundGradient; -}; - -export declare type BackgroundGradient = 'old-lime' | 'ocean-dive' | 'tzepesch-style' | 'jungle-mesh' | 'strawberry-dust' | 'purple-rose' | 'sun-scream' | 'warm-rust' | 'sky-change' | 'green-eyes' | 'blue-xchange' | 'blood-orange' | 'sour-peel' | 'green-ninja' | 'algae-green' | 'coral-reef' | 'steel-grey' | 'heat-waves' | 'velvet-lounge' | 'purple-rain' | 'blue-steel' | 'blueish-curve' | 'prism-light' | 'green-mist' | 'red-curtain'; - -export declare type BackgroundImage = { - url?: string; - coverUrl?: string; -}; - -export declare type BackgroundType = 'gradient' | 'image'; - -/** - * Boards - */ -export declare type Board = { - id: string; - createdAt: Date; - updatedAt?: Date; - position: number; - name: string; - projectId: string; -}; - -/** - * Board memberships - */ -export declare type BoardMembership = { - id: string; - createdAt: Date; - updatedAt?: Date; - role: Role; - canComment?: boolean; - boardId: string; - userId: string; -}; - -/** - * Cards - */ -export declare type Card = { - id: string; - createdAt: Date; - updatedAt?: Date; - creatorUserId: string; - position: number; - name: string; - description?: string; - dueDate?: Date; - isDueDateCompleted?: boolean; - boardId: string; - listId: string; - coverAttachmentId?: string; - isSubscribed: boolean; -}; - -export declare type CardLabel = { - id: string; - createdAt: Date; - updatedAt?: Date; - cardId: string; - labelId?: string; -}; - -export declare type CardMembership = { - id: string; - createdAt: Date; - updatedAt?: Date; - cardId: string; - userId: string; -}; - -export declare const client: Client; - -export declare type ClientOptions = { - baseUrl: `${string}://${string}/api` | (string & {}); -}; - -/** - * Comments - */ -declare type Comment_2 = { - id: string; - createdAt: Date; - updatedAt?: Date; - cardId: string; - userId: string; - data: ActionText; - type: CommentType; -}; -export { Comment_2 as Comment } - -export declare type CommentType = 'commentCard'; - -/** - * Create attachment - * 'POST /api/cards/:cardId/attachments': 'attachments/create' - * @param options - */ -export declare const createAttachment: (options: Options) => RequestResult; - -export declare type CreateAttachmentRequest = { - body: { - file: File; - }; - path: { - cardId: string; - }; - query?: never; - url: '/api/cards/{cardId}/attachments'; -}; - -export declare type CreateAttachmentResponse = SingleResponse; - -/** - * Create board - * 'POST /api/projects/:projectId/boards': 'boards/create' - * @param options - */ -export declare const createBoard: (options: Options) => RequestResult; - -/** - * Create board membership - * 'POST /api/boards/:boardId/memberships': 'board-memberships/create' - * @param options - */ -export declare const createBoardMembership: (options: Options) => RequestResult; - -export declare type CreateBoardMembershipRequest = { - body: { - userId: string; - role: Role; - }; - path: { - boardId: string; - }; - query?: never; - url: '/api/boards/{boardId}/memberships'; -}; - -export declare type CreateBoardMembershipResponse = SingleResponse; - -export declare type CreateBoardRequest = { - body: { - position: number; - name: string; - }; - path: { - projectId: string; - }; - query?: never; - url: '/api/projects/{projectId}/boards'; -}; - -export declare type CreateBoardResponse = SingleResponse; - -/** - * Create card - * 'POST /api/lists/:listId/cards': 'cards/create' - * @param options - */ -export declare const createCard: (options: Options) => RequestResult; - -/** - * Create card label - * 'POST /api/cards/:cardId/labels': 'card-labels/create' - * @param options - */ -export declare const createCardLabel: (options: Options) => RequestResult; - -export declare type CreateCardLabelRequest = { - body: { - labelId: string; - }; - path: { - cardId: string; - }; - query?: never; - url: '/api/cards/{cardId}/labels'; -}; - -export declare type CreateCardLabelResponse = SingleResponse; - -/** - * Create card membership - * 'POST /api/cards/:cardId/memberships': 'card-memberships/create' - * @param options - */ -export declare const createCardMembership: (options: Options) => RequestResult; - -export declare type CreateCardMembershipRequest = { - body: { - userId: string; - }; - path: { - cardId: string; - }; - query?: never; - url: '/api/cards/{cardId}/memberships'; -}; - -export declare type CreateCardMembershipResponse = SingleResponse; - -export declare type CreateCardRequest = { - 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' - * @param options - */ -export declare const createCommentAction: (options: Options) => RequestResult; - -export declare type CreateCommentActionRequest = { - body: { - text: string; - }; - path: { - cardId: string; - }; - query?: never; - url: '/api/cards/{cardId}/comment-actions'; -}; - -export declare type CreateCommentActionResponse = SingleResponse; - -/** - * Create label - * 'POST /api/boards/:boardId/labels': 'labels/create' - * @param options - */ -export declare const createLabel: (options: Options) => RequestResult; - -export declare type CreateLabelRequest = { - body: { - name: string; - position: number; - color: LabelColor; - }; - path: { - boardId: string; - }; - query?: never; - url: '/api/boards/{boardId}/labels'; -}; - -export declare type CreateLabelResponse = SingleResponse