@skriptfabrik/n8n-nodes-clockify-enhanced 0.4.42 → 0.6.0

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 (34) hide show
  1. package/CHANGELOG.md +950 -219
  2. package/README.md +5 -3
  3. package/dist/credentials/ClockifyEnhancedApi.credentials.d.ts +10 -0
  4. package/dist/credentials/ClockifyEnhancedApi.credentials.js +39 -0
  5. package/dist/credentials/ClockifyEnhancedApi.credentials.js.map +1 -0
  6. package/dist/icons/Clockify.dark.svg +1 -0
  7. package/{src → dist}/nodes/ClockifyEnhanced/ClockifyEnhanced.node.d.ts +1 -1
  8. package/dist/nodes/ClockifyEnhanced/ClockifyEnhanced.node.js +234 -0
  9. package/dist/nodes/ClockifyEnhanced/ClockifyEnhanced.node.js.map +1 -0
  10. package/dist/nodes/ClockifyEnhanced/ClockifyEnhanced.node.json +18 -0
  11. package/{src → dist}/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.d.ts +32 -5
  12. package/dist/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.js +434 -0
  13. package/dist/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.js.map +1 -0
  14. package/dist/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.json +13 -0
  15. package/dist/nodes/ClockifyEnhanced/Descriptions/ProjectDescription.js +195 -0
  16. package/dist/nodes/ClockifyEnhanced/Descriptions/ProjectDescription.js.map +1 -0
  17. package/{src/nodes/ClockifyEnhanced/descriptions → dist/nodes/ClockifyEnhanced/Descriptions}/ProjectMembershipsDescription.d.ts +1 -1
  18. package/{src/nodes/ClockifyEnhanced/descriptions → dist/nodes/ClockifyEnhanced/Descriptions}/ProjectMembershipsDescription.js +0 -3
  19. package/dist/nodes/ClockifyEnhanced/Descriptions/ProjectMembershipsDescription.js.map +1 -0
  20. package/dist/nodes/ClockifyEnhanced/GenericFunctions.d.ts +3 -0
  21. package/dist/nodes/ClockifyEnhanced/GenericFunctions.js +35 -0
  22. package/dist/nodes/ClockifyEnhanced/GenericFunctions.js.map +1 -0
  23. package/package.json +33 -21
  24. package/src/nodes/ClockifyEnhanced/ClockifyEnhanced.node.js +0 -233
  25. package/src/nodes/ClockifyEnhanced/ClockifyEnhanced.node.js.map +0 -1
  26. package/src/nodes/ClockifyEnhanced/ClockifyEnhanced.node.json +0 -18
  27. package/src/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.js +0 -298
  28. package/src/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.js.map +0 -1
  29. package/src/nodes/ClockifyEnhanced/ClockifyEnhancedTrigger.node.json +0 -18
  30. package/src/nodes/ClockifyEnhanced/descriptions/ProjectDescription.js +0 -117
  31. package/src/nodes/ClockifyEnhanced/descriptions/ProjectDescription.js.map +0 -1
  32. package/src/nodes/ClockifyEnhanced/descriptions/ProjectMembershipsDescription.js.map +0 -1
  33. /package/{src/nodes/ClockifyEnhanced/icons/clockify-enhanced.svg → dist/icons/Clockify.light.svg} +0 -0
  34. /package/{src/nodes/ClockifyEnhanced/descriptions → dist/nodes/ClockifyEnhanced/Descriptions}/ProjectDescription.d.ts +0 -0
package/README.md CHANGED
@@ -29,7 +29,8 @@ nodes documentation.
29
29
  **I understand the risks of installing unverified code from a public source**.
30
30
  5. Select **Install**.
31
31
 
32
- After installing the node, you can use it like any other node. n8n displays the node in search results in the **Nodes** panel.
32
+ After installing the node, you can use it like any other node. n8n displays the node in search results in the **Nodes**
33
+ panel.
33
34
 
34
35
  ## Operations
35
36
 
@@ -43,8 +44,9 @@ It supports these operations:
43
44
 
44
45
  ## Credentials
45
46
 
46
- You can use the built-in [Clockify credentials](https://docs.n8n.io/integrations/builtin/credentials/clockify/) to
47
- authenticate with Clockify.
47
+ The provided **Clockify Enhanced API** credential can be used to authenticate with Clockify. It requires a Clockify API
48
+ key, which you can generate in your Clockify profile settings. The built-in n8n Clockify credential cannot be used with
49
+ these nodes.
48
50
 
49
51
  ## Compatibility
50
52
 
@@ -0,0 +1,10 @@
1
+ import type { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class ClockifyEnhancedApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: Icon;
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClockifyEnhancedApi = void 0;
4
+ class ClockifyEnhancedApi {
5
+ constructor() {
6
+ this.name = 'clockifyEnhancedApi';
7
+ this.displayName = 'Clockify Enhanced API';
8
+ this.icon = {
9
+ dark: 'file:../icons/Clockify.dark.svg',
10
+ light: 'file:../icons/Clockify.light.svg',
11
+ };
12
+ this.documentationUrl = 'https://github.com/skriptfabrik/n8n-nodes/blob/main/packages/clockify-enhanced/README.md';
13
+ this.properties = [
14
+ {
15
+ displayName: 'API Key',
16
+ name: 'apiKey',
17
+ type: 'string',
18
+ typeOptions: { password: true },
19
+ default: '',
20
+ },
21
+ ];
22
+ this.authenticate = {
23
+ type: 'generic',
24
+ properties: {
25
+ headers: {
26
+ 'X-Api-Key': '={{$credentials.apiKey}}',
27
+ },
28
+ },
29
+ };
30
+ this.test = {
31
+ request: {
32
+ baseURL: 'https://api.clockify.me/api/v1',
33
+ url: '/workspaces',
34
+ },
35
+ };
36
+ }
37
+ }
38
+ exports.ClockifyEnhancedApi = ClockifyEnhancedApi;
39
+ //# sourceMappingURL=ClockifyEnhancedApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClockifyEnhancedApi.credentials.js","sourceRoot":"","sources":["../../credentials/ClockifyEnhancedApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,mBAAmB;IAAhC;QACE,SAAI,GAAG,qBAAqB,CAAC;QAE7B,gBAAW,GAAG,uBAAuB,CAAC;QAEtC,SAAI,GAAS;YACX,IAAI,EAAE,iCAAiC;YACvC,KAAK,EAAE,kCAAkC;SAC1C,CAAC;QAEF,qBAAgB,GACd,0FAA0F,CAAC;QAE7F,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,WAAW,EAAE,0BAA0B;iBACxC;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,gCAAgC;gBACzC,GAAG,EAAE,aAAa;aACnB;SACF,CAAC;IACJ,CAAC;CAAA;AAtCD,kDAsCC"}
@@ -0,0 +1 @@
1
+ <svg width="256" height="256" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M14 0h227v256H14z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M165.124 87.99l58.777-58.814 16.825 16.823-58.778 58.815-16.824-16.823zm-23.817 60.105c-11.503 0-20.822-9.36-20.822-20.918 0-11.546 9.319-20.918 20.822-20.918 11.503 0 20.822 9.372 20.822 20.918 0 11.558-9.319 20.918-20.822 20.918zM241 208.845l-16.824 16.835-58.778-58.816 16.825-16.835L241 208.845z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M141.913 217.637c11.848 0 23.136-2.364 33.482-6.567l28.708 28.74C185.692 250.089 164.5 256 141.913 256 71.274 256 14 198.689 14 128.006 14 57.311 71.275 0 141.913 0c22.361 0 43.362 5.767 61.641 15.856l-28.231 28.261c-10.333-4.179-21.585-6.543-33.41-6.543-49.47 0-89.575 40.309-89.575 90.038 0 49.716 40.104 90.025 89.575 90.025z" fill="#03A9F4"/></svg>
@@ -1,4 +1,4 @@
1
- import { type IExecuteFunctions, type ILoadOptionsFunctions, type INodeExecutionData, type INodePropertyOptions, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
1
+ import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
2
  export declare class ClockifyEnhanced implements INodeType {
3
3
  description: INodeTypeDescription;
4
4
  methods: {
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClockifyEnhanced = void 0;
4
+ const ProjectDescription_1 = require("./Descriptions/ProjectDescription");
5
+ const ProjectMembershipsDescription_1 = require("./Descriptions/ProjectMembershipsDescription");
6
+ const GenericFunctions_1 = require("./GenericFunctions");
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ class ClockifyEnhanced {
9
+ constructor() {
10
+ this.description = {
11
+ displayName: 'Clockify Enhanced',
12
+ name: 'clockifyEnhanced',
13
+ icon: {
14
+ dark: 'file:../../icons/Clockify.dark.svg',
15
+ light: 'file:../../icons/Clockify.light.svg',
16
+ },
17
+ group: ['transform'],
18
+ version: 1,
19
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
20
+ description: 'Consume Clockify REST API',
21
+ defaults: {
22
+ name: 'Clockify Enhanced',
23
+ },
24
+ usableAsTool: true,
25
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
26
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
27
+ credentials: [
28
+ {
29
+ name: 'clockifyEnhancedApi',
30
+ required: true,
31
+ },
32
+ ],
33
+ properties: [
34
+ {
35
+ displayName: 'Resource',
36
+ name: 'resource',
37
+ type: 'options',
38
+ noDataExpression: true,
39
+ options: [
40
+ {
41
+ name: 'Project',
42
+ value: 'project',
43
+ },
44
+ {
45
+ name: 'Project Membership',
46
+ value: 'project membership',
47
+ },
48
+ ],
49
+ default: 'project',
50
+ },
51
+ ...ProjectDescription_1.projectOperations,
52
+ ...ProjectMembershipsDescription_1.projectMembershipOperations,
53
+ {
54
+ displayName: 'Workspace Name or ID',
55
+ name: 'workspaceId',
56
+ type: 'options',
57
+ typeOptions: {
58
+ loadOptionsMethod: 'loadWorkspaces',
59
+ },
60
+ default: '',
61
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
62
+ required: true,
63
+ requiresDataPath: 'single',
64
+ validateType: 'string',
65
+ },
66
+ ...ProjectDescription_1.projectFields,
67
+ ...ProjectMembershipsDescription_1.projectMembershipFields,
68
+ ],
69
+ };
70
+ this.methods = {
71
+ loadOptions: {
72
+ async loadWorkspaces() {
73
+ const workspaces = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', '/workspaces');
74
+ if (!workspaces) {
75
+ return [];
76
+ }
77
+ return workspaces.map((value) => ({
78
+ name: value.name,
79
+ value: value.id,
80
+ }));
81
+ },
82
+ async loadClients() {
83
+ const workspaceId = this.getCurrentNodeParameter('workspaceId');
84
+ if (!workspaceId) {
85
+ return [];
86
+ }
87
+ const clients = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', `/workspaces/${workspaceId}/clients`);
88
+ if (!clients) {
89
+ return [];
90
+ }
91
+ return clients.map((client) => ({
92
+ name: client.name,
93
+ value: client.id,
94
+ }));
95
+ },
96
+ async loadProjects() {
97
+ const workspaceId = this.getCurrentNodeParameter('workspaceId');
98
+ if (!workspaceId) {
99
+ return [];
100
+ }
101
+ const projects = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', `/workspaces/${workspaceId}/projects`);
102
+ if (!projects) {
103
+ return [];
104
+ }
105
+ return projects.map((project) => ({
106
+ name: project.name,
107
+ value: project.id,
108
+ }));
109
+ },
110
+ async loadUsers() {
111
+ const workspaceId = this.getCurrentNodeParameter('workspaceId');
112
+ if (!workspaceId) {
113
+ return [];
114
+ }
115
+ const users = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', `/workspaces/${workspaceId}/users`);
116
+ if (!users) {
117
+ return [];
118
+ }
119
+ return users.map((value) => ({
120
+ name: value.name,
121
+ value: value.id,
122
+ }));
123
+ },
124
+ async loadNonProjectUsers() {
125
+ const workspaceId = this.getCurrentNodeParameter('workspaceId');
126
+ const projectId = this.getCurrentNodeParameter('projectId');
127
+ if (!workspaceId || !projectId) {
128
+ return [];
129
+ }
130
+ const users = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', `/workspaces/${workspaceId}/users`, undefined, {
131
+ memberships: 'PROJECT',
132
+ });
133
+ if (!users) {
134
+ return [];
135
+ }
136
+ return users
137
+ .filter((user) => {
138
+ const memberships = user.memberships.filter((membership) => membership.targetId === projectId);
139
+ return memberships.length <= 0;
140
+ })
141
+ .map((user) => ({
142
+ name: user.name,
143
+ value: user.id,
144
+ }));
145
+ },
146
+ async loadProjectUsers() {
147
+ const workspaceId = this.getCurrentNodeParameter('workspaceId');
148
+ const projectId = this.getCurrentNodeParameter('projectId');
149
+ if (!workspaceId || !projectId) {
150
+ return [];
151
+ }
152
+ const users = await (GenericFunctions_1.clockifyApiRequestAllItems).call(this, 'GET', `/workspaces/${workspaceId}/users`, undefined, {
153
+ projectId,
154
+ });
155
+ if (!users) {
156
+ return [];
157
+ }
158
+ return users.map((user) => ({
159
+ name: user.name,
160
+ value: user.id,
161
+ }));
162
+ },
163
+ },
164
+ };
165
+ }
166
+ async execute() {
167
+ const items = this.getInputData();
168
+ const returnData = [];
169
+ let responseData = {};
170
+ const resource = this.getNodeParameter('resource', 0);
171
+ const operation = this.getNodeParameter('operation', 0);
172
+ for (let item = 0; item < items.length; item++) {
173
+ try {
174
+ if (resource === 'project') {
175
+ if (operation === 'update') {
176
+ const workspaceId = this.getNodeParameter('workspaceId', item);
177
+ const projectId = this.getNodeParameter('projectId', item);
178
+ const { timeEstimate, ...updateFields } = this.getNodeParameter('updateFields', item);
179
+ const estimate = timeEstimate === null || timeEstimate === void 0 ? void 0 : timeEstimate.values;
180
+ if (Object.keys(updateFields).length > 0 || !estimate) {
181
+ responseData = await (GenericFunctions_1.clockifyApiRequest).call(this, 'PUT', `/workspaces/${workspaceId}/projects/${projectId}`, updateFields);
182
+ }
183
+ if (estimate) {
184
+ const { resetOption, ...timeEstimateRequest } = estimate;
185
+ responseData = await (GenericFunctions_1.clockifyApiRequest).call(this, 'PATCH', `/workspaces/${workspaceId}/projects/${projectId}/estimate`, {
186
+ timeEstimate: {
187
+ ...timeEstimateRequest,
188
+ ...(resetOption ? { resetOption } : {}),
189
+ },
190
+ });
191
+ }
192
+ }
193
+ }
194
+ if (resource === 'project membership') {
195
+ const workspaceId = this.getNodeParameter('workspaceId', item);
196
+ const projectId = this.getNodeParameter('projectId', item);
197
+ if (operation === 'patch') {
198
+ const memberships = this.getNodeParameter('memberships', item).map((membership) => ({ userId: membership }));
199
+ responseData = await (GenericFunctions_1.clockifyApiRequest).call(this, 'PATCH', `/workspaces/${workspaceId}/projects/${projectId}/memberships`, {
200
+ memberships,
201
+ });
202
+ }
203
+ if (operation === 'assign') {
204
+ responseData = await (GenericFunctions_1.clockifyApiRequest).call(this, 'POST', `/workspaces/${workspaceId}/projects/${projectId}/memberships`, {
205
+ remove: false,
206
+ userIds: this.getNodeParameter('userIdsToAssign', item),
207
+ });
208
+ }
209
+ if (operation === 'remove') {
210
+ responseData = await (GenericFunctions_1.clockifyApiRequest).call(this, 'POST', `/workspaces/${workspaceId}/projects/${projectId}/memberships`, {
211
+ remove: true,
212
+ userIds: this.getNodeParameter('userIdsToRemove', item),
213
+ });
214
+ }
215
+ }
216
+ const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item } });
217
+ returnData.push(...executionData);
218
+ }
219
+ catch (error) {
220
+ if (this.continueOnFail()) {
221
+ returnData.push({
222
+ json: { error: error.message },
223
+ pairedItem: { item },
224
+ });
225
+ continue;
226
+ }
227
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: item });
228
+ }
229
+ }
230
+ return [returnData];
231
+ }
232
+ }
233
+ exports.ClockifyEnhanced = ClockifyEnhanced;
234
+ //# sourceMappingURL=ClockifyEnhanced.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClockifyEnhanced.node.js","sourceRoot":"","sources":["../../../nodes/ClockifyEnhanced/ClockifyEnhanced.node.ts"],"names":[],"mappings":";;;AACA,0EAG2C;AAC3C,gGAGsD;AACtD,yDAG4B;AAU5B,+CAAiE;AAkBjE,MAAa,gBAAgB;IAA7B;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,mBAAmB;YAEhC,IAAI,EAAE,kBAAkB;YAExB,IAAI,EAAE;gBACJ,IAAI,EAAE,oCAAoC;gBAC1C,KAAK,EAAE,qCAAqC;aAC7C;YAED,KAAK,EAAE,CAAC,WAAW,CAAC;YAEpB,OAAO,EAAE,CAAC;YAEV,QAAQ,EAAE,8DAA8D;YAExE,WAAW,EAAE,2BAA2B;YAExC,QAAQ,EAAE;gBACR,IAAI,EAAE,mBAAmB;aAC1B;YAED,YAAY,EAAE,IAAI;YAElB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAElC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAEnC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,qBAAqB;oBAC3B,QAAQ,EAAE,IAAI;iBACf;aACF;YAED,UAAU,EAAE;gBACV;oBACE,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,SAAS;4BACf,KAAK,EAAE,SAAS;yBACjB;wBACD;4BACE,IAAI,EAAE,oBAAoB;4BAC1B,KAAK,EAAE,oBAAoB;yBAC5B;qBACF;oBACD,OAAO,EAAE,SAAS;iBACnB;gBACD,GAAG,sCAAiB;gBACpB,GAAG,2DAA2B;gBAC9B;oBACE,WAAW,E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EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;CACF;AA9XD,4CA8XC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.clockifyEnhanced",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Productivity"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "https://github.com/skriptfabrik/n8n-nodes/blob/main/packages/clockify-enhanced/README.md"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "https://github.com/skriptfabrik/n8n-nodes/blob/main/packages/clockify-enhanced/README.md"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -1,5 +1,5 @@
1
- import { type IDataObject, type IHookFunctions, type ILoadOptionsFunctions, type INodePropertyOptions, type INodeType, type INodeTypeDescription, type IWebhookFunctions, type IWebhookResponseData } from 'n8n-workflow';
2
- import { components } from '../../api';
1
+ import { components } from '../../types/api';
2
+ import type { IDataObject, IHookFunctions, ILoadOptionsFunctions, INodePropertyOptions, INodeType, INodeTypeDescription, IWebhookFunctions, IWebhookResponseData } from 'n8n-workflow';
3
3
  export type Workspace = components['schemas']['WorkspaceDtoV1'];
4
4
  export type Webhook = components['schemas']['WebhookDtoV1'];
5
5
  export type WebhookCreate = components['schemas']['CreateWebhookRequestV1'];
@@ -10,27 +10,54 @@ export interface StaticData extends IDataObject {
10
10
  }
11
11
  export declare enum WebhookEvent {
12
12
  APPROVAL_REQUEST_STATUS_UPDATED = "APPROVAL_REQUEST_STATUS_UPDATED",
13
+ ASSIGNMENT_CREATED = "ASSIGNMENT_CREATED",
14
+ ASSIGNMENT_DELETED = "ASSIGNMENT_DELETED",
15
+ ASSIGNMENT_PUBLISHED = "ASSIGNMENT_PUBLISHED",
16
+ ASSIGNMENT_UPDATED = "ASSIGNMENT_UPDATED",
13
17
  BALANCE_UPDATED = "BALANCE_UPDATED",
18
+ BILLABLE_RATE_UPDATED = "BILLABLE_RATE_UPDATED",
19
+ CLIENT_DELETED = "CLIENT_DELETED",
20
+ CLIENT_UPDATED = "CLIENT_UPDATED",
21
+ COST_RATE_UPDATED = "COST_RATE_UPDATED",
22
+ EXPENSE_CREATED = "EXPENSE_CREATED",
23
+ EXPENSE_DELETED = "EXPENSE_DELETED",
24
+ EXPENSE_RESTORED = "EXPENSE_RESTORED",
25
+ EXPENSE_UPDATED = "EXPENSE_UPDATED",
14
26
  INVOICE_UPDATED = "INVOICE_UPDATED",
27
+ LIMITED_USERS_ADDED_TO_WORKSPACE = "LIMITED_USERS_ADDED_TO_WORKSPACE",
15
28
  NEW_APPROVAL_REQUEST = "NEW_APPROVAL_REQUEST",
16
29
  NEW_CLIENT = "NEW_CLIENT",
17
30
  NEW_INVOICE = "NEW_INVOICE",
18
31
  NEW_PROJECT = "NEW_PROJECT",
19
32
  NEW_TAG = "NEW_TAG",
20
33
  NEW_TASK = "NEW_TASK",
21
- NEW_TIME_ENTRY = "NEW_TIME_ENTRY",
22
34
  NEW_TIMER_STARTED = "NEW_TIMER_STARTED",
35
+ NEW_TIME_ENTRY = "NEW_TIME_ENTRY",
36
+ PROJECT_DELETED = "PROJECT_DELETED",
37
+ PROJECT_UPDATED = "PROJECT_UPDATED",
38
+ TAG_DELETED = "TAG_DELETED",
39
+ TAG_UPDATED = "TAG_UPDATED",
40
+ TASK_DELETED = "TASK_DELETED",
41
+ TASK_UPDATED = "TASK_UPDATED",
42
+ TIMER_STOPPED = "TIMER_STOPPED",
23
43
  TIME_ENTRY_DELETED = "TIME_ENTRY_DELETED",
44
+ TIME_ENTRY_RESTORED = "TIME_ENTRY_RESTORED",
45
+ TIME_ENTRY_SPLIT = "TIME_ENTRY_SPLIT",
24
46
  TIME_ENTRY_UPDATED = "TIME_ENTRY_UPDATED",
47
+ TIME_OFF_REQUESTED = "TIME_OFF_REQUESTED",
25
48
  TIME_OFF_REQUEST_APPROVED = "TIME_OFF_REQUEST_APPROVED",
26
49
  TIME_OFF_REQUEST_REJECTED = "TIME_OFF_REQUEST_REJECTED",
50
+ TIME_OFF_REQUEST_STARTED = "TIME_OFF_REQUEST_STARTED",
51
+ TIME_OFF_REQUEST_UPDATED = "TIME_OFF_REQUEST_UPDATED",
27
52
  TIME_OFF_REQUEST_WITHDRAWN = "TIME_OFF_REQUEST_WITHDRAWN",
28
- TIME_OFF_REQUESTED = "TIME_OFF_REQUESTED",
29
- TIMER_STOPPED = "TIMER_STOPPED",
53
+ USERS_INVITED_TO_WORKSPACE = "USERS_INVITED_TO_WORKSPACE",
30
54
  USER_ACTIVATED_ON_WORKSPACE = "USER_ACTIVATED_ON_WORKSPACE",
31
55
  USER_DEACTIVATED_ON_WORKSPACE = "USER_DEACTIVATED_ON_WORKSPACE",
32
56
  USER_DELETED_FROM_WORKSPACE = "USER_DELETED_FROM_WORKSPACE",
33
57
  USER_EMAIL_CHANGED = "USER_EMAIL_CHANGED",
58
+ USER_GROUP_CREATED = "USER_GROUP_CREATED",
59
+ USER_GROUP_DELETED = "USER_GROUP_DELETED",
60
+ USER_GROUP_UPDATED = "USER_GROUP_UPDATED",
34
61
  USER_JOINED_WORKSPACE = "USER_JOINED_WORKSPACE",
35
62
  USER_UPDATED = "USER_UPDATED"
36
63
  }