evo360-types 1.3.341 → 1.3.343
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-people/zod-schemas.d.ts +6 -6
- package/dist/apps/evo-people/zod-schemas.js +2 -2
- package/dist/apps/evo-people/zod-schemas.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.ts +1 -0
- package/dist/types/evo-chat/search/index.d.ts +2 -0
- package/dist/types/evo-chat/search/index.ts +2 -0
- package/dist/types/evo-people/index.d.ts +2 -2
- package/dist/types/evo-people/index.ts +2 -2
- package/dist/types/nex-tenants/index.d.ts +1 -0
- package/dist/types/nex-tenants/index.js +17 -0
- package/dist/types/nex-tenants/index.ts +1 -0
- package/dist/types/nex-tenants/lgpd-export.d.ts +73 -0
- package/dist/types/nex-tenants/lgpd-export.js +60 -0
- package/dist/types/nex-tenants/lgpd-export.ts +153 -0
- package/package.json +1 -1
|
@@ -245,8 +245,8 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
245
245
|
category?: string | null | undefined;
|
|
246
246
|
color?: string | undefined;
|
|
247
247
|
}>, "many">>>;
|
|
248
|
-
chat_enabled: z.ZodOptional<z.ZodBoolean
|
|
249
|
-
chat_color: z.ZodOptional<z.ZodString
|
|
248
|
+
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
249
|
+
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
250
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
251
251
|
id: z.ZodString;
|
|
252
252
|
ref: z.ZodAny;
|
|
@@ -282,8 +282,8 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
282
282
|
category?: string | null | undefined;
|
|
283
283
|
color?: string | undefined;
|
|
284
284
|
}>, "many">>>;
|
|
285
|
-
chat_enabled: z.ZodOptional<z.ZodBoolean
|
|
286
|
-
chat_color: z.ZodOptional<z.ZodString
|
|
285
|
+
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
286
|
+
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
287
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
288
288
|
id: z.ZodString;
|
|
289
289
|
ref: z.ZodAny;
|
|
@@ -319,8 +319,8 @@ export declare const zDepartmentSchema: z.ZodObject<{
|
|
|
319
319
|
category?: string | null | undefined;
|
|
320
320
|
color?: string | undefined;
|
|
321
321
|
}>, "many">>>;
|
|
322
|
-
chat_enabled: z.ZodOptional<z.ZodBoolean
|
|
323
|
-
chat_color: z.ZodOptional<z.ZodString
|
|
322
|
+
chat_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
323
|
+
chat_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
324
|
}, z.ZodTypeAny, "passthrough">>;
|
|
325
325
|
export declare const zOfficeSchema: z.ZodObject<{
|
|
326
326
|
id: z.ZodString;
|
|
@@ -86,8 +86,8 @@ exports.zDepartmentSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocS
|
|
|
86
86
|
parent_departmentRef: zod_1.z.any(),
|
|
87
87
|
employee_counters: zod_1.z.any().optional(),
|
|
88
88
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
|
|
89
|
-
chat_enabled: zod_1.z.boolean().optional(),
|
|
90
|
-
chat_color: zod_1.z.string().optional(),
|
|
89
|
+
chat_enabled: zod_1.z.boolean().nullable().optional(),
|
|
90
|
+
chat_color: zod_1.z.string().nullable().optional(),
|
|
91
91
|
})
|
|
92
92
|
.passthrough();
|
|
93
93
|
exports.zOfficeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
@@ -88,8 +88,8 @@ export const zDepartmentSchema = zFireDocSchema // Extend from FireDocSchema
|
|
|
88
88
|
parent_departmentRef: z.any(),
|
|
89
89
|
employee_counters: z.any().optional(),
|
|
90
90
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
91
|
-
chat_enabled: z.boolean().optional(),
|
|
92
|
-
chat_color: z.string().optional(),
|
|
91
|
+
chat_enabled: z.boolean().nullable().optional(),
|
|
92
|
+
chat_color: z.string().nullable().optional(),
|
|
93
93
|
})
|
|
94
94
|
.passthrough();
|
|
95
95
|
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./types/evo-notifications";
|
|
|
24
24
|
export * from "./types/evo-task-runner";
|
|
25
25
|
export * from "./types/evo-integrations";
|
|
26
26
|
export * from "./types/nex-customers";
|
|
27
|
+
export * from "./types/nex-tenants";
|
|
27
28
|
export * from "./apps/shared/zod-schemas";
|
|
28
29
|
export * from "./apps/evo-core/zod-schemas";
|
|
29
30
|
export * from "./apps/evo-tenant/zod-schemas";
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ __exportStar(require("./types/evo-notifications"), exports);
|
|
|
41
41
|
__exportStar(require("./types/evo-task-runner"), exports);
|
|
42
42
|
__exportStar(require("./types/evo-integrations"), exports);
|
|
43
43
|
__exportStar(require("./types/nex-customers"), exports);
|
|
44
|
+
__exportStar(require("./types/nex-tenants"), exports);
|
|
44
45
|
// zod schemas
|
|
45
46
|
__exportStar(require("./apps/shared/zod-schemas"), exports);
|
|
46
47
|
__exportStar(require("./apps/evo-core/zod-schemas"), exports);
|
package/dist/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from "./types/evo-notifications";
|
|
|
25
25
|
export * from "./types/evo-task-runner";
|
|
26
26
|
export * from "./types/evo-integrations";
|
|
27
27
|
export * from "./types/nex-customers";
|
|
28
|
+
export * from "./types/nex-tenants";
|
|
28
29
|
|
|
29
30
|
// zod schemas
|
|
30
31
|
export * from "./apps/shared/zod-schemas";
|
|
@@ -8,6 +8,8 @@ export interface SearchThreadsParams {
|
|
|
8
8
|
attendant_type?: SearchAttendantType;
|
|
9
9
|
assigned_user_id?: string;
|
|
10
10
|
tag_ids?: string[];
|
|
11
|
+
/** Free-text contains-match against contact_name (case-insensitive) OR contact_address (digits/email/etc). */
|
|
12
|
+
search?: string;
|
|
11
13
|
cursor?: string;
|
|
12
14
|
limit?: number;
|
|
13
15
|
}
|
|
@@ -15,6 +15,8 @@ export interface SearchThreadsParams {
|
|
|
15
15
|
attendant_type?: SearchAttendantType;
|
|
16
16
|
assigned_user_id?: string;
|
|
17
17
|
tag_ids?: string[];
|
|
18
|
+
/** Free-text contains-match against contact_name (case-insensitive) OR contact_address (digits/email/etc). */
|
|
19
|
+
search?: string;
|
|
18
20
|
cursor?: string;
|
|
19
21
|
limit?: number;
|
|
20
22
|
}
|
|
@@ -120,9 +120,9 @@ export interface IDepartment extends IFireDoc {
|
|
|
120
120
|
readonly employee_counters?: IEmployeeCounters;
|
|
121
121
|
tags?: ITag[] | null;
|
|
122
122
|
/** Must be explicitly true for the department to receive chat transfers and be used as channel default. */
|
|
123
|
-
chat_enabled?: boolean;
|
|
123
|
+
chat_enabled?: boolean | null;
|
|
124
124
|
/** Color for UI rendering in hub-omni (e.g., '#4CAF50'). */
|
|
125
|
-
chat_color?: string;
|
|
125
|
+
chat_color?: string | null;
|
|
126
126
|
}
|
|
127
127
|
export interface IOffice extends IFireDoc {
|
|
128
128
|
code: string;
|
|
@@ -185,9 +185,9 @@ export interface IDepartment extends IFireDoc {
|
|
|
185
185
|
tags?: ITag[] | null;
|
|
186
186
|
|
|
187
187
|
/** Must be explicitly true for the department to receive chat transfers and be used as channel default. */
|
|
188
|
-
chat_enabled?: boolean;
|
|
188
|
+
chat_enabled?: boolean | null;
|
|
189
189
|
/** Color for UI rendering in hub-omni (e.g., '#4CAF50'). */
|
|
190
|
-
chat_color?: string;
|
|
190
|
+
chat_color?: string | null;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
export interface IOffice extends IFireDoc {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./lgpd-export";
|
|
@@ -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("./lgpd-export"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./lgpd-export";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { IFireGlobalDoc } from "../shared";
|
|
3
|
+
export declare const LGPD_EXPORT_SCHEMA_VERSION: 1;
|
|
4
|
+
export declare const LGPD_EXPORT_FIRESTORE_PATH: "core/nexus/apps/nex-tenants/lgpd_exports";
|
|
5
|
+
export declare const LGPD_EXPORT_PUBSUB_TOPIC: "app_nexus_lgpd-exports_request";
|
|
6
|
+
export type LgpdExportStatus = "pending" | "generating" | "ready" | "failed" | "expired";
|
|
7
|
+
export type LgpdExportAuditAction = "export_requested" | "export_started" | "export_completed" | "export_failed" | "export_downloaded" | "export_expired";
|
|
8
|
+
export interface ILgpdExportFileEntry {
|
|
9
|
+
name: string;
|
|
10
|
+
record_count: number;
|
|
11
|
+
sha256: string;
|
|
12
|
+
size_bytes: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ILgpdExportRecordCounts {
|
|
15
|
+
whatsapp_messages: number;
|
|
16
|
+
whatsapp_contacts: number;
|
|
17
|
+
leads: number;
|
|
18
|
+
media_files: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ILgpdExportError {
|
|
21
|
+
code: string;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ILgpdExportRequestedBy {
|
|
25
|
+
uid: string;
|
|
26
|
+
email: string;
|
|
27
|
+
loginId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ILgpdExportDoc extends IFireGlobalDoc {
|
|
30
|
+
tenant: string;
|
|
31
|
+
requested_by: ILgpdExportRequestedBy;
|
|
32
|
+
requested_at: Date | null;
|
|
33
|
+
started_at?: Date | null;
|
|
34
|
+
generated_at?: Date | null;
|
|
35
|
+
expires_at?: Date | null;
|
|
36
|
+
status: LgpdExportStatus;
|
|
37
|
+
file_path?: string | null;
|
|
38
|
+
file_size?: number | null;
|
|
39
|
+
sha256?: string | null;
|
|
40
|
+
record_counts?: ILgpdExportRecordCounts | null;
|
|
41
|
+
files?: ILgpdExportFileEntry[] | null;
|
|
42
|
+
error?: ILgpdExportError | null;
|
|
43
|
+
export_schema_version: typeof LGPD_EXPORT_SCHEMA_VERSION;
|
|
44
|
+
notes?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export declare const LgpdExportRequestSchema: z.ZodObject<{
|
|
47
|
+
tenant: z.ZodString;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
tenant: string;
|
|
50
|
+
}, {
|
|
51
|
+
tenant: string;
|
|
52
|
+
}>;
|
|
53
|
+
export type ILgpdExportRequestPayload = z.infer<typeof LgpdExportRequestSchema>;
|
|
54
|
+
export declare const LgpdExportGetDownloadUrlSchema: z.ZodObject<{
|
|
55
|
+
exportId: z.ZodString;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
exportId: string;
|
|
58
|
+
}, {
|
|
59
|
+
exportId: string;
|
|
60
|
+
}>;
|
|
61
|
+
export type ILgpdExportGetDownloadUrlPayload = z.infer<typeof LgpdExportGetDownloadUrlSchema>;
|
|
62
|
+
export interface ILgpdExportPubSubEvent {
|
|
63
|
+
exportId: string;
|
|
64
|
+
tenant: string;
|
|
65
|
+
requested_by: {
|
|
66
|
+
uid: string;
|
|
67
|
+
loginId: string;
|
|
68
|
+
};
|
|
69
|
+
trace_id: string;
|
|
70
|
+
}
|
|
71
|
+
export declare const WHATSAPP_MESSAGES_EXPORT_COLUMNS: readonly ["timestamp", "channel_id", "tenant_external_id", "channel_name", "contact_id", "contact_name", "contact_address", "contact_type", "attendant_name", "is_automatic", "direction", "message_type", "message_text"];
|
|
72
|
+
export declare const WHATSAPP_CONTACTS_EXPORT_COLUMNS: readonly ["contact_id", "contact_name", "contact_address", "contact_type", "message_count", "first_message_at", "last_message_at"];
|
|
73
|
+
export declare const LEAD_EXPORT_COLUMNS: readonly ["display_name", "first_name", "last_name", "gender", "status", "address", "origin", "contact_email", "contact_mobile", "contact_phone", "contact_instagram", "contact_type", "qualification_name", "qualification_funnel_level", "distChannel_name", "last_department_name", "created_at", "updated_at"];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LEAD_EXPORT_COLUMNS = exports.WHATSAPP_CONTACTS_EXPORT_COLUMNS = exports.WHATSAPP_MESSAGES_EXPORT_COLUMNS = exports.LgpdExportGetDownloadUrlSchema = exports.LgpdExportRequestSchema = exports.LGPD_EXPORT_PUBSUB_TOPIC = exports.LGPD_EXPORT_FIRESTORE_PATH = exports.LGPD_EXPORT_SCHEMA_VERSION = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
// ── Constants ──
|
|
6
|
+
exports.LGPD_EXPORT_SCHEMA_VERSION = 1;
|
|
7
|
+
exports.LGPD_EXPORT_FIRESTORE_PATH = "core/nexus/apps/nex-tenants/lgpd_exports";
|
|
8
|
+
exports.LGPD_EXPORT_PUBSUB_TOPIC = "app_nexus_lgpd-exports_request";
|
|
9
|
+
// ── Zod Schemas (callable payloads) ──
|
|
10
|
+
exports.LgpdExportRequestSchema = zod_1.z.object({
|
|
11
|
+
tenant: zod_1.z.string().min(1),
|
|
12
|
+
});
|
|
13
|
+
exports.LgpdExportGetDownloadUrlSchema = zod_1.z.object({
|
|
14
|
+
exportId: zod_1.z.string().min(1),
|
|
15
|
+
});
|
|
16
|
+
// ── Whitelists (CSV column order) ──
|
|
17
|
+
exports.WHATSAPP_MESSAGES_EXPORT_COLUMNS = [
|
|
18
|
+
"timestamp",
|
|
19
|
+
"channel_id",
|
|
20
|
+
"tenant_external_id",
|
|
21
|
+
"channel_name",
|
|
22
|
+
"contact_id",
|
|
23
|
+
"contact_name",
|
|
24
|
+
"contact_address",
|
|
25
|
+
"contact_type",
|
|
26
|
+
"attendant_name",
|
|
27
|
+
"is_automatic",
|
|
28
|
+
"direction",
|
|
29
|
+
"message_type",
|
|
30
|
+
"message_text",
|
|
31
|
+
];
|
|
32
|
+
exports.WHATSAPP_CONTACTS_EXPORT_COLUMNS = [
|
|
33
|
+
"contact_id",
|
|
34
|
+
"contact_name",
|
|
35
|
+
"contact_address",
|
|
36
|
+
"contact_type",
|
|
37
|
+
"message_count",
|
|
38
|
+
"first_message_at",
|
|
39
|
+
"last_message_at",
|
|
40
|
+
];
|
|
41
|
+
exports.LEAD_EXPORT_COLUMNS = [
|
|
42
|
+
"display_name",
|
|
43
|
+
"first_name",
|
|
44
|
+
"last_name",
|
|
45
|
+
"gender",
|
|
46
|
+
"status",
|
|
47
|
+
"address",
|
|
48
|
+
"origin",
|
|
49
|
+
"contact_email",
|
|
50
|
+
"contact_mobile",
|
|
51
|
+
"contact_phone",
|
|
52
|
+
"contact_instagram",
|
|
53
|
+
"contact_type",
|
|
54
|
+
"qualification_name",
|
|
55
|
+
"qualification_funnel_level",
|
|
56
|
+
"distChannel_name",
|
|
57
|
+
"last_department_name",
|
|
58
|
+
"created_at",
|
|
59
|
+
"updated_at",
|
|
60
|
+
];
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { IFireGlobalDoc } from "../shared";
|
|
3
|
+
|
|
4
|
+
// ── Constants ──
|
|
5
|
+
|
|
6
|
+
export const LGPD_EXPORT_SCHEMA_VERSION = 1 as const;
|
|
7
|
+
|
|
8
|
+
export const LGPD_EXPORT_FIRESTORE_PATH =
|
|
9
|
+
"core/nexus/apps/nex-tenants/lgpd_exports" as const;
|
|
10
|
+
|
|
11
|
+
export const LGPD_EXPORT_PUBSUB_TOPIC =
|
|
12
|
+
"app_nexus_lgpd-exports_request" as const;
|
|
13
|
+
|
|
14
|
+
// ── Enums / Literals ──
|
|
15
|
+
|
|
16
|
+
export type LgpdExportStatus =
|
|
17
|
+
| "pending"
|
|
18
|
+
| "generating"
|
|
19
|
+
| "ready"
|
|
20
|
+
| "failed"
|
|
21
|
+
| "expired";
|
|
22
|
+
|
|
23
|
+
export type LgpdExportAuditAction =
|
|
24
|
+
| "export_requested"
|
|
25
|
+
| "export_started"
|
|
26
|
+
| "export_completed"
|
|
27
|
+
| "export_failed"
|
|
28
|
+
| "export_downloaded"
|
|
29
|
+
| "export_expired";
|
|
30
|
+
|
|
31
|
+
// ── Sub-interfaces ──
|
|
32
|
+
|
|
33
|
+
export interface ILgpdExportFileEntry {
|
|
34
|
+
name: string;
|
|
35
|
+
record_count: number;
|
|
36
|
+
sha256: string;
|
|
37
|
+
size_bytes: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface ILgpdExportRecordCounts {
|
|
41
|
+
whatsapp_messages: number;
|
|
42
|
+
whatsapp_contacts: number;
|
|
43
|
+
leads: number;
|
|
44
|
+
media_files: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ILgpdExportError {
|
|
48
|
+
code: string;
|
|
49
|
+
message: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ILgpdExportRequestedBy {
|
|
53
|
+
uid: string;
|
|
54
|
+
email: string;
|
|
55
|
+
loginId: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ── Main Document ──
|
|
59
|
+
|
|
60
|
+
export interface ILgpdExportDoc extends IFireGlobalDoc {
|
|
61
|
+
tenant: string;
|
|
62
|
+
requested_by: ILgpdExportRequestedBy;
|
|
63
|
+
requested_at: Date | null;
|
|
64
|
+
started_at?: Date | null;
|
|
65
|
+
generated_at?: Date | null;
|
|
66
|
+
expires_at?: Date | null;
|
|
67
|
+
status: LgpdExportStatus;
|
|
68
|
+
file_path?: string | null;
|
|
69
|
+
file_size?: number | null;
|
|
70
|
+
sha256?: string | null;
|
|
71
|
+
record_counts?: ILgpdExportRecordCounts | null;
|
|
72
|
+
files?: ILgpdExportFileEntry[] | null;
|
|
73
|
+
error?: ILgpdExportError | null;
|
|
74
|
+
export_schema_version: typeof LGPD_EXPORT_SCHEMA_VERSION;
|
|
75
|
+
notes?: string | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── Zod Schemas (callable payloads) ──
|
|
79
|
+
|
|
80
|
+
export const LgpdExportRequestSchema = z.object({
|
|
81
|
+
tenant: z.string().min(1),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export type ILgpdExportRequestPayload = z.infer<typeof LgpdExportRequestSchema>;
|
|
85
|
+
|
|
86
|
+
export const LgpdExportGetDownloadUrlSchema = z.object({
|
|
87
|
+
exportId: z.string().min(1),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export type ILgpdExportGetDownloadUrlPayload = z.infer<
|
|
91
|
+
typeof LgpdExportGetDownloadUrlSchema
|
|
92
|
+
>;
|
|
93
|
+
|
|
94
|
+
// ── PubSub Event ──
|
|
95
|
+
|
|
96
|
+
export interface ILgpdExportPubSubEvent {
|
|
97
|
+
exportId: string;
|
|
98
|
+
tenant: string;
|
|
99
|
+
requested_by: {
|
|
100
|
+
uid: string;
|
|
101
|
+
loginId: string;
|
|
102
|
+
};
|
|
103
|
+
trace_id: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// ── Whitelists (CSV column order) ──
|
|
107
|
+
|
|
108
|
+
export const WHATSAPP_MESSAGES_EXPORT_COLUMNS = [
|
|
109
|
+
"timestamp",
|
|
110
|
+
"channel_id",
|
|
111
|
+
"tenant_external_id",
|
|
112
|
+
"channel_name",
|
|
113
|
+
"contact_id",
|
|
114
|
+
"contact_name",
|
|
115
|
+
"contact_address",
|
|
116
|
+
"contact_type",
|
|
117
|
+
"attendant_name",
|
|
118
|
+
"is_automatic",
|
|
119
|
+
"direction",
|
|
120
|
+
"message_type",
|
|
121
|
+
"message_text",
|
|
122
|
+
] as const;
|
|
123
|
+
|
|
124
|
+
export const WHATSAPP_CONTACTS_EXPORT_COLUMNS = [
|
|
125
|
+
"contact_id",
|
|
126
|
+
"contact_name",
|
|
127
|
+
"contact_address",
|
|
128
|
+
"contact_type",
|
|
129
|
+
"message_count",
|
|
130
|
+
"first_message_at",
|
|
131
|
+
"last_message_at",
|
|
132
|
+
] as const;
|
|
133
|
+
|
|
134
|
+
export const LEAD_EXPORT_COLUMNS = [
|
|
135
|
+
"display_name",
|
|
136
|
+
"first_name",
|
|
137
|
+
"last_name",
|
|
138
|
+
"gender",
|
|
139
|
+
"status",
|
|
140
|
+
"address",
|
|
141
|
+
"origin",
|
|
142
|
+
"contact_email",
|
|
143
|
+
"contact_mobile",
|
|
144
|
+
"contact_phone",
|
|
145
|
+
"contact_instagram",
|
|
146
|
+
"contact_type",
|
|
147
|
+
"qualification_name",
|
|
148
|
+
"qualification_funnel_level",
|
|
149
|
+
"distChannel_name",
|
|
150
|
+
"last_department_name",
|
|
151
|
+
"created_at",
|
|
152
|
+
"updated_at",
|
|
153
|
+
] as const;
|