@activepieces/piece-jira-data-center 0.0.1

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 (89) hide show
  1. package/package.json +19 -0
  2. package/src/auth.d.ts +7 -0
  3. package/src/auth.d.ts.map +1 -0
  4. package/src/auth.js +59 -0
  5. package/src/auth.js.map +1 -0
  6. package/src/index.d.ts +5 -0
  7. package/src/index.d.ts.map +1 -0
  8. package/src/index.js +64 -0
  9. package/src/index.js.map +1 -0
  10. package/src/lib/actions/add-attachment-to-issue.d.ts +21 -0
  11. package/src/lib/actions/add-attachment-to-issue.d.ts.map +1 -0
  12. package/src/lib/actions/add-attachment-to-issue.js +41 -0
  13. package/src/lib/actions/add-attachment-to-issue.js.map +1 -0
  14. package/src/lib/actions/add-comment-to-issue.d.ts +21 -0
  15. package/src/lib/actions/add-comment-to-issue.d.ts.map +1 -0
  16. package/src/lib/actions/add-comment-to-issue.js +38 -0
  17. package/src/lib/actions/add-comment-to-issue.js.map +1 -0
  18. package/src/lib/actions/add-watcher-to-issue.d.ts +20 -0
  19. package/src/lib/actions/add-watcher-to-issue.d.ts.map +1 -0
  20. package/src/lib/actions/add-watcher-to-issue.js +48 -0
  21. package/src/lib/actions/add-watcher-to-issue.js.map +1 -0
  22. package/src/lib/actions/assign-issue.d.ts +27 -0
  23. package/src/lib/actions/assign-issue.d.ts.map +1 -0
  24. package/src/lib/actions/assign-issue.js +39 -0
  25. package/src/lib/actions/assign-issue.js.map +1 -0
  26. package/src/lib/actions/create-issue.d.ts +24 -0
  27. package/src/lib/actions/create-issue.d.ts.map +1 -0
  28. package/src/lib/actions/create-issue.js +110 -0
  29. package/src/lib/actions/create-issue.js.map +1 -0
  30. package/src/lib/actions/delete-issue-comment.d.ts +24 -0
  31. package/src/lib/actions/delete-issue-comment.d.ts.map +1 -0
  32. package/src/lib/actions/delete-issue-comment.js +64 -0
  33. package/src/lib/actions/delete-issue-comment.js.map +1 -0
  34. package/src/lib/actions/find-user.d.ts +7 -0
  35. package/src/lib/actions/find-user.d.ts.map +1 -0
  36. package/src/lib/actions/find-user.js +37 -0
  37. package/src/lib/actions/find-user.js.map +1 -0
  38. package/src/lib/actions/get-issue-attachment.d.ts +7 -0
  39. package/src/lib/actions/get-issue-attachment.d.ts.map +1 -0
  40. package/src/lib/actions/get-issue-attachment.js +46 -0
  41. package/src/lib/actions/get-issue-attachment.js.map +1 -0
  42. package/src/lib/actions/get-issue.d.ts +23 -0
  43. package/src/lib/actions/get-issue.d.ts.map +1 -0
  44. package/src/lib/actions/get-issue.js +136 -0
  45. package/src/lib/actions/get-issue.js.map +1 -0
  46. package/src/lib/actions/link-issues.d.ts +27 -0
  47. package/src/lib/actions/link-issues.d.ts.map +1 -0
  48. package/src/lib/actions/link-issues.js +52 -0
  49. package/src/lib/actions/link-issues.js.map +1 -0
  50. package/src/lib/actions/list-issue-comments.d.ts +22 -0
  51. package/src/lib/actions/list-issue-comments.d.ts.map +1 -0
  52. package/src/lib/actions/list-issue-comments.js +59 -0
  53. package/src/lib/actions/list-issue-comments.js.map +1 -0
  54. package/src/lib/actions/search-issues.d.ts +8 -0
  55. package/src/lib/actions/search-issues.d.ts.map +1 -0
  56. package/src/lib/actions/search-issues.js +40 -0
  57. package/src/lib/actions/search-issues.js.map +1 -0
  58. package/src/lib/actions/update-issue-comment.d.ts +25 -0
  59. package/src/lib/actions/update-issue-comment.d.ts.map +1 -0
  60. package/src/lib/actions/update-issue-comment.js +71 -0
  61. package/src/lib/actions/update-issue-comment.js.map +1 -0
  62. package/src/lib/actions/update-issue.d.ts +24 -0
  63. package/src/lib/actions/update-issue.d.ts.map +1 -0
  64. package/src/lib/actions/update-issue.js +122 -0
  65. package/src/lib/actions/update-issue.js.map +1 -0
  66. package/src/lib/common/index.d.ts +74 -0
  67. package/src/lib/common/index.d.ts.map +1 -0
  68. package/src/lib/common/index.js +197 -0
  69. package/src/lib/common/index.js.map +1 -0
  70. package/src/lib/common/props.d.ts +80 -0
  71. package/src/lib/common/props.d.ts.map +1 -0
  72. package/src/lib/common/props.js +572 -0
  73. package/src/lib/common/props.js.map +1 -0
  74. package/src/lib/common/types.d.ts +23 -0
  75. package/src/lib/common/types.d.ts.map +1 -0
  76. package/src/lib/common/types.js +25 -0
  77. package/src/lib/common/types.js.map +1 -0
  78. package/src/lib/triggers/new-issue.d.ts +23 -0
  79. package/src/lib/triggers/new-issue.d.ts.map +1 -0
  80. package/src/lib/triggers/new-issue.js +61 -0
  81. package/src/lib/triggers/new-issue.js.map +1 -0
  82. package/src/lib/triggers/updated-issue-status.d.ts +23 -0
  83. package/src/lib/triggers/updated-issue-status.d.ts.map +1 -0
  84. package/src/lib/triggers/updated-issue-status.js +61 -0
  85. package/src/lib/triggers/updated-issue-status.js.map +1 -0
  86. package/src/lib/triggers/updated-issue.d.ts +23 -0
  87. package/src/lib/triggers/updated-issue.d.ts.map +1 -0
  88. package/src/lib/triggers/updated-issue.js +61 -0
  89. package/src/lib/triggers/updated-issue.js.map +1 -0
@@ -0,0 +1,24 @@
1
+ export declare const deleteIssueCommentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ projectId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ issueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
16
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
17
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
18
+ }>>;
19
+ commentId: import("@activepieces/pieces-framework").DropdownProperty<any, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
20
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
21
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
22
+ }>>;
23
+ }>;
24
+ //# sourceMappingURL=delete-issue-comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-issue-comment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-issue-comment.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;EAmDnC,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteIssueCommentAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ const common_1 = require("../common");
9
+ const props_1 = require("../common/props");
10
+ exports.deleteIssueCommentAction = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.jiraDataCenterAuth,
12
+ name: 'delete_issue_comment',
13
+ displayName: 'Delete Issue Comment',
14
+ description: 'Deletes a comment on a specific issue.',
15
+ props: {
16
+ projectId: (0, props_1.getProjectIdDropdown)(),
17
+ issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
18
+ commentId: pieces_framework_1.Property.Dropdown({
19
+ auth: auth_1.jiraDataCenterAuth,
20
+ displayName: 'Comment ID',
21
+ refreshers: ['issueId'],
22
+ required: true,
23
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, issueId }) {
24
+ if (!auth || !issueId) {
25
+ return {
26
+ disabled: true,
27
+ placeholder: 'Please connect your account and select issue.',
28
+ options: [],
29
+ };
30
+ }
31
+ const response = yield (0, common_1.sendJiraRequest)({
32
+ method: pieces_common_1.HttpMethod.GET,
33
+ url: `issue/${issueId}/comment`,
34
+ auth: auth,
35
+ queryParams: {
36
+ orderBy: '-created',
37
+ },
38
+ });
39
+ return {
40
+ disabled: false,
41
+ options: response.body.comments.map((comment) => {
42
+ var _a, _b;
43
+ return {
44
+ label: (_b = (_a = comment.body) === null || _a === void 0 ? void 0 : _a.substring(0, 100)) !== null && _b !== void 0 ? _b : comment.id,
45
+ value: comment.id,
46
+ };
47
+ }),
48
+ };
49
+ }),
50
+ }),
51
+ },
52
+ run(context) {
53
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
+ const { issueId, commentId } = context.propsValue;
55
+ const response = yield (0, common_1.sendJiraRequest)({
56
+ method: pieces_common_1.HttpMethod.DELETE,
57
+ url: `issue/${issueId}/comment/${commentId}`,
58
+ auth: context.auth,
59
+ });
60
+ return response.body;
61
+ });
62
+ },
63
+ });
64
+ //# sourceMappingURL=delete-issue-comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-issue-comment.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-issue-comment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAAgD;AAEhD,+DAAyD;AACzD,sCAA4C;AAC5C,2CAA2E;AAE9D,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;Q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AAQ,GAAG,MAAM,IAAA,wBAAe,EAAC;gBACtC,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,SAAS,OAAO,YAAY,SAAS,EAAE;gBAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;aAClB,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const findUserAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ keyword: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ }>;
7
+ //# sourceMappingURL=find-user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-user.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-user.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;EA0BzB,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findUserAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const common_1 = require("../common");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.findUserAction = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jiraDataCenterAuth,
11
+ name: 'find-user',
12
+ displayName: 'Find User',
13
+ description: 'Finds an existing user.',
14
+ props: {
15
+ keyword: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Keyword',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const response = yield (0, common_1.jiraApiCall)({
23
+ auth: context.auth,
24
+ method: pieces_common_1.HttpMethod.GET,
25
+ resourceUri: '/user/search',
26
+ query: {
27
+ username: context.propsValue.keyword,
28
+ },
29
+ });
30
+ return {
31
+ found: response.length > 0,
32
+ data: response,
33
+ };
34
+ });
35
+ },
36
+ });
37
+ //# sourceMappingURL=find-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-user.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-user.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAAgD;AAChD,sCAAwC;AACxC,+DAAyD;AAE5C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,yBAAyB;IACtC,KAAK,EAAE;QACN,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAAiC;gBAClE,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,cAAc;gBAC3B,KAAK,EAAE;oBACN,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;iBACpC;aACD,CAAC,CAAC;YAEH,OAAO;gBACN,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAC1B,IAAI,EAAE,QAAQ;aACd,CAAC;QACH,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const getIssueAttachmentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ attachmentId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ }>;
7
+ //# sourceMappingURL=get-issue-attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue-attachment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue-attachment.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;;;;EAyCnC,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIssueAttachmentAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const common_1 = require("../common");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.getIssueAttachmentAction = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jiraDataCenterAuth,
11
+ name: 'get-issue-attachment',
12
+ displayName: 'Get Issue Attachment',
13
+ description: 'Retrieves an attachment from an issue.',
14
+ props: {
15
+ attachmentId: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Attachment ID',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { attachmentId } = context.propsValue;
23
+ const attachmentResponse = yield (0, common_1.jiraApiCall)({
24
+ method: pieces_common_1.HttpMethod.GET,
25
+ resourceUri: `/attachment/${attachmentId}`,
26
+ auth: context.auth,
27
+ });
28
+ const { filename, content } = attachmentResponse;
29
+ const response = yield pieces_common_1.httpClient.sendRequest({
30
+ url: content,
31
+ method: pieces_common_1.HttpMethod.GET,
32
+ authentication: {
33
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
34
+ token: context.auth.props.personalAccessToken,
35
+ },
36
+ responseType: 'arraybuffer',
37
+ followRedirects: true,
38
+ });
39
+ return Object.assign(Object.assign({}, attachmentResponse), { file: yield context.files.write({
40
+ fileName: filename,
41
+ data: Buffer.from(response.body),
42
+ }) });
43
+ });
44
+ },
45
+ });
46
+ //# sourceMappingURL=get-issue-attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue-attachment.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue-attachment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAAgD;AAChD,sCAAwC;AACxC,+DAAyF;AAE5E,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACN,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE5C,MAAM,kBAAkB,GAAG,MAAM,IAAA,oBAAW,EAAwC;gBACnF,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,eAAe,YAAY,EAAE;gBAC1C,IAAI,EAAE,OAAO,CAAC,IAAI;aAClB,CAAC,CAAC;YAEH,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC;YAEjD,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC7C,GAAG,EAAE,OAAO;gBACZ,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,cAAc,EAAE;oBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB;iBAC7C;gBACD,YAAY,EAAE,aAAa;gBAC3B,eAAe,EAAE,IAAI;aACrB,CAAC,CAAC;YAEH,uCACI,kBAAkB,KACrB,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC/B,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;iBAChC,CAAC,IACD;QACH,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare const getIssueAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ projectId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ issueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
16
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
17
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
18
+ }>>;
19
+ expand: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
20
+ mapNames: import("@activepieces/pieces-framework").CheckboxProperty<true>;
21
+ mapTransitions: import("@activepieces/pieces-framework").CheckboxProperty<true>;
22
+ }>;
23
+ //# sourceMappingURL=get-issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;EA4HzB,CAAC"}
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIssueAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ const common_1 = require("../common");
9
+ const props_1 = require("../common/props");
10
+ function mapFieldNames(fields, fieldNames) {
11
+ const mappedFields = {};
12
+ for (const [fieldId, fieldValue] of Object.entries(fields)) {
13
+ const fieldName = fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames[fieldId];
14
+ if (fieldName) {
15
+ mappedFields[fieldName] = fieldValue;
16
+ }
17
+ else {
18
+ // fallback in case field cannot be mapped (but this should not happen)
19
+ mappedFields[fieldId] = fieldValue;
20
+ }
21
+ }
22
+ return mappedFields;
23
+ }
24
+ exports.getIssueAction = (0, pieces_framework_1.createAction)({
25
+ auth: auth_1.jiraDataCenterAuth,
26
+ name: 'get_issue',
27
+ displayName: 'Get Issue',
28
+ description: 'Get issue data.',
29
+ props: {
30
+ projectId: (0, props_1.getProjectIdDropdown)(),
31
+ issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
32
+ expand: pieces_framework_1.Property.StaticMultiSelectDropdown({
33
+ displayName: 'Expand',
34
+ description: 'Include additional information about the issue in the response',
35
+ required: false,
36
+ options: {
37
+ options: [
38
+ {
39
+ label: 'Rendered Fields',
40
+ value: 'renderedFields',
41
+ },
42
+ {
43
+ label: 'Names',
44
+ value: 'names',
45
+ },
46
+ {
47
+ label: 'Schema',
48
+ value: 'schema',
49
+ },
50
+ {
51
+ label: 'Transitions',
52
+ value: 'transitions',
53
+ },
54
+ {
55
+ label: 'Edit Meta',
56
+ value: 'editmeta',
57
+ },
58
+ {
59
+ label: 'Changelog',
60
+ value: 'changelog',
61
+ },
62
+ ],
63
+ },
64
+ }),
65
+ mapNames: pieces_framework_1.Property.Checkbox({
66
+ displayName: 'Map Field Names',
67
+ description: `
68
+ Map human readable names to Fields, Rendered Fields, Schema and Edit Meta.
69
+ Notes:
70
+ - This would implicitly add "names" to the expand field
71
+ - If there are fields with the same name, they may be overridden
72
+ `.trim(),
73
+ required: true,
74
+ defaultValue: false,
75
+ }),
76
+ mapTransitions: pieces_framework_1.Property.Checkbox({
77
+ displayName: 'Map Transition Names',
78
+ description: `
79
+ Map human readable names to Transitions.
80
+ Notes:
81
+ - If there are transitions with the same name, they may be overridden
82
+ - This changes the original data structure from list to map
83
+ `.trim(),
84
+ required: true,
85
+ defaultValue: false,
86
+ }),
87
+ },
88
+ run(context) {
89
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
+ var _a;
91
+ const { issueId, expand, mapNames, mapTransitions } = context.propsValue;
92
+ const queryParams = {};
93
+ let expandParams = expand;
94
+ // implicitly expand names which is needed for mapping
95
+ if (mapNames) {
96
+ expandParams = [...new Set(expandParams).add('names')];
97
+ }
98
+ if (expandParams) {
99
+ queryParams['expand'] = expandParams.join(',');
100
+ }
101
+ const response = yield (0, common_1.sendJiraRequest)({
102
+ method: pieces_common_1.HttpMethod.GET,
103
+ url: `issue/${issueId}`,
104
+ auth: context.auth,
105
+ queryParams: queryParams,
106
+ });
107
+ const data = response.body;
108
+ if (mapNames) {
109
+ const fieldNames = (data['names'] || {});
110
+ const mappedFields = mapFieldNames(data['fields'], fieldNames);
111
+ data['fields'] = mappedFields;
112
+ if (data['renderedFields']) {
113
+ const mappedRenderedFields = mapFieldNames(data['renderedFields'], fieldNames);
114
+ data['renderedFields'] = mappedRenderedFields;
115
+ }
116
+ if (data['schema']) {
117
+ const mappedSchemaFields = mapFieldNames(data['schema'], fieldNames);
118
+ data['schema'] = mappedSchemaFields;
119
+ }
120
+ if ((_a = data['editmeta']) === null || _a === void 0 ? void 0 : _a.fields) {
121
+ const mappedEditmetaFields = mapFieldNames(data['editmeta'].fields, fieldNames);
122
+ data['editmeta'] = Object.assign(Object.assign({}, data['editmeta']), { fields: mappedEditmetaFields });
123
+ }
124
+ }
125
+ if (mapTransitions && data['transitions']) {
126
+ const mappedTransitions = data['transitions'].reduce((acc, transition) => {
127
+ acc[transition.name] = transition;
128
+ return acc;
129
+ }, {});
130
+ data['transitions'] = mappedTransitions;
131
+ }
132
+ return data;
133
+ });
134
+ },
135
+ });
136
+ //# sourceMappingURL=get-issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAAgD;AAChD,+DAAsE;AACtE,sCAA4C;AAC5C,2CAA2E;AAE3E,SAAS,aAAa,CACrB,MAA+B,EAC/B,UAAkC;IAElC,MAAM,YAAY,GAAG,EAA6B,CAAC;IAEnD,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5D,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,OAAO,CAAC,CAAC;QACxC,IAAI,SAAS,EAAE,CAAC;YACf,YAAY,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC;QACtC,CAAC;aAAM,CAAC;YACP,uEAAuE;YACvE,YAAY,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC;QACpC,CAAC;IACF,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC;AAEY,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,iBAAiB;IAC9B,KAAK,EAAE;QACN,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AI,MAAC,IAAI,CAAC,UAAU,CAAS,0CAAE,MAAM,EAAE,CAAC;oBACvC,MAAM,oBAAoB,GAAG,aAAa,CAAE,IAAI,CAAC,UAAU,CAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;oBACzF,IAAI,CAAC,UAAU,CAAC,mCAAS,IAAI,CAAC,UAAU,CAAS,KAAE,MAAM,EAAE,oBAAoB,GAAE,CAAC;gBACnF,CAAC;YACF,CAAC;YAED,IAAI,cAAc,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBAC3C,MAAM,iBAAiB,GAAI,IAAI,CAAC,aAAa,CAAqD,CAAC,MAAM,CACxG,CAAC,GAA4B,EAAE,UAAU,EAAE,EAAE;oBAC5C,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;oBAClC,OAAO,GAAG,CAAC;gBACZ,CAAC,EACD,EAAE,CACF,CAAC;gBAEF,IAAI,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC;YACzC,CAAC;YAED,OAAO,IAAI,CAAC;QACb,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ export declare const linkIssuesAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ firstIssueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ issueLinkTypeId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
16
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
17
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
18
+ }>>;
19
+ secondIssueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
20
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
21
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
22
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
23
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
24
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
25
+ }>>;
26
+ }>;
27
+ //# sourceMappingURL=link-issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-issues.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/link-issues.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;EAuC3B,CAAC"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.linkIssuesAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const props_1 = require("../common/props");
8
+ const shared_1 = require("@activepieces/shared");
9
+ const pieces_common_1 = require("@activepieces/pieces-common");
10
+ const common_1 = require("../common");
11
+ exports.linkIssuesAction = (0, pieces_framework_1.createAction)({
12
+ auth: auth_1.jiraDataCenterAuth,
13
+ name: 'link-issues',
14
+ displayName: 'Link Issues',
15
+ description: 'Creates a link between two issues.',
16
+ props: {
17
+ firstIssueId: (0, props_1.issueIdOrKeyProp)('First Issue', true),
18
+ issueLinkTypeId: (0, props_1.issueLinkTypeIdProp)('Link Type', true),
19
+ secondIssueId: (0, props_1.issueIdOrKeyProp)('Second Issue', true),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const { firstIssueId, issueLinkTypeId, secondIssueId } = context.propsValue;
24
+ if ((0, shared_1.isNil)(firstIssueId) || (0, shared_1.isNil)(issueLinkTypeId) || (0, shared_1.isNil)(secondIssueId)) {
25
+ throw new Error('First Issue, Link Type, and Second Issue are required');
26
+ }
27
+ try {
28
+ yield (0, common_1.jiraApiCall)({
29
+ method: pieces_common_1.HttpMethod.POST,
30
+ resourceUri: '/issueLink',
31
+ auth: context.auth,
32
+ body: {
33
+ type: {
34
+ id: issueLinkTypeId,
35
+ },
36
+ inwardIssue: {
37
+ id: secondIssueId,
38
+ },
39
+ outwardIssue: {
40
+ id: firstIssueId,
41
+ },
42
+ },
43
+ });
44
+ return { success: true };
45
+ }
46
+ catch (e) {
47
+ return { success: false, error: e.message };
48
+ }
49
+ });
50
+ },
51
+ });
52
+ //# sourceMappingURL=link-issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-issues.js","sourceRoot":"","sources":["../../../../src/lib/actions/link-issues.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,qCAAgD;AAChD,2CAAwE;AACxE,iDAA6C;AAC7C,+DAAoE;AACpE,sCAAwC;AAE3B,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,oCAAoC;IACjD,KAAK,EAAE;QACN,YAAY,EAAE,IAAA,wBAAgB,EAAC,aAAa,EAAE,IAAI,CAAC;QACnD,eAAe,EAAE,IAAA,2BAAmB,EAAC,WAAW,EAAE,IAAI,CAAC;QACvD,aAAa,EAAE,IAAA,wBAAgB,EAAC,cAAc,EAAE,IAAI,CAAC;KACrD;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE5E,IAAI,IAAA,cAAK,EAAC,YAAY,CAAC,IAAI,IAAA,cAAK,EAAC,eAAe,CAAC,IAAI,IAAA,cAAK,EAAC,aAAa,CAAC,EAAE,CAAC;gBAC3E,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC1E,CAAC;YACD,IAAI,CAAC;gBACJ,MAAM,IAAA,oBAAW,EAAC;oBACjB,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,IAAI,EAAE;wBACL,IAAI,EAAE;4BACL,EAAE,EAAE,eAAe;yBACnB;wBACD,WAAW,EAAE;4BACZ,EAAE,EAAE,aAAa;yBACjB;wBACD,YAAY,EAAE;4BACb,EAAE,EAAE,YAAY;yBAChB;qBACD;iBACD,CAAC,CAAC;gBAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC1B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAG,CAAe,CAAC,OAAO,EAAE,CAAC;YAC5D,CAAC;QACF,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ export declare const listIssueCommentsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ projectId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
9
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
+ }>>;
12
+ issueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
+ }>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
16
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
17
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
18
+ }>>;
19
+ orderBy: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
20
+ limit: import("@activepieces/pieces-framework").NumberProperty<true>;
21
+ }>;
22
+ //# sourceMappingURL=list-issue-comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-issue-comments.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-issue-comments.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;EA+ClC,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listIssueCommentsAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ const common_1 = require("../common");
9
+ const props_1 = require("../common/props");
10
+ exports.listIssueCommentsAction = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.jiraDataCenterAuth,
12
+ name: 'list_issue_comments',
13
+ displayName: 'List Issue Comments',
14
+ description: 'Returns all comments for an issue.',
15
+ props: {
16
+ projectId: (0, props_1.getProjectIdDropdown)(),
17
+ issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
18
+ orderBy: pieces_framework_1.Property.StaticDropdown({
19
+ displayName: 'Order By',
20
+ required: true,
21
+ defaultValue: '-created',
22
+ options: {
23
+ disabled: false,
24
+ options: [
25
+ {
26
+ label: 'Created (Descending)',
27
+ value: '-created',
28
+ },
29
+ {
30
+ label: 'Created (Ascending)',
31
+ value: '+created',
32
+ },
33
+ ],
34
+ },
35
+ }),
36
+ limit: pieces_framework_1.Property.Number({
37
+ displayName: 'Limit',
38
+ description: 'Maximum number of results',
39
+ required: true,
40
+ defaultValue: 10,
41
+ }),
42
+ },
43
+ run(context) {
44
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
+ const { issueId, orderBy, limit } = context.propsValue;
46
+ const response = yield (0, common_1.sendJiraRequest)({
47
+ method: pieces_common_1.HttpMethod.GET,
48
+ url: `issue/${issueId}/comment`,
49
+ auth: context.auth,
50
+ queryParams: {
51
+ orderBy: orderBy,
52
+ maxResults: limit.toString(),
53
+ },
54
+ });
55
+ return response.body;
56
+ });
57
+ },
58
+ });
59
+ //# sourceMappingURL=list-issue-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-issue-comments.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-issue-comments.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAAgD;AAChD,+DAAyD;AACzD,sCAA4C;AAC5C,2CAA2E;AAE9D,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,yBAAkB;IACxB,IAAI,E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ieces/pieces-framework").CustomAuthProperty<{
2
+ instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
+ }>, {
5
+ jql: import("@activepieces/pieces-framework").LongTextProperty<true>;
6
+ maxResults: import("@activepieces/pieces-framework").NumberProperty<true>;
7
+ }>;
8
+ //# sourceMappingURL=search-issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-issues.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search-issues.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;EA6B7B,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchIssuesAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../../auth");
7
+ const common_1 = require("../common");
8
+ const zod_1 = require("zod");
9
+ const pieces_common_1 = require("@activepieces/pieces-common");
10
+ exports.searchIssuesAction = (0, pieces_framework_1.createAction)({
11
+ name: 'search_issues',
12
+ displayName: 'Search Issues',
13
+ description: 'Search for issues with JQL',
14
+ auth: auth_1.jiraDataCenterAuth,
15
+ props: {
16
+ jql: pieces_framework_1.Property.LongText({
17
+ displayName: 'JQL',
18
+ description: 'The JQL query to use in the search',
19
+ defaultValue: `type = story and created > '2023-12-13 14:00'`,
20
+ required: true,
21
+ }),
22
+ maxResults: pieces_framework_1.Property.Number({
23
+ displayName: 'Max Results',
24
+ defaultValue: 50,
25
+ required: true,
26
+ }),
27
+ },
28
+ run: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue }) {
29
+ yield pieces_common_1.propsValidation.validateZod(propsValue, {
30
+ maxResults: zod_1.z.number().min(1).max(100),
31
+ });
32
+ const { jql, maxResults } = propsValue;
33
+ return yield (0, common_1.searchIssuesByJql)({
34
+ auth,
35
+ jql,
36
+ maxResults: maxResults,
37
+ });
38
+ }),
39
+ });
40
+ //# sourceMappingURL=search-issues.js.map