@trii/types 2.10.591 → 2.10.592
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Calendar/Common.d.ts +77 -0
- package/dist/Calendar/Common.js +16 -0
- package/dist/Calendar/Events.d.ts +61 -0
- package/dist/Calendar/Events.js +5 -0
- package/dist/Calendar/Tasks.d.ts +17 -0
- package/dist/Calendar/Tasks.js +5 -0
- package/dist/Conversations/Flows/Flow.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { UserInfo } from "../Users";
|
|
2
|
+
export type CalendarItemKind = "EVENT" | "TASK";
|
|
3
|
+
export type CalendarVisibility = "PRIVATE" | "PUBLIC";
|
|
4
|
+
export type BusyStatus = "BUSY" | "FREE";
|
|
5
|
+
export declare enum relatedType {
|
|
6
|
+
CONTACT = 1,
|
|
7
|
+
DEBT = 2,
|
|
8
|
+
TICKET = 3
|
|
9
|
+
}
|
|
10
|
+
export interface IRelatedRef {
|
|
11
|
+
type: relatedType;
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
export declare enum EventNotificationPeriod {
|
|
15
|
+
MINUTE = 1,
|
|
16
|
+
HOUR = 2,
|
|
17
|
+
DAY = 3,
|
|
18
|
+
WEEK = 4
|
|
19
|
+
}
|
|
20
|
+
export interface IReminder {
|
|
21
|
+
id: string;
|
|
22
|
+
/** Absolute reminder time (optional if using offset). */
|
|
23
|
+
remindAt?: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Offset relative to:
|
|
26
|
+
* - EVENT: occurrence startAt
|
|
27
|
+
* - TASK: dueAt
|
|
28
|
+
*/
|
|
29
|
+
offsetValue?: number;
|
|
30
|
+
offsetUnit?: EventNotificationPeriod;
|
|
31
|
+
sendToContact: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface ISyncRef {
|
|
34
|
+
provider: "NONE" | "GOOGLE";
|
|
35
|
+
/** External calendar id (e.g., Google calendarId) */
|
|
36
|
+
externalCalendarId?: string;
|
|
37
|
+
/** External item id (e.g., Google eventId / taskId) */
|
|
38
|
+
externalItemId?: string;
|
|
39
|
+
/** iCal UID (useful for correlation with Google/iCal) */
|
|
40
|
+
iCalUID?: string;
|
|
41
|
+
/** Provider ETag / version for concurrency */
|
|
42
|
+
etag?: string;
|
|
43
|
+
lastSyncedAt?: Date;
|
|
44
|
+
syncState?: "PENDING" | "SYNCED" | "ERROR";
|
|
45
|
+
syncError?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IAuditFields {
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
createdBy: UserInfo;
|
|
50
|
+
updatedAt?: Date;
|
|
51
|
+
updatedBy?: UserInfo;
|
|
52
|
+
deletedAt?: Date;
|
|
53
|
+
deletedBy?: UserInfo;
|
|
54
|
+
}
|
|
55
|
+
export interface ICalendarItemType {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
color: string;
|
|
59
|
+
icon: string;
|
|
60
|
+
/** Indicates whether this type applies to events or tasks. */
|
|
61
|
+
kind: CalendarItemKind;
|
|
62
|
+
}
|
|
63
|
+
export interface ICalendarItemBase extends IAuditFields {
|
|
64
|
+
id: string;
|
|
65
|
+
spaceId: string;
|
|
66
|
+
kind: CalendarItemKind;
|
|
67
|
+
visibility: CalendarVisibility;
|
|
68
|
+
title: string;
|
|
69
|
+
details: string;
|
|
70
|
+
location?: string;
|
|
71
|
+
color?: string;
|
|
72
|
+
type?: ICalendarItemType;
|
|
73
|
+
related?: IRelatedRef[];
|
|
74
|
+
sharedWith?: UserInfo[];
|
|
75
|
+
reminders?: IReminder[];
|
|
76
|
+
sync?: ISyncRef;
|
|
77
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventNotificationPeriod = exports.relatedType = void 0;
|
|
4
|
+
var relatedType;
|
|
5
|
+
(function (relatedType) {
|
|
6
|
+
relatedType[relatedType["CONTACT"] = 1] = "CONTACT";
|
|
7
|
+
relatedType[relatedType["DEBT"] = 2] = "DEBT";
|
|
8
|
+
relatedType[relatedType["TICKET"] = 3] = "TICKET";
|
|
9
|
+
})(relatedType || (exports.relatedType = relatedType = {}));
|
|
10
|
+
var EventNotificationPeriod;
|
|
11
|
+
(function (EventNotificationPeriod) {
|
|
12
|
+
EventNotificationPeriod[EventNotificationPeriod["MINUTE"] = 1] = "MINUTE";
|
|
13
|
+
EventNotificationPeriod[EventNotificationPeriod["HOUR"] = 2] = "HOUR";
|
|
14
|
+
EventNotificationPeriod[EventNotificationPeriod["DAY"] = 3] = "DAY";
|
|
15
|
+
EventNotificationPeriod[EventNotificationPeriod["WEEK"] = 4] = "WEEK";
|
|
16
|
+
})(EventNotificationPeriod || (exports.EventNotificationPeriod = EventNotificationPeriod = {}));
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BusyStatus, ICalendarItemBase } from "./Common";
|
|
2
|
+
export type EventStatus = "CONFIRMED" | "TENTATIVE" | "CANCELLED";
|
|
3
|
+
/**
|
|
4
|
+
* - SINGLE: a normal non-recurring event
|
|
5
|
+
* - SERIES_MASTER: the recurring master
|
|
6
|
+
* - SERIES_OVERRIDE: an exception/override for one occurrence
|
|
7
|
+
*/
|
|
8
|
+
export type EventDocKind = "SINGLE" | "SERIES_MASTER" | "SERIES_OVERRIDE";
|
|
9
|
+
export interface IRecurrence {
|
|
10
|
+
/**
|
|
11
|
+
* iCal RRULE compatible with Google:
|
|
12
|
+
* e.g. "FREQ=WEEKLY;BYDAY=MO,WE;INTERVAL=1"
|
|
13
|
+
*/
|
|
14
|
+
rrule: string;
|
|
15
|
+
/** Optional expansion limit (alternative to COUNT in RRULE). */
|
|
16
|
+
until?: Date;
|
|
17
|
+
/** Excluded occurrences (EXDATE). */
|
|
18
|
+
exDates?: Date[];
|
|
19
|
+
/** Additional occurrences (RDATE). */
|
|
20
|
+
rDates?: Date[];
|
|
21
|
+
/** Event timezone (strongly recommended). */
|
|
22
|
+
timeZone: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IRecurrenceOverride {
|
|
25
|
+
/** Link to master series. */
|
|
26
|
+
masterId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Occurrence key: original start time of the occurrence as generated from the master.
|
|
29
|
+
* This aligns with how Google identifies instances via originalStartTime.
|
|
30
|
+
*/
|
|
31
|
+
originalStartAt: Date;
|
|
32
|
+
/** What happens to that occurrence. */
|
|
33
|
+
action: "MODIFY" | "CANCEL";
|
|
34
|
+
/** When MODIFY: patch fields to override. */
|
|
35
|
+
patch?: Partial<Pick<ICalendarEvent, "title" | "details" | "location" | "allDay" | "startAt" | "endAt" | "status" | "busyStatus">>;
|
|
36
|
+
}
|
|
37
|
+
export interface ICalendarEvent extends ICalendarItemBase {
|
|
38
|
+
kind: "EVENT";
|
|
39
|
+
/** Document kind for recurrence handling. */
|
|
40
|
+
docKind: EventDocKind;
|
|
41
|
+
allDay: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Use startAt/endAt for time range.
|
|
44
|
+
* If allDay=true, recommended convention:
|
|
45
|
+
* - startAt at 00:00 in recurrence.timeZone
|
|
46
|
+
* - endAt exclusive (next day 00:00) for single-day all-day
|
|
47
|
+
*/
|
|
48
|
+
startAt: Date;
|
|
49
|
+
endAt: Date;
|
|
50
|
+
/** Should it block availability? */
|
|
51
|
+
busyStatus?: BusyStatus;
|
|
52
|
+
status?: EventStatus;
|
|
53
|
+
/**
|
|
54
|
+
* Recurrence definition, only for docKind="SERIES_MASTER"
|
|
55
|
+
*/
|
|
56
|
+
recurrence?: IRecurrence;
|
|
57
|
+
/**
|
|
58
|
+
* Override definition, only for docKind="SERIES_OVERRIDE"
|
|
59
|
+
*/
|
|
60
|
+
override?: IRecurrenceOverride;
|
|
61
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UserInfo } from "../Users";
|
|
2
|
+
import { ICalendarItemBase } from "./Common";
|
|
3
|
+
export type TaskStatus = "NEEDS_ACTION" | "IN_PROGRESS" | "COMPLETED" | "CANCELLED";
|
|
4
|
+
export type TaskPriority = 1 | 2 | 3 | 4;
|
|
5
|
+
export interface ICalendarTask extends ICalendarItemBase {
|
|
6
|
+
kind: "TASK";
|
|
7
|
+
/** Optional deadline */
|
|
8
|
+
dueAt?: Date;
|
|
9
|
+
/** If dueAt is date-only in UI, store 00:00 + hasTime=false */
|
|
10
|
+
hasTime?: boolean;
|
|
11
|
+
status: TaskStatus;
|
|
12
|
+
priority?: TaskPriority;
|
|
13
|
+
completedAt?: Date;
|
|
14
|
+
completedBy?: UserInfo;
|
|
15
|
+
/** Optional: support subtasks */
|
|
16
|
+
parentTaskId?: string;
|
|
17
|
+
}
|
|
@@ -190,7 +190,7 @@ export interface INodeProperty {
|
|
|
190
190
|
numberMin?: number;
|
|
191
191
|
numberMax?: number;
|
|
192
192
|
}
|
|
193
|
-
export type NodeParamsType = 'asyncOptions' | 'asyncMultiOptions' | 'options' | 'multiOptions' | 'datagrid' | 'string' | 'number' | 'boolean' | 'password' | 'json' | '
|
|
193
|
+
export type NodeParamsType = 'asyncOptions' | 'asyncMultiOptions' | 'options' | 'multiOptions' | 'datagrid' | 'string' | 'number' | 'boolean' | 'password' | 'json' | 'date' | 'file' | 'folder' | 'tabs' | 'title' | 'code' | 'codeJavascript';
|
|
194
194
|
export type CommonType = string | number | boolean | undefined | null;
|
|
195
195
|
export interface ICommonObject {
|
|
196
196
|
[key: string]: any | CommonType | ICommonObject | CommonType[] | ICommonObject[];
|