evo360-types 1.1.3 → 1.1.5

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,3 +1,70 @@
1
1
  import { z } from "zod";
2
2
  export declare const zEventStatusSchema: z.ZodEnum<["scheduled", "completed", "cancelled"]>;
3
3
  export declare const zEventTypeSchema: z.ZodEnum<["event", "meeting", "workshop", "other"]>;
4
+ export declare const zEventSchema: z.ZodObject<z.objectUtil.extendShape<{
5
+ id: z.ZodString;
6
+ ref: z.ZodAny;
7
+ tenant: z.ZodString;
8
+ model_ver: z.ZodOptional<z.ZodNumber>;
9
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
12
+ }, {
13
+ title: z.ZodString;
14
+ description: z.ZodOptional<z.ZodString>;
15
+ creatorName: z.ZodString;
16
+ creatorRef: z.ZodAny;
17
+ eventType: z.ZodEnum<["event", "meeting", "workshop", "other"]>;
18
+ eventStatus: z.ZodEnum<["scheduled", "completed", "cancelled"]>;
19
+ tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ name: z.ZodString;
21
+ color: z.ZodOptional<z.ZodString>;
22
+ hidden: z.ZodBoolean;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ hidden: boolean;
26
+ color?: string | undefined;
27
+ }, {
28
+ name: string;
29
+ hidden: boolean;
30
+ color?: string | undefined;
31
+ }>, "many">>;
32
+ }>, "strip", z.ZodTypeAny, {
33
+ id: string;
34
+ tenant: string;
35
+ title: string;
36
+ creatorName: string;
37
+ eventType: "other" | "event" | "meeting" | "workshop";
38
+ eventStatus: "completed" | "cancelled" | "scheduled";
39
+ ref?: any;
40
+ model_ver?: number | undefined;
41
+ created_at?: Date | null | undefined;
42
+ updated_at?: Date | null | undefined;
43
+ deleted_at?: Date | null | undefined;
44
+ tags?: {
45
+ name: string;
46
+ hidden: boolean;
47
+ color?: string | undefined;
48
+ }[] | undefined;
49
+ description?: string | undefined;
50
+ creatorRef?: any;
51
+ }, {
52
+ id: string;
53
+ tenant: string;
54
+ title: string;
55
+ creatorName: string;
56
+ eventType: "other" | "event" | "meeting" | "workshop";
57
+ eventStatus: "completed" | "cancelled" | "scheduled";
58
+ ref?: any;
59
+ model_ver?: number | undefined;
60
+ created_at?: Date | null | undefined;
61
+ updated_at?: Date | null | undefined;
62
+ deleted_at?: Date | null | undefined;
63
+ tags?: {
64
+ name: string;
65
+ hidden: boolean;
66
+ color?: string | undefined;
67
+ }[] | undefined;
68
+ description?: string | undefined;
69
+ creatorRef?: any;
70
+ }>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zEventTypeSchema = exports.zEventStatusSchema = void 0;
3
+ exports.zEventSchema = exports.zEventTypeSchema = exports.zEventStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const zod_schemas_1 = require("../shared/zod-schemas");
5
6
  // Enum for Event Instance Status
6
7
  exports.zEventStatusSchema = zod_1.z.enum([
7
8
  "scheduled",
@@ -14,3 +15,13 @@ exports.zEventTypeSchema = zod_1.z.enum([
14
15
  "workshop",
15
16
  "other",
16
17
  ]);
18
+ exports.zEventSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
19
+ .extend({
20
+ title: zod_1.z.string(),
21
+ description: zod_1.z.string().optional(),
22
+ creatorName: zod_1.z.string(),
23
+ creatorRef: zod_1.z.any(),
24
+ eventType: exports.zEventTypeSchema,
25
+ eventStatus: exports.zEventStatusSchema,
26
+ tags: zod_1.z.array(zod_schemas_1.zTagSchema).optional(),
27
+ });
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
5
5
  // Custom validation for FirestoreDocumentReference
6
6
  exports.zFireDocSchema = zod_1.z.object({
7
7
  id: zod_1.z.string(),
8
- //ref: zFirestoreDocumentReferenceSchema.optional(),
9
8
  ref: zod_1.z.any(),
10
9
  tenant: zod_1.z.string(),
11
10
  model_ver: zod_1.z.number().optional(),
@@ -1,28 +1,28 @@
1
- export * from "./fb_collections.d";
2
- import { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
3
- import { MeetingType } from "../evo-meeting";
1
+ export * from './fb_collections.d';
2
+ import { FirestoreDocumentReference, IFireDoc, ITag } from '../shared';
3
+ import { MeetingType } from '../evo-meeting';
4
4
 
5
5
  // ----- CalendarTypes
6
6
  // Enum for Event Instance Status
7
- export type EventStatus = "scheduled" | "completed" | "cancelled";
7
+ export type EventStatus = 'scheduled' | 'completed' | 'cancelled';
8
8
  export enum IEventStatus {
9
- Scheduled = "scheduled", // The event is scheduled and upcoming
10
- Completed = "completed", // The event has been completed
11
- Cancelled = "cancelled", // The event has been cancelled
9
+ Scheduled = 'scheduled', // The event is scheduled and upcoming
10
+ Completed = 'completed', // The event has been completed
11
+ Cancelled = 'cancelled', // The event has been cancelled
12
12
  }
13
13
 
14
14
  // Enum for Event Types
15
- export type EventType = "event" | "meeting" | "workshop" | "other";
15
+ export type EventType = 'event' | 'meeting' | 'workshop' | 'other';
16
16
  export enum IEventType {
17
- Event = "event", // A general event type
18
- Meeting = "meeting", // A meeting event
19
- Workshop = "workshop", // A workshop event
20
- Other = "other", // Any other type of event
17
+ Event = 'event', // A general event type
18
+ Meeting = 'meeting', // A meeting event
19
+ Workshop = 'workshop', // A workshop event
20
+ Other = 'other', // Any other type of event
21
21
  }
22
22
 
23
23
  // Interface for Meeting within a Event (meetingTasks)
24
24
  export interface IEventMeeting {
25
- meetingRef: FirestoreDocumentReference; // Reference to the original task
25
+ meetingRef?: FirestoreDocumentReference; // Reference to the original task
26
26
  type: MeetingType; // Type of meeting
27
27
  readonly task_count?: number;
28
28
  readonly talkingPoints_count?: number;
@@ -34,7 +34,7 @@ export interface IRecurringEvent extends IFireDoc {
34
34
  title: string; // Title of the meeting
35
35
  description?: string; // Optional description of the meeting
36
36
  creatorName: string; // Name of the user who created the event
37
- creatorRef: FirestoreDocumentReference; // reference to the user who created the event
37
+ creatorRef?: FirestoreDocumentReference; // reference to the user who created the event
38
38
  participants: string[]; // List of participant IDs
39
39
  startDate: Date; // Start date and time of the first meeting
40
40
  endDate?: Date; // Optional end date and time of the recurring meeting
@@ -49,7 +49,7 @@ export interface IEvent extends IFireDoc {
49
49
  title: string; // Title of the event
50
50
  description?: string; // Optional description of the event
51
51
  creatorName: string; // Name of the user who created the event
52
- creatorRef: FirestoreDocumentReference; // reference to the user who created the event
52
+ creatorRef?: FirestoreDocumentReference; // reference to the user who created the event
53
53
  participantNames?: string[]; // List of participant names
54
54
  participantRefs?: FirestoreDocumentReference[]; // List of participant references
55
55
  startDate: Date; // Start date and time of the event
@@ -1,34 +1,29 @@
1
- export * from "./fb_collections.d";
2
- import { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
3
- import { TaskPriority, TaskStatus } from "../evo-task";
1
+ export * from './fb_collections.d';
2
+ import { FirestoreDocumentReference, IFireDoc, ITag } from '../shared';
3
+ import { TaskPriority, TaskStatus } from '../evo-task';
4
4
 
5
5
  // ----- MeetingTypes
6
- export type MeetingType =
7
- | "regular"
8
- | "oneonone"
9
- | "feedback"
10
- | "presentation"
11
- | "other";
6
+ export type MeetingType = 'regular' | 'oneonone' | 'feedback' | 'presentation' | 'other';
12
7
  export enum IMeetingType {
13
- Regular = "regular", // A regular meeting
14
- OneOnOne = "oneonone", // A one-on-one meeting
15
- Feedback = "feedback", // A feedback session
16
- Presentation = "presentation", // A presentation meeting
17
- Other = "other", // Any other type of meeting
8
+ Regular = 'regular', // A regular meeting
9
+ OneOnOne = 'oneonone', // A one-on-one meeting
10
+ Feedback = 'feedback', // A feedback session
11
+ Presentation = 'presentation', // A presentation meeting
12
+ Other = 'other', // Any other type of meeting
18
13
  }
19
14
 
20
15
  // Interface for Event within a Meeting (meetingEvent)
21
16
  export interface IMeetingEvent {
22
- eventRef: FirestoreDocumentReference; // Reference to the original event
17
+ eventRef?: FirestoreDocumentReference; // Reference to the original event
23
18
  participantNames: string[]; // List of participant names
24
- participantRefs: FirestoreDocumentReference[]; // List of participant references
19
+ participantRefs?: FirestoreDocumentReference[]; // List of participant references
25
20
  startDate: Date; // Start date and time of the event
26
21
  endDate?: Date; // Optional end date and time of the event
27
22
  }
28
23
 
29
24
  // Interface for Tasks within a Meeting (meetingTasks)
30
25
  export interface IMeetingTask {
31
- taskRef: FirestoreDocumentReference; // Reference to the original task
26
+ taskRef?: FirestoreDocumentReference; // Reference to the original task
32
27
  title: string; // Title (copied from the original task)
33
28
  status: TaskStatus; // Status (can be updated independently from the original task)
34
29
  priority?: TaskPriority; // Priority (copied from the original task)
@@ -44,7 +39,7 @@ export interface ITalkingPointTemplate extends IFireDoc {
44
39
 
45
40
  // Interface for Talking Points within a Meeting (meetingTalkingPoints)
46
41
  export interface IMeetingTalkingPoint {
47
- templateRef: FirestoreDocumentReference; // Reference to the original template
42
+ templateRef?: FirestoreDocumentReference; // Reference to the original template
48
43
  title: string; // Title (can be copied from the template or edited)
49
44
  description?: string; // Description (can be copied from the template or edited)
50
45
  tags?: ITag[]; // Tags (can be copied from the template or edited)
@@ -59,7 +54,7 @@ export interface IMeeting extends IFireDoc {
59
54
  title: string; // Title of the meeting
60
55
  description?: string; // Optional description of the meeting
61
56
  creatorName: string; // Name of the user who created the meeting
62
- creatorRef: FirestoreDocumentReference; // reference to the user who created the meeting
57
+ creatorRef?: FirestoreDocumentReference; // reference to the user who created the meeting
63
58
  event: IMeetingEvent;
64
59
  type: MeetingType; // Type of meeting
65
60
  tasks?: IMeetingTask[];
@@ -1,29 +1,24 @@
1
- export * from "./fb_collections.d";
2
- import { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
1
+ export * from './fb_collections.d';
2
+ import { FirestoreDocumentReference, IFireDoc, ITag } from '../shared';
3
3
  // ----- TaskTypes
4
4
  // Enum for Task Instance Status
5
5
 
6
- export type TaskStatus =
7
- | "not_started"
8
- | "in_progress"
9
- | "completed"
10
- | "cancelled"
11
- | "on_hold";
6
+ export type TaskStatus = 'not_started' | 'in_progress' | 'completed' | 'cancelled' | 'on_hold';
12
7
 
13
8
  export enum ITaskStatus {
14
- NotStarted = "not_started",
15
- InProgress = "in_progress",
16
- Completed = "completed",
17
- Cancelled = "cancelled",
18
- OnHold = "on_hold",
9
+ NotStarted = 'not_started',
10
+ InProgress = 'in_progress',
11
+ Completed = 'completed',
12
+ Cancelled = 'cancelled',
13
+ OnHold = 'on_hold',
19
14
  }
20
15
 
21
16
  // Interface for Task Priority
22
- export type TaskPriority = "low" | "medium" | "high";
17
+ export type TaskPriority = 'low' | 'medium' | 'high';
23
18
  export enum ITaskPriority {
24
- Low = "low",
25
- Medium = "medium",
26
- High = "high",
19
+ Low = 'low',
20
+ Medium = 'medium',
21
+ High = 'high',
27
22
  }
28
23
 
29
24
  // Interface for Task Instances (taskInstances)
@@ -31,7 +26,7 @@ export interface ITask extends IFireDoc {
31
26
  title: string; // Title of the task
32
27
  description?: string; // Optional description of the task
33
28
  creatorName: string; // Name of the user who created the task
34
- creatorRef: FirestoreDocumentReference; // reference to the user who created the task
29
+ creatorRef?: FirestoreDocumentReference; // reference to the user who created the task
35
30
  startDate: Date; // Start date and time of the task
36
31
  dueDate?: Date; // Optional due date and time of the task
37
32
  status: TaskStatus; // Status of the task
@@ -1,9 +1,9 @@
1
1
  export * from "./fb_collections.d";
2
2
  // ----- FirestoreTypes
3
3
  // Definir o tipo unificado para DocumentReference
4
- export interface FirestoreDocumentReference<T = any> {
4
+ export interface FirestoreDocumentReference<> {
5
5
  id: string;
6
- get(): Promise<T>;
6
+ path: string;
7
7
  // Outros métodos comuns que você utiliza
8
8
  }
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "dist/index.ts",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "build": "tsc && copyfiles -u 1 src/**/*.d.ts dist",
12
+ "publish": "tsc && copyfiles -u 1 src/**/*.d.ts dist && npm publish",
12
13
  "compile": "tsc"
13
14
  },
14
15
  "homepage": "https://www.darvist.com",