evo360-types 1.3.532 → 1.3.534
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.
|
@@ -115,6 +115,11 @@ export interface IChatbeeImportDoc extends IFireGlobalDoc {
|
|
|
115
115
|
tenant: string;
|
|
116
116
|
/** Destination hub-waba channel id — threads/tickets/messages carry this channel_id. */
|
|
117
117
|
destination_channel_id: string;
|
|
118
|
+
/**
|
|
119
|
+
* Canal Chatbee de ORIGEM (id numérico = doc-id de chatbee-channels).
|
|
120
|
+
* Ausente/null = todo o tenant (comportamento anterior à feat-143).
|
|
121
|
+
*/
|
|
122
|
+
source_channel_id?: string | null;
|
|
118
123
|
/** 'analyze' = read-only pre-import pass; 'import' = the real import. */
|
|
119
124
|
mode?: ChatbeeImportMode;
|
|
120
125
|
/** Count-only preview: zero Firestore/PubSub/BQ writes, projects counters + totals. */
|
|
@@ -139,47 +144,62 @@ export interface IChatbeeImportDoc extends IFireGlobalDoc {
|
|
|
139
144
|
export declare const ChatbeeImportRequestSchema: z.ZodObject<{
|
|
140
145
|
tenant: z.ZodString;
|
|
141
146
|
destination_channel_id: z.ZodString;
|
|
147
|
+
source_channel_id: z.ZodOptional<z.ZodString>;
|
|
142
148
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
143
149
|
}, "strip", z.ZodTypeAny, {
|
|
144
150
|
tenant: string;
|
|
145
151
|
destination_channel_id: string;
|
|
146
152
|
dry_run?: boolean | undefined;
|
|
153
|
+
source_channel_id?: string | undefined;
|
|
147
154
|
}, {
|
|
148
155
|
tenant: string;
|
|
149
156
|
destination_channel_id: string;
|
|
150
157
|
dry_run?: boolean | undefined;
|
|
158
|
+
source_channel_id?: string | undefined;
|
|
151
159
|
}>;
|
|
152
160
|
export type IChatbeeImportRequestPayload = z.infer<typeof ChatbeeImportRequestSchema>;
|
|
153
161
|
export declare const ChatbeeImportAnalyzeSchema: z.ZodObject<{
|
|
154
162
|
tenant: z.ZodString;
|
|
155
163
|
destination_channel_id: z.ZodString;
|
|
164
|
+
source_channel_id: z.ZodOptional<z.ZodString>;
|
|
156
165
|
}, "strip", z.ZodTypeAny, {
|
|
157
166
|
tenant: string;
|
|
158
167
|
destination_channel_id: string;
|
|
168
|
+
source_channel_id?: string | undefined;
|
|
159
169
|
}, {
|
|
160
170
|
tenant: string;
|
|
161
171
|
destination_channel_id: string;
|
|
172
|
+
source_channel_id?: string | undefined;
|
|
162
173
|
}>;
|
|
163
174
|
export type IChatbeeImportAnalyzePayload = z.infer<typeof ChatbeeImportAnalyzeSchema>;
|
|
164
175
|
export declare const ChatbeeImportSaveDeptMapSchema: z.ZodObject<{
|
|
165
176
|
tenant: z.ZodString;
|
|
166
177
|
channel_id: z.ZodString;
|
|
178
|
+
/**
|
|
179
|
+
* Metadado: canal Chatbee de origem ao qual este mapa se refere.
|
|
180
|
+
* NÃO entra na chave do doc, que continua `{tenant}__{destinationChannelId}`.
|
|
181
|
+
*/
|
|
182
|
+
source_channel_id: z.ZodOptional<z.ZodString>;
|
|
167
183
|
/** chatbee_id → platform dept id (or CHANNEL_DEFAULT_DEPT_SENTINEL). */
|
|
168
184
|
map: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
169
185
|
}, "strip", z.ZodTypeAny, {
|
|
170
186
|
map: Record<string, string>;
|
|
171
187
|
tenant: string;
|
|
172
188
|
channel_id: string;
|
|
189
|
+
source_channel_id?: string | undefined;
|
|
173
190
|
}, {
|
|
174
191
|
map: Record<string, string>;
|
|
175
192
|
tenant: string;
|
|
176
193
|
channel_id: string;
|
|
194
|
+
source_channel_id?: string | undefined;
|
|
177
195
|
}>;
|
|
178
196
|
export type IChatbeeImportSaveDeptMapPayload = z.infer<typeof ChatbeeImportSaveDeptMapSchema>;
|
|
179
197
|
export interface IChatbeeImportPubSubEvent {
|
|
180
198
|
importId: string;
|
|
181
199
|
tenant: string;
|
|
182
200
|
destination_channel_id: string;
|
|
201
|
+
/** Canal Chatbee de origem; ausente/null = tenant inteiro. Deve sobreviver às continuações. */
|
|
202
|
+
source_channel_id?: string | null;
|
|
183
203
|
/** 'analyze' = read-only pass; 'import' = real import. */
|
|
184
204
|
mode: ChatbeeImportMode;
|
|
185
205
|
dry_run: boolean;
|
|
@@ -18,15 +18,31 @@ exports.CHANNEL_DEFAULT_DEPT_SENTINEL = "__channel_default__";
|
|
|
18
18
|
exports.ChatbeeImportRequestSchema = zod_1.z.object({
|
|
19
19
|
tenant: zod_1.z.string().min(1),
|
|
20
20
|
destination_channel_id: zod_1.z.string().min(1),
|
|
21
|
+
source_channel_id: zod_1.z
|
|
22
|
+
.string()
|
|
23
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
24
|
+
.optional(),
|
|
21
25
|
dry_run: zod_1.z.boolean().optional(),
|
|
22
26
|
});
|
|
23
27
|
exports.ChatbeeImportAnalyzeSchema = zod_1.z.object({
|
|
24
28
|
tenant: zod_1.z.string().min(1),
|
|
25
29
|
destination_channel_id: zod_1.z.string().min(1),
|
|
30
|
+
source_channel_id: zod_1.z
|
|
31
|
+
.string()
|
|
32
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
33
|
+
.optional(),
|
|
26
34
|
});
|
|
27
35
|
exports.ChatbeeImportSaveDeptMapSchema = zod_1.z.object({
|
|
28
36
|
tenant: zod_1.z.string().min(1),
|
|
29
37
|
channel_id: zod_1.z.string().min(1),
|
|
38
|
+
/**
|
|
39
|
+
* Metadado: canal Chatbee de origem ao qual este mapa se refere.
|
|
40
|
+
* NÃO entra na chave do doc, que continua `{tenant}__{destinationChannelId}`.
|
|
41
|
+
*/
|
|
42
|
+
source_channel_id: zod_1.z
|
|
43
|
+
.string()
|
|
44
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
45
|
+
.optional(),
|
|
30
46
|
/** chatbee_id → platform dept id (or CHANNEL_DEFAULT_DEPT_SENTINEL). */
|
|
31
47
|
map: zod_1.z.record(zod_1.z.string(), zod_1.z.string().min(1)),
|
|
32
48
|
});
|
|
@@ -162,6 +162,11 @@ export interface IChatbeeImportDoc extends IFireGlobalDoc {
|
|
|
162
162
|
tenant: string;
|
|
163
163
|
/** Destination hub-waba channel id — threads/tickets/messages carry this channel_id. */
|
|
164
164
|
destination_channel_id: string;
|
|
165
|
+
/**
|
|
166
|
+
* Canal Chatbee de ORIGEM (id numérico = doc-id de chatbee-channels).
|
|
167
|
+
* Ausente/null = todo o tenant (comportamento anterior à feat-143).
|
|
168
|
+
*/
|
|
169
|
+
source_channel_id?: string | null;
|
|
165
170
|
/** 'analyze' = read-only pre-import pass; 'import' = the real import. */
|
|
166
171
|
mode?: ChatbeeImportMode;
|
|
167
172
|
/** Count-only preview: zero Firestore/PubSub/BQ writes, projects counters + totals. */
|
|
@@ -189,6 +194,10 @@ export interface IChatbeeImportDoc extends IFireGlobalDoc {
|
|
|
189
194
|
export const ChatbeeImportRequestSchema = z.object({
|
|
190
195
|
tenant: z.string().min(1),
|
|
191
196
|
destination_channel_id: z.string().min(1),
|
|
197
|
+
source_channel_id: z
|
|
198
|
+
.string()
|
|
199
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
200
|
+
.optional(),
|
|
192
201
|
dry_run: z.boolean().optional(),
|
|
193
202
|
});
|
|
194
203
|
|
|
@@ -199,6 +208,10 @@ export type IChatbeeImportRequestPayload = z.infer<
|
|
|
199
208
|
export const ChatbeeImportAnalyzeSchema = z.object({
|
|
200
209
|
tenant: z.string().min(1),
|
|
201
210
|
destination_channel_id: z.string().min(1),
|
|
211
|
+
source_channel_id: z
|
|
212
|
+
.string()
|
|
213
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
214
|
+
.optional(),
|
|
202
215
|
});
|
|
203
216
|
|
|
204
217
|
export type IChatbeeImportAnalyzePayload = z.infer<
|
|
@@ -208,6 +221,14 @@ export type IChatbeeImportAnalyzePayload = z.infer<
|
|
|
208
221
|
export const ChatbeeImportSaveDeptMapSchema = z.object({
|
|
209
222
|
tenant: z.string().min(1),
|
|
210
223
|
channel_id: z.string().min(1),
|
|
224
|
+
/**
|
|
225
|
+
* Metadado: canal Chatbee de origem ao qual este mapa se refere.
|
|
226
|
+
* NÃO entra na chave do doc, que continua `{tenant}__{destinationChannelId}`.
|
|
227
|
+
*/
|
|
228
|
+
source_channel_id: z
|
|
229
|
+
.string()
|
|
230
|
+
.regex(/^\d+$/, "source_channel_id deve ser o id numérico do canal Chatbee")
|
|
231
|
+
.optional(),
|
|
211
232
|
/** chatbee_id → platform dept id (or CHANNEL_DEFAULT_DEPT_SENTINEL). */
|
|
212
233
|
map: z.record(z.string(), z.string().min(1)),
|
|
213
234
|
});
|
|
@@ -222,6 +243,8 @@ export interface IChatbeeImportPubSubEvent {
|
|
|
222
243
|
importId: string;
|
|
223
244
|
tenant: string;
|
|
224
245
|
destination_channel_id: string;
|
|
246
|
+
/** Canal Chatbee de origem; ausente/null = tenant inteiro. Deve sobreviver às continuações. */
|
|
247
|
+
source_channel_id?: string | null;
|
|
225
248
|
/** 'analyze' = read-only pass; 'import' = real import. */
|
|
226
249
|
mode: ChatbeeImportMode;
|
|
227
250
|
dry_run: boolean;
|