@activepieces/piece-jira-cloud 0.3.5 → 0.3.7

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 (109) hide show
  1. package/package.json +7 -18
  2. package/src/index.js +109 -71
  3. package/src/auth.d.ts +0 -8
  4. package/src/auth.d.ts.map +0 -1
  5. package/src/auth.js +0 -62
  6. package/src/auth.js.map +0 -1
  7. package/src/index.d.ts +0 -6
  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 -26
  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 -27
  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 -65
  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 -25
  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 -34
  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 -35
  27. package/src/lib/actions/create-issue.d.ts.map +0 -1
  28. package/src/lib/actions/create-issue.js +0 -132
  29. package/src/lib/actions/create-issue.js.map +0 -1
  30. package/src/lib/actions/delete-issue-comment.d.ts +0 -30
  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 -8
  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 -8
  39. package/src/lib/actions/get-issue-attachment.d.ts.map +0 -1
  40. package/src/lib/actions/get-issue-attachment.js +0 -48
  41. package/src/lib/actions/get-issue-attachment.js.map +0 -1
  42. package/src/lib/actions/get-issue.d.ts +0 -28
  43. package/src/lib/actions/get-issue.d.ts.map +0 -1
  44. package/src/lib/actions/get-issue.js +0 -123
  45. package/src/lib/actions/get-issue.js.map +0 -1
  46. package/src/lib/actions/link-issues.d.ts +0 -34
  47. package/src/lib/actions/link-issues.d.ts.map +0 -1
  48. package/src/lib/actions/link-issues.js +0 -51
  49. package/src/lib/actions/link-issues.js.map +0 -1
  50. package/src/lib/actions/list-issue-comments.d.ts +0 -27
  51. package/src/lib/actions/list-issue-comments.d.ts.map +0 -1
  52. package/src/lib/actions/list-issue-comments.js +0 -60
  53. package/src/lib/actions/list-issue-comments.js.map +0 -1
  54. package/src/lib/actions/markdown-to-jira-format.d.ts +0 -4
  55. package/src/lib/actions/markdown-to-jira-format.d.ts.map +0 -1
  56. package/src/lib/actions/markdown-to-jira-format.js +0 -37
  57. package/src/lib/actions/markdown-to-jira-format.js.map +0 -1
  58. package/src/lib/actions/search-issues.d.ts +0 -13
  59. package/src/lib/actions/search-issues.d.ts.map +0 -1
  60. package/src/lib/actions/search-issues.js +0 -92
  61. package/src/lib/actions/search-issues.js.map +0 -1
  62. package/src/lib/actions/transition-issue.d.ts +0 -34
  63. package/src/lib/actions/transition-issue.d.ts.map +0 -1
  64. package/src/lib/actions/transition-issue.js +0 -45
  65. package/src/lib/actions/transition-issue.js.map +0 -1
  66. package/src/lib/actions/update-issue-comment.d.ts +0 -32
  67. package/src/lib/actions/update-issue-comment.d.ts.map +0 -1
  68. package/src/lib/actions/update-issue-comment.js +0 -98
  69. package/src/lib/actions/update-issue-comment.js.map +0 -1
  70. package/src/lib/actions/update-issue.d.ts +0 -35
  71. package/src/lib/actions/update-issue.d.ts.map +0 -1
  72. package/src/lib/actions/update-issue.js +0 -156
  73. package/src/lib/actions/update-issue.js.map +0 -1
  74. package/src/lib/common/index.d.ts +0 -86
  75. package/src/lib/common/index.d.ts.map +0 -1
  76. package/src/lib/common/index.js +0 -288
  77. package/src/lib/common/index.js.map +0 -1
  78. package/src/lib/common/props.d.ts +0 -96
  79. package/src/lib/common/props.d.ts.map +0 -1
  80. package/src/lib/common/props.js +0 -591
  81. package/src/lib/common/props.js.map +0 -1
  82. package/src/lib/common/types.d.ts +0 -28
  83. package/src/lib/common/types.d.ts.map +0 -1
  84. package/src/lib/common/types.js +0 -26
  85. package/src/lib/common/types.js.map +0 -1
  86. package/src/lib/triggers/issue-assigned.d.ts +0 -71
  87. package/src/lib/triggers/issue-assigned.d.ts.map +0 -1
  88. package/src/lib/triggers/issue-assigned.js +0 -305
  89. package/src/lib/triggers/issue-assigned.js.map +0 -1
  90. package/src/lib/triggers/new-attachment.d.ts +0 -31
  91. package/src/lib/triggers/new-attachment.d.ts.map +0 -1
  92. package/src/lib/triggers/new-attachment.js +0 -164
  93. package/src/lib/triggers/new-attachment.js.map +0 -1
  94. package/src/lib/triggers/new-comment.d.ts +0 -31
  95. package/src/lib/triggers/new-comment.d.ts.map +0 -1
  96. package/src/lib/triggers/new-comment.js +0 -98
  97. package/src/lib/triggers/new-comment.js.map +0 -1
  98. package/src/lib/triggers/new-issue.d.ts +0 -31
  99. package/src/lib/triggers/new-issue.d.ts.map +0 -1
  100. package/src/lib/triggers/new-issue.js +0 -67
  101. package/src/lib/triggers/new-issue.js.map +0 -1
  102. package/src/lib/triggers/updated-issue-status.d.ts +0 -31
  103. package/src/lib/triggers/updated-issue-status.d.ts.map +0 -1
  104. package/src/lib/triggers/updated-issue-status.js +0 -67
  105. package/src/lib/triggers/updated-issue-status.js.map +0 -1
  106. package/src/lib/triggers/updated-issue.d.ts +0 -31
  107. package/src/lib/triggers/updated-issue.d.ts.map +0 -1
  108. package/src/lib/triggers/updated-issue.js +0 -67
  109. package/src/lib/triggers/updated-issue.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-comment.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EAEf,MAAM,gCAAgC,CAAC;AA6ExC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CrB,CAAC"}
@@ -1,98 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newComment = 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 dayjs_1 = tslib_1.__importDefault(require("dayjs"));
8
- const auth_1 = require("../../auth");
9
- const common_1 = require("../common");
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
- var _b, _c, _d, _e;
14
- const { jql, sanitizeJql } = propsValue;
15
- const searchQuery = `${jql ? jql + ' AND ' : ''}updated > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
16
- const searchResponse = yield (0, common_1.searchIssuesByJql)({
17
- auth,
18
- jql: searchQuery,
19
- maxResults: 50,
20
- sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
21
- fields: ['summary', 'comment'],
22
- });
23
- const issues = searchResponse.issues;
24
- const results = [];
25
- for (const issue of issues) {
26
- const comments = (_d = (_c = (_b = issue.fields) === null || _b === void 0 ? void 0 : _b.comment) === null || _c === void 0 ? void 0 : _c.comments) !== null && _d !== void 0 ? _d : [];
27
- for (const comment of comments) {
28
- const createdMS = Date.parse(comment.created);
29
- if (Number.isNaN(createdMS) || createdMS <= lastFetchEpochMS)
30
- continue;
31
- results.push({
32
- epochMilliSeconds: createdMS,
33
- data: {
34
- issue: {
35
- id: issue.id,
36
- key: issue.key,
37
- summary: (_e = issue.fields) === null || _e === void 0 ? void 0 : _e.summary,
38
- },
39
- comment,
40
- },
41
- });
42
- }
43
- }
44
- return results;
45
- }),
46
- };
47
- exports.newComment = (0, pieces_framework_1.createTrigger)({
48
- name: 'new_comment',
49
- displayName: 'New Comment',
50
- description: 'Fires whenever someone adds a new comment to a Jira issue. Great for getting notified in Slack or Teams, syncing customer replies, or reacting to feedback automatically.',
51
- auth: auth_1.jiraCloudAuth,
52
- type: pieces_framework_1.TriggerStrategy.POLLING,
53
- props: {
54
- jql: pieces_framework_1.Property.LongText({
55
- displayName: 'Only watch these issues (optional)',
56
- description: `Leave empty to watch comments on **every** issue in your Jira.
57
-
58
- To narrow it down, paste a Jira filter here. A few ready-to-use examples:
59
-
60
- - \`project = "SUPPORT"\` — only issues in the Support project
61
- - \`assignee = currentUser()\` — only issues assigned to you
62
- - \`status != Done\` — skip closed issues
63
- - \`labels = "vip"\` — only issues tagged \`vip\`
64
- - \`project = "SUPPORT" AND priority = High\` — combine conditions with \`AND\`
65
-
66
- Not sure what to write? Open Jira → Filters → Advanced search, build the filter visually, then copy the query here.`,
67
- required: false,
68
- }),
69
- sanitizeJql: pieces_framework_1.Property.Checkbox({
70
- displayName: 'Auto-fix the filter',
71
- description: 'Keep this on. If your filter references something you can\'t access (a private project, a deleted field), Jira will automatically clean it up instead of erroring.',
72
- required: false,
73
- defaultValue: true,
74
- }),
75
- },
76
- sampleData: {},
77
- onEnable(context) {
78
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
79
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
80
- });
81
- },
82
- onDisable(context) {
83
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
84
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
85
- });
86
- },
87
- run(context) {
88
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
89
- return yield pieces_common_1.pollingHelper.poll(polling, context);
90
- });
91
- },
92
- test(context) {
93
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
94
- return yield pieces_common_1.pollingHelper.test(polling, context);
95
- });
96
- },
97
- });
98
- //# sourceMappingURL=new-comment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-comment.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-comment.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAIqC;AACrC,0DAA0B;AAC1B,qCAAqD;AACrD,sCAA8C;AA0B9C,MAAM,OAAO,GAA+D;IAC3E,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;;QACnD,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QAExC,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,IAAA,eAAK,EACjE,gBAAgB,CAChB,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC;QAEhC,MAAM,cAAc,GAAG,MAAM,IAAA,0BAAiB,EAAC;YAC9C,IAAI;YACJ,GAAG,EAAE,WAAW;YAChB,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,KAAK;YACjC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SAC9B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,cAAc,CAAC,MAA6B,CAAC;QAC5D,MAAM,OAAO,GAAwD,EAAE,CAAC;QAExE,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC5B,MAAM,QAAQ,GAAG,MAAA,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE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ChD,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,31 +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
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
- }>, {
7
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
8
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
12
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
15
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
17
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
18
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
23
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
24
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
25
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
- }>, {
28
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
29
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
30
- }>;
31
- //# 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,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAiCxC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BnB,CAAC"}
@@ -1,67 +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, sanitizeJql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}created > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const response = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
20
- });
21
- return response.issues.map((issue) => ({
22
- epochMilliSeconds: Date.parse(issue.fields.created),
23
- data: issue,
24
- }));
25
- }),
26
- };
27
- exports.newIssue = (0, pieces_framework_1.createTrigger)({
28
- name: 'new_issue',
29
- displayName: 'New Issue',
30
- description: 'Triggers when a new issue is created',
31
- auth: auth_1.jiraCloudAuth,
32
- type: pieces_framework_1.TriggerStrategy.POLLING,
33
- props: {
34
- jql: pieces_framework_1.Property.LongText({
35
- displayName: 'JQL',
36
- description: 'Use to filter issues watched',
37
- required: false,
38
- }),
39
- sanitizeJql: pieces_framework_1.Property.Checkbox({
40
- displayName: 'Sanitize JQL',
41
- required: false,
42
- defaultValue: true,
43
- }),
44
- },
45
- sampleData: {},
46
- onEnable(context) {
47
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
49
- });
50
- },
51
- onDisable(context) {
52
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
54
- });
55
- },
56
- run(context) {
57
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
- return yield pieces_common_1.pollingHelper.poll(polling, context);
59
- });
60
- },
61
- test(context) {
62
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
- return yield pieces_common_1.pollingHelper.test(polling, context);
64
- });
65
- },
66
- });
67
- //# 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,qCAAqD;AACrD,sCAA8C;AAC9C,0DAA0B;AAE1B,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KA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,EAAE;IACR,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;IACK,IAAI,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,31 +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
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
- }>, {
7
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
8
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
12
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
15
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
17
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
18
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
23
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
24
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
25
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
- }>, {
28
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
29
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
30
- }>;
31
- //# 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,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAiCxC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B7B,CAAC"}
@@ -1,67 +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, sanitizeJql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}updated > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const response = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
20
- });
21
- return response.issues.map((issue) => ({
22
- epochMilliSeconds: Date.parse(issue.fields.statuscategorychangedate),
23
- data: issue,
24
- }));
25
- }),
26
- };
27
- exports.updatedIssueStatus = (0, pieces_framework_1.createTrigger)({
28
- name: 'updated_issue_status',
29
- displayName: 'Updated Issue Status',
30
- description: 'Triggers when an issue status is updated',
31
- auth: auth_1.jiraCloudAuth,
32
- type: pieces_framework_1.TriggerStrategy.POLLING,
33
- props: {
34
- jql: pieces_framework_1.Property.LongText({
35
- displayName: 'JQL',
36
- description: 'Use to filter issues watched',
37
- required: false,
38
- }),
39
- sanitizeJql: pieces_framework_1.Property.Checkbox({
40
- displayName: 'Sanitize JQL',
41
- required: false,
42
- defaultValue: true,
43
- }),
44
- },
45
- sampleData: {},
46
- onEnable(context) {
47
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
49
- });
50
- },
51
- onDisable(context) {
52
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
54
- });
55
- },
56
- run(context) {
57
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
- return yield pieces_common_1.pollingHelper.poll(polling, context);
59
- });
60
- },
61
- test(context) {
62
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
- return yield pieces_common_1.pollingHelper.test(polling, context);
64
- });
65
- },
66
- });
67
- //# 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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AAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACD,UAAU,EAAE,EAAE;IACR,QAAQ,CAAC,OAAO;;YACpB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;IACK,IAAI,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,31 +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
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
- }>, {
7
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
8
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
9
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
12
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
15
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
16
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
17
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
18
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>, {
21
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
22
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
23
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
24
- instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
25
- email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
- }>, {
28
- jql: import("@activepieces/pieces-framework").LongTextProperty<false>;
29
- sanitizeJql: import("@activepieces/pieces-framework").CheckboxProperty<false>;
30
- }>;
31
- //# 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,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAgCxC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BvB,CAAC"}
@@ -1,67 +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, sanitizeJql } = propsValue;
14
- const searchQuery = `${jql ? jql + ' AND ' : ''}updated > '${(0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm')}'`;
15
- const response = yield (0, common_1.searchIssuesByJql)({
16
- auth,
17
- jql: searchQuery,
18
- maxResults: 50,
19
- sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
20
- });
21
- return response.issues.map((issue) => ({
22
- epochMilliSeconds: Date.parse(issue.fields.updated),
23
- data: issue,
24
- }));
25
- }),
26
- };
27
- exports.updatedIssue = (0, pieces_framework_1.createTrigger)({
28
- name: 'updated_issue',
29
- displayName: 'Updated Issue',
30
- description: 'Triggers when an issue is updated',
31
- auth: auth_1.jiraCloudAuth,
32
- type: pieces_framework_1.TriggerStrategy.POLLING,
33
- props: {
34
- jql: pieces_framework_1.Property.LongText({
35
- displayName: 'JQL',
36
- description: 'Use to filter issues watched',
37
- required: false,
38
- }),
39
- sanitizeJql: pieces_framework_1.Property.Checkbox({
40
- displayName: 'Sanitize JQL',
41
- required: false,
42
- defaultValue: false,
43
- }),
44
- },
45
- sampleData: {},
46
- onEnable(context) {
47
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
- yield pieces_common_1.pollingHelper.onEnable(polling, context);
49
- });
50
- },
51
- onDisable(context) {
52
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
- yield pieces_common_1.pollingHelper.onDisable(polling, context);
54
- });
55
- },
56
- run(context) {
57
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
58
- return yield pieces_common_1.pollingHelper.poll(polling, context);
59
- });
60
- },
61
- test(context) {
62
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
- return yield pieces_common_1.pollingHelper.test(polling, context);
64
- });
65
- },
66
- });
67
- //# 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,qCAAqD;AACrD,sCAA8C;AAC9C,0DAA0B;AAE1B,MAAM,OAAO,GAET;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;QAClD,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC;QACxC,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,IAAA,eAAK,EAChE,gBAAgB,CACjB,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAC;YACvC,IAAI;YACJ,GAAG,EAAE,WAAW;YAChB,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,KAAK;SAClC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;YAC1C,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;YACnD,IAAI,EAAE,KAAK;SACZ,CAAC,CAAC,CAAC;IACN,CAAC,CAAA;CACF,CAAC;AAEW,QAAA,YAAY,GAAG,IAAA,gCAAa,EAAC;IACxC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KA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