@activepieces/piece-week-done 0.0.1

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 (56) hide show
  1. package/README.md +7 -0
  2. package/package.json +30 -0
  3. package/src/index.d.ts +2 -0
  4. package/src/index.js +63 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/company/get-company-info.d.ts +1 -0
  7. package/src/lib/actions/company/get-company-info.js +25 -0
  8. package/src/lib/actions/company/get-company-info.js.map +1 -0
  9. package/src/lib/actions/company/index.d.ts +1 -0
  10. package/src/lib/actions/company/index.js +5 -0
  11. package/src/lib/actions/company/index.js.map +1 -0
  12. package/src/lib/actions/items/add-item-comment.d.ts +7 -0
  13. package/src/lib/actions/items/add-item-comment.js +90 -0
  14. package/src/lib/actions/items/add-item-comment.js.map +1 -0
  15. package/src/lib/actions/items/add-item-like.d.ts +6 -0
  16. package/src/lib/actions/items/add-item-like.js +83 -0
  17. package/src/lib/actions/items/add-item-like.js.map +1 -0
  18. package/src/lib/actions/items/assign-item.d.ts +7 -0
  19. package/src/lib/actions/items/assign-item.js +102 -0
  20. package/src/lib/actions/items/assign-item.js.map +1 -0
  21. package/src/lib/actions/items/create-item.d.ts +11 -0
  22. package/src/lib/actions/items/create-item.js +123 -0
  23. package/src/lib/actions/items/create-item.js.map +1 -0
  24. package/src/lib/actions/items/delete-item-comment.d.ts +7 -0
  25. package/src/lib/actions/items/delete-item-comment.js +106 -0
  26. package/src/lib/actions/items/delete-item-comment.js.map +1 -0
  27. package/src/lib/actions/items/delete-item-like.d.ts +6 -0
  28. package/src/lib/actions/items/delete-item-like.js +83 -0
  29. package/src/lib/actions/items/delete-item-like.js.map +1 -0
  30. package/src/lib/actions/items/delete-item.d.ts +6 -0
  31. package/src/lib/actions/items/delete-item.js +83 -0
  32. package/src/lib/actions/items/delete-item.js.map +1 -0
  33. package/src/lib/actions/items/get-item-comments.d.ts +6 -0
  34. package/src/lib/actions/items/get-item-comments.js +83 -0
  35. package/src/lib/actions/items/get-item-comments.js.map +1 -0
  36. package/src/lib/actions/items/get-item-likes.d.ts +6 -0
  37. package/src/lib/actions/items/get-item-likes.js +83 -0
  38. package/src/lib/actions/items/get-item-likes.js.map +1 -0
  39. package/src/lib/actions/items/search-items.d.ts +5 -0
  40. package/src/lib/actions/items/search-items.js +68 -0
  41. package/src/lib/actions/items/search-items.js.map +1 -0
  42. package/src/lib/actions/items/sort-items.d.ts +7 -0
  43. package/src/lib/actions/items/sort-items.js +101 -0
  44. package/src/lib/actions/items/sort-items.js.map +1 -0
  45. package/src/lib/actions/items/update-item.d.ts +11 -0
  46. package/src/lib/actions/items/update-item.js +130 -0
  47. package/src/lib/actions/items/update-item.js.map +1 -0
  48. package/src/lib/common/client.d.ts +11 -0
  49. package/src/lib/common/client.js +29 -0
  50. package/src/lib/common/client.js.map +1 -0
  51. package/src/lib/common/dropdowns.d.ts +11 -0
  52. package/src/lib/common/dropdowns.js +115 -0
  53. package/src/lib/common/dropdowns.js.map +1 -0
  54. package/src/lib/common/index.d.ts +2 -0
  55. package/src/lib/common/index.js +6 -0
  56. package/src/lib/common/index.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-week-done
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-week-done` to build the library.
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@activepieces/piece-week-done",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@ai-sdk/mcp": "1.0.1 ",
9
+ "@modelcontextprotocol/sdk": "1.25.2",
10
+ "@sinclair/typebox": "0.34.11",
11
+ "ai": "5.0.104",
12
+ "axios": "1.13.1",
13
+ "axios-retry": "4.4.1",
14
+ "deepmerge-ts": "7.1.0",
15
+ "form-data": "4.0.4",
16
+ "i18next": "23.13.0",
17
+ "mime-types": "2.1.35",
18
+ "nanoid": "3.3.8",
19
+ "semver": "7.6.0",
20
+ "socket.io-client": "4.8.1",
21
+ "tslib": "^2.3.0",
22
+ "zod": "4.1.13",
23
+ "@activepieces/pieces-common": "0.11.1",
24
+ "@activepieces/pieces-framework": "0.23.0",
25
+ "@activepieces/shared": "0.32.0"
26
+ },
27
+ "resolutions": {
28
+ "rollup": "npm:@rollup/wasm-node"
29
+ }
30
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const weekdoneAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
2
+ export declare const weekdone: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
package/src/index.js ADDED
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.weekdone = exports.weekdoneAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const shared_1 = require("@activepieces/shared");
8
+ const create_item_1 = require("./lib/actions/items/create-item");
9
+ const delete_item_1 = require("./lib/actions/items/delete-item");
10
+ const search_items_1 = require("./lib/actions/items/search-items");
11
+ const update_item_1 = require("./lib/actions/items/update-item");
12
+ const assign_item_1 = require("./lib/actions/items/assign-item");
13
+ const add_item_comment_1 = require("./lib/actions/items/add-item-comment");
14
+ const delete_item_comment_1 = require("./lib/actions/items/delete-item-comment");
15
+ const get_item_comments_1 = require("./lib/actions/items/get-item-comments");
16
+ const add_item_like_1 = require("./lib/actions/items/add-item-like");
17
+ const delete_item_like_1 = require("./lib/actions/items/delete-item-like");
18
+ const get_item_likes_1 = require("./lib/actions/items/get-item-likes");
19
+ const sort_items_1 = require("./lib/actions/items/sort-items");
20
+ const company_1 = require("./lib/actions/company");
21
+ exports.weekdoneAuth = pieces_framework_1.PieceAuth.OAuth2({
22
+ description: 'Weekdone OAuth2 Authentication',
23
+ authUrl: 'https://weekdone.com/oauth_authorize',
24
+ tokenUrl: 'https://weekdone.com/oauth_token',
25
+ required: true,
26
+ scope: [],
27
+ });
28
+ exports.weekdone = (0, pieces_framework_1.createPiece)({
29
+ displayName: 'Weekdone',
30
+ description: 'Goal-setting and progress tracking software that helps teams align their objectives and key results (OKRs).',
31
+ minimumSupportedRelease: '0.36.1',
32
+ logoUrl: 'https://cdn.activepieces.com/pieces/week-done.png',
33
+ categories: [shared_1.PieceCategory.PRODUCTIVITY],
34
+ authors: ['onyedikachi-david'],
35
+ auth: exports.weekdoneAuth,
36
+ actions: [
37
+ search_items_1.searchItemsAction,
38
+ create_item_1.createItemAction,
39
+ update_item_1.updateItemAction,
40
+ assign_item_1.assignItemAction,
41
+ delete_item_1.deleteItemAction,
42
+ get_item_likes_1.getItemLikesAction,
43
+ add_item_like_1.addItemLikeAction,
44
+ delete_item_like_1.deleteItemLikeAction,
45
+ get_item_comments_1.getItemCommentsAction,
46
+ add_item_comment_1.addItemCommentAction,
47
+ delete_item_comment_1.deleteItemCommentAction,
48
+ sort_items_1.sortItemsAction,
49
+ company_1.getCompanyInfoAction,
50
+ (0, pieces_common_1.createCustomApiCallAction)({
51
+ auth: exports.weekdoneAuth,
52
+ baseUrl: () => 'https://api.weekdone.com/1',
53
+ authLocation: 'queryParams',
54
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
55
+ return ({
56
+ token: auth.access_token,
57
+ });
58
+ }),
59
+ }),
60
+ ],
61
+ triggers: [],
62
+ });
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/week-done/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAA6F;AAC7F,iDAAqD;AACrD,iEAAmE;AACnE,iEAAmE;AACnE,mEAAqE;AACrE,iEAAmE;AACnE,iEAAmE;AACnE,2EAA4E;AAC5E,iFAAkF;AAClF,6EAA8E;AAC9E,qEAAsE;AACtE,2EAA4E;AAC5E,uEAAwE;AACxE,+DAAiE;AACjE,mDAA6D;AAEhD,QAAA,YAAY,GAAG,4BAAS,CAAC,MAAM,CAAC;IAC3C,WAAW,EAAE,gCAAgC;IAC7C,OAAO,EAAE,sCAAsC;IAC/C,QAAQ,EAAE,kCAAkC;IAC5C,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,EAAE;CACV,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,WAAW,EACT,6GAA6G;IAC/G,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,UAAU,EAAE,CAAC,sBAAa,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,CAAC,mBAAmB,CAAC;IAC9B,IAAI,EAAE,oBAAY;IAClB,OAAO,EAAE;QACP,gCAAiB;QACjB,8BAAgB;QAChB,8BAAgB;QAChB,8BAAgB;QAChB,8BAAgB;QAChB,mCAAkB;QAClB,iCAAiB;QACjB,uCAAoB;QACpB,yCAAqB;QACrB,uCAAoB;QACpB,6CAAuB;QACvB,4BAAe;QACf,8BAAoB;QACpB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,oBAAY;YAClB,OAAO,EAAE,GAAG,EAAE,CAAC,4BAA4B;YAC3C,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,KAAK,EAAG,IAA4B,CAAC,YAAY;iBAClD,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const getCompanyInfoAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCompanyInfoAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const index_1 = require("../../../index");
8
+ const common_1 = require("../../common");
9
+ exports.getCompanyInfoAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'get_company_info',
12
+ displayName: 'Get Company Info',
13
+ description: 'Get company configuration and settings.',
14
+ props: {},
15
+ run(_a) {
16
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
17
+ return (0, common_1.weekdoneApiCall)({
18
+ auth: auth,
19
+ method: pieces_common_1.HttpMethod.GET,
20
+ path: '/company',
21
+ });
22
+ });
23
+ },
24
+ });
25
+ //# sourceMappingURL=get-company-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-company-info.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/company/get-company-info.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAA+C;AAElC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE,EAAE;IACH,GAAG;qEAAC,EAAE,IAAI,EAAE;YAChB,OAAO,IAAA,wBAAe,EAAC;gBACrB,IAAI,EAAE,IAA2B;gBACjC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,UAAU;aACjB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './get-company-info';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./get-company-info"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/company/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC"}
@@ -0,0 +1,7 @@
1
+ export declare const addItemCommentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ user_id_filter: import("@activepieces/pieces-framework").DropdownProperty<any, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ period: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ item_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
+ comment: import("@activepieces/pieces-framework").LongTextProperty<true>;
7
+ }>;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addItemCommentAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const index_1 = require("../../../index");
8
+ const common_1 = require("../../common");
9
+ exports.addItemCommentAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'add_item_comment',
12
+ displayName: 'Add Item Comment',
13
+ description: 'Add a comment to an item.',
14
+ props: {
15
+ user_id_filter: pieces_framework_1.Property.Dropdown({
16
+ auth: index_1.weekdoneAuth,
17
+ displayName: 'User (Filter)',
18
+ required: false,
19
+ refreshers: [],
20
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
21
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
22
+ return {
23
+ disabled: true,
24
+ placeholder: 'Connect your account first',
25
+ options: [],
26
+ };
27
+ }
28
+ const state = yield (0, common_1.weekdoneUsersDropdown)(auth);
29
+ return Object.assign(Object.assign({}, state), { options: [{ label: 'Me', value: 'me' }, ...state.options] });
30
+ }),
31
+ }),
32
+ team_id: pieces_framework_1.Property.Dropdown({
33
+ auth: index_1.weekdoneAuth,
34
+ displayName: 'Team (Filter)',
35
+ required: false,
36
+ refreshers: [],
37
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
38
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
39
+ return {
40
+ disabled: true,
41
+ placeholder: 'Connect your account first',
42
+ options: [],
43
+ };
44
+ }
45
+ return (0, common_1.weekdoneTeamsDropdown)(auth);
46
+ }),
47
+ }),
48
+ period: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Period (Filter)',
50
+ required: false,
51
+ }),
52
+ item_id: pieces_framework_1.Property.Dropdown({
53
+ auth: index_1.weekdoneAuth,
54
+ displayName: 'Item',
55
+ required: true,
56
+ refreshers: ['user_id_filter', 'team_id', 'period'],
57
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, user_id_filter, team_id, period }) {
58
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
59
+ return {
60
+ disabled: true,
61
+ placeholder: 'Connect your account first',
62
+ options: [],
63
+ };
64
+ }
65
+ return (0, common_1.weekdoneItemsDropdown)(auth, {
66
+ userId: user_id_filter,
67
+ teamId: team_id ? Number(team_id) : undefined,
68
+ period: period,
69
+ });
70
+ }),
71
+ }),
72
+ comment: pieces_framework_1.Property.LongText({
73
+ displayName: 'Comment',
74
+ required: true,
75
+ }),
76
+ },
77
+ run(_a) {
78
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
79
+ return (0, common_1.weekdoneApiCall)({
80
+ auth: auth,
81
+ method: pieces_common_1.HttpMethod.POST,
82
+ path: `/item/${propsValue.item_id}/comments`,
83
+ body: {
84
+ comment: propsValue.comment,
85
+ },
86
+ });
87
+ });
88
+ },
89
+ });
90
+ //# sourceMappingURL=add-item-comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-item-comment.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/add-item-comment.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAKsB;AAET,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,CAAC,IAA4B,aAA5B,IAAI,uBAAJ,IAAI,CAA0B,YAAY,CAAA,EAAE,CAAC;oBACjD,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,GAAG,MAAM,IAAA,8BAAqB,EAAC,IAA2B,CAAC,CAAC;gBACvE,uCACK,KAAK,KACR,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAW,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,IAChE;YACJ,CAAC,CAAA;SACF,CAAC;QAC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CAAC,SAAS;oBAC7C,MAAM,EAAE,MAA4B;iBACrC,CAAC,CAAC;YACL,CAAC,CAAA;SACF,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,OAAO,IAAA,wBAAe,EAAC;gBACrB,IAAI,EAAE,IAA2B;gBACjC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,SAAS,UAAU,CAAC,OAAO,WAAW;gBAC5C,IAAI,EAAE;oBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;iBAC5B;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const addItemLikeAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ user_id_filter: import("@activepieces/pieces-framework").DropdownProperty<any, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ period: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ item_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
+ }>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addItemLikeAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const index_1 = require("../../../index");
8
+ const common_1 = require("../../common");
9
+ exports.addItemLikeAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'add_item_like',
12
+ displayName: 'Add Item Like',
13
+ description: 'Add a like to an item.',
14
+ props: {
15
+ user_id_filter: pieces_framework_1.Property.Dropdown({
16
+ auth: index_1.weekdoneAuth,
17
+ displayName: 'User (Filter)',
18
+ required: false,
19
+ refreshers: [],
20
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
21
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
22
+ return {
23
+ disabled: true,
24
+ placeholder: 'Connect your account first',
25
+ options: [],
26
+ };
27
+ }
28
+ const state = yield (0, common_1.weekdoneUsersDropdown)(auth);
29
+ return Object.assign(Object.assign({}, state), { options: [{ label: 'Me', value: 'me' }, ...state.options] });
30
+ }),
31
+ }),
32
+ team_id: pieces_framework_1.Property.Dropdown({
33
+ auth: index_1.weekdoneAuth,
34
+ displayName: 'Team (Filter)',
35
+ required: false,
36
+ refreshers: [],
37
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
38
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
39
+ return {
40
+ disabled: true,
41
+ placeholder: 'Connect your account first',
42
+ options: [],
43
+ };
44
+ }
45
+ return (0, common_1.weekdoneTeamsDropdown)(auth);
46
+ }),
47
+ }),
48
+ period: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Period (Filter)',
50
+ required: false,
51
+ }),
52
+ item_id: pieces_framework_1.Property.Dropdown({
53
+ auth: index_1.weekdoneAuth,
54
+ displayName: 'Item',
55
+ required: true,
56
+ refreshers: ['user_id_filter', 'team_id', 'period'],
57
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, user_id_filter, team_id, period }) {
58
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
59
+ return {
60
+ disabled: true,
61
+ placeholder: 'Connect your account first',
62
+ options: [],
63
+ };
64
+ }
65
+ return (0, common_1.weekdoneItemsDropdown)(auth, {
66
+ userId: user_id_filter,
67
+ teamId: team_id ? Number(team_id) : undefined,
68
+ period: period,
69
+ });
70
+ }),
71
+ }),
72
+ },
73
+ run(_a) {
74
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
75
+ return (0, common_1.weekdoneApiCall)({
76
+ auth: auth,
77
+ method: pieces_common_1.HttpMethod.POST,
78
+ path: `/item/${propsValue.item_id}/likes`,
79
+ });
80
+ });
81
+ },
82
+ });
83
+ //# sourceMappingURL=add-item-like.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-item-like.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/add-item-like.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAKsB;AAET,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,wBAAwB;IACrC,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,CAAC,IAA4B,aAA5B,IAAI,uBAAJ,IAAI,CAA0B,YAAY,CAAA,EAAE,CAAC;oBACjD,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,EAAE;qBACZ,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,GAAG,MAAM,IAAA,8BAAqB,EAAC,IAA2B,CAAC,CAAC;gBACvE,uCACK,KAAK,KACR,OAAO,EAAE,CAAC,EAAE,KAAK,E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,EAAE;oBACxD,MAAM,EAAE,cAAqB;oBAC7B,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;oBAC7C,MAAM,EAAE,MAA4B;iBACrC,CAAC,CAAC;YACL,CAAC,CAAA;SACF,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,OAAO,IAAA,wBAAe,EAAC;gBACrB,IAAI,EAAE,IAA2B;gBACjC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,SAAS,UAAU,CAAC,OAAO,QAAQ;aAC1C,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const assignItemAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ user_id_filter: import("@activepieces/pieces-framework").DropdownProperty<any, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ period: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ item_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
+ assignee_user_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
7
+ }>;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assignItemAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const index_1 = require("../../../index");
8
+ const common_1 = require("../../common");
9
+ exports.assignItemAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'assign_item',
12
+ displayName: 'Assign Item',
13
+ description: 'Assign an item to another user.',
14
+ props: {
15
+ user_id_filter: pieces_framework_1.Property.Dropdown({
16
+ auth: index_1.weekdoneAuth,
17
+ displayName: 'User (Filter)',
18
+ required: false,
19
+ refreshers: [],
20
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
21
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
22
+ return {
23
+ disabled: true,
24
+ placeholder: 'Connect your account first',
25
+ options: [],
26
+ };
27
+ }
28
+ const state = yield (0, common_1.weekdoneUsersDropdown)(auth);
29
+ return Object.assign(Object.assign({}, state), { options: [{ label: 'Me', value: 'me' }, ...state.options] });
30
+ }),
31
+ }),
32
+ team_id: pieces_framework_1.Property.Dropdown({
33
+ auth: index_1.weekdoneAuth,
34
+ displayName: 'Team (Filter)',
35
+ required: false,
36
+ refreshers: [],
37
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
38
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
39
+ return {
40
+ disabled: true,
41
+ placeholder: 'Connect your account first',
42
+ options: [],
43
+ };
44
+ }
45
+ return (0, common_1.weekdoneTeamsDropdown)(auth);
46
+ }),
47
+ }),
48
+ period: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Period (Filter)',
50
+ required: false,
51
+ }),
52
+ item_id: pieces_framework_1.Property.Dropdown({
53
+ auth: index_1.weekdoneAuth,
54
+ displayName: 'Item',
55
+ required: true,
56
+ refreshers: ['user_id_filter', 'team_id', 'period'],
57
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, user_id_filter, team_id, period }) {
58
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
59
+ return {
60
+ disabled: true,
61
+ placeholder: 'Connect your account first',
62
+ options: [],
63
+ };
64
+ }
65
+ return (0, common_1.weekdoneItemsDropdown)(auth, {
66
+ userId: user_id_filter,
67
+ teamId: team_id ? Number(team_id) : undefined,
68
+ period: period,
69
+ });
70
+ }),
71
+ }),
72
+ assignee_user_id: pieces_framework_1.Property.Dropdown({
73
+ auth: index_1.weekdoneAuth,
74
+ displayName: 'Assign To',
75
+ required: true,
76
+ refreshers: [],
77
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
78
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
79
+ return {
80
+ disabled: true,
81
+ placeholder: 'Connect your account first',
82
+ options: [],
83
+ };
84
+ }
85
+ return (0, common_1.weekdoneUsersDropdown)(auth);
86
+ }),
87
+ }),
88
+ },
89
+ run(_a) {
90
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
91
+ return (0, common_1.weekdoneApiCall)({
92
+ auth: auth,
93
+ method: pieces_common_1.HttpMethod.PATCH,
94
+ path: `/item/${propsValue.item_id}/assign`,
95
+ body: {
96
+ user_id: propsValue.assignee_user_id,
97
+ },
98
+ });
99
+ });
100
+ },
101
+ });
102
+ //# sourceMappingURL=assign-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assign-item.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/assign-item.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAKsB;AAET,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,K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M,EAAE,0BAAU,CAAC,KAAK;gBACxB,IAAI,EAAE,SAAS,UAAU,CAAC,OAAO,SAAS;gBAC1C,IAAI,EAAE;oBACJ,OAAO,EAAE,UAAU,CAAC,gBAAgB;iBACrC;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const createItemAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ description: import("@activepieces/pieces-framework").LongTextProperty<true>;
3
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ type_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
5
+ period: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
+ user_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
7
+ priority: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false> | import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
8
+ source_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ due_on: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ private: import("@activepieces/pieces-framework").StaticDropdownProperty<number, false> | import("@activepieces/pieces-framework").StaticDropdownProperty<number, true>;
11
+ }>;
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createItemAction = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const index_1 = require("../../../index");
8
+ const common_1 = require("../../common");
9
+ exports.createItemAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'create_item',
12
+ displayName: 'Create Item',
13
+ description: 'Create a new item.',
14
+ props: {
15
+ description: pieces_framework_1.Property.LongText({
16
+ displayName: 'Description',
17
+ required: true,
18
+ }),
19
+ team_id: pieces_framework_1.Property.Dropdown({
20
+ auth: index_1.weekdoneAuth,
21
+ displayName: 'Team',
22
+ required: false,
23
+ refreshers: [],
24
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
25
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
26
+ return {
27
+ disabled: true,
28
+ placeholder: 'Connect your account first',
29
+ options: [],
30
+ };
31
+ }
32
+ return (0, common_1.weekdoneTeamsDropdown)(auth);
33
+ }),
34
+ }),
35
+ type_id: pieces_framework_1.Property.Dropdown({
36
+ auth: index_1.weekdoneAuth,
37
+ displayName: 'Type',
38
+ required: true,
39
+ refreshers: ['team_id'],
40
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
41
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
42
+ return {
43
+ disabled: true,
44
+ placeholder: 'Connect your account first',
45
+ options: [],
46
+ };
47
+ }
48
+ return (0, common_1.weekdoneTypesDropdown)(auth, team_id ? Number(team_id) : undefined);
49
+ }),
50
+ }),
51
+ period: pieces_framework_1.Property.ShortText({
52
+ displayName: 'Period',
53
+ required: false,
54
+ }),
55
+ user_id: pieces_framework_1.Property.Dropdown({
56
+ auth: index_1.weekdoneAuth,
57
+ displayName: 'User',
58
+ required: false,
59
+ refreshers: [],
60
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
61
+ if (!(auth === null || auth === void 0 ? void 0 : auth.access_token)) {
62
+ return {
63
+ disabled: true,
64
+ placeholder: 'Connect your account first',
65
+ options: [],
66
+ };
67
+ }
68
+ return (0, common_1.weekdoneUsersDropdown)(auth);
69
+ }),
70
+ }),
71
+ priority: pieces_framework_1.Property.StaticDropdown({
72
+ displayName: 'Priority',
73
+ required: false,
74
+ options: {
75
+ options: [
76
+ { label: 'Not specified', value: 0 },
77
+ { label: 'Green', value: 1 },
78
+ { label: 'Amber', value: 2 },
79
+ { label: 'Red', value: 3 },
80
+ ],
81
+ },
82
+ }),
83
+ source_id: pieces_framework_1.Property.ShortText({
84
+ displayName: 'Source ID',
85
+ required: false,
86
+ }),
87
+ due_on: pieces_framework_1.Property.ShortText({
88
+ displayName: 'Due Date',
89
+ required: false,
90
+ }),
91
+ private: pieces_framework_1.Property.StaticDropdown({
92
+ displayName: 'Visibility',
93
+ required: false,
94
+ options: {
95
+ options: [
96
+ { label: 'Public', value: 0 },
97
+ { label: 'Private', value: 1 },
98
+ ],
99
+ },
100
+ }),
101
+ },
102
+ run(_a) {
103
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
104
+ return (0, common_1.weekdoneApiCall)({
105
+ auth: auth,
106
+ method: pieces_common_1.HttpMethod.POST,
107
+ path: '/item',
108
+ body: {
109
+ description: propsValue.description,
110
+ type_id: propsValue.type_id,
111
+ period: propsValue.period,
112
+ user_id: propsValue.user_id,
113
+ team_id: propsValue.team_id,
114
+ priority: propsValue.priority,
115
+ source_id: propsValue.source_id,
116
+ due_on: propsValue.due_on,
117
+ private: propsValue.private,
118
+ },
119
+ });
120
+ });
121
+ },
122
+ });
123
+ //# sourceMappingURL=create-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-item.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/create-item.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAKsB;AAET,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE;QACL,WAAW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EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;oBAC7B,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE;iBAC/B;aACF;SACF,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,OAAO,IAAA,wBAAe,EAAC;gBACrB,IAAI,EAAE,IAA2B;gBACjC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE;oBACJ,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,QAAQ,EAAE,UAAU,CAAC,QAAQ;oBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;oBAC/B,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,OAAO,EAAE,UAAU,CAAC,OAAO;iBAC5B;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const deleteItemCommentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ user_id_filter: import("@activepieces/pieces-framework").DropdownProperty<any, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ period: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ item_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
+ comment_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
7
+ }>;