@epilot/kanban-client 0.1.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/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @epilot/kanban-client
2
+
3
+ [![CI](https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg)](https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI)
4
+ [![npm version](https://img.shields.io/npm/v/@epilot/kanban-client.svg)](https://www.npmjs.com/package/@epilot/kanban-client)
5
+ [![bundle size](https://img.shields.io/bundlephobia/minzip/@epilot/kanban-client?label=gzip%20bundle)](https://bundlephobia.com/package/@epilot/kanban-client)
6
+ [![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/epilot-dev/sdk-js/blob/main/LICENSE)
7
+
8
+ Client library for epilot [Kanban API](https://docs.epilot.io/api/kanban)
9
+
10
+ Uses [`openapi-client-axios`](https://github.com/openapistack/openapi-client-axios)
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install --save @epilot/kanban-client
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```typescript
21
+ import { getClient } from '@epilot/kanban-client';
22
+
23
+ const kanbanClient = getClient();
24
+ const res = await kanbanClient.getKanbanBoards(null);
25
+ ```
26
+
27
+ ## Documentation
28
+
29
+ https://docs.epilot.io/docs/kanban
@@ -0,0 +1,3 @@
1
+ import { Client } from './openapi';
2
+ export declare const getClient: () => Client;
3
+ export declare const createClient: () => Client;
package/dist/client.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.createClient = exports.getClient = void 0;
18
+ var lambda_powertools_correlation_ids_1 = __importDefault(require("@dazn/lambda-powertools-correlation-ids"));
19
+ var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
20
+ var definition_1 = __importDefault(require("./definition"));
21
+ var client;
22
+ var getClient = function () {
23
+ if (!client) {
24
+ client = (0, exports.createClient)();
25
+ }
26
+ return client;
27
+ };
28
+ exports.getClient = getClient;
29
+ var createClient = function () {
30
+ var _a;
31
+ var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
32
+ var apiClient = api.initSync();
33
+ apiClient.defaults.headers.common = __assign(__assign({}, ((_a = apiClient.defaults.headers.common) !== null && _a !== void 0 ? _a : {})), (lambda_powertools_correlation_ids_1.default.get() || {}));
34
+ return apiClient;
35
+ };
36
+ exports.createClient = createClient;
37
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1,3 @@
1
+ import type { Document } from 'openapi-client-axios';
2
+ declare const _default: Document;
3
+ export default _default;
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={914:function(e,r,a){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=t(a(240));r.default=o.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/kanban/board":{"post":{"operationId":"createKanbanBoard","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/kanban/boards":{"get":{"operationId":"getKanbanBoards","responses":{}}},"/v1/kanban/board/{boardId}":{"get":{"operationId":"getKanbanBoard","parameters":[{"name":"boardId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateKanbanBoard","parameters":[{"name":"boardId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteKanbanBoard","parameters":[{"name":"boardId","in":"path","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://kanban.sls.epilot.io"}]}')}},r={},a=function a(t){var o=r[t];if(void 0!==o)return o.exports;var n=r[t]={exports:{}};return e[t].call(n.exports,n,n.exports,a),n.exports}(914),t=exports;for(var o in a)t[o]=a[o];a.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();
@@ -0,0 +1,3 @@
1
+ export type { OpenAPIClient, OpenAPIClientAxios, Document } from 'openapi-client-axios';
2
+ export * from './client';
3
+ export * from './openapi';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,72 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "",
5
+ "version": ""
6
+ },
7
+ "paths": {
8
+ "/v1/kanban/board": {
9
+ "post": {
10
+ "operationId": "createKanbanBoard",
11
+ "requestBody": {
12
+ "content": {
13
+ "application/json": {}
14
+ }
15
+ },
16
+ "responses": {}
17
+ }
18
+ },
19
+ "/v1/kanban/boards": {
20
+ "get": {
21
+ "operationId": "getKanbanBoards",
22
+ "responses": {}
23
+ }
24
+ },
25
+ "/v1/kanban/board/{boardId}": {
26
+ "get": {
27
+ "operationId": "getKanbanBoard",
28
+ "parameters": [
29
+ {
30
+ "name": "boardId",
31
+ "in": "path",
32
+ "required": true
33
+ }
34
+ ],
35
+ "responses": {}
36
+ },
37
+ "put": {
38
+ "operationId": "updateKanbanBoard",
39
+ "parameters": [
40
+ {
41
+ "name": "boardId",
42
+ "in": "path",
43
+ "required": true
44
+ }
45
+ ],
46
+ "requestBody": {
47
+ "content": {
48
+ "application/json": {}
49
+ }
50
+ },
51
+ "responses": {}
52
+ },
53
+ "delete": {
54
+ "operationId": "deleteKanbanBoard",
55
+ "parameters": [
56
+ {
57
+ "name": "boardId",
58
+ "in": "path",
59
+ "required": true
60
+ }
61
+ ],
62
+ "responses": {}
63
+ }
64
+ }
65
+ },
66
+ "components": {},
67
+ "servers": [
68
+ {
69
+ "url": "https://kanban.sls.epilot.io"
70
+ }
71
+ ]
72
+ }
@@ -0,0 +1,306 @@
1
+ /* eslint-disable */
2
+
3
+ import type {
4
+ OpenAPIClient,
5
+ Parameters,
6
+ UnknownParamsObject,
7
+ OperationResponse,
8
+ AxiosRequestConfig,
9
+ } from 'openapi-client-axios';
10
+
11
+ declare namespace Components {
12
+ namespace Schemas {
13
+ export interface Board {
14
+ id?: string; // uuid
15
+ /**
16
+ * example:
17
+ * Board 1
18
+ */
19
+ title: string;
20
+ /**
21
+ * example:
22
+ * Board description
23
+ */
24
+ description?: string;
25
+ created_at?: string; // date-time
26
+ updated_at?: string; // date-time
27
+ created_by?: string;
28
+ updated_by?: string;
29
+ config: {
30
+ /**
31
+ * example:
32
+ * workflow_tasks_overview
33
+ */
34
+ dataset?: string;
35
+ swimlanes?: Swimlane[];
36
+ board_filters?: BoardFilter[];
37
+ sorting?: Sorting;
38
+ };
39
+ }
40
+ export interface BoardFilter {
41
+ /**
42
+ * example:
43
+ * status
44
+ */
45
+ filter_field: string;
46
+ filter_values: string[];
47
+ }
48
+ export interface BoardSummary {
49
+ id?: string; // uuid
50
+ /**
51
+ * example:
52
+ * Board 1
53
+ */
54
+ title?: string;
55
+ /**
56
+ * example:
57
+ * Board description
58
+ */
59
+ description?: string;
60
+ created_at?: string; // date-time
61
+ updated_at?: string; // date-time
62
+ created_by?: string;
63
+ updated_by?: string;
64
+ }
65
+ export interface Sorting {
66
+ /**
67
+ * example:
68
+ * createdAt
69
+ */
70
+ field: string;
71
+ direction?: "asc" | "desc";
72
+ }
73
+ export interface Swimlane {
74
+ /**
75
+ * example:
76
+ * status
77
+ */
78
+ filter_field: string;
79
+ filter_values: string[];
80
+ id?: string; // uuid
81
+ /**
82
+ * example:
83
+ * Swimlane 1
84
+ */
85
+ title?: string;
86
+ /**
87
+ * example:
88
+ * 1
89
+ */
90
+ position?: number;
91
+ /**
92
+ * example:
93
+ * success
94
+ */
95
+ title_chip_variant?: string;
96
+ }
97
+ }
98
+ }
99
+ declare namespace Paths {
100
+ namespace CreateKanbanBoard {
101
+ export type RequestBody = Components.Schemas.Board;
102
+ namespace Responses {
103
+ export type $200 = Components.Schemas.Board;
104
+ export interface $400 {
105
+ }
106
+ export interface $401 {
107
+ }
108
+ export interface $403 {
109
+ }
110
+ export interface $500 {
111
+ }
112
+ }
113
+ }
114
+ namespace DeleteKanbanBoard {
115
+ namespace Parameters {
116
+ export type BoardId = string; // uuid
117
+ }
118
+ export interface PathParameters {
119
+ boardId: Parameters.BoardId /* uuid */;
120
+ }
121
+ namespace Responses {
122
+ export interface $200 {
123
+ }
124
+ export interface $401 {
125
+ }
126
+ export interface $403 {
127
+ }
128
+ export interface $404 {
129
+ }
130
+ export interface $500 {
131
+ }
132
+ }
133
+ }
134
+ namespace GetKanbanBoard {
135
+ namespace Parameters {
136
+ export type BoardId = string; // uuid
137
+ }
138
+ export interface PathParameters {
139
+ boardId: Parameters.BoardId /* uuid */;
140
+ }
141
+ namespace Responses {
142
+ export type $200 = Components.Schemas.Board;
143
+ export interface $401 {
144
+ }
145
+ export interface $403 {
146
+ }
147
+ export interface $404 {
148
+ }
149
+ export interface $500 {
150
+ }
151
+ }
152
+ }
153
+ namespace GetKanbanBoards {
154
+ namespace Responses {
155
+ export type $200 = Components.Schemas.BoardSummary[];
156
+ export interface $401 {
157
+ }
158
+ export interface $403 {
159
+ }
160
+ export interface $500 {
161
+ }
162
+ }
163
+ }
164
+ namespace UpdateKanbanBoard {
165
+ namespace Parameters {
166
+ export type BoardId = string; // uuid
167
+ }
168
+ export interface PathParameters {
169
+ boardId: Parameters.BoardId /* uuid */;
170
+ }
171
+ export type RequestBody = Components.Schemas.Board;
172
+ namespace Responses {
173
+ export type $200 = Components.Schemas.Board;
174
+ export interface $400 {
175
+ }
176
+ export interface $401 {
177
+ }
178
+ export interface $403 {
179
+ }
180
+ export interface $404 {
181
+ }
182
+ export interface $500 {
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ export interface OperationMethods {
189
+ /**
190
+ * createKanbanBoard - Create a Kanban board
191
+ *
192
+ * Create a Kanban board
193
+ */
194
+ 'createKanbanBoard'(
195
+ parameters?: Parameters<UnknownParamsObject> | null,
196
+ data?: Paths.CreateKanbanBoard.RequestBody,
197
+ config?: AxiosRequestConfig
198
+ ): OperationResponse<Paths.CreateKanbanBoard.Responses.$200>
199
+ /**
200
+ * getKanbanBoards - Get all Kanban boards
201
+ *
202
+ * Get all Kanban boards
203
+ */
204
+ 'getKanbanBoards'(
205
+ parameters?: Parameters<UnknownParamsObject> | null,
206
+ data?: any,
207
+ config?: AxiosRequestConfig
208
+ ): OperationResponse<Paths.GetKanbanBoards.Responses.$200>
209
+ /**
210
+ * getKanbanBoard - Get a Kanban board
211
+ *
212
+ * Get a Kanban board
213
+ */
214
+ 'getKanbanBoard'(
215
+ parameters?: Parameters<Paths.GetKanbanBoard.PathParameters> | null,
216
+ data?: any,
217
+ config?: AxiosRequestConfig
218
+ ): OperationResponse<Paths.GetKanbanBoard.Responses.$200>
219
+ /**
220
+ * updateKanbanBoard - Update a Kanban board
221
+ *
222
+ * Update a Kanban board
223
+ */
224
+ 'updateKanbanBoard'(
225
+ parameters?: Parameters<Paths.UpdateKanbanBoard.PathParameters> | null,
226
+ data?: Paths.UpdateKanbanBoard.RequestBody,
227
+ config?: AxiosRequestConfig
228
+ ): OperationResponse<Paths.UpdateKanbanBoard.Responses.$200>
229
+ /**
230
+ * deleteKanbanBoard - Delete a Kanban board
231
+ *
232
+ * Delete a Kanban board
233
+ */
234
+ 'deleteKanbanBoard'(
235
+ parameters?: Parameters<Paths.DeleteKanbanBoard.PathParameters> | null,
236
+ data?: any,
237
+ config?: AxiosRequestConfig
238
+ ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
239
+ }
240
+
241
+ export interface PathsDictionary {
242
+ ['/v1/kanban/board']: {
243
+ /**
244
+ * createKanbanBoard - Create a Kanban board
245
+ *
246
+ * Create a Kanban board
247
+ */
248
+ 'post'(
249
+ parameters?: Parameters<UnknownParamsObject> | null,
250
+ data?: Paths.CreateKanbanBoard.RequestBody,
251
+ config?: AxiosRequestConfig
252
+ ): OperationResponse<Paths.CreateKanbanBoard.Responses.$200>
253
+ }
254
+ ['/v1/kanban/boards']: {
255
+ /**
256
+ * getKanbanBoards - Get all Kanban boards
257
+ *
258
+ * Get all Kanban boards
259
+ */
260
+ 'get'(
261
+ parameters?: Parameters<UnknownParamsObject> | null,
262
+ data?: any,
263
+ config?: AxiosRequestConfig
264
+ ): OperationResponse<Paths.GetKanbanBoards.Responses.$200>
265
+ }
266
+ ['/v1/kanban/board/{boardId}']: {
267
+ /**
268
+ * getKanbanBoard - Get a Kanban board
269
+ *
270
+ * Get a Kanban board
271
+ */
272
+ 'get'(
273
+ parameters?: Parameters<Paths.GetKanbanBoard.PathParameters> | null,
274
+ data?: any,
275
+ config?: AxiosRequestConfig
276
+ ): OperationResponse<Paths.GetKanbanBoard.Responses.$200>
277
+ /**
278
+ * updateKanbanBoard - Update a Kanban board
279
+ *
280
+ * Update a Kanban board
281
+ */
282
+ 'put'(
283
+ parameters?: Parameters<Paths.UpdateKanbanBoard.PathParameters> | null,
284
+ data?: Paths.UpdateKanbanBoard.RequestBody,
285
+ config?: AxiosRequestConfig
286
+ ): OperationResponse<Paths.UpdateKanbanBoard.Responses.$200>
287
+ /**
288
+ * deleteKanbanBoard - Delete a Kanban board
289
+ *
290
+ * Delete a Kanban board
291
+ */
292
+ 'delete'(
293
+ parameters?: Parameters<Paths.DeleteKanbanBoard.PathParameters> | null,
294
+ data?: any,
295
+ config?: AxiosRequestConfig
296
+ ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
297
+ }
298
+ }
299
+
300
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
301
+
302
+ export type Board = Components.Schemas.Board;
303
+ export type BoardFilter = Components.Schemas.BoardFilter;
304
+ export type BoardSummary = Components.Schemas.BoardSummary;
305
+ export type Sorting = Components.Schemas.Sorting;
306
+ export type Swimlane = Components.Schemas.Swimlane;
@@ -0,0 +1,398 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Kanban API",
5
+ "version": "1.0.0"
6
+ },
7
+ "tags": [
8
+ {
9
+ "name": "Kanban",
10
+ "description": "Kanban endpoints"
11
+ }
12
+ ],
13
+ "security": [
14
+ {
15
+ "EpilotAuth": []
16
+ }
17
+ ],
18
+ "paths": {
19
+ "/v1/kanban/board": {
20
+ "post": {
21
+ "operationId": "createKanbanBoard",
22
+ "summary": "Create a Kanban board",
23
+ "description": "Create a Kanban board",
24
+ "tags": [
25
+ "Kanban"
26
+ ],
27
+ "requestBody": {
28
+ "content": {
29
+ "application/json": {
30
+ "schema": {
31
+ "$ref": "#/components/schemas/Board"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "responses": {
37
+ "200": {
38
+ "description": "Successfully created board",
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "$ref": "#/components/schemas/Board"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "400": {
48
+ "description": "Bad request - Invalid input data"
49
+ },
50
+ "401": {
51
+ "description": "Unauthorized - Authentication required"
52
+ },
53
+ "403": {
54
+ "description": "Forbidden - Insufficient permissions"
55
+ },
56
+ "500": {
57
+ "description": "Internal server error"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "/v1/kanban/boards": {
63
+ "get": {
64
+ "operationId": "getKanbanBoards",
65
+ "summary": "Get all Kanban boards",
66
+ "description": "Get all Kanban boards",
67
+ "tags": [
68
+ "Kanban"
69
+ ],
70
+ "responses": {
71
+ "200": {
72
+ "description": "Successfully retrieved boards",
73
+ "content": {
74
+ "application/json": {
75
+ "schema": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/components/schemas/BoardSummary"
79
+ }
80
+ }
81
+ }
82
+ }
83
+ },
84
+ "401": {
85
+ "description": "Unauthorized - Authentication required"
86
+ },
87
+ "403": {
88
+ "description": "Forbidden - Insufficient permissions"
89
+ },
90
+ "500": {
91
+ "description": "Internal server error"
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "/v1/kanban/board/{boardId}": {
97
+ "get": {
98
+ "operationId": "getKanbanBoard",
99
+ "summary": "Get a Kanban board",
100
+ "description": "Get a Kanban board",
101
+ "tags": [
102
+ "Kanban"
103
+ ],
104
+ "parameters": [
105
+ {
106
+ "name": "boardId",
107
+ "in": "path",
108
+ "required": true,
109
+ "schema": {
110
+ "type": "string",
111
+ "format": "uuid"
112
+ }
113
+ }
114
+ ],
115
+ "responses": {
116
+ "200": {
117
+ "description": "Successfully retrieved board",
118
+ "content": {
119
+ "application/json": {
120
+ "schema": {
121
+ "$ref": "#/components/schemas/Board"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "401": {
127
+ "description": "Unauthorized - Authentication required"
128
+ },
129
+ "403": {
130
+ "description": "Forbidden - Insufficient permissions"
131
+ },
132
+ "404": {
133
+ "description": "Board not found"
134
+ },
135
+ "500": {
136
+ "description": "Internal server error"
137
+ }
138
+ }
139
+ },
140
+ "put": {
141
+ "operationId": "updateKanbanBoard",
142
+ "summary": "Update a Kanban board",
143
+ "description": "Update a Kanban board",
144
+ "tags": [
145
+ "Kanban"
146
+ ],
147
+ "parameters": [
148
+ {
149
+ "name": "boardId",
150
+ "in": "path",
151
+ "required": true,
152
+ "schema": {
153
+ "type": "string",
154
+ "format": "uuid"
155
+ }
156
+ }
157
+ ],
158
+ "requestBody": {
159
+ "content": {
160
+ "application/json": {
161
+ "schema": {
162
+ "$ref": "#/components/schemas/Board"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "responses": {
168
+ "200": {
169
+ "description": "Successfully updated board",
170
+ "content": {
171
+ "application/json": {
172
+ "schema": {
173
+ "$ref": "#/components/schemas/Board"
174
+ }
175
+ }
176
+ }
177
+ },
178
+ "400": {
179
+ "description": "Bad request - Invalid input data"
180
+ },
181
+ "401": {
182
+ "description": "Unauthorized - Authentication required"
183
+ },
184
+ "403": {
185
+ "description": "Forbidden - Insufficient permissions"
186
+ },
187
+ "404": {
188
+ "description": "Board not found"
189
+ },
190
+ "500": {
191
+ "description": "Internal server error"
192
+ }
193
+ }
194
+ },
195
+ "delete": {
196
+ "operationId": "deleteKanbanBoard",
197
+ "summary": "Delete a Kanban board",
198
+ "description": "Delete a Kanban board",
199
+ "tags": [
200
+ "Kanban"
201
+ ],
202
+ "parameters": [
203
+ {
204
+ "name": "boardId",
205
+ "in": "path",
206
+ "required": true,
207
+ "schema": {
208
+ "type": "string",
209
+ "format": "uuid"
210
+ }
211
+ }
212
+ ],
213
+ "responses": {
214
+ "200": {
215
+ "description": "Successfully deleted board"
216
+ },
217
+ "401": {
218
+ "description": "Unauthorized - Authentication required"
219
+ },
220
+ "403": {
221
+ "description": "Forbidden - Insufficient permissions"
222
+ },
223
+ "404": {
224
+ "description": "Board not found"
225
+ },
226
+ "500": {
227
+ "description": "Internal server error"
228
+ }
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "components": {
234
+ "securitySchemes": {
235
+ "EpilotAuth": {
236
+ "type": "http",
237
+ "scheme": "bearer",
238
+ "description": "Authorization header with epilot OAuth2 bearer token",
239
+ "bearerFormat": "JWT"
240
+ },
241
+ "EpilotPublicAuth": {
242
+ "type": "http",
243
+ "scheme": "bearer",
244
+ "description": "Authorization header with epilot public access token",
245
+ "bearerFormat": "JWT"
246
+ }
247
+ },
248
+ "schemas": {
249
+ "BoardSummary": {
250
+ "type": "object",
251
+ "properties": {
252
+ "id": {
253
+ "type": "string",
254
+ "format": "uuid"
255
+ },
256
+ "title": {
257
+ "type": "string",
258
+ "example": "Board 1"
259
+ },
260
+ "description": {
261
+ "type": "string",
262
+ "example": "Board description"
263
+ },
264
+ "created_at": {
265
+ "type": "string",
266
+ "format": "date-time"
267
+ },
268
+ "updated_at": {
269
+ "type": "string",
270
+ "format": "date-time"
271
+ },
272
+ "created_by": {
273
+ "type": "string"
274
+ },
275
+ "updated_by": {
276
+ "type": "string"
277
+ }
278
+ }
279
+ },
280
+ "Board": {
281
+ "allOf": [
282
+ {
283
+ "$ref": "#/components/schemas/BoardSummary"
284
+ },
285
+ {
286
+ "type": "object",
287
+ "properties": {
288
+ "config": {
289
+ "type": "object",
290
+ "properties": {
291
+ "dataset": {
292
+ "type": "string",
293
+ "example": "workflow_tasks_overview"
294
+ },
295
+ "swimlanes": {
296
+ "type": "array",
297
+ "items": {
298
+ "$ref": "#/components/schemas/Swimlane"
299
+ }
300
+ },
301
+ "board_filters": {
302
+ "type": "array",
303
+ "items": {
304
+ "$ref": "#/components/schemas/BoardFilter"
305
+ }
306
+ },
307
+ "sorting": {
308
+ "$ref": "#/components/schemas/Sorting"
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "required": [
314
+ "title",
315
+ "config"
316
+ ]
317
+ }
318
+ ]
319
+ },
320
+ "Swimlane": {
321
+ "allOf": [
322
+ {
323
+ "$ref": "#/components/schemas/BoardFilter"
324
+ },
325
+ {
326
+ "type": "object",
327
+ "properties": {
328
+ "id": {
329
+ "type": "string",
330
+ "format": "uuid"
331
+ },
332
+ "title": {
333
+ "type": "string",
334
+ "example": "Swimlane 1"
335
+ },
336
+ "position": {
337
+ "type": "number",
338
+ "example": 1
339
+ },
340
+ "title_chip_variant": {
341
+ "type": "string",
342
+ "example": "success"
343
+ }
344
+ }
345
+ }
346
+ ]
347
+ },
348
+ "Sorting": {
349
+ "type": "object",
350
+ "properties": {
351
+ "field": {
352
+ "type": "string",
353
+ "example": "createdAt"
354
+ },
355
+ "direction": {
356
+ "type": "string",
357
+ "enum": [
358
+ "asc",
359
+ "desc"
360
+ ],
361
+ "default": "asc"
362
+ }
363
+ },
364
+ "required": [
365
+ "field"
366
+ ]
367
+ },
368
+ "BoardFilter": {
369
+ "type": "object",
370
+ "properties": {
371
+ "filter_field": {
372
+ "type": "string",
373
+ "example": "status"
374
+ },
375
+ "filter_values": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "string",
379
+ "example": "SKIPPED"
380
+ }
381
+ }
382
+ },
383
+ "required": [
384
+ "filter_field",
385
+ "filter_values"
386
+ ]
387
+ }
388
+ }
389
+ },
390
+ "servers": [
391
+ {
392
+ "url": "https://kanban.sls.epilot.io"
393
+ },
394
+ {
395
+ "url": "https://kanban.sls.epilot.io"
396
+ }
397
+ ]
398
+ }
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@epilot/kanban-client",
3
+ "version": "0.1.0",
4
+ "description": "Client library for epilot Kanban API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "author": "epilot GmbH",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/epilot-dev/sdk-js.git",
12
+ "directory": "clients/kanban-client"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/epilot-dev/sdk-js/issues"
16
+ },
17
+ "homepage": "https://github.com/epilot-dev/sdk-js/tree/main/clients/kanban-client#readme",
18
+ "keywords": [
19
+ "epilot",
20
+ "sdk",
21
+ "kanban"
22
+ ],
23
+ "scripts": {
24
+ "test": "jest",
25
+ "typescript": "tsc",
26
+ "bundle-definition": "webpack",
27
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/kanban.yaml",
28
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
29
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
30
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
31
+ "build:watch": "npm run build && tsc -w",
32
+ "prepublishOnly": "npm run typegen && npm run build",
33
+ "lint": "../../node_modules/eslint/bin/eslint.js src"
34
+ },
35
+ "files": [
36
+ "*.js",
37
+ "*.d.ts",
38
+ "**/*.js",
39
+ "**/*.d.ts",
40
+ "**/*.json",
41
+ "!*.test.*",
42
+ "!**/*.test.*",
43
+ "!node_modules",
44
+ "!src",
45
+ "!src/**",
46
+ "!*.config.js"
47
+ ],
48
+ "peerDependencies": {
49
+ "axios": "^1.6.2"
50
+ },
51
+ "dependencies": {
52
+ "@dazn/lambda-powertools-correlation-ids": "^1.28.1",
53
+ "buffer": "^6.0.3",
54
+ "https-browserify": "^1.0.0",
55
+ "openapi-client-axios": "^7.5.1",
56
+ "stream-http": "^3.1.1",
57
+ "url": "^0.11.0",
58
+ "util": "^0.12.3"
59
+ },
60
+ "devDependencies": {
61
+ "@types/jest": "^26.0.20",
62
+ "axios": "^1.6.2",
63
+ "copy-webpack-plugin": "^7.0.0",
64
+ "jest": "^26.6.3",
65
+ "json-loader": "^0.5.7",
66
+ "openapicmd": "^2.6.0",
67
+ "ts-jest": "^26.5.0",
68
+ "ts-loader": "^8.0.14",
69
+ "ts-node": "^10.9.1",
70
+ "typescript": "^4.1.3",
71
+ "webpack": "^5.18.0",
72
+ "webpack-cli": "^4.4.0"
73
+ }
74
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "es5",
5
+ "module": "commonjs",
6
+ "moduleResolution": "node",
7
+ "lib": ["esnext", "dom"],
8
+ "experimentalDecorators": true,
9
+ "emitDecoratorMetadata": true,
10
+ "esModuleInterop": true,
11
+ "noImplicitAny": true,
12
+ "strictPropertyInitialization": false,
13
+ "strictNullChecks": false,
14
+ "resolveJsonModule": true,
15
+ "baseUrl": ".",
16
+ "rootDir": "src",
17
+ "outDir": "dist",
18
+ "sourceMap": true,
19
+ "declaration": true
20
+ },
21
+ "include": ["src/**/*"],
22
+ "exclude": ["**/*.test.ts"]
23
+ }