@vitrina/api 14.40.0 → 14.41.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
@@ -122703,6 +122703,259 @@ interface paths {
122703
122703
  patch?: never;
122704
122704
  trace?: never;
122705
122705
  };
122706
+ "/conversations/{id}/continue-on-whatsapp": {
122707
+ parameters: {
122708
+ query?: never;
122709
+ header?: never;
122710
+ path?: never;
122711
+ cookie?: never;
122712
+ };
122713
+ get?: never;
122714
+ put?: never;
122715
+ /**
122716
+ * Continue a conversation on WhatsApp
122717
+ * @description Continuación por WhatsApp: the dealer writes to the customer on WhatsApp to continue THIS conversation (Instagram, Messenger, web chat, voice or Marketplace — never a WhatsApp conversation), links the two conversations and hands over what was agreed. `phone` is optional: omitted, the number captured in the conversation (else the contact's) is used. The send is scheduled, never synchronous. Idempotent per (conversation, phone): asking again returns the existing Continuación (`outcome: already`, or `linked` when the customer already continues on that number from another conversation) and never sends twice; a refused or failed one is re-armed. `state` is `pending` (scheduled), `deferred` (waiting for an approved WhatsApp template, sent as soon as it is approved and never after `send_deadline_at`), `sent`, `failed` or `skipped`. A refusal is a `422` whose `details.reason` says why (`no_phone`, `no_whatsapp`, `do_not_contact`, `dealer_number`, `buyer_wrote_first`, `unsupported_channel`, `billing_paused`, `no_name`, ...). A conversation the caller cannot see is a `404`, like one that does not exist.
122718
+ */
122719
+ post: {
122720
+ parameters: {
122721
+ query?: never;
122722
+ header?: {
122723
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
122724
+ "Idempotency-Key"?: string;
122725
+ };
122726
+ path: {
122727
+ id: string;
122728
+ };
122729
+ cookie?: never;
122730
+ };
122731
+ requestBody?: {
122732
+ content: {
122733
+ /**
122734
+ * @example {
122735
+ * "phone": "+56 9 8765 4321"
122736
+ * }
122737
+ */
122738
+ "application/json": {
122739
+ phone?: string | null;
122740
+ };
122741
+ };
122742
+ };
122743
+ responses: {
122744
+ /** @description The Continuación and what this request did */
122745
+ 200: {
122746
+ headers: {
122747
+ [name: string]: unknown;
122748
+ };
122749
+ content: {
122750
+ /**
122751
+ * @example {
122752
+ * "data": {
122753
+ * "outcome": "scheduled",
122754
+ * "reason": null,
122755
+ * "continuation_id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122756
+ * "state": "pending",
122757
+ * "status": "pending",
122758
+ * "phone": "+56987654321",
122759
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122760
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122761
+ * "link_id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122762
+ * "merged_into_contact_id": null
122763
+ * }
122764
+ * }
122765
+ */
122766
+ "application/json": {
122767
+ data?: unknown;
122768
+ meta?: {
122769
+ [key: string]: unknown;
122770
+ };
122771
+ };
122772
+ };
122773
+ };
122774
+ /** @description Validation error */
122775
+ 400: {
122776
+ headers: {
122777
+ [name: string]: unknown;
122778
+ };
122779
+ content: {
122780
+ "application/json": components["schemas"]["Error"];
122781
+ };
122782
+ };
122783
+ /** @description Unauthorized */
122784
+ 401: {
122785
+ headers: {
122786
+ [name: string]: unknown;
122787
+ };
122788
+ content: {
122789
+ "application/json": components["schemas"]["Error"];
122790
+ };
122791
+ };
122792
+ /** @description Forbidden */
122793
+ 403: {
122794
+ headers: {
122795
+ [name: string]: unknown;
122796
+ };
122797
+ content: {
122798
+ "application/json": components["schemas"]["Error"];
122799
+ };
122800
+ };
122801
+ /** @description Not found */
122802
+ 404: {
122803
+ headers: {
122804
+ [name: string]: unknown;
122805
+ };
122806
+ content: {
122807
+ "application/json": components["schemas"]["Error"];
122808
+ };
122809
+ };
122810
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122811
+ 409: {
122812
+ headers: {
122813
+ [name: string]: unknown;
122814
+ };
122815
+ content: {
122816
+ "application/json": components["schemas"]["Error"];
122817
+ };
122818
+ };
122819
+ /** @description Rate limited */
122820
+ 429: {
122821
+ headers: {
122822
+ [name: string]: unknown;
122823
+ };
122824
+ content: {
122825
+ "application/json": components["schemas"]["Error"];
122826
+ };
122827
+ };
122828
+ };
122829
+ };
122830
+ delete?: never;
122831
+ options?: never;
122832
+ head?: never;
122833
+ patch?: never;
122834
+ trace?: never;
122835
+ };
122836
+ "/conversations/{id}/whatsapp-continuations": {
122837
+ parameters: {
122838
+ query?: never;
122839
+ header?: never;
122840
+ path?: never;
122841
+ cookie?: never;
122842
+ };
122843
+ /**
122844
+ * List a conversation's Continuaciones por WhatsApp
122845
+ * @description The Continuaciones started from this conversation, newest first (one per phone number). Read `state` to draw the inbox button: `pending`, `deferred` (waiting for an approved template, until `send_deadline_at`), `sent`, `failed` or `skipped` (`reason` says why). Empty when none was started. A conversation the caller cannot see is a `404`.
122846
+ */
122847
+ get: {
122848
+ parameters: {
122849
+ query?: never;
122850
+ header?: never;
122851
+ path: {
122852
+ id: string;
122853
+ };
122854
+ cookie?: never;
122855
+ };
122856
+ requestBody?: never;
122857
+ responses: {
122858
+ /** @description Continuaciones */
122859
+ 200: {
122860
+ headers: {
122861
+ [name: string]: unknown;
122862
+ };
122863
+ content: {
122864
+ /**
122865
+ * @example {
122866
+ * "data": [
122867
+ * {
122868
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122869
+ * "state": "deferred",
122870
+ * "status": "pending",
122871
+ * "reason": "template_not_approved",
122872
+ * "phone": "+56987654321",
122873
+ * "trigger": "user",
122874
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122875
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122876
+ * "captured_at": "2026-10-15T14:02:11.000Z",
122877
+ * "send_deadline_at": "2026-10-16T14:02:11.000Z",
122878
+ * "sent_at": null,
122879
+ * "created_at": "2026-10-15T14:02:11.000Z"
122880
+ * }
122881
+ * ],
122882
+ * "meta": {
122883
+ * "total": 1
122884
+ * }
122885
+ * }
122886
+ */
122887
+ "application/json": {
122888
+ data?: unknown;
122889
+ meta?: {
122890
+ [key: string]: unknown;
122891
+ };
122892
+ };
122893
+ };
122894
+ };
122895
+ /** @description Validation error */
122896
+ 400: {
122897
+ headers: {
122898
+ [name: string]: unknown;
122899
+ };
122900
+ content: {
122901
+ "application/json": components["schemas"]["Error"];
122902
+ };
122903
+ };
122904
+ /** @description Unauthorized */
122905
+ 401: {
122906
+ headers: {
122907
+ [name: string]: unknown;
122908
+ };
122909
+ content: {
122910
+ "application/json": components["schemas"]["Error"];
122911
+ };
122912
+ };
122913
+ /** @description Forbidden */
122914
+ 403: {
122915
+ headers: {
122916
+ [name: string]: unknown;
122917
+ };
122918
+ content: {
122919
+ "application/json": components["schemas"]["Error"];
122920
+ };
122921
+ };
122922
+ /** @description Not found */
122923
+ 404: {
122924
+ headers: {
122925
+ [name: string]: unknown;
122926
+ };
122927
+ content: {
122928
+ "application/json": components["schemas"]["Error"];
122929
+ };
122930
+ };
122931
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122932
+ 409: {
122933
+ headers: {
122934
+ [name: string]: unknown;
122935
+ };
122936
+ content: {
122937
+ "application/json": components["schemas"]["Error"];
122938
+ };
122939
+ };
122940
+ /** @description Rate limited */
122941
+ 429: {
122942
+ headers: {
122943
+ [name: string]: unknown;
122944
+ };
122945
+ content: {
122946
+ "application/json": components["schemas"]["Error"];
122947
+ };
122948
+ };
122949
+ };
122950
+ };
122951
+ put?: never;
122952
+ post?: never;
122953
+ delete?: never;
122954
+ options?: never;
122955
+ head?: never;
122956
+ patch?: never;
122957
+ trace?: never;
122958
+ };
122706
122959
  "/conversations/{id}/agent-turn": {
122707
122960
  parameters: {
122708
122961
  query?: never;
package/dist/index.d.ts CHANGED
@@ -122703,6 +122703,259 @@ interface paths {
122703
122703
  patch?: never;
122704
122704
  trace?: never;
122705
122705
  };
122706
+ "/conversations/{id}/continue-on-whatsapp": {
122707
+ parameters: {
122708
+ query?: never;
122709
+ header?: never;
122710
+ path?: never;
122711
+ cookie?: never;
122712
+ };
122713
+ get?: never;
122714
+ put?: never;
122715
+ /**
122716
+ * Continue a conversation on WhatsApp
122717
+ * @description Continuación por WhatsApp: the dealer writes to the customer on WhatsApp to continue THIS conversation (Instagram, Messenger, web chat, voice or Marketplace — never a WhatsApp conversation), links the two conversations and hands over what was agreed. `phone` is optional: omitted, the number captured in the conversation (else the contact's) is used. The send is scheduled, never synchronous. Idempotent per (conversation, phone): asking again returns the existing Continuación (`outcome: already`, or `linked` when the customer already continues on that number from another conversation) and never sends twice; a refused or failed one is re-armed. `state` is `pending` (scheduled), `deferred` (waiting for an approved WhatsApp template, sent as soon as it is approved and never after `send_deadline_at`), `sent`, `failed` or `skipped`. A refusal is a `422` whose `details.reason` says why (`no_phone`, `no_whatsapp`, `do_not_contact`, `dealer_number`, `buyer_wrote_first`, `unsupported_channel`, `billing_paused`, `no_name`, ...). A conversation the caller cannot see is a `404`, like one that does not exist.
122718
+ */
122719
+ post: {
122720
+ parameters: {
122721
+ query?: never;
122722
+ header?: {
122723
+ /** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
122724
+ "Idempotency-Key"?: string;
122725
+ };
122726
+ path: {
122727
+ id: string;
122728
+ };
122729
+ cookie?: never;
122730
+ };
122731
+ requestBody?: {
122732
+ content: {
122733
+ /**
122734
+ * @example {
122735
+ * "phone": "+56 9 8765 4321"
122736
+ * }
122737
+ */
122738
+ "application/json": {
122739
+ phone?: string | null;
122740
+ };
122741
+ };
122742
+ };
122743
+ responses: {
122744
+ /** @description The Continuación and what this request did */
122745
+ 200: {
122746
+ headers: {
122747
+ [name: string]: unknown;
122748
+ };
122749
+ content: {
122750
+ /**
122751
+ * @example {
122752
+ * "data": {
122753
+ * "outcome": "scheduled",
122754
+ * "reason": null,
122755
+ * "continuation_id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122756
+ * "state": "pending",
122757
+ * "status": "pending",
122758
+ * "phone": "+56987654321",
122759
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122760
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122761
+ * "link_id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122762
+ * "merged_into_contact_id": null
122763
+ * }
122764
+ * }
122765
+ */
122766
+ "application/json": {
122767
+ data?: unknown;
122768
+ meta?: {
122769
+ [key: string]: unknown;
122770
+ };
122771
+ };
122772
+ };
122773
+ };
122774
+ /** @description Validation error */
122775
+ 400: {
122776
+ headers: {
122777
+ [name: string]: unknown;
122778
+ };
122779
+ content: {
122780
+ "application/json": components["schemas"]["Error"];
122781
+ };
122782
+ };
122783
+ /** @description Unauthorized */
122784
+ 401: {
122785
+ headers: {
122786
+ [name: string]: unknown;
122787
+ };
122788
+ content: {
122789
+ "application/json": components["schemas"]["Error"];
122790
+ };
122791
+ };
122792
+ /** @description Forbidden */
122793
+ 403: {
122794
+ headers: {
122795
+ [name: string]: unknown;
122796
+ };
122797
+ content: {
122798
+ "application/json": components["schemas"]["Error"];
122799
+ };
122800
+ };
122801
+ /** @description Not found */
122802
+ 404: {
122803
+ headers: {
122804
+ [name: string]: unknown;
122805
+ };
122806
+ content: {
122807
+ "application/json": components["schemas"]["Error"];
122808
+ };
122809
+ };
122810
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122811
+ 409: {
122812
+ headers: {
122813
+ [name: string]: unknown;
122814
+ };
122815
+ content: {
122816
+ "application/json": components["schemas"]["Error"];
122817
+ };
122818
+ };
122819
+ /** @description Rate limited */
122820
+ 429: {
122821
+ headers: {
122822
+ [name: string]: unknown;
122823
+ };
122824
+ content: {
122825
+ "application/json": components["schemas"]["Error"];
122826
+ };
122827
+ };
122828
+ };
122829
+ };
122830
+ delete?: never;
122831
+ options?: never;
122832
+ head?: never;
122833
+ patch?: never;
122834
+ trace?: never;
122835
+ };
122836
+ "/conversations/{id}/whatsapp-continuations": {
122837
+ parameters: {
122838
+ query?: never;
122839
+ header?: never;
122840
+ path?: never;
122841
+ cookie?: never;
122842
+ };
122843
+ /**
122844
+ * List a conversation's Continuaciones por WhatsApp
122845
+ * @description The Continuaciones started from this conversation, newest first (one per phone number). Read `state` to draw the inbox button: `pending`, `deferred` (waiting for an approved template, until `send_deadline_at`), `sent`, `failed` or `skipped` (`reason` says why). Empty when none was started. A conversation the caller cannot see is a `404`.
122846
+ */
122847
+ get: {
122848
+ parameters: {
122849
+ query?: never;
122850
+ header?: never;
122851
+ path: {
122852
+ id: string;
122853
+ };
122854
+ cookie?: never;
122855
+ };
122856
+ requestBody?: never;
122857
+ responses: {
122858
+ /** @description Continuaciones */
122859
+ 200: {
122860
+ headers: {
122861
+ [name: string]: unknown;
122862
+ };
122863
+ content: {
122864
+ /**
122865
+ * @example {
122866
+ * "data": [
122867
+ * {
122868
+ * "id": "0c4f7a92-1e6b-4d38-8a5f-63b2e9d1c470",
122869
+ * "state": "deferred",
122870
+ * "status": "pending",
122871
+ * "reason": "template_not_approved",
122872
+ * "phone": "+56987654321",
122873
+ * "trigger": "user",
122874
+ * "source_conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
122875
+ * "continuation_conversation_id": "5a8e2c41-7b3d-4f19-9c06-2d7e4b1a8f53",
122876
+ * "captured_at": "2026-10-15T14:02:11.000Z",
122877
+ * "send_deadline_at": "2026-10-16T14:02:11.000Z",
122878
+ * "sent_at": null,
122879
+ * "created_at": "2026-10-15T14:02:11.000Z"
122880
+ * }
122881
+ * ],
122882
+ * "meta": {
122883
+ * "total": 1
122884
+ * }
122885
+ * }
122886
+ */
122887
+ "application/json": {
122888
+ data?: unknown;
122889
+ meta?: {
122890
+ [key: string]: unknown;
122891
+ };
122892
+ };
122893
+ };
122894
+ };
122895
+ /** @description Validation error */
122896
+ 400: {
122897
+ headers: {
122898
+ [name: string]: unknown;
122899
+ };
122900
+ content: {
122901
+ "application/json": components["schemas"]["Error"];
122902
+ };
122903
+ };
122904
+ /** @description Unauthorized */
122905
+ 401: {
122906
+ headers: {
122907
+ [name: string]: unknown;
122908
+ };
122909
+ content: {
122910
+ "application/json": components["schemas"]["Error"];
122911
+ };
122912
+ };
122913
+ /** @description Forbidden */
122914
+ 403: {
122915
+ headers: {
122916
+ [name: string]: unknown;
122917
+ };
122918
+ content: {
122919
+ "application/json": components["schemas"]["Error"];
122920
+ };
122921
+ };
122922
+ /** @description Not found */
122923
+ 404: {
122924
+ headers: {
122925
+ [name: string]: unknown;
122926
+ };
122927
+ content: {
122928
+ "application/json": components["schemas"]["Error"];
122929
+ };
122930
+ };
122931
+ /** @description Conflict (incl. Idempotency-Key reuse with different body) */
122932
+ 409: {
122933
+ headers: {
122934
+ [name: string]: unknown;
122935
+ };
122936
+ content: {
122937
+ "application/json": components["schemas"]["Error"];
122938
+ };
122939
+ };
122940
+ /** @description Rate limited */
122941
+ 429: {
122942
+ headers: {
122943
+ [name: string]: unknown;
122944
+ };
122945
+ content: {
122946
+ "application/json": components["schemas"]["Error"];
122947
+ };
122948
+ };
122949
+ };
122950
+ };
122951
+ put?: never;
122952
+ post?: never;
122953
+ delete?: never;
122954
+ options?: never;
122955
+ head?: never;
122956
+ patch?: never;
122957
+ trace?: never;
122958
+ };
122706
122959
  "/conversations/{id}/agent-turn": {
122707
122960
  parameters: {
122708
122961
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrina/api",
3
- "version": "14.40.0",
3
+ "version": "14.41.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",