@vitrina/api 14.23.0 → 14.25.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.cts CHANGED
@@ -167721,6 +167721,384 @@ interface paths {
167721
167721
  patch?: never;
167722
167722
  trace?: never;
167723
167723
  };
167724
+ "/digest/config": {
167725
+ parameters: {
167726
+ query?: never;
167727
+ header?: never;
167728
+ path?: never;
167729
+ cookie?: never;
167730
+ };
167731
+ /**
167732
+ * Get the Monday-digest configuration
167733
+ * @description The tenant's digest config (created with its defaults — enabled, Monday 08:00 America/Santiago, email on, WhatsApp OFF — on first read if no row exists yet; WhatsApp sends cost money, so an admin opts in with `whatsapp_enabled: true`, which submits the summary templates to Meta) alongside the RESOLVED recipient list: one entry per active workspace member, with their effective variant(s) (`owner`/`seller`), per-channel eligibility, opt-out state and normalized phone (or a skip reason when none is usable). A member with no explicit override shows the role-derived default (`source: "role_default"`); one who has been customized shows `source: "explicit"`. `whatsapp_templates` reports the WhatsApp templates: `status` is `off` | `no_whatsapp` | `pending` | `ready` | `attention` | `unknown`, with one `templates[]` row per (entry `owner`|`seller`, number) carrying `state` (`missing`|`pending`|`approved`|`rejected`|`blocked`) and `rejection_reason`.
167734
+ */
167735
+ get: {
167736
+ parameters: {
167737
+ query?: never;
167738
+ header?: never;
167739
+ path?: never;
167740
+ cookie?: never;
167741
+ };
167742
+ requestBody?: never;
167743
+ responses: {
167744
+ /** @description The digest config and resolved recipient list */
167745
+ 200: {
167746
+ headers: {
167747
+ [name: string]: unknown;
167748
+ };
167749
+ content: {
167750
+ /**
167751
+ * @example {
167752
+ * "data": {
167753
+ * "config": {
167754
+ * "id": "d1d1d1d1-0000-4000-8000-000000000001",
167755
+ * "tenant_id": "20000000-0000-4000-8000-000000000002",
167756
+ * "enabled": true,
167757
+ * "send_weekday": 1,
167758
+ * "send_hour": 8,
167759
+ * "send_minute": 0,
167760
+ * "timezone": "America/Santiago",
167761
+ * "whatsapp_enabled": false,
167762
+ * "email_enabled": true,
167763
+ * "enabled_at": "2026-10-15T12:00:00.000Z",
167764
+ * "created_at": "2026-10-15T12:00:00.000Z",
167765
+ * "updated_at": "2026-10-15T12:00:00.000Z"
167766
+ * },
167767
+ * "recipients": [
167768
+ * {
167769
+ * "user_id": "20000000-0000-4000-8000-000000000001",
167770
+ * "variants": [
167771
+ * "owner"
167772
+ * ],
167773
+ * "whatsapp_enabled": true,
167774
+ * "email_enabled": true,
167775
+ * "opted_out": false,
167776
+ * "phone_e164": "+56911111111",
167777
+ * "phone_skip_reason": null,
167778
+ * "source": "role_default"
167779
+ * }
167780
+ * ],
167781
+ * "whatsapp_templates": {
167782
+ * "status": "off",
167783
+ * "templates": []
167784
+ * }
167785
+ * }
167786
+ * }
167787
+ */
167788
+ "application/json": {
167789
+ data: {
167790
+ config: {
167791
+ /** Format: uuid */
167792
+ id: string;
167793
+ /** Format: uuid */
167794
+ tenant_id: string;
167795
+ enabled: boolean;
167796
+ send_weekday: number;
167797
+ send_hour: number;
167798
+ send_minute: number;
167799
+ timezone: string;
167800
+ whatsapp_enabled: boolean;
167801
+ email_enabled: boolean;
167802
+ enabled_at: string;
167803
+ created_at: string;
167804
+ updated_at: string;
167805
+ };
167806
+ recipients: {
167807
+ /** Format: uuid */
167808
+ user_id: string;
167809
+ variants: ("owner" | "seller")[];
167810
+ whatsapp_enabled: boolean;
167811
+ email_enabled: boolean;
167812
+ opted_out: boolean;
167813
+ phone_e164: string | null;
167814
+ /** @enum {string|null} */
167815
+ phone_skip_reason: "no_phone" | "unparsable" | null;
167816
+ /** @enum {string} */
167817
+ source: "explicit" | "role_default";
167818
+ }[];
167819
+ whatsapp_templates: {
167820
+ /** @enum {string} */
167821
+ status: "off" | "no_whatsapp" | "pending" | "ready" | "attention" | "unknown";
167822
+ templates: {
167823
+ /** @enum {string} */
167824
+ entry: "owner" | "seller";
167825
+ /** Format: uuid */
167826
+ messaging_account_id: string;
167827
+ name: string;
167828
+ /** @enum {string} */
167829
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
167830
+ rejection_reason: string | null;
167831
+ }[];
167832
+ };
167833
+ };
167834
+ };
167835
+ };
167836
+ };
167837
+ /** @description Validation error */
167838
+ 400: {
167839
+ headers: {
167840
+ [name: string]: unknown;
167841
+ };
167842
+ content: {
167843
+ "application/json": components["schemas"]["Error"];
167844
+ };
167845
+ };
167846
+ /** @description Unauthorized */
167847
+ 401: {
167848
+ headers: {
167849
+ [name: string]: unknown;
167850
+ };
167851
+ content: {
167852
+ "application/json": components["schemas"]["Error"];
167853
+ };
167854
+ };
167855
+ /** @description Forbidden */
167856
+ 403: {
167857
+ headers: {
167858
+ [name: string]: unknown;
167859
+ };
167860
+ content: {
167861
+ "application/json": components["schemas"]["Error"];
167862
+ };
167863
+ };
167864
+ /** @description Not found */
167865
+ 404: {
167866
+ headers: {
167867
+ [name: string]: unknown;
167868
+ };
167869
+ content: {
167870
+ "application/json": components["schemas"]["Error"];
167871
+ };
167872
+ };
167873
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
167874
+ 409: {
167875
+ headers: {
167876
+ [name: string]: unknown;
167877
+ };
167878
+ content: {
167879
+ "application/json": components["schemas"]["Error"];
167880
+ };
167881
+ };
167882
+ /** @description Rate limited */
167883
+ 429: {
167884
+ headers: {
167885
+ [name: string]: unknown;
167886
+ };
167887
+ content: {
167888
+ "application/json": components["schemas"]["Error"];
167889
+ };
167890
+ };
167891
+ };
167892
+ };
167893
+ /**
167894
+ * Update the Monday-digest configuration
167895
+ * @description A PUT that behaves as a PATCH: only the fields present are applied. `recipients`, if present, is a batch of per-user overrides applied in the SAME request — each entry upserts the explicit `digest_recipient` row for that `user_id` (creating it on first customization), so a settings page can save the schedule and the roster edits together. `opted_out: true` opts a recipient out (same effect as them clicking the signed email link); `opted_out: false` clears a prior opt-out. Returns the same shape as the GET.
167896
+ */
167897
+ put: {
167898
+ parameters: {
167899
+ query?: never;
167900
+ header?: never;
167901
+ path?: never;
167902
+ cookie?: never;
167903
+ };
167904
+ requestBody?: {
167905
+ content: {
167906
+ /**
167907
+ * @example {
167908
+ * "whatsapp_enabled": true
167909
+ * }
167910
+ */
167911
+ "application/json": {
167912
+ enabled?: boolean;
167913
+ send_weekday?: number;
167914
+ send_hour?: number;
167915
+ send_minute?: number;
167916
+ timezone?: string;
167917
+ whatsapp_enabled?: boolean;
167918
+ email_enabled?: boolean;
167919
+ recipients?: {
167920
+ /** Format: uuid */
167921
+ user_id: string;
167922
+ variants?: ("owner" | "seller")[];
167923
+ whatsapp_enabled?: boolean;
167924
+ email_enabled?: boolean;
167925
+ opted_out?: boolean;
167926
+ }[];
167927
+ };
167928
+ };
167929
+ };
167930
+ responses: {
167931
+ /** @description The updated digest config and resolved recipient list */
167932
+ 200: {
167933
+ headers: {
167934
+ [name: string]: unknown;
167935
+ };
167936
+ content: {
167937
+ /**
167938
+ * @example {
167939
+ * "data": {
167940
+ * "config": {
167941
+ * "id": "d1d1d1d1-0000-4000-8000-000000000001",
167942
+ * "tenant_id": "20000000-0000-4000-8000-000000000002",
167943
+ * "enabled": true,
167944
+ * "send_weekday": 1,
167945
+ * "send_hour": 8,
167946
+ * "send_minute": 0,
167947
+ * "timezone": "America/Santiago",
167948
+ * "whatsapp_enabled": true,
167949
+ * "email_enabled": true,
167950
+ * "enabled_at": "2026-10-15T12:00:00.000Z",
167951
+ * "created_at": "2026-10-15T12:00:00.000Z",
167952
+ * "updated_at": "2026-10-15T12:00:00.000Z"
167953
+ * },
167954
+ * "recipients": [
167955
+ * {
167956
+ * "user_id": "20000000-0000-4000-8000-000000000001",
167957
+ * "variants": [
167958
+ * "owner"
167959
+ * ],
167960
+ * "whatsapp_enabled": true,
167961
+ * "email_enabled": true,
167962
+ * "opted_out": false,
167963
+ * "phone_e164": "+56911111111",
167964
+ * "phone_skip_reason": null,
167965
+ * "source": "role_default"
167966
+ * }
167967
+ * ],
167968
+ * "whatsapp_templates": {
167969
+ * "status": "pending",
167970
+ * "templates": [
167971
+ * {
167972
+ * "entry": "owner",
167973
+ * "messaging_account_id": "a1a1a1a1-0000-4000-8000-000000000001",
167974
+ * "name": "resumen_semanal_v2",
167975
+ * "state": "pending",
167976
+ * "rejection_reason": null
167977
+ * },
167978
+ * {
167979
+ * "entry": "seller",
167980
+ * "messaging_account_id": "a1a1a1a1-0000-4000-8000-000000000001",
167981
+ * "name": "resumen_vendedor_v2",
167982
+ * "state": "pending",
167983
+ * "rejection_reason": null
167984
+ * }
167985
+ * ]
167986
+ * }
167987
+ * }
167988
+ * }
167989
+ */
167990
+ "application/json": {
167991
+ data: {
167992
+ config: {
167993
+ /** Format: uuid */
167994
+ id: string;
167995
+ /** Format: uuid */
167996
+ tenant_id: string;
167997
+ enabled: boolean;
167998
+ send_weekday: number;
167999
+ send_hour: number;
168000
+ send_minute: number;
168001
+ timezone: string;
168002
+ whatsapp_enabled: boolean;
168003
+ email_enabled: boolean;
168004
+ enabled_at: string;
168005
+ created_at: string;
168006
+ updated_at: string;
168007
+ };
168008
+ recipients: {
168009
+ /** Format: uuid */
168010
+ user_id: string;
168011
+ variants: ("owner" | "seller")[];
168012
+ whatsapp_enabled: boolean;
168013
+ email_enabled: boolean;
168014
+ opted_out: boolean;
168015
+ phone_e164: string | null;
168016
+ /** @enum {string|null} */
168017
+ phone_skip_reason: "no_phone" | "unparsable" | null;
168018
+ /** @enum {string} */
168019
+ source: "explicit" | "role_default";
168020
+ }[];
168021
+ whatsapp_templates: {
168022
+ /** @enum {string} */
168023
+ status: "off" | "no_whatsapp" | "pending" | "ready" | "attention" | "unknown";
168024
+ templates: {
168025
+ /** @enum {string} */
168026
+ entry: "owner" | "seller";
168027
+ /** Format: uuid */
168028
+ messaging_account_id: string;
168029
+ name: string;
168030
+ /** @enum {string} */
168031
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
168032
+ rejection_reason: string | null;
168033
+ }[];
168034
+ };
168035
+ };
168036
+ };
168037
+ };
168038
+ };
168039
+ /** @description Validation error */
168040
+ 400: {
168041
+ headers: {
168042
+ [name: string]: unknown;
168043
+ };
168044
+ content: {
168045
+ "application/json": components["schemas"]["Error"];
168046
+ };
168047
+ };
168048
+ /** @description Unauthorized */
168049
+ 401: {
168050
+ headers: {
168051
+ [name: string]: unknown;
168052
+ };
168053
+ content: {
168054
+ "application/json": components["schemas"]["Error"];
168055
+ };
168056
+ };
168057
+ /** @description Forbidden */
168058
+ 403: {
168059
+ headers: {
168060
+ [name: string]: unknown;
168061
+ };
168062
+ content: {
168063
+ "application/json": components["schemas"]["Error"];
168064
+ };
168065
+ };
168066
+ /** @description Not found */
168067
+ 404: {
168068
+ headers: {
168069
+ [name: string]: unknown;
168070
+ };
168071
+ content: {
168072
+ "application/json": components["schemas"]["Error"];
168073
+ };
168074
+ };
168075
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
168076
+ 409: {
168077
+ headers: {
168078
+ [name: string]: unknown;
168079
+ };
168080
+ content: {
168081
+ "application/json": components["schemas"]["Error"];
168082
+ };
168083
+ };
168084
+ /** @description Rate limited */
168085
+ 429: {
168086
+ headers: {
168087
+ [name: string]: unknown;
168088
+ };
168089
+ content: {
168090
+ "application/json": components["schemas"]["Error"];
168091
+ };
168092
+ };
168093
+ };
168094
+ };
168095
+ post?: never;
168096
+ delete?: never;
168097
+ options?: never;
168098
+ head?: never;
168099
+ patch?: never;
168100
+ trace?: never;
168101
+ };
167724
168102
  "/tags": {
167725
168103
  parameters: {
167726
168104
  query?: never;
@@ -184676,6 +185054,26 @@ interface components {
184676
185054
  [key: string]: string;
184677
185055
  };
184678
185056
  };
185057
+ /** @description The stored tenant voice (brand name + tú/usted) customer-facing WhatsApp templates are written in; absent until set. */
185058
+ voice?: {
185059
+ /** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
185060
+ brand_name?: string;
185061
+ /**
185062
+ * @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
185063
+ * @enum {string}
185064
+ */
185065
+ register?: "tu" | "usted";
185066
+ };
185067
+ /** @description Read-only: the voice templates are actually written in (stored value or default), with where each part came from. Ignored on write. */
185068
+ voice_resolved?: {
185069
+ brand_name: string;
185070
+ /** @enum {string} */
185071
+ register: "tu" | "usted";
185072
+ /** @enum {string} */
185073
+ brand_name_source: "stored" | "workspace_name";
185074
+ /** @enum {string} */
185075
+ register_source: "stored" | "vertical_default";
185076
+ };
184679
185077
  /**
184680
185078
  * @description Write-only secret: the Slack incoming-webhook URL is never returned. `••••` when one is configured; absent otherwise. Read `slack_webhook_configured` instead.
184681
185079
  * @enum {string}
@@ -184719,6 +185117,15 @@ interface components {
184719
185117
  evaluation_price?: number;
184720
185118
  }[] | null;
184721
185119
  };
185120
+ voice?: {
185121
+ /** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
185122
+ brand_name?: string;
185123
+ /**
185124
+ * @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
185125
+ * @enum {string}
185126
+ */
185127
+ register?: "tu" | "usted";
185128
+ } | null;
184722
185129
  };
184723
185130
  LiveUsage: {
184724
185131
  as_of: string;
package/dist/index.d.ts CHANGED
@@ -167721,6 +167721,384 @@ interface paths {
167721
167721
  patch?: never;
167722
167722
  trace?: never;
167723
167723
  };
167724
+ "/digest/config": {
167725
+ parameters: {
167726
+ query?: never;
167727
+ header?: never;
167728
+ path?: never;
167729
+ cookie?: never;
167730
+ };
167731
+ /**
167732
+ * Get the Monday-digest configuration
167733
+ * @description The tenant's digest config (created with its defaults — enabled, Monday 08:00 America/Santiago, email on, WhatsApp OFF — on first read if no row exists yet; WhatsApp sends cost money, so an admin opts in with `whatsapp_enabled: true`, which submits the summary templates to Meta) alongside the RESOLVED recipient list: one entry per active workspace member, with their effective variant(s) (`owner`/`seller`), per-channel eligibility, opt-out state and normalized phone (or a skip reason when none is usable). A member with no explicit override shows the role-derived default (`source: "role_default"`); one who has been customized shows `source: "explicit"`. `whatsapp_templates` reports the WhatsApp templates: `status` is `off` | `no_whatsapp` | `pending` | `ready` | `attention` | `unknown`, with one `templates[]` row per (entry `owner`|`seller`, number) carrying `state` (`missing`|`pending`|`approved`|`rejected`|`blocked`) and `rejection_reason`.
167734
+ */
167735
+ get: {
167736
+ parameters: {
167737
+ query?: never;
167738
+ header?: never;
167739
+ path?: never;
167740
+ cookie?: never;
167741
+ };
167742
+ requestBody?: never;
167743
+ responses: {
167744
+ /** @description The digest config and resolved recipient list */
167745
+ 200: {
167746
+ headers: {
167747
+ [name: string]: unknown;
167748
+ };
167749
+ content: {
167750
+ /**
167751
+ * @example {
167752
+ * "data": {
167753
+ * "config": {
167754
+ * "id": "d1d1d1d1-0000-4000-8000-000000000001",
167755
+ * "tenant_id": "20000000-0000-4000-8000-000000000002",
167756
+ * "enabled": true,
167757
+ * "send_weekday": 1,
167758
+ * "send_hour": 8,
167759
+ * "send_minute": 0,
167760
+ * "timezone": "America/Santiago",
167761
+ * "whatsapp_enabled": false,
167762
+ * "email_enabled": true,
167763
+ * "enabled_at": "2026-10-15T12:00:00.000Z",
167764
+ * "created_at": "2026-10-15T12:00:00.000Z",
167765
+ * "updated_at": "2026-10-15T12:00:00.000Z"
167766
+ * },
167767
+ * "recipients": [
167768
+ * {
167769
+ * "user_id": "20000000-0000-4000-8000-000000000001",
167770
+ * "variants": [
167771
+ * "owner"
167772
+ * ],
167773
+ * "whatsapp_enabled": true,
167774
+ * "email_enabled": true,
167775
+ * "opted_out": false,
167776
+ * "phone_e164": "+56911111111",
167777
+ * "phone_skip_reason": null,
167778
+ * "source": "role_default"
167779
+ * }
167780
+ * ],
167781
+ * "whatsapp_templates": {
167782
+ * "status": "off",
167783
+ * "templates": []
167784
+ * }
167785
+ * }
167786
+ * }
167787
+ */
167788
+ "application/json": {
167789
+ data: {
167790
+ config: {
167791
+ /** Format: uuid */
167792
+ id: string;
167793
+ /** Format: uuid */
167794
+ tenant_id: string;
167795
+ enabled: boolean;
167796
+ send_weekday: number;
167797
+ send_hour: number;
167798
+ send_minute: number;
167799
+ timezone: string;
167800
+ whatsapp_enabled: boolean;
167801
+ email_enabled: boolean;
167802
+ enabled_at: string;
167803
+ created_at: string;
167804
+ updated_at: string;
167805
+ };
167806
+ recipients: {
167807
+ /** Format: uuid */
167808
+ user_id: string;
167809
+ variants: ("owner" | "seller")[];
167810
+ whatsapp_enabled: boolean;
167811
+ email_enabled: boolean;
167812
+ opted_out: boolean;
167813
+ phone_e164: string | null;
167814
+ /** @enum {string|null} */
167815
+ phone_skip_reason: "no_phone" | "unparsable" | null;
167816
+ /** @enum {string} */
167817
+ source: "explicit" | "role_default";
167818
+ }[];
167819
+ whatsapp_templates: {
167820
+ /** @enum {string} */
167821
+ status: "off" | "no_whatsapp" | "pending" | "ready" | "attention" | "unknown";
167822
+ templates: {
167823
+ /** @enum {string} */
167824
+ entry: "owner" | "seller";
167825
+ /** Format: uuid */
167826
+ messaging_account_id: string;
167827
+ name: string;
167828
+ /** @enum {string} */
167829
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
167830
+ rejection_reason: string | null;
167831
+ }[];
167832
+ };
167833
+ };
167834
+ };
167835
+ };
167836
+ };
167837
+ /** @description Validation error */
167838
+ 400: {
167839
+ headers: {
167840
+ [name: string]: unknown;
167841
+ };
167842
+ content: {
167843
+ "application/json": components["schemas"]["Error"];
167844
+ };
167845
+ };
167846
+ /** @description Unauthorized */
167847
+ 401: {
167848
+ headers: {
167849
+ [name: string]: unknown;
167850
+ };
167851
+ content: {
167852
+ "application/json": components["schemas"]["Error"];
167853
+ };
167854
+ };
167855
+ /** @description Forbidden */
167856
+ 403: {
167857
+ headers: {
167858
+ [name: string]: unknown;
167859
+ };
167860
+ content: {
167861
+ "application/json": components["schemas"]["Error"];
167862
+ };
167863
+ };
167864
+ /** @description Not found */
167865
+ 404: {
167866
+ headers: {
167867
+ [name: string]: unknown;
167868
+ };
167869
+ content: {
167870
+ "application/json": components["schemas"]["Error"];
167871
+ };
167872
+ };
167873
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
167874
+ 409: {
167875
+ headers: {
167876
+ [name: string]: unknown;
167877
+ };
167878
+ content: {
167879
+ "application/json": components["schemas"]["Error"];
167880
+ };
167881
+ };
167882
+ /** @description Rate limited */
167883
+ 429: {
167884
+ headers: {
167885
+ [name: string]: unknown;
167886
+ };
167887
+ content: {
167888
+ "application/json": components["schemas"]["Error"];
167889
+ };
167890
+ };
167891
+ };
167892
+ };
167893
+ /**
167894
+ * Update the Monday-digest configuration
167895
+ * @description A PUT that behaves as a PATCH: only the fields present are applied. `recipients`, if present, is a batch of per-user overrides applied in the SAME request — each entry upserts the explicit `digest_recipient` row for that `user_id` (creating it on first customization), so a settings page can save the schedule and the roster edits together. `opted_out: true` opts a recipient out (same effect as them clicking the signed email link); `opted_out: false` clears a prior opt-out. Returns the same shape as the GET.
167896
+ */
167897
+ put: {
167898
+ parameters: {
167899
+ query?: never;
167900
+ header?: never;
167901
+ path?: never;
167902
+ cookie?: never;
167903
+ };
167904
+ requestBody?: {
167905
+ content: {
167906
+ /**
167907
+ * @example {
167908
+ * "whatsapp_enabled": true
167909
+ * }
167910
+ */
167911
+ "application/json": {
167912
+ enabled?: boolean;
167913
+ send_weekday?: number;
167914
+ send_hour?: number;
167915
+ send_minute?: number;
167916
+ timezone?: string;
167917
+ whatsapp_enabled?: boolean;
167918
+ email_enabled?: boolean;
167919
+ recipients?: {
167920
+ /** Format: uuid */
167921
+ user_id: string;
167922
+ variants?: ("owner" | "seller")[];
167923
+ whatsapp_enabled?: boolean;
167924
+ email_enabled?: boolean;
167925
+ opted_out?: boolean;
167926
+ }[];
167927
+ };
167928
+ };
167929
+ };
167930
+ responses: {
167931
+ /** @description The updated digest config and resolved recipient list */
167932
+ 200: {
167933
+ headers: {
167934
+ [name: string]: unknown;
167935
+ };
167936
+ content: {
167937
+ /**
167938
+ * @example {
167939
+ * "data": {
167940
+ * "config": {
167941
+ * "id": "d1d1d1d1-0000-4000-8000-000000000001",
167942
+ * "tenant_id": "20000000-0000-4000-8000-000000000002",
167943
+ * "enabled": true,
167944
+ * "send_weekday": 1,
167945
+ * "send_hour": 8,
167946
+ * "send_minute": 0,
167947
+ * "timezone": "America/Santiago",
167948
+ * "whatsapp_enabled": true,
167949
+ * "email_enabled": true,
167950
+ * "enabled_at": "2026-10-15T12:00:00.000Z",
167951
+ * "created_at": "2026-10-15T12:00:00.000Z",
167952
+ * "updated_at": "2026-10-15T12:00:00.000Z"
167953
+ * },
167954
+ * "recipients": [
167955
+ * {
167956
+ * "user_id": "20000000-0000-4000-8000-000000000001",
167957
+ * "variants": [
167958
+ * "owner"
167959
+ * ],
167960
+ * "whatsapp_enabled": true,
167961
+ * "email_enabled": true,
167962
+ * "opted_out": false,
167963
+ * "phone_e164": "+56911111111",
167964
+ * "phone_skip_reason": null,
167965
+ * "source": "role_default"
167966
+ * }
167967
+ * ],
167968
+ * "whatsapp_templates": {
167969
+ * "status": "pending",
167970
+ * "templates": [
167971
+ * {
167972
+ * "entry": "owner",
167973
+ * "messaging_account_id": "a1a1a1a1-0000-4000-8000-000000000001",
167974
+ * "name": "resumen_semanal_v2",
167975
+ * "state": "pending",
167976
+ * "rejection_reason": null
167977
+ * },
167978
+ * {
167979
+ * "entry": "seller",
167980
+ * "messaging_account_id": "a1a1a1a1-0000-4000-8000-000000000001",
167981
+ * "name": "resumen_vendedor_v2",
167982
+ * "state": "pending",
167983
+ * "rejection_reason": null
167984
+ * }
167985
+ * ]
167986
+ * }
167987
+ * }
167988
+ * }
167989
+ */
167990
+ "application/json": {
167991
+ data: {
167992
+ config: {
167993
+ /** Format: uuid */
167994
+ id: string;
167995
+ /** Format: uuid */
167996
+ tenant_id: string;
167997
+ enabled: boolean;
167998
+ send_weekday: number;
167999
+ send_hour: number;
168000
+ send_minute: number;
168001
+ timezone: string;
168002
+ whatsapp_enabled: boolean;
168003
+ email_enabled: boolean;
168004
+ enabled_at: string;
168005
+ created_at: string;
168006
+ updated_at: string;
168007
+ };
168008
+ recipients: {
168009
+ /** Format: uuid */
168010
+ user_id: string;
168011
+ variants: ("owner" | "seller")[];
168012
+ whatsapp_enabled: boolean;
168013
+ email_enabled: boolean;
168014
+ opted_out: boolean;
168015
+ phone_e164: string | null;
168016
+ /** @enum {string|null} */
168017
+ phone_skip_reason: "no_phone" | "unparsable" | null;
168018
+ /** @enum {string} */
168019
+ source: "explicit" | "role_default";
168020
+ }[];
168021
+ whatsapp_templates: {
168022
+ /** @enum {string} */
168023
+ status: "off" | "no_whatsapp" | "pending" | "ready" | "attention" | "unknown";
168024
+ templates: {
168025
+ /** @enum {string} */
168026
+ entry: "owner" | "seller";
168027
+ /** Format: uuid */
168028
+ messaging_account_id: string;
168029
+ name: string;
168030
+ /** @enum {string} */
168031
+ state: "missing" | "pending" | "approved" | "rejected" | "blocked";
168032
+ rejection_reason: string | null;
168033
+ }[];
168034
+ };
168035
+ };
168036
+ };
168037
+ };
168038
+ };
168039
+ /** @description Validation error */
168040
+ 400: {
168041
+ headers: {
168042
+ [name: string]: unknown;
168043
+ };
168044
+ content: {
168045
+ "application/json": components["schemas"]["Error"];
168046
+ };
168047
+ };
168048
+ /** @description Unauthorized */
168049
+ 401: {
168050
+ headers: {
168051
+ [name: string]: unknown;
168052
+ };
168053
+ content: {
168054
+ "application/json": components["schemas"]["Error"];
168055
+ };
168056
+ };
168057
+ /** @description Forbidden */
168058
+ 403: {
168059
+ headers: {
168060
+ [name: string]: unknown;
168061
+ };
168062
+ content: {
168063
+ "application/json": components["schemas"]["Error"];
168064
+ };
168065
+ };
168066
+ /** @description Not found */
168067
+ 404: {
168068
+ headers: {
168069
+ [name: string]: unknown;
168070
+ };
168071
+ content: {
168072
+ "application/json": components["schemas"]["Error"];
168073
+ };
168074
+ };
168075
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
168076
+ 409: {
168077
+ headers: {
168078
+ [name: string]: unknown;
168079
+ };
168080
+ content: {
168081
+ "application/json": components["schemas"]["Error"];
168082
+ };
168083
+ };
168084
+ /** @description Rate limited */
168085
+ 429: {
168086
+ headers: {
168087
+ [name: string]: unknown;
168088
+ };
168089
+ content: {
168090
+ "application/json": components["schemas"]["Error"];
168091
+ };
168092
+ };
168093
+ };
168094
+ };
168095
+ post?: never;
168096
+ delete?: never;
168097
+ options?: never;
168098
+ head?: never;
168099
+ patch?: never;
168100
+ trace?: never;
168101
+ };
167724
168102
  "/tags": {
167725
168103
  parameters: {
167726
168104
  query?: never;
@@ -184676,6 +185054,26 @@ interface components {
184676
185054
  [key: string]: string;
184677
185055
  };
184678
185056
  };
185057
+ /** @description The stored tenant voice (brand name + tú/usted) customer-facing WhatsApp templates are written in; absent until set. */
185058
+ voice?: {
185059
+ /** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
185060
+ brand_name?: string;
185061
+ /**
185062
+ * @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
185063
+ * @enum {string}
185064
+ */
185065
+ register?: "tu" | "usted";
185066
+ };
185067
+ /** @description Read-only: the voice templates are actually written in (stored value or default), with where each part came from. Ignored on write. */
185068
+ voice_resolved?: {
185069
+ brand_name: string;
185070
+ /** @enum {string} */
185071
+ register: "tu" | "usted";
185072
+ /** @enum {string} */
185073
+ brand_name_source: "stored" | "workspace_name";
185074
+ /** @enum {string} */
185075
+ register_source: "stored" | "vertical_default";
185076
+ };
184679
185077
  /**
184680
185078
  * @description Write-only secret: the Slack incoming-webhook URL is never returned. `••••` when one is configured; absent otherwise. Read `slack_webhook_configured` instead.
184681
185079
  * @enum {string}
@@ -184719,6 +185117,15 @@ interface components {
184719
185117
  evaluation_price?: number;
184720
185118
  }[] | null;
184721
185119
  };
185120
+ voice?: {
185121
+ /** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
185122
+ brand_name?: string;
185123
+ /**
185124
+ * @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
185125
+ * @enum {string}
185126
+ */
185127
+ register?: "tu" | "usted";
185128
+ } | null;
184722
185129
  };
184723
185130
  LiveUsage: {
184724
185131
  as_of: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.23.0",
3
+ "version": "14.25.0",
4
4
  "description": "Typed TypeScript SDK for the Vitrina API pública — generated from the committed openapi.public.json (ADR 0106).",
5
5
  "type": "module",
6
6
  "license": "MIT",