@activepieces/piece-jira-data-center 0.0.2 → 0.0.4

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 +7 -34
  2. package/src/index.js +29 -64
  3. package/src/auth.d.ts +0 -7
  4. package/src/auth.d.ts.map +0 -1
  5. package/src/auth.js +0 -59
  6. package/src/auth.js.map +0 -1
  7. package/src/index.d.ts +0 -5
  8. package/src/index.d.ts.map +0 -1
  9. package/src/index.js.map +0 -1
  10. package/src/lib/actions/add-attachment-to-issue.d.ts +0 -21
  11. package/src/lib/actions/add-attachment-to-issue.d.ts.map +0 -1
  12. package/src/lib/actions/add-attachment-to-issue.js +0 -41
  13. package/src/lib/actions/add-attachment-to-issue.js.map +0 -1
  14. package/src/lib/actions/add-comment-to-issue.d.ts +0 -21
  15. package/src/lib/actions/add-comment-to-issue.d.ts.map +0 -1
  16. package/src/lib/actions/add-comment-to-issue.js +0 -38
  17. package/src/lib/actions/add-comment-to-issue.js.map +0 -1
  18. package/src/lib/actions/add-watcher-to-issue.d.ts +0 -20
  19. package/src/lib/actions/add-watcher-to-issue.d.ts.map +0 -1
  20. package/src/lib/actions/add-watcher-to-issue.js +0 -48
  21. package/src/lib/actions/add-watcher-to-issue.js.map +0 -1
  22. package/src/lib/actions/assign-issue.d.ts +0 -27
  23. package/src/lib/actions/assign-issue.d.ts.map +0 -1
  24. package/src/lib/actions/assign-issue.js +0 -39
  25. package/src/lib/actions/assign-issue.js.map +0 -1
  26. package/src/lib/actions/create-issue.d.ts +0 -24
  27. package/src/lib/actions/create-issue.d.ts.map +0 -1
  28. package/src/lib/actions/create-issue.js +0 -110
  29. package/src/lib/actions/create-issue.js.map +0 -1
  30. package/src/lib/actions/delete-issue-comment.d.ts +0 -24
  31. package/src/lib/actions/delete-issue-comment.d.ts.map +0 -1
  32. package/src/lib/actions/delete-issue-comment.js +0 -64
  33. package/src/lib/actions/delete-issue-comment.js.map +0 -1
  34. package/src/lib/actions/find-user.d.ts +0 -7
  35. package/src/lib/actions/find-user.d.ts.map +0 -1
  36. package/src/lib/actions/find-user.js +0 -37
  37. package/src/lib/actions/find-user.js.map +0 -1
  38. package/src/lib/actions/get-issue-attachment.d.ts +0 -7
  39. package/src/lib/actions/get-issue-attachment.d.ts.map +0 -1
  40. package/src/lib/actions/get-issue-attachment.js +0 -46
  41. package/src/lib/actions/get-issue-attachment.js.map +0 -1
  42. package/src/lib/actions/get-issue.d.ts +0 -23
  43. package/src/lib/actions/get-issue.d.ts.map +0 -1
  44. package/src/lib/actions/get-issue.js +0 -136
  45. package/src/lib/actions/get-issue.js.map +0 -1
  46. package/src/lib/actions/link-issues.d.ts +0 -27
  47. package/src/lib/actions/link-issues.d.ts.map +0 -1
  48. package/src/lib/actions/link-issues.js +0 -52
  49. package/src/lib/actions/link-issues.js.map +0 -1
  50. package/src/lib/actions/list-issue-comments.d.ts +0 -22
  51. package/src/lib/actions/list-issue-comments.d.ts.map +0 -1
  52. package/src/lib/actions/list-issue-comments.js +0 -59
  53. package/src/lib/actions/list-issue-comments.js.map +0 -1
  54. package/src/lib/actions/search-issues.d.ts +0 -8
  55. package/src/lib/actions/search-issues.d.ts.map +0 -1
  56. package/src/lib/actions/search-issues.js +0 -40
  57. package/src/lib/actions/search-issues.js.map +0 -1
  58. package/src/lib/actions/update-issue-comment.d.ts +0 -25
  59. package/src/lib/actions/update-issue-comment.d.ts.map +0 -1
  60. package/src/lib/actions/update-issue-comment.js +0 -71
  61. package/src/lib/actions/update-issue-comment.js.map +0 -1
  62. package/src/lib/actions/update-issue.d.ts +0 -24
  63. package/src/lib/actions/update-issue.d.ts.map +0 -1
  64. package/src/lib/actions/update-issue.js +0 -122
  65. package/src/lib/actions/update-issue.js.map +0 -1
  66. package/src/lib/common/index.d.ts +0 -74
  67. package/src/lib/common/index.d.ts.map +0 -1
  68. package/src/lib/common/index.js +0 -197
  69. package/src/lib/common/index.js.map +0 -1
  70. package/src/lib/common/props.d.ts +0 -80
  71. package/src/lib/common/props.d.ts.map +0 -1
  72. package/src/lib/common/props.js +0 -572
  73. package/src/lib/common/props.js.map +0 -1
  74. package/src/lib/common/types.d.ts +0 -23
  75. package/src/lib/common/types.d.ts.map +0 -1
  76. package/src/lib/common/types.js +0 -25
  77. package/src/lib/common/types.js.map +0 -1
  78. package/src/lib/triggers/new-issue.d.ts +0 -23
  79. package/src/lib/triggers/new-issue.d.ts.map +0 -1
  80. package/src/lib/triggers/new-issue.js +0 -61
  81. package/src/lib/triggers/new-issue.js.map +0 -1
  82. package/src/lib/triggers/updated-issue-status.d.ts +0 -23
  83. package/src/lib/triggers/updated-issue-status.d.ts.map +0 -1
  84. package/src/lib/triggers/updated-issue-status.js +0 -61
  85. package/src/lib/triggers/updated-issue-status.js.map +0 -1
  86. package/src/lib/triggers/updated-issue.d.ts +0 -23
  87. package/src/lib/triggers/updated-issue.d.ts.map +0 -1
  88. package/src/lib/triggers/updated-issue.js +0 -61
  89. package/src/lib/triggers/updated-issue.js.map +0 -1
@@ -1,23 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newIssue: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
7
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
8
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
10
- }>, {
11
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
12
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
- }>, {
16
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
17
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- }>;
23
- //# sourceMappingURL=new-issue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EAEf,MAAM,gCAAgC,CAAC;AAgCxC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;EA0BnB,CAAC"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newIssue = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../../auth");
8
- const common_1 = require("../common");
9
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
10
- const polling = {
11
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
12
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
13
- const { jql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}created > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const issues = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- });
20
- return issues.map((issue) => ({
21
- epochMilliSeconds: Date.parse(issue.fields.created),
22
- data: issue,
23
- }));
24
- }),
25
- };
26
- exports.newIssue = (0, pieces_framework_1.createTrigger)({
27
- name: 'new_issue',
28
- displayName: 'New Issue',
29
- description: 'Triggers when a new issue is created',
30
- auth: auth_1.jiraDataCenterAuth,
31
- type: pieces_framework_1.TriggerStrategy.POLLING,
32
- props: {
33
- jql: pieces_framework_1.Property.LongText({
34
- displayName: 'JQL',
35
- description: 'Use to filter issues watched',
36
- required: false,
37
- }),
38
- },
39
- sampleData: {},
40
- onEnable(context) {
41
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
43
- });
44
- },
45
- onDisable(context) {
46
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
48
- });
49
- },
50
- run(context) {
51
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
- return yield pieces_common_1.pollingHelper.poll(polling, context);
53
- });
54
- },
55
- test(context) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- return yield pieces_common_1.pollingHelper.test(polling, context);
58
- });
59
- },
60
- });
61
- //# sourceMappingURL=new-issue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-issue.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAIqC;AACrC,qCAAoE;AACpE,sCAA8C;AAC9C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACH,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;QACnD,MAAM,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;QAC3B,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,IAAA,e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;KAAA;CACD,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const updatedIssueStatus: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
7
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
8
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
10
- }>, {
11
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
12
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
- }>, {
16
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
17
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- }>;
23
- //# sourceMappingURL=updated-issue-status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updated-issue-status.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/updated-issue-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EAEf,MAAM,gCAAgC,CAAC;AAgCxC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;EA0B7B,CAAC"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatedIssueStatus = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../../auth");
8
- const common_1 = require("../common");
9
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
10
- const polling = {
11
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
12
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
13
- const { jql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}status CHANGED AFTER '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const issues = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- });
20
- return issues.map((issue) => ({
21
- epochMilliSeconds: Date.parse(issue.fields.updated),
22
- data: issue,
23
- }));
24
- }),
25
- };
26
- exports.updatedIssueStatus = (0, pieces_framework_1.createTrigger)({
27
- name: 'updated_issue_status',
28
- displayName: 'Updated Issue Status',
29
- description: 'Triggers when an issue status is updated',
30
- auth: auth_1.jiraDataCenterAuth,
31
- type: pieces_framework_1.TriggerStrategy.POLLING,
32
- props: {
33
- jql: pieces_framework_1.Property.LongText({
34
- displayName: 'JQL',
35
- description: 'Use to filter issues watched',
36
- required: false,
37
- }),
38
- },
39
- sampleData: {},
40
- onEnable(context) {
41
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
43
- });
44
- },
45
- onDisable(context) {
46
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
48
- });
49
- },
50
- run(context) {
51
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
- return yield pieces_common_1.pollingHelper.poll(polling, context);
53
- });
54
- },
55
- test(context) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- return yield pieces_common_1.pollingHelper.test(polling, context);
58
- });
59
- },
60
- });
61
- //# sourceMappingURL=updated-issue-status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updated-issue-status.js","sourceRoot":"","sources":["../../../../src/lib/triggers/updated-issue-status.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAIqC;AACrC,qCAAoE;AACpE,sCAA8C;AAC9C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACH,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;QACnD,MAAM,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;QAC3B,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,yBAAyB,IAAA,eAAK,EAC5E,gBAAgB,CAChB,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC;QAChC,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAiB,EAAC;YACtC,IAAI;YACJ,GAAG,EAAE,WAAW;YAChB,UAAU,EAAE,EAAE;SACd,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7B,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;YACnD,IAAI,EAAE,KAAK;SACX,CAAC,CAAC,CAAC;IACL,CAAC,CAAA;CACD,CAAC;AAEW,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,0CAA0C;IACvD,IAAI,EAAE,yBAAkB;IACxB,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE;QACN,GAAG,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;IACD,UAAU,EAAE,EAAE;IACR,QAAQ,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACtB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;IACK,IAAI,CAAC,OAAO;;YACjB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;CACD,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const updatedIssue: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
7
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
8
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
10
- }>, {
11
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
12
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
- }>, {
16
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
17
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- personalAccessToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- }>;
23
- //# sourceMappingURL=updated-issue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updated-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/updated-issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EAEf,MAAM,gCAAgC,CAAC;AAgCxC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;EA0BvB,CAAC"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatedIssue = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const auth_1 = require("../../auth");
8
- const common_1 = require("../common");
9
- const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
10
- const polling = {
11
- strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
12
- items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
13
- const { jql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}updated > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const issues = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- });
20
- return issues.map((issue) => ({
21
- epochMilliSeconds: Date.parse(issue.fields.updated),
22
- data: issue,
23
- }));
24
- }),
25
- };
26
- exports.updatedIssue = (0, pieces_framework_1.createTrigger)({
27
- name: 'updated_issue',
28
- displayName: 'Updated Issue',
29
- description: 'Triggers when an issue is updated',
30
- auth: auth_1.jiraDataCenterAuth,
31
- type: pieces_framework_1.TriggerStrategy.POLLING,
32
- props: {
33
- jql: pieces_framework_1.Property.LongText({
34
- displayName: 'JQL',
35
- description: 'Use to filter issues watched',
36
- required: false,
37
- }),
38
- },
39
- sampleData: {},
40
- onEnable(context) {
41
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
42
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
43
- });
44
- },
45
- onDisable(context) {
46
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
48
- });
49
- },
50
- run(context) {
51
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
52
- return yield pieces_common_1.pollingHelper.poll(polling, context);
53
- });
54
- },
55
- test(context) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- return yield pieces_common_1.pollingHelper.test(polling, context);
58
- });
59
- },
60
- });
61
- //# sourceMappingURL=updated-issue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updated-issue.js","sourceRoot":"","sources":["../../../../src/lib/triggers/updated-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAIqC;AACrC,qCAAoE;AACpE,sCAA8C;AAC9C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACH,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;QACnD,MAAM,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;QAC3B,MAAM,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