@automagik/omni 2.260903.3 → 2.260904.2

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.
@@ -0,0 +1,26 @@
1
+ -- ASC platform Flow channel — per-instance configuration.
2
+ --
3
+ -- Adds the four instance columns the `@omni/channel-asc-flow` plugin reads:
4
+ -- * asc_flow_base_url — platform host (null = the tenant default)
5
+ -- * asc_flow_login — /authuser login
6
+ -- * asc_flow_chave — /authuser chave (secret)
7
+ -- * asc_flow_handoff_servico — cod_servico for /transferirHumano
8
+ -- The optional webhook verify token reuses the existing shared
9
+ -- webhook_verify_token column (Gupshup precedent) — no new column.
10
+ --
11
+ -- Distinct from the `asc` channel (API Gateway / BSP direct): different
12
+ -- endpoints, different credentials, different columns.
13
+ --
14
+ -- Hand-written following the 0043_hermes_channel precedent (additive,
15
+ -- idempotent, no rewrite: ADD COLUMN with no default does not rewrite the
16
+ -- table).
17
+
18
+ -- NOTE: no explicit BEGIN/COMMIT — the boot migrator executes this file on a
19
+ -- pooled postgres-js connection, which rejects raw transaction control
20
+ -- (UNSAFE_TRANSACTION). Single batch, idempotent statements.
21
+
22
+ ALTER TABLE "instances"
23
+ ADD COLUMN IF NOT EXISTS "asc_flow_base_url" text,
24
+ ADD COLUMN IF NOT EXISTS "asc_flow_login" text,
25
+ ADD COLUMN IF NOT EXISTS "asc_flow_chave" text,
26
+ ADD COLUMN IF NOT EXISTS "asc_flow_handoff_servico" integer;
@@ -0,0 +1,21 @@
1
+ -- ASC platform Flow channel — which handoff destination an instance uses.
2
+ --
3
+ -- The two destinations are MUTUALLY EXCLUSIVE, measured live on atendimento
4
+ -- 22286567 (flow #225, 03/09): `POST /transferirHumano` was accepted and the
5
+ -- atendimento left "Automático" for "Aguardando atendimento" — at which point
6
+ -- the flow STOPPED POLLING. A dead flow never reads `hand_off:"sim"` and never
7
+ -- reaches the `genesys_mobile_service` node, so the WDE agent got nothing.
8
+ --
9
+ -- * 'flow' — no /transferirHumano; the poll body carries hand_off/fila_vq
10
+ -- and the flow routes to Genesys. THE DEFAULT (Hapvida's case).
11
+ -- * 'service' — call /transferirHumano; the ASC's own internal queue works it.
12
+ --
13
+ -- NULL reads as 'flow' in the plugin, so no backfill and no DEFAULT clause is
14
+ -- needed — ADD COLUMN with no default does not rewrite the table.
15
+ --
16
+ -- Hand-written following the 0052_asc_flow_channel precedent (additive,
17
+ -- idempotent). No explicit BEGIN/COMMIT — the boot migrator executes this file
18
+ -- on a pooled postgres-js connection, which rejects raw transaction control.
19
+
20
+ ALTER TABLE "instances"
21
+ ADD COLUMN IF NOT EXISTS "asc_flow_handoff_mode" text;
@@ -379,6 +379,20 @@
379
379
  "when": 1785300000000,
380
380
  "tag": "0053_gupshup_handoff_options",
381
381
  "breakpoints": true
382
+ },
383
+ {
384
+ "idx": 54,
385
+ "version": "7",
386
+ "when": 1785400000000,
387
+ "tag": "0054_asc_flow_channel",
388
+ "breakpoints": true
389
+ },
390
+ {
391
+ "idx": 55,
392
+ "version": "7",
393
+ "when": 1785500000000,
394
+ "tag": "0055_asc_flow_handoff_mode",
395
+ "breakpoints": true
382
396
  }
383
397
  ]
384
398
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/commands/chats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwkBpC,wBAAgB,kBAAkB,IAAI,OAAO,CA2jB5C"}
1
+ {"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/commands/chats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0kBpC,wBAAgB,kBAAkB,IAAI,OAAO,CA2jB5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4MpC,wBAAgB,sBAAsB,IAAI,OAAO,CAy3ChD"}
1
+ {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../src/commands/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8MpC,wBAAgB,sBAAsB,IAAI,OAAO,CAy3ChD"}