@26lights/orcha 0.7.6 → 0.7.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.
@@ -1,4 +1,4 @@
1
- import { type Milestone } from '../types';
1
+ import { type Milestone, type AddActivityPayload } from '../types';
2
2
  import { type UpdateActivityPayload, type UpdateMilestonePayload, type RemoveActivityPayload } from '../types';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  templateId: {
@@ -0,0 +1,479 @@
1
+ export type Id = string;
2
+ export interface Entity {
3
+ __typename: string;
4
+ id: Id;
5
+ }
6
+ export interface Ordered {
7
+ rank: string;
8
+ }
9
+ export interface ActivityType extends Entity {
10
+ name: string;
11
+ }
12
+ export interface TemplateDetails extends Entity, Ordered {
13
+ name?: string;
14
+ phases: Phase[];
15
+ rules?: Rule[];
16
+ order: number;
17
+ updatedAt?: string;
18
+ updatedBy?: string;
19
+ }
20
+ export interface Phase extends Entity, Ordered {
21
+ name?: string;
22
+ milestones: Milestone[];
23
+ order: number;
24
+ }
25
+ export interface PhaseProject {
26
+ id: Id;
27
+ name?: string;
28
+ milestones?: MilestoneProject[];
29
+ order: number;
30
+ }
31
+ export declare const milestoneStatus: {
32
+ readonly todo: "todo";
33
+ readonly done: "done";
34
+ readonly archived: "archived";
35
+ };
36
+ export type MilestoneStatusKeys = keyof typeof milestoneStatus;
37
+ export type MilestoneStatus = (typeof milestoneStatus)[MilestoneStatusKeys];
38
+ export interface Milestone extends Entity, Ordered {
39
+ order: number;
40
+ name?: string;
41
+ activities: Activity[];
42
+ status?: MilestoneStatus;
43
+ }
44
+ export interface MilestoneProject extends Entity, Ordered {
45
+ id: Id;
46
+ order: number;
47
+ name?: string;
48
+ activities?: ActivityProject[];
49
+ status?: MilestoneStatus;
50
+ }
51
+ export interface ActivityBase extends Entity, Ordered {
52
+ name: string;
53
+ description?: string;
54
+ estimation?: number;
55
+ important?: boolean;
56
+ type?: ActivityType;
57
+ milestone?: Milestone;
58
+ dependingOn?: Id[];
59
+ blocking?: Id[];
60
+ attachments?: Attachment[];
61
+ tasks?: Subtask[];
62
+ }
63
+ export declare const durationTypes: {
64
+ readonly months: "months";
65
+ readonly weeks: "weeks";
66
+ readonly days: "days";
67
+ };
68
+ export type DurationTypesKeys = keyof typeof durationTypes;
69
+ export type DurationTypes = (typeof durationTypes)[DurationTypesKeys];
70
+ export interface Activity extends ActivityBase {
71
+ assignee?: User;
72
+ status: ActivityStatus;
73
+ deadline: string;
74
+ project: Project;
75
+ comments?: Comment[];
76
+ duration?: number;
77
+ durationType?: DurationTypes;
78
+ }
79
+ export interface AddActivityInput {
80
+ projectId: string;
81
+ statusId?: string;
82
+ }
83
+ export interface UpdateActivityInput {
84
+ id: Id;
85
+ name?: string;
86
+ rank?: Id;
87
+ description?: string;
88
+ estimation?: number;
89
+ important?: boolean;
90
+ typeId?: Id;
91
+ assigneeId?: Id;
92
+ statusId?: Id;
93
+ deadline?: string;
94
+ active?: boolean;
95
+ }
96
+ export interface ActivityProject extends ActivityBase {
97
+ projectId: Id;
98
+ projectName?: string;
99
+ milestoneId: Id;
100
+ phaseId: Id;
101
+ endDate?: string;
102
+ comments?: Comment[];
103
+ attachments?: Attachment[];
104
+ status?: ActivityStatus;
105
+ }
106
+ export interface ActivityFeed<K extends ActivityFeedStatus = ActivityFeedStatus> extends ActivityBase {
107
+ projectId: Id;
108
+ milestoneId?: Id;
109
+ phaseId?: Id;
110
+ projectName?: string;
111
+ endDate?: string;
112
+ assignees?: Id[];
113
+ comments?: Comment[];
114
+ attachments?: Attachment[];
115
+ feedStatus: (typeof activityFeedStatus)[K];
116
+ }
117
+ export interface Subtask extends Entity, Ordered {
118
+ name?: string;
119
+ status?: ActivityStatus;
120
+ assignees?: Id[];
121
+ }
122
+ export interface Comment extends Entity {
123
+ userId: Id;
124
+ content: string;
125
+ createdAt: string;
126
+ editedAt?: string;
127
+ }
128
+ export interface FileLike extends Entity {
129
+ name: string;
130
+ size: number;
131
+ lastModified: number;
132
+ type: string;
133
+ url: string;
134
+ id: Id;
135
+ }
136
+ export interface Attachment extends FileLike {
137
+ createdAt: string;
138
+ }
139
+ export interface ActivityStatus extends Entity {
140
+ name: string;
141
+ }
142
+ export declare const activityFeedStatus: {
143
+ readonly future: "future";
144
+ readonly this_month: "this_month";
145
+ readonly this_week: "this_week";
146
+ readonly today: "today";
147
+ readonly done: "done";
148
+ };
149
+ export type ActivityFeedStatusKeys = keyof typeof activityFeedStatus;
150
+ export type ActivityFeedStatus = (typeof activityFeedStatus)[ActivityFeedStatusKeys];
151
+ export declare const ruleComparators: {
152
+ readonly BEFORE: "before";
153
+ readonly AFTER: "after";
154
+ };
155
+ export type RuleComparatorKeys = keyof typeof ruleComparators;
156
+ export type RuleComparator = (typeof ruleComparators)[RuleComparatorKeys];
157
+ export declare const ruleTriggerTypes: {
158
+ readonly START: "start";
159
+ readonly end: "end";
160
+ };
161
+ export type RuleTriggerTypeKeys = keyof typeof ruleTriggerTypes;
162
+ export type RuleTriggerTypes = (typeof ruleTriggerTypes)[RuleTriggerTypeKeys];
163
+ export declare const ruleDurationUnits: {
164
+ readonly DAYS: "days";
165
+ readonly WEEKS: "weeks";
166
+ readonly MONTHS: "months";
167
+ };
168
+ export type RuleDurationUnitKeys = keyof typeof ruleDurationUnits;
169
+ export type RuleDurationUnits = (typeof ruleDurationUnits)[RuleDurationUnitKeys];
170
+ export interface Rule {
171
+ id: Id;
172
+ itemType?: TemplateItemType;
173
+ subItemId?: Id;
174
+ comparator?: RuleComparator;
175
+ trigger?: RuleTriggerTypes;
176
+ endDate?: string;
177
+ startDate?: string;
178
+ duration?: number;
179
+ durationUnit?: RuleDurationUnits;
180
+ }
181
+ export interface User {
182
+ id: Id;
183
+ firstName?: string;
184
+ lastName?: string;
185
+ picture?: string;
186
+ }
187
+ export declare const templateItemType: {
188
+ readonly TEMPLATES: "templates";
189
+ readonly PHASES: "phases";
190
+ readonly MILESTONES: "milestones";
191
+ readonly ACTIVITIES: "activities";
192
+ readonly SUBTASKS: "subtasks";
193
+ };
194
+ export declare enum TemplateItemTypeEnum {
195
+ PHASES = "phases",
196
+ MILESTONES = "milestones",
197
+ ACTIVITIES = "activities"
198
+ }
199
+ export type TemplateItemTypeKeys = keyof typeof templateItemType;
200
+ export type TemplateItemType = (typeof templateItemType)[TemplateItemTypeKeys];
201
+ export interface UpdateTemplateDetailsPayload {
202
+ id: Id;
203
+ name?: string;
204
+ phases?: Phase[];
205
+ rules?: Rule[];
206
+ order?: number;
207
+ }
208
+ export interface AddItemPayload {
209
+ type: TemplateItemType;
210
+ templateId: Id;
211
+ phaseId?: Id;
212
+ milestoneId?: Id;
213
+ activityId?: Id;
214
+ item: AddPhasePayload | AddMilestonePayload | AddActivityPayload | AddSubtaskPayload;
215
+ }
216
+ export interface AddPhasePayload {
217
+ name: string;
218
+ rank: string;
219
+ templateId: string;
220
+ }
221
+ export interface AddMilestonePayload {
222
+ name: string;
223
+ rank: string;
224
+ phaseId: string;
225
+ }
226
+ export interface AddActivityPayload {
227
+ phaseId: Id;
228
+ milestoneId: Id;
229
+ name: string;
230
+ rank: Id;
231
+ }
232
+ export interface UpdateMilestonePayload {
233
+ id: Id;
234
+ order: number;
235
+ phaseId: Id;
236
+ name?: string;
237
+ activities?: Activity[];
238
+ rules?: Rule[];
239
+ }
240
+ export interface UpdateItemPayload<T extends TemplateItemType> {
241
+ itemType: T;
242
+ id: Id;
243
+ templateId: Id;
244
+ data: UpdateItemPayloadDataTypes[T];
245
+ }
246
+ export type UpdateItemTemplatePayload = UpdateItemPayload<typeof templateItemType.TEMPLATES>;
247
+ export type UpdateItemActivityPayload = UpdateItemPayload<typeof templateItemType.ACTIVITIES>;
248
+ export type UpdateItemMilestonePayload = UpdateItemPayload<typeof templateItemType.MILESTONES>;
249
+ export type UpdateItemPhasePayload = UpdateItemPayload<typeof templateItemType.PHASES>;
250
+ export interface UpdatePhasePayload {
251
+ name?: string;
252
+ milestones?: Milestone[];
253
+ rules?: Rule[];
254
+ }
255
+ export type UpdateItemPayloadDataTypes = {
256
+ [TemplateItemTypeEnum.ACTIVITIES]: UpdateActivityPayload;
257
+ [TemplateItemTypeEnum.MILESTONES]: UpdateMilestonePayload;
258
+ [TemplateItemTypeEnum.PHASES]: UpdatePhasePayload;
259
+ };
260
+ export type UpdateItemPayloadData<T extends TemplateItemTypeEnum> = UpdateItemPayloadDataTypes[T];
261
+ export interface RemoveItemPayload {
262
+ type: TemplateItemType;
263
+ templateId: Id;
264
+ phaseId?: Id;
265
+ milestoneId?: Id;
266
+ activityId?: Id;
267
+ data: {
268
+ id: Id;
269
+ };
270
+ }
271
+ export interface RemoveMilestonePayload {
272
+ id: Id;
273
+ phaseId: Id;
274
+ }
275
+ export interface RemoveActivityPayload {
276
+ id: Id;
277
+ phaseId: Id;
278
+ milestoneId: Id;
279
+ }
280
+ export interface AddSubtaskPayload {
281
+ activityId: Id;
282
+ name: string;
283
+ rank: Id;
284
+ phaseId?: Id;
285
+ milestoneId?: Id;
286
+ }
287
+ export interface UpdateActivityPayload {
288
+ id: Id;
289
+ phaseId: Id;
290
+ milestoneId: Id;
291
+ name?: string;
292
+ rules?: Rule[];
293
+ subtasks?: Subtask[];
294
+ description?: string;
295
+ estimation?: number;
296
+ isImportant?: boolean;
297
+ dependingOn?: Id[];
298
+ blocking?: Id[];
299
+ dependingMilestones?: Id[];
300
+ type?: string;
301
+ }
302
+ export interface UpdateActivityFieldPayload {
303
+ id: Id;
304
+ name?: string;
305
+ rules?: Rule[];
306
+ tasks?: Subtask[];
307
+ description?: string;
308
+ estimation?: number;
309
+ isImportant?: boolean;
310
+ dependingOn?: Id[];
311
+ blocking?: Id[];
312
+ dependingMilestones?: Id[];
313
+ type?: string;
314
+ status?: ActivityStatus;
315
+ endDate?: string;
316
+ assignees?: Id[];
317
+ attachments?: Attachment[];
318
+ }
319
+ export interface AddRulePayload {
320
+ templateId: Id;
321
+ }
322
+ export interface UpdateRulePayload extends Rule {
323
+ }
324
+ export interface updateTemplateRulePayload {
325
+ templateId: Id;
326
+ payload: UpdateRulePayload;
327
+ }
328
+ export interface RemoveRulePayload {
329
+ templateId: Id;
330
+ id: Id;
331
+ }
332
+ export declare const listUpdateTypes: {
333
+ readonly add: "add";
334
+ readonly remove: "remove";
335
+ readonly moved: "moved";
336
+ };
337
+ export type ListUpdateTypesKeys = keyof typeof listUpdateTypes;
338
+ export type ListUpdateTypes = (typeof listUpdateTypes)[ListUpdateTypesKeys];
339
+ export type FeedListUpdateType = {
340
+ element: Activity;
341
+ };
342
+ export type FeedListUpdateAdd = {
343
+ add: {
344
+ element: Activity;
345
+ newIndex: number;
346
+ };
347
+ };
348
+ export type FeedListUpdateRemove = {
349
+ removed: {
350
+ element: FeedListUpdateType;
351
+ oldIndex: number;
352
+ };
353
+ };
354
+ export type FeedListUpdateMoved = {
355
+ moved: {
356
+ element: FeedListUpdateType;
357
+ newIndex: number;
358
+ oldIndex: number;
359
+ };
360
+ };
361
+ export type FeedListUpdateUnion = FeedListUpdateAdd | FeedListUpdateRemove | FeedListUpdateMoved;
362
+ export type FeedListUpdates = {
363
+ [listUpdateTypes.add]: FeedListUpdateAdd;
364
+ [listUpdateTypes.remove]: FeedListUpdateRemove;
365
+ [listUpdateTypes.moved]: FeedListUpdateMoved;
366
+ };
367
+ export type FeedListUpdate<K extends ListUpdateTypesKeys> = FeedListUpdates[K];
368
+ export interface UpdateFeedActivitiesPayload<T extends ActivityFeedStatus> {
369
+ payload: {
370
+ status: T;
371
+ activities: ActivityFeed<T>[];
372
+ };
373
+ }
374
+ export interface ChangeFeedActivitiesChange {
375
+ change: FeedListUpdateUnion;
376
+ }
377
+ export type ChangeFeedActivitiesPayload = ChangeFeedActivitiesChange & {
378
+ status: ActivityStatus;
379
+ };
380
+ export type AddFeedActivityPayload = {
381
+ status: ActivityStatus;
382
+ };
383
+ export type Project = {
384
+ id: string;
385
+ name?: string;
386
+ phases?: Phase[];
387
+ };
388
+ export declare const feedFilters: {
389
+ readonly project: "project";
390
+ readonly activity_type: "activity_type";
391
+ readonly assignee: "assignee";
392
+ };
393
+ export type FeedFiltersKeys = keyof typeof feedFilters;
394
+ export type FeedFilters = (typeof feedFilters)[FeedFiltersKeys];
395
+ export type UpdateFeedFilterPayload = {
396
+ type: FeedFilters;
397
+ values: Array<Id | string>;
398
+ };
399
+ export type FeedFiltersMap = Record<FeedFilters, Array<Id | string>>;
400
+ export type UdpateFeedActivityData = {
401
+ id: Id;
402
+ phaseId?: Id;
403
+ milestoneId?: Id;
404
+ rank: number;
405
+ name?: string;
406
+ rules?: Rule[];
407
+ subtasks?: Subtask[];
408
+ description?: string;
409
+ estimation?: number;
410
+ isImportant?: boolean;
411
+ dependingOn?: Id[];
412
+ blocking?: Id[];
413
+ dependingMilestones?: Id[];
414
+ type?: string;
415
+ feedStatus: ActivityFeedStatus;
416
+ };
417
+ export type UpdateFeedActivityPayload = {
418
+ itemType: typeof templateItemType.ACTIVITIES;
419
+ id: Id;
420
+ projectId?: Id;
421
+ data: UdpateFeedActivityData;
422
+ };
423
+ export type UdpateProjectActivityData = {
424
+ id: Id;
425
+ phaseId: Id;
426
+ milestoneId: Id;
427
+ order: number;
428
+ name?: string;
429
+ rules?: Rule[];
430
+ subtasks?: Subtask[];
431
+ description?: string;
432
+ estimation?: number;
433
+ isImportant?: boolean;
434
+ dependingOn?: Id[];
435
+ blocking?: Id[];
436
+ dependingMilestones?: Id[];
437
+ type?: string;
438
+ };
439
+ export type UpdateProjectActivityPayload = {
440
+ itemType: typeof templateItemType.ACTIVITIES;
441
+ id: Id;
442
+ projectId: Id;
443
+ data: UdpateProjectActivityData;
444
+ };
445
+ export type UpdateSubtaskFieldPayload = {
446
+ id: Id;
447
+ name?: string;
448
+ assignees?: Id[];
449
+ status?: ActivityStatus;
450
+ };
451
+ export type MultiselectOption = {
452
+ label: string;
453
+ value: Id;
454
+ };
455
+ export type MultiselectOptionTagProps<T extends MultiselectOption = MultiselectOption> = {
456
+ option: T;
457
+ handleTagRemove: (option: T, e: Event) => void;
458
+ };
459
+ export type AddFilesPayload = {
460
+ activityId: Id;
461
+ files: File[];
462
+ };
463
+ export type RemoveFilePayload = {
464
+ activityId: Id;
465
+ file: Attachment;
466
+ };
467
+ export type AddCommentPayload = {
468
+ activityId: Id;
469
+ comment: string;
470
+ };
471
+ export type UpdateCommentPayload = {
472
+ activityId: Id;
473
+ id: Id;
474
+ content: string;
475
+ };
476
+ export type RemoveCommentPayload = {
477
+ activityId: Id;
478
+ id: Id;
479
+ };
@@ -1,4 +1,4 @@
1
- import { type MilestoneProject, type User } from '../types';
1
+ import { type MilestoneProject, type User, type AddActivityPayload } from '../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  phaseId: {
4
4
  type: import("vue").PropType<string>;
@@ -1,4 +1,4 @@
1
- import { type PhaseProject, type Project, type User, type UpdateProjectActivityPayload, type AddSubtaskPayload, type AddFilesPayload, type RemoveFilePayload, type AddCommentPayload, type UpdateCommentPayload, type RemoveCommentPayload } from '../types';
1
+ import { type PhaseProject, type Project, type User, type AddActivityPayload, type UpdateProjectActivityPayload, type AddSubtaskPayload, type AddFilesPayload, type RemoveFilePayload, type AddCommentPayload, type UpdateCommentPayload, type RemoveCommentPayload } from '../types';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  project: {
4
4
  type: import("vue").PropType<Project>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-ND-4.0",
6
6
  "author": "26lights <dev@26lights.com> (https://www.26lights.com)",
7
- "version": "0.7.6",
7
+ "version": "0.7.7",
8
8
  "workspaces": [
9
9
  "packages/*"
10
10
  ],