evo360-types 1.3.675 → 1.3.677
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-chat/channel/zod-schemas.d.ts +16 -0
- package/dist/apps/evo-chat/channel/zod-schemas.js +10 -1
- package/dist/apps/evo-chat/channel/zod-schemas.ts +16 -0
- package/dist/types/evo-chat/channel/index.d.ts +13 -2
- package/dist/types/evo-chat/channel/index.js +25 -0
- package/dist/types/evo-chat/channel/index.ts +36 -2
- package/package.json +1 -1
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export declare const zChannelProviderSchema: z.ZodEnum<["chatbee", "hub-waba", "hub-instagram", "amazon-ses", "smtp"]>;
|
|
3
|
+
export declare const zChannelTypeSchema: z.ZodEnum<["waba", "instagram", "telegram", "email", "sms"]>;
|
|
4
|
+
export declare const zMessageTransportProviderSchema: z.ZodEnum<["hub-waba", "chatbee", "hub-instagram", "infobip", "amazon-ses", "smtp"]>;
|
|
5
|
+
export declare const zMessageRouteSchema: z.ZodObject<{
|
|
6
|
+
channel_type: z.ZodEnum<["waba", "instagram", "telegram", "email", "sms"]>;
|
|
7
|
+
channel_id: z.ZodString;
|
|
8
|
+
transport_provider: z.ZodEnum<["hub-waba", "chatbee", "hub-instagram", "infobip", "amazon-ses", "smtp"]>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
channel_id: string;
|
|
11
|
+
channel_type: "email" | "waba" | "instagram" | "telegram" | "sms";
|
|
12
|
+
transport_provider: "chatbee" | "hub-waba" | "hub-instagram" | "amazon-ses" | "smtp" | "infobip";
|
|
13
|
+
}, {
|
|
14
|
+
channel_id: string;
|
|
15
|
+
channel_type: "email" | "waba" | "instagram" | "telegram" | "sms";
|
|
16
|
+
transport_provider: "chatbee" | "hub-waba" | "hub-instagram" | "amazon-ses" | "smtp" | "infobip";
|
|
17
|
+
}>;
|
|
2
18
|
export declare const zChannelProviderRefSchema: z.ZodObject<{
|
|
3
19
|
channel_id: z.ZodOptional<z.ZodString>;
|
|
4
20
|
channel_uuid: z.ZodOptional<z.ZodString>;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zChannelSchema = exports.zChannelDirectSendConfigSchema = exports.zChannelDirectSendRestrictionSchema = exports.zWabaDirectSendCategorySchema = exports.zChannelProviderRefSchema = void 0;
|
|
3
|
+
exports.zChannelSchema = exports.zChannelDirectSendConfigSchema = exports.zChannelDirectSendRestrictionSchema = exports.zWabaDirectSendCategorySchema = exports.zChannelProviderRefSchema = exports.zMessageRouteSchema = exports.zMessageTransportProviderSchema = exports.zChannelTypeSchema = exports.zChannelProviderSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
|
+
const channel_1 = require("../../../types/evo-chat/channel");
|
|
7
|
+
exports.zChannelProviderSchema = zod_1.z.enum(channel_1.ChannelProviderValues);
|
|
8
|
+
exports.zChannelTypeSchema = zod_1.z.enum(channel_1.ChannelTypeValues);
|
|
9
|
+
exports.zMessageTransportProviderSchema = zod_1.z.enum(channel_1.MessageTransportProviderValues);
|
|
10
|
+
exports.zMessageRouteSchema = zod_1.z.object({
|
|
11
|
+
channel_type: exports.zChannelTypeSchema,
|
|
12
|
+
channel_id: zod_1.z.string().min(1),
|
|
13
|
+
transport_provider: exports.zMessageTransportProviderSchema,
|
|
14
|
+
});
|
|
6
15
|
exports.zChannelProviderRefSchema = zod_1.z.object({
|
|
7
16
|
channel_id: zod_1.z.string().optional(),
|
|
8
17
|
channel_uuid: zod_1.z.string().optional(),
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { zFireDocSchema } from "../../shared/zod-schemas";
|
|
3
|
+
import {
|
|
4
|
+
ChannelProviderValues,
|
|
5
|
+
ChannelTypeValues,
|
|
6
|
+
MessageTransportProviderValues,
|
|
7
|
+
} from "../../../types/evo-chat/channel";
|
|
8
|
+
|
|
9
|
+
export const zChannelProviderSchema = z.enum(ChannelProviderValues);
|
|
10
|
+
export const zChannelTypeSchema = z.enum(ChannelTypeValues);
|
|
11
|
+
export const zMessageTransportProviderSchema = z.enum(
|
|
12
|
+
MessageTransportProviderValues,
|
|
13
|
+
);
|
|
14
|
+
export const zMessageRouteSchema = z.object({
|
|
15
|
+
channel_type: zChannelTypeSchema,
|
|
16
|
+
channel_id: z.string().min(1),
|
|
17
|
+
transport_provider: zMessageTransportProviderSchema,
|
|
18
|
+
});
|
|
3
19
|
|
|
4
20
|
export const zChannelProviderRefSchema = z.object({
|
|
5
21
|
channel_id: z.string().optional(),
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import type { IHubIAConfig } from "../../evo-hub-ia/channel";
|
|
2
2
|
import { IFireDoc } from "../../shared";
|
|
3
3
|
import type { IChannelHistoryImport } from "../waba-history-import";
|
|
4
|
-
export
|
|
5
|
-
export type
|
|
4
|
+
export declare const ChannelProviderValues: readonly ["chatbee", "hub-waba", "hub-instagram", "amazon-ses", "smtp"];
|
|
5
|
+
export type ChannelProvider = (typeof ChannelProviderValues)[number];
|
|
6
|
+
export declare const ChannelTypeValues: readonly ["waba", "instagram", "telegram", "email", "sms"];
|
|
7
|
+
export type ChannelType = (typeof ChannelTypeValues)[number];
|
|
6
8
|
export type ChannelStatus = 'active' | 'paused' | 'disabled' | 'pending';
|
|
9
|
+
/** Provider de transporte usado para entregar uma mensagem do canal lógico. */
|
|
10
|
+
export declare const MessageTransportProviderValues: readonly ["hub-waba", "chatbee", "hub-instagram", "infobip", "amazon-ses", "smtp"];
|
|
11
|
+
export type MessageTransportProvider = (typeof MessageTransportProviderValues)[number];
|
|
12
|
+
/** Rota canônica de uma mensagem, separando canal lógico de transporte. */
|
|
13
|
+
export interface MessageRoute {
|
|
14
|
+
channel_type: ChannelType;
|
|
15
|
+
channel_id: string;
|
|
16
|
+
transport_provider: MessageTransportProvider;
|
|
17
|
+
}
|
|
7
18
|
export type IgTokenHealth = 'ok' | 'expiring' | 'failed';
|
|
8
19
|
export interface IChannelProviderRef {
|
|
9
20
|
channel_id?: string;
|
|
@@ -1,2 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageTransportProviderValues = exports.ChannelTypeValues = exports.ChannelProviderValues = void 0;
|
|
4
|
+
// ── Channel provider/type enums ──
|
|
5
|
+
exports.ChannelProviderValues = [
|
|
6
|
+
'chatbee',
|
|
7
|
+
'hub-waba',
|
|
8
|
+
'hub-instagram',
|
|
9
|
+
'amazon-ses',
|
|
10
|
+
'smtp',
|
|
11
|
+
];
|
|
12
|
+
exports.ChannelTypeValues = [
|
|
13
|
+
'waba',
|
|
14
|
+
'instagram',
|
|
15
|
+
'telegram',
|
|
16
|
+
'email',
|
|
17
|
+
'sms',
|
|
18
|
+
];
|
|
19
|
+
/** Provider de transporte usado para entregar uma mensagem do canal lógico. */
|
|
20
|
+
exports.MessageTransportProviderValues = [
|
|
21
|
+
'hub-waba',
|
|
22
|
+
'chatbee',
|
|
23
|
+
'hub-instagram',
|
|
24
|
+
'infobip',
|
|
25
|
+
'amazon-ses',
|
|
26
|
+
'smtp',
|
|
27
|
+
];
|
|
@@ -4,10 +4,44 @@ import type { IChannelHistoryImport } from "../waba-history-import";
|
|
|
4
4
|
|
|
5
5
|
// ── Channel provider/type enums ──
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
|
|
7
|
+
export const ChannelProviderValues = [
|
|
8
|
+
'chatbee',
|
|
9
|
+
'hub-waba',
|
|
10
|
+
'hub-instagram',
|
|
11
|
+
'amazon-ses',
|
|
12
|
+
'smtp',
|
|
13
|
+
] as const;
|
|
14
|
+
export type ChannelProvider = (typeof ChannelProviderValues)[number];
|
|
15
|
+
|
|
16
|
+
export const ChannelTypeValues = [
|
|
17
|
+
'waba',
|
|
18
|
+
'instagram',
|
|
19
|
+
'telegram',
|
|
20
|
+
'email',
|
|
21
|
+
'sms',
|
|
22
|
+
] as const;
|
|
23
|
+
export type ChannelType = (typeof ChannelTypeValues)[number];
|
|
9
24
|
export type ChannelStatus = 'active' | 'paused' | 'disabled' | 'pending';
|
|
10
25
|
|
|
26
|
+
/** Provider de transporte usado para entregar uma mensagem do canal lógico. */
|
|
27
|
+
export const MessageTransportProviderValues = [
|
|
28
|
+
'hub-waba',
|
|
29
|
+
'chatbee',
|
|
30
|
+
'hub-instagram',
|
|
31
|
+
'infobip',
|
|
32
|
+
'amazon-ses',
|
|
33
|
+
'smtp',
|
|
34
|
+
] as const;
|
|
35
|
+
export type MessageTransportProvider =
|
|
36
|
+
(typeof MessageTransportProviderValues)[number];
|
|
37
|
+
|
|
38
|
+
/** Rota canônica de uma mensagem, separando canal lógico de transporte. */
|
|
39
|
+
export interface MessageRoute {
|
|
40
|
+
channel_type: ChannelType;
|
|
41
|
+
channel_id: string;
|
|
42
|
+
transport_provider: MessageTransportProvider;
|
|
43
|
+
}
|
|
44
|
+
|
|
11
45
|
// ── Provider-specific references ──
|
|
12
46
|
|
|
13
47
|
export type IgTokenHealth = 'ok' | 'expiring' | 'failed';
|