@activepieces/piece-jira-cloud 0.3.6 → 0.3.8
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.
- package/package.json +7 -18
- package/src/index.js +109 -71
- package/src/auth.d.ts +0 -8
- package/src/auth.d.ts.map +0 -1
- package/src/auth.js +0 -62
- package/src/auth.js.map +0 -1
- package/src/index.d.ts +0 -6
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-attachment-to-issue.d.ts +0 -26
- package/src/lib/actions/add-attachment-to-issue.d.ts.map +0 -1
- package/src/lib/actions/add-attachment-to-issue.js +0 -46
- package/src/lib/actions/add-attachment-to-issue.js.map +0 -1
- package/src/lib/actions/add-comment-to-issue.d.ts +0 -27
- package/src/lib/actions/add-comment-to-issue.d.ts.map +0 -1
- package/src/lib/actions/add-comment-to-issue.js +0 -70
- package/src/lib/actions/add-comment-to-issue.js.map +0 -1
- package/src/lib/actions/add-watcher-to-issue.d.ts +0 -25
- package/src/lib/actions/add-watcher-to-issue.d.ts.map +0 -1
- package/src/lib/actions/add-watcher-to-issue.js +0 -53
- package/src/lib/actions/add-watcher-to-issue.js.map +0 -1
- package/src/lib/actions/assign-issue.d.ts +0 -34
- package/src/lib/actions/assign-issue.d.ts.map +0 -1
- package/src/lib/actions/assign-issue.js +0 -44
- package/src/lib/actions/assign-issue.js.map +0 -1
- package/src/lib/actions/create-issue.d.ts +0 -35
- package/src/lib/actions/create-issue.d.ts.map +0 -1
- package/src/lib/actions/create-issue.js +0 -137
- package/src/lib/actions/create-issue.js.map +0 -1
- package/src/lib/actions/delete-issue-comment.d.ts +0 -30
- package/src/lib/actions/delete-issue-comment.d.ts.map +0 -1
- package/src/lib/actions/delete-issue-comment.js +0 -69
- package/src/lib/actions/delete-issue-comment.js.map +0 -1
- package/src/lib/actions/find-user.d.ts +0 -8
- package/src/lib/actions/find-user.d.ts.map +0 -1
- package/src/lib/actions/find-user.js +0 -42
- package/src/lib/actions/find-user.js.map +0 -1
- package/src/lib/actions/get-issue-attachment.d.ts +0 -8
- package/src/lib/actions/get-issue-attachment.d.ts.map +0 -1
- package/src/lib/actions/get-issue-attachment.js +0 -53
- package/src/lib/actions/get-issue-attachment.js.map +0 -1
- package/src/lib/actions/get-issue.d.ts +0 -28
- package/src/lib/actions/get-issue.d.ts.map +0 -1
- package/src/lib/actions/get-issue.js +0 -128
- package/src/lib/actions/get-issue.js.map +0 -1
- package/src/lib/actions/link-issues.d.ts +0 -34
- package/src/lib/actions/link-issues.d.ts.map +0 -1
- package/src/lib/actions/link-issues.js +0 -56
- package/src/lib/actions/link-issues.js.map +0 -1
- package/src/lib/actions/list-issue-comments.d.ts +0 -27
- package/src/lib/actions/list-issue-comments.d.ts.map +0 -1
- package/src/lib/actions/list-issue-comments.js +0 -65
- package/src/lib/actions/list-issue-comments.js.map +0 -1
- package/src/lib/actions/markdown-to-jira-format.d.ts +0 -4
- package/src/lib/actions/markdown-to-jira-format.d.ts.map +0 -1
- package/src/lib/actions/markdown-to-jira-format.js +0 -42
- package/src/lib/actions/markdown-to-jira-format.js.map +0 -1
- package/src/lib/actions/search-issues.d.ts +0 -13
- package/src/lib/actions/search-issues.d.ts.map +0 -1
- package/src/lib/actions/search-issues.js +0 -97
- package/src/lib/actions/search-issues.js.map +0 -1
- package/src/lib/actions/transition-issue.d.ts +0 -34
- package/src/lib/actions/transition-issue.d.ts.map +0 -1
- package/src/lib/actions/transition-issue.js +0 -50
- package/src/lib/actions/transition-issue.js.map +0 -1
- package/src/lib/actions/update-issue-comment.d.ts +0 -32
- package/src/lib/actions/update-issue-comment.d.ts.map +0 -1
- package/src/lib/actions/update-issue-comment.js +0 -103
- package/src/lib/actions/update-issue-comment.js.map +0 -1
- package/src/lib/actions/update-issue.d.ts +0 -35
- package/src/lib/actions/update-issue.d.ts.map +0 -1
- package/src/lib/actions/update-issue.js +0 -161
- package/src/lib/actions/update-issue.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -86
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -288
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -96
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -591
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/common/types.d.ts +0 -28
- package/src/lib/common/types.d.ts.map +0 -1
- package/src/lib/common/types.js +0 -26
- package/src/lib/common/types.js.map +0 -1
- package/src/lib/triggers/issue-assigned.d.ts +0 -71
- package/src/lib/triggers/issue-assigned.d.ts.map +0 -1
- package/src/lib/triggers/issue-assigned.js +0 -308
- package/src/lib/triggers/issue-assigned.js.map +0 -1
- package/src/lib/triggers/new-attachment.d.ts +0 -31
- package/src/lib/triggers/new-attachment.d.ts.map +0 -1
- package/src/lib/triggers/new-attachment.js +0 -167
- package/src/lib/triggers/new-attachment.js.map +0 -1
- package/src/lib/triggers/new-comment.d.ts +0 -31
- package/src/lib/triggers/new-comment.d.ts.map +0 -1
- package/src/lib/triggers/new-comment.js +0 -101
- package/src/lib/triggers/new-comment.js.map +0 -1
- package/src/lib/triggers/new-issue.d.ts +0 -31
- package/src/lib/triggers/new-issue.d.ts.map +0 -1
- package/src/lib/triggers/new-issue.js +0 -70
- package/src/lib/triggers/new-issue.js.map +0 -1
- package/src/lib/triggers/updated-issue-status.d.ts +0 -31
- package/src/lib/triggers/updated-issue-status.d.ts.map +0 -1
- package/src/lib/triggers/updated-issue-status.js +0 -70
- package/src/lib/triggers/updated-issue-status.js.map +0 -1
- package/src/lib/triggers/updated-issue.d.ts +0 -31
- package/src/lib/triggers/updated-issue.d.ts.map +0 -1
- package/src/lib/triggers/updated-issue.js +0 -70
- package/src/lib/triggers/updated-issue.js.map +0 -1
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createIssueAction = 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 common_1 = require("../common");
|
|
9
|
-
const types_1 = require("../common/types");
|
|
10
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
11
|
-
const shared_1 = require("@activepieces/shared");
|
|
12
|
-
function getFields(auth, projectId, issueTypeId) {
|
|
13
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
-
const fields = yield (0, common_1.jiraPaginatedApiCall)({
|
|
15
|
-
auth: auth,
|
|
16
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
17
|
-
resourceUri: `/issue/createmeta/${projectId}/issuetypes/${issueTypeId}`,
|
|
18
|
-
propertyName: 'fields',
|
|
19
|
-
});
|
|
20
|
-
if (!fields || !Array.isArray(fields)) {
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
return fields;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
exports.createIssueAction = (0, pieces_framework_1.createAction)({
|
|
27
|
-
name: 'create_issue',
|
|
28
|
-
displayName: 'Create Issue',
|
|
29
|
-
description: 'Creates a new issue in a project.',
|
|
30
|
-
audience: 'both',
|
|
31
|
-
aiMetadata: {
|
|
32
|
-
description: 'Create a new Jira issue in a given project and issue type, with fields driven by that type\'s create screen (summary, description, custom fields, etc.); selected rich-text fields can be supplied as raw ADF JSON. Use for brand-new work items — to modify an existing one use Update Issue. Not idempotent: every run creates another issue.',
|
|
33
|
-
idempotent: false,
|
|
34
|
-
},
|
|
35
|
-
auth: auth_1.jiraCloudAuth,
|
|
36
|
-
props: {
|
|
37
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
38
|
-
issueTypeId: (0, props_1.issueTypeIdProp)('Issue Type'),
|
|
39
|
-
issueFields: pieces_framework_1.Property.DynamicProperties({
|
|
40
|
-
auth: auth_1.jiraCloudAuth,
|
|
41
|
-
displayName: 'Fields',
|
|
42
|
-
required: true,
|
|
43
|
-
refreshers: ['projectId', 'issueTypeId'],
|
|
44
|
-
props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, projectId, issueTypeId }) {
|
|
45
|
-
if (!auth || !issueTypeId || !projectId) {
|
|
46
|
-
return {};
|
|
47
|
-
}
|
|
48
|
-
const props = {};
|
|
49
|
-
const authValue = auth;
|
|
50
|
-
const projectIdValue = projectId;
|
|
51
|
-
const issueTypeIdValue = issueTypeId;
|
|
52
|
-
const fields = yield getFields(authValue, projectIdValue, issueTypeIdValue);
|
|
53
|
-
for (const field of fields) {
|
|
54
|
-
// skip invalid custom fields
|
|
55
|
-
if (field.schema.custom) {
|
|
56
|
-
const customFieldType = field.schema.custom.split(':')[1];
|
|
57
|
-
if (!types_1.VALID_CUSTOM_FIELD_TYPES.includes(customFieldType)) {
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (['project', 'issuetype'].includes(field.key)) {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
props[field.key] = yield (0, props_1.createPropertyDefinition)(authValue, field, field.required);
|
|
65
|
-
}
|
|
66
|
-
// Remove null props
|
|
67
|
-
return Object.fromEntries(Object.entries(props).filter(([_, prop]) => prop !== null));
|
|
68
|
-
}),
|
|
69
|
-
}),
|
|
70
|
-
adfFields: pieces_framework_1.Property.MultiSelectDropdown({
|
|
71
|
-
auth: auth_1.jiraCloudAuth,
|
|
72
|
-
displayName: 'Fields in JSON Atlassian Document Format',
|
|
73
|
-
description: 'https://developer.atlassian.com/cloud/jira/platform/apis/document/structure',
|
|
74
|
-
required: false,
|
|
75
|
-
refreshers: ['projectId', 'issueTypeId'],
|
|
76
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, projectId, issueTypeId }) {
|
|
77
|
-
if (!auth || !issueTypeId || !projectId) {
|
|
78
|
-
return {
|
|
79
|
-
disabled: true,
|
|
80
|
-
options: [],
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
const authValue = auth;
|
|
84
|
-
const projectIdValue = projectId;
|
|
85
|
-
const issueTypeIdValue = issueTypeId;
|
|
86
|
-
const fields = yield getFields(authValue, projectIdValue, issueTypeIdValue);
|
|
87
|
-
const adfCompatibleFields = fields.filter(props_1.isFieldAdfCompatible);
|
|
88
|
-
const fieldOptions = adfCompatibleFields.map(field => ({
|
|
89
|
-
label: field.name,
|
|
90
|
-
value: field.key,
|
|
91
|
-
}));
|
|
92
|
-
return {
|
|
93
|
-
disabled: false,
|
|
94
|
-
options: fieldOptions,
|
|
95
|
-
};
|
|
96
|
-
}),
|
|
97
|
-
}),
|
|
98
|
-
},
|
|
99
|
-
run(context) {
|
|
100
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
var _a;
|
|
102
|
-
const { projectId, issueTypeId, adfFields } = context.propsValue;
|
|
103
|
-
const inputIssueFields = (_a = context.propsValue.issueFields) !== null && _a !== void 0 ? _a : {};
|
|
104
|
-
if ((0, shared_1.isNil)(projectId) || (0, shared_1.isNil)(issueTypeId)) {
|
|
105
|
-
throw new Error('Project ID and Issue Type ID are required');
|
|
106
|
-
}
|
|
107
|
-
const issueTypeFields = yield (0, common_1.jiraPaginatedApiCall)({
|
|
108
|
-
auth: context.auth,
|
|
109
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
110
|
-
resourceUri: `/issue/createmeta/${projectId}/issuetypes/${issueTypeId}`,
|
|
111
|
-
propertyName: 'fields',
|
|
112
|
-
});
|
|
113
|
-
const formattedAdfFields = adfFields || [];
|
|
114
|
-
const formattedFields = (0, props_1.formatIssueFields)(issueTypeFields, inputIssueFields, formattedAdfFields);
|
|
115
|
-
const response = yield (0, common_1.jiraApiCall)({
|
|
116
|
-
auth: context.auth,
|
|
117
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
118
|
-
resourceUri: `/issue`,
|
|
119
|
-
body: {
|
|
120
|
-
fields: Object.assign({ issuetype: {
|
|
121
|
-
id: issueTypeId,
|
|
122
|
-
}, project: {
|
|
123
|
-
id: projectId,
|
|
124
|
-
} }, formattedFields),
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
const issue = yield (0, common_1.jiraApiCall)({
|
|
128
|
-
auth: context.auth,
|
|
129
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
130
|
-
resourceUri: `/issue/${response.id}`,
|
|
131
|
-
});
|
|
132
|
-
const updatedIssueProperties = (0, props_1.transformCustomFields)(issueTypeFields, issue.fields);
|
|
133
|
-
return Object.assign(Object.assign({}, issue), { fields: updatedIssueProperties });
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
//# sourceMappingURL=create-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAA2F;AAC3F,qCAAqD;AACrD,2CAOyB;AACzB,sCAA8D;AAC9D,2CAA+E;AAC/E,+DAAyD;AACzD,iDAA6C;AAE7C,SAAe,SAAS,CAAC,IAAc,EAAE,SAAiB,EAAE,WAAmB;;QAC9E,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAoB,EAA+B;YACvE,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,WAAW,EAAE,qBAAqB,SAAS,eAAe,WAAW,EAAE;YACvE,YAAY,EAAE,QAAQ;SACtB,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,OAAO,EAAE,CAAC;QACX,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CAAA;AAEY,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAA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CAClB;iBACD;aACD,CAAC,CAAC;YAEH,MAAM,KAAK,GAAG,MAAM,IAAA,oBAAW,EAK5B;gBACF,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,WAAW,EAAE,UAAU,QAAQ,CAAC,EAAE,EAAE;aACpC,CAAC,CAAC;YAEH,MAAM,sBAAsB,GAAG,IAAA,6BAAqB,EAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAEpF,uCACI,KAAK,KACR,MAAM,EAAE,sBAAsB,IAC7B;QACH,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const deleteIssueCommentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
projectId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
12
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
-
}>>;
|
|
15
|
-
issueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
18
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
19
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
20
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
23
|
-
}>>;
|
|
24
|
-
commentId: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
25
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
27
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
|
-
}>>;
|
|
29
|
-
}>;
|
|
30
|
-
//# sourceMappingURL=delete-issue-comment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-issue-comment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-issue-comment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DnC,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
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.jiraCloudAuth,
|
|
12
|
-
name: 'delete_issue_comment',
|
|
13
|
-
displayName: 'Delete Issue Comment',
|
|
14
|
-
description: 'Deletes a comment on a specific issue.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Permanently remove a specific comment (by comment ID) from a Jira issue. Use to clean up an outdated or incorrect comment; the deletion cannot be undone. Idempotent in effect — the comment ends up gone either way — though a repeat call on an already-deleted comment returns a not-found error.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
22
|
-
issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
|
|
23
|
-
commentId: pieces_framework_1.Property.Dropdown({
|
|
24
|
-
auth: auth_1.jiraCloudAuth,
|
|
25
|
-
displayName: 'Comment ID',
|
|
26
|
-
refreshers: ['issueId'],
|
|
27
|
-
required: true,
|
|
28
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, issueId }) {
|
|
29
|
-
if (!auth || !issueId) {
|
|
30
|
-
return {
|
|
31
|
-
disabled: true,
|
|
32
|
-
placeholder: 'Please connect your account and select issue.',
|
|
33
|
-
options: [],
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
37
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
38
|
-
url: `issue/${issueId}/comment`,
|
|
39
|
-
auth: auth,
|
|
40
|
-
queryParams: {
|
|
41
|
-
orderBy: '-created',
|
|
42
|
-
expand: 'renderedBody',
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
return {
|
|
46
|
-
disabled: false,
|
|
47
|
-
options: response.body.comments.map((comment) => {
|
|
48
|
-
return {
|
|
49
|
-
label: comment.renderedBody,
|
|
50
|
-
value: comment.id,
|
|
51
|
-
};
|
|
52
|
-
}),
|
|
53
|
-
};
|
|
54
|
-
}),
|
|
55
|
-
}),
|
|
56
|
-
},
|
|
57
|
-
run(context) {
|
|
58
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const { issueId, commentId } = context.propsValue;
|
|
60
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
61
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
62
|
-
url: `issue/${issueId}/comment/${commentId}`,
|
|
63
|
-
auth: context.auth,
|
|
64
|
-
});
|
|
65
|
-
return response.body;
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
//# sourceMappingURL=delete-issue-comment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-issue-comment.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-issue-comment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA2C;AAC3C,+DAAyD;AACzD,sCAA4C;AAC5C,2CAA2E;AAE9D,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,wCAAwC;IACrD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACX,WAAW,EACV,sSAAsS;QACvS,UAAU,EAAE,IAAI;KAChB;IACD,KAAK,EAAE;QACN,SAAS,EAAE,IAAA,4BAAoB,GAAE;QACjC,OAAO,EAAE,IAAA,0BAAkB,EAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,SAAS,EAAE,2BAAQ,CAAC,QAAQ,CAAqC;YAChE,IAAI,EAAE,oBAAa;YACnB,WAAW,EAAE,YAAY;YACzB,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,Q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IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
keyword: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=find-user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-user.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-user.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;;EAgCzB,CAAA"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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.jiraCloudAuth,
|
|
11
|
-
name: 'find-user',
|
|
12
|
-
displayName: 'Find User',
|
|
13
|
-
description: 'Finds an existing user.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Search Jira users by a keyword matched against display name and email, returning all matches plus a found flag. Use to resolve a person\'s name or email into a Jira accountId before assigning issues or adding watchers. Read-only and idempotent.',
|
|
17
|
-
idempotent: true,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
keyword: pieces_framework_1.Property.ShortText({
|
|
21
|
-
displayName: 'Keyword',
|
|
22
|
-
required: true,
|
|
23
|
-
})
|
|
24
|
-
},
|
|
25
|
-
run(context) {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const response = yield (0, common_1.jiraApiCall)({
|
|
28
|
-
auth: context.auth,
|
|
29
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
30
|
-
resourceUri: '/user/search',
|
|
31
|
-
query: {
|
|
32
|
-
query: context.propsValue.keyword
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
found: response.length > 0,
|
|
37
|
-
data: response
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=find-user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-user.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-user.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA2C;AAC3C,sCAAwC;AACxC,+DAAyD;AAE5C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAC,oBAAa;IAClB,IAAI,EAAC,WAAW;IAChB,WAAW,EAAC,WAAW;IACvB,WAAW,EAAC,yBAAyB;IACrC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACR,WAAW,EACP,sPAAsP;QAC1P,UAAU,EAAE,IAAI;KACnB;IACD,KAAK,EAAC;QACF,OAAO,EAAC,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAC,SAAS;YACrB,QAAQ,EAAC,IAAI;SAChB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAA4B;gBAC1D,IAAI,EAAC,OAAO,CAAC,IAAI;gBACjB,MAAM,EAAC,0BAAU,CAAC,GAAG;gBACrB,WAAW,EAAC,cAAc;gBAC1B,KAAK,EAAC;oBACF,KAAK,EAAC,OAAO,CAAC,UAAU,CAAC,OAAO;iBACnC;aACJ,CAAC,CAAA;YAEF,OAAM;gBACF,KAAK,EAAC,QAAQ,CAAC,MAAM,GAAC,CAAC;gBACvB,IAAI,EAAC,QAAQ;aAChB,CAAA;QACL,CAAC;KAAA;CACJ,CAAC,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const getIssueAttachmentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
attachmentId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=get-issue-attachment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue-attachment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue-attachment.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;;;;;EAiDnC,CAAA"}
|
|
@@ -1,53 +0,0 @@
|
|
|
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.jiraCloudAuth,
|
|
11
|
-
name: 'get-issue-attachment',
|
|
12
|
-
displayName: 'Get Issue Attachment',
|
|
13
|
-
description: 'Retrieves an attachment from an issue.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Download a Jira attachment by its attachment ID, fetching both its metadata and the file content itself for use in later steps. Use when you already have the attachment ID (e.g. from Get Issue) and need the actual file, not just a link. Read-only and idempotent.',
|
|
17
|
-
idempotent: true,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
attachmentId: pieces_framework_1.Property.ShortText({
|
|
21
|
-
displayName: 'Attachment ID',
|
|
22
|
-
required: true
|
|
23
|
-
})
|
|
24
|
-
},
|
|
25
|
-
run(context) {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const { attachmentId } = context.propsValue;
|
|
28
|
-
// https://community.developer.atlassian.com/t/download-attachment-from-rest-api/40860/2
|
|
29
|
-
const attachmentResponse = yield (0, common_1.jiraApiCall)({
|
|
30
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
31
|
-
resourceUri: `/attachment/${attachmentId}`,
|
|
32
|
-
auth: context.auth,
|
|
33
|
-
});
|
|
34
|
-
const { filename, content } = attachmentResponse;
|
|
35
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
36
|
-
url: content,
|
|
37
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
38
|
-
authentication: {
|
|
39
|
-
type: pieces_common_1.AuthenticationType.BASIC,
|
|
40
|
-
username: context.auth.props.email,
|
|
41
|
-
password: context.auth.props.apiToken,
|
|
42
|
-
},
|
|
43
|
-
responseType: 'arraybuffer',
|
|
44
|
-
followRedirects: true,
|
|
45
|
-
});
|
|
46
|
-
return Object.assign(Object.assign({}, attachmentResponse), { file: yield context.files.write({
|
|
47
|
-
fileName: filename,
|
|
48
|
-
data: Buffer.from(response.body)
|
|
49
|
-
}) });
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=get-issue-attachment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue-attachment.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue-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,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;oBAC5B,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;iBACnC,CAAC,IACL;QACL,CAAC;KAAA;CACJ,CAAC,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare const getIssueAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
projectId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
12
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
-
}>>;
|
|
15
|
-
issueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
18
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
19
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
20
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
23
|
-
}>>;
|
|
24
|
-
expand: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
25
|
-
mapNames: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
26
|
-
mapTransitions: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
27
|
-
}>;
|
|
28
|
-
//# sourceMappingURL=get-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IzB,CAAC"}
|
|
@@ -1,128 +0,0 @@
|
|
|
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
|
-
exports.getIssueAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.jiraCloudAuth,
|
|
12
|
-
name: 'get_issue',
|
|
13
|
-
displayName: 'Get Issue',
|
|
14
|
-
description: 'Get issue data.',
|
|
15
|
-
audience: 'both',
|
|
16
|
-
aiMetadata: {
|
|
17
|
-
description: 'Fetch a single Jira issue by project and issue, optionally expanding extras like rendered fields, transitions, edit metadata, or changelog, and optionally remapping cryptic field/transition IDs to human-readable names. Use when you know which issue you want; to find issues by criteria use Search Issues instead. Read-only and idempotent.',
|
|
18
|
-
idempotent: true,
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
22
|
-
issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
|
|
23
|
-
expand: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
24
|
-
displayName: 'Expand',
|
|
25
|
-
description: 'Include additional information about the issue in the response',
|
|
26
|
-
required: false,
|
|
27
|
-
options: {
|
|
28
|
-
options: [
|
|
29
|
-
{
|
|
30
|
-
label: 'Rendered Fields',
|
|
31
|
-
value: 'renderedFields',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: 'Names',
|
|
35
|
-
value: 'names',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
label: 'Schema',
|
|
39
|
-
value: 'schema',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: 'Transitions',
|
|
43
|
-
value: 'transitions',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: 'Edit Meta',
|
|
47
|
-
value: 'editmeta',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: 'Changelog',
|
|
51
|
-
value: 'changelog',
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
mapNames: pieces_framework_1.Property.Checkbox({
|
|
57
|
-
displayName: 'Map Field Names',
|
|
58
|
-
description: `
|
|
59
|
-
Map human readable names to Fields, Rendered Fields, Schema and Edit Meta.
|
|
60
|
-
Notes:
|
|
61
|
-
- This would implicitly add "names" to the expand field
|
|
62
|
-
- If there are fields with the same name, they may be overridden
|
|
63
|
-
`.trim(),
|
|
64
|
-
required: true,
|
|
65
|
-
defaultValue: false,
|
|
66
|
-
}),
|
|
67
|
-
mapTransitions: pieces_framework_1.Property.Checkbox({
|
|
68
|
-
displayName: 'Map Transition Names',
|
|
69
|
-
description: `
|
|
70
|
-
Map human readable names to Transitions.
|
|
71
|
-
Notes:
|
|
72
|
-
- If there are transitions with the same name, they may be overridden
|
|
73
|
-
- This changes the original data structure from list to map
|
|
74
|
-
`.trim(),
|
|
75
|
-
required: true,
|
|
76
|
-
defaultValue: false,
|
|
77
|
-
}),
|
|
78
|
-
},
|
|
79
|
-
run(context) {
|
|
80
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
var _a;
|
|
82
|
-
const { issueId, expand, mapNames, mapTransitions } = context.propsValue;
|
|
83
|
-
const queryParams = {};
|
|
84
|
-
let expandParams = expand;
|
|
85
|
-
// implicitly expand names which is needed for mapping
|
|
86
|
-
if (mapNames) {
|
|
87
|
-
expandParams = [...new Set(expandParams).add('names')];
|
|
88
|
-
}
|
|
89
|
-
if (expandParams) {
|
|
90
|
-
queryParams['expand'] = expandParams.join(',');
|
|
91
|
-
}
|
|
92
|
-
// https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get
|
|
93
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
94
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
95
|
-
url: `issue/${issueId}`,
|
|
96
|
-
auth: context.auth,
|
|
97
|
-
queryParams: queryParams,
|
|
98
|
-
});
|
|
99
|
-
const data = response.body;
|
|
100
|
-
if (mapNames) {
|
|
101
|
-
const fieldNames = data.names || {};
|
|
102
|
-
const mappedFields = (0, common_1.mapFieldNames)(data.fields, fieldNames);
|
|
103
|
-
data['fields'] = mappedFields;
|
|
104
|
-
if (data.renderedFields) {
|
|
105
|
-
const mappedRenderedFields = (0, common_1.mapFieldNames)(data.renderedFields, fieldNames);
|
|
106
|
-
data['renderedFields'] = mappedRenderedFields;
|
|
107
|
-
}
|
|
108
|
-
if (data.schema) {
|
|
109
|
-
const mappedSchemaFields = (0, common_1.mapFieldNames)(data.schema, fieldNames);
|
|
110
|
-
data['schema'] = mappedSchemaFields;
|
|
111
|
-
}
|
|
112
|
-
if ((_a = data.editmeta) === null || _a === void 0 ? void 0 : _a.fields) {
|
|
113
|
-
const mappedEditmetaFields = (0, common_1.mapFieldNames)(data.editmeta.fields, fieldNames);
|
|
114
|
-
data['editmeta']['fields'] = mappedEditmetaFields;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (mapTransitions && data.transitions) {
|
|
118
|
-
const mappedTransitions = data.transitions.reduce((acc, transition) => {
|
|
119
|
-
acc[transition.name] = transition;
|
|
120
|
-
return acc;
|
|
121
|
-
}, {});
|
|
122
|
-
data['transitions'] = mappedTransitions;
|
|
123
|
-
}
|
|
124
|
-
return data;
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
//# sourceMappingURL=get-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA2C;AAC3C,+DAAsE;AACtE,sCAA2D;AAC3D,2CAA2E;AAE9D,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,iBAAiB;IAC9B,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EACT,oVAAoV;QACtV,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,IAAA,4BAAoB,GAAE;QACjC,OAAO,EAAE,IAAA,0BAAkB,EAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,MAAM,EAAE,2BAAQ,CAAC,yBAAyB,CAAC;YACzC,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,gEAAgE;YAClE,QAAQ,EAAE,KAAK;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AAC,WAAW,EAAE,CAAC;gBACvC,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAC/C,CAAC,GAAwB,EAAE,UAAe,EAAE,EAAE;oBAC5C,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;oBAClC,OAAO,GAAG,CAAC;gBACb,CAAC,EACD,EAAE,CACH,CAAC;gBAEF,IAAI,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC;YAC1C,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const linkIssuesAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
firstIssueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
12
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
-
}>>;
|
|
15
|
-
issueLinkTypeId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
18
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
19
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
20
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
23
|
-
}>>;
|
|
24
|
-
secondIssueId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
25
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
27
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
|
-
}>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
29
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
30
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
31
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
32
|
-
}>>;
|
|
33
|
-
}>;
|
|
34
|
-
//# sourceMappingURL=link-issues.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-issues.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/link-issues.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C3B,CAAC"}
|