evo360-types 1.3.34 → 1.3.35
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/apps/evo-tags/zod-schemas.d.ts +52 -0
- package/dist/apps/evo-tags/zod-schemas.js +30 -0
- package/dist/apps/evo-tags/zod-schemas.ts +31 -0
- package/dist/index.js +2 -0
- package/dist/index.ts +2 -0
- package/dist/types/evo-tags/fb_collections.d.ts +4 -0
- package/dist/types/evo-tags/fb_collections.js +9 -0
- package/dist/types/evo-tags/fb_collections.ts +7 -0
- package/dist/types/evo-tags/index.d.ts +30 -0
- package/dist/types/evo-tags/index.js +17 -0
- package/dist/types/evo-tags/index.ts +35 -0
- package/dist/types/shared/index.d.ts +3 -2
- package/dist/types/shared/index.js +1 -0
- package/dist/types/shared/index.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Schema para validação de IDocumentTag
|
|
4
|
+
*/
|
|
5
|
+
export declare const zDocumentTagSchema: z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
ref: z.ZodAny;
|
|
8
|
+
collection: z.ZodString;
|
|
9
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
collection: string;
|
|
13
|
+
ref?: any;
|
|
14
|
+
category?: string | null | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
name: string;
|
|
17
|
+
collection: string;
|
|
18
|
+
ref?: any;
|
|
19
|
+
category?: string | null | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Schema para validação de ITagCounter
|
|
23
|
+
*/
|
|
24
|
+
export declare const zTagCounterSchema: z.ZodObject<{
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
total_documents: z.ZodNumber;
|
|
27
|
+
collections: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
28
|
+
categories: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
name: string;
|
|
31
|
+
total_documents: number;
|
|
32
|
+
collections: Record<string, number>;
|
|
33
|
+
categories: Record<string, number>;
|
|
34
|
+
}, {
|
|
35
|
+
name: string;
|
|
36
|
+
total_documents: number;
|
|
37
|
+
collections: Record<string, number>;
|
|
38
|
+
categories: Record<string, number>;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Schema para validação de ITagCollectionIndex
|
|
42
|
+
*/
|
|
43
|
+
export declare const zTagCollectionIndexSchema: z.ZodObject<{
|
|
44
|
+
collection: z.ZodString;
|
|
45
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
tags: string[];
|
|
48
|
+
collection: string;
|
|
49
|
+
}, {
|
|
50
|
+
tags: string[];
|
|
51
|
+
collection: string;
|
|
52
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.zTagCollectionIndexSchema = exports.zTagCounterSchema = exports.zDocumentTagSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
// ----- TagIndex Zod Schemas
|
|
6
|
+
/**
|
|
7
|
+
* Schema para validação de IDocumentTag
|
|
8
|
+
*/
|
|
9
|
+
exports.zDocumentTagSchema = zod_1.z.object({
|
|
10
|
+
name: zod_1.z.string().min(1).max(100), // Nome da tag (obrigatório, 1-100 caracteres)
|
|
11
|
+
ref: zod_1.z.any(), // FirestoreDocumentReference
|
|
12
|
+
collection: zod_1.z.string().min(1).max(50), // Nome da coleção (obrigatório, 1-50 caracteres)
|
|
13
|
+
category: zod_1.z.string().max(50).nullable().optional(), // Categoria da tag (opcional, até 50 caracteres)
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Schema para validação de ITagCounter
|
|
17
|
+
*/
|
|
18
|
+
exports.zTagCounterSchema = zod_1.z.object({
|
|
19
|
+
name: zod_1.z.string().min(1).max(100), // Nome da tag (obrigatório, 1-100 caracteres)
|
|
20
|
+
total_documents: zod_1.z.number().int().min(0), // Total de documentos (inteiro não negativo)
|
|
21
|
+
collections: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(0)), // Contagem por coleção
|
|
22
|
+
categories: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(0)), // Contagem por categoria
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Schema para validação de ITagCollectionIndex
|
|
26
|
+
*/
|
|
27
|
+
exports.zTagCollectionIndexSchema = zod_1.z.object({
|
|
28
|
+
collection: zod_1.z.string().min(1).max(50), // Nome da coleção (obrigatório, 1-50 caracteres)
|
|
29
|
+
tags: zod_1.z.array(zod_1.z.string().min(1).max(100)).max(1000), // Array de tags (máximo 1000 tags por coleção)
|
|
30
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// ----- TagIndex Zod Schemas
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Schema para validação de IDocumentTag
|
|
7
|
+
*/
|
|
8
|
+
export const zDocumentTagSchema = z.object({
|
|
9
|
+
name: z.string().min(1).max(100), // Nome da tag (obrigatório, 1-100 caracteres)
|
|
10
|
+
ref: z.any(), // FirestoreDocumentReference
|
|
11
|
+
collection: z.string().min(1).max(50), // Nome da coleção (obrigatório, 1-50 caracteres)
|
|
12
|
+
category: z.string().max(50).nullable().optional(), // Categoria da tag (opcional, até 50 caracteres)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Schema para validação de ITagCounter
|
|
17
|
+
*/
|
|
18
|
+
export const zTagCounterSchema = z.object({
|
|
19
|
+
name: z.string().min(1).max(100), // Nome da tag (obrigatório, 1-100 caracteres)
|
|
20
|
+
total_documents: z.number().int().min(0), // Total de documentos (inteiro não negativo)
|
|
21
|
+
collections: z.record(z.string(), z.number().int().min(0)), // Contagem por coleção
|
|
22
|
+
categories: z.record(z.string(), z.number().int().min(0)), // Contagem por categoria
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Schema para validação de ITagCollectionIndex
|
|
27
|
+
*/
|
|
28
|
+
export const zTagCollectionIndexSchema = z.object({
|
|
29
|
+
collection: z.string().min(1).max(50), // Nome da coleção (obrigatório, 1-50 caracteres)
|
|
30
|
+
tags: z.array(z.string().min(1).max(100)).max(1000), // Array de tags (máximo 1000 tags por coleção)
|
|
31
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./types/evo-task"), exports);
|
|
|
34
34
|
__exportStar(require("./types/evo-survey"), exports);
|
|
35
35
|
__exportStar(require("./types/evo-cake"), exports);
|
|
36
36
|
__exportStar(require("./types/evo-meeting"), exports);
|
|
37
|
+
__exportStar(require("./types/evo-tags"), exports);
|
|
37
38
|
// zod schemas
|
|
38
39
|
__exportStar(require("./apps/shared/zod-schemas"), exports);
|
|
39
40
|
__exportStar(require("./apps/evo-core/zod-schemas"), exports);
|
|
@@ -54,3 +55,4 @@ __exportStar(require("./apps/evo-task/zod-schemas"), exports);
|
|
|
54
55
|
__exportStar(require("./apps/evo-survey/zod-schemas"), exports);
|
|
55
56
|
__exportStar(require("./apps/evo-cake/zod-schemas"), exports);
|
|
56
57
|
__exportStar(require("./apps/evo-meeting/zod-schemas"), exports);
|
|
58
|
+
__exportStar(require("./apps/evo-tags/zod-schemas"), exports);
|
package/dist/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from "./types/evo-task";
|
|
|
18
18
|
export * from "./types/evo-survey";
|
|
19
19
|
export * from "./types/evo-cake";
|
|
20
20
|
export * from "./types/evo-meeting";
|
|
21
|
+
export * from "./types/evo-tags";
|
|
21
22
|
|
|
22
23
|
// zod schemas
|
|
23
24
|
export * from "./apps/shared/zod-schemas";
|
|
@@ -39,3 +40,4 @@ export * from "./apps/evo-task/zod-schemas";
|
|
|
39
40
|
export * from "./apps/evo-survey/zod-schemas";
|
|
40
41
|
export * from "./apps/evo-cake/zod-schemas";
|
|
41
42
|
export * from "./apps/evo-meeting/zod-schemas";
|
|
43
|
+
export * from "./apps/evo-tags/zod-schemas";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TAG_COLLECTION_INDEX_COLLECTION = exports.TAG_COUNTERS_COLLECTION = exports.DOCUMENT_TAGS_COLLECTION = exports.EVO_TAGS_APP = void 0;
|
|
4
|
+
//EVO Tags Application Doc
|
|
5
|
+
exports.EVO_TAGS_APP = "evo-tags";
|
|
6
|
+
// Tag indexes collections
|
|
7
|
+
exports.DOCUMENT_TAGS_COLLECTION = "document-tags";
|
|
8
|
+
exports.TAG_COUNTERS_COLLECTION = "tag-counters";
|
|
9
|
+
exports.TAG_COLLECTION_INDEX_COLLECTION = "tag-collection-index";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//EVO Tags Application Doc
|
|
2
|
+
export const EVO_TAGS_APP = "evo-tags";
|
|
3
|
+
|
|
4
|
+
// Tag indexes collections
|
|
5
|
+
export const DOCUMENT_TAGS_COLLECTION = "document-tags";
|
|
6
|
+
export const TAG_COUNTERS_COLLECTION = "tag-counters";
|
|
7
|
+
export const TAG_COLLECTION_INDEX_COLLECTION = "tag-collection-index";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from "./fb_collections";
|
|
2
|
+
import type { FirestoreDocumentReference, IFireDoc } from "../shared";
|
|
3
|
+
/**
|
|
4
|
+
* Interface para o índice de documentos com tags
|
|
5
|
+
* Armazena cada tag adicionada a cada documento
|
|
6
|
+
*/
|
|
7
|
+
export interface IDocumentTag extends IFireDoc {
|
|
8
|
+
name: string;
|
|
9
|
+
ref: FirestoreDocumentReference;
|
|
10
|
+
collection: string;
|
|
11
|
+
category: string | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Interface para o contador de tags
|
|
15
|
+
* Sumariza todas as tags criadas com quantidade total de documentos
|
|
16
|
+
*/
|
|
17
|
+
export interface ITagCounter extends IFireDoc {
|
|
18
|
+
name: string;
|
|
19
|
+
total_documents: number;
|
|
20
|
+
collections: Record<string, number>;
|
|
21
|
+
categories: Record<string, number>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Interface para o índice de tags por coleção
|
|
25
|
+
* Lista simples das tags associadas a documentos de uma determinada coleção
|
|
26
|
+
*/
|
|
27
|
+
export interface ITagCollectionIndex extends IFireDoc {
|
|
28
|
+
collection: string;
|
|
29
|
+
tags: string[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fb_collections"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from "./fb_collections";
|
|
2
|
+
import type { FirestoreDocumentReference, IFireDoc } from "../shared";
|
|
3
|
+
|
|
4
|
+
// ----- TagIndexTypes
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Interface para o índice de documentos com tags
|
|
8
|
+
* Armazena cada tag adicionada a cada documento
|
|
9
|
+
*/
|
|
10
|
+
export interface IDocumentTag extends IFireDoc {
|
|
11
|
+
name: string; // Nome da tag
|
|
12
|
+
ref: FirestoreDocumentReference; // Referência do documento etiquetado
|
|
13
|
+
collection: string; // Nome da coleção do documento
|
|
14
|
+
category: string | null; // Categoria da tag (opcional)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Interface para o contador de tags
|
|
19
|
+
* Sumariza todas as tags criadas com quantidade total de documentos
|
|
20
|
+
*/
|
|
21
|
+
export interface ITagCounter extends IFireDoc {
|
|
22
|
+
name: string; // Nome da tag
|
|
23
|
+
total_documents: number; // Total de documentos associados à tag
|
|
24
|
+
collections: Record<string, number>; // Contagem por coleção { "patients": 5, "leads": 2 }
|
|
25
|
+
categories: Record<string, number>; // Contagem por categoria { "medical": 3, "urgent": 2 }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Interface para o índice de tags por coleção
|
|
30
|
+
* Lista simples das tags associadas a documentos de uma determinada coleção
|
|
31
|
+
*/
|
|
32
|
+
export interface ITagCollectionIndex extends IFireDoc {
|
|
33
|
+
collection: string; // Nome da coleção
|
|
34
|
+
tags: string[]; // Array com as tags já utilizadas nesta coleção
|
|
35
|
+
}
|
|
@@ -38,7 +38,7 @@ export interface IAddress {
|
|
|
38
38
|
country?: string;
|
|
39
39
|
geo?: IGeoPoint;
|
|
40
40
|
}
|
|
41
|
-
export type EvoApp = "evo-activity" | "evo-calendar" | "evo-core" | "evo-meeting" | "evo-people" | "evo-med" | "evo-survey" | "evo-task" | "evo-tenant";
|
|
41
|
+
export type EvoApp = "evo-activity" | "evo-calendar" | "evo-core" | "evo-meeting" | "evo-people" | "evo-med" | "evo-survey" | "evo-task" | "evo-tenant" | "evo-tags";
|
|
42
42
|
export declare enum IEvoApp {
|
|
43
43
|
EvoActivity = "evo-activity",
|
|
44
44
|
EvoCalendar = "evo-calendar",
|
|
@@ -48,5 +48,6 @@ export declare enum IEvoApp {
|
|
|
48
48
|
EvoMed = "evo-med",
|
|
49
49
|
EvoSurvey = "evo-survey",
|
|
50
50
|
EvoTask = "evo-task",
|
|
51
|
-
EvoTenant = "evo-tenant"
|
|
51
|
+
EvoTenant = "evo-tenant",
|
|
52
|
+
EvoTags = "evo-tags"
|
|
52
53
|
}
|
|
@@ -60,7 +60,8 @@ export type EvoApp =
|
|
|
60
60
|
| "evo-med"
|
|
61
61
|
| "evo-survey"
|
|
62
62
|
| "evo-task"
|
|
63
|
-
| "evo-tenant"
|
|
63
|
+
| "evo-tenant"
|
|
64
|
+
| "evo-tags";
|
|
64
65
|
export enum IEvoApp {
|
|
65
66
|
EvoActivity = "evo-activity",
|
|
66
67
|
EvoCalendar = "evo-calendar",
|
|
@@ -71,4 +72,5 @@ export enum IEvoApp {
|
|
|
71
72
|
EvoSurvey = "evo-survey",
|
|
72
73
|
EvoTask = "evo-task",
|
|
73
74
|
EvoTenant = "evo-tenant",
|
|
75
|
+
EvoTags = "evo-tags",
|
|
74
76
|
}
|