@epilot/kanban-client 0.1.2-0 → 0.1.3

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":{}},"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":{}}')}},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})})();
@@ -61,12 +61,39 @@
61
61
  ],
62
62
  "responses": {}
63
63
  }
64
+ },
65
+ "/v1/kanban/query/flows:autocomplete": {
66
+ "get": {
67
+ "operationId": "flowsAutocomplete",
68
+ "parameters": [
69
+ {
70
+ "name": "input",
71
+ "in": "query"
72
+ },
73
+ {
74
+ "name": "attribute",
75
+ "in": "query",
76
+ "required": true
77
+ },
78
+ {
79
+ "name": "size",
80
+ "in": "query"
81
+ }
82
+ ],
83
+ "responses": {}
84
+ }
85
+ },
86
+ "/v1/kanban/query/flows:execute": {
87
+ "post": {
88
+ "operationId": "executeFlowsQuery",
89
+ "requestBody": {
90
+ "content": {
91
+ "application/json": {}
92
+ }
93
+ },
94
+ "responses": {}
95
+ }
64
96
  }
65
97
  },
66
- "components": {},
67
- "servers": [
68
- {
69
- "url": "https://kanban.sls.epilot.io"
70
- }
71
- ]
98
+ "components": {}
72
99
  }
package/dist/openapi.d.ts CHANGED
@@ -107,10 +107,23 @@ declare namespace Components {
107
107
  * EQUALS
108
108
  */
109
109
  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";
110
+ export interface FlowsQueryRequest {
111
+ filters?: BoardFilter;
112
+ sorting?: Sorting;
113
+ from?: number;
114
+ size?: number;
115
+ }
116
+ export interface FlowsQueryResult {
117
+ [name: string]: any;
118
+ results?: {
119
+ [name: string]: any;
120
+ }[];
121
+ hits?: number;
122
+ }
110
123
  export interface Sorting {
111
124
  /**
112
125
  * example:
113
- * createdAt
126
+ * created_at
114
127
  */
115
128
  field: string;
116
129
  direction?: "asc" | "desc";
@@ -175,6 +188,45 @@ declare namespace Paths {
175
188
  }
176
189
  }
177
190
  }
191
+ namespace ExecuteFlowsQuery {
192
+ export type RequestBody = Components.Schemas.FlowsQueryRequest;
193
+ namespace Responses {
194
+ export type $200 = Components.Schemas.FlowsQueryResult;
195
+ }
196
+ }
197
+ namespace FlowsAutocomplete {
198
+ namespace Parameters {
199
+ /**
200
+ * example:
201
+ * name
202
+ */
203
+ export type Attribute = string;
204
+ export type Input = string;
205
+ export type Size = number;
206
+ }
207
+ export interface QueryParameters {
208
+ input?: Parameters.Input;
209
+ attribute: /**
210
+ * example:
211
+ * name
212
+ */
213
+ Parameters.Attribute;
214
+ size?: Parameters.Size;
215
+ }
216
+ namespace Responses {
217
+ export interface $200 {
218
+ /**
219
+ * example:
220
+ * [
221
+ * "value"
222
+ * ]
223
+ */
224
+ results?: (string | boolean | {
225
+ [name: string]: any;
226
+ })[];
227
+ }
228
+ }
229
+ }
178
230
  namespace GetKanbanBoard {
179
231
  namespace Parameters {
180
232
  export type BoardId = string;
@@ -281,6 +333,27 @@ export interface OperationMethods {
281
333
  data?: any,
282
334
  config?: AxiosRequestConfig
283
335
  ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
336
+ /**
337
+ * flowsAutocomplete - flowsAutocomplete
338
+ *
339
+ * Autocomplete flows data
340
+ *
341
+ */
342
+ 'flowsAutocomplete'(
343
+ parameters?: Parameters<Paths.FlowsAutocomplete.QueryParameters> | null,
344
+ data?: any,
345
+ config?: AxiosRequestConfig
346
+ ): OperationResponse<Paths.FlowsAutocomplete.Responses.$200>
347
+ /**
348
+ * executeFlowsQuery - executeFlowsQuery
349
+ *
350
+ * Query Flows Data for Kanban View.
351
+ */
352
+ 'executeFlowsQuery'(
353
+ parameters?: Parameters<UnknownParamsObject> | null,
354
+ data?: Paths.ExecuteFlowsQuery.RequestBody,
355
+ config?: AxiosRequestConfig
356
+ ): OperationResponse<Paths.ExecuteFlowsQuery.Responses.$200>
284
357
  }
285
358
 
286
359
  export interface PathsDictionary {
@@ -340,6 +413,31 @@ export interface PathsDictionary {
340
413
  config?: AxiosRequestConfig
341
414
  ): OperationResponse<Paths.DeleteKanbanBoard.Responses.$200>
342
415
  }
416
+ ['/v1/kanban/query/flows:autocomplete']: {
417
+ /**
418
+ * flowsAutocomplete - flowsAutocomplete
419
+ *
420
+ * Autocomplete flows data
421
+ *
422
+ */
423
+ 'get'(
424
+ parameters?: Parameters<Paths.FlowsAutocomplete.QueryParameters> | null,
425
+ data?: any,
426
+ config?: AxiosRequestConfig
427
+ ): OperationResponse<Paths.FlowsAutocomplete.Responses.$200>
428
+ }
429
+ ['/v1/kanban/query/flows:execute']: {
430
+ /**
431
+ * executeFlowsQuery - executeFlowsQuery
432
+ *
433
+ * Query Flows Data for Kanban View.
434
+ */
435
+ 'post'(
436
+ parameters?: Parameters<UnknownParamsObject> | null,
437
+ data?: Paths.ExecuteFlowsQuery.RequestBody,
438
+ config?: AxiosRequestConfig
439
+ ): OperationResponse<Paths.ExecuteFlowsQuery.Responses.$200>
440
+ }
343
441
  }
344
442
 
345
443
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -351,6 +449,8 @@ export type BoardSummary = Components.Schemas.BoardSummary;
351
449
  export type FilterGroup = Components.Schemas.FilterGroup;
352
450
  export type FilterItem = Components.Schemas.FilterItem;
353
451
  export type FilterOperator = Components.Schemas.FilterOperator;
452
+ export type FlowsQueryRequest = Components.Schemas.FlowsQueryRequest;
453
+ export type FlowsQueryResult = Components.Schemas.FlowsQueryResult;
354
454
  export type Sorting = Components.Schemas.Sorting;
355
455
  export type Swimlane = Components.Schemas.Swimlane;
356
456
  export type ValueType = Components.Schemas.ValueType;
package/dist/openapi.json CHANGED
@@ -225,6 +225,112 @@
225
225
  }
226
226
  }
227
227
  }
228
+ },
229
+ "/v1/kanban/query/flows:autocomplete": {
230
+ "get": {
231
+ "operationId": "flowsAutocomplete",
232
+ "summary": "flowsAutocomplete",
233
+ "description": "Autocomplete flows data\n",
234
+ "tags": [
235
+ "Query"
236
+ ],
237
+ "parameters": [
238
+ {
239
+ "name": "input",
240
+ "in": "query",
241
+ "description": "Input to autocomplete",
242
+ "schema": {
243
+ "type": "string"
244
+ }
245
+ },
246
+ {
247
+ "name": "attribute",
248
+ "in": "query",
249
+ "description": "Autocomplete attribute",
250
+ "schema": {
251
+ "type": "string",
252
+ "example": "name"
253
+ },
254
+ "required": true
255
+ },
256
+ {
257
+ "name": "size",
258
+ "in": "query",
259
+ "description": "Maximum number of results to return",
260
+ "schema": {
261
+ "type": "integer",
262
+ "default": 25,
263
+ "minimum": 1,
264
+ "maximum": 250
265
+ }
266
+ }
267
+ ],
268
+ "responses": {
269
+ "200": {
270
+ "description": "Success",
271
+ "content": {
272
+ "application/json": {
273
+ "schema": {
274
+ "type": "object",
275
+ "properties": {
276
+ "results": {
277
+ "type": "array",
278
+ "items": {
279
+ "anyOf": [
280
+ {
281
+ "type": "string"
282
+ },
283
+ {
284
+ "type": "boolean"
285
+ },
286
+ {
287
+ "type": "object",
288
+ "additionalProperties": true
289
+ }
290
+ ]
291
+ },
292
+ "example": [
293
+ "value"
294
+ ]
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "/v1/kanban/query/flows:execute": {
305
+ "post": {
306
+ "operationId": "executeFlowsQuery",
307
+ "summary": "executeFlowsQuery",
308
+ "description": "Query Flows Data for Kanban View.",
309
+ "tags": [
310
+ "Query"
311
+ ],
312
+ "requestBody": {
313
+ "content": {
314
+ "application/json": {
315
+ "schema": {
316
+ "$ref": "#/components/schemas/FlowsQueryRequest"
317
+ }
318
+ }
319
+ }
320
+ },
321
+ "responses": {
322
+ "200": {
323
+ "description": "Query results",
324
+ "content": {
325
+ "application/json": {
326
+ "schema": {
327
+ "$ref": "#/components/schemas/FlowsQueryResult"
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+ }
228
334
  }
229
335
  },
230
336
  "components": {
@@ -234,12 +340,6 @@
234
340
  "scheme": "bearer",
235
341
  "description": "Authorization header with epilot OAuth2 bearer token",
236
342
  "bearerFormat": "JWT"
237
- },
238
- "EpilotPublicAuth": {
239
- "type": "http",
240
- "scheme": "bearer",
241
- "description": "Authorization header with epilot public access token",
242
- "bearerFormat": "JWT"
243
343
  }
244
344
  },
245
345
  "schemas": {
@@ -360,7 +460,7 @@
360
460
  "properties": {
361
461
  "field": {
362
462
  "type": "string",
363
- "example": "createdAt"
463
+ "example": "created_at"
364
464
  },
365
465
  "direction": {
366
466
  "type": "string",
@@ -486,6 +586,41 @@
486
586
  ],
487
587
  "description": "The value to compare against - can be a single value (string, number, boolean) or an array of values"
488
588
  },
589
+ "FlowsQueryRequest": {
590
+ "type": "object",
591
+ "properties": {
592
+ "filters": {
593
+ "$ref": "#/components/schemas/BoardFilter"
594
+ },
595
+ "sorting": {
596
+ "$ref": "#/components/schemas/Sorting"
597
+ },
598
+ "from": {
599
+ "type": "number",
600
+ "default": 0
601
+ },
602
+ "size": {
603
+ "type": "number",
604
+ "default": 10
605
+ }
606
+ }
607
+ },
608
+ "FlowsQueryResult": {
609
+ "type": "object",
610
+ "properties": {
611
+ "results": {
612
+ "type": "array",
613
+ "items": {
614
+ "type": "object",
615
+ "additionalProperties": true
616
+ }
617
+ },
618
+ "hits": {
619
+ "type": "number"
620
+ }
621
+ },
622
+ "additionalProperties": true
623
+ },
489
624
  "FilterItem": {
490
625
  "type": "object",
491
626
  "properties": {
@@ -519,10 +654,5 @@
519
654
  ]
520
655
  }
521
656
  }
522
- },
523
- "servers": [
524
- {
525
- "url": "https://kanban.sls.epilot.io"
526
- }
527
- ]
657
+ }
528
658
  }
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.3",
4
4
  "description": "Client library for epilot Kanban API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,13 +25,13 @@
25
25
  "test": "jest",
26
26
  "typescript": "tsc",
27
27
  "bundle-definition": "webpack",
28
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/kanban.yaml",
28
+ "openapi": "node ../../scripts/update-openapi.js /Users/sureshs/workspace/kanban-api/lambda/ApiHandlerFunction/openapi.yml",
29
29
  "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
30
30
  "build": "tsc && npm run build:patch && npm run bundle-definition",
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",