@vitrina/api 14.7.0 → 14.8.0

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.
package/dist/index.d.ts CHANGED
@@ -82838,7 +82838,11 @@ interface paths {
82838
82838
  * "demo": "demo_confirmada_v1"
82839
82839
  * },
82840
82840
  * "asks_confirmation": false,
82841
- * "include_reschedule_link": true
82841
+ * "template": null,
82842
+ * "derived": {
82843
+ * "asks_confirmation": false,
82844
+ * "includes_link": true
82845
+ * }
82842
82846
  * },
82843
82847
  * {
82844
82848
  * "key": "h24",
@@ -82847,7 +82851,34 @@ interface paths {
82847
82851
  * "email": "fallback",
82848
82852
  * "template_name": "recordatorio_24h",
82849
82853
  * "asks_confirmation": true,
82850
- * "include_reschedule_link": true
82854
+ * "template": {
82855
+ * "name": "recordatorio_24h",
82856
+ * "language": "es",
82857
+ * "status": "APPROVED",
82858
+ * "category": "UTILITY",
82859
+ * "body_preview": "Hola {{nombre}}, te recordamos tu cita del {{fecha}} a las {{hora}}. ¿Nos confirmas?",
82860
+ * "variables": [
82861
+ * "nombre",
82862
+ * "fecha",
82863
+ * "hora"
82864
+ * ],
82865
+ * "buttons": [
82866
+ * {
82867
+ * "type": "QUICK_REPLY",
82868
+ * "text": "Confirmo"
82869
+ * },
82870
+ * {
82871
+ * "type": "QUICK_REPLY",
82872
+ * "text": "No puedo asistir"
82873
+ * }
82874
+ * ],
82875
+ * "usable": true,
82876
+ * "reasons": []
82877
+ * },
82878
+ * "derived": {
82879
+ * "asks_confirmation": true,
82880
+ * "includes_link": false
82881
+ * }
82851
82882
  * },
82852
82883
  * {
82853
82884
  * "key": "h2",
@@ -82855,7 +82886,11 @@ interface paths {
82855
82886
  * "channel": "whatsapp",
82856
82887
  * "template_name": "recordatorio_2h",
82857
82888
  * "asks_confirmation": false,
82858
- * "include_reschedule_link": false
82889
+ * "template": null,
82890
+ * "derived": {
82891
+ * "asks_confirmation": false,
82892
+ * "includes_link": true
82893
+ * }
82859
82894
  * },
82860
82895
  * {
82861
82896
  * "key": "no_show",
@@ -82865,7 +82900,11 @@ interface paths {
82865
82900
  * "email": "fallback",
82866
82901
  * "template_name": "reagendar",
82867
82902
  * "asks_confirmation": false,
82868
- * "include_reschedule_link": true
82903
+ * "template": null,
82904
+ * "derived": {
82905
+ * "asks_confirmation": false,
82906
+ * "includes_link": true
82907
+ * }
82869
82908
  * }
82870
82909
  * ],
82871
82910
  * "active": true,
@@ -82878,14 +82917,133 @@ interface paths {
82878
82917
  * "updated_at": "2026-10-11T12:00:00.000Z",
82879
82918
  * "confirm_status_id": null,
82880
82919
  * "confirm_status": null,
82881
- * "create_contacts_from_patient_phone": false
82920
+ * "create_contacts_from_patient_phone": false,
82921
+ * "messaging_account_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
82922
+ * "accounts": [
82923
+ * {
82924
+ * "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
82925
+ * "name": "Recepción",
82926
+ * "phone_number": "+56922223333",
82927
+ * "display": "Recepción · +56922223333",
82928
+ * "enabled": true
82929
+ * }
82930
+ * ],
82931
+ * "warnings": [
82932
+ * {
82933
+ * "rung_key": "welcome",
82934
+ * "code": "template_missing",
82935
+ * "message": "Plantilla (demo): no existe una plantilla «demo_confirmada_v1» en este número de WhatsApp; fuera de la ventana de 24 h no saldrá nada."
82936
+ * }
82937
+ * ]
82882
82938
  * }
82883
82939
  * }
82884
82940
  */
82885
82941
  "application/json": {
82886
- data?: unknown;
82887
- meta?: {
82888
- [key: string]: unknown;
82942
+ data: {
82943
+ /** Format: uuid */
82944
+ id: string | null;
82945
+ name: string;
82946
+ rungs: {
82947
+ key: string;
82948
+ /** @enum {string} */
82949
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
82950
+ /** @enum {string} */
82951
+ email?: "never" | "fallback" | "also";
82952
+ templates?: {
82953
+ [key: string]: string;
82954
+ };
82955
+ offset_hours: number;
82956
+ channel: string;
82957
+ template_name: string | null;
82958
+ asks_confirmation: boolean;
82959
+ template: {
82960
+ name: string;
82961
+ language: string;
82962
+ status: string;
82963
+ category: string;
82964
+ body_preview: string;
82965
+ variables: string[];
82966
+ buttons: {
82967
+ /** @enum {string} */
82968
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
82969
+ text: string;
82970
+ }[];
82971
+ usable: boolean;
82972
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
82973
+ } | null;
82974
+ derived: {
82975
+ asks_confirmation: boolean;
82976
+ includes_link: boolean;
82977
+ };
82978
+ }[];
82979
+ active: boolean;
82980
+ single_sender_confirmed_at: string | null;
82981
+ single_sender_confirmed_by: string | null;
82982
+ vendor_sends_reminders: boolean;
82983
+ live: boolean;
82984
+ /** @enum {string|null} */
82985
+ blocked_reason: "no_plan" | "inactive" | "single_sender_not_confirmed" | "vendor_sends_reminders" | "no_rungs" | null;
82986
+ defaults: {
82987
+ key: string;
82988
+ /** @enum {string} */
82989
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
82990
+ /** @enum {string} */
82991
+ email?: "never" | "fallback" | "also";
82992
+ templates?: {
82993
+ [key: string]: string;
82994
+ };
82995
+ offset_hours: number;
82996
+ channel: string;
82997
+ template_name: string | null;
82998
+ asks_confirmation: boolean;
82999
+ template: {
83000
+ name: string;
83001
+ language: string;
83002
+ status: string;
83003
+ category: string;
83004
+ body_preview: string;
83005
+ variables: string[];
83006
+ buttons: {
83007
+ /** @enum {string} */
83008
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83009
+ text: string;
83010
+ }[];
83011
+ usable: boolean;
83012
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83013
+ } | null;
83014
+ derived: {
83015
+ asks_confirmation: boolean;
83016
+ includes_link: boolean;
83017
+ };
83018
+ }[];
83019
+ updated_at: string | null;
83020
+ /** Format: uuid */
83021
+ confirm_status_id: string | null;
83022
+ confirm_status: {
83023
+ /** Format: uuid */
83024
+ id: string;
83025
+ name: string;
83026
+ external_id: string | null;
83027
+ /** @enum {string} */
83028
+ source: "configured" | "heuristic";
83029
+ } | null;
83030
+ create_contacts_from_patient_phone: boolean;
83031
+ /** Format: uuid */
83032
+ messaging_account_id: string | null;
83033
+ accounts: {
83034
+ /** Format: uuid */
83035
+ id: string;
83036
+ name: string;
83037
+ phone_number: string | null;
83038
+ display: string;
83039
+ enabled: boolean;
83040
+ }[];
83041
+ warnings: {
83042
+ rung_key: string;
83043
+ /** @enum {string} */
83044
+ code: "no_template_outside_window" | "template_missing" | "template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported" | "account_not_chosen";
83045
+ message: string;
83046
+ }[];
82889
83047
  };
82890
83048
  };
82891
83049
  };
@@ -82948,7 +83106,7 @@ interface paths {
82948
83106
  };
82949
83107
  /**
82950
83108
  * Save the appointment reminder ladder
82951
- * @description Replaces the rungs. 400 `single_sender_not_confirmed` when `active` is requested without the declaration. Outside the 24 h WhatsApp window a rung needs an APPROVED template on the number (named variables: `nombre`, `fecha`, `hora`, `anfitrion`, `reunion`, `enlace`, `opcion_1`..`opcion_3`); with `email: "fallback"` a missing template falls back to email instead of staying silent.
83109
+ * @description Replaces the rungs. 400 `single_sender_not_confirmed` when `active` is requested without the declaration. `messaging_account_id` picks the sending WhatsApp number (400 `reminder_account_required` when there are several and none is chosen, `reminder_account_not_found` / `reminder_account_disabled`). Outside the 24 h WhatsApp window a rung needs an APPROVED template on that number; `template_name` is checked on save (400 `template_not_found` / `template_not_approved` / `template_positional_variables` / `template_unknown_variable` / `template_unsupported`). Named variables: `nombre`, `fecha`, `hora`, `profesional`, `sucursal`, `tratamiento`, `enlace`, `anfitrion`, `reunion`, `negocio`, `opcion_1`..`opcion_3`, `opciones`. A templated rung's `asks_confirmation` is derived from its quick replies and the manage link rides iff it uses `{{enlace}}`; with `email: "fallback"` a missing template falls back to email instead of staying silent.
82952
83110
  */
82953
83111
  put: {
82954
83112
  parameters: {
@@ -82972,8 +83130,7 @@ interface paths {
82972
83130
  * "templates": {
82973
83131
  * "demo": "demo_confirmada_v1"
82974
83132
  * },
82975
- * "asks_confirmation": false,
82976
- * "include_reschedule_link": true
83133
+ * "asks_confirmation": false
82977
83134
  * },
82978
83135
  * {
82979
83136
  * "key": "h24",
@@ -82981,16 +83138,14 @@ interface paths {
82981
83138
  * "channel": "whatsapp",
82982
83139
  * "email": "fallback",
82983
83140
  * "template_name": "recordatorio_24h",
82984
- * "asks_confirmation": true,
82985
- * "include_reschedule_link": true
83141
+ * "asks_confirmation": true
82986
83142
  * },
82987
83143
  * {
82988
83144
  * "key": "h2",
82989
83145
  * "offset_hours": 2,
82990
83146
  * "channel": "whatsapp",
82991
83147
  * "template_name": "recordatorio_2h",
82992
- * "asks_confirmation": false,
82993
- * "include_reschedule_link": false
83148
+ * "asks_confirmation": false
82994
83149
  * },
82995
83150
  * {
82996
83151
  * "key": "no_show",
@@ -82999,8 +83154,7 @@ interface paths {
82999
83154
  * "channel": "whatsapp",
83000
83155
  * "email": "fallback",
83001
83156
  * "template_name": "reagendar",
83002
- * "asks_confirmation": false,
83003
- * "include_reschedule_link": true
83157
+ * "asks_confirmation": false
83004
83158
  * }
83005
83159
  * ],
83006
83160
  * "active": true
@@ -83012,7 +83166,7 @@ interface paths {
83012
83166
  key: string;
83013
83167
  offset_hours: number;
83014
83168
  /** @enum {string} */
83015
- event?: "before_start" | "booked" | "no_show";
83169
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
83016
83170
  /** @enum {string} */
83017
83171
  email?: "never" | "fallback" | "also";
83018
83172
  templates?: {
@@ -83029,10 +83183,12 @@ interface paths {
83029
83183
  template_name?: string | null;
83030
83184
  /** @default false */
83031
83185
  asks_confirmation?: boolean;
83032
- /** @default true */
83033
- include_reschedule_link?: boolean;
83186
+ template?: unknown;
83187
+ derived?: unknown;
83034
83188
  }[];
83035
83189
  active: boolean;
83190
+ /** Format: uuid */
83191
+ messaging_account_id?: string | null;
83036
83192
  vendor_sends_reminders?: boolean;
83037
83193
  /** Format: uuid */
83038
83194
  confirm_status_id?: string | null;
@@ -83065,7 +83221,11 @@ interface paths {
83065
83221
  * "demo": "demo_confirmada_v1"
83066
83222
  * },
83067
83223
  * "asks_confirmation": false,
83068
- * "include_reschedule_link": true
83224
+ * "template": null,
83225
+ * "derived": {
83226
+ * "asks_confirmation": false,
83227
+ * "includes_link": true
83228
+ * }
83069
83229
  * },
83070
83230
  * {
83071
83231
  * "key": "h24",
@@ -83074,7 +83234,34 @@ interface paths {
83074
83234
  * "email": "fallback",
83075
83235
  * "template_name": "recordatorio_24h",
83076
83236
  * "asks_confirmation": true,
83077
- * "include_reschedule_link": true
83237
+ * "template": {
83238
+ * "name": "recordatorio_24h",
83239
+ * "language": "es",
83240
+ * "status": "APPROVED",
83241
+ * "category": "UTILITY",
83242
+ * "body_preview": "Hola {{nombre}}, te recordamos tu cita del {{fecha}} a las {{hora}}. ¿Nos confirmas?",
83243
+ * "variables": [
83244
+ * "nombre",
83245
+ * "fecha",
83246
+ * "hora"
83247
+ * ],
83248
+ * "buttons": [
83249
+ * {
83250
+ * "type": "QUICK_REPLY",
83251
+ * "text": "Confirmo"
83252
+ * },
83253
+ * {
83254
+ * "type": "QUICK_REPLY",
83255
+ * "text": "No puedo asistir"
83256
+ * }
83257
+ * ],
83258
+ * "usable": true,
83259
+ * "reasons": []
83260
+ * },
83261
+ * "derived": {
83262
+ * "asks_confirmation": true,
83263
+ * "includes_link": false
83264
+ * }
83078
83265
  * },
83079
83266
  * {
83080
83267
  * "key": "h2",
@@ -83082,7 +83269,11 @@ interface paths {
83082
83269
  * "channel": "whatsapp",
83083
83270
  * "template_name": "recordatorio_2h",
83084
83271
  * "asks_confirmation": false,
83085
- * "include_reschedule_link": false
83272
+ * "template": null,
83273
+ * "derived": {
83274
+ * "asks_confirmation": false,
83275
+ * "includes_link": true
83276
+ * }
83086
83277
  * },
83087
83278
  * {
83088
83279
  * "key": "no_show",
@@ -83092,7 +83283,11 @@ interface paths {
83092
83283
  * "email": "fallback",
83093
83284
  * "template_name": "reagendar",
83094
83285
  * "asks_confirmation": false,
83095
- * "include_reschedule_link": true
83286
+ * "template": null,
83287
+ * "derived": {
83288
+ * "asks_confirmation": false,
83289
+ * "includes_link": true
83290
+ * }
83096
83291
  * }
83097
83292
  * ],
83098
83293
  * "active": true,
@@ -83105,14 +83300,133 @@ interface paths {
83105
83300
  * "updated_at": "2026-10-11T12:00:00.000Z",
83106
83301
  * "confirm_status_id": null,
83107
83302
  * "confirm_status": null,
83108
- * "create_contacts_from_patient_phone": false
83303
+ * "create_contacts_from_patient_phone": false,
83304
+ * "messaging_account_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
83305
+ * "accounts": [
83306
+ * {
83307
+ * "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
83308
+ * "name": "Recepción",
83309
+ * "phone_number": "+56922223333",
83310
+ * "display": "Recepción · +56922223333",
83311
+ * "enabled": true
83312
+ * }
83313
+ * ],
83314
+ * "warnings": [
83315
+ * {
83316
+ * "rung_key": "welcome",
83317
+ * "code": "template_missing",
83318
+ * "message": "Plantilla (demo): no existe una plantilla «demo_confirmada_v1» en este número de WhatsApp; fuera de la ventana de 24 h no saldrá nada."
83319
+ * }
83320
+ * ]
83109
83321
  * }
83110
83322
  * }
83111
83323
  */
83112
83324
  "application/json": {
83113
- data?: unknown;
83114
- meta?: {
83115
- [key: string]: unknown;
83325
+ data: {
83326
+ /** Format: uuid */
83327
+ id: string | null;
83328
+ name: string;
83329
+ rungs: {
83330
+ key: string;
83331
+ /** @enum {string} */
83332
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
83333
+ /** @enum {string} */
83334
+ email?: "never" | "fallback" | "also";
83335
+ templates?: {
83336
+ [key: string]: string;
83337
+ };
83338
+ offset_hours: number;
83339
+ channel: string;
83340
+ template_name: string | null;
83341
+ asks_confirmation: boolean;
83342
+ template: {
83343
+ name: string;
83344
+ language: string;
83345
+ status: string;
83346
+ category: string;
83347
+ body_preview: string;
83348
+ variables: string[];
83349
+ buttons: {
83350
+ /** @enum {string} */
83351
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83352
+ text: string;
83353
+ }[];
83354
+ usable: boolean;
83355
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83356
+ } | null;
83357
+ derived: {
83358
+ asks_confirmation: boolean;
83359
+ includes_link: boolean;
83360
+ };
83361
+ }[];
83362
+ active: boolean;
83363
+ single_sender_confirmed_at: string | null;
83364
+ single_sender_confirmed_by: string | null;
83365
+ vendor_sends_reminders: boolean;
83366
+ live: boolean;
83367
+ /** @enum {string|null} */
83368
+ blocked_reason: "no_plan" | "inactive" | "single_sender_not_confirmed" | "vendor_sends_reminders" | "no_rungs" | null;
83369
+ defaults: {
83370
+ key: string;
83371
+ /** @enum {string} */
83372
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
83373
+ /** @enum {string} */
83374
+ email?: "never" | "fallback" | "also";
83375
+ templates?: {
83376
+ [key: string]: string;
83377
+ };
83378
+ offset_hours: number;
83379
+ channel: string;
83380
+ template_name: string | null;
83381
+ asks_confirmation: boolean;
83382
+ template: {
83383
+ name: string;
83384
+ language: string;
83385
+ status: string;
83386
+ category: string;
83387
+ body_preview: string;
83388
+ variables: string[];
83389
+ buttons: {
83390
+ /** @enum {string} */
83391
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83392
+ text: string;
83393
+ }[];
83394
+ usable: boolean;
83395
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83396
+ } | null;
83397
+ derived: {
83398
+ asks_confirmation: boolean;
83399
+ includes_link: boolean;
83400
+ };
83401
+ }[];
83402
+ updated_at: string | null;
83403
+ /** Format: uuid */
83404
+ confirm_status_id: string | null;
83405
+ confirm_status: {
83406
+ /** Format: uuid */
83407
+ id: string;
83408
+ name: string;
83409
+ external_id: string | null;
83410
+ /** @enum {string} */
83411
+ source: "configured" | "heuristic";
83412
+ } | null;
83413
+ create_contacts_from_patient_phone: boolean;
83414
+ /** Format: uuid */
83415
+ messaging_account_id: string | null;
83416
+ accounts: {
83417
+ /** Format: uuid */
83418
+ id: string;
83419
+ name: string;
83420
+ phone_number: string | null;
83421
+ display: string;
83422
+ enabled: boolean;
83423
+ }[];
83424
+ warnings: {
83425
+ rung_key: string;
83426
+ /** @enum {string} */
83427
+ code: "no_template_outside_window" | "template_missing" | "template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported" | "account_not_chosen";
83428
+ message: string;
83429
+ }[];
83116
83430
  };
83117
83431
  };
83118
83432
  };
@@ -83180,6 +83494,147 @@ interface paths {
83180
83494
  patch?: never;
83181
83495
  trace?: never;
83182
83496
  };
83497
+ "/appointments/reminders/templates": {
83498
+ parameters: {
83499
+ query?: never;
83500
+ header?: never;
83501
+ path?: never;
83502
+ cookie?: never;
83503
+ };
83504
+ /**
83505
+ * List the WhatsApp templates a reminder rung can use
83506
+ * @description Every template on the WhatsApp account (`messaging_account_id`, default: the plan's sending account), any status, each with `usable` and the `reasons` it is not (`template_not_approved`, `template_positional_variables`, `template_unknown_variable`, `template_unsupported`). Usable first.
83507
+ */
83508
+ get: {
83509
+ parameters: {
83510
+ query?: {
83511
+ messaging_account_id?: string;
83512
+ };
83513
+ header?: never;
83514
+ path?: never;
83515
+ cookie?: never;
83516
+ };
83517
+ requestBody?: never;
83518
+ responses: {
83519
+ /** @description Reminder templates */
83520
+ 200: {
83521
+ headers: {
83522
+ [name: string]: unknown;
83523
+ };
83524
+ content: {
83525
+ /**
83526
+ * @example {
83527
+ * "data": [
83528
+ * {
83529
+ * "name": "recordatorio_24h",
83530
+ * "language": "es",
83531
+ * "status": "APPROVED",
83532
+ * "category": "UTILITY",
83533
+ * "body_preview": "Hola {{nombre}}, te recordamos tu cita del {{fecha}} a las {{hora}}. ¿Nos confirmas?",
83534
+ * "variables": [
83535
+ * "nombre",
83536
+ * "fecha",
83537
+ * "hora"
83538
+ * ],
83539
+ * "buttons": [
83540
+ * {
83541
+ * "type": "QUICK_REPLY",
83542
+ * "text": "Confirmo"
83543
+ * },
83544
+ * {
83545
+ * "type": "QUICK_REPLY",
83546
+ * "text": "No puedo asistir"
83547
+ * }
83548
+ * ],
83549
+ * "usable": true,
83550
+ * "reasons": []
83551
+ * }
83552
+ * ]
83553
+ * }
83554
+ */
83555
+ "application/json": {
83556
+ data: {
83557
+ name: string;
83558
+ language: string;
83559
+ status: string;
83560
+ category: string;
83561
+ body_preview: string;
83562
+ variables: string[];
83563
+ buttons: {
83564
+ /** @enum {string} */
83565
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83566
+ text: string;
83567
+ }[];
83568
+ usable: boolean;
83569
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83570
+ }[];
83571
+ };
83572
+ };
83573
+ };
83574
+ /** @description Validation error */
83575
+ 400: {
83576
+ headers: {
83577
+ [name: string]: unknown;
83578
+ };
83579
+ content: {
83580
+ "application/json": components["schemas"]["Error"];
83581
+ };
83582
+ };
83583
+ /** @description Unauthorized */
83584
+ 401: {
83585
+ headers: {
83586
+ [name: string]: unknown;
83587
+ };
83588
+ content: {
83589
+ "application/json": components["schemas"]["Error"];
83590
+ };
83591
+ };
83592
+ /** @description Forbidden */
83593
+ 403: {
83594
+ headers: {
83595
+ [name: string]: unknown;
83596
+ };
83597
+ content: {
83598
+ "application/json": components["schemas"]["Error"];
83599
+ };
83600
+ };
83601
+ /** @description Not found */
83602
+ 404: {
83603
+ headers: {
83604
+ [name: string]: unknown;
83605
+ };
83606
+ content: {
83607
+ "application/json": components["schemas"]["Error"];
83608
+ };
83609
+ };
83610
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
83611
+ 409: {
83612
+ headers: {
83613
+ [name: string]: unknown;
83614
+ };
83615
+ content: {
83616
+ "application/json": components["schemas"]["Error"];
83617
+ };
83618
+ };
83619
+ /** @description Rate limited */
83620
+ 429: {
83621
+ headers: {
83622
+ [name: string]: unknown;
83623
+ };
83624
+ content: {
83625
+ "application/json": components["schemas"]["Error"];
83626
+ };
83627
+ };
83628
+ };
83629
+ };
83630
+ put?: never;
83631
+ post?: never;
83632
+ delete?: never;
83633
+ options?: never;
83634
+ head?: never;
83635
+ patch?: never;
83636
+ trace?: never;
83637
+ };
83183
83638
  "/appointments/reminders/plan/confirm-single-sender": {
83184
83639
  parameters: {
83185
83640
  query?: never;
@@ -83228,7 +83683,11 @@ interface paths {
83228
83683
  * "demo": "demo_confirmada_v1"
83229
83684
  * },
83230
83685
  * "asks_confirmation": false,
83231
- * "include_reschedule_link": true
83686
+ * "template": null,
83687
+ * "derived": {
83688
+ * "asks_confirmation": false,
83689
+ * "includes_link": true
83690
+ * }
83232
83691
  * },
83233
83692
  * {
83234
83693
  * "key": "h24",
@@ -83237,7 +83696,34 @@ interface paths {
83237
83696
  * "email": "fallback",
83238
83697
  * "template_name": "recordatorio_24h",
83239
83698
  * "asks_confirmation": true,
83240
- * "include_reschedule_link": true
83699
+ * "template": {
83700
+ * "name": "recordatorio_24h",
83701
+ * "language": "es",
83702
+ * "status": "APPROVED",
83703
+ * "category": "UTILITY",
83704
+ * "body_preview": "Hola {{nombre}}, te recordamos tu cita del {{fecha}} a las {{hora}}. ¿Nos confirmas?",
83705
+ * "variables": [
83706
+ * "nombre",
83707
+ * "fecha",
83708
+ * "hora"
83709
+ * ],
83710
+ * "buttons": [
83711
+ * {
83712
+ * "type": "QUICK_REPLY",
83713
+ * "text": "Confirmo"
83714
+ * },
83715
+ * {
83716
+ * "type": "QUICK_REPLY",
83717
+ * "text": "No puedo asistir"
83718
+ * }
83719
+ * ],
83720
+ * "usable": true,
83721
+ * "reasons": []
83722
+ * },
83723
+ * "derived": {
83724
+ * "asks_confirmation": true,
83725
+ * "includes_link": false
83726
+ * }
83241
83727
  * },
83242
83728
  * {
83243
83729
  * "key": "h2",
@@ -83245,7 +83731,11 @@ interface paths {
83245
83731
  * "channel": "whatsapp",
83246
83732
  * "template_name": "recordatorio_2h",
83247
83733
  * "asks_confirmation": false,
83248
- * "include_reschedule_link": false
83734
+ * "template": null,
83735
+ * "derived": {
83736
+ * "asks_confirmation": false,
83737
+ * "includes_link": true
83738
+ * }
83249
83739
  * },
83250
83740
  * {
83251
83741
  * "key": "no_show",
@@ -83255,7 +83745,11 @@ interface paths {
83255
83745
  * "email": "fallback",
83256
83746
  * "template_name": "reagendar",
83257
83747
  * "asks_confirmation": false,
83258
- * "include_reschedule_link": true
83748
+ * "template": null,
83749
+ * "derived": {
83750
+ * "asks_confirmation": false,
83751
+ * "includes_link": true
83752
+ * }
83259
83753
  * }
83260
83754
  * ],
83261
83755
  * "active": true,
@@ -83268,14 +83762,133 @@ interface paths {
83268
83762
  * "updated_at": "2026-10-11T12:00:00.000Z",
83269
83763
  * "confirm_status_id": null,
83270
83764
  * "confirm_status": null,
83271
- * "create_contacts_from_patient_phone": false
83765
+ * "create_contacts_from_patient_phone": false,
83766
+ * "messaging_account_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
83767
+ * "accounts": [
83768
+ * {
83769
+ * "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
83770
+ * "name": "Recepción",
83771
+ * "phone_number": "+56922223333",
83772
+ * "display": "Recepción · +56922223333",
83773
+ * "enabled": true
83774
+ * }
83775
+ * ],
83776
+ * "warnings": [
83777
+ * {
83778
+ * "rung_key": "welcome",
83779
+ * "code": "template_missing",
83780
+ * "message": "Plantilla (demo): no existe una plantilla «demo_confirmada_v1» en este número de WhatsApp; fuera de la ventana de 24 h no saldrá nada."
83781
+ * }
83782
+ * ]
83272
83783
  * }
83273
83784
  * }
83274
83785
  */
83275
83786
  "application/json": {
83276
- data?: unknown;
83277
- meta?: {
83278
- [key: string]: unknown;
83787
+ data: {
83788
+ /** Format: uuid */
83789
+ id: string | null;
83790
+ name: string;
83791
+ rungs: {
83792
+ key: string;
83793
+ /** @enum {string} */
83794
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
83795
+ /** @enum {string} */
83796
+ email?: "never" | "fallback" | "also";
83797
+ templates?: {
83798
+ [key: string]: string;
83799
+ };
83800
+ offset_hours: number;
83801
+ channel: string;
83802
+ template_name: string | null;
83803
+ asks_confirmation: boolean;
83804
+ template: {
83805
+ name: string;
83806
+ language: string;
83807
+ status: string;
83808
+ category: string;
83809
+ body_preview: string;
83810
+ variables: string[];
83811
+ buttons: {
83812
+ /** @enum {string} */
83813
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83814
+ text: string;
83815
+ }[];
83816
+ usable: boolean;
83817
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83818
+ } | null;
83819
+ derived: {
83820
+ asks_confirmation: boolean;
83821
+ includes_link: boolean;
83822
+ };
83823
+ }[];
83824
+ active: boolean;
83825
+ single_sender_confirmed_at: string | null;
83826
+ single_sender_confirmed_by: string | null;
83827
+ vendor_sends_reminders: boolean;
83828
+ live: boolean;
83829
+ /** @enum {string|null} */
83830
+ blocked_reason: "no_plan" | "inactive" | "single_sender_not_confirmed" | "vendor_sends_reminders" | "no_rungs" | null;
83831
+ defaults: {
83832
+ key: string;
83833
+ /** @enum {string} */
83834
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
83835
+ /** @enum {string} */
83836
+ email?: "never" | "fallback" | "also";
83837
+ templates?: {
83838
+ [key: string]: string;
83839
+ };
83840
+ offset_hours: number;
83841
+ channel: string;
83842
+ template_name: string | null;
83843
+ asks_confirmation: boolean;
83844
+ template: {
83845
+ name: string;
83846
+ language: string;
83847
+ status: string;
83848
+ category: string;
83849
+ body_preview: string;
83850
+ variables: string[];
83851
+ buttons: {
83852
+ /** @enum {string} */
83853
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
83854
+ text: string;
83855
+ }[];
83856
+ usable: boolean;
83857
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
83858
+ } | null;
83859
+ derived: {
83860
+ asks_confirmation: boolean;
83861
+ includes_link: boolean;
83862
+ };
83863
+ }[];
83864
+ updated_at: string | null;
83865
+ /** Format: uuid */
83866
+ confirm_status_id: string | null;
83867
+ confirm_status: {
83868
+ /** Format: uuid */
83869
+ id: string;
83870
+ name: string;
83871
+ external_id: string | null;
83872
+ /** @enum {string} */
83873
+ source: "configured" | "heuristic";
83874
+ } | null;
83875
+ create_contacts_from_patient_phone: boolean;
83876
+ /** Format: uuid */
83877
+ messaging_account_id: string | null;
83878
+ accounts: {
83879
+ /** Format: uuid */
83880
+ id: string;
83881
+ name: string;
83882
+ phone_number: string | null;
83883
+ display: string;
83884
+ enabled: boolean;
83885
+ }[];
83886
+ warnings: {
83887
+ rung_key: string;
83888
+ /** @enum {string} */
83889
+ code: "no_template_outside_window" | "template_missing" | "template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported" | "account_not_chosen";
83890
+ message: string;
83891
+ }[];
83279
83892
  };
83280
83893
  };
83281
83894
  };
@@ -83390,7 +84003,11 @@ interface paths {
83390
84003
  * "demo": "demo_confirmada_v1"
83391
84004
  * },
83392
84005
  * "asks_confirmation": false,
83393
- * "include_reschedule_link": true
84006
+ * "template": null,
84007
+ * "derived": {
84008
+ * "asks_confirmation": false,
84009
+ * "includes_link": true
84010
+ * }
83394
84011
  * },
83395
84012
  * {
83396
84013
  * "key": "h24",
@@ -83399,7 +84016,34 @@ interface paths {
83399
84016
  * "email": "fallback",
83400
84017
  * "template_name": "recordatorio_24h",
83401
84018
  * "asks_confirmation": true,
83402
- * "include_reschedule_link": true
84019
+ * "template": {
84020
+ * "name": "recordatorio_24h",
84021
+ * "language": "es",
84022
+ * "status": "APPROVED",
84023
+ * "category": "UTILITY",
84024
+ * "body_preview": "Hola {{nombre}}, te recordamos tu cita del {{fecha}} a las {{hora}}. ¿Nos confirmas?",
84025
+ * "variables": [
84026
+ * "nombre",
84027
+ * "fecha",
84028
+ * "hora"
84029
+ * ],
84030
+ * "buttons": [
84031
+ * {
84032
+ * "type": "QUICK_REPLY",
84033
+ * "text": "Confirmo"
84034
+ * },
84035
+ * {
84036
+ * "type": "QUICK_REPLY",
84037
+ * "text": "No puedo asistir"
84038
+ * }
84039
+ * ],
84040
+ * "usable": true,
84041
+ * "reasons": []
84042
+ * },
84043
+ * "derived": {
84044
+ * "asks_confirmation": true,
84045
+ * "includes_link": false
84046
+ * }
83403
84047
  * },
83404
84048
  * {
83405
84049
  * "key": "h2",
@@ -83407,7 +84051,11 @@ interface paths {
83407
84051
  * "channel": "whatsapp",
83408
84052
  * "template_name": "recordatorio_2h",
83409
84053
  * "asks_confirmation": false,
83410
- * "include_reschedule_link": false
84054
+ * "template": null,
84055
+ * "derived": {
84056
+ * "asks_confirmation": false,
84057
+ * "includes_link": true
84058
+ * }
83411
84059
  * },
83412
84060
  * {
83413
84061
  * "key": "no_show",
@@ -83417,7 +84065,11 @@ interface paths {
83417
84065
  * "email": "fallback",
83418
84066
  * "template_name": "reagendar",
83419
84067
  * "asks_confirmation": false,
83420
- * "include_reschedule_link": true
84068
+ * "template": null,
84069
+ * "derived": {
84070
+ * "asks_confirmation": false,
84071
+ * "includes_link": true
84072
+ * }
83421
84073
  * }
83422
84074
  * ],
83423
84075
  * "active": true,
@@ -83430,14 +84082,133 @@ interface paths {
83430
84082
  * "updated_at": "2026-10-11T12:00:00.000Z",
83431
84083
  * "confirm_status_id": null,
83432
84084
  * "confirm_status": null,
83433
- * "create_contacts_from_patient_phone": false
84085
+ * "create_contacts_from_patient_phone": false,
84086
+ * "messaging_account_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
84087
+ * "accounts": [
84088
+ * {
84089
+ * "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b20",
84090
+ * "name": "Recepción",
84091
+ * "phone_number": "+56922223333",
84092
+ * "display": "Recepción · +56922223333",
84093
+ * "enabled": true
84094
+ * }
84095
+ * ],
84096
+ * "warnings": [
84097
+ * {
84098
+ * "rung_key": "welcome",
84099
+ * "code": "template_missing",
84100
+ * "message": "Plantilla (demo): no existe una plantilla «demo_confirmada_v1» en este número de WhatsApp; fuera de la ventana de 24 h no saldrá nada."
84101
+ * }
84102
+ * ]
83434
84103
  * }
83435
84104
  * }
83436
84105
  */
83437
84106
  "application/json": {
83438
- data?: unknown;
83439
- meta?: {
83440
- [key: string]: unknown;
84107
+ data: {
84108
+ /** Format: uuid */
84109
+ id: string | null;
84110
+ name: string;
84111
+ rungs: {
84112
+ key: string;
84113
+ /** @enum {string} */
84114
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
84115
+ /** @enum {string} */
84116
+ email?: "never" | "fallback" | "also";
84117
+ templates?: {
84118
+ [key: string]: string;
84119
+ };
84120
+ offset_hours: number;
84121
+ channel: string;
84122
+ template_name: string | null;
84123
+ asks_confirmation: boolean;
84124
+ template: {
84125
+ name: string;
84126
+ language: string;
84127
+ status: string;
84128
+ category: string;
84129
+ body_preview: string;
84130
+ variables: string[];
84131
+ buttons: {
84132
+ /** @enum {string} */
84133
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
84134
+ text: string;
84135
+ }[];
84136
+ usable: boolean;
84137
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
84138
+ } | null;
84139
+ derived: {
84140
+ asks_confirmation: boolean;
84141
+ includes_link: boolean;
84142
+ };
84143
+ }[];
84144
+ active: boolean;
84145
+ single_sender_confirmed_at: string | null;
84146
+ single_sender_confirmed_by: string | null;
84147
+ vendor_sends_reminders: boolean;
84148
+ live: boolean;
84149
+ /** @enum {string|null} */
84150
+ blocked_reason: "no_plan" | "inactive" | "single_sender_not_confirmed" | "vendor_sends_reminders" | "no_rungs" | null;
84151
+ defaults: {
84152
+ key: string;
84153
+ /** @enum {string} */
84154
+ event?: "before_start" | "booked" | "no_show" | "host_changed";
84155
+ /** @enum {string} */
84156
+ email?: "never" | "fallback" | "also";
84157
+ templates?: {
84158
+ [key: string]: string;
84159
+ };
84160
+ offset_hours: number;
84161
+ channel: string;
84162
+ template_name: string | null;
84163
+ asks_confirmation: boolean;
84164
+ template: {
84165
+ name: string;
84166
+ language: string;
84167
+ status: string;
84168
+ category: string;
84169
+ body_preview: string;
84170
+ variables: string[];
84171
+ buttons: {
84172
+ /** @enum {string} */
84173
+ type: "QUICK_REPLY" | "URL" | "PHONE_NUMBER" | "FLOW";
84174
+ text: string;
84175
+ }[];
84176
+ usable: boolean;
84177
+ reasons: ("template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported")[];
84178
+ } | null;
84179
+ derived: {
84180
+ asks_confirmation: boolean;
84181
+ includes_link: boolean;
84182
+ };
84183
+ }[];
84184
+ updated_at: string | null;
84185
+ /** Format: uuid */
84186
+ confirm_status_id: string | null;
84187
+ confirm_status: {
84188
+ /** Format: uuid */
84189
+ id: string;
84190
+ name: string;
84191
+ external_id: string | null;
84192
+ /** @enum {string} */
84193
+ source: "configured" | "heuristic";
84194
+ } | null;
84195
+ create_contacts_from_patient_phone: boolean;
84196
+ /** Format: uuid */
84197
+ messaging_account_id: string | null;
84198
+ accounts: {
84199
+ /** Format: uuid */
84200
+ id: string;
84201
+ name: string;
84202
+ phone_number: string | null;
84203
+ display: string;
84204
+ enabled: boolean;
84205
+ }[];
84206
+ warnings: {
84207
+ rung_key: string;
84208
+ /** @enum {string} */
84209
+ code: "no_template_outside_window" | "template_missing" | "template_not_approved" | "template_positional_variables" | "template_unknown_variable" | "template_unsupported" | "account_not_chosen";
84210
+ message: string;
84211
+ }[];
83441
84212
  };
83442
84213
  };
83443
84214
  };