Unverified Commit ad2c4865 authored by Kourser's avatar Kourser
Browse files

Temps réel & types : événements sociaux + types kits éditables

- Événements social:update / social:delete (back + front).
- InjectChannel étend CALL ; types partagés du kit éditable (ApiKit + sous-entités).

Co-Authored-By: Claude (RCA)
parent 3cb50265
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ export const RT = {
  logUpdate: 'log:update',
  chatNew: 'chat:new',
  socialNew: 'social:new',
  socialUpdate: 'social:update',
  socialDelete: 'social:delete',
  newsNew: 'news:new',
  documentNew: 'document:new',
  callReminder: 'call:reminder',
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ export const RT = {
  logUpdate: 'log:update',
  chatNew: 'chat:new',
  socialNew: 'social:new',
  socialUpdate: 'social:update',
  socialDelete: 'social:delete',
  newsNew: 'news:new',
  documentNew: 'document:new',
  callReminder: 'call:reminder',
+65 −1
Original line number Diff line number Diff line
@@ -47,6 +47,70 @@ export interface ApiKitSummary {
  documents: number;
}

/** Canaux disponibles pour un inject de kit. */
export type KitInjectChannel = 'EMAIL' | 'CHAT' | 'SOCIAL' | 'NEWS' | 'CALL';

export interface ApiKitCharacter {
  id: string;
  ref: string;
  name: string;
  title: string | null;
  orgUnit: string | null;
  kind: CharacterKind;
  simEmail: string | null;
  avatarColor: string | null;
}

export interface ApiKitChannel {
  id: string;
  ref: string;
  name: string;
}

export interface ApiKitDocument {
  id: string;
  ref: string | null;
  folder: string | null;
  name: string;
  description: string | null;
  body: string | null;
  file: string | null;
  mimeType: string | null;
}

export interface ApiKitInject {
  id: string;
  order: number;
  offsetMinutes: number;
  channel: KitInjectChannel;
  title: string;
  body: string;
  senderRef: string | null;
  subject: string | null;
  targetRefs: string[];
  attachmentRefs: string[];
  channelRef: string | null;
  network: SocialNetwork | null;
  authorName: string | null;
  authorHandle: string | null;
  likes: number | null;
}

/** Kit complet et editable (pour l'editeur de bibliothèque). */
export interface ApiKit {
  id: string;
  builtinId: string | null;
  name: string;
  sector: string;
  source: string;
  description: string;
  objectives: string | null;
  characters: ApiKitCharacter[];
  channels: ApiKitChannel[];
  documents: ApiKitDocument[];
  injects: ApiKitInject[];
}

export type ExerciseStatus = 'DRAFT' | 'READY' | 'RUNNING' | 'PAUSED' | 'CLOSED' | 'ARCHIVED';
export type CharacterKind = 'PLAYER' | 'NPC';

@@ -100,7 +164,7 @@ export interface CreatedParticipant {

export type InjectStatus = 'DRAFT' | 'PENDING' | 'SENT' | 'SKIPPED' | 'CANCELLED';
export type InjectTrigger = 'SCHEDULED' | 'MANUAL';
export type InjectChannel = 'EMAIL' | 'CHAT' | 'SOCIAL' | 'NEWS' | 'DOCUMENT' | 'DIRECTORY';
export type InjectChannel = 'EMAIL' | 'CHAT' | 'SOCIAL' | 'NEWS' | 'DOCUMENT' | 'DIRECTORY' | 'CALL';

export interface EmailPayload {
  subject: string;