@trii/types 2.10.590 → 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.
@@ -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,5 @@
1
+ "use strict";
2
+ // ===========================
3
+ // EVENTS
4
+ // ===========================
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // ===========================
3
+ // TASKS
4
+ // ===========================
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,6 +19,7 @@ export declare enum MessageDirection {
19
19
  OUT = 2
20
20
  }
21
21
  export declare enum MessageAck {
22
+ ACK_SCHEDULED = -3,
22
23
  ACK_QUEUE = -2,
23
24
  ACK_PENDING = -1,
24
25
  ACK_NONE = 0,
@@ -347,6 +348,7 @@ export interface IMessage {
347
348
  read?: boolean;
348
349
  /**ISO8601 timestamp */
349
350
  timestamp: Date;
351
+ scheduledDate?: Date | null;
350
352
  userId: string;
351
353
  channelInfo?: IChannelInfo;
352
354
  /**
@@ -8,6 +8,7 @@ var MessageDirection;
8
8
  })(MessageDirection || (exports.MessageDirection = MessageDirection = {}));
9
9
  var MessageAck;
10
10
  (function (MessageAck) {
11
+ MessageAck[MessageAck["ACK_SCHEDULED"] = -3] = "ACK_SCHEDULED";
11
12
  MessageAck[MessageAck["ACK_QUEUE"] = -2] = "ACK_QUEUE";
12
13
  MessageAck[MessageAck["ACK_PENDING"] = -1] = "ACK_PENDING";
13
14
  MessageAck[MessageAck["ACK_NONE"] = 0] = "ACK_NONE";
@@ -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' | 'code' | 'date' | 'file' | 'folder' | 'tabs' | 'title';
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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.590",
3
+ "version": "2.10.592",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",