@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
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteItemCommentAction = 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.deleteItemCommentAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'delete_item_comment',
12
+ displayName: 'Delete Item Comment',
13
+ description: 'Delete a comment from 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_id: pieces_framework_1.Property.Dropdown({
73
+ auth: index_1.weekdoneAuth,
74
+ displayName: 'Comment',
75
+ required: true,
76
+ refreshers: ['item_id'],
77
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, item_id }) {
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
+ if (!item_id) {
86
+ return {
87
+ disabled: true,
88
+ placeholder: 'Select an item first',
89
+ options: [],
90
+ };
91
+ }
92
+ return (0, common_1.weekdoneItemCommentsDropdown)(auth, Number(item_id));
93
+ }),
94
+ }),
95
+ },
96
+ run(_a) {
97
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
98
+ return (0, common_1.weekdoneApiCall)({
99
+ auth: auth,
100
+ method: pieces_common_1.HttpMethod.DELETE,
101
+ path: `/item/${propsValue.item_id}/comments/${propsValue.comment_id}`,
102
+ });
103
+ });
104
+ },
105
+ });
106
+ //# sourceMappingURL=delete-item-comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-item-comment.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/delete-item-comment.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAMsB;AAET,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,gCAAgC;IAC7C,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;w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AAU,CAAC,MAAM;gBACzB,IAAI,EAAE,SAAS,UAAU,CAAC,OAAO,aAAa,UAAU,CAAC,UAAU,EAAE;aACtE,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const deleteItemLikeAction: 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.deleteItemLikeAction = 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.deleteItemLikeAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'delete_item_like',
12
+ displayName: 'Delete Item Like',
13
+ description: 'Remove your like from 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.DELETE,
78
+ path: `/item/${propsValue.item_id}/likes`,
79
+ });
80
+ });
81
+ },
82
+ });
83
+ //# sourceMappingURL=delete-item-like.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-item-like.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/delete-item-like.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,gCAAgC;IAC7C,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;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,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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C,MAAM;gBACzB,IAAI,EAAE,SAAS,UAAU,CAAC,OAAO,QAAQ;aAC1C,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const deleteItemAction: 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.deleteItemAction = 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.deleteItemAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'delete_item',
12
+ displayName: 'Delete Item',
13
+ description: 'Delete 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.DELETE,
78
+ path: `/item/${propsValue.item_id}`,
79
+ });
80
+ });
81
+ },
82
+ });
83
+ //# sourceMappingURL=delete-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-item.js","sourceRoot":"","sources":["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AAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const getItemCommentsAction: 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.getItemCommentsAction = 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.getItemCommentsAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'get_item_comments',
12
+ displayName: 'Get Item Comments',
13
+ description: 'Get comments for 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.GET,
78
+ path: `/item/${propsValue.item_id}/comments`,
79
+ });
80
+ });
81
+ },
82
+ });
83
+ //# sourceMappingURL=get-item-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-comments.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/get-item-comments.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C"}
@@ -0,0 +1,6 @@
1
+ export declare const getItemLikesAction: 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.getItemLikesAction = 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.getItemLikesAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'get_item_likes',
12
+ displayName: 'Get Item Likes',
13
+ description: 'Get likes for 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.GET,
78
+ path: `/item/${propsValue.item_id}/likes`,
79
+ });
80
+ });
81
+ },
82
+ });
83
+ //# sourceMappingURL=get-item-likes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-likes.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/get-item-likes.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEA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: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ user_id: 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
+ }>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchItemsAction = 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.searchItemsAction = (0, pieces_framework_1.createAction)({
10
+ auth: index_1.weekdoneAuth,
11
+ name: 'search_items',
12
+ displayName: 'Search Items',
13
+ description: 'Search for items.',
14
+ props: {
15
+ user_id: pieces_framework_1.Property.Dropdown({
16
+ auth: index_1.weekdoneAuth,
17
+ displayName: 'User',
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',
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',
50
+ required: false,
51
+ }),
52
+ },
53
+ run(_a) {
54
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
55
+ return (0, common_1.weekdoneApiCall)({
56
+ auth: auth,
57
+ method: pieces_common_1.HttpMethod.GET,
58
+ path: '/items',
59
+ query: {
60
+ user_id: propsValue.user_id,
61
+ team_id: propsValue.team_id,
62
+ period: propsValue.period,
63
+ },
64
+ });
65
+ });
66
+ },
67
+ });
68
+ //# sourceMappingURL=search-items.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-items.js","sourceRoot":"","sources":["../../../../../../../../../packages/pieces/community/week-done/src/lib/actions/items/search-items.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAIwC;AACxC,0CAA8C;AAC9C,yCAA6F;AAEhF,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,oBAAY;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,MAAM;YACnB,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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AC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const sortItemsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ team_id: import("@activepieces/pieces-framework").DropdownProperty<number, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
3
+ type_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
4
+ period: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ item_id: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
6
+ list: import("@activepieces/pieces-framework").ArrayProperty<true>;
7
+ }>;