@epilot/kanban-client 0.1.2-0 → 0.1.4-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.
@@ -1 +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})})();
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":{}},"patch":{"operationId":"patchKanbanBoard","parameters":[{"name":"boardId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteKanbanBoard","parameters":[{"name":"boardId","in":"path","required":true}],"responses":{}}},"/v1/kanban/query/flows:autocomplete":{"get":{"operationId":"flowsAutocomplete","parameters":[{"name":"input","in":"query"},{"name":"attribute","in":"query","required":true},{"name":"size","in":"query"}],"responses":{}}},"/v1/kanban/query/flows:execute":{"post":{"operationId":"executeFlowsQuery","requestBody":{"content":{"application/json":{}}},"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})})();
@@ -50,6 +50,22 @@
50
50
  },
51
51
  "responses": {}
52
52
  },
53
+ "patch": {
54
+ "operationId": "patchKanbanBoard",
55
+ "parameters": [
56
+ {
57
+ "name": "boardId",
58
+ "in": "path",
59
+ "required": true
60
+ }
61
+ ],
62
+ "requestBody": {
63
+ "content": {
64
+ "application/json": {}
65
+ }
66
+ },
67
+ "responses": {}
68
+ },
53
69
  "delete": {
54
70
  "operationId": "deleteKanbanBoard",
55
71
  "parameters": [
@@ -61,6 +77,38 @@
61
77
  ],
62
78
  "responses": {}
63
79
  }
80
+ },
81
+ "/v1/kanban/query/flows:autocomplete": {
82
+ "get": {
83
+ "operationId": "flowsAutocomplete",
84
+ "parameters": [
85
+ {
86
+ "name": "input",
87
+ "in": "query"
88
+ },
89
+ {
90
+ "name": "attribute",
91
+ "in": "query",
92
+ "required": true
93
+ },
94
+ {
95
+ "name": "size",
96
+ "in": "query"
97
+ }
98
+ ],
99
+ "responses": {}
100
+ }
101
+ },
102
+ "/v1/kanban/query/flows:execute": {
103
+ "post": {
104
+ "operationId": "executeFlowsQuery",
105
+ "requestBody": {
106
+ "content": {
107
+ "application/json": {}
108
+ }
109
+ },
110
+ "responses": {}
111
+ }
64
112
  }
65
113
  },
66
114
  "components": {},
package/dist/openapi.d.ts CHANGED
@@ -25,8 +25,10 @@ declare namespace Components {
25
25
  created_at?: string; // date-time
26
26
  updated_at?: string; // date-time
27
27
  created_by?: string;
28
+ org_id?: string;
28
29
  updated_by?: string;
29
30
  shared_with?: string[];
31
+ shared_with_org?: boolean;
30
32
  config: {
31
33
  /**
32
34
  * example:
@@ -69,8 +71,10 @@ declare namespace Components {
69
71
  created_at?: string; // date-time
70
72
  updated_at?: string; // date-time
71
73
  created_by?: string;
74
+ org_id?: string;
72
75
  updated_by?: string;
73
76
  shared_with?: string[];
77
+ shared_with_org?: boolean;
74
78
  }
75
79
  export interface FilterGroup {
76
80
  items: FilterItem[];
@@ -93,7 +97,7 @@ declare namespace Components {
93
97
  * EQUALS
94
98
  */
95
99
  FilterOperator;
96
- value: /* The value to compare against - can be a single value (string, number, boolean) or an array of values */ ValueType;
100
+ value?: /* The value to compare against - can be a single value (string, number, boolean) or an array of values */ ValueType;
97
101
  /**
98
102
  * The data type of the field
99
103
  * example:
@@ -107,10 +111,26 @@ declare namespace Components {
107
111
  * EQUALS
108
112
  */
109
113
  export type FilterOperator = "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL";
114
+ export interface FlowsQueryRequest {
115
+ filters?: BoardFilter;
116
+ sorting?: Sorting;
117
+ from?: number;
118
+ size?: number;
119
+ }
120
+ export interface FlowsQueryResult {
121
+ [name: string]: any;
122
+ results?: {
123
+ [name: string]: any;
124
+ }[];
125
+ hits?: number;
126
+ page_number?: number;
127
+ page_size?: number;
128
+ total_pages?: number;
129
+ }
110
130
  export interface Sorting {
111
131
  /**
112
132
  * example:
113
- * createdAt
133
+ * created_at
114
134
  */
115
135
  field: string;
116
136
  direction?: "asc" | "desc";
@@ -175,6 +195,45 @@ declare namespace Paths {
175
195
  }
176
196
  }
177
197
  }
198
+ namespace ExecuteFlowsQuery {
199
+ export type RequestBody = Components.Schemas.FlowsQueryRequest;
200
+ namespace Responses {
201
+ export type $200 = Components.Schemas.FlowsQueryResult;
202
+ }
203
+ }
204
+ namespace FlowsAutocomplete {
205
+ namespace Parameters {
206
+ /**
207
+ * example:
208
+ * name
209
+ */
210
+ export type Attribute = string;
211
+ export type Input = string;
212
+ export type Size = number;
213
+ }
214
+ export interface QueryParameters {
215
+ input?: Parameters.Input;
216
+ attribute: /**
217
+ * example:
218
+ * name
219
+ */
220
+ Parameters.Attribute;
221
+ size?: Parameters.Size;
222
+ }
223
+ namespace Responses {
224
+ export interface $200 {
225
+ /**
226
+ * example:
227
+ * [
228
+ * "value"
229
+ * ]
230
+ */
231
+ results?: (string | boolean | {
232
+ [name: string]: any;
233
+ })[];
234
+ }
235
+ }
236
+ }
178
237
  namespace GetKanbanBoard {
179
238
  namespace Parameters {
180
239
  export type BoardId = string;
@@ -205,6 +264,41 @@ declare namespace Paths {
205
264
  }
206
265
  }
207
266
  }
267
+ namespace PatchKanbanBoard {
268
+ namespace Parameters {
269
+ export type BoardId = string;
270
+ }
271
+ export interface PathParameters {
272
+ boardId: Parameters.BoardId;
273
+ }
274
+ export interface RequestBody {
275
+ /**
276
+ * example:
277
+ * Board 1
278
+ */
279
+ title?: string;
280
+ /**
281
+ * example:
282
+ * Board description
283
+ */
284
+ description?: string;
285
+ shared_with?: string[];
286
+ shared_with_org?: boolean;
287
+ }
288
+ namespace Responses {
289
+ export type $200 = Components.Schemas.Board;
290
+ export interface $400 {
291
+ }
292
+ export interface $401 {
293
+ }
294
+ export interface $403 {
295
+ }
296
+ export interface $404 {
297
+ }
298
+ export interface $500 {
299
+ }
300
+ }
301
+ }
208
302
  namespace UpdateKanbanBoard {
209
303
  namespace Parameters {
210
304
  export type BoardId = string;
@@ -271,6 +365,16 @@ export interface OperationMethods {
271
365
  data?: Paths.UpdateKanbanBoard.RequestBody,
272
366
  config?: AxiosRequestConfig
273
367
  ): OperationResponse<Paths.UpdateKanbanBoard.Responses.$200>
368
+ /**
369
+ * patchKanbanBoard - Patch a Kanban board
370
+ *
371
+ * Patch a Kanban board
372
+ */
373
+ 'patchKanbanBoard'(
374
+ parameters?: Parameters<Paths.PatchKanbanBoard.PathParameters> | null,
375
+ data?: Paths.PatchKanbanBoard.RequestBody,
376
+ config?: AxiosRequestConfig
377
+ ): OperationResponse<Paths.PatchKanbanBoard.Responses.$200>
274
378
  /**
275
379
  * deleteKanbanBoard - Delete a Kanban board
276
380
  *
@@ -281,6 +385,27 @@ export interface OperationMethods {
281
385
  data?: any,
282
386
  config?: AxiosRequestConfig
283
387
  ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
388
+ /**
389
+ * flowsAutocomplete - flowsAutocomplete
390
+ *
391
+ * Autocomplete flows data
392
+ *
393
+ */
394
+ 'flowsAutocomplete'(
395
+ parameters?: Parameters<Paths.FlowsAutocomplete.QueryParameters> | null,
396
+ data?: any,
397
+ config?: AxiosRequestConfig
398
+ ): OperationResponse<Paths.FlowsAutocomplete.Responses.$200>
399
+ /**
400
+ * executeFlowsQuery - executeFlowsQuery
401
+ *
402
+ * Query Flows Data for Kanban View.
403
+ */
404
+ 'executeFlowsQuery'(
405
+ parameters?: Parameters<UnknownParamsObject> | null,
406
+ data?: Paths.ExecuteFlowsQuery.RequestBody,
407
+ config?: AxiosRequestConfig
408
+ ): OperationResponse<Paths.ExecuteFlowsQuery.Responses.$200>
284
409
  }
285
410
 
286
411
  export interface PathsDictionary {
@@ -329,6 +454,16 @@ export interface PathsDictionary {
329
454
  data?: Paths.UpdateKanbanBoard.RequestBody,
330
455
  config?: AxiosRequestConfig
331
456
  ): OperationResponse<Paths.UpdateKanbanBoard.Responses.$200>
457
+ /**
458
+ * patchKanbanBoard - Patch a Kanban board
459
+ *
460
+ * Patch a Kanban board
461
+ */
462
+ 'patch'(
463
+ parameters?: Parameters<Paths.PatchKanbanBoard.PathParameters> | null,
464
+ data?: Paths.PatchKanbanBoard.RequestBody,
465
+ config?: AxiosRequestConfig
466
+ ): OperationResponse<Paths.PatchKanbanBoard.Responses.$200>
332
467
  /**
333
468
  * deleteKanbanBoard - Delete a Kanban board
334
469
  *
@@ -340,6 +475,31 @@ export interface PathsDictionary {
340
475
  config?: AxiosRequestConfig
341
476
  ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
342
477
  }
478
+ ['/v1/kanban/query/flows:autocomplete']: {
479
+ /**
480
+ * flowsAutocomplete - flowsAutocomplete
481
+ *
482
+ * Autocomplete flows data
483
+ *
484
+ */
485
+ 'get'(
486
+ parameters?: Parameters<Paths.FlowsAutocomplete.QueryParameters> | null,
487
+ data?: any,
488
+ config?: AxiosRequestConfig
489
+ ): OperationResponse<Paths.FlowsAutocomplete.Responses.$200>
490
+ }
491
+ ['/v1/kanban/query/flows:execute']: {
492
+ /**
493
+ * executeFlowsQuery - executeFlowsQuery
494
+ *
495
+ * Query Flows Data for Kanban View.
496
+ */
497
+ 'post'(
498
+ parameters?: Parameters<UnknownParamsObject> | null,
499
+ data?: Paths.ExecuteFlowsQuery.RequestBody,
500
+ config?: AxiosRequestConfig
501
+ ): OperationResponse<Paths.ExecuteFlowsQuery.Responses.$200>
502
+ }
343
503
  }
344
504
 
345
505
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -351,6 +511,8 @@ export type BoardSummary = Components.Schemas.BoardSummary;
351
511
  export type FilterGroup = Components.Schemas.FilterGroup;
352
512
  export type FilterItem = Components.Schemas.FilterItem;
353
513
  export type FilterOperator = Components.Schemas.FilterOperator;
514
+ export type FlowsQueryRequest = Components.Schemas.FlowsQueryRequest;
515
+ export type FlowsQueryResult = Components.Schemas.FlowsQueryResult;
354
516
  export type Sorting = Components.Schemas.Sorting;
355
517
  export type Swimlane = Components.Schemas.Swimlane;
356
518
  export type ValueType = Components.Schemas.ValueType;
package/dist/openapi.json CHANGED
@@ -190,6 +190,79 @@
190
190
  }
191
191
  }
192
192
  },
193
+ "patch": {
194
+ "operationId": "patchKanbanBoard",
195
+ "summary": "Patch a Kanban board",
196
+ "description": "Patch a Kanban board",
197
+ "tags": [
198
+ "Kanban"
199
+ ],
200
+ "parameters": [
201
+ {
202
+ "name": "boardId",
203
+ "in": "path",
204
+ "required": true,
205
+ "schema": {
206
+ "type": "string"
207
+ }
208
+ }
209
+ ],
210
+ "requestBody": {
211
+ "content": {
212
+ "application/json": {
213
+ "schema": {
214
+ "type": "object",
215
+ "properties": {
216
+ "title": {
217
+ "type": "string",
218
+ "example": "Board 1"
219
+ },
220
+ "description": {
221
+ "type": "string",
222
+ "example": "Board description"
223
+ },
224
+ "shared_with": {
225
+ "type": "array",
226
+ "items": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "shared_with_org": {
231
+ "type": "boolean"
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "responses": {
239
+ "200": {
240
+ "description": "Successfully patched board",
241
+ "content": {
242
+ "application/json": {
243
+ "schema": {
244
+ "$ref": "#/components/schemas/Board"
245
+ }
246
+ }
247
+ }
248
+ },
249
+ "400": {
250
+ "description": "Bad request - Invalid input data"
251
+ },
252
+ "401": {
253
+ "description": "Unauthorized - Authentication required"
254
+ },
255
+ "403": {
256
+ "description": "Forbidden - Insufficient permissions"
257
+ },
258
+ "404": {
259
+ "description": "Board not found"
260
+ },
261
+ "500": {
262
+ "description": "Internal server error"
263
+ }
264
+ }
265
+ },
193
266
  "delete": {
194
267
  "operationId": "deleteKanbanBoard",
195
268
  "summary": "Delete a Kanban board",
@@ -225,6 +298,112 @@
225
298
  }
226
299
  }
227
300
  }
301
+ },
302
+ "/v1/kanban/query/flows:autocomplete": {
303
+ "get": {
304
+ "operationId": "flowsAutocomplete",
305
+ "summary": "flowsAutocomplete",
306
+ "description": "Autocomplete flows data\n",
307
+ "tags": [
308
+ "Query"
309
+ ],
310
+ "parameters": [
311
+ {
312
+ "name": "input",
313
+ "in": "query",
314
+ "description": "Input to autocomplete",
315
+ "schema": {
316
+ "type": "string"
317
+ }
318
+ },
319
+ {
320
+ "name": "attribute",
321
+ "in": "query",
322
+ "description": "Autocomplete attribute",
323
+ "schema": {
324
+ "type": "string",
325
+ "example": "name"
326
+ },
327
+ "required": true
328
+ },
329
+ {
330
+ "name": "size",
331
+ "in": "query",
332
+ "description": "Maximum number of results to return",
333
+ "schema": {
334
+ "type": "integer",
335
+ "default": 25,
336
+ "minimum": 1,
337
+ "maximum": 250
338
+ }
339
+ }
340
+ ],
341
+ "responses": {
342
+ "200": {
343
+ "description": "Success",
344
+ "content": {
345
+ "application/json": {
346
+ "schema": {
347
+ "type": "object",
348
+ "properties": {
349
+ "results": {
350
+ "type": "array",
351
+ "items": {
352
+ "anyOf": [
353
+ {
354
+ "type": "string"
355
+ },
356
+ {
357
+ "type": "boolean"
358
+ },
359
+ {
360
+ "type": "object",
361
+ "additionalProperties": true
362
+ }
363
+ ]
364
+ },
365
+ "example": [
366
+ "value"
367
+ ]
368
+ }
369
+ }
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "/v1/kanban/query/flows:execute": {
378
+ "post": {
379
+ "operationId": "executeFlowsQuery",
380
+ "summary": "executeFlowsQuery",
381
+ "description": "Query Flows Data for Kanban View.",
382
+ "tags": [
383
+ "Query"
384
+ ],
385
+ "requestBody": {
386
+ "content": {
387
+ "application/json": {
388
+ "schema": {
389
+ "$ref": "#/components/schemas/FlowsQueryRequest"
390
+ }
391
+ }
392
+ }
393
+ },
394
+ "responses": {
395
+ "200": {
396
+ "description": "Query results",
397
+ "content": {
398
+ "application/json": {
399
+ "schema": {
400
+ "$ref": "#/components/schemas/FlowsQueryResult"
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+ }
228
407
  }
229
408
  },
230
409
  "components": {
@@ -234,12 +413,6 @@
234
413
  "scheme": "bearer",
235
414
  "description": "Authorization header with epilot OAuth2 bearer token",
236
415
  "bearerFormat": "JWT"
237
- },
238
- "EpilotPublicAuth": {
239
- "type": "http",
240
- "scheme": "bearer",
241
- "description": "Authorization header with epilot public access token",
242
- "bearerFormat": "JWT"
243
416
  }
244
417
  },
245
418
  "schemas": {
@@ -268,6 +441,9 @@
268
441
  "created_by": {
269
442
  "type": "string"
270
443
  },
444
+ "org_id": {
445
+ "type": "string"
446
+ },
271
447
  "updated_by": {
272
448
  "type": "string"
273
449
  },
@@ -276,6 +452,9 @@
276
452
  "items": {
277
453
  "type": "string"
278
454
  }
455
+ },
456
+ "shared_with_org": {
457
+ "type": "boolean"
279
458
  }
280
459
  }
281
460
  },
@@ -360,7 +539,7 @@
360
539
  "properties": {
361
540
  "field": {
362
541
  "type": "string",
363
- "example": "createdAt"
542
+ "example": "created_at"
364
543
  },
365
544
  "direction": {
366
545
  "type": "string",
@@ -486,6 +665,50 @@
486
665
  ],
487
666
  "description": "The value to compare against - can be a single value (string, number, boolean) or an array of values"
488
667
  },
668
+ "FlowsQueryRequest": {
669
+ "type": "object",
670
+ "properties": {
671
+ "filters": {
672
+ "$ref": "#/components/schemas/BoardFilter"
673
+ },
674
+ "sorting": {
675
+ "$ref": "#/components/schemas/Sorting"
676
+ },
677
+ "from": {
678
+ "type": "number",
679
+ "default": 0
680
+ },
681
+ "size": {
682
+ "type": "number",
683
+ "default": 10
684
+ }
685
+ }
686
+ },
687
+ "FlowsQueryResult": {
688
+ "type": "object",
689
+ "properties": {
690
+ "results": {
691
+ "type": "array",
692
+ "items": {
693
+ "type": "object",
694
+ "additionalProperties": true
695
+ }
696
+ },
697
+ "hits": {
698
+ "type": "number"
699
+ },
700
+ "page_number": {
701
+ "type": "number"
702
+ },
703
+ "page_size": {
704
+ "type": "number"
705
+ },
706
+ "total_pages": {
707
+ "type": "number"
708
+ }
709
+ },
710
+ "additionalProperties": true
711
+ },
489
712
  "FilterItem": {
490
713
  "type": "object",
491
714
  "properties": {
@@ -514,8 +737,7 @@
514
737
  },
515
738
  "required": [
516
739
  "key",
517
- "operator",
518
- "value"
740
+ "operator"
519
741
  ]
520
742
  }
521
743
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/kanban-client",
3
- "version": "0.1.2-0",
3
+ "version": "0.1.4-0",
4
4
  "description": "Client library for epilot Kanban API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
32
32
  "build:watch": "npm run build && tsc -w",
33
33
  "prepublishOnly": "npm run typegen && npm run build",
34
- "lint": "../../node_modules/eslint/bin/eslint.js src"
34
+ "lint": "pnpm exec eslint src"
35
35
  },
36
36
  "files": [
37
37
  "*.js",
@@ -53,7 +53,7 @@
53
53
  "@dazn/lambda-powertools-correlation-ids": "^1.28.1",
54
54
  "buffer": "^6.0.3",
55
55
  "https-browserify": "^1.0.0",
56
- "openapi-client-axios": "^7.5.1",
56
+ "openapi-client-axios": "^7.6.0",
57
57
  "stream-http": "^3.1.1",
58
58
  "url": "^0.11.0",
59
59
  "util": "^0.12.3"
@@ -64,7 +64,7 @@
64
64
  "copy-webpack-plugin": "^7.0.0",
65
65
  "jest": "^26.6.3",
66
66
  "json-loader": "^0.5.7",
67
- "openapicmd": "^2.6.2",
67
+ "openapicmd": "^2.7.0",
68
68
  "ts-jest": "^26.5.0",
69
69
  "ts-loader": "^8.0.14",
70
70
  "ts-node": "^10.9.1",