plazbot-cli 0.3.5 → 0.3.6

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.
@@ -59,14 +59,14 @@ export function findNewIntegrationForChannel(channel, integrations, knownIds) {
59
59
  return b > a ? current : latest;
60
60
  });
61
61
  }
62
- /** Etiqueta humana del item recien conectado (numero, alias de pagina, etc.). */
62
+ /** Etiqueta humana del item recien conectado (numero, nombre de pagina, etc.). */
63
63
  export function describeIntegration(channel, i) {
64
64
  switch (channel) {
65
65
  case 'whatsapp':
66
- return i.cellphoneNumberFormat || i.cellphoneNumber || '';
66
+ return i.cellphoneNumberFormat || i.cellphoneNumber || i.srcName || '';
67
67
  case 'instagram':
68
- return i.aliasName || i.instagramPageId || '';
68
+ return i.srcName || i.aliasName || i.instagramPageId || '';
69
69
  case 'messenger':
70
- return i.aliasName || i.facebookPageId || '';
70
+ return i.srcName || i.aliasName || i.facebookPageId || '';
71
71
  }
72
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plazbot-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "CLI para Plazbot SDK",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -52,8 +52,8 @@ export interface ChannelLinkData {
52
52
  alreadyConnected?: boolean;
53
53
  /** Snapshot WhatsApp (legacy, mantenido por compat con la tool de WA). */
54
54
  connectedNumbers?: Array<{ id?: string; number?: string; alias?: string }>;
55
- /** Snapshot IG/Messenger (pageId + alias). */
56
- connectedItems?: Array<{ id?: string; pageId?: string; alias?: string }>;
55
+ /** Snapshot IG/Messenger (pageId + nombre legible + alias). */
56
+ connectedItems?: Array<{ id?: string; pageId?: string; name?: string; alias?: string }>;
57
57
  existingIntegrationIds?: string[];
58
58
  }
59
59
 
@@ -90,7 +90,9 @@ export interface WorkspaceIntegrationItem {
90
90
  facebookPageId?: string;
91
91
  /** instagram */
92
92
  instagramPageId?: string;
93
- /** comun: alias humano */
93
+ /** comun: nombre legible (display name de Meta) */
94
+ srcName?: string;
95
+ /** comun: alias humano puesto manualmente */
94
96
  aliasName?: string;
95
97
  creationDate?: string;
96
98
  isActive?: number | boolean;
@@ -123,17 +125,17 @@ export function findNewIntegrationForChannel(
123
125
  });
124
126
  }
125
127
 
126
- /** Etiqueta humana del item recien conectado (numero, alias de pagina, etc.). */
128
+ /** Etiqueta humana del item recien conectado (numero, nombre de pagina, etc.). */
127
129
  export function describeIntegration(
128
130
  channel: ConnectChannel,
129
131
  i: WorkspaceIntegrationItem,
130
132
  ): string {
131
133
  switch (channel) {
132
134
  case 'whatsapp':
133
- return i.cellphoneNumberFormat || i.cellphoneNumber || '';
135
+ return i.cellphoneNumberFormat || i.cellphoneNumber || i.srcName || '';
134
136
  case 'instagram':
135
- return i.aliasName || i.instagramPageId || '';
137
+ return i.srcName || i.aliasName || i.instagramPageId || '';
136
138
  case 'messenger':
137
- return i.aliasName || i.facebookPageId || '';
139
+ return i.srcName || i.aliasName || i.facebookPageId || '';
138
140
  }
139
141
  }