@activepieces/piece-jira-cloud 0.3.0 → 0.3.2

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 (40) hide show
  1. package/package.json +5 -74
  2. package/src/auth.d.ts +3 -3
  3. package/src/auth.d.ts.map +1 -1
  4. package/src/auth.js.map +1 -1
  5. package/src/i18n/translation.json +7 -2
  6. package/src/index.d.ts.map +1 -1
  7. package/src/index.js +7 -2
  8. package/src/index.js.map +1 -1
  9. package/src/lib/actions/delete-issue-comment.js.map +1 -1
  10. package/src/lib/actions/link-issues.d.ts.map +1 -1
  11. package/src/lib/actions/link-issues.js +20 -21
  12. package/src/lib/actions/link-issues.js.map +1 -1
  13. package/src/lib/actions/search-issues.js +2 -2
  14. package/src/lib/actions/search-issues.js.map +1 -1
  15. package/src/lib/actions/transition-issue.d.ts +34 -0
  16. package/src/lib/actions/transition-issue.d.ts.map +1 -0
  17. package/src/lib/actions/transition-issue.js +45 -0
  18. package/src/lib/actions/transition-issue.js.map +1 -0
  19. package/src/lib/actions/update-issue-comment.js.map +1 -1
  20. package/src/lib/common/index.d.ts.map +1 -1
  21. package/src/lib/common/index.js +12 -21
  22. package/src/lib/common/index.js.map +1 -1
  23. package/src/lib/triggers/issue-assigned.d.ts +71 -0
  24. package/src/lib/triggers/issue-assigned.d.ts.map +1 -0
  25. package/src/lib/triggers/issue-assigned.js +305 -0
  26. package/src/lib/triggers/issue-assigned.js.map +1 -0
  27. package/src/lib/triggers/new-attachment.d.ts +31 -0
  28. package/src/lib/triggers/new-attachment.d.ts.map +1 -0
  29. package/src/lib/triggers/new-attachment.js +164 -0
  30. package/src/lib/triggers/new-attachment.js.map +1 -0
  31. package/src/lib/triggers/new-comment.d.ts +31 -0
  32. package/src/lib/triggers/new-comment.d.ts.map +1 -0
  33. package/src/lib/triggers/new-comment.js +98 -0
  34. package/src/lib/triggers/new-comment.js.map +1 -0
  35. package/src/lib/triggers/new-issue.d.ts.map +1 -1
  36. package/src/lib/triggers/new-issue.js.map +1 -1
  37. package/src/lib/triggers/updated-issue-status.d.ts.map +1 -1
  38. package/src/lib/triggers/updated-issue-status.js.map +1 -1
  39. package/src/lib/triggers/updated-issue.d.ts.map +1 -1
  40. package/src/lib/triggers/updated-issue.js.map +1 -1
@@ -0,0 +1,305 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.issueAssigned = 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 props_1 = require("../common/props");
11
+ const polling = {
12
+ strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
13
+ items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, lastFetchEpochMS, propsValue }) {
14
+ var _b, _c;
15
+ const { assignee, assignedToMe, jql, sanitizeJql } = propsValue;
16
+ const targetClause = assignedToMe
17
+ ? 'TO currentUser()'
18
+ : assignee
19
+ ? `TO "${assignee}"`
20
+ : '';
21
+ const since = (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm');
22
+ const userScope = jql ? `(${jql}) AND ` : '';
23
+ const searchQuery = `${userScope}assignee CHANGED ${targetClause} AFTER '${since}'`.trim();
24
+ const response = yield (0, common_1.searchIssuesByJql)({
25
+ auth,
26
+ jql: searchQuery,
27
+ maxResults: 50,
28
+ sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
29
+ expand: ['changelog'],
30
+ });
31
+ const issues = response.issues;
32
+ const targetAccountId = assignedToMe ? undefined : assignee;
33
+ const results = [];
34
+ for (const issue of issues) {
35
+ const histories = (_c = (_b = issue.changelog) === null || _b === void 0 ? void 0 : _b.histories) !== null && _c !== void 0 ? _c : [];
36
+ for (const history of histories) {
37
+ const changedMS = Date.parse(history.created);
38
+ if (Number.isNaN(changedMS) || changedMS <= lastFetchEpochMS)
39
+ continue;
40
+ const assigneeChange = history.items.find((item) => item.field === 'assignee' || item.fieldId === 'assignee');
41
+ if (!assigneeChange)
42
+ continue;
43
+ if (targetAccountId && assigneeChange.to !== targetAccountId)
44
+ continue;
45
+ results.push({
46
+ epochMilliSeconds: changedMS,
47
+ data: {
48
+ issue: {
49
+ id: issue.id,
50
+ key: issue.key,
51
+ fields: issue.fields,
52
+ },
53
+ change: {
54
+ from: {
55
+ accountId: assigneeChange.from,
56
+ displayName: assigneeChange.fromString,
57
+ },
58
+ to: {
59
+ accountId: assigneeChange.to,
60
+ displayName: assigneeChange.toString,
61
+ },
62
+ by: history.author,
63
+ at: history.created,
64
+ },
65
+ },
66
+ });
67
+ }
68
+ }
69
+ return results;
70
+ }),
71
+ };
72
+ exports.issueAssigned = (0, pieces_framework_1.createTrigger)({
73
+ name: 'issue_assigned',
74
+ displayName: 'Issue Assigned',
75
+ description: 'Fires when a Jira issue is assigned to someone. Use it to ping people in Slack/Teams the moment work lands on them, auto-create a to-do when tickets hit your queue, or track hand-offs between teammates.',
76
+ auth: auth_1.jiraCloudAuth,
77
+ type: pieces_framework_1.TriggerStrategy.POLLING,
78
+ props: {
79
+ assignedToMe: pieces_framework_1.Property.Checkbox({
80
+ displayName: 'Only when assigned to me',
81
+ description: 'Only trigger when the issue is assigned to the user who set up this connection. Overrides the Assignee field below.',
82
+ required: false,
83
+ defaultValue: false,
84
+ }),
85
+ assignee: (0, props_1.getUsersDropdown)({
86
+ displayName: 'Assignee (optional)',
87
+ description: 'Pick a teammate to watch. Leave empty to trigger on assignments to anyone. Ignored if "Only when assigned to me" is checked.',
88
+ required: false,
89
+ }),
90
+ jql: pieces_framework_1.Property.LongText({
91
+ displayName: 'Only watch these issues (optional)',
92
+ description: `Narrow down which issues to watch. Leave empty to watch every issue in your Jira.
93
+
94
+ Ready-to-use examples:
95
+
96
+ - \`project = "SUPPORT"\` — only the Support project
97
+ - \`priority = High\` — only high-priority issues
98
+ - \`labels = "vip"\` — only issues tagged \`vip\`
99
+ - \`project = "SUPPORT" AND status != Done\` — combine with \`AND\`
100
+
101
+ Not sure what to write? Open Jira → Filters → Advanced search, build a filter visually, then copy the query here.`,
102
+ required: false,
103
+ }),
104
+ sanitizeJql: pieces_framework_1.Property.Checkbox({
105
+ displayName: 'Auto-fix the filter',
106
+ 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.",
107
+ required: false,
108
+ defaultValue: true,
109
+ }),
110
+ },
111
+ sampleData: {
112
+ issue: {
113
+ id: '10001',
114
+ key: 'EXAMPLE-1',
115
+ fields: {
116
+ statuscategorychangedate: '2024-01-15T10:00:00.000+0000',
117
+ issuetype: {
118
+ self: 'https://example.atlassian.net/rest/api/3/issuetype/10003',
119
+ id: '10003',
120
+ description: 'Tasks track small, distinct pieces of work.',
121
+ iconUrl: 'https://example.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium',
122
+ name: 'Task',
123
+ subtask: false,
124
+ avatarId: 10318,
125
+ entityId: '00000000-0000-0000-0000-000000000000',
126
+ hierarchyLevel: 0,
127
+ },
128
+ components: [],
129
+ timespent: null,
130
+ timeoriginalestimate: null,
131
+ project: {
132
+ self: 'https://example.atlassian.net/rest/api/3/project/10000',
133
+ id: '10000',
134
+ key: 'EXAMPLE',
135
+ name: 'Example Project',
136
+ projectTypeKey: 'software',
137
+ simplified: true,
138
+ avatarUrls: {
139
+ '48x48': 'https://example.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413',
140
+ '24x24': 'https://example.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=small',
141
+ '16x16': 'https://example.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=xsmall',
142
+ '32x32': 'https://example.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10413?size=medium',
143
+ },
144
+ },
145
+ description: null,
146
+ fixVersions: [],
147
+ aggregatetimespent: null,
148
+ statusCategory: {
149
+ self: 'https://example.atlassian.net/rest/api/3/statuscategory/2',
150
+ id: 2,
151
+ key: 'new',
152
+ colorName: 'blue-gray',
153
+ name: 'To Do',
154
+ },
155
+ resolution: null,
156
+ security: null,
157
+ aggregatetimeestimate: null,
158
+ resolutiondate: null,
159
+ workratio: -1,
160
+ summary: 'Example issue summary',
161
+ watches: {
162
+ self: 'https://example.atlassian.net/rest/api/3/issue/EXAMPLE-1/watchers',
163
+ watchCount: 1,
164
+ isWatching: true,
165
+ },
166
+ lastViewed: '2024-01-15T10:05:00.000+0000',
167
+ creator: {
168
+ self: 'https://example.atlassian.net/rest/api/3/user?accountId=111111%3A11111111-1111-1111-1111-111111111111',
169
+ accountId: '111111:11111111-1111-1111-1111-111111111111',
170
+ emailAddress: 'alice@example.com',
171
+ avatarUrls: {
172
+ '48x48': 'https://example.com/avatar/alice.png',
173
+ '24x24': 'https://example.com/avatar/alice.png',
174
+ '16x16': 'https://example.com/avatar/alice.png',
175
+ '32x32': 'https://example.com/avatar/alice.png',
176
+ },
177
+ displayName: 'Alice Example',
178
+ active: true,
179
+ timeZone: 'UTC',
180
+ accountType: 'atlassian',
181
+ },
182
+ subtasks: [],
183
+ created: '2024-01-15T09:00:00.000+0000',
184
+ reporter: {
185
+ self: 'https://example.atlassian.net/rest/api/3/user?accountId=111111%3A11111111-1111-1111-1111-111111111111',
186
+ accountId: '111111:11111111-1111-1111-1111-111111111111',
187
+ emailAddress: 'alice@example.com',
188
+ avatarUrls: {
189
+ '48x48': 'https://example.com/avatar/alice.png',
190
+ '24x24': 'https://example.com/avatar/alice.png',
191
+ '16x16': 'https://example.com/avatar/alice.png',
192
+ '32x32': 'https://example.com/avatar/alice.png',
193
+ },
194
+ displayName: 'Alice Example',
195
+ active: true,
196
+ timeZone: 'UTC',
197
+ accountType: 'atlassian',
198
+ },
199
+ aggregateprogress: {
200
+ progress: 0,
201
+ total: 0,
202
+ },
203
+ priority: {
204
+ self: 'https://example.atlassian.net/rest/api/3/priority/3',
205
+ iconUrl: 'https://example.atlassian.net/images/icons/priorities/medium_new.svg',
206
+ name: 'Medium',
207
+ id: '3',
208
+ },
209
+ labels: [],
210
+ environment: null,
211
+ timeestimate: null,
212
+ aggregatetimeoriginalestimate: null,
213
+ versions: [],
214
+ duedate: null,
215
+ progress: {
216
+ progress: 0,
217
+ total: 0,
218
+ },
219
+ issuelinks: [],
220
+ votes: {
221
+ self: 'https://example.atlassian.net/rest/api/3/issue/EXAMPLE-1/votes',
222
+ votes: 0,
223
+ hasVoted: false,
224
+ },
225
+ assignee: {
226
+ self: 'https://example.atlassian.net/rest/api/3/user?accountId=222222%3A22222222-2222-2222-2222-222222222222',
227
+ accountId: '222222:22222222-2222-2222-2222-222222222222',
228
+ emailAddress: 'bob@example.com',
229
+ avatarUrls: {
230
+ '48x48': 'https://example.com/avatar/bob.png',
231
+ '24x24': 'https://example.com/avatar/bob.png',
232
+ '16x16': 'https://example.com/avatar/bob.png',
233
+ '32x32': 'https://example.com/avatar/bob.png',
234
+ },
235
+ displayName: 'Bob Example',
236
+ active: true,
237
+ timeZone: 'UTC',
238
+ accountType: 'atlassian',
239
+ },
240
+ updated: '2024-01-15T10:00:00.000+0000',
241
+ status: {
242
+ self: 'https://example.atlassian.net/rest/api/3/status/10000',
243
+ description: '',
244
+ iconUrl: 'https://example.atlassian.net/images/icons/statuses/generic.png',
245
+ name: 'To Do',
246
+ id: '10000',
247
+ statusCategory: {
248
+ self: 'https://example.atlassian.net/rest/api/3/statuscategory/2',
249
+ id: 2,
250
+ key: 'new',
251
+ colorName: 'blue-gray',
252
+ name: 'To Do',
253
+ },
254
+ },
255
+ },
256
+ },
257
+ change: {
258
+ from: {
259
+ accountId: null,
260
+ displayName: null,
261
+ },
262
+ to: {
263
+ accountId: '222222:22222222-2222-2222-2222-222222222222',
264
+ displayName: 'Bob Example',
265
+ },
266
+ by: {
267
+ self: 'https://example.atlassian.net/rest/api/3/user?accountId=111111%3A11111111-1111-1111-1111-111111111111',
268
+ accountId: '111111:11111111-1111-1111-1111-111111111111',
269
+ emailAddress: 'alice@example.com',
270
+ avatarUrls: {
271
+ '48x48': 'https://example.com/avatar/alice.png',
272
+ '24x24': 'https://example.com/avatar/alice.png',
273
+ '16x16': 'https://example.com/avatar/alice.png',
274
+ '32x32': 'https://example.com/avatar/alice.png',
275
+ },
276
+ displayName: 'Alice Example',
277
+ active: true,
278
+ timeZone: 'UTC',
279
+ accountType: 'atlassian',
280
+ },
281
+ at: '2024-01-15T10:00:00.000+0000',
282
+ },
283
+ },
284
+ onEnable(context) {
285
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
286
+ yield pieces_common_1.pollingHelper.onEnable(polling, context);
287
+ });
288
+ },
289
+ onDisable(context) {
290
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
291
+ yield pieces_common_1.pollingHelper.onDisable(polling, context);
292
+ });
293
+ },
294
+ run(context) {
295
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
296
+ return yield pieces_common_1.pollingHelper.poll(polling, context);
297
+ });
298
+ },
299
+ test(context) {
300
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
301
+ return yield pieces_common_1.pollingHelper.test(polling, context);
302
+ });
303
+ },
304
+ });
305
+ //# sourceMappingURL=issue-assigned.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-assigned.js","sourceRoot":"","sources":["../../../../src/lib/triggers/issue-assigned.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,+DAIqC;AACrC,0DAA0B;AAC1B,qCAAqD;AACrD,sCAA8C;AAC9C,2CAAmD;AAyBnD,MAAM,OAAO,GAQT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE;;QAClD,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,W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AAW;wBACtB,IAAI,EAAE,OAAO;qBACd;iBACF;aACF;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,IAAI;aAClB;YACD,EAAE,EAAE;gBACF,SAAS,EAAE,6CAA6C;gBACxD,WAAW,EAAE,aAAa;aAC3B;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,uGAAuG;gBAC7G,SAAS,EAAE,6CAA6C;gBACxD,YAAY,EAAE,mBAAmB;gBACjC,UAAU,EAAE;oBACV,OAAO,EAAE,sCAAsC;oBAC/C,OAAO,EAAE,sCAAsC;oBAC/C,OAAO,EAAE,sCAAsC;oBAC/C,OAAO,EAAE,sCAAsC;iBAChD;gBACD,WAAW,EAAE,eAAe;gBAC5B,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,WAAW;aACzB;YACD,EAAE,EAAE,8BAA8B;SACnC;KACF;IACK,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"}
@@ -0,0 +1,31 @@
1
+ import { TriggerStrategy } from '@activepieces/pieces-framework';
2
+ export declare const newAttachment: 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-attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-attachment.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAiHxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGxB,CAAC"}
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.newAttachment = 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;
14
+ const { jql, sanitizeJql } = propsValue;
15
+ const since = (0, dayjs_1.default)(lastFetchEpochMS).format('YYYY-MM-DD HH:mm');
16
+ const userScope = jql ? `(${jql}) AND ` : '';
17
+ const searchQuery = `${userScope}updated > '${since}'`;
18
+ const response = yield (0, common_1.searchIssuesByJql)({
19
+ auth,
20
+ jql: searchQuery,
21
+ maxResults: 50,
22
+ sanitizeJql: sanitizeJql !== null && sanitizeJql !== void 0 ? sanitizeJql : false,
23
+ fields: ['summary', 'attachment'],
24
+ expand: ['changelog'],
25
+ });
26
+ const issues = response.issues;
27
+ const results = [];
28
+ for (const issue of issues) {
29
+ const attachmentsById = new Map();
30
+ for (const attachment of (_b = issue.fields.attachment) !== null && _b !== void 0 ? _b : []) {
31
+ attachmentsById.set(attachment.id, attachment);
32
+ }
33
+ const histories = (_d = (_c = issue.changelog) === null || _c === void 0 ? void 0 : _c.histories) !== null && _d !== void 0 ? _d : [];
34
+ for (const history of histories) {
35
+ const changedMS = Date.parse(history.created);
36
+ if (Number.isNaN(changedMS) || changedMS <= lastFetchEpochMS)
37
+ continue;
38
+ for (const item of history.items) {
39
+ const isAttachment = item.field === 'Attachment' || item.fieldId === 'attachment';
40
+ const wasAdded = item.to !== null && item.to !== undefined;
41
+ if (!isAttachment || !wasAdded)
42
+ continue;
43
+ const attachmentDetails = item.to
44
+ ? attachmentsById.get(item.to)
45
+ : undefined;
46
+ results.push({
47
+ epochMilliSeconds: changedMS,
48
+ data: {
49
+ issue: {
50
+ id: issue.id,
51
+ key: issue.key,
52
+ summary: issue.fields.summary,
53
+ },
54
+ attachment: attachmentDetails !== null && attachmentDetails !== void 0 ? attachmentDetails : {
55
+ id: item.to,
56
+ filename: item.toString,
57
+ },
58
+ addedBy: history.author,
59
+ addedAt: history.created,
60
+ },
61
+ });
62
+ }
63
+ }
64
+ }
65
+ return results;
66
+ }),
67
+ };
68
+ exports.newAttachment = (0, pieces_framework_1.createTrigger)({
69
+ name: 'new_attachment',
70
+ displayName: 'New Attachment on Issue',
71
+ description: 'Fires when a file is attached to a Jira issue. Great for auto-saving screenshots to Google Drive, forwarding customer uploads to support tools, or archiving documents in S3.',
72
+ auth: auth_1.jiraCloudAuth,
73
+ type: pieces_framework_1.TriggerStrategy.POLLING,
74
+ props: {
75
+ jql: pieces_framework_1.Property.LongText({
76
+ displayName: 'Only watch these issues (optional)',
77
+ description: `Narrow down which issues to watch. Leave empty to watch every issue in your Jira.
78
+
79
+ Ready-to-use examples:
80
+
81
+ - \`project = "SUPPORT"\` — only the Support project
82
+ - \`issuetype = Bug\` — only bugs
83
+ - \`labels = "screenshot-needed"\` — only issues tagged \`screenshot-needed\`
84
+ - \`project = "SUPPORT" AND status != Done\` — combine with \`AND\`
85
+
86
+ Not sure what to write? Open Jira → Filters → Advanced search, build a filter visually, then copy the query here.`,
87
+ required: false,
88
+ }),
89
+ sanitizeJql: pieces_framework_1.Property.Checkbox({
90
+ displayName: 'Auto-fix the filter',
91
+ 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.",
92
+ required: false,
93
+ defaultValue: true,
94
+ }),
95
+ },
96
+ sampleData: {
97
+ issue: {
98
+ id: '10001',
99
+ key: 'KAN-2',
100
+ summary: 'dss',
101
+ },
102
+ attachment: {
103
+ self: 'https://Jonsworkspace-353579.atlassian.net/rest/api/3/attachment/10000',
104
+ id: '10000',
105
+ filename: 'image_stamped_basic-link-1 (1).pdf',
106
+ author: {
107
+ self: 'https://Jonsworkspace-544.atlassian.net/rest/api/3/user?accountId=dddd%3A17dca26e-0509-41b7-9bfe-d5f6b9bfa943',
108
+ accountId: '712020:17dca26e-0509-41b7-9bfe-d5f6b9bfa943',
109
+ emailAddress: 'Jonde57@gmail.com',
110
+ avatarUrls: {
111
+ '48x48': 'https://secure.gravatar.com/avatar/sssss?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
112
+ '24x24': 'https://secure.gravatar.com/avatar/s?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
113
+ '16x16': 'https://secure.gravatar.com/avatar/shouldComponentUpdate(nextProps, nextState) { first }?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
114
+ '32x32': 'https://secure.gravatar.com/avatar/s?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
115
+ },
116
+ displayName: 'Jon de',
117
+ active: true,
118
+ timeZone: 'Asia/Kolkata',
119
+ accountType: 'atlassian',
120
+ },
121
+ created: '2026-04-23T14:31:38.070+0530',
122
+ size: 116999,
123
+ mimeType: 'application/pdf',
124
+ content: 'https://Jonsworkspace-s.atlassian.net/rest/api/3/attachment/content/10000',
125
+ },
126
+ addedBy: {
127
+ self: 'https://Jonsworkspace-556.atlassian.net/rest/api/3/user?accountId=712020%3A17dca26e-0509-41b7-9bfe-d5f6b9bfa943',
128
+ accountId: '712020:17dca26e-0509-41b7-9bfe-d5f6b9bfa943',
129
+ emailAddress: 'Jonde57@gmail.com',
130
+ avatarUrls: {
131
+ '48x48': 'https://secure.gravatar.com/avatar/fdsdssd?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
132
+ '24x24': 'https://secure.gravatar.com/avatar/fdsdssd?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
133
+ '16x16': 'https://secure.gravatar.com/avatar/fdsdssd?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
134
+ '32x32': 'https://secure.gravatar.com/avatar/fdsdssd?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSN-2.png',
135
+ },
136
+ displayName: 'Jon de',
137
+ active: true,
138
+ timeZone: 'Asia/Kolkata',
139
+ accountType: 'atlassian',
140
+ },
141
+ addedAt: '2026-04-23T14:31:39.121+0530',
142
+ },
143
+ onEnable(context) {
144
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
145
+ yield pieces_common_1.pollingHelper.onEnable(polling, context);
146
+ });
147
+ },
148
+ onDisable(context) {
149
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
150
+ yield pieces_common_1.pollingHelper.onDisable(polling, context);
151
+ });
152
+ },
153
+ run(context) {
154
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
155
+ return yield pieces_common_1.pollingHelper.poll(polling, context);
156
+ });
157
+ },
158
+ test(context) {
159
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
160
+ return yield pieces_common_1.pollingHelper.test(polling, context);
161
+ });
162
+ },
163
+ });
164
+ //# sourceMappingURL=new-attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-attachment.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-attachment.ts"],"names":[],"m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EAAE;YACP,IAAI,EAAE,iHAAiH;YACvH,SAAS,EAAE,6CAA6C;YACxD,YAAY,EAAE,mBAAmB;YACjC,UAAU,EAAE;gBACV,OAAO,EACL,gJAAgJ;gBAClJ,OAAO,EACL,gJAAgJ;gBAClJ,OAAO,EACL,gJAAgJ;gBAClJ,OAAO,EACL,gJAAgJ;aACnJ;YACD,WAAW,EAAE,QAAQ;YACrB,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE,WAAW;SACzB;QACD,OAAO,EAAE,8BAA8B;KACxC;IACK,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"}
@@ -0,0 +1,31 @@
1
+ import { TriggerStrategy } from '@activepieces/pieces-framework';
2
+ export declare const newComment: 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-comment.d.ts.map
@@ -0,0 +1 @@
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"}