evo360-types 1.1.43 → 1.1.45

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.
@@ -41,7 +41,7 @@ exports.zProfileSchema = zod_schemas_1.zFireDocSchema
41
41
  .extend({
42
42
  display_name: zod_1.z.string().min(1).max(255),
43
43
  last_name: zod_1.z.string().max(255).nullable().optional(),
44
- first_name: zod_1.z.string().max(255).nullable(),
44
+ first_name: zod_1.z.string().min(1).max(255).nullable(),
45
45
  gender: zod_1.z.string().max(255).nullable().optional(),
46
46
  birthdate: zod_1.z.date().nullable().optional(),
47
47
  photo_ref: zod_1.z.string().max(255).nullable().optional(),
@@ -40,7 +40,7 @@ export const zProfileSchema = zFireDocSchema
40
40
  .extend({
41
41
  display_name: z.string().min(1).max(255),
42
42
  last_name: z.string().max(255).nullable().optional(),
43
- first_name: z.string().max(255).nullable(),
43
+ first_name: z.string().min(1).max(255).nullable(),
44
44
  gender: z.string().max(255).nullable().optional(),
45
45
  birthdate: z.date().nullable().optional(),
46
46
  photo_ref: z.string().max(255).nullable().optional(),
@@ -2,3 +2,50 @@ import { z } from "zod";
2
2
  export declare const zTenantActionSchema: z.ZodEnum<["CREATE_TENANT", "DELETE_TENANT", "UPDATE_TENANT"]>;
3
3
  export declare const zTenantLanguageSchema: z.ZodEnum<["ptBR", "en"]>;
4
4
  export declare const zTenantStatusSchema: z.ZodEnum<["draft", "published", "archived"]>;
5
+ export declare const zTenantSchema: z.ZodObject<z.objectUtil.extendShape<{
6
+ id: z.ZodString;
7
+ ref: z.ZodAny;
8
+ tenant: z.ZodString;
9
+ model_ver: z.ZodOptional<z.ZodNumber>;
10
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
12
+ deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
13
+ }, {
14
+ name: z.ZodString;
15
+ url_alias: z.ZodString;
16
+ date_format: z.ZodOptional<z.ZodString>;
17
+ language: z.ZodOptional<z.ZodEnum<["ptBR", "en"]>>;
18
+ status: z.ZodEnum<["draft", "published", "archived"]>;
19
+ timezone: z.ZodOptional<z.ZodString>;
20
+ created_by: z.ZodAny;
21
+ }>, "strip", z.ZodTypeAny, {
22
+ id: string;
23
+ tenant: string;
24
+ name: string;
25
+ url_alias: string;
26
+ status: "draft" | "published" | "archived";
27
+ ref?: any;
28
+ model_ver?: number | undefined;
29
+ created_at?: Date | null | undefined;
30
+ updated_at?: Date | null | undefined;
31
+ deleted_at?: Date | null | undefined;
32
+ date_format?: string | undefined;
33
+ language?: "ptBR" | "en" | undefined;
34
+ timezone?: string | undefined;
35
+ created_by?: any;
36
+ }, {
37
+ id: string;
38
+ tenant: string;
39
+ name: string;
40
+ url_alias: string;
41
+ status: "draft" | "published" | "archived";
42
+ ref?: any;
43
+ model_ver?: number | undefined;
44
+ created_at?: Date | null | undefined;
45
+ updated_at?: Date | null | undefined;
46
+ deleted_at?: Date | null | undefined;
47
+ date_format?: string | undefined;
48
+ language?: "ptBR" | "en" | undefined;
49
+ timezone?: string | undefined;
50
+ created_by?: any;
51
+ }>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zTenantStatusSchema = exports.zTenantLanguageSchema = exports.zTenantActionSchema = void 0;
3
+ exports.zTenantSchema = exports.zTenantStatusSchema = exports.zTenantLanguageSchema = exports.zTenantActionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const zod_schemas_1 = require("../shared/zod-schemas");
5
6
  exports.zTenantActionSchema = zod_1.z.enum([
6
7
  "CREATE_TENANT",
7
8
  "DELETE_TENANT",
@@ -9,3 +10,13 @@ exports.zTenantActionSchema = zod_1.z.enum([
9
10
  ]);
10
11
  exports.zTenantLanguageSchema = zod_1.z.enum(["ptBR", "en"]);
11
12
  exports.zTenantStatusSchema = zod_1.z.enum(["draft", "published", "archived"]);
13
+ exports.zTenantSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
14
+ .extend({
15
+ name: zod_1.z.string().min(1).max(255),
16
+ url_alias: zod_1.z.string().min(1).max(255),
17
+ date_format: zod_1.z.string().optional(),
18
+ language: exports.zTenantLanguageSchema.optional(),
19
+ status: exports.zTenantStatusSchema,
20
+ timezone: zod_1.z.string().optional(),
21
+ created_by: zod_1.z.any(),
22
+ });
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { zFireDocSchema } from "../shared/zod-schemas";
2
3
 
3
4
  export const zTenantActionSchema = z.enum([
4
5
  "CREATE_TENANT",
@@ -9,3 +10,14 @@ export const zTenantActionSchema = z.enum([
9
10
  export const zTenantLanguageSchema = z.enum(["ptBR", "en"]);
10
11
 
11
12
  export const zTenantStatusSchema = z.enum(["draft", "published", "archived"]);
13
+
14
+ export const zTenantSchema = zFireDocSchema // Extend from FireDocSchema
15
+ .extend({
16
+ name: z.string().min(1).max(255),
17
+ url_alias: z.string().min(1).max(255),
18
+ date_format: z.string().optional(),
19
+ language: zTenantLanguageSchema.optional(),
20
+ status: zTenantStatusSchema,
21
+ timezone: z.string().optional(),
22
+ created_by: z.any(),
23
+ });
@@ -35,6 +35,10 @@ export declare enum ISurveyQuestionType {
35
35
  Essay = "essay",
36
36
  Options = "options"
37
37
  }
38
+ export interface IQuestionCounters {
39
+ deleted: number;
40
+ total: number;
41
+ }
38
42
  export interface ISurveyQuestion extends IFireDoc {
39
43
  surveyId: string;
40
44
  sectionId: string;
@@ -67,7 +71,7 @@ export interface ISurveySection extends IFireDoc {
67
71
  description?: string;
68
72
  order?: number;
69
73
  questions?: (ISurveyQuestionEssay | ISurveyQuestionScale | ISurveyQuestionMultipleChoice)[];
70
- readonly question_count?: number;
74
+ readonly question_counters?: IQuestionCounters;
71
75
  }
72
76
  export interface ISurvey extends IFireDoc {
73
77
  name: string;
@@ -78,7 +82,7 @@ export interface ISurvey extends IFireDoc {
78
82
  sections?: ISurveySection[];
79
83
  tags?: ITag[];
80
84
  readonly section_count?: number;
81
- readonly question_count?: number;
85
+ readonly question_counters?: IQuestionCounters;
82
86
  }
83
87
  export type SurveyDeploymentStatus = "draft" | "open" | "closed" | "in_progress" | "paused";
84
88
  export declare enum ISurveyDeploymentStatus {
@@ -48,6 +48,11 @@ export enum ISurveyQuestionType {
48
48
  Options = "options",
49
49
  }
50
50
 
51
+ export interface IQuestionCounters {
52
+ deleted: number;
53
+ total: number;
54
+ }
55
+
51
56
  export interface ISurveyQuestion extends IFireDoc {
52
57
  surveyId: string;
53
58
  sectionId: string;
@@ -88,7 +93,7 @@ export interface ISurveySection extends IFireDoc {
88
93
  | ISurveyQuestionScale
89
94
  | ISurveyQuestionMultipleChoice
90
95
  )[];
91
- readonly question_count?: number;
96
+ readonly question_counters?: IQuestionCounters;
92
97
  }
93
98
 
94
99
  export interface ISurvey extends IFireDoc {
@@ -100,7 +105,7 @@ export interface ISurvey extends IFireDoc {
100
105
  sections?: ISurveySection[];
101
106
  tags?: ITag[];
102
107
  readonly section_count?: number;
103
- readonly question_count?: number;
108
+ readonly question_counters?: IQuestionCounters;
104
109
  }
105
110
 
106
111
  export type SurveyDeploymentStatus =
@@ -20,9 +20,9 @@ export declare enum ITenantStatus {
20
20
  export interface ITenant extends IFireDoc {
21
21
  name: string;
22
22
  url_alias: string;
23
- date_format: "DD/MM/YYYY hh:mm:ss" | string;
24
- language: TenantLanguage | "ptBR";
25
- status: TenantStatus | "draft";
26
- timezone: "(GMT +00:00) Lisbon" | string;
23
+ date_format?: string;
24
+ language?: TenantLanguage;
25
+ status: TenantStatus;
26
+ timezone?: string;
27
27
  created_by?: FirestoreDocumentReference;
28
28
  }
@@ -27,9 +27,9 @@ export enum ITenantStatus {
27
27
  export interface ITenant extends IFireDoc {
28
28
  name: string;
29
29
  url_alias: string;
30
- date_format: "DD/MM/YYYY hh:mm:ss" | string;
31
- language: TenantLanguage | "ptBR";
32
- status: TenantStatus | "draft";
33
- timezone: "(GMT +00:00) Lisbon" | string;
30
+ date_format?: string;
31
+ language?: TenantLanguage;
32
+ status: TenantStatus;
33
+ timezone?: string;
34
34
  created_by?: FirestoreDocumentReference;
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.1.43",
3
+ "version": "1.1.45",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",