@messenger-box/platform-server 10.0.3-alpha.218 → 10.0.3-alpha.222

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.
@@ -87,6 +87,8 @@ export interface ISendResult {
87
87
  /** Timestamp of delivery (Unix ms) */
88
88
  timestamp?: number;
89
89
  }
90
+ /** Who is responsible for persisting chat messages to the DB. */
91
+ export type PersistenceMode = 'backend' | 'frontend';
90
92
  /** Configuration schema for a channel provider (declared in contributes.channels) */
91
93
  export interface IChannelProviderConfig {
92
94
  /** Unique provider type identifier (e.g. 'whatsapp', 'telegram') */
@@ -103,6 +105,12 @@ export interface IChannelProviderConfig {
103
105
  dock?: Partial<IChannelDock>;
104
106
  /** JSON Schema for provider-specific configuration (API keys, tokens, etc.) */
105
107
  configSchema?: Record<string, unknown>;
108
+ /**
109
+ * Who persists chat messages.
110
+ * - `'backend'` — the gateway streaming pipeline saves messages; UI should skip auto-save.
111
+ * - `'frontend'` — the UI saves messages via sendMessagesMutation (default).
112
+ */
113
+ persistenceMode?: PersistenceMode;
106
114
  }
107
115
  /**
108
116
  * IExternalChannelProvider — the interface that channel extensions implement.
@@ -206,6 +214,8 @@ export interface IGatewayChannelStatus {
206
214
  label: string;
207
215
  snapshot?: IChannelAccountSnapshot;
208
216
  issues: IChannelStatusIssue[];
217
+ /** Who persists chat messages — 'backend' or 'frontend' (default). */
218
+ persistenceMode?: PersistenceMode;
209
219
  }
210
220
  /**
211
221
  * IGatewayService — the top-level gateway orchestrator.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messenger-box/platform-server",
3
- "version": "10.0.3-alpha.218",
3
+ "version": "10.0.3-alpha.222",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -19,7 +19,7 @@
19
19
  "watch": "yarn build:lib:watch"
20
20
  },
21
21
  "dependencies": {
22
- "@messenger-box/core": "10.0.3-alpha.218",
22
+ "@messenger-box/core": "10.0.3-alpha.222",
23
23
  "@skoropletov/moleculer-cron-tasks": "~0.0.8",
24
24
  "date-fns": "^4.1.0"
25
25
  },
@@ -73,5 +73,5 @@
73
73
  "typescript": {
74
74
  "definition": "lib/index.d.ts"
75
75
  },
76
- "gitHead": "3e7cb1ea1e146fdb0224ae1f058e73d34eb6e7a3"
76
+ "gitHead": "0ba47ffecc11ca4d1a00cb5b481ee67b4fe442ae"
77
77
  }