@funnelchat-hq/sandbox 0.5.1 → 0.5.3

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.
@@ -356,7 +356,7 @@ var catalog_default = {
356
356
  connection: "qr",
357
357
  external_reference: "cliente-42"
358
358
  },
359
- disconnected_at: "2026-10-05T03:00:00+00:00",
359
+ disconnected_at: "2026-10-05T03:00:00Z",
360
360
  reason: "qr_logged_out",
361
361
  connect_link_id: 812,
362
362
  workspace_id: 37
@@ -382,7 +382,7 @@ var catalog_default = {
382
382
  connection: "qr",
383
383
  external_reference: "cliente-42"
384
384
  },
385
- connected_at: "2026-10-05T03:00:00+00:00",
385
+ connected_at: "2026-10-05T03:00:00Z",
386
386
  connect_link_id: 812,
387
387
  workspace_id: 37
388
388
  }
@@ -407,7 +407,7 @@ var catalog_default = {
407
407
  connection: "qr",
408
408
  external_reference: "cliente-42"
409
409
  },
410
- deleted_at: "2026-10-05T03:00:00+00:00",
410
+ deleted_at: "2026-10-05T03:00:00Z",
411
411
  connect_link_id: 812,
412
412
  workspace_id: 37
413
413
  }
@@ -434,7 +434,7 @@ var catalog_default = {
434
434
  },
435
435
  previous_state: "available",
436
436
  state: "limited",
437
- changed_at: "2026-10-05T03:00:00+00:00",
437
+ changed_at: "2026-10-05T03:00:00Z",
438
438
  connect_link_id: null,
439
439
  workspace_id: 37
440
440
  }
@@ -461,7 +461,7 @@ var catalog_default = {
461
461
  },
462
462
  previous: "GREEN",
463
463
  current: "YELLOW",
464
- changed_at: "2026-10-05T03:00:00+00:00",
464
+ changed_at: "2026-10-05T03:00:00Z",
465
465
  connect_link_id: null,
466
466
  workspace_id: 37
467
467
  }
@@ -488,7 +488,7 @@ var catalog_default = {
488
488
  },
489
489
  previous: "TIER_1K",
490
490
  current: "TIER_10K",
491
- changed_at: "2026-10-05T03:00:00+00:00",
491
+ changed_at: "2026-10-05T03:00:00Z",
492
492
  connect_link_id: null,
493
493
  workspace_id: 37
494
494
  }
@@ -518,7 +518,7 @@ var catalog_default = {
518
518
  status: "APPROVED",
519
519
  verified_name: "Soporte Lucky Shrub",
520
520
  rejection_reason: null,
521
- reviewed_at: "2026-10-05T03:00:00+00:00",
521
+ reviewed_at: "2026-10-05T03:00:00Z",
522
522
  connect_link_id: null,
523
523
  workspace_id: 37
524
524
  }
@@ -635,7 +635,7 @@ var catalog_default = {
635
635
  type: "mac.usage_80",
636
636
  area: "accounts",
637
637
  status: "active",
638
- description: "La cuenta alcanz\xF3 el 80% de sus contactos activos mensuales del ciclo.",
638
+ description: "La cuenta alcanz\xF3 el 80% de sus contactos activos mensuales del ciclo. `workspace_id` es el workspace al que se rutea el evento, como en todos los eventos: el workspace con facturaci\xF3n propia cuyo pool alcanz\xF3 el umbral, o el workspace por defecto cuando el pool es el de la cuenta.",
639
639
  subscribable: true,
640
640
  example: {
641
641
  id: "evt_0f8e4b526c1d4c7a9a3e2b5d",
@@ -655,7 +655,7 @@ var catalog_default = {
655
655
  type: "mac.usage_100",
656
656
  area: "accounts",
657
657
  status: "active",
658
- description: "La cuenta agot\xF3 sus contactos activos mensuales del ciclo; se abre una gracia de 24 horas cuyo vencimiento viaja en `grace_expires_at`.",
658
+ description: "La cuenta agot\xF3 sus contactos activos mensuales del ciclo; se abre una gracia de 24 horas cuyo vencimiento viaja en `grace_expires_at`. `workspace_id` es el workspace al que se rutea el evento, como en todos los eventos: el workspace con facturaci\xF3n propia cuyo pool se agot\xF3, o el workspace por defecto cuando el pool es el de la cuenta.",
659
659
  subscribable: true,
660
660
  example: {
661
661
  id: "evt_0f8e4b526c1d4c7a9a3e2b5d",
@@ -1148,7 +1148,7 @@ var catalog_default = {
1148
1148
  type: "group.created",
1149
1149
  area: "communities",
1150
1150
  status: "active",
1151
- description: "Se cre\xF3 o se import\xF3 un grupo dentro de una campa\xF1a de la cuenta.",
1151
+ description: "Se cre\xF3 o se import\xF3 un grupo dentro de una campa\xF1a de la cuenta; `source` vale `imported` si el grupo ya exist\xEDa en WhatsApp y entr\xF3 por una importaci\xF3n o una sincronizaci\xF3n, y `created` en cualquier otro caso.",
1152
1152
  subscribable: true,
1153
1153
  example: {
1154
1154
  id: "evt_00000000000000000000000000000001",
@@ -1162,7 +1162,7 @@ var catalog_default = {
1162
1162
  type: "group"
1163
1163
  },
1164
1164
  campaign: {
1165
- uuid: "00000000-0000-4000-8000-000000000001",
1165
+ uuid: "xK9mQz",
1166
1166
  name: "Campa\xF1a de ejemplo"
1167
1167
  },
1168
1168
  source: "created",
@@ -1188,7 +1188,7 @@ var catalog_default = {
1188
1188
  type: "group"
1189
1189
  },
1190
1190
  campaign: {
1191
- uuid: "00000000-0000-4000-8000-000000000001",
1191
+ uuid: "xK9mQz",
1192
1192
  name: "Campa\xF1a de ejemplo"
1193
1193
  },
1194
1194
  reason: "http_404",
@@ -1215,7 +1215,7 @@ var catalog_default = {
1215
1215
  type: "group"
1216
1216
  },
1217
1217
  campaign: {
1218
- uuid: "00000000-0000-4000-8000-000000000001",
1218
+ uuid: "xK9mQz",
1219
1219
  name: "Campa\xF1a de ejemplo"
1220
1220
  },
1221
1221
  invite_link: "https://chat.whatsapp.com/EjemploNuevo0000000000001",
@@ -1323,7 +1323,7 @@ var catalog_default = {
1323
1323
  uid: "120363000000000001@g.us"
1324
1324
  },
1325
1325
  participant: {
1326
- identity: "+5491100000000",
1326
+ identity: "5491100000000",
1327
1327
  identity_type: "phone",
1328
1328
  name: "Ana P\xE9rez"
1329
1329
  },
@@ -1360,7 +1360,7 @@ var catalog_default = {
1360
1360
  uuid: "00000000-0000-4000-8000-000000000004"
1361
1361
  },
1362
1362
  participant: {
1363
- identity: "+5491100000000",
1363
+ identity: "5491100000000",
1364
1364
  identity_type: "phone",
1365
1365
  name: null
1366
1366
  },
@@ -1375,7 +1375,7 @@ var catalog_default = {
1375
1375
  type: "pipeline.finished",
1376
1376
  area: "communities",
1377
1377
  status: "active",
1378
- description: "Termin\xF3 un pipeline de operaciones sobre grupos, con su resultado agregado y la clave de idempotencia del pedido que lo origin\xF3, cuando la hay.",
1378
+ description: "Termin\xF3 un pipeline de operaciones sobre los grupos de una campa\xF1a, con su resultado agregado y la clave de idempotencia del pedido que lo origin\xF3, cuando la hay; si despu\xE9s cambia el resultado de alguna de sus acciones (por ejemplo, por un reintento), sale otro, con otro `id` y los conteos nuevos.",
1379
1379
  subscribable: true,
1380
1380
  example: {
1381
1381
  id: "evt_0000000000000000000000000000000a",
@@ -1384,7 +1384,7 @@ var catalog_default = {
1384
1384
  occurred_at: "2026-10-01T12:00:00Z",
1385
1385
  data: {
1386
1386
  campaign: {
1387
- uuid: "00000000-0000-4000-8000-00000000000a"
1387
+ uuid: "xK9mQz"
1388
1388
  },
1389
1389
  pipeline: {
1390
1390
  uuid: "00000000-0000-4000-8000-00000000000b",
@@ -1407,7 +1407,7 @@ var catalog_default = {
1407
1407
  type: "group.blocked",
1408
1408
  area: "communities",
1409
1409
  status: "active",
1410
- description: "Un grupo qued\xF3 inoperable: sin administrador conectado, con el link de invitaci\xF3n inv\xE1lido o suspendido por WhatsApp.",
1410
+ description: "Un grupo de una campa\xF1a qued\xF3 inoperable: sin administrador conectado, con el link de invitaci\xF3n inv\xE1lido o suspendido por WhatsApp; un grupo que no es de una campa\xF1a no lo genera.",
1411
1411
  subscribable: true,
1412
1412
  example: {
1413
1413
  id: "evt_00000000000000000000000000000005",
@@ -1420,7 +1420,7 @@ var catalog_default = {
1420
1420
  name: "Grupo de ejemplo"
1421
1421
  },
1422
1422
  campaign: {
1423
- uuid: "00000000-0000-4000-8000-000000000001"
1423
+ uuid: "xK9mQz"
1424
1424
  },
1425
1425
  reason: "admin_access_lost",
1426
1426
  workspace_id: 37
@@ -1431,7 +1431,7 @@ var catalog_default = {
1431
1431
  type: "group.recovered",
1432
1432
  area: "communities",
1433
1433
  status: "active",
1434
- description: "Un grupo que estaba bloqueado volvi\xF3 a operar.",
1434
+ description: "Un grupo de una campa\xF1a que estaba bloqueado volvi\xF3 a operar; un grupo que no es de una campa\xF1a no lo genera.",
1435
1435
  subscribable: true,
1436
1436
  example: {
1437
1437
  id: "evt_00000000000000000000000000000006",
@@ -1444,7 +1444,7 @@ var catalog_default = {
1444
1444
  name: "Grupo de ejemplo"
1445
1445
  },
1446
1446
  campaign: {
1447
- uuid: "00000000-0000-4000-8000-000000000001"
1447
+ uuid: "xK9mQz"
1448
1448
  },
1449
1449
  reason: "access_restored",
1450
1450
  workspace_id: 37
@@ -1464,7 +1464,7 @@ var catalog_default = {
1464
1464
  occurred_at: "2026-10-01T12:00:00Z",
1465
1465
  data: {
1466
1466
  campaign: {
1467
- uuid: "00000000-0000-4000-8000-000000000009",
1467
+ uuid: "xK9mQz",
1468
1468
  name: "Campa\xF1a de ejemplo"
1469
1469
  },
1470
1470
  from: "active",
@@ -3075,8 +3075,34 @@ var openapi_default = {
3075
3075
  content: {
3076
3076
  "application/json": {
3077
3077
  schema: {
3078
- type: "array",
3079
- items: {}
3078
+ type: "object",
3079
+ properties: {
3080
+ contactsCount: {
3081
+ type: "integer"
3082
+ },
3083
+ unreachableCount: {
3084
+ type: "integer"
3085
+ },
3086
+ pausedCount: {
3087
+ type: "integer"
3088
+ },
3089
+ optedOutCount: {
3090
+ type: "integer"
3091
+ },
3092
+ hardBouncedCount: {
3093
+ type: "integer"
3094
+ },
3095
+ blockedCount: {
3096
+ type: "integer"
3097
+ }
3098
+ },
3099
+ required: [
3100
+ "contactsCount",
3101
+ "unreachableCount",
3102
+ "pausedCount",
3103
+ "optedOutCount",
3104
+ "hardBouncedCount"
3105
+ ]
3080
3106
  }
3081
3107
  }
3082
3108
  }
@@ -5477,77 +5503,18 @@ var openapi_default = {
5477
5503
  schema: {
5478
5504
  type: "array",
5479
5505
  items: {
5480
- anyOf: [
5481
- {
5482
- type: "object",
5483
- properties: {
5484
- message: {
5485
- type: "string",
5486
- const: "No autorizado: el campo personalizado no pertenece al usuario autenticado."
5487
- },
5488
- status: {
5489
- type: "integer",
5490
- const: 403
5491
- }
5492
- },
5493
- required: [
5494
- "message",
5495
- "status"
5496
- ]
5497
- },
5498
- {
5499
- type: "object",
5500
- properties: {
5501
- message: {
5502
- type: "string",
5503
- const: "No autorizado: el contacto no pertenece al usuario autenticado."
5504
- },
5505
- status: {
5506
- type: "integer",
5507
- const: 403
5508
- }
5509
- },
5510
- required: [
5511
- "message",
5512
- "status"
5513
- ]
5514
- },
5515
- {
5516
- type: "object",
5517
- properties: {
5518
- message: {
5519
- type: [
5520
- "string",
5521
- "null"
5522
- ]
5523
- },
5524
- status: {
5525
- type: "integer",
5526
- const: 422
5527
- }
5528
- },
5529
- required: [
5530
- "message",
5531
- "status"
5532
- ]
5506
+ type: "object",
5507
+ properties: {
5508
+ message: {
5509
+ type: "string"
5533
5510
  },
5534
- {
5535
- type: "object",
5536
- properties: {
5537
- message: {
5538
- type: "string",
5539
- const: "Custom field value attached successfully."
5540
- },
5541
- status: {
5542
- type: "integer",
5543
- const: 201
5544
- }
5545
- },
5546
- required: [
5547
- "message",
5548
- "status"
5549
- ]
5511
+ status: {
5512
+ type: "integer"
5550
5513
  }
5514
+ },
5515
+ required: [
5516
+ "message",
5517
+ "status"
5551
5518
  ]
5552
5519
  }
5553
5520
  }
@@ -5795,210 +5762,203 @@ var openapi_default = {
5795
5762
  }
5796
5763
  }
5797
5764
  },
5765
+ responses: {
5766
+ "200": {
5767
+ description: "OK"
5768
+ },
5769
+ "401": {
5770
+ $ref: "#/components/responses/ConversationsAuthenticationException"
5771
+ },
5772
+ "402": {
5773
+ description: "Payment Required",
5774
+ content: {
5775
+ "application/json": {
5776
+ schema: {
5777
+ type: "object",
5778
+ properties: {
5779
+ error: {
5780
+ type: "string",
5781
+ enum: [
5782
+ "payment_required"
5783
+ ]
5784
+ },
5785
+ message: {
5786
+ type: "string"
5787
+ }
5788
+ },
5789
+ required: [
5790
+ "error",
5791
+ "message"
5792
+ ]
5793
+ }
5794
+ }
5795
+ }
5796
+ },
5797
+ "403": {
5798
+ $ref: "#/components/responses/ConversationsAuthorizationException"
5799
+ },
5800
+ "404": {
5801
+ $ref: "#/components/responses/ConversationsModelNotFoundException"
5802
+ },
5803
+ "422": {
5804
+ $ref: "#/components/responses/ConversationsValidationException"
5805
+ }
5806
+ },
5807
+ "x-fc-permission": "conversations:write",
5808
+ "x-fc-proposito": "Sirve para mantener al d\xEDa la ficha de un contacto desde tu sistema: nombre, email, tel\xE9fono, notas, asesor asignado, favorito o si puede ejecutar flujos.",
5809
+ "x-fc-domain": "conversations"
5810
+ }
5811
+ },
5812
+ "/api/v1/contacts/{contact}/tags": {
5813
+ get: {
5814
+ operationId: "contact.tags",
5815
+ description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Ver**",
5816
+ summary: "Ver las etiquetas de un contacto",
5817
+ tags: [
5818
+ "Etiquetas"
5819
+ ],
5820
+ parameters: [
5821
+ {
5822
+ name: "contact",
5823
+ in: "path",
5824
+ required: true,
5825
+ schema: {
5826
+ type: "integer"
5827
+ }
5828
+ },
5829
+ {
5830
+ name: "perPage",
5831
+ in: "query",
5832
+ schema: {
5833
+ type: "integer",
5834
+ default: 25,
5835
+ minimum: 1,
5836
+ maximum: 100
5837
+ }
5838
+ }
5839
+ ],
5798
5840
  responses: {
5799
5841
  "200": {
5800
5842
  description: "OK",
5801
5843
  content: {
5802
5844
  "application/json": {
5803
5845
  schema: {
5804
- type: "object"
5805
- }
5806
- }
5807
- }
5808
- },
5809
- "401": {
5810
- $ref: "#/components/responses/ConversationsAuthenticationException"
5811
- },
5812
- "402": {
5813
- description: "Payment Required",
5814
- content: {
5815
- "application/json": {
5816
- schema: {
5817
- type: "object",
5818
- properties: {
5819
- error: {
5820
- type: "string",
5821
- enum: [
5822
- "payment_required"
5823
- ]
5824
- },
5825
- message: {
5826
- type: "string"
5827
- }
5828
- },
5829
- required: [
5830
- "error",
5831
- "message"
5832
- ]
5833
- }
5834
- }
5835
- }
5836
- },
5837
- "403": {
5838
- $ref: "#/components/responses/ConversationsAuthorizationException"
5839
- },
5840
- "404": {
5841
- $ref: "#/components/responses/ConversationsModelNotFoundException"
5842
- },
5843
- "422": {
5844
- $ref: "#/components/responses/ConversationsValidationException"
5845
- }
5846
- },
5847
- "x-fc-permission": "conversations:write",
5848
- "x-fc-proposito": "Sirve para mantener al d\xEDa la ficha de un contacto desde tu sistema: nombre, email, tel\xE9fono, notas, asesor asignado, favorito o si puede ejecutar flujos.",
5849
- "x-fc-domain": "conversations"
5850
- }
5851
- },
5852
- "/api/v1/contacts/{contact}/tags": {
5853
- get: {
5854
- operationId: "contact.tags",
5855
- description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Ver**",
5856
- summary: "Ver las etiquetas de un contacto",
5857
- tags: [
5858
- "Etiquetas"
5859
- ],
5860
- parameters: [
5861
- {
5862
- name: "contact",
5863
- in: "path",
5864
- required: true,
5865
- schema: {
5866
- type: "integer"
5867
- }
5868
- },
5869
- {
5870
- name: "perPage",
5871
- in: "query",
5872
- schema: {
5873
- type: "integer",
5874
- default: 25,
5875
- minimum: 1,
5876
- maximum: 100
5877
- }
5878
- }
5879
- ],
5880
- responses: {
5881
- "200": {
5882
- description: "OK",
5883
- content: {
5884
- "application/json": {
5885
- schema: {
5886
- type: "object",
5887
- properties: {
5888
- data: {
5889
- type: "array",
5890
- items: {
5891
- $ref: "#/components/schemas/ContactTagResource"
5892
- }
5893
- },
5894
- links: {
5895
- type: "object",
5896
- properties: {
5897
- first: {
5898
- type: [
5899
- "string",
5900
- "null"
5901
- ]
5902
- },
5903
- last: {
5904
- type: [
5905
- "string",
5906
- "null"
5907
- ]
5908
- },
5909
- prev: {
5910
- type: [
5911
- "string",
5912
- "null"
5913
- ]
5914
- },
5915
- next: {
5916
- type: [
5917
- "string",
5918
- "null"
5919
- ]
5920
- }
5921
- },
5922
- required: [
5923
- "first",
5924
- "last",
5925
- "prev",
5926
- "next"
5927
- ]
5928
- },
5929
- meta: {
5930
- type: "object",
5931
- properties: {
5932
- current_page: {
5933
- type: "integer"
5934
- },
5935
- from: {
5936
- type: [
5937
- "integer",
5938
- "null"
5939
- ]
5940
- },
5941
- last_page: {
5942
- type: "integer"
5943
- },
5944
- links: {
5945
- type: "array",
5946
- items: {
5947
- type: "object",
5948
- properties: {
5949
- url: {
5950
- type: [
5951
- "string",
5952
- "null"
5953
- ]
5954
- },
5955
- label: {
5956
- type: "string"
5957
- },
5958
- active: {
5959
- type: "boolean"
5960
- }
5961
- },
5962
- required: [
5963
- "url",
5964
- "label",
5965
- "active"
5966
- ]
5967
- }
5968
- },
5969
- path: {
5970
- type: "string"
5971
- },
5972
- per_page: {
5973
- type: "integer"
5974
- },
5975
- to: {
5976
- type: [
5977
- "integer",
5978
- "null"
5979
- ]
5980
- },
5981
- total: {
5982
- type: "integer"
5983
- }
5984
- },
5985
- required: [
5986
- "current_page",
5987
- "from",
5988
- "last_page",
5989
- "links",
5990
- "path",
5991
- "per_page",
5992
- "to",
5993
- "total"
5994
- ]
5995
- }
5996
- },
5997
- required: [
5998
- "data",
5999
- "links",
6000
- "meta"
6001
- ]
5846
+ type: "object",
5847
+ properties: {
5848
+ data: {
5849
+ type: "array",
5850
+ items: {
5851
+ $ref: "#/components/schemas/ContactTagResource"
5852
+ }
5853
+ },
5854
+ links: {
5855
+ type: "object",
5856
+ properties: {
5857
+ first: {
5858
+ type: [
5859
+ "string",
5860
+ "null"
5861
+ ]
5862
+ },
5863
+ last: {
5864
+ type: [
5865
+ "string",
5866
+ "null"
5867
+ ]
5868
+ },
5869
+ prev: {
5870
+ type: [
5871
+ "string",
5872
+ "null"
5873
+ ]
5874
+ },
5875
+ next: {
5876
+ type: [
5877
+ "string",
5878
+ "null"
5879
+ ]
5880
+ }
5881
+ },
5882
+ required: [
5883
+ "first",
5884
+ "last",
5885
+ "prev",
5886
+ "next"
5887
+ ]
5888
+ },
5889
+ meta: {
5890
+ type: "object",
5891
+ properties: {
5892
+ current_page: {
5893
+ type: "integer"
5894
+ },
5895
+ from: {
5896
+ type: [
5897
+ "integer",
5898
+ "null"
5899
+ ]
5900
+ },
5901
+ last_page: {
5902
+ type: "integer"
5903
+ },
5904
+ links: {
5905
+ type: "array",
5906
+ items: {
5907
+ type: "object",
5908
+ properties: {
5909
+ url: {
5910
+ type: [
5911
+ "string",
5912
+ "null"
5913
+ ]
5914
+ },
5915
+ label: {
5916
+ type: "string"
5917
+ },
5918
+ active: {
5919
+ type: "boolean"
5920
+ }
5921
+ },
5922
+ required: [
5923
+ "url",
5924
+ "label",
5925
+ "active"
5926
+ ]
5927
+ }
5928
+ },
5929
+ path: {
5930
+ type: "string"
5931
+ },
5932
+ per_page: {
5933
+ type: "integer"
5934
+ },
5935
+ to: {
5936
+ type: [
5937
+ "integer",
5938
+ "null"
5939
+ ]
5940
+ },
5941
+ total: {
5942
+ type: "integer"
5943
+ }
5944
+ },
5945
+ required: [
5946
+ "current_page",
5947
+ "from",
5948
+ "last_page",
5949
+ "links",
5950
+ "path",
5951
+ "per_page",
5952
+ "to",
5953
+ "total"
5954
+ ]
5955
+ }
5956
+ },
5957
+ required: [
5958
+ "data",
5959
+ "links",
5960
+ "meta"
5961
+ ]
6002
5962
  }
6003
5963
  }
6004
5964
  }
@@ -6836,14 +6796,7 @@ var openapi_default = {
6836
6796
  },
6837
6797
  responses: {
6838
6798
  "200": {
6839
- description: "OK",
6840
- content: {
6841
- "application/json": {
6842
- schema: {
6843
- type: "null"
6844
- }
6845
- }
6846
- }
6799
+ description: "OK"
6847
6800
  },
6848
6801
  "401": {
6849
6802
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -7154,7 +7107,7 @@ var openapi_default = {
7154
7107
  "/api/v1/contacts/{contact}/message/contact-card": {
7155
7108
  post: {
7156
7109
  operationId: "contactCard.store",
7157
- description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale, pero queda en el historial del contacto un mensaje con estado de error que lleva tu `client_reference`. Detalle en \xABErrores y l\xEDmites\xBB.",
7110
+ description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale y no se guarda ning\xFAn mensaje ni tu `client_reference`: no queda nada en el historial del contacto. Detalle en \xABErrores y l\xEDmites\xBB.",
7158
7111
  summary: "Mandar una tarjeta de contacto",
7159
7112
  tags: [
7160
7113
  "Atender una conversaci\xF3n"
@@ -7380,7 +7333,7 @@ var openapi_default = {
7380
7333
  properties: {
7381
7334
  error: {
7382
7335
  type: "string",
7383
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
7336
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
7384
7337
  examples: [
7385
7338
  "internal_error"
7386
7339
  ]
@@ -8196,11 +8149,17 @@ var openapi_default = {
8196
8149
  properties: {
8197
8150
  error: {
8198
8151
  type: "string",
8199
- const: "No se pudieron cargar las conversaciones"
8152
+ enum: [
8153
+ "internal_error"
8154
+ ]
8155
+ },
8156
+ message: {
8157
+ type: "string"
8200
8158
  }
8201
8159
  },
8202
8160
  required: [
8203
- "error"
8161
+ "error",
8162
+ "message"
8204
8163
  ]
8205
8164
  }
8206
8165
  }
@@ -8459,11 +8418,18 @@ var openapi_default = {
8459
8418
  type: "object",
8460
8419
  properties: {
8461
8420
  count: {
8462
- type: [
8463
- "integer",
8464
- "null"
8465
- ],
8466
- minimum: 0
8421
+ anyOf: [
8422
+ {
8423
+ type: "null"
8424
+ },
8425
+ {
8426
+ type: "integer",
8427
+ minimum: 0
8428
+ },
8429
+ {
8430
+ type: "integer"
8431
+ }
8432
+ ]
8467
8433
  }
8468
8434
  },
8469
8435
  required: [
@@ -8800,7 +8766,7 @@ var openapi_default = {
8800
8766
  "/api/v1/contacts/{contact}/message": {
8801
8767
  post: {
8802
8768
  operationId: "conversation.sendMessage",
8803
- description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale, pero queda en el historial del contacto un mensaje con estado de error que lleva tu `client_reference`. Detalle en \xABErrores y l\xEDmites\xBB.",
8769
+ description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale y no se guarda ning\xFAn mensaje ni tu `client_reference`: no queda nada en el historial del contacto. Detalle en \xABErrores y l\xEDmites\xBB.",
8804
8770
  summary: "Mandar un mensaje a un contacto",
8805
8771
  tags: [
8806
8772
  "Atender una conversaci\xF3n"
@@ -8878,6 +8844,37 @@ var openapi_default = {
8878
8844
  "404": {
8879
8845
  $ref: "#/components/responses/ConversationsModelNotFoundException"
8880
8846
  },
8847
+ "415": {
8848
+ description: "Unsupported Media Type",
8849
+ content: {
8850
+ "application/json": {
8851
+ schema: {
8852
+ type: "object",
8853
+ properties: {
8854
+ error: {
8855
+ type: "string",
8856
+ enum: [
8857
+ "bad_request"
8858
+ ]
8859
+ },
8860
+ message: {
8861
+ type: "string"
8862
+ },
8863
+ supported_file_types: {
8864
+ type: "array",
8865
+ items: {
8866
+ type: "string"
8867
+ }
8868
+ }
8869
+ },
8870
+ required: [
8871
+ "error",
8872
+ "message"
8873
+ ]
8874
+ }
8875
+ }
8876
+ }
8877
+ },
8881
8878
  "422": {
8882
8879
  description: "Unprocessable Content",
8883
8880
  content: {
@@ -9001,7 +8998,7 @@ var openapi_default = {
9001
8998
  properties: {
9002
8999
  error: {
9003
9000
  type: "string",
9004
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
9001
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
9005
9002
  examples: [
9006
9003
  "internal_error"
9007
9004
  ]
@@ -9574,14 +9571,7 @@ var openapi_default = {
9574
9571
  },
9575
9572
  responses: {
9576
9573
  "200": {
9577
- description: "OK",
9578
- content: {
9579
- "application/json": {
9580
- schema: {
9581
- type: "object"
9582
- }
9583
- }
9584
- }
9574
+ description: "OK"
9585
9575
  },
9586
9576
  "401": {
9587
9577
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -11687,14 +11677,7 @@ var openapi_default = {
11687
11677
  },
11688
11678
  responses: {
11689
11679
  "200": {
11690
- description: "OK",
11691
- content: {
11692
- "application/json": {
11693
- schema: {
11694
- type: "object"
11695
- }
11696
- }
11697
- }
11680
+ description: "OK"
11698
11681
  },
11699
11682
  "401": {
11700
11683
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -11757,14 +11740,7 @@ var openapi_default = {
11757
11740
  ],
11758
11741
  responses: {
11759
11742
  "200": {
11760
- description: "OK",
11761
- content: {
11762
- "application/json": {
11763
- schema: {
11764
- type: "object"
11765
- }
11766
- }
11767
- }
11743
+ description: "OK"
11768
11744
  },
11769
11745
  "401": {
11770
11746
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -12053,7 +12029,7 @@ var openapi_default = {
12053
12029
  properties: {
12054
12030
  error: {
12055
12031
  type: "string",
12056
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
12032
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
12057
12033
  examples: [
12058
12034
  "internal_error"
12059
12035
  ]
@@ -13978,6 +13954,16 @@ var openapi_default = {
13978
13954
  tags: [
13979
13955
  "Puntaje"
13980
13956
  ],
13957
+ requestBody: {
13958
+ required: true,
13959
+ content: {
13960
+ "application/json": {
13961
+ schema: {
13962
+ $ref: "#/components/schemas/UpdateLeadScoreSettingsRequest"
13963
+ }
13964
+ }
13965
+ }
13966
+ },
13981
13967
  responses: {
13982
13968
  "200": {
13983
13969
  description: "OK",
@@ -14110,9 +14096,6 @@ var openapi_default = {
14110
14096
  "application/json": {
14111
14097
  schema: {
14112
14098
  anyOf: [
14113
- {
14114
- type: "string"
14115
- },
14116
14099
  {
14117
14100
  type: "object",
14118
14101
  properties: {
@@ -14120,39 +14103,28 @@ var openapi_default = {
14120
14103
  type: "boolean"
14121
14104
  },
14122
14105
  unlimited: {
14123
- type: "string"
14106
+ type: "boolean"
14124
14107
  },
14125
14108
  current_count: {
14126
- type: "integer",
14127
- const: 0
14109
+ type: "integer"
14128
14110
  },
14129
14111
  limit: {
14130
14112
  type: [
14131
14113
  "integer",
14132
14114
  "null"
14133
- ],
14134
- enum: [
14135
- 0,
14136
- null
14137
14115
  ]
14138
14116
  },
14139
14117
  remaining: {
14140
14118
  type: [
14141
14119
  "integer",
14142
14120
  "null"
14143
- ],
14144
- enum: [
14145
- 0,
14146
- null
14147
14121
  ]
14148
14122
  },
14149
14123
  usage_percentage: {
14150
- type: "integer",
14151
- const: 0
14124
+ type: "integer"
14152
14125
  },
14153
14126
  state: {
14154
- type: "string",
14155
- const: "normal"
14127
+ type: "string"
14156
14128
  },
14157
14129
  grace: {
14158
14130
  type: "null"
@@ -14172,6 +14144,159 @@ var openapi_default = {
14172
14144
  "grace",
14173
14145
  "period_start"
14174
14146
  ]
14147
+ },
14148
+ {
14149
+ type: "object",
14150
+ properties: {
14151
+ mac_count: {
14152
+ type: "integer"
14153
+ },
14154
+ mac_limit: {
14155
+ type: [
14156
+ "integer",
14157
+ "null"
14158
+ ]
14159
+ },
14160
+ cycle_capacity: {
14161
+ type: [
14162
+ "integer",
14163
+ "null"
14164
+ ]
14165
+ },
14166
+ accumulated_available: {
14167
+ type: [
14168
+ "integer",
14169
+ "null"
14170
+ ]
14171
+ },
14172
+ total_available: {
14173
+ type: [
14174
+ "integer",
14175
+ "null"
14176
+ ]
14177
+ },
14178
+ usage_percentage: {
14179
+ type: "number"
14180
+ },
14181
+ enforcement_enabled: {
14182
+ type: "boolean"
14183
+ },
14184
+ alert_level: {
14185
+ type: [
14186
+ "string",
14187
+ "null"
14188
+ ]
14189
+ },
14190
+ expiring_buckets: {
14191
+ type: "array",
14192
+ items: {
14193
+ type: "object",
14194
+ properties: {
14195
+ amount: {
14196
+ type: "integer"
14197
+ },
14198
+ expires_in_days: {
14199
+ type: "integer"
14200
+ }
14201
+ },
14202
+ required: [
14203
+ "amount",
14204
+ "expires_in_days"
14205
+ ]
14206
+ }
14207
+ },
14208
+ buckets: {
14209
+ type: "array",
14210
+ items: {
14211
+ type: "object",
14212
+ properties: {
14213
+ source: {
14214
+ type: "string"
14215
+ },
14216
+ macs_remaining: {
14217
+ type: "integer"
14218
+ },
14219
+ expires_at: {
14220
+ type: "string"
14221
+ }
14222
+ },
14223
+ required: [
14224
+ "source",
14225
+ "macs_remaining",
14226
+ "expires_at"
14227
+ ]
14228
+ }
14229
+ },
14230
+ state: {
14231
+ type: "string"
14232
+ },
14233
+ grace: {
14234
+ type: [
14235
+ "object",
14236
+ "null"
14237
+ ],
14238
+ properties: {
14239
+ grace_period_id: {
14240
+ type: [
14241
+ "integer",
14242
+ "null"
14243
+ ]
14244
+ },
14245
+ started_at: {
14246
+ type: [
14247
+ "string",
14248
+ "null"
14249
+ ]
14250
+ },
14251
+ expires_at: {
14252
+ type: [
14253
+ "string",
14254
+ "null"
14255
+ ]
14256
+ },
14257
+ seconds_remaining: {
14258
+ type: "integer"
14259
+ },
14260
+ end_reason: {
14261
+ type: [
14262
+ "string",
14263
+ "null"
14264
+ ]
14265
+ }
14266
+ },
14267
+ required: [
14268
+ "grace_period_id",
14269
+ "started_at",
14270
+ "expires_at",
14271
+ "seconds_remaining",
14272
+ "end_reason"
14273
+ ]
14274
+ },
14275
+ unlimited: {
14276
+ type: "boolean"
14277
+ },
14278
+ workspace_id: {
14279
+ type: "integer"
14280
+ },
14281
+ inactive_contacts_count: {
14282
+ type: "integer"
14283
+ }
14284
+ },
14285
+ required: [
14286
+ "mac_count",
14287
+ "mac_limit",
14288
+ "cycle_capacity",
14289
+ "accumulated_available",
14290
+ "total_available",
14291
+ "usage_percentage",
14292
+ "enforcement_enabled",
14293
+ "alert_level",
14294
+ "expiring_buckets",
14295
+ "buckets",
14296
+ "state",
14297
+ "grace",
14298
+ "unlimited"
14299
+ ]
14175
14300
  }
14176
14301
  ]
14177
14302
  }
@@ -14680,7 +14805,7 @@ var openapi_default = {
14680
14805
  "/api/v1/message/send-message": {
14681
14806
  post: {
14682
14807
  operationId: "message.sendMessage",
14683
- description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nIndica a qui\xE9n env\xEDas con `phone`: el tel\xE9fono con c\xF3digo de pa\xEDs, por ejemplo `5491122334455`. No hace falta crear el contacto antes: si ese tel\xE9fono todav\xEDa no es un contacto de tu cuenta, se crea en el workspace de tu clave, igual que con `POST /contacts/update-or-create` y con el mismo permiso, que **Enviar** ya incluye. La respuesta trae su id en `message.contact_id`, el mismo que llevan los eventos `message.status_changed`. Si el tel\xE9fono no es v\xE1lido, o ya es un contacto de otro workspace de tu cuenta, la respuesta es la misma que dar\xEDa `POST /contacts/update-or-create`: 422, o 404 sin datos de ese contacto. Con un n\xFAmero oficial de WhatsApp (API Cloud) tambi\xE9n puedes indicar `whatsapp_id`, el BSUID que env\xEDa Meta (por ejemplo `US.13491208655302741918`), en lugar de `phone`; usado as\xED con un n\xFAmero conectado por QR, responde 422. En un n\xFAmero oficial, el primer mensaje a un contacto nuevo tiene que ser una plantilla: un mensaje libre solo sale dentro de las 24 horas desde que el contacto te escribi\xF3. Si ya tienes el `contact_id`, puedes seguir envi\xE1ndolo: si junto con \xE9l mandas `phone` o `whatsapp_id`, tienen que ser de ese mismo contacto (si no, 422 `recipient_mismatch`). En `send-template`, `phone` o `whatsapp_id` va siempre, con o sin `contact_id`.\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale, pero queda en el historial del contacto un mensaje con estado de error que lleva tu `client_reference`. Detalle en \xABErrores y l\xEDmites\xBB.",
14808
+ description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Enviar**\n\nIndica a qui\xE9n env\xEDas con `phone`: el tel\xE9fono con c\xF3digo de pa\xEDs, por ejemplo `5491122334455`. No hace falta crear el contacto antes: si ese tel\xE9fono todav\xEDa no es un contacto de tu cuenta, se crea en el workspace de tu clave, igual que con `POST /contacts/update-or-create` y con el mismo permiso, que **Enviar** ya incluye. La respuesta trae su id en `message.contact_id`, el mismo que llevan los eventos `message.status_changed`. Si el tel\xE9fono no es v\xE1lido, o ya es un contacto de otro workspace de tu cuenta, la respuesta es la misma que dar\xEDa `POST /contacts/update-or-create`: 422, o 404 sin datos de ese contacto. Con un n\xFAmero oficial de WhatsApp (API Cloud) tambi\xE9n puedes indicar `whatsapp_id`, el BSUID que env\xEDa Meta (por ejemplo `US.13491208655302741918`), en lugar de `phone`; usado as\xED con un n\xFAmero conectado por QR, responde 422. En un n\xFAmero oficial, el primer mensaje a un contacto nuevo tiene que ser una plantilla: un mensaje libre solo sale dentro de las 24 horas desde que el contacto te escribi\xF3. Si ya tienes el `contact_id`, puedes seguir envi\xE1ndolo: si junto con \xE9l mandas `phone` o `whatsapp_id`, tienen que ser de ese mismo contacto (si no, 422 `recipient_mismatch`). En `send-template`, `phone` o `whatsapp_id` va siempre, con o sin `contact_id`.\n\nSi el l\xEDmite de contactos activos (MAC) frena el env\xEDo, responde `429` con `error` = `mac_lockout_24h` o `mac_limit_reached` y sin `Retry-After`: reintentar no sirve hasta que sumes capacidad o empiece un ciclo nuevo. El env\xEDo no sale y no se guarda ning\xFAn mensaje ni tu `client_reference`: no queda nada en el historial del contacto. Detalle en \xABErrores y l\xEDmites\xBB.",
14684
14809
  summary: "Mandar un mensaje",
14685
14810
  tags: [
14686
14811
  "Mensajes"
@@ -14750,36 +14875,58 @@ var openapi_default = {
14750
14875
  content: {
14751
14876
  "application/json": {
14752
14877
  schema: {
14753
- anyOf: [
14754
- {
14755
- type: "object",
14756
- properties: {
14757
- status: {
14758
- type: "string",
14759
- enum: [
14760
- "error"
14761
- ]
14762
- },
14763
- error: {
14764
- type: "string"
14765
- }
14766
- },
14767
- required: [
14768
- "status",
14769
- "error"
14878
+ type: "object",
14879
+ properties: {
14880
+ error: {
14881
+ type: "string",
14882
+ enum: [
14883
+ "not_found"
14770
14884
  ]
14771
14885
  },
14772
- {
14773
- type: "object",
14774
- properties: {
14775
- message: {
14776
- type: "string"
14777
- }
14778
- },
14779
- required: [
14780
- "message"
14886
+ message: {
14887
+ type: "string"
14888
+ },
14889
+ status: {
14890
+ type: "string",
14891
+ enum: [
14892
+ "error"
14893
+ ]
14894
+ }
14895
+ },
14896
+ required: [
14897
+ "error",
14898
+ "message"
14899
+ ]
14900
+ }
14901
+ }
14902
+ }
14903
+ },
14904
+ "415": {
14905
+ description: "Unsupported Media Type",
14906
+ content: {
14907
+ "application/json": {
14908
+ schema: {
14909
+ type: "object",
14910
+ properties: {
14911
+ error: {
14912
+ type: "string",
14913
+ enum: [
14914
+ "bad_request"
14781
14915
  ]
14916
+ },
14917
+ message: {
14918
+ type: "string"
14919
+ },
14920
+ supported_file_types: {
14921
+ type: "array",
14922
+ items: {
14923
+ type: "string"
14924
+ }
14782
14925
  }
14926
+ },
14927
+ required: [
14928
+ "error",
14929
+ "message"
14783
14930
  ]
14784
14931
  }
14785
14932
  }
@@ -14908,7 +15055,7 @@ var openapi_default = {
14908
15055
  properties: {
14909
15056
  error: {
14910
15057
  type: "string",
14911
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
15058
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
14912
15059
  examples: [
14913
15060
  "internal_error"
14914
15061
  ]
@@ -15247,6 +15394,12 @@ var openapi_default = {
15247
15394
  {
15248
15395
  type: "object",
15249
15396
  properties: {
15397
+ error: {
15398
+ type: "string",
15399
+ examples: [
15400
+ "validation_failed"
15401
+ ]
15402
+ },
15250
15403
  message: {
15251
15404
  type: "string"
15252
15405
  },
@@ -15255,6 +15408,7 @@ var openapi_default = {
15255
15408
  }
15256
15409
  },
15257
15410
  required: [
15411
+ "error",
15258
15412
  "message",
15259
15413
  "errors"
15260
15414
  ]
@@ -15801,31 +15955,21 @@ var openapi_default = {
15801
15955
  content: {
15802
15956
  "application/json": {
15803
15957
  schema: {
15804
- anyOf: [
15805
- {
15806
- type: "object",
15807
- properties: {
15808
- error: {
15809
- type: "string",
15810
- const: "Approved templates can be edited up to 10 times in a 30-day period or once in a 24-hour period."
15811
- }
15812
- },
15813
- required: [
15814
- "error"
15958
+ type: "object",
15959
+ properties: {
15960
+ error: {
15961
+ type: "string",
15962
+ enum: [
15963
+ "bad_request"
15815
15964
  ]
15816
15965
  },
15817
- {
15818
- type: "object",
15819
- properties: {
15820
- error: {
15821
- type: "string",
15822
- const: "Templates with pending status cannot be updated."
15823
- }
15824
- },
15825
- required: [
15826
- "error"
15827
- ]
15966
+ message: {
15967
+ type: "string"
15828
15968
  }
15969
+ },
15970
+ required: [
15971
+ "error",
15972
+ "message"
15829
15973
  ]
15830
15974
  }
15831
15975
  }
@@ -16263,50 +16407,22 @@ var openapi_default = {
16263
16407
  content: {
16264
16408
  "application/json": {
16265
16409
  schema: {
16266
- anyOf: [
16267
- {
16268
- type: "object",
16269
- properties: {
16270
- error: {
16271
- type: "string",
16272
- enum: [
16273
- "template_not_found"
16274
- ]
16275
- },
16276
- message: {
16277
- type: "string"
16278
- }
16279
- },
16280
- required: [
16281
- "error",
16282
- "message"
16283
- ]
16284
- },
16285
- {
16286
- type: "object",
16287
- properties: {
16288
- error: {
16289
- type: "string",
16290
- enum: [
16291
- "Contact not found"
16292
- ]
16293
- }
16294
- },
16295
- required: [
16296
- "error"
16410
+ type: "object",
16411
+ properties: {
16412
+ error: {
16413
+ type: "string",
16414
+ enum: [
16415
+ "template_not_found",
16416
+ "not_found"
16297
16417
  ]
16298
16418
  },
16299
- {
16300
- type: "object",
16301
- properties: {
16302
- message: {
16303
- type: "string"
16304
- }
16305
- },
16306
- required: [
16307
- "message"
16308
- ]
16419
+ message: {
16420
+ type: "string"
16309
16421
  }
16422
+ },
16423
+ required: [
16424
+ "error",
16425
+ "message"
16310
16426
  ]
16311
16427
  }
16312
16428
  }
@@ -16415,6 +16531,24 @@ var openapi_default = {
16415
16531
  "placeholders",
16416
16532
  "count"
16417
16533
  ]
16534
+ },
16535
+ {
16536
+ type: "object",
16537
+ properties: {
16538
+ error: {
16539
+ type: "string",
16540
+ enum: [
16541
+ "template_waba_mismatch"
16542
+ ]
16543
+ },
16544
+ message: {
16545
+ type: "string"
16546
+ }
16547
+ },
16548
+ required: [
16549
+ "error",
16550
+ "message"
16551
+ ]
16418
16552
  }
16419
16553
  ]
16420
16554
  }
@@ -16463,7 +16597,7 @@ var openapi_default = {
16463
16597
  properties: {
16464
16598
  error: {
16465
16599
  type: "string",
16466
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
16600
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
16467
16601
  examples: [
16468
16602
  "internal_error"
16469
16603
  ]
@@ -16554,6 +16688,63 @@ var openapi_default = {
16554
16688
  },
16555
16689
  "404": {
16556
16690
  $ref: "#/components/responses/ConversationsModelNotFoundException"
16691
+ },
16692
+ "422": {
16693
+ description: "Unprocessable Content",
16694
+ content: {
16695
+ "application/json": {
16696
+ schema: {
16697
+ type: "object",
16698
+ properties: {
16699
+ error: {
16700
+ type: "string",
16701
+ enum: [
16702
+ "number_not_connected_to_meta",
16703
+ "meta_rejected"
16704
+ ]
16705
+ },
16706
+ message: {
16707
+ type: "string"
16708
+ },
16709
+ meta_code: {
16710
+ type: [
16711
+ "integer",
16712
+ "null"
16713
+ ]
16714
+ }
16715
+ },
16716
+ required: [
16717
+ "error",
16718
+ "message"
16719
+ ]
16720
+ }
16721
+ }
16722
+ }
16723
+ },
16724
+ "502": {
16725
+ description: "Bad Gateway",
16726
+ content: {
16727
+ "application/json": {
16728
+ schema: {
16729
+ type: "object",
16730
+ properties: {
16731
+ error: {
16732
+ type: "string",
16733
+ enum: [
16734
+ "meta_unavailable"
16735
+ ]
16736
+ },
16737
+ message: {
16738
+ type: "string"
16739
+ }
16740
+ },
16741
+ required: [
16742
+ "error",
16743
+ "message"
16744
+ ]
16745
+ }
16746
+ }
16747
+ }
16557
16748
  }
16558
16749
  },
16559
16750
  "x-fc-permission": "conversations:write",
@@ -18336,14 +18527,7 @@ var openapi_default = {
18336
18527
  },
18337
18528
  responses: {
18338
18529
  "200": {
18339
- description: "OK",
18340
- content: {
18341
- "application/json": {
18342
- schema: {
18343
- type: "object"
18344
- }
18345
- }
18346
- }
18530
+ description: "OK"
18347
18531
  },
18348
18532
  "400": {
18349
18533
  description: "Bad Request",
@@ -18680,14 +18864,7 @@ var openapi_default = {
18680
18864
  },
18681
18865
  responses: {
18682
18866
  "200": {
18683
- description: "OK",
18684
- content: {
18685
- "application/json": {
18686
- schema: {
18687
- type: "object"
18688
- }
18689
- }
18690
- }
18867
+ description: "OK"
18691
18868
  },
18692
18869
  "401": {
18693
18870
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -18775,21 +18952,14 @@ var openapi_default = {
18775
18952
  content: {
18776
18953
  "application/json": {
18777
18954
  schema: {
18778
- anyOf: [
18779
- {
18780
- type: "object",
18781
- properties: {
18782
- data: {
18783
- $ref: "#/components/schemas/TemplateMetricsResource"
18784
- }
18785
- },
18786
- required: [
18787
- "data"
18788
- ]
18789
- },
18790
- {
18791
- type: "object"
18955
+ type: "object",
18956
+ properties: {
18957
+ data: {
18958
+ $ref: "#/components/schemas/TemplateMetricsResource"
18792
18959
  }
18960
+ },
18961
+ required: [
18962
+ "data"
18793
18963
  ]
18794
18964
  }
18795
18965
  }
@@ -19765,14 +19935,7 @@ var openapi_default = {
19765
19935
  content: {
19766
19936
  "application/json": {
19767
19937
  schema: {
19768
- anyOf: [
19769
- {
19770
- $ref: "#/components/schemas/UserResource"
19771
- },
19772
- {
19773
- type: "object"
19774
- }
19775
- ]
19938
+ $ref: "#/components/schemas/UserResource"
19776
19939
  }
19777
19940
  }
19778
19941
  }
@@ -22064,15 +22227,7 @@ var openapi_default = {
22064
22227
  ],
22065
22228
  responses: {
22066
22229
  "204": {
22067
- description: "No Content",
22068
- content: {
22069
- "application/json": {
22070
- schema: {
22071
- type: "array",
22072
- items: {}
22073
- }
22074
- }
22075
- }
22230
+ description: "No Content"
22076
22231
  },
22077
22232
  "401": {
22078
22233
  $ref: "#/components/responses/ConversationsAuthenticationException"
@@ -22365,72 +22520,174 @@ var openapi_default = {
22365
22520
  responses: {
22366
22521
  "200": {
22367
22522
  description: "OK",
22368
- content: {
22369
- "application/json": {
22370
- schema: {
22371
- type: "string"
22372
- }
22373
- }
22374
- }
22375
- },
22376
- "401": {
22377
- $ref: "#/components/responses/ConversationsAuthenticationException"
22378
- },
22379
- "402": {
22380
- description: "Payment Required",
22381
22523
  content: {
22382
22524
  "application/json": {
22383
22525
  schema: {
22384
22526
  type: "object",
22385
22527
  properties: {
22386
- error: {
22387
- type: "string",
22388
- enum: [
22389
- "payment_required"
22390
- ]
22528
+ data: {
22529
+ $ref: "#/components/schemas/WhatsappFormResource"
22391
22530
  },
22392
- message: {
22393
- type: "string"
22531
+ created: {
22532
+ type: "boolean"
22533
+ },
22534
+ lint: {
22535
+ type: "array",
22536
+ items: {}
22537
+ },
22538
+ numbers: {
22539
+ type: "array",
22540
+ prefixItems: [
22541
+ {
22542
+ type: "object",
22543
+ properties: {
22544
+ device_id: {},
22545
+ primary: {
22546
+ type: "boolean"
22547
+ },
22548
+ status: {
22549
+ type: "string"
22550
+ },
22551
+ error: {
22552
+ type: "string"
22553
+ }
22554
+ },
22555
+ required: [
22556
+ "device_id",
22557
+ "primary",
22558
+ "status",
22559
+ "error"
22560
+ ]
22561
+ }
22562
+ ],
22563
+ minItems: 1,
22564
+ maxItems: 1
22394
22565
  }
22395
22566
  },
22396
22567
  required: [
22397
- "error",
22398
- "message"
22568
+ "data",
22569
+ "created",
22570
+ "lint",
22571
+ "numbers"
22399
22572
  ]
22400
22573
  }
22401
22574
  }
22402
22575
  }
22403
22576
  },
22404
- "403": {
22405
- $ref: "#/components/responses/ConversationsAuthorizationException"
22406
- }
22407
- },
22408
- "x-fc-permission": "conversations:write",
22409
- "x-fc-proposito": "\xDAsalo para cambiar un formulario ya publicado: crea un borrador nuevo a partir de esa versi\xF3n, que editas y publicas sin cambiar el `form_id` con el que lo mandas.",
22410
- "x-fc-domain": "conversations"
22411
- }
22412
- },
22413
- "/api/v1/forms/{id}/sync": {
22414
- post: {
22415
- operationId: "whatsappForm.sync",
22416
- description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Editar**\n\nValida una versi\xF3n en Meta sin publicarla. `{id}` es el `id` de la versi\xF3n. Responde la versi\xF3n con `lint` y lo que Meta observ\xF3. Si Meta rechaza la llamada responde 502 `META`, o 422 `META` si la rechaza porque tu cuenta de WhatsApp Business no cumple sus requisitos de integridad. Responde 404 si no existe o no es de tu cuenta. Puedes llamarla hasta 30 veces por minuto.",
22417
- summary: "Sincronizar un formulario",
22418
- tags: [
22419
- "Formularios"
22420
- ],
22421
- parameters: [
22422
- {
22423
- name: "id",
22424
- in: "path",
22425
- required: true,
22426
- schema: {
22427
- type: "integer"
22428
- }
22429
- }
22430
- ],
22431
- responses: {
22432
- "200": {
22433
- description: "OK",
22577
+ "201": {
22578
+ description: "Created",
22579
+ content: {
22580
+ "application/json": {
22581
+ schema: {
22582
+ type: "object",
22583
+ properties: {
22584
+ data: {
22585
+ $ref: "#/components/schemas/WhatsappFormResource"
22586
+ },
22587
+ created: {
22588
+ type: "boolean"
22589
+ },
22590
+ lint: {
22591
+ type: "array",
22592
+ items: {}
22593
+ },
22594
+ numbers: {
22595
+ type: "array",
22596
+ prefixItems: [
22597
+ {
22598
+ type: "object",
22599
+ properties: {
22600
+ device_id: {},
22601
+ primary: {
22602
+ type: "boolean"
22603
+ },
22604
+ status: {
22605
+ type: "string"
22606
+ },
22607
+ error: {
22608
+ type: "string"
22609
+ }
22610
+ },
22611
+ required: [
22612
+ "device_id",
22613
+ "primary",
22614
+ "status",
22615
+ "error"
22616
+ ]
22617
+ }
22618
+ ],
22619
+ minItems: 1,
22620
+ maxItems: 1
22621
+ }
22622
+ },
22623
+ required: [
22624
+ "data",
22625
+ "created",
22626
+ "lint",
22627
+ "numbers"
22628
+ ]
22629
+ }
22630
+ }
22631
+ }
22632
+ },
22633
+ "401": {
22634
+ $ref: "#/components/responses/ConversationsAuthenticationException"
22635
+ },
22636
+ "402": {
22637
+ description: "Payment Required",
22638
+ content: {
22639
+ "application/json": {
22640
+ schema: {
22641
+ type: "object",
22642
+ properties: {
22643
+ error: {
22644
+ type: "string",
22645
+ enum: [
22646
+ "payment_required"
22647
+ ]
22648
+ },
22649
+ message: {
22650
+ type: "string"
22651
+ }
22652
+ },
22653
+ required: [
22654
+ "error",
22655
+ "message"
22656
+ ]
22657
+ }
22658
+ }
22659
+ }
22660
+ },
22661
+ "403": {
22662
+ $ref: "#/components/responses/ConversationsAuthorizationException"
22663
+ }
22664
+ },
22665
+ "x-fc-permission": "conversations:write",
22666
+ "x-fc-proposito": "\xDAsalo para cambiar un formulario ya publicado: crea un borrador nuevo a partir de esa versi\xF3n, que editas y publicas sin cambiar el `form_id` con el que lo mandas.",
22667
+ "x-fc-domain": "conversations"
22668
+ }
22669
+ },
22670
+ "/api/v1/forms/{id}/sync": {
22671
+ post: {
22672
+ operationId: "whatsappForm.sync",
22673
+ description: "**Permiso requerido:** **Contactos y conversaciones \u2192 Editar**\n\nValida una versi\xF3n en Meta sin publicarla. `{id}` es el `id` de la versi\xF3n. Responde la versi\xF3n con `lint` y lo que Meta observ\xF3. Si Meta rechaza la llamada responde 502 `META`, o 422 `META` si la rechaza porque tu cuenta de WhatsApp Business no cumple sus requisitos de integridad. Responde 404 si no existe o no es de tu cuenta. Puedes llamarla hasta 30 veces por minuto.",
22674
+ summary: "Sincronizar un formulario",
22675
+ tags: [
22676
+ "Formularios"
22677
+ ],
22678
+ parameters: [
22679
+ {
22680
+ name: "id",
22681
+ in: "path",
22682
+ required: true,
22683
+ schema: {
22684
+ type: "integer"
22685
+ }
22686
+ }
22687
+ ],
22688
+ responses: {
22689
+ "200": {
22690
+ description: "OK",
22434
22691
  content: {
22435
22692
  "application/json": {
22436
22693
  schema: {
@@ -22968,36 +23225,22 @@ var openapi_default = {
22968
23225
  content: {
22969
23226
  "application/json": {
22970
23227
  schema: {
22971
- anyOf: [
22972
- {
22973
- type: "object",
22974
- properties: {
22975
- error: {
22976
- type: "string",
22977
- enum: [
22978
- "form_not_found"
22979
- ]
22980
- },
22981
- message: {
22982
- type: "string"
22983
- }
22984
- },
22985
- required: [
22986
- "error",
22987
- "message"
23228
+ type: "object",
23229
+ properties: {
23230
+ error: {
23231
+ type: "string",
23232
+ enum: [
23233
+ "form_not_found",
23234
+ "not_found"
22988
23235
  ]
22989
23236
  },
22990
- {
22991
- type: "object",
22992
- properties: {
22993
- message: {
22994
- type: "string"
22995
- }
22996
- },
22997
- required: [
22998
- "message"
22999
- ]
23237
+ message: {
23238
+ type: "string"
23000
23239
  }
23240
+ },
23241
+ required: [
23242
+ "error",
23243
+ "message"
23001
23244
  ]
23002
23245
  }
23003
23246
  }
@@ -23131,7 +23374,7 @@ var openapi_default = {
23131
23374
  properties: {
23132
23375
  error: {
23133
23376
  type: "string",
23134
- description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
23377
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar. Con este status, el portero tambi\xE9n puede devolver `gate_misconfigured`.",
23135
23378
  examples: [
23136
23379
  "internal_error"
23137
23380
  ]
@@ -25278,6 +25521,61 @@ var openapi_default = {
25278
25521
  "401": {
25279
25522
  $ref: "#/components/responses/CommunitiesAuthenticationException"
25280
25523
  },
25524
+ "402": {
25525
+ description: "La cuenta lleg\xF3 al tope de grupos oficiales de su plan. No se registra ninguna acci\xF3n.",
25526
+ content: {
25527
+ "application/json": {
25528
+ schema: {
25529
+ type: "object",
25530
+ properties: {
25531
+ error: {
25532
+ type: "string",
25533
+ description: "C\xF3digo estable del error: es lo que se compara. `message` es para personas y puede cambiar.",
25534
+ enum: [
25535
+ "plan_cap_reached"
25536
+ ]
25537
+ },
25538
+ message: {
25539
+ type: "string",
25540
+ examples: [
25541
+ "Alcanzaste el l\xEDmite de tu plan."
25542
+ ]
25543
+ },
25544
+ feature: {
25545
+ type: "string",
25546
+ description: "La funci\xF3n del plan que tiene el tope.",
25547
+ examples: [
25548
+ "cloud_api_groups"
25549
+ ]
25550
+ },
25551
+ parameter: {
25552
+ type: "string",
25553
+ description: "El tope que se alcanz\xF3: grupos oficiales creados.",
25554
+ examples: [
25555
+ "cloud_api_groups_created"
25556
+ ]
25557
+ },
25558
+ cap: {
25559
+ type: "integer",
25560
+ description: "El tope del plan."
25561
+ },
25562
+ used: {
25563
+ type: "integer",
25564
+ description: "Lo que la cuenta ya us\xF3 de ese tope."
25565
+ }
25566
+ },
25567
+ required: [
25568
+ "error",
25569
+ "message",
25570
+ "feature",
25571
+ "parameter",
25572
+ "cap",
25573
+ "used"
25574
+ ]
25575
+ }
25576
+ }
25577
+ }
25578
+ },
25281
25579
  "403": {
25282
25580
  $ref: "#/components/responses/CommunitiesAuthorizationException"
25283
25581
  },
@@ -26519,14 +26817,14 @@ var openapi_default = {
26519
26817
  ],
26520
26818
  responses: {
26521
26819
  "200": {
26522
- description: "The action.",
26820
+ description: "El estado de la acci\xF3n y, si termin\xF3 `completed`, su resultado.",
26523
26821
  content: {
26524
26822
  "application/json": {
26525
26823
  schema: {
26526
26824
  type: "object",
26527
26825
  properties: {
26528
26826
  data: {
26529
- $ref: "#/components/schemas/PendingGroupAction"
26827
+ $ref: "#/components/schemas/ApiGroupActionResource"
26530
26828
  }
26531
26829
  },
26532
26830
  required: [
@@ -26545,9 +26843,7 @@ var openapi_default = {
26545
26843
  },
26546
26844
  "x-fc-proposito": "Sirve para saber c\xF3mo termin\xF3 lo que le pediste a un grupo, como mandarle un mensaje: si sigue en cola, se est\xE1 haciendo, termin\xF3 o fall\xF3, y su resultado.",
26547
26845
  "x-fc-domain": "communities",
26548
- "x-fc-permission": "communities:read",
26549
- "x-fc-pending": "communities-group-action",
26550
- "x-fc-pending-response": "communities-group-action"
26846
+ "x-fc-permission": "communities:read"
26551
26847
  }
26552
26848
  },
26553
26849
  "/api/v1/groups/{group}/participants": {
@@ -26823,7 +27119,7 @@ var openapi_default = {
26823
27119
  "/api/v1/groups/{group}/description": {
26824
27120
  put: {
26825
27121
  operationId: "apiGroupAction.updateDescription",
26826
- description: "**Permiso requerido:** **Grupos y campa\xF1as \u2192 Administrar grupos**\n\n**Nota:** As\xEDncrona: responde 202 con `action_id`; consulta el resultado en `GET /groups/actions/{action}`. Hasta 2048 caracteres; una descripci\xF3n vac\xEDa la borra. Se ejecuta al ritmo de las campa\xF1as del n\xFAmero.",
27122
+ description: "**Permiso requerido:** **Grupos y campa\xF1as \u2192 Administrar grupos**\n\n**Nota:** As\xEDncrona: responde 202 con `action_id`; consulta el resultado en `GET /groups/actions/{action}`. Hasta 2048 caracteres. Con un n\xFAmero QR, una descripci\xF3n vac\xEDa la borra; con un n\xFAmero oficial responde `422 validation_failed`, porque WhatsApp no permite borrar la descripci\xF3n de un grupo oficial. Se ejecuta al ritmo de las campa\xF1as del n\xFAmero.",
26827
27123
  summary: "Cambiar la descripci\xF3n de un grupo",
26828
27124
  tags: [
26829
27125
  "Acciones de grupo"
@@ -34544,19 +34840,22 @@ var openapi_default = {
34544
34840
  }
34545
34841
  },
34546
34842
  "400": {
34547
- description: "El n\xFAmero no admite esta edici\xF3n.",
34843
+ description: "El n\xFAmero no admite esta edici\xF3n (`unsupported_provider`).",
34548
34844
  content: {
34549
34845
  "application/json": {
34550
34846
  schema: {
34551
34847
  type: "object",
34552
34848
  properties: {
34553
34849
  error: {
34554
- type: "string",
34555
- const: "Unsupported provider"
34850
+ type: "string"
34851
+ },
34852
+ message: {
34853
+ type: "string"
34556
34854
  }
34557
34855
  },
34558
34856
  required: [
34559
- "error"
34857
+ "error",
34858
+ "message"
34560
34859
  ]
34561
34860
  }
34562
34861
  }
@@ -36712,7 +37011,7 @@ var openapi_default = {
36712
37011
  "/api/v1/devices/{device}/username": {
36713
37012
  get: {
36714
37013
  operationId: "deviceUsername.show",
36715
- description: "**Lectura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Ver**.\n\nLo consulta en Meta; si Meta no devuelve ninguno, responde el \xFAltimo que se reserv\xF3. Solo\npara n\xFAmeros oficiales.",
37014
+ description: "**Lectura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Ver**.\n\nLo consulta en Meta; si Meta no devuelve ninguno, responde el \xFAltimo que se reserv\xF3. Solo\npara n\xFAmeros oficiales. Si Meta rechaza la consulta, la respuesta lleva el mismo c\xF3digo HTTP\nque dio Meta, `error` `meta_error` y el motivo de Meta en `message`.",
36716
37015
  summary: "Ver el nombre de usuario de un n\xFAmero",
36717
37016
  tags: [
36718
37017
  "N\xFAmeros"
@@ -36811,35 +37110,22 @@ var openapi_default = {
36811
37110
  $ref: "#/components/responses/AccountsModelNotFoundException"
36812
37111
  },
36813
37112
  "422": {
36814
- description: "El n\xFAmero no es oficial o no est\xE1 conectado.",
37113
+ description: "El n\xFAmero no es oficial (`device_not_meta`) o todav\xEDa no est\xE1 conectado a Meta (`device_not_ready`).",
36815
37114
  content: {
36816
37115
  "application/json": {
36817
37116
  schema: {
36818
- anyOf: [
36819
- {
36820
- type: "object",
36821
- properties: {
36822
- error: {
36823
- type: "string",
36824
- const: "El dispositivo no tiene credenciales Meta configuradas."
36825
- }
36826
- },
36827
- required: [
36828
- "error"
36829
- ]
37117
+ type: "object",
37118
+ properties: {
37119
+ error: {
37120
+ type: "string"
36830
37121
  },
36831
- {
36832
- type: "object",
36833
- properties: {
36834
- error: {
36835
- type: "string",
36836
- const: "Solo disponible para dispositivos WhatsApp Cloud API."
36837
- }
36838
- },
36839
- required: [
36840
- "error"
36841
- ]
37122
+ message: {
37123
+ type: "string"
36842
37124
  }
37125
+ },
37126
+ required: [
37127
+ "error",
37128
+ "message"
36843
37129
  ]
36844
37130
  }
36845
37131
  }
@@ -36880,11 +37166,23 @@ var openapi_default = {
36880
37166
  }
36881
37167
  },
36882
37168
  "502": {
36883
- description: "Meta no respondi\xF3. Vuelve a intentarlo.",
37169
+ description: "Meta no respondi\xF3 (`provider_error`). Vuelve a intentarlo.",
36884
37170
  content: {
36885
37171
  "application/json": {
36886
37172
  schema: {
36887
- type: "string"
37173
+ type: "object",
37174
+ properties: {
37175
+ error: {
37176
+ type: "string"
37177
+ },
37178
+ message: {
37179
+ type: "string"
37180
+ }
37181
+ },
37182
+ required: [
37183
+ "error",
37184
+ "message"
37185
+ ]
36888
37186
  }
36889
37187
  }
36890
37188
  }
@@ -36898,7 +37196,7 @@ var openapi_default = {
36898
37196
  },
36899
37197
  post: {
36900
37198
  operationId: "deviceUsername.store",
36901
- description: "**Escritura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Editar**.\n\n`username` va de 3 a 35 caracteres: letras min\xFAsculas, n\xFAmeros, puntos y guiones bajos. Se\nreserva en Meta; si Meta lo rechaza (por ejemplo, porque ya est\xE1 tomado), la respuesta\ntrae su motivo en `message`. Solo para n\xFAmeros oficiales.",
37199
+ description: "**Escritura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Editar**.\n\n`username` va de 3 a 35 caracteres: letras min\xFAsculas, n\xFAmeros, puntos y guiones bajos. Se\nreserva en Meta; si Meta lo rechaza (por ejemplo, porque ya est\xE1 tomado), la respuesta\nlleva el mismo c\xF3digo HTTP que dio Meta, `error` `meta_error` y su motivo en `message`. Solo\npara n\xFAmeros oficiales.",
36902
37200
  summary: "Reservar un nombre de usuario",
36903
37201
  tags: [
36904
37202
  "N\xFAmeros"
@@ -37025,35 +37323,22 @@ var openapi_default = {
37025
37323
  $ref: "#/components/responses/AccountsModelNotFoundException"
37026
37324
  },
37027
37325
  "422": {
37028
- description: "El nombre no es v\xE1lido, o el n\xFAmero no es oficial o no est\xE1 conectado.",
37326
+ description: "El nombre no es v\xE1lido (`validation_failed`, con `errors`), el n\xFAmero no es oficial (`device_not_meta`) o todav\xEDa no est\xE1 conectado a Meta (`device_not_ready`).",
37029
37327
  content: {
37030
37328
  "application/json": {
37031
37329
  schema: {
37032
- anyOf: [
37033
- {
37034
- type: "object",
37035
- properties: {
37036
- error: {
37037
- type: "string",
37038
- const: "El dispositivo no tiene credenciales Meta configuradas."
37039
- }
37040
- },
37041
- required: [
37042
- "error"
37043
- ]
37330
+ type: "object",
37331
+ properties: {
37332
+ error: {
37333
+ type: "string"
37044
37334
  },
37045
- {
37046
- type: "object",
37047
- properties: {
37048
- error: {
37049
- type: "string",
37050
- const: "Solo disponible para dispositivos WhatsApp Cloud API."
37051
- }
37052
- },
37053
- required: [
37054
- "error"
37055
- ]
37335
+ message: {
37336
+ type: "string"
37056
37337
  }
37338
+ },
37339
+ required: [
37340
+ "error",
37341
+ "message"
37057
37342
  ]
37058
37343
  }
37059
37344
  }
@@ -37094,11 +37379,23 @@ var openapi_default = {
37094
37379
  }
37095
37380
  },
37096
37381
  "502": {
37097
- description: "Meta no respondi\xF3. Vuelve a intentarlo.",
37382
+ description: "Meta no respondi\xF3 (`provider_error`). Vuelve a intentarlo.",
37098
37383
  content: {
37099
37384
  "application/json": {
37100
37385
  schema: {
37101
- type: "string"
37386
+ type: "object",
37387
+ properties: {
37388
+ error: {
37389
+ type: "string"
37390
+ },
37391
+ message: {
37392
+ type: "string"
37393
+ }
37394
+ },
37395
+ required: [
37396
+ "error",
37397
+ "message"
37398
+ ]
37102
37399
  }
37103
37400
  }
37104
37401
  }
@@ -37114,7 +37411,7 @@ var openapi_default = {
37114
37411
  "/api/v1/devices/{device}/username/suggestions": {
37115
37412
  get: {
37116
37413
  operationId: "deviceUsername.suggestions",
37117
- description: "**Lectura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Ver**.\n\nLas sugerencias que da Meta para ese n\xFAmero. Solo para n\xFAmeros oficiales.",
37414
+ description: "**Lectura** \xB7 requiere **N\xFAmeros de WhatsApp \u2192 Ver**.\n\nLas sugerencias que da Meta para ese n\xFAmero. Solo para n\xFAmeros oficiales. Si Meta rechaza la\nconsulta, la respuesta lleva el mismo c\xF3digo HTTP que dio Meta, `error` `meta_error` y el\nmotivo de Meta en `message`.",
37118
37415
  summary: "Ver nombres de usuario sugeridos",
37119
37416
  tags: [
37120
37417
  "N\xFAmeros"
@@ -37213,35 +37510,22 @@ var openapi_default = {
37213
37510
  $ref: "#/components/responses/AccountsModelNotFoundException"
37214
37511
  },
37215
37512
  "422": {
37216
- description: "El n\xFAmero no es oficial o no est\xE1 conectado.",
37513
+ description: "El n\xFAmero no es oficial (`device_not_meta`) o todav\xEDa no est\xE1 conectado a Meta (`device_not_ready`).",
37217
37514
  content: {
37218
37515
  "application/json": {
37219
37516
  schema: {
37220
- anyOf: [
37221
- {
37222
- type: "object",
37223
- properties: {
37224
- error: {
37225
- type: "string",
37226
- const: "El dispositivo no tiene credenciales Meta configuradas."
37227
- }
37228
- },
37229
- required: [
37230
- "error"
37231
- ]
37517
+ type: "object",
37518
+ properties: {
37519
+ error: {
37520
+ type: "string"
37232
37521
  },
37233
- {
37234
- type: "object",
37235
- properties: {
37236
- error: {
37237
- type: "string",
37238
- const: "Solo disponible para dispositivos WhatsApp Cloud API."
37239
- }
37240
- },
37241
- required: [
37242
- "error"
37243
- ]
37522
+ message: {
37523
+ type: "string"
37244
37524
  }
37525
+ },
37526
+ required: [
37527
+ "error",
37528
+ "message"
37245
37529
  ]
37246
37530
  }
37247
37531
  }
@@ -37282,11 +37566,23 @@ var openapi_default = {
37282
37566
  }
37283
37567
  },
37284
37568
  "502": {
37285
- description: "Meta no respondi\xF3. Vuelve a intentarlo.",
37569
+ description: "Meta no respondi\xF3 (`provider_error`). Vuelve a intentarlo.",
37286
37570
  content: {
37287
37571
  "application/json": {
37288
37572
  schema: {
37289
- type: "string"
37573
+ type: "object",
37574
+ properties: {
37575
+ error: {
37576
+ type: "string"
37577
+ },
37578
+ message: {
37579
+ type: "string"
37580
+ }
37581
+ },
37582
+ required: [
37583
+ "error",
37584
+ "message"
37585
+ ]
37290
37586
  }
37291
37587
  }
37292
37588
  }
@@ -37671,7 +37967,7 @@ var openapi_default = {
37671
37967
  },
37672
37968
  post: {
37673
37969
  operationId: "webhookSubscription.store",
37674
- description: "**Escritura** \xB7 requiere **Avisos (webhooks) \u2192 Administrar**.\n\nCon una clave de API, cada tipo de `events` exige adem\xE1s el permiso\n**N\xFAmeros de WhatsApp \u2192 Ver**, **Contactos y conversaciones \u2192 Ver** o\n**Grupos y campa\xF1as \u2192 Ver**, seg\xFAn su \xE1rea; si falta, 422.",
37970
+ description: "**Escritura** \xB7 requiere **Avisos (webhooks) \u2192 Administrar**.\n\nCon una clave de API, cada tipo de `events` exige adem\xE1s el permiso\n**N\xFAmeros de WhatsApp \u2192 Ver**, **Contactos y conversaciones \u2192 Ver** o\n**Grupos y campa\xF1as \u2192 Ver**, seg\xFAn su \xE1rea; si falta, 422.\n\nHay un tope de 50 suscripciones por workspace (por cuenta, si no usas workspaces), sea\ncual sea su estado: con 50, crear otra responde `422` con `error`\n`webhooks_limit_reached`.\n\nNo acepta `Idempotency-Key`: reintentar una creaci\xF3n que s\xED lleg\xF3 crea otra suscripci\xF3n,\ncon otro secreto.",
37675
37971
  summary: "Crear un webhook",
37676
37972
  tags: [
37677
37973
  "Webhooks"
@@ -38866,7 +39162,7 @@ var openapi_default = {
38866
39162
  ],
38867
39163
  responses: {
38868
39164
  "200": {
38869
- description: "`WhatsAppBusinessAccountResource`",
39165
+ description: "La WABA, con sus n\xFAmeros y su l\xEDmite de mensajes.",
38870
39166
  content: {
38871
39167
  "application/json": {
38872
39168
  schema: {
@@ -40334,7 +40630,7 @@ var openapi_default = {
40334
40630
  post: {
40335
40631
  operationId: "webhook.group_created",
40336
40632
  summary: "group.created",
40337
- description: "Se cre\xF3 o se import\xF3 un grupo dentro de una campa\xF1a de la cuenta.",
40633
+ description: "Se cre\xF3 o se import\xF3 un grupo dentro de una campa\xF1a de la cuenta; `source` vale `imported` si el grupo ya exist\xEDa en WhatsApp y entr\xF3 por una importaci\xF3n o una sincronizaci\xF3n, y `created` en cualquier otro caso.",
40338
40634
  tags: [
40339
40635
  "Webhooks"
40340
40636
  ],
@@ -40404,7 +40700,7 @@ var openapi_default = {
40404
40700
  type: "group"
40405
40701
  },
40406
40702
  campaign: {
40407
- uuid: "00000000-0000-4000-8000-000000000001",
40703
+ uuid: "xK9mQz",
40408
40704
  name: "Campa\xF1a de ejemplo"
40409
40705
  },
40410
40706
  source: "created",
@@ -40519,7 +40815,7 @@ var openapi_default = {
40519
40815
  post: {
40520
40816
  operationId: "webhook.group_blocked",
40521
40817
  summary: "group.blocked",
40522
- description: "Un grupo qued\xF3 inoperable: sin administrador conectado, con el link de invitaci\xF3n inv\xE1lido o suspendido por WhatsApp.",
40818
+ description: "Un grupo de una campa\xF1a qued\xF3 inoperable: sin administrador conectado, con el link de invitaci\xF3n inv\xE1lido o suspendido por WhatsApp; un grupo que no es de una campa\xF1a no lo genera.",
40523
40819
  tags: [
40524
40820
  "Webhooks"
40525
40821
  ],
@@ -40588,7 +40884,7 @@ var openapi_default = {
40588
40884
  name: "Grupo de ejemplo"
40589
40885
  },
40590
40886
  campaign: {
40591
- uuid: "00000000-0000-4000-8000-000000000001"
40887
+ uuid: "xK9mQz"
40592
40888
  },
40593
40889
  reason: "admin_access_lost",
40594
40890
  workspace_id: 37
@@ -40609,7 +40905,7 @@ var openapi_default = {
40609
40905
  post: {
40610
40906
  operationId: "webhook.group_recovered",
40611
40907
  summary: "group.recovered",
40612
- description: "Un grupo que estaba bloqueado volvi\xF3 a operar.",
40908
+ description: "Un grupo de una campa\xF1a que estaba bloqueado volvi\xF3 a operar; un grupo que no es de una campa\xF1a no lo genera.",
40613
40909
  tags: [
40614
40910
  "Webhooks"
40615
40911
  ],
@@ -40678,7 +40974,7 @@ var openapi_default = {
40678
40974
  name: "Grupo de ejemplo"
40679
40975
  },
40680
40976
  campaign: {
40681
- uuid: "00000000-0000-4000-8000-000000000001"
40977
+ uuid: "xK9mQz"
40682
40978
  },
40683
40979
  reason: "access_restored",
40684
40980
  workspace_id: 37
@@ -40862,7 +41158,7 @@ var openapi_default = {
40862
41158
  uid: "120363000000000001@g.us"
40863
41159
  },
40864
41160
  participant: {
40865
- identity: "+5491100000000",
41161
+ identity: "5491100000000",
40866
41162
  identity_type: "phone",
40867
41163
  name: "Ana P\xE9rez"
40868
41164
  },
@@ -40956,7 +41252,7 @@ var openapi_default = {
40956
41252
  occurred_at: "2026-10-01T12:00:00Z",
40957
41253
  data: {
40958
41254
  campaign: {
40959
- uuid: "00000000-0000-4000-8000-000000000009",
41255
+ uuid: "xK9mQz",
40960
41256
  name: "Campa\xF1a de ejemplo"
40961
41257
  },
40962
41258
  from: "active",
@@ -40979,7 +41275,7 @@ var openapi_default = {
40979
41275
  post: {
40980
41276
  operationId: "webhook.pipeline_finished",
40981
41277
  summary: "pipeline.finished",
40982
- description: "Termin\xF3 un pipeline de operaciones sobre grupos, con su resultado agregado y la clave de idempotencia del pedido que lo origin\xF3, cuando la hay.",
41278
+ description: "Termin\xF3 un pipeline de operaciones sobre los grupos de una campa\xF1a, con su resultado agregado y la clave de idempotencia del pedido que lo origin\xF3, cuando la hay; si despu\xE9s cambia el resultado de alguna de sus acciones (por ejemplo, por un reintento), sale otro, con otro `id` y los conteos nuevos.",
40983
41279
  tags: [
40984
41280
  "Webhooks"
40985
41281
  ],
@@ -41044,7 +41340,7 @@ var openapi_default = {
41044
41340
  occurred_at: "2026-10-01T12:00:00Z",
41045
41341
  data: {
41046
41342
  campaign: {
41047
- uuid: "00000000-0000-4000-8000-00000000000a"
41343
+ uuid: "xK9mQz"
41048
41344
  },
41049
41345
  pipeline: {
41050
41346
  uuid: "00000000-0000-4000-8000-00000000000b",
@@ -41151,7 +41447,7 @@ var openapi_default = {
41151
41447
  uuid: "00000000-0000-4000-8000-000000000004"
41152
41448
  },
41153
41449
  participant: {
41154
- identity: "+5491100000000",
41450
+ identity: "5491100000000",
41155
41451
  identity_type: "phone",
41156
41452
  name: null
41157
41453
  },
@@ -41246,7 +41542,7 @@ var openapi_default = {
41246
41542
  type: "group"
41247
41543
  },
41248
41544
  campaign: {
41249
- uuid: "00000000-0000-4000-8000-000000000001",
41545
+ uuid: "xK9mQz",
41250
41546
  name: "Campa\xF1a de ejemplo"
41251
41547
  },
41252
41548
  invite_link: "https://chat.whatsapp.com/EjemploNuevo0000000000001",
@@ -41341,7 +41637,7 @@ var openapi_default = {
41341
41637
  type: "group"
41342
41638
  },
41343
41639
  campaign: {
41344
- uuid: "00000000-0000-4000-8000-000000000001",
41640
+ uuid: "xK9mQz",
41345
41641
  name: "Campa\xF1a de ejemplo"
41346
41642
  },
41347
41643
  reason: "http_404",
@@ -41791,7 +42087,7 @@ var openapi_default = {
41791
42087
  "mac.usage_100": {
41792
42088
  post: {
41793
42089
  summary: "mac.usage_100",
41794
- description: "La cuenta agot\xF3 sus contactos activos mensuales del ciclo; se abre una gracia de 24 horas cuyo vencimiento viaja en `grace_expires_at`.",
42090
+ description: "La cuenta agot\xF3 sus contactos activos mensuales del ciclo; se abre una gracia de 24 horas cuyo vencimiento viaja en `grace_expires_at`. `workspace_id` es el workspace al que se rutea el evento, como en todos los eventos: el workspace con facturaci\xF3n propia cuyo pool se agot\xF3, o el workspace por defecto cuando el pool es el de la cuenta.",
41795
42091
  "x-fc-status": "live",
41796
42092
  parameters: [
41797
42093
  {
@@ -41859,7 +42155,7 @@ var openapi_default = {
41859
42155
  "mac.usage_80": {
41860
42156
  post: {
41861
42157
  summary: "mac.usage_80",
41862
- description: "La cuenta alcanz\xF3 el 80% de sus contactos activos mensuales del ciclo.",
42158
+ description: "La cuenta alcanz\xF3 el 80% de sus contactos activos mensuales del ciclo. `workspace_id` es el workspace al que se rutea el evento, como en todos los eventos: el workspace con facturaci\xF3n propia cuyo pool alcanz\xF3 el umbral, o el workspace por defecto cuando el pool es el de la cuenta.",
41863
42159
  "x-fc-status": "live",
41864
42160
  parameters: [
41865
42161
  {
@@ -42180,7 +42476,7 @@ var openapi_default = {
42180
42476
  connection: "qr",
42181
42477
  external_reference: "cliente-42"
42182
42478
  },
42183
- connected_at: "2026-10-05T03:00:00+00:00",
42479
+ connected_at: "2026-10-05T03:00:00Z",
42184
42480
  connect_link_id: 812,
42185
42481
  workspace_id: 37
42186
42482
  }
@@ -42267,7 +42563,7 @@ var openapi_default = {
42267
42563
  connection: "qr",
42268
42564
  external_reference: "cliente-42"
42269
42565
  },
42270
- disconnected_at: "2026-10-05T03:00:00+00:00",
42566
+ disconnected_at: "2026-10-05T03:00:00Z",
42271
42567
  reason: "qr_logged_out",
42272
42568
  connect_link_id: 812,
42273
42569
  workspace_id: 37
@@ -43133,7 +43429,7 @@ var openapi_default = {
43133
43429
  connection: "qr",
43134
43430
  external_reference: "cliente-42"
43135
43431
  },
43136
- deleted_at: "2026-10-05T03:00:00+00:00",
43432
+ deleted_at: "2026-10-05T03:00:00Z",
43137
43433
  connect_link_id: 812,
43138
43434
  workspace_id: 37
43139
43435
  }
@@ -43230,7 +43526,7 @@ var openapi_default = {
43230
43526
  },
43231
43527
  previous_state: "available",
43232
43528
  state: "limited",
43233
- changed_at: "2026-10-05T03:00:00+00:00",
43529
+ changed_at: "2026-10-05T03:00:00Z",
43234
43530
  connect_link_id: null,
43235
43531
  workspace_id: 37
43236
43532
  }
@@ -43315,7 +43611,7 @@ var openapi_default = {
43315
43611
  },
43316
43612
  previous: "GREEN",
43317
43613
  current: "YELLOW",
43318
- changed_at: "2026-10-05T03:00:00+00:00",
43614
+ changed_at: "2026-10-05T03:00:00Z",
43319
43615
  connect_link_id: null,
43320
43616
  workspace_id: 37
43321
43617
  }
@@ -43400,7 +43696,7 @@ var openapi_default = {
43400
43696
  },
43401
43697
  previous: "TIER_1K",
43402
43698
  current: "TIER_10K",
43403
- changed_at: "2026-10-05T03:00:00+00:00",
43699
+ changed_at: "2026-10-05T03:00:00Z",
43404
43700
  connect_link_id: null,
43405
43701
  workspace_id: 37
43406
43702
  }
@@ -43513,7 +43809,7 @@ var openapi_default = {
43513
43809
  status: "APPROVED",
43514
43810
  verified_name: "Soporte Lucky Shrub",
43515
43811
  rejection_reason: null,
43516
- reviewed_at: "2026-10-05T03:00:00+00:00",
43812
+ reviewed_at: "2026-10-05T03:00:00Z",
43517
43813
  connect_link_id: null,
43518
43814
  workspace_id: 37
43519
43815
  }
@@ -43700,10 +43996,10 @@ var openapi_default = {
43700
43996
  name: "Grupo de ejemplo"
43701
43997
  },
43702
43998
  campaign: {
43703
- uuid: "00000000-0000-4000-8000-000000000001"
43999
+ uuid: "xK9mQz"
43704
44000
  },
43705
44001
  participant: {
43706
- identity: "+5491100000000",
44002
+ identity: "5491100000000",
43707
44003
  identity_type: "phone",
43708
44004
  name: "Ana P\xE9rez"
43709
44005
  }
@@ -43849,10 +44145,10 @@ var openapi_default = {
43849
44145
  name: "Grupo de ejemplo"
43850
44146
  },
43851
44147
  campaign: {
43852
- uuid: "00000000-0000-4000-8000-000000000001"
44148
+ uuid: "xK9mQz"
43853
44149
  },
43854
44150
  participant: {
43855
- identity: "+5491100000000",
44151
+ identity: "5491100000000",
43856
44152
  identity_type: "phone",
43857
44153
  name: "Ana P\xE9rez"
43858
44154
  }
@@ -45109,6 +45405,251 @@ var openapi_default = {
45109
45405
  ],
45110
45406
  title: "ApiGroupActionAcceptedResource"
45111
45407
  },
45408
+ ApiGroupActionResource: {
45409
+ type: "object",
45410
+ properties: {
45411
+ action_id: {
45412
+ type: "string",
45413
+ description: "Id de la acci\xF3n: el `action_id` del `202`."
45414
+ },
45415
+ type: {
45416
+ type: "string",
45417
+ description: "Tipo de acci\xF3n.",
45418
+ enum: [
45419
+ "create_group",
45420
+ "add_participants",
45421
+ "remove_participants",
45422
+ "promote_admins",
45423
+ "demote_admins",
45424
+ "update_name",
45425
+ "update_description",
45426
+ "update_photo",
45427
+ "update_settings",
45428
+ "renew_invite_link",
45429
+ "send_message",
45430
+ "approve_join_requests",
45431
+ "reject_join_requests"
45432
+ ]
45433
+ },
45434
+ status: {
45435
+ type: "string",
45436
+ description: "Estado de la acci\xF3n.",
45437
+ enum: [
45438
+ "queued",
45439
+ "running",
45440
+ "completed",
45441
+ "failed"
45442
+ ]
45443
+ },
45444
+ device_id: {
45445
+ type: [
45446
+ "integer",
45447
+ "null"
45448
+ ],
45449
+ description: "N\xFAmero que ejecuta la acci\xF3n; `null` si es de otro workspace que el de la key."
45450
+ },
45451
+ group: {
45452
+ type: [
45453
+ "object",
45454
+ "null"
45455
+ ],
45456
+ description: "Grupo de la acci\xF3n; `null` si todav\xEDa no existe (una creaci\xF3n sin terminar) o es de otro workspace que el de la key.",
45457
+ properties: {
45458
+ uid: {
45459
+ type: "string"
45460
+ },
45461
+ name: {
45462
+ type: [
45463
+ "string",
45464
+ "null"
45465
+ ]
45466
+ }
45467
+ },
45468
+ required: [
45469
+ "uid",
45470
+ "name"
45471
+ ]
45472
+ },
45473
+ result: {
45474
+ description: 'Resultado de una acci\xF3n `completed`; `null` mientras est\xE1 `queued` o `running` y cuando termina `failed`. Su forma depende de `type`: `{"participants": [...]}` (una lista, en el orden del pedido) para las acciones con lista de tel\xE9fonos; `{"group": {"uid", "name"}, "invite_link"}` para `create_group`; `{"invite_link"}` para `renew_invite_link`; `{"message": {"uid"}}` para `send_message`; `{}` para las dem\xE1s. Es el mismo `result` del evento `group_action.completed`.',
45475
+ anyOf: [
45476
+ {
45477
+ type: "object",
45478
+ properties: {
45479
+ participants: {
45480
+ type: "array",
45481
+ items: {
45482
+ type: "object",
45483
+ properties: {
45484
+ identity: {
45485
+ type: [
45486
+ "string",
45487
+ "null"
45488
+ ]
45489
+ },
45490
+ identity_type: {
45491
+ type: [
45492
+ "string",
45493
+ "null"
45494
+ ]
45495
+ },
45496
+ status: {
45497
+ type: "string",
45498
+ enum: [
45499
+ "added",
45500
+ "invited",
45501
+ "removed",
45502
+ "promoted",
45503
+ "demoted",
45504
+ "approved",
45505
+ "rejected",
45506
+ "failed"
45507
+ ]
45508
+ },
45509
+ reason: {
45510
+ type: [
45511
+ "string",
45512
+ "null"
45513
+ ]
45514
+ }
45515
+ },
45516
+ required: [
45517
+ "identity",
45518
+ "identity_type",
45519
+ "status",
45520
+ "reason"
45521
+ ]
45522
+ }
45523
+ }
45524
+ },
45525
+ required: [
45526
+ "participants"
45527
+ ]
45528
+ },
45529
+ {
45530
+ type: "object",
45531
+ properties: {
45532
+ group: {
45533
+ type: "object",
45534
+ properties: {
45535
+ uid: {
45536
+ type: "string"
45537
+ },
45538
+ name: {
45539
+ type: [
45540
+ "string",
45541
+ "null"
45542
+ ]
45543
+ }
45544
+ },
45545
+ required: [
45546
+ "uid",
45547
+ "name"
45548
+ ]
45549
+ },
45550
+ invite_link: {
45551
+ type: [
45552
+ "string",
45553
+ "null"
45554
+ ]
45555
+ }
45556
+ },
45557
+ required: [
45558
+ "group",
45559
+ "invite_link"
45560
+ ]
45561
+ },
45562
+ {
45563
+ type: "object",
45564
+ properties: {
45565
+ invite_link: {
45566
+ type: [
45567
+ "string",
45568
+ "null"
45569
+ ]
45570
+ }
45571
+ },
45572
+ required: [
45573
+ "invite_link"
45574
+ ]
45575
+ },
45576
+ {
45577
+ type: "object",
45578
+ properties: {
45579
+ message: {
45580
+ type: "object",
45581
+ properties: {
45582
+ uid: {
45583
+ type: [
45584
+ "string",
45585
+ "null"
45586
+ ]
45587
+ }
45588
+ },
45589
+ required: [
45590
+ "uid"
45591
+ ]
45592
+ }
45593
+ },
45594
+ required: [
45595
+ "message"
45596
+ ]
45597
+ },
45598
+ {
45599
+ type: "object"
45600
+ },
45601
+ {
45602
+ type: "null"
45603
+ }
45604
+ ]
45605
+ },
45606
+ reason: {
45607
+ type: [
45608
+ "string",
45609
+ "null"
45610
+ ],
45611
+ description: "Motivo de una acci\xF3n `failed`; `null` en los dem\xE1s estados. Vocabulario cerrado: la secci\xF3n \xABMotivos\xBB de \xABAcciones de grupo\xBB."
45612
+ },
45613
+ created_at: {
45614
+ type: [
45615
+ "string",
45616
+ "null"
45617
+ ]
45618
+ },
45619
+ started_at: {
45620
+ type: [
45621
+ "string",
45622
+ "null"
45623
+ ]
45624
+ },
45625
+ completed_at: {
45626
+ type: [
45627
+ "string",
45628
+ "null"
45629
+ ]
45630
+ },
45631
+ failed_at: {
45632
+ type: [
45633
+ "string",
45634
+ "null"
45635
+ ]
45636
+ }
45637
+ },
45638
+ required: [
45639
+ "action_id",
45640
+ "type",
45641
+ "status",
45642
+ "device_id",
45643
+ "group",
45644
+ "result",
45645
+ "reason",
45646
+ "created_at",
45647
+ "started_at",
45648
+ "completed_at",
45649
+ "failed_at"
45650
+ ],
45651
+ title: "ApiGroupActionResource"
45652
+ },
45112
45653
  ApiGroupDescriptionRequest: {
45113
45654
  type: "object",
45114
45655
  description: "Cuerpo de `PUT /groups/{group}/description`: una descripci\xF3n vac\xEDa la borra, salvo con un n\xFAmero oficial,\nen el que WhatsApp no permite borrarla. Los campos que no figuran se ignoran.",
@@ -48774,7 +49315,7 @@ var openapi_default = {
48774
49315
  "integer",
48775
49316
  "null"
48776
49317
  ],
48777
- description: "additive last-computed snapshot, always present\n(not nulled when overloaded=false). No state row => counts null, flags false."
49318
+ description: "En la \xFAltima evaluaci\xF3n, cu\xE1ntos grupos ten\xEDa el n\xFAmero; `null` si nunca se evalu\xF3."
48778
49319
  },
48779
49320
  overloaded_one_to_one_count: {
48780
49321
  type: [
@@ -48793,7 +49334,7 @@ var openapi_default = {
48793
49334
  },
48794
49335
  overloaded_alert_level: {
48795
49336
  type: "string",
48796
- description: "additive, always present. No row => none / null."
49337
+ description: "El evento de n\xFAmero sobrecargado: `loud` (sin descartar), `latent` (descartado en este\nepisodio) o `none` (no est\xE1 sobrecargado o nunca se evalu\xF3)."
48797
49338
  },
48798
49339
  overloaded_dismissed_at: {
48799
49340
  type: [
@@ -53481,6 +54022,224 @@ var openapi_default = {
53481
54022
  ],
53482
54023
  title: "UpdateKanbanStageRequest"
53483
54024
  },
54025
+ UpdateLeadScoreSettingsRequest: {
54026
+ type: "object",
54027
+ properties: {
54028
+ hot_threshold: {
54029
+ type: "integer",
54030
+ minimum: 0,
54031
+ maximum: 100
54032
+ },
54033
+ warm_threshold: {
54034
+ type: "integer",
54035
+ minimum: 0,
54036
+ maximum: 100
54037
+ },
54038
+ min_signals: {
54039
+ type: "integer",
54040
+ minimum: 1,
54041
+ maximum: 20
54042
+ },
54043
+ hysteresis: {
54044
+ type: "integer",
54045
+ minimum: 0,
54046
+ maximum: 25
54047
+ },
54048
+ decay_enabled: {
54049
+ type: "boolean"
54050
+ },
54051
+ rules: {
54052
+ type: "array",
54053
+ items: {
54054
+ type: "object",
54055
+ properties: {
54056
+ id: {
54057
+ type: "string",
54058
+ maxLength: 64
54059
+ },
54060
+ signal: {
54061
+ type: "string",
54062
+ enum: [
54063
+ "tag_added",
54064
+ "tag_removed",
54065
+ "stage_advanced",
54066
+ "broadcast_reply",
54067
+ "message_reply",
54068
+ "intent_keyword",
54069
+ "group_join",
54070
+ "group_leave",
54071
+ "group_reaction",
54072
+ "group_poll_vote",
54073
+ "link_click",
54074
+ "automation_completed"
54075
+ ]
54076
+ },
54077
+ mode: {
54078
+ type: "string",
54079
+ enum: [
54080
+ "event",
54081
+ "state"
54082
+ ]
54083
+ },
54084
+ points: {
54085
+ type: "integer",
54086
+ minimum: -100,
54087
+ maximum: 100
54088
+ },
54089
+ daily_cap: {
54090
+ type: [
54091
+ "integer",
54092
+ "null"
54093
+ ],
54094
+ minimum: 1
54095
+ },
54096
+ unique_scope: {
54097
+ type: "string",
54098
+ enum: [
54099
+ "none",
54100
+ "contact",
54101
+ "contact_scope"
54102
+ ]
54103
+ },
54104
+ enabled: {
54105
+ type: "boolean"
54106
+ },
54107
+ disqualifies: {
54108
+ type: "boolean"
54109
+ },
54110
+ on_release: {
54111
+ type: "string",
54112
+ enum: [
54113
+ "restore",
54114
+ "keep"
54115
+ ]
54116
+ },
54117
+ config: {
54118
+ type: "object",
54119
+ properties: {
54120
+ keywords: {
54121
+ type: "array",
54122
+ items: {
54123
+ type: "string",
54124
+ minLength: 1
54125
+ },
54126
+ maxItems: 50
54127
+ },
54128
+ broadcast_ids: {
54129
+ type: [
54130
+ "array",
54131
+ "null"
54132
+ ],
54133
+ items: {
54134
+ type: "integer"
54135
+ },
54136
+ maxItems: 100
54137
+ },
54138
+ group_ids: {
54139
+ type: [
54140
+ "array",
54141
+ "null"
54142
+ ],
54143
+ items: {
54144
+ type: "string",
54145
+ minLength: 1,
54146
+ maxLength: 255
54147
+ },
54148
+ maxItems: 100
54149
+ },
54150
+ flow_ids: {
54151
+ type: [
54152
+ "array",
54153
+ "null"
54154
+ ],
54155
+ items: {
54156
+ type: "integer"
54157
+ },
54158
+ maxItems: 100
54159
+ },
54160
+ whalink_ids: {
54161
+ type: [
54162
+ "array",
54163
+ "null"
54164
+ ],
54165
+ items: {
54166
+ type: "string",
54167
+ minLength: 1,
54168
+ maxLength: 255
54169
+ },
54170
+ maxItems: 100
54171
+ },
54172
+ tag_ids: {
54173
+ type: [
54174
+ "array",
54175
+ "null"
54176
+ ],
54177
+ items: {
54178
+ type: "integer"
54179
+ },
54180
+ maxItems: 100
54181
+ },
54182
+ stage_ids: {
54183
+ type: [
54184
+ "array",
54185
+ "null"
54186
+ ],
54187
+ items: {
54188
+ type: "integer"
54189
+ },
54190
+ maxItems: 100
54191
+ }
54192
+ }
54193
+ }
54194
+ },
54195
+ required: [
54196
+ "id",
54197
+ "signal",
54198
+ "mode",
54199
+ "points",
54200
+ "unique_scope",
54201
+ "enabled",
54202
+ "disqualifies",
54203
+ "on_release"
54204
+ ]
54205
+ },
54206
+ maxItems: 30
54207
+ },
54208
+ decay_steps: {
54209
+ type: "array",
54210
+ items: {
54211
+ type: "object",
54212
+ properties: {
54213
+ days: {
54214
+ type: "integer",
54215
+ minimum: 1,
54216
+ maximum: 365
54217
+ },
54218
+ points: {
54219
+ type: "integer",
54220
+ minimum: -100,
54221
+ maximum: -1
54222
+ }
54223
+ },
54224
+ required: [
54225
+ "days",
54226
+ "points"
54227
+ ]
54228
+ },
54229
+ maxItems: 5
54230
+ }
54231
+ },
54232
+ required: [
54233
+ "hot_threshold",
54234
+ "warm_threshold",
54235
+ "min_signals",
54236
+ "hysteresis",
54237
+ "decay_enabled",
54238
+ "rules",
54239
+ "decay_steps"
54240
+ ],
54241
+ title: "UpdateLeadScoreSettingsRequest"
54242
+ },
53484
54243
  UpdateMessageTemplateRequest: {
53485
54244
  type: "object",
53486
54245
  properties: {
@@ -55227,8 +55986,8 @@ var openapi_default = {
55227
55986
  generated_by: "scripts/generate.mjs",
55228
55987
  note: "GENERATED: do not edit it. The portal's snapshot plus the pending layers.",
55229
55988
  inputs: {
55230
- "spec/funnelchat.json": "3e5bc8ef01a2c74650a2581beb9bcfee4dd14252bec8ab52542fa3240ab60475",
55231
- "spec/pending.json": "dd7b8cf6e5be45ddf1c0c00a9f4480cceec11b364adec083bbf989fa11944d9d",
55989
+ "spec/funnelchat.json": "19e91748ddfe19eef74886264ee984d360417596745e5a900a02a7a831b570a0",
55990
+ "spec/pending.json": "665399018a4a5193038efd4471c4e8655b2fd05400eb9bd9b621627148f8be47",
55232
55991
  "spec/pending-sandbox.json": "32bcbfef902fbabd57e1626f4d97e964b89f3c561c7b0f0e21531c8576019aaf"
55233
55992
  },
55234
55993
  snapshot_commit: null,
@@ -55241,7 +56000,6 @@ var openapi_default = {
55241
56000
  "GET /api/v1/devices/{device}/qr (respuestas: 200) [pending.json]",
55242
56001
  "GET /api/v1/templates (respuestas: 200) [pending.json]",
55243
56002
  "PUT /api/v1/webhooks/{id} (respuestas: 200) [pending.json]",
55244
- "GET /api/v1/groups/actions/{action} (respuestas: 200) [pending.json]",
55245
56003
  "webhook device.connected [pending.json]",
55246
56004
  "webhook device.disconnected [pending.json]",
55247
56005
  "webhook billing.payment_failed [pending.json]",
@@ -56275,11 +57033,8 @@ function resolveFile(body2, style) {
56275
57033
  if (fileType !== null) return { file, type: fileType, fileName };
56276
57034
  const type = SUPPORTED_EXTENSIONS[extension];
56277
57035
  if (type) return { file, type, fileName };
56278
- const error = `Unsupported file type: ${extension}`;
56279
- throw new RawApiError(
56280
- 415,
56281
- style === "conversation" ? { error, supported_file_types: Object.keys(SUPPORTED_EXTENSIONS) } : { status: "error", error }
56282
- );
57036
+ const message = `Unsupported file type: ${extension}`;
57037
+ throw new ApiError(415, "bad_request", message, style === "conversation" ? { supported_file_types: Object.keys(SUPPORTED_EXTENSIONS) } : {});
56283
57038
  }
56284
57039
 
56285
57040
  // src/openapi/shape.ts
@@ -56305,7 +57060,7 @@ function shapeOnlyAnswer(op) {
56305
57060
 
56306
57061
  // package.json
56307
57062
  var package_default = {
56308
- version: "0.5.1"};
57063
+ version: "0.5.3"};
56309
57064
 
56310
57065
  // src/version.ts
56311
57066
  var VERSION = package_default.version;
@@ -57456,27 +58211,27 @@ function connectDevice(app, device, options = {}) {
57456
58211
  device.connected = true;
57457
58212
  device.firstConnectedAt ??= at;
57458
58213
  if (device.kind === "cloud" && (device.health === null || device.health === "unknown")) device.health = "available";
57459
- return app.webhooks.emit("device.connected", eventData(device, { connected_at: iso8601(at) }, connectLinkId), { occurredAt: at, workspaceId: device.workspaceId });
58214
+ return app.webhooks.emit("device.connected", eventData(device, { connected_at: isoSeconds(at) }, connectLinkId), { occurredAt: at, workspaceId: device.workspaceId });
57460
58215
  }
57461
58216
  function disconnectDevice(app, device, reason) {
57462
58217
  if (!device.connected) return null;
57463
58218
  const at = /* @__PURE__ */ new Date();
57464
58219
  device.connected = false;
57465
- return app.webhooks.emit("device.disconnected", eventData(device, { disconnected_at: iso8601(at), reason }), { occurredAt: at, workspaceId: device.workspaceId });
58220
+ return app.webhooks.emit("device.disconnected", eventData(device, { disconnected_at: isoSeconds(at), reason }), { occurredAt: at, workspaceId: device.workspaceId });
57466
58221
  }
57467
58222
  function setHealth(app, device, state2) {
57468
58223
  const previous = device.health ?? "unknown";
57469
58224
  if (previous === state2) return null;
57470
58225
  device.health = state2;
57471
58226
  const at = /* @__PURE__ */ new Date();
57472
- return app.webhooks.emit("device.health_changed", eventData(device, { previous_state: previous, state: state2, changed_at: iso8601(at) }), {
58227
+ return app.webhooks.emit("device.health_changed", eventData(device, { previous_state: previous, state: state2, changed_at: isoSeconds(at) }), {
57473
58228
  occurredAt: at,
57474
58229
  workspaceId: device.workspaceId
57475
58230
  });
57476
58231
  }
57477
58232
  function deleteDevice(app, device) {
57478
58233
  const at = /* @__PURE__ */ new Date();
57479
- const event = app.webhooks.emit("device.deleted", eventData(device, { deleted_at: iso8601(at) }), { occurredAt: at, workspaceId: device.workspaceId });
58234
+ const event = app.webhooks.emit("device.deleted", eventData(device, { deleted_at: isoSeconds(at) }), { occurredAt: at, workspaceId: device.workspaceId });
57480
58235
  app.store.devices.delete(device.id);
57481
58236
  for (const link of app.store.connectLinks.values()) {
57482
58237
  if (link.reconnect && link.deviceId === device.id && link.status === "pending") {
@@ -58478,13 +59233,13 @@ function sendTemplate(ctx) {
58478
59233
  if (!template) throw new ApiError(404, "template_not_found", "No se envi\xF3: la plantilla no existe en tu cuenta. Revisa el identificador de la plantilla.");
58479
59234
  const device = ctx.app.store.devices.get(Number(ctx.path.device));
58480
59235
  if (!device) throw rejection("device_unavailable");
58481
- if (template.deviceId !== device.id) throw new RawApiError(422, { error: "La plantilla no pertenece al n\xFAmero actual", error_code: "template_waba_mismatch" });
59236
+ if (template.deviceId !== device.id) throw new ApiError(422, "template_waba_mismatch", "La plantilla no pertenece al n\xFAmero actual");
58482
59237
  if (template.status !== "APPROVED") throw fieldError("template", `La plantilla est\xE1 ${template.status}: solo se env\xEDan plantillas aprobadas.`);
58483
59238
  assertUsable(b, device);
58484
59239
  const identity = byIdentity(b);
58485
59240
  const contactId = identity ? sendRecipient(ctx, b).id : Number(b.contact_id);
58486
59241
  const contact = ctx.app.store.contacts.get(contactId);
58487
- if (!contact || !sees(ctx.workspace, contact.workspaceId)) throw new RawApiError(404, { error: "Contact not found" });
59242
+ if (!contact || !sees(ctx.workspace, contact.workspaceId)) throw new ApiError(404, "not_found", "Contact not found");
58488
59243
  if (!device.connected) throw rejection("device_unavailable");
58489
59244
  const variables = b.template_variables?.body;
58490
59245
  const phone = identity ? void 0 : b.phone;
@@ -58515,9 +59270,9 @@ var messageHandlers = {
58515
59270
  let contact = null;
58516
59271
  if (!byIdentity(b)) {
58517
59272
  contact = ctx.app.store.contacts.get(Number(b.contact_id)) ?? null;
58518
- if (!contact || !sees(ctx.workspace, contact.workspaceId)) throw new RawApiError(404, { status: "error", error: "Contacto no encontrado." });
59273
+ if (!contact || !sees(ctx.workspace, contact.workspaceId)) throw new ApiError(404, "not_found", "Contacto no encontrado.", { status: "error" });
58519
59274
  }
58520
- if (!ctx.app.store.devices.has(Number(b.device_id))) throw new RawApiError(403, { status: "error", error: "No autorizado" });
59275
+ if (!ctx.app.store.devices.has(Number(b.device_id))) throw new ApiError(403, "forbidden", "No autorizado");
58521
59276
  return sendToContact(ctx, contact, "direct");
58522
59277
  },
58523
59278
  // The spec of the portal names the parameter `{template}`; conversations, `{template_id}`. Same URL.
@@ -59690,7 +60445,7 @@ var webhookHandlers = {
59690
60445
  const b = body(ctx);
59691
60446
  checkSubscriptionBody(ctx.app, b);
59692
60447
  if (ofWorkspace(ctx).length >= SUBSCRIPTION_LIMIT) {
59693
- throw new ApiError(422, "validation_failed", `Alcanzaste el l\xEDmite de ${SUBSCRIPTION_LIMIT} suscripciones de webhook.`);
60448
+ throw new ApiError(422, "webhooks_limit_reached", `Alcanzaste el l\xEDmite de ${SUBSCRIPTION_LIMIT} suscripciones de webhook.`);
59694
60449
  }
59695
60450
  const now = /* @__PURE__ */ new Date();
59696
60451
  const subscription = {
@@ -60823,5 +61578,5 @@ function createSandbox(options = {}) {
60823
61578
  }
60824
61579
 
60825
61580
  export { ConfigError, DEFAULT_CONFIG_FILE, DEFAULT_PORT, DELIVERY_HEADER, EDGE_ERRORS, EVENT_HEADER, FAILURE_REASONS, FORM_TEMPLATES, META_ERRORS, REJECTIONS, REQUEST_ID_HEADER, SEND_FILE_TYPES, SIGNATURE_HEADER, SIMULATED_HEADER, SUPPORTED_EXTENSIONS, VERSION, catalog, createSandbox, defaultConfig, mergeConfig, parseArgs, resolveConfig, signature };
60826
- //# sourceMappingURL=chunk-NSON4OUU.js.map
60827
- //# sourceMappingURL=chunk-NSON4OUU.js.map
61581
+ //# sourceMappingURL=chunk-ZHTK33SS.js.map
61582
+ //# sourceMappingURL=chunk-ZHTK33SS.js.map