evo360-types 1.3.713 → 1.3.715
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.
|
@@ -227,7 +227,18 @@ export interface ICampaignChannelCounters {
|
|
|
227
227
|
failed?: number;
|
|
228
228
|
clicked?: number;
|
|
229
229
|
replied?: number;
|
|
230
|
+
/**
|
|
231
|
+
* Ticket outcome of sends whose policy asked to close the ticket (F6). Recorded by
|
|
232
|
+
* the hub-omni at the moment it decides. `kept_open` is the RULE (patient already had
|
|
233
|
+
* an open ticket — the campaign never ends a live attendance); `close_failed` is a
|
|
234
|
+
* defect (close attempted, did not happen).
|
|
235
|
+
*/
|
|
236
|
+
ticket_closed?: number;
|
|
237
|
+
ticket_kept_open?: number;
|
|
238
|
+
ticket_close_failed?: number;
|
|
230
239
|
}
|
|
240
|
+
/** What happened to the ticket of a campaign send that asked to close it (F6). */
|
|
241
|
+
export type CampaignTicketOutcome = "closed" | "kept_open" | "close_failed";
|
|
231
242
|
export interface ICampaignCounters {
|
|
232
243
|
raw?: number;
|
|
233
244
|
unique?: number;
|
|
@@ -330,6 +341,26 @@ export interface ICampaign extends IFireDoc {
|
|
|
330
341
|
finished_at?: Date | null;
|
|
331
342
|
cancel_reason?: string | null;
|
|
332
343
|
error_reason?: string | null;
|
|
344
|
+
/**
|
|
345
|
+
* Why the campaign is paused, when the SYSTEM paused it (F6 circuit breaker).
|
|
346
|
+
* `null`/absent on an operator pause and cleared on resume — its presence is what
|
|
347
|
+
* tells the screen "the platform stopped this, here is the cause".
|
|
348
|
+
*/
|
|
349
|
+
pause_reason?: ICampaignPauseReason | null;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* System pause (F6). A provider error that fails EVERY recipient the same way
|
|
353
|
+
* (account payment, account restricted, template paused/disabled, broken media)
|
|
354
|
+
* stops the dispatch instead of burning the rest of the list.
|
|
355
|
+
*/
|
|
356
|
+
export interface ICampaignPauseReason {
|
|
357
|
+
kind: "provider_systemic_error";
|
|
358
|
+
channel: CampaignChannel;
|
|
359
|
+
error_code: string;
|
|
360
|
+
error_message?: string | null;
|
|
361
|
+
/** Recipient whose failure tripped the breaker — the operator can open it. */
|
|
362
|
+
recipient_id?: string | null;
|
|
363
|
+
at: Date;
|
|
333
364
|
}
|
|
334
365
|
export type CampaignBucketSourceType = "leads" | "patients" | "appointments" | "csv";
|
|
335
366
|
export interface ICampaignBucketCsvFile {
|
|
@@ -417,6 +448,16 @@ export interface ICampaignRecipientChannelState {
|
|
|
417
448
|
failed_at?: Date | null;
|
|
418
449
|
/** Provider error text that accompanies `failed_at`. */
|
|
419
450
|
error?: string | null;
|
|
451
|
+
/**
|
|
452
|
+
* Provider error CODE that accompanies `failed_at` (F6). Kept apart from `error`
|
|
453
|
+
* because the code is what the operator-facing breakdown groups by and what the
|
|
454
|
+
* circuit breaker decides on; parsing it back out of the text would be guessing.
|
|
455
|
+
* String, not number: providers other than Meta do not promise numeric codes.
|
|
456
|
+
*/
|
|
457
|
+
error_code?: string | null;
|
|
458
|
+
/** Ticket outcome when the policy asked to close it (F6) — see ICampaignChannelCounters. */
|
|
459
|
+
ticket_outcome?: CampaignTicketOutcome | null;
|
|
460
|
+
ticket_id?: string | null;
|
|
420
461
|
}
|
|
421
462
|
/**
|
|
422
463
|
* Why a recipient was kept out. Closed union: every value here HAS a writer in
|
|
@@ -304,8 +304,20 @@ export interface ICampaignChannelCounters {
|
|
|
304
304
|
failed?: number;
|
|
305
305
|
clicked?: number;
|
|
306
306
|
replied?: number;
|
|
307
|
+
/**
|
|
308
|
+
* Ticket outcome of sends whose policy asked to close the ticket (F6). Recorded by
|
|
309
|
+
* the hub-omni at the moment it decides. `kept_open` is the RULE (patient already had
|
|
310
|
+
* an open ticket — the campaign never ends a live attendance); `close_failed` is a
|
|
311
|
+
* defect (close attempted, did not happen).
|
|
312
|
+
*/
|
|
313
|
+
ticket_closed?: number;
|
|
314
|
+
ticket_kept_open?: number;
|
|
315
|
+
ticket_close_failed?: number;
|
|
307
316
|
}
|
|
308
317
|
|
|
318
|
+
/** What happened to the ticket of a campaign send that asked to close it (F6). */
|
|
319
|
+
export type CampaignTicketOutcome = "closed" | "kept_open" | "close_failed";
|
|
320
|
+
|
|
309
321
|
export interface ICampaignCounters {
|
|
310
322
|
raw?: number;
|
|
311
323
|
unique?: number;
|
|
@@ -422,6 +434,27 @@ export interface ICampaign extends IFireDoc {
|
|
|
422
434
|
finished_at?: Date | null;
|
|
423
435
|
cancel_reason?: string | null;
|
|
424
436
|
error_reason?: string | null;
|
|
437
|
+
/**
|
|
438
|
+
* Why the campaign is paused, when the SYSTEM paused it (F6 circuit breaker).
|
|
439
|
+
* `null`/absent on an operator pause and cleared on resume — its presence is what
|
|
440
|
+
* tells the screen "the platform stopped this, here is the cause".
|
|
441
|
+
*/
|
|
442
|
+
pause_reason?: ICampaignPauseReason | null;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* System pause (F6). A provider error that fails EVERY recipient the same way
|
|
447
|
+
* (account payment, account restricted, template paused/disabled, broken media)
|
|
448
|
+
* stops the dispatch instead of burning the rest of the list.
|
|
449
|
+
*/
|
|
450
|
+
export interface ICampaignPauseReason {
|
|
451
|
+
kind: "provider_systemic_error";
|
|
452
|
+
channel: CampaignChannel;
|
|
453
|
+
error_code: string;
|
|
454
|
+
error_message?: string | null;
|
|
455
|
+
/** Recipient whose failure tripped the breaker — the operator can open it. */
|
|
456
|
+
recipient_id?: string | null;
|
|
457
|
+
at: Date;
|
|
425
458
|
}
|
|
426
459
|
|
|
427
460
|
// ----- Bucket ---------------------------------------------------------------
|
|
@@ -550,6 +583,16 @@ export interface ICampaignRecipientChannelState {
|
|
|
550
583
|
failed_at?: Date | null;
|
|
551
584
|
/** Provider error text that accompanies `failed_at`. */
|
|
552
585
|
error?: string | null;
|
|
586
|
+
/**
|
|
587
|
+
* Provider error CODE that accompanies `failed_at` (F6). Kept apart from `error`
|
|
588
|
+
* because the code is what the operator-facing breakdown groups by and what the
|
|
589
|
+
* circuit breaker decides on; parsing it back out of the text would be guessing.
|
|
590
|
+
* String, not number: providers other than Meta do not promise numeric codes.
|
|
591
|
+
*/
|
|
592
|
+
error_code?: string | null;
|
|
593
|
+
/** Ticket outcome when the policy asked to close it (F6) — see ICampaignChannelCounters. */
|
|
594
|
+
ticket_outcome?: CampaignTicketOutcome | null;
|
|
595
|
+
ticket_id?: string | null;
|
|
553
596
|
}
|
|
554
597
|
|
|
555
598
|
/**
|