@orchesty/connector-productboard 1.0.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +190 -0
  3. package/coverage/clover.xml +119 -0
  4. package/coverage/coverage-final.json +6 -0
  5. package/coverage/lcov-report/base.css +224 -0
  6. package/coverage/lcov-report/block-navigation.js +87 -0
  7. package/coverage/lcov-report/favicon.png +0 -0
  8. package/coverage/lcov-report/index.html +161 -0
  9. package/coverage/lcov-report/prettify.css +1 -0
  10. package/coverage/lcov-report/prettify.js +2 -0
  11. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  12. package/coverage/lcov-report/sorter.js +210 -0
  13. package/coverage/lcov-report/src/Batch/ProductboardListAllFeaturesBatch.ts.html +301 -0
  14. package/coverage/lcov-report/src/Batch/ProductboardListAllProductsBatch.ts.html +259 -0
  15. package/coverage/lcov-report/src/Batch/index.html +131 -0
  16. package/coverage/lcov-report/src/Connector/ProductboardCreateNewFeatureConnector.ts.html +391 -0
  17. package/coverage/lcov-report/src/Connector/index.html +116 -0
  18. package/coverage/lcov-report/src/ProductboardApplication.ts.html +274 -0
  19. package/coverage/lcov-report/src/index.html +116 -0
  20. package/coverage/lcov-report/test/dataProvider.ts.html +202 -0
  21. package/coverage/lcov-report/test/index.html +116 -0
  22. package/coverage/lcov.info +169 -0
  23. package/dist/Batch/ProductboardListAllFeaturesBatch.d.ts +38 -0
  24. package/dist/Batch/ProductboardListAllFeaturesBatch.js +28 -0
  25. package/dist/Batch/ProductboardListAllProductsBatch.d.ts +24 -0
  26. package/dist/Batch/ProductboardListAllProductsBatch.js +28 -0
  27. package/dist/Connector/ProductboardCreateNewFeatureConnector.d.ts +83 -0
  28. package/dist/Connector/ProductboardCreateNewFeatureConnector.js +23 -0
  29. package/dist/ProductboardApplication.d.ts +17 -0
  30. package/dist/ProductboardApplication.js +83 -0
  31. package/dist/package.json +22 -0
  32. package/jest.config.js +13 -0
  33. package/package.json +22 -0
  34. package/src/Batch/ProductboardListAllFeaturesBatch.ts +72 -0
  35. package/src/Batch/ProductboardListAllProductsBatch.ts +58 -0
  36. package/src/Batch/__tests__/Data/ProductboardListAllFeaturesBatch/input.json +6 -0
  37. package/src/Batch/__tests__/Data/ProductboardListAllFeaturesBatch/mock.json +42 -0
  38. package/src/Batch/__tests__/Data/ProductboardListAllFeaturesBatch/output.json +11 -0
  39. package/src/Batch/__tests__/Data/ProductboardListAllProductsBatch/input.json +6 -0
  40. package/src/Batch/__tests__/Data/ProductboardListAllProductsBatch/mock.json +23 -0
  41. package/src/Batch/__tests__/Data/ProductboardListAllProductsBatch/output.json +11 -0
  42. package/src/Batch/__tests__/ProductboardListAllFeaturesBatch.ts +17 -0
  43. package/src/Batch/__tests__/ProductboardListAllProductsBatch.ts +17 -0
  44. package/src/Connector/ProductboardCreateNewFeatureConnector.ts +102 -0
  45. package/src/Connector/__tests__/Data/ProductboardCreateNewFeatureConnector/input.json +28 -0
  46. package/src/Connector/__tests__/Data/ProductboardCreateNewFeatureConnector/mock.json +35 -0
  47. package/src/Connector/__tests__/Data/ProductboardCreateNewFeatureConnector/output.json +37 -0
  48. package/src/Connector/__tests__/ProductboardCreateNewFeatureConnector.ts +17 -0
  49. package/src/ProductboardApplication.ts +63 -0
  50. package/test/dataProvider.ts +39 -0
  51. package/tsconfig.json +8 -0
  52. package/tsconfig.prod.json +13 -0
  53. package/tsconfig.prod.tsbuildinfo +1 -0
@@ -0,0 +1,116 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for test</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="../prettify.css" />
9
+ <link rel="stylesheet" href="../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(../sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="../index.html">All files</a> test</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">100% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>21/21</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">100% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>0/0</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">100% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>1/1</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">100% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>21/21</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line high'></div>
65
+ <div class="pad1">
66
+ <table class="coverage-summary">
67
+ <thead>
68
+ <tr>
69
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
70
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
71
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
72
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
73
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
74
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
75
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
76
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
77
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
78
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
79
+ </tr>
80
+ </thead>
81
+ <tbody><tr>
82
+ <td class="file high" data-value="dataProvider.ts"><a href="dataProvider.ts.html">dataProvider.ts</a></td>
83
+ <td data-value="100" class="pic high">
84
+ <div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
85
+ </td>
86
+ <td data-value="100" class="pct high">100%</td>
87
+ <td data-value="21" class="abs high">21/21</td>
88
+ <td data-value="100" class="pct high">100%</td>
89
+ <td data-value="0" class="abs high">0/0</td>
90
+ <td data-value="100" class="pct high">100%</td>
91
+ <td data-value="1" class="abs high">1/1</td>
92
+ <td data-value="100" class="pct high">100%</td>
93
+ <td data-value="21" class="abs high">21/21</td>
94
+ </tr>
95
+
96
+ </tbody>
97
+ </table>
98
+ </div>
99
+ <div class='push'></div><!-- for sticky footer -->
100
+ </div><!-- /wrapper -->
101
+ <div class='footer quiet pad2 space-top1 center small'>
102
+ Code coverage generated by
103
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
+ at 2026-01-15T09:49:52.723Z
105
+ </div>
106
+ <script src="../prettify.js"></script>
107
+ <script>
108
+ window.onload = function () {
109
+ prettyPrint();
110
+ };
111
+ </script>
112
+ <script src="../sorter.js"></script>
113
+ <script src="../block-navigation.js"></script>
114
+ </body>
115
+ </html>
116
+
@@ -0,0 +1,169 @@
1
+ TN:
2
+ SF:src/ProductboardApplication.ts
3
+ FN:18,(anonymous_10)
4
+ FN:22,(anonymous_11)
5
+ FN:26,(anonymous_12)
6
+ FN:30,(anonymous_13)
7
+ FN:34,(anonymous_14)
8
+ FN:56,(anonymous_15)
9
+ FNF:6
10
+ FNH:2
11
+ FNDA:6,(anonymous_10)
12
+ FNDA:0,(anonymous_11)
13
+ FNDA:0,(anonymous_12)
14
+ FNDA:0,(anonymous_13)
15
+ FNDA:3,(anonymous_14)
16
+ FNDA:0,(anonymous_15)
17
+ DA:1,3
18
+ DA:3,3
19
+ DA:4,3
20
+ DA:5,3
21
+ DA:6,3
22
+ DA:7,3
23
+ DA:8,3
24
+ DA:11,3
25
+ DA:13,3
26
+ DA:14,3
27
+ DA:15,3
28
+ DA:16,3
29
+ DA:19,6
30
+ DA:23,0
31
+ DA:27,0
32
+ DA:31,0
33
+ DA:41,3
34
+ DA:42,3
35
+ DA:43,3
36
+ DA:49,3
37
+ DA:50,1
38
+ DA:53,3
39
+ DA:57,0
40
+ DA:60,0
41
+ LF:24
42
+ LH:19
43
+ BRDA:42,0,0,3
44
+ BRDA:42,0,1,0
45
+ BRDA:49,1,0,1
46
+ BRDA:49,1,1,2
47
+ BRF:4
48
+ BRH:3
49
+ end_of_record
50
+ TN:
51
+ SF:src/Batch/ProductboardListAllFeaturesBatch.ts
52
+ FN:9,(anonymous_1)
53
+ FN:13,(anonymous_2)
54
+ FNF:2
55
+ FNH:2
56
+ FNDA:3,(anonymous_1)
57
+ FNDA:1,(anonymous_2)
58
+ DA:1,3
59
+ DA:2,3
60
+ DA:4,3
61
+ DA:6,3
62
+ DA:7,3
63
+ DA:10,3
64
+ DA:14,1
65
+ DA:15,1
66
+ DA:16,1
67
+ DA:22,1
68
+ DA:23,1
69
+ DA:25,1
70
+ DA:26,1
71
+ DA:27,0
72
+ DA:30,1
73
+ LF:15
74
+ LH:14
75
+ BRDA:25,0,0,1
76
+ BRDA:25,0,1,0
77
+ BRDA:26,1,0,0
78
+ BRDA:26,1,1,1
79
+ BRF:4
80
+ BRH:2
81
+ end_of_record
82
+ TN:
83
+ SF:src/Batch/ProductboardListAllProductsBatch.ts
84
+ FN:9,(anonymous_1)
85
+ FN:13,(anonymous_2)
86
+ FNF:2
87
+ FNH:2
88
+ FNDA:3,(anonymous_1)
89
+ FNDA:1,(anonymous_2)
90
+ DA:1,3
91
+ DA:2,3
92
+ DA:4,3
93
+ DA:6,3
94
+ DA:7,3
95
+ DA:10,3
96
+ DA:14,1
97
+ DA:15,1
98
+ DA:16,1
99
+ DA:22,1
100
+ DA:23,1
101
+ DA:25,1
102
+ DA:26,1
103
+ DA:27,0
104
+ DA:30,1
105
+ LF:15
106
+ LH:14
107
+ BRDA:25,0,0,1
108
+ BRDA:25,0,1,0
109
+ BRDA:26,1,0,0
110
+ BRDA:26,1,1,1
111
+ BRF:4
112
+ BRH:2
113
+ end_of_record
114
+ TN:
115
+ SF:src/Connector/ProductboardCreateNewFeatureConnector.ts
116
+ FN:9,(anonymous_1)
117
+ FN:13,(anonymous_2)
118
+ FNF:2
119
+ FNH:2
120
+ FNDA:3,(anonymous_1)
121
+ FNDA:1,(anonymous_2)
122
+ DA:1,3
123
+ DA:2,3
124
+ DA:5,3
125
+ DA:7,3
126
+ DA:10,3
127
+ DA:14,1
128
+ DA:16,1
129
+ DA:17,1
130
+ DA:18,1
131
+ DA:19,1
132
+ DA:21,1
133
+ LF:11
134
+ LH:11
135
+ BRF:0
136
+ BRH:0
137
+ end_of_record
138
+ TN:
139
+ SF:test/dataProvider.ts
140
+ FN:11,init
141
+ FNF:1
142
+ FNH:1
143
+ FNDA:3,init
144
+ DA:1,3
145
+ DA:2,3
146
+ DA:3,3
147
+ DA:4,3
148
+ DA:5,3
149
+ DA:6,3
150
+ DA:7,3
151
+ DA:9,3
152
+ DA:11,3
153
+ DA:12,3
154
+ DA:17,3
155
+ DA:18,3
156
+ DA:20,3
157
+ DA:21,3
158
+ DA:22,3
159
+ DA:24,3
160
+ DA:28,3
161
+ DA:29,3
162
+ DA:33,3
163
+ DA:34,3
164
+ DA:38,3
165
+ LF:21
166
+ LH:21
167
+ BRF:0
168
+ BRH:0
169
+ end_of_record
@@ -0,0 +1,38 @@
1
+ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
2
+ import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
3
+ export declare const NAME = "productboard-list-all-features-batch";
4
+ export default class ProductboardListAllFeaturesBatch extends ABatchNode {
5
+ getName(): string;
6
+ processAction(dto: BatchProcessDto): Promise<BatchProcessDto>;
7
+ }
8
+ export interface IOutput {
9
+ id: string;
10
+ name: string;
11
+ description: string;
12
+ type: string;
13
+ archived: boolean;
14
+ status: {
15
+ id: string;
16
+ name: string;
17
+ };
18
+ parent: {
19
+ feature: {
20
+ id: string;
21
+ links: {
22
+ self: string;
23
+ };
24
+ };
25
+ };
26
+ links: {
27
+ self: string;
28
+ html: string;
29
+ };
30
+ timeframe: {
31
+ startDate: string;
32
+ endDate: string;
33
+ granularity: string;
34
+ };
35
+ owner: {
36
+ email: string;
37
+ };
38
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NAME = void 0;
7
+ const ABatchNode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode"));
8
+ const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
9
+ const ProductboardApplication_1 = require("../ProductboardApplication");
10
+ exports.NAME = 'productboard-list-all-features-batch';
11
+ class ProductboardListAllFeaturesBatch extends ABatchNode_1.default {
12
+ getName() {
13
+ return exports.NAME;
14
+ }
15
+ async processAction(dto) {
16
+ const appInstall = await this.getApplicationInstallFromProcess(dto);
17
+ const url = dto.getBatchCursor('features?pageLimit=100&pageOffset=0');
18
+ const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.GET, url);
19
+ const resp = await this.getSender().send(req, [200]);
20
+ const response = resp.getJsonBody();
21
+ dto.setItemList(response.data ?? []);
22
+ if (response.links.next) {
23
+ dto.setBatchCursor(response.links.next.replace(`${ProductboardApplication_1.BASE_URL}/`, ''));
24
+ }
25
+ return dto;
26
+ }
27
+ }
28
+ exports.default = ProductboardListAllFeaturesBatch;
@@ -0,0 +1,24 @@
1
+ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
2
+ import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
3
+ export declare const NAME = "productboard-list-all-products-batch";
4
+ export default class ProductboardListAllProductsBatch extends ABatchNode {
5
+ getName(): string;
6
+ processAction(dto: BatchProcessDto): Promise<BatchProcessDto>;
7
+ }
8
+ export interface IOutput {
9
+ data: {
10
+ id: string;
11
+ name: string;
12
+ description: string;
13
+ owner: {
14
+ email: string;
15
+ };
16
+ links: {
17
+ self: string;
18
+ html: string;
19
+ };
20
+ }[];
21
+ links: {
22
+ next: string;
23
+ };
24
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NAME = void 0;
7
+ const ABatchNode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode"));
8
+ const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
9
+ const ProductboardApplication_1 = require("../ProductboardApplication");
10
+ exports.NAME = 'productboard-list-all-products-batch';
11
+ class ProductboardListAllProductsBatch extends ABatchNode_1.default {
12
+ getName() {
13
+ return exports.NAME;
14
+ }
15
+ async processAction(dto) {
16
+ const appInstall = await this.getApplicationInstallFromProcess(dto);
17
+ const url = dto.getBatchCursor('products?pageLimit=100&pageOffset=0');
18
+ const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.GET, url);
19
+ const resp = await this.getSender().send(req, [200]);
20
+ const response = resp.getJsonBody();
21
+ dto.setItemList(response.data ?? []);
22
+ if (response.links.next) {
23
+ dto.setBatchCursor(response.links.next.replace(`${ProductboardApplication_1.BASE_URL}/`, ''));
24
+ }
25
+ return dto;
26
+ }
27
+ }
28
+ exports.default = ProductboardListAllProductsBatch;
@@ -0,0 +1,83 @@
1
+ import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
2
+ import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
3
+ export declare const NAME = "productboard-create-new-feature-connector";
4
+ export default class ProductboardCreateNewFeatureConnector extends AConnector {
5
+ getName(): string;
6
+ processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
7
+ }
8
+ export interface IInput {
9
+ data: {
10
+ name: string;
11
+ description: string;
12
+ type: 'feature' | 'subfeature';
13
+ status: {
14
+ id: string;
15
+ name: string;
16
+ };
17
+ parent: {
18
+ feature?: {
19
+ id: string;
20
+ };
21
+ product?: {
22
+ id: string;
23
+ };
24
+ component?: {
25
+ id: string;
26
+ };
27
+ };
28
+ archived: boolean;
29
+ timeframe: {
30
+ startDate: string;
31
+ endDate: string;
32
+ granularity: string;
33
+ };
34
+ owner?: {
35
+ email: string;
36
+ };
37
+ };
38
+ }
39
+ export interface IOutput {
40
+ data: {
41
+ id: string;
42
+ name: string;
43
+ description: string;
44
+ type: string;
45
+ archived: boolean;
46
+ status: {
47
+ id: string;
48
+ name: string;
49
+ };
50
+ parent: {
51
+ feature?: {
52
+ id: string;
53
+ links: {
54
+ self: string;
55
+ };
56
+ };
57
+ product?: {
58
+ id: string;
59
+ links: {
60
+ self: string;
61
+ };
62
+ };
63
+ component?: {
64
+ id: string;
65
+ links: {
66
+ self: string;
67
+ };
68
+ };
69
+ };
70
+ links: {
71
+ self: string;
72
+ html: string;
73
+ };
74
+ timeframe: {
75
+ startDate: string;
76
+ endDate: string;
77
+ granularity: string;
78
+ };
79
+ owner?: {
80
+ email: string;
81
+ };
82
+ };
83
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NAME = void 0;
7
+ const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
8
+ const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
9
+ exports.NAME = 'productboard-create-new-feature-connector';
10
+ class ProductboardCreateNewFeatureConnector extends AConnector_1.default {
11
+ getName() {
12
+ return exports.NAME;
13
+ }
14
+ async processAction(dto) {
15
+ const body = dto.getJsonData();
16
+ const appInstall = await this.getApplicationInstallFromProcess(dto);
17
+ const url = 'features';
18
+ const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.POST, url, body);
19
+ const resp = await this.getSender().send(req, [200]);
20
+ return dto.setNewJsonData(resp.getJsonBody());
21
+ }
22
+ }
23
+ exports.default = ProductboardCreateNewFeatureConnector;
@@ -0,0 +1,17 @@
1
+ import { ApplicationInstall } from '@orchesty/nodejs-sdk/dist/lib/Application/Database/ApplicationInstall';
2
+ import FormStack from '@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack';
3
+ import { ABasicApplication } from '@orchesty/nodejs-sdk/dist/lib/Authorization/Type/Basic/ABasicApplication';
4
+ import RequestDto from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto';
5
+ import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
6
+ import AProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/AProcessDto';
7
+ export declare const NAME = "productboard";
8
+ export declare const TOKEN = "token";
9
+ export declare const BASE_URL = "https://api.productboard.com";
10
+ export default class ProductboardApplication extends ABasicApplication {
11
+ getName(): string;
12
+ getPublicName(): string;
13
+ getDescription(): string;
14
+ getLogo(): string;
15
+ getRequestDto(dto: AProcessDto, applicationInstall: ApplicationInstall, method: HttpMethods, _url?: string, data?: unknown): RequestDto;
16
+ getFormStack(): FormStack;
17
+ }
@@ -0,0 +1,83 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.BASE_URL = exports.TOKEN = exports.NAME = void 0;
40
+ const CoreFormsEnum_1 = __importStar(require("@orchesty/nodejs-sdk/dist/lib/Application/Base/CoreFormsEnum"));
41
+ const Field_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Field"));
42
+ const FieldType_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FieldType"));
43
+ const Form_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/Form"));
44
+ const FormStack_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Model/Form/FormStack"));
45
+ const ABasicApplication_1 = require("@orchesty/nodejs-sdk/dist/lib/Authorization/Type/Basic/ABasicApplication");
46
+ const RequestDto_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Transport/Curl/RequestDto"));
47
+ const Headers_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Headers");
48
+ exports.NAME = 'productboard';
49
+ exports.TOKEN = 'token';
50
+ exports.BASE_URL = 'https://api.productboard.com';
51
+ class ProductboardApplication extends ABasicApplication_1.ABasicApplication {
52
+ getName() {
53
+ return exports.NAME;
54
+ }
55
+ getPublicName() {
56
+ return 'Productboard';
57
+ }
58
+ getDescription() {
59
+ return 'Customer-driven product management system that empowers teams to get the right products to market, faster';
60
+ }
61
+ getLogo() {
62
+ return 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI1LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IlZyc3R2YV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAwIDEwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiNGRjI2Mzg7fQoJLnN0MXtmaWxsOiNGRkM2MDA7fQoJLnN0MntmaWxsOiMwMDc5RjI7fQo8L3N0eWxlPgo8Zz4KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMzMuMyw1MCA2Ni43LDgyLjggMCw4Mi44IAkiLz4KCTxwb2x5Z29uIGNsYXNzPSJzdDEiIHBvaW50cz0iMCwxNy4yIDMzLjMsNTAgNjYuNywxNy4yIAkiLz4KCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMzMuMyw1MCA2Ni43LDgyLjggMTAwLDUwIDY2LjcsMTcuMiAJIi8+CjwvZz4KPC9zdmc+Cg==';
63
+ }
64
+ getRequestDto(dto, applicationInstall, method, _url, data) {
65
+ const url = `${exports.BASE_URL}/${_url}`;
66
+ const request = new RequestDto_1.default(url ?? '', method, dto);
67
+ request.setHeaders({
68
+ [Headers_1.CommonHeaders.CONTENT_TYPE]: Headers_1.JSON_TYPE,
69
+ [Headers_1.CommonHeaders.ACCEPT]: Headers_1.JSON_TYPE,
70
+ [Headers_1.CommonHeaders.AUTHORIZATION]: `Bearer ${applicationInstall.getSettings()[CoreFormsEnum_1.default.AUTHORIZATION_FORM][exports.TOKEN]}`,
71
+ });
72
+ if (data) {
73
+ request.setJsonBody(data);
74
+ }
75
+ return request;
76
+ }
77
+ getFormStack() {
78
+ const form = new Form_1.default(CoreFormsEnum_1.default.AUTHORIZATION_FORM, (0, CoreFormsEnum_1.getFormName)(CoreFormsEnum_1.default.AUTHORIZATION_FORM))
79
+ .addField(new Field_1.default(FieldType_1.default.TEXT, exports.TOKEN, ' Token', undefined, true));
80
+ return new FormStack_1.default().addForm(form);
81
+ }
82
+ }
83
+ exports.default = ProductboardApplication;
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@orchesty/connector-productboard",
3
+ "description": "",
4
+ "version": "0.0.0",
5
+ "license": "Apache-2.0",
6
+ "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
+ "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
8
+ "scripts": {
9
+ "build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
10
+ "test": "jest --coverage --forceExit --passWithNoTests",
11
+ "lint": "eslint src test --fix",
12
+ "lint-ci": "eslint src test"
13
+ },
14
+ "keywords": [],
15
+ "author": "info@hanaboso.com",
16
+ "dependencies": {
17
+ "@orchesty/nodejs-sdk": "^4.3.6"
18
+ },
19
+ "engines": {
20
+ "node": ">=24"
21
+ }
22
+ }
package/jest.config.js ADDED
@@ -0,0 +1,13 @@
1
+ const baseConfig = require('../../jest.config.js');
2
+
3
+ module.exports = {
4
+ ...baseConfig,
5
+ roots: ["<rootDir>/src"],
6
+ setupFiles: ["<rootDir>/../../.jest/testEnvs.ts"],
7
+ setupFilesAfterEnv: ["<rootDir>/../../.jest/testLifecycle.ts"],
8
+ globalSetup: "<rootDir>/../../.jest/globalSetup.ts",
9
+ moduleNameMapper: {
10
+ "^@orchesty/nodejs-connectors/test/(.*)$": "<rootDir>/../../test/$1",
11
+ "^@orchesty/nodejs-connectors/lib/(.*)$": "<rootDir>/../../lib/$1",
12
+ },
13
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@orchesty/connector-productboard",
3
+ "description": "",
4
+ "version": "1.0.0",
5
+ "license": "Apache-2.0",
6
+ "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
+ "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
8
+ "keywords": [],
9
+ "author": "info@hanaboso.com",
10
+ "dependencies": {
11
+ "@orchesty/nodejs-sdk": "^4.3.6"
12
+ },
13
+ "engines": {
14
+ "node": ">=24"
15
+ },
16
+ "scripts": {
17
+ "build": "rm -rf dist && rm -rf tsconfig.prod.tsbuildinfo && tsc -d -p tsconfig.prod.json && cp package.json ./dist/package.json",
18
+ "test": "jest --coverage --forceExit --passWithNoTests",
19
+ "lint": "eslint src test --fix",
20
+ "lint-ci": "eslint src test"
21
+ }
22
+ }