@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.
- 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 -41
- 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 -65
- 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 -48
- 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 -39
- 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 -132
- 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 -64
- 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 -37
- 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 -48
- 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 -123
- 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 -51
- 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 -60
- 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 -37
- 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 -92
- 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 -45
- 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 -98
- 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 -156
- 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 -305
- 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 -164
- 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 -98
- 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 -67
- 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 -67
- 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 -67
- package/src/lib/triggers/updated-issue.js.map +0 -1
package/src/auth.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AppConnectionValueForAuthProperty } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const jiraCloudAuth: 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
|
-
export type JiraAuth = AppConnectionValueForAuthProperty<typeof jiraCloudAuth>;
|
|
8
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/src/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EAGlC,MAAM,gCAAgC,CAAC;AAOxC,eAAO,MAAM,aAAa;;;;EAkDxB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,iCAAiC,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/src/auth.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jiraCloudAuth = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("./lib/common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
const zod_1 = require("zod");
|
|
9
|
-
const pieces_common_2 = require("@activepieces/pieces-common");
|
|
10
|
-
const shared_1 = require("@activepieces/shared");
|
|
11
|
-
exports.jiraCloudAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
12
|
-
description: `
|
|
13
|
-
You can generate your API token from:
|
|
14
|
-
***https://id.atlassian.com/manage-profile/security/api-tokens***
|
|
15
|
-
`,
|
|
16
|
-
required: true,
|
|
17
|
-
props: {
|
|
18
|
-
instanceUrl: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'Instance URL',
|
|
20
|
-
description: 'The link of your Jira instance (e.g https://example.atlassian.net)',
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
email: pieces_framework_1.Property.ShortText({
|
|
24
|
-
displayName: 'Email',
|
|
25
|
-
description: 'The email you use to login to Jira',
|
|
26
|
-
required: true,
|
|
27
|
-
}),
|
|
28
|
-
apiToken: pieces_framework_1.PieceAuth.SecretText({
|
|
29
|
-
displayName: 'API Token',
|
|
30
|
-
description: 'Your Jira API Token',
|
|
31
|
-
required: true,
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
35
|
-
var _b, _c;
|
|
36
|
-
try {
|
|
37
|
-
yield pieces_common_2.propsValidation.validateZod(auth, {
|
|
38
|
-
instanceUrl: zod_1.z.string().url(),
|
|
39
|
-
email: zod_1.z.string().email(),
|
|
40
|
-
});
|
|
41
|
-
yield (0, common_1.sendJiraRequest)({
|
|
42
|
-
auth: {
|
|
43
|
-
type: shared_1.AppConnectionType.CUSTOM_AUTH,
|
|
44
|
-
props: auth,
|
|
45
|
-
},
|
|
46
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
47
|
-
url: 'myself',
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
valid: true,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
const message = (_c = (_b = e.response) === null || _b === void 0 ? void 0 : _b.body) === null || _c === void 0 ? void 0 : _c.message;
|
|
55
|
-
return {
|
|
56
|
-
valid: false,
|
|
57
|
-
error: message !== null && message !== void 0 ? message : 'Invalid credentials',
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=auth.js.map
|
package/src/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,yCAA+C;AAC/C,+DAAoE;AACpE,6BAAwB;AACxB,+DAA8D;AAC9D,iDAAyD;AAE5C,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE;;;KAGV;IACH,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,oEAAoE;YACtE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC7B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACvB,IAAI,CAAC;YACH,MAAM,+BAAe,CAAC,WAAW,CAAC,IAAI,EAAE;gBACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;gBAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;aAC1B,CAAC,CAAC;YAEH,MAAM,IAAA,wBAAe,EAAC;gBACpB,IAAI,EAAE;oBACJ,IAAI,EAAE,0BAAiB,CAAC,WAAW;oBACnC,KAAK,EAAE,IAAI;iBACZ;gBACD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,QAAQ;aACd,CAAC,CAAC;YACH,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,OAAO,GAAG,MAAC,MAAC,CAAe,CAAC,QAAQ,0CAAE,IAAY,0CAAE,OAAO,CAAC;YAClE,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,qBAAqB;aACxC,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|
package/src/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const jiraCloud: import("@activepieces/pieces-framework").Piece<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
|
-
//# sourceMappingURL=index.d.ts.map
|
package/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,SAAS;;;;GA0CpB,CAAC"}
|
package/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAE7D,+DAAwE;AACxE,iDAAqD;AACrD,iCAAiD;AACjD,6DAA+D;AAC/D,+DAA2D;AAC3D,wDAAoD;AACpD,gEAA4D;AAC5D,8EAAyE;AACzE,6EAA6E;AAC7E,mFAAmF;AACnF,6EAA8E;AAC9E,6EAA8E;AAC9E,6DAA+D;AAC/D,6DAA+D;AAC/D,2EAA4E;AAC5E,uDAAyD;AACzD,6EAA6E;AAC7E,2DAA6D;AAC7D,6EAA8E;AAC9E,mFAA6E;AAC7E,uDAAyD;AACzD,qEAAuE;AACvE,4DAAwD;AACxD,kEAA8D;AAC9D,kEAA8D;AAEjD,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,uCAAuC;IAEpD,IAAI,EAAE,oBAAa;IACnB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8CAA8C;IACvD,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,CAAC;IACnF,OAAO,EAAE;QACR,gCAAiB;QACjB,gCAAiB;QACjB,0BAAc;QACd,4BAAY;QACZ,gCAAiB;QACjB,oDAA0B;QAC1B,+CAAwB;QACxB,8CAAuB;QACvB,8CAAuB;QACvB,+CAAwB;QACxB,8BAAgB;QAChB,6CAAuB;QACvB,+CAAwB;QACxB,8CAAoB;QACpB,0BAAc;QACd,wCAAqB;QACrB,IAAA,yCAAyB,EAAC;YACzB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjB,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,WAAW,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,CAAC;YACD,IAAI,EAAE,oBAAa;YACnB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC3B,MAAM,SAAS,GAAG,IAAgB,CAAC;gBACnC,OAAO;oBACN,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CACnG,QAAQ,CACR,EAAE;iBACH,CAAC;YACH,CAAC,CAAA;SACD,CAAC;KACF;IACD,QAAQ,EAAE,CAAC,oBAAQ,EAAE,4BAAY,EAAE,yCAAkB,EAAE,wBAAU,EAAE,8BAAa,EAAE,8BAAa,CAAC;CAChG,CAAC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const addAttachmentToIssueAction: 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
|
-
attachment: import("@activepieces/pieces-framework").FileProperty<true>;
|
|
25
|
-
}>;
|
|
26
|
-
//# sourceMappingURL=add-attachment-to-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-attachment-to-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-attachment-to-issue.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;EA+BrC,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addAttachmentToIssueAction = 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 form_data_1 = tslib_1.__importDefault(require("form-data"));
|
|
10
|
-
const props_1 = require("../common/props");
|
|
11
|
-
exports.addAttachmentToIssueAction = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth: auth_1.jiraCloudAuth,
|
|
13
|
-
name: 'add_issue_attachment',
|
|
14
|
-
displayName: 'Add Attachment to Issue',
|
|
15
|
-
description: 'Adds an attachment to an issue.',
|
|
16
|
-
props: {
|
|
17
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
18
|
-
issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
|
|
19
|
-
attachment: pieces_framework_1.Property.File({
|
|
20
|
-
displayName: 'Attachment',
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
run(context) {
|
|
25
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const { issueId, attachment } = context.propsValue;
|
|
27
|
-
const formData = new form_data_1.default();
|
|
28
|
-
const fileBuffer = Buffer.from(attachment.base64, 'base64');
|
|
29
|
-
formData.append('file', fileBuffer, attachment.filename);
|
|
30
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
31
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
32
|
-
url: `issue/${issueId}/attachments`,
|
|
33
|
-
auth: context.auth,
|
|
34
|
-
headers: Object.assign({ 'X-Atlassian-Token': 'no-check' }, formData.getHeaders()),
|
|
35
|
-
body: formData,
|
|
36
|
-
});
|
|
37
|
-
return response.body;
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=add-attachment-to-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-attachment-to-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-attachment-to-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA2C;AAC3C,+DAAyD;AACzD,sCAA4C;AAC5C,kEAAiC;AACjC,2CAA2E;AAE9D,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACN,SAAS,EAAE,IAAA,4BAAoB,GAAE;QACjC,OAAO,EAAE,IAAA,0BAAkB,EAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,UAAU,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnD,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;YAChC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC5D,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;YAEzD,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAC;gBACtC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,SAAS,OAAO,cAAc;gBACnC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,OAAO,kBACN,mBAAmB,EAAE,UAAU,IAC5B,QAAQ,CAAC,UAAU,EAAE,CACxB;gBACD,IAAI,EAAE,QAAQ;aACd,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const addCommentToIssueAction: 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
|
-
comment: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
25
|
-
isADF: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
26
|
-
}>;
|
|
27
|
-
//# sourceMappingURL=add-comment-to-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-comment-to-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-comment-to-issue.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;EAsDlC,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addCommentToIssueAction = 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.addCommentToIssueAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.jiraCloudAuth,
|
|
12
|
-
name: 'add_issue_comment',
|
|
13
|
-
displayName: 'Add Issue Comment',
|
|
14
|
-
description: 'Adds a comment to an issue.',
|
|
15
|
-
props: {
|
|
16
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
17
|
-
issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
|
|
18
|
-
comment: pieces_framework_1.Property.LongText({
|
|
19
|
-
displayName: 'Comment Body',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
isADF: pieces_framework_1.Property.Checkbox({
|
|
23
|
-
displayName: 'Comment is in JSON Atlassian Document Format',
|
|
24
|
-
description: 'https://developer.atlassian.com/cloud/jira/platform/apis/document/structure',
|
|
25
|
-
required: false,
|
|
26
|
-
defaultValue: false,
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
run(context) {
|
|
30
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const { issueId, comment, isADF } = context.propsValue;
|
|
32
|
-
let commentBody = {};
|
|
33
|
-
if (isADF) {
|
|
34
|
-
commentBody = JSON.parse(comment);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
commentBody = {
|
|
38
|
-
version: 1,
|
|
39
|
-
type: 'doc',
|
|
40
|
-
content: [
|
|
41
|
-
{
|
|
42
|
-
type: 'paragraph',
|
|
43
|
-
content: [
|
|
44
|
-
{
|
|
45
|
-
type: 'text',
|
|
46
|
-
text: comment,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
54
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
55
|
-
url: `issue/${issueId}/comment`,
|
|
56
|
-
auth: context.auth,
|
|
57
|
-
body: {
|
|
58
|
-
body: commentBody,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
return response.body;
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=add-comment-to-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-comment-to-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-comment-to-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qCAA2C;AAC3C,+DAAyD;AACzD,sCAA4C;AAC5C,2CAA2E;AAE9D,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACN,SAAS,EAAE,IAAA,4BAAoB,GAAE;QACjC,OAAO,EAAE,IAAA,0BAAkB,EAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACrB,WAAW,EAAE,8CAA8C;YAC9D,WAAW,EAAE,6EAA6E;YACvF,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACJ;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvD,IAAI,WAAW,GAAG,EAAE,CAAA;YAEpB,IAAI,KAAK,EAAE,CAAC;gBACX,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACP,WAAW,GAAG;oBACb,OAAO,EAAE,CAAC;oBACV,IAAI,EAAE,KAAK;oBACX,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,WAAW;4BACjB,OAAO,EAAE;gCACR;oCACC,IAAI,EAAE,MAAM;oCACZ,IAAI,EAAE,OAAO;iCACb;6BACD;yBACD;qBACD;iBACD,CAAC;YACH,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAC;gBACtC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,SAAS,OAAO,UAAU;gBAC/B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE;oBACL,IAAI,EAAE,WAAW;iBACjB;aACD,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const addWatcherToIssueAction: 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
|
-
issueId: 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
|
-
userId: import("@activepieces/pieces-framework").DropdownProperty<any, 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<any, 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
|
-
}>;
|
|
25
|
-
//# sourceMappingURL=add-watcher-to-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-watcher-to-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-watcher-to-issue.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;EAmClC,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addWatcherToIssueAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const auth_1 = require("../../auth");
|
|
7
|
-
const props_1 = require("../common/props");
|
|
8
|
-
const shared_1 = require("@activepieces/shared");
|
|
9
|
-
const common_1 = require("../common");
|
|
10
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
11
|
-
exports.addWatcherToIssueAction = (0, pieces_framework_1.createAction)({
|
|
12
|
-
auth: auth_1.jiraCloudAuth,
|
|
13
|
-
name: 'add-watcher-to-issue',
|
|
14
|
-
displayName: 'Add Watcher to Issue',
|
|
15
|
-
description: 'Adds a new watcher to an issue.',
|
|
16
|
-
props: {
|
|
17
|
-
issueId: (0, props_1.issueIdOrKeyProp)('Issue ID or Key', true),
|
|
18
|
-
userId: (0, props_1.getUsersDropdown)({
|
|
19
|
-
displayName: 'User',
|
|
20
|
-
refreshers: [],
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
run(context) {
|
|
25
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const { issueId, userId } = context.propsValue;
|
|
27
|
-
if ((0, shared_1.isNil)(issueId)) {
|
|
28
|
-
throw new Error('Issue ID is required');
|
|
29
|
-
}
|
|
30
|
-
if ((0, shared_1.isNil)(userId)) {
|
|
31
|
-
throw new Error('User ID is required');
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
const response = yield (0, common_1.jiraApiCall)({
|
|
35
|
-
auth: context.auth,
|
|
36
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
37
|
-
resourceUri: `/issue/${issueId}/watchers`,
|
|
38
|
-
body: `"${userId}"`,
|
|
39
|
-
});
|
|
40
|
-
return { success: true };
|
|
41
|
-
}
|
|
42
|
-
catch (e) {
|
|
43
|
-
return { success: false, error: e.message };
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=add-watcher-to-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-watcher-to-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-watcher-to-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,qCAA2C;AAC3C,2CAAqE;AACrE,iDAA6C;AAC7C,sCAAwC;AACxC,+DAAoE;AAEvD,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACN,OAAO,EAAE,IAAA,wBAAgB,EAAC,iBAAiB,EAAE,IAAI,CAAC;QAClD,MAAM,EAAE,IAAA,wBAAgB,EAAC;YACxB,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,IAAI,IAAA,cAAK,EAAC,OAAO,CAAC,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,IAAA,cAAK,EAAC,MAAM,CAAC,EAAE,CAAC;gBACnB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACxC,CAAC;YAED,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAAC;oBAClC,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,WAAW,EAAE,UAAU,OAAO,WAAW;oBACzC,IAAI,EAAE,IAAI,MAAM,GAAG;iBACnB,CAAC,CAAC;gBAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC1B,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACZ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAG,CAAe,CAAC,OAAO,EAAE,CAAC;YAC5D,CAAC;QACF,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const assignIssueAction: 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
|
-
assignee: import("@activepieces/pieces-framework").DropdownProperty<any, 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<any, 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=assign-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assign-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/assign-issue.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B5B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assignIssueAction = 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.assignIssueAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: auth_1.jiraCloudAuth,
|
|
12
|
-
name: 'assign_issue',
|
|
13
|
-
displayName: 'Assign Issue',
|
|
14
|
-
description: 'Assigns an issue to a user.',
|
|
15
|
-
props: {
|
|
16
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
17
|
-
issueId: (0, props_1.getIssueIdDropdown)({ refreshers: ['projectId'] }),
|
|
18
|
-
assignee: (0, props_1.getUsersDropdown)({
|
|
19
|
-
displayName: 'Assignee',
|
|
20
|
-
refreshers: ['projectId'],
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
run(context) {
|
|
25
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const { issueId, assignee } = context.propsValue;
|
|
27
|
-
const response = yield (0, common_1.sendJiraRequest)({
|
|
28
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
29
|
-
url: `issue/${issueId}/assignee`,
|
|
30
|
-
auth: context.auth,
|
|
31
|
-
body: {
|
|
32
|
-
accountId: assignee,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
return response.body;
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=assign-issue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assign-issue.js","sourceRoot":"","sources":["../../../../src/lib/actions/assign-issue.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,qCAA2C;AAC3C,+DAAyD;AACzD,sCAA4C;AAC5C,2CAA6F;AAEhF,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACN,SAAS,EAAE,IAAA,4BAAoB,GAAE;QACjC,OAAO,EAAE,IAAA,0BAAkB,EAAC,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,QAAQ,EAAE,IAAA,wBAAgB,EAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACjD,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAC;gBACtC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,SAAS,OAAO,WAAW;gBAChC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE;oBACL,SAAS,EAAE,QAAQ;iBACnB;aACD,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const createIssueAction: 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
|
-
issueTypeId: 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
|
-
issueFields: import("@activepieces/pieces-framework").DynamicProperties<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
|
-
adfFields: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
30
|
-
instanceUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
31
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
32
|
-
apiToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
33
|
-
}>>;
|
|
34
|
-
}>;
|
|
35
|
-
//# sourceMappingURL=create-issue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-issue.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-issue.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiI5B,CAAC"}
|
|
@@ -1,132 +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
|
-
auth: auth_1.jiraCloudAuth,
|
|
31
|
-
props: {
|
|
32
|
-
projectId: (0, props_1.getProjectIdDropdown)(),
|
|
33
|
-
issueTypeId: (0, props_1.issueTypeIdProp)('Issue Type'),
|
|
34
|
-
issueFields: pieces_framework_1.Property.DynamicProperties({
|
|
35
|
-
auth: auth_1.jiraCloudAuth,
|
|
36
|
-
displayName: 'Fields',
|
|
37
|
-
required: true,
|
|
38
|
-
refreshers: ['projectId', 'issueTypeId'],
|
|
39
|
-
props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, projectId, issueTypeId }) {
|
|
40
|
-
if (!auth || !issueTypeId || !projectId) {
|
|
41
|
-
return {};
|
|
42
|
-
}
|
|
43
|
-
const props = {};
|
|
44
|
-
const authValue = auth;
|
|
45
|
-
const projectIdValue = projectId;
|
|
46
|
-
const issueTypeIdValue = issueTypeId;
|
|
47
|
-
const fields = yield getFields(authValue, projectIdValue, issueTypeIdValue);
|
|
48
|
-
for (const field of fields) {
|
|
49
|
-
// skip invalid custom fields
|
|
50
|
-
if (field.schema.custom) {
|
|
51
|
-
const customFieldType = field.schema.custom.split(':')[1];
|
|
52
|
-
if (!types_1.VALID_CUSTOM_FIELD_TYPES.includes(customFieldType)) {
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (['project', 'issuetype'].includes(field.key)) {
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
props[field.key] = yield (0, props_1.createPropertyDefinition)(authValue, field, field.required);
|
|
60
|
-
}
|
|
61
|
-
// Remove null props
|
|
62
|
-
return Object.fromEntries(Object.entries(props).filter(([_, prop]) => prop !== null));
|
|
63
|
-
}),
|
|
64
|
-
}),
|
|
65
|
-
adfFields: pieces_framework_1.Property.MultiSelectDropdown({
|
|
66
|
-
auth: auth_1.jiraCloudAuth,
|
|
67
|
-
displayName: 'Fields in JSON Atlassian Document Format',
|
|
68
|
-
description: 'https://developer.atlassian.com/cloud/jira/platform/apis/document/structure',
|
|
69
|
-
required: false,
|
|
70
|
-
refreshers: ['projectId', 'issueTypeId'],
|
|
71
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, projectId, issueTypeId }) {
|
|
72
|
-
if (!auth || !issueTypeId || !projectId) {
|
|
73
|
-
return {
|
|
74
|
-
disabled: true,
|
|
75
|
-
options: [],
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
const authValue = auth;
|
|
79
|
-
const projectIdValue = projectId;
|
|
80
|
-
const issueTypeIdValue = issueTypeId;
|
|
81
|
-
const fields = yield getFields(authValue, projectIdValue, issueTypeIdValue);
|
|
82
|
-
const adfCompatibleFields = fields.filter(props_1.isFieldAdfCompatible);
|
|
83
|
-
const fieldOptions = adfCompatibleFields.map(field => ({
|
|
84
|
-
label: field.name,
|
|
85
|
-
value: field.key,
|
|
86
|
-
}));
|
|
87
|
-
return {
|
|
88
|
-
disabled: false,
|
|
89
|
-
options: fieldOptions,
|
|
90
|
-
};
|
|
91
|
-
}),
|
|
92
|
-
}),
|
|
93
|
-
},
|
|
94
|
-
run(context) {
|
|
95
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
var _a;
|
|
97
|
-
const { projectId, issueTypeId, adfFields } = context.propsValue;
|
|
98
|
-
const inputIssueFields = (_a = context.propsValue.issueFields) !== null && _a !== void 0 ? _a : {};
|
|
99
|
-
if ((0, shared_1.isNil)(projectId) || (0, shared_1.isNil)(issueTypeId)) {
|
|
100
|
-
throw new Error('Project ID and Issue Type ID are required');
|
|
101
|
-
}
|
|
102
|
-
const issueTypeFields = yield (0, common_1.jiraPaginatedApiCall)({
|
|
103
|
-
auth: context.auth,
|
|
104
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
105
|
-
resourceUri: `/issue/createmeta/${projectId}/issuetypes/${issueTypeId}`,
|
|
106
|
-
propertyName: 'fields',
|
|
107
|
-
});
|
|
108
|
-
const formattedAdfFields = adfFields || [];
|
|
109
|
-
const formattedFields = (0, props_1.formatIssueFields)(issueTypeFields, inputIssueFields, formattedAdfFields);
|
|
110
|
-
const response = yield (0, common_1.jiraApiCall)({
|
|
111
|
-
auth: context.auth,
|
|
112
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
113
|
-
resourceUri: `/issue`,
|
|
114
|
-
body: {
|
|
115
|
-
fields: Object.assign({ issuetype: {
|
|
116
|
-
id: issueTypeId,
|
|
117
|
-
}, project: {
|
|
118
|
-
id: projectId,
|
|
119
|
-
} }, formattedFields),
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
const issue = yield (0, common_1.jiraApiCall)({
|
|
123
|
-
auth: context.auth,
|
|
124
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
125
|
-
resourceUri: `/issue/${response.id}`,
|
|
126
|
-
});
|
|
127
|
-
const updatedIssueProperties = (0, props_1.transformCustomFields)(issueTypeFields, issue.fields);
|
|
128
|
-
return Object.assign(Object.assign({}, issue), { fields: updatedIssueProperties });
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
//# sourceMappingURL=create-issue.js.map
|