wavix-ruby-sdk 1.5.0 → 1.6.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.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +3 -3
  3. data/.fern/replay.lock +7 -1
  4. data/lib/wavix/client.rb +1 -1
  5. data/lib/wavix/types/whats_app_contact_marketing_preference_event_data.rb +13 -0
  6. data/lib/wavix/types/whats_app_contact_marketing_resumed_event.rb +16 -0
  7. data/lib/wavix/types/whats_app_contact_marketing_stopped_event.rb +16 -0
  8. data/lib/wavix/types/whats_app_event.rb +18 -0
  9. data/lib/wavix/types/whats_app_event_list_response.rb +15 -0
  10. data/lib/wavix/types/whats_app_event_type.rb +32 -0
  11. data/lib/wavix/types/whats_app_inbound_audio_content.rb +11 -0
  12. data/lib/wavix/types/whats_app_inbound_button_reply.rb +12 -0
  13. data/lib/wavix/types/whats_app_inbound_button_reply_content.rb +11 -0
  14. data/lib/wavix/types/whats_app_inbound_contact_card.rb +14 -0
  15. data/lib/wavix/types/whats_app_inbound_contacts_content.rb +11 -0
  16. data/lib/wavix/types/whats_app_inbound_content.rb +51 -0
  17. data/lib/wavix/types/whats_app_inbound_context.rb +10 -0
  18. data/lib/wavix/types/whats_app_inbound_document_content.rb +10 -0
  19. data/lib/wavix/types/whats_app_inbound_flow_response_content.rb +11 -0
  20. data/lib/wavix/types/whats_app_inbound_image_content.rb +10 -0
  21. data/lib/wavix/types/whats_app_inbound_list_reply.rb +14 -0
  22. data/lib/wavix/types/whats_app_inbound_list_reply_content.rb +11 -0
  23. data/lib/wavix/types/whats_app_inbound_location.rb +16 -0
  24. data/lib/wavix/types/whats_app_inbound_location_content.rb +10 -0
  25. data/lib/wavix/types/whats_app_inbound_media.rb +19 -0
  26. data/lib/wavix/types/whats_app_inbound_message_content.rb +20 -0
  27. data/lib/wavix/types/whats_app_inbound_message_content_type.rb +23 -0
  28. data/lib/wavix/types/whats_app_inbound_reaction.rb +12 -0
  29. data/lib/wavix/types/whats_app_inbound_reaction_content.rb +11 -0
  30. data/lib/wavix/types/whats_app_inbound_referral.rb +21 -0
  31. data/lib/wavix/types/whats_app_inbound_referral_source_type.rb +12 -0
  32. data/lib/wavix/types/whats_app_inbound_sticker_content.rb +10 -0
  33. data/lib/wavix/types/whats_app_inbound_text_content.rb +10 -0
  34. data/lib/wavix/types/whats_app_inbound_video_content.rb +10 -0
  35. data/lib/wavix/types/whats_app_message.rb +2 -0
  36. data/lib/wavix/types/whats_app_message_delivered_event.rb +16 -0
  37. data/lib/wavix/types/whats_app_message_error.rb +16 -0
  38. data/lib/wavix/types/whats_app_message_error_code.rb +23 -0
  39. data/lib/wavix/types/whats_app_message_failed_event.rb +15 -0
  40. data/lib/wavix/types/whats_app_message_failed_event_data.rb +20 -0
  41. data/lib/wavix/types/whats_app_message_failed_event_data_status.rb +13 -0
  42. data/lib/wavix/types/whats_app_message_list_item.rb +4 -0
  43. data/lib/wavix/types/whats_app_message_list_item_status.rb +1 -0
  44. data/lib/wavix/types/whats_app_message_read_event.rb +16 -0
  45. data/lib/wavix/types/whats_app_message_received_event.rb +15 -0
  46. data/lib/wavix/types/whats_app_message_received_event_data.rb +25 -0
  47. data/lib/wavix/types/whats_app_message_send_request.rb +5 -2
  48. data/lib/wavix/types/whats_app_message_sent_event.rb +16 -0
  49. data/lib/wavix/types/whats_app_message_status.rb +1 -0
  50. data/lib/wavix/types/whats_app_message_status_event_data.rb +17 -0
  51. data/lib/wavix/types/whats_app_messages_group_event.rb +30 -0
  52. data/lib/wavix/types/whats_app_problem.rb +2 -0
  53. data/lib/wavix/types/whats_app_send_audio_content.rb +11 -0
  54. data/lib/wavix/types/whats_app_send_buttons.rb +18 -0
  55. data/lib/wavix/types/whats_app_send_buttons_content.rb +11 -0
  56. data/lib/wavix/types/whats_app_send_content.rb +36 -0
  57. data/lib/wavix/types/whats_app_send_document_content.rb +11 -0
  58. data/lib/wavix/types/whats_app_send_image_content.rb +11 -0
  59. data/lib/wavix/types/whats_app_send_list.rb +20 -0
  60. data/lib/wavix/types/whats_app_send_list_content.rb +11 -0
  61. data/lib/wavix/types/whats_app_send_list_row.rb +15 -0
  62. data/lib/wavix/types/whats_app_send_list_section.rb +13 -0
  63. data/lib/wavix/types/whats_app_send_media.rb +15 -0
  64. data/lib/wavix/types/whats_app_send_reply_button.rb +13 -0
  65. data/lib/wavix/types/whats_app_send_text_content.rb +11 -0
  66. data/lib/wavix/types/whats_app_send_video_content.rb +11 -0
  67. data/lib/wavix/types/whats_app_sender_banned_event.rb +15 -0
  68. data/lib/wavix/types/whats_app_sender_connected_event.rb +16 -0
  69. data/lib/wavix/types/whats_app_sender_disconnected_event.rb +16 -0
  70. data/lib/wavix/types/whats_app_sender_event_data.rb +17 -0
  71. data/lib/wavix/types/whats_app_sender_event_data_quality_rating.rb +14 -0
  72. data/lib/wavix/types/whats_app_sender_event_data_status.rb +21 -0
  73. data/lib/wavix/types/whats_app_sender_flagged_event.rb +16 -0
  74. data/lib/wavix/types/whats_app_sender_previous_attributes.rb +13 -0
  75. data/lib/wavix/types/whats_app_sender_previous_attributes_quality_rating.rb +14 -0
  76. data/lib/wavix/types/whats_app_sender_previous_attributes_status.rb +21 -0
  77. data/lib/wavix/types/whats_app_sender_quality_changed_event.rb +16 -0
  78. data/lib/wavix/types/whats_app_sender_restricted_event.rb +16 -0
  79. data/lib/wavix/types/whats_app_sender_updated_event.rb +16 -0
  80. data/lib/wavix/types/whats_app_senders_group_event.rb +30 -0
  81. data/lib/wavix/types/whats_app_template_approved_event.rb +16 -0
  82. data/lib/wavix/types/whats_app_template_category_changed_event.rb +16 -0
  83. data/lib/wavix/types/whats_app_template_disabled_event.rb +16 -0
  84. data/lib/wavix/types/whats_app_template_event_data.rb +23 -0
  85. data/lib/wavix/types/whats_app_template_event_data_category.rb +13 -0
  86. data/lib/wavix/types/whats_app_template_event_data_quality_rating.rb +14 -0
  87. data/lib/wavix/types/whats_app_template_event_data_status.rb +21 -0
  88. data/lib/wavix/types/whats_app_template_flagged_event.rb +16 -0
  89. data/lib/wavix/types/whats_app_template_paused_event.rb +15 -0
  90. data/lib/wavix/types/whats_app_template_previous_attributes.rb +16 -0
  91. data/lib/wavix/types/whats_app_template_previous_attributes_category.rb +13 -0
  92. data/lib/wavix/types/whats_app_template_previous_attributes_quality_rating.rb +14 -0
  93. data/lib/wavix/types/whats_app_template_previous_attributes_status.rb +21 -0
  94. data/lib/wavix/types/whats_app_template_quality_changed_event.rb +16 -0
  95. data/lib/wavix/types/whats_app_template_rejected_event.rb +15 -0
  96. data/lib/wavix/types/whats_app_template_updated_event.rb +16 -0
  97. data/lib/wavix/types/whats_app_templates_group_event.rb +32 -0
  98. data/lib/wavix/types/whats_app_webhook.rb +22 -0
  99. data/lib/wavix/types/whats_app_webhook_create_request.rb +12 -0
  100. data/lib/wavix/types/whats_app_webhook_group.rb +13 -0
  101. data/lib/wavix/types/whats_app_webhook_list_response.rb +10 -0
  102. data/lib/wavix/types/whats_app_webhook_response.rb +10 -0
  103. data/lib/wavix/types/whats_app_webhook_test_event.rb +14 -0
  104. data/lib/wavix/types/whats_app_webhook_test_event_data.rb +10 -0
  105. data/lib/wavix/types/whats_app_webhook_test_response.rb +10 -0
  106. data/lib/wavix/types/whats_app_webhook_test_result.rb +14 -0
  107. data/lib/wavix/types/whats_app_webhook_test_result_outcome.rb +16 -0
  108. data/lib/wavix/types/whats_app_webhook_update_request.rb +14 -0
  109. data/lib/wavix/version.rb +1 -1
  110. data/lib/wavix.rb +98 -0
  111. data/reference.md +1 -1
  112. metadata +100 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a87ad0922d6d79c6a1eaccf20434755bb903f4ea25d17517cb1f6cf587948a46
4
- data.tar.gz: 0c238b08197fc28b875fece3530c820799c0cb785d66f13b355ef2a0cc6e054d
3
+ metadata.gz: c8795b19e5e7ccc3a81cdb51ecfad545d6a6f95396ad7dba96f498ff9c1c4a4c
4
+ data.tar.gz: 524adc718221aa8ccd5abe3baaf91055a847438709a9284c37dc4ff04a8aa068
5
5
  SHA512:
6
- metadata.gz: 847b3cc1257ebc13b9813b6e43c7accf840982ef3cba4552462d09d31da8301bec4a1e2e9d58c7e7899844e19497935af9114ef9dc4ffd105bd6c8cc9d731321
7
- data.tar.gz: d94564c54a27ae950428ab17cbe66a96002a269a54c3add0d34fa1cbd40eb9e1525df0bbc5030f05ffc4220e2a9ec1548cdac454124ae036865aed4f7e3e2668
6
+ metadata.gz: ddd5ba39f479098d5190f5270bbe9c1394010a70a8ae68e0d04f9365c1f6ad6b5e1ec9ae5fa18c290a1852502e4ec0a9c6918b6f230b17941bd4b629af9e6750
7
+ data.tar.gz: 2403e6c56b032aa546a4c32cedb67e86eb2c070158cf8e1beda48cac6db221f2a11d8d666f3eee5050a7e2bd4486c4d58898fd0274e125b28d1858e4bda2393e
data/.fern/metadata.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "cliVersion": "5.45.3",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
4
  "generatorVersion": "1.13.1",
5
- "originGitCommit": "ce2702f805bcbb53ebf5f2ad4d8ab7e08d525873",
5
+ "originGitCommit": "325cd89e0a99982949d21b1b88ff0770f90d4a36",
6
6
  "originGitCommitIsDirty": false,
7
7
  "invokedBy": "ci",
8
- "requestedVersion": "1.5.0",
8
+ "requestedVersion": "1.6.0",
9
9
  "ciProvider": "github",
10
- "sdkVersion": "1.5.0"
10
+ "sdkVersion": "1.6.0"
11
11
  }
data/.fern/replay.lock CHANGED
@@ -24,5 +24,11 @@ generations:
24
24
  cli_version: unknown
25
25
  generator_versions:
26
26
  fernapi/fern-ruby-sdk: 1.13.1
27
- current_generation: f73aa75ace4b4154ec056ff17da99742c57bb01f
27
+ - commit_sha: 2c97e6418df34108cdaf06704c39c86391057904
28
+ tree_hash: 36d286d8e834d3787d5036139297b1eb64dc820e
29
+ timestamp: 2026-11-17T05:56:41.613Z
30
+ cli_version: unknown
31
+ generator_versions:
32
+ fernapi/fern-ruby-sdk: 1.13.1
33
+ current_generation: 2c97e6418df34108cdaf06704c39c86391057904
28
34
  patches: []
data/lib/wavix/client.rb CHANGED
@@ -11,7 +11,7 @@ module Wavix
11
11
  @raw_client = Wavix::Internal::Http::RawClient.new(
12
12
  base_url: base_url || Wavix::Environment::DEFAULT,
13
13
  headers: {
14
- "User-Agent" => "wavix-ruby-sdk/1.5.0",
14
+ "User-Agent" => "wavix-ruby-sdk/1.6.0",
15
15
  "X-Fern-Language" => "Ruby",
16
16
  Authorization: "Bearer #{token}"
17
17
  },
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Data of a `whatsapp.contact.marketing_stopped` or `whatsapp.contact.marketing_resumed` event. It names the contact
6
+ # and the sender the choice applies to.
7
+ class WhatsAppContactMarketingPreferenceEventData < Internal::Types::Model
8
+ field :from, -> { String }, optional: false, nullable: false
9
+
10
+ field :to, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Event of type `whatsapp.contact.marketing_resumed`. A contact asked to receive marketing messages from one of your
6
+ # senders again. Posted to your webhook and returned by [List WhatsApp
7
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
8
+ class WhatsAppContactMarketingResumedEvent < Internal::Types::Model
9
+ field :id, -> { String }, optional: false, nullable: false
10
+
11
+ field :timestamp, -> { String }, optional: false, nullable: false
12
+
13
+ field :data, -> { Wavix::Types::WhatsAppContactMarketingPreferenceEventData }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Event of type `whatsapp.contact.marketing_stopped`. A contact asked to stop marketing messages from one of your
6
+ # senders. Posted to your webhook and returned by [List WhatsApp
7
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
8
+ class WhatsAppContactMarketingStoppedEvent < Internal::Types::Model
9
+ field :id, -> { String }, optional: false, nullable: false
10
+
11
+ field :timestamp, -> { String }, optional: false, nullable: false
12
+
13
+ field :data, -> { Wavix::Types::WhatsAppContactMarketingPreferenceEventData }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A WhatsApp event returned by [List WhatsApp
6
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events). It has the same fields as the event
7
+ # Wavix posts to your webhook, and `type` decides the shape of `data`.
8
+ class WhatsAppEvent < Internal::Types::Model
9
+ field :id, -> { String }, optional: false, nullable: false
10
+
11
+ field :type, -> { String }, optional: false, nullable: false
12
+
13
+ field :timestamp, -> { String }, optional: false, nullable: false
14
+
15
+ field :data, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A paginated list of your account's WhatsApp events, returned by [List WhatsApp
6
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
7
+ class WhatsAppEventListResponse < Internal::Types::Model
8
+ field :events, -> { Internal::Types::Array[Wavix::Types::WhatsAppEvent] }, optional: false, nullable: false
9
+
10
+ field :next_cursor, -> { String }, optional: false, nullable: true
11
+
12
+ field :has_more, -> { Internal::Types::Boolean }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ module WhatsAppEventType
6
+ extend Wavix::Internal::Types::Enum
7
+
8
+ WHATSAPP_MESSAGE_RECEIVED = "whatsapp.message.received"
9
+ WHATSAPP_MESSAGE_SENT = "whatsapp.message.sent"
10
+ WHATSAPP_MESSAGE_DELIVERED = "whatsapp.message.delivered"
11
+ WHATSAPP_MESSAGE_READ = "whatsapp.message.read"
12
+ WHATSAPP_MESSAGE_FAILED = "whatsapp.message.failed"
13
+ WHATSAPP_CONTACT_MARKETING_STOPPED = "whatsapp.contact.marketing_stopped"
14
+ WHATSAPP_CONTACT_MARKETING_RESUMED = "whatsapp.contact.marketing_resumed"
15
+ WHATSAPP_TEMPLATE_APPROVED = "whatsapp.template.approved"
16
+ WHATSAPP_TEMPLATE_REJECTED = "whatsapp.template.rejected"
17
+ WHATSAPP_TEMPLATE_PAUSED = "whatsapp.template.paused"
18
+ WHATSAPP_TEMPLATE_DISABLED = "whatsapp.template.disabled"
19
+ WHATSAPP_TEMPLATE_FLAGGED = "whatsapp.template.flagged"
20
+ WHATSAPP_TEMPLATE_CATEGORY_CHANGED = "whatsapp.template.category_changed"
21
+ WHATSAPP_TEMPLATE_QUALITY_CHANGED = "whatsapp.template.quality_changed"
22
+ WHATSAPP_TEMPLATE_UPDATED = "whatsapp.template.updated"
23
+ WHATSAPP_SENDER_CONNECTED = "whatsapp.sender.connected"
24
+ WHATSAPP_SENDER_RESTRICTED = "whatsapp.sender.restricted"
25
+ WHATSAPP_SENDER_FLAGGED = "whatsapp.sender.flagged"
26
+ WHATSAPP_SENDER_BANNED = "whatsapp.sender.banned"
27
+ WHATSAPP_SENDER_DISCONNECTED = "whatsapp.sender.disconnected"
28
+ WHATSAPP_SENDER_QUALITY_CHANGED = "whatsapp.sender.quality_changed"
29
+ WHATSAPP_SENDER_UPDATED = "whatsapp.sender.updated"
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is an audio file or voice note. Returned in `content` of a
6
+ # `whatsapp.message.received` event.
7
+ class WhatsAppInboundAudioContent < Internal::Types::Model
8
+ field :audio, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A tap on a quick reply button. Returned in `content.button_reply` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundButtonReply < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :title, -> { String }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a tap on a button of a message you sent. Returned in `content` of a
6
+ # `whatsapp.message.received` event.
7
+ class WhatsAppInboundButtonReplyContent < Internal::Types::Model
8
+ field :button_reply, -> { Wavix::Types::WhatsAppInboundButtonReply }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A contact card in a received message. Returned in `content.contacts` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundContactCard < Internal::Types::Model
7
+ field :name, -> { String }, optional: false, nullable: false
8
+
9
+ field :phones, -> { Internal::Types::Array[String] }, optional: false, nullable: false
10
+
11
+ field :emails, -> { Internal::Types::Array[String] }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is one or more contact cards. Returned in `content` of a
6
+ # `whatsapp.message.received` event.
7
+ class WhatsAppInboundContactsContent < Internal::Types::Model
8
+ field :contacts, -> { Internal::Types::Array[Wavix::Types::WhatsAppInboundContactCard] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message. Returned in `content` of a `whatsapp.message.received` event. The `type` field
6
+ # decides which other field holds the content. Wavix can add content types, so ignore a message whose `type` you
7
+ # don't recognize. Possible values:
8
+ #
9
+ # - `text` — Text.
10
+ # - `image` — An image, with an optional caption.
11
+ # - `video` — A video, with an optional caption.
12
+ # - `audio` — An audio file or a voice note.
13
+ # - `document` — A document, with its file name and an optional caption.
14
+ # - `sticker` — A sticker.
15
+ # - `location` — A location.
16
+ # - `contacts` — One or more contact cards.
17
+ # - `reaction` — An emoji reaction to an earlier message, or the removal of one.
18
+ # - `button_reply` — A tap on a quick reply button of a message you sent.
19
+ # - `list_reply` — An item picked from a list in a message you sent.
20
+ # - `flow_response` — The response to a WhatsApp Flow the contact completed.
21
+ class WhatsAppInboundContent < Internal::Types::Model
22
+ extend Wavix::Internal::Types::Union
23
+
24
+ discriminant :type
25
+
26
+ member -> { Wavix::Types::WhatsAppInboundTextContent }, key: "TEXT"
27
+
28
+ member -> { Wavix::Types::WhatsAppInboundImageContent }, key: "IMAGE"
29
+
30
+ member -> { Wavix::Types::WhatsAppInboundVideoContent }, key: "VIDEO"
31
+
32
+ member -> { Wavix::Types::WhatsAppInboundAudioContent }, key: "AUDIO"
33
+
34
+ member -> { Wavix::Types::WhatsAppInboundDocumentContent }, key: "DOCUMENT"
35
+
36
+ member -> { Wavix::Types::WhatsAppInboundStickerContent }, key: "STICKER"
37
+
38
+ member -> { Wavix::Types::WhatsAppInboundLocationContent }, key: "LOCATION"
39
+
40
+ member -> { Wavix::Types::WhatsAppInboundContactsContent }, key: "CONTACTS"
41
+
42
+ member -> { Wavix::Types::WhatsAppInboundReactionContent }, key: "REACTION"
43
+
44
+ member -> { Wavix::Types::WhatsAppInboundButtonReplyContent }, key: "BUTTON_REPLY"
45
+
46
+ member -> { Wavix::Types::WhatsAppInboundListReplyContent }, key: "LIST_REPLY"
47
+
48
+ member -> { Wavix::Types::WhatsAppInboundFlowResponseContent }, key: "FLOW_RESPONSE"
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # The message a received message replies to. Returned in `context` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundContext < Internal::Types::Model
7
+ field :message_uuid, -> { String }, optional: false, nullable: true
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a document. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundDocumentContent < Internal::Types::Model
7
+ field :document, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is the response to a WhatsApp Flow the contact completed. Returned in `content`
6
+ # of a `whatsapp.message.received` event.
7
+ class WhatsAppInboundFlowResponseContent < Internal::Types::Model
8
+ field :flow_response, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is an image. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundImageContent < Internal::Types::Model
7
+ field :image, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # An item picked from a list. Returned in `content.list_reply` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundListReply < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :title, -> { String }, optional: false, nullable: false
10
+
11
+ field :description, -> { String }, optional: false, nullable: true
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is an item picked from a list in a message you sent. Returned in `content` of a
6
+ # `whatsapp.message.received` event.
7
+ class WhatsAppInboundListReplyContent < Internal::Types::Model
8
+ field :list_reply, -> { Wavix::Types::WhatsAppInboundListReply }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A location in a received message. Returned in `content.location` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundLocation < Internal::Types::Model
7
+ field :latitude, -> { Integer }, optional: false, nullable: false
8
+
9
+ field :longitude, -> { Integer }, optional: false, nullable: false
10
+
11
+ field :name, -> { String }, optional: false, nullable: true
12
+
13
+ field :address, -> { String }, optional: false, nullable: true
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a location. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundLocationContent < Internal::Types::Model
7
+ field :location, -> { Wavix::Types::WhatsAppInboundLocation }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A media file in a received message. Returned in the `image`, `video`, `audio`, `document`, or `sticker` field of
6
+ # the content of a `whatsapp.message.received` event.
7
+ class WhatsAppInboundMedia < Internal::Types::Model
8
+ field :id, -> { String }, optional: false, nullable: false
9
+
10
+ field :url, -> { String }, optional: false, nullable: false
11
+
12
+ field :mime_type, -> { String }, optional: false, nullable: false
13
+
14
+ field :caption, -> { String }, optional: false, nullable: true
15
+
16
+ field :filename, -> { String }, optional: false, nullable: true
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a WhatsApp message that one of your WhatsApp senders received. Returned in `content` by [List WhatsApp
6
+ # messages](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-messages) and [Retrieve a WhatsApp
7
+ # message](https://docs.wavix.com/api-reference/whatsapp/retrieve-a-whatsapp-message).
8
+ class WhatsAppInboundMessageContent < Internal::Types::Model
9
+ field :type, -> { Wavix::Types::WhatsAppInboundMessageContentType }, optional: false, nullable: false
10
+
11
+ field :text, -> { String }, optional: true, nullable: false
12
+
13
+ field :media_id, -> { String }, optional: true, nullable: false
14
+
15
+ field :media_url, -> { String }, optional: true, nullable: false
16
+
17
+ field :mime_type, -> { String }, optional: true, nullable: false
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ module WhatsAppInboundMessageContentType
6
+ extend Wavix::Internal::Types::Enum
7
+
8
+ TEXT = "text"
9
+ IMAGE = "image"
10
+ VIDEO = "video"
11
+ DOCUMENT = "document"
12
+ AUDIO = "audio"
13
+ STICKER = "sticker"
14
+ LOCATION = "location"
15
+ CONTACTS = "contacts"
16
+ REACTION = "reaction"
17
+ BUTTON_REPLY = "button_reply"
18
+ LIST_REPLY = "list_reply"
19
+ FLOW_RESPONSE = "flow_response"
20
+ UNSUPPORTED = "unsupported"
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # A reaction in a received message. Returned in `content.reaction` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundReaction < Internal::Types::Model
7
+ field :message_uuid, -> { String }, optional: false, nullable: true
8
+
9
+ field :emoji, -> { String }, optional: false, nullable: true
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a reaction to an earlier message. Returned in `content` of a
6
+ # `whatsapp.message.received` event.
7
+ class WhatsAppInboundReactionContent < Internal::Types::Model
8
+ field :reaction, -> { Wavix::Types::WhatsAppInboundReaction }, optional: false, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # The ad or post that brought the contact to the conversation. Returned in `referral` of a
6
+ # `whatsapp.message.received` event when the contact tapped a click-to-WhatsApp ad.
7
+ class WhatsAppInboundReferral < Internal::Types::Model
8
+ field :source_type, -> { Wavix::Types::WhatsAppInboundReferralSourceType }, optional: false, nullable: false
9
+
10
+ field :source_id, -> { String }, optional: false, nullable: false
11
+
12
+ field :source_url, -> { String }, optional: false, nullable: false
13
+
14
+ field :headline, -> { String }, optional: false, nullable: true
15
+
16
+ field :body, -> { String }, optional: false, nullable: true
17
+
18
+ field :click_id, -> { String }, optional: false, nullable: true
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ module WhatsAppInboundReferralSourceType
6
+ extend Wavix::Internal::Types::Enum
7
+
8
+ AD = "ad"
9
+ POST = "post"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a sticker. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundStickerContent < Internal::Types::Model
7
+ field :sticker, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is text. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundTextContent < Internal::Types::Model
7
+ field :text, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Content of a received message that is a video. Returned in `content` of a `whatsapp.message.received` event.
6
+ class WhatsAppInboundVideoContent < Internal::Types::Model
7
+ field :video, -> { Wavix::Types::WhatsAppInboundMedia }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
@@ -14,6 +14,8 @@ module Wavix
14
14
 
15
15
  field :template, -> { Wavix::Types::WhatsAppMessageTemplate }, optional: false, nullable: true
16
16
 
17
+ field :service_window_open_until, -> { String }, optional: true, nullable: false
18
+
17
19
  field :created_at, -> { String }, optional: false, nullable: false
18
20
  end
19
21
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Event of type `whatsapp.message.delivered`. A message you sent was delivered to the recipient. Posted to your
6
+ # webhook and returned by [List WhatsApp
7
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
8
+ class WhatsAppMessageDeliveredEvent < Internal::Types::Model
9
+ field :id, -> { String }, optional: false, nullable: false
10
+
11
+ field :timestamp, -> { String }, optional: false, nullable: false
12
+
13
+ field :data, -> { Wavix::Types::WhatsAppMessageStatusEventData }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Why a message you sent wasn't delivered. Returned in `whatsapp.message.failed` events and by [Retrieve a WhatsApp
6
+ # message](https://docs.wavix.com/api-reference/whatsapp/retrieve-a-whatsapp-message). The code and explanation come
7
+ # from a fixed Wavix list and don't depend on the provider.
8
+ class WhatsAppMessageError < Internal::Types::Model
9
+ field :code, -> { Wavix::Types::WhatsAppMessageErrorCode }, optional: false, nullable: false
10
+
11
+ field :title, -> { String }, optional: false, nullable: false
12
+
13
+ field :docs_url, -> { String }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ module WhatsAppMessageErrorCode
6
+ extend Wavix::Internal::Types::Enum
7
+
8
+ WAVIX_RECIPIENT_NOT_ON_WHATSAPP = "WAVIX_RECIPIENT_NOT_ON_WHATSAPP"
9
+ WAVIX_RECIPIENT_OPTED_OUT = "WAVIX_RECIPIENT_OPTED_OUT"
10
+ WAVIX_SERVICE_WINDOW_CLOSED = "WAVIX_SERVICE_WINDOW_CLOSED"
11
+ WAVIX_TEMPLATE_NOT_APPROVED = "WAVIX_TEMPLATE_NOT_APPROVED"
12
+ WAVIX_TEMPLATE_PAUSED_OR_DISABLED = "WAVIX_TEMPLATE_PAUSED_OR_DISABLED"
13
+ WAVIX_INVALID_TEMPLATE_PARAMETERS = "WAVIX_INVALID_TEMPLATE_PARAMETERS"
14
+ WAVIX_MARKETING_LIMIT_REACHED = "WAVIX_MARKETING_LIMIT_REACHED"
15
+ WAVIX_SENDER_LIMIT_REACHED = "WAVIX_SENDER_LIMIT_REACHED"
16
+ WAVIX_SENDER_RATE_LIMITED = "WAVIX_SENDER_RATE_LIMITED"
17
+ WAVIX_SENDER_UNAVAILABLE = "WAVIX_SENDER_UNAVAILABLE"
18
+ WAVIX_SERVICE_UNAVAILABLE = "WAVIX_SERVICE_UNAVAILABLE"
19
+ WAVIX_MESSAGE_EXPIRED = "WAVIX_MESSAGE_EXPIRED"
20
+ WAVIX_DELIVERY_FAILED = "WAVIX_DELIVERY_FAILED"
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Wavix
4
+ module Types
5
+ # Event that tells you a message you sent wasn't delivered. Posted to your webhook and returned by [List WhatsApp
6
+ # events](https://docs.wavix.com/api-reference/whatsapp/list-whatsapp-events).
7
+ class WhatsAppMessageFailedEvent < Internal::Types::Model
8
+ field :id, -> { String }, optional: false, nullable: false
9
+
10
+ field :timestamp, -> { String }, optional: false, nullable: false
11
+
12
+ field :data, -> { Wavix::Types::WhatsAppMessageFailedEventData }, optional: false, nullable: false
13
+ end
14
+ end
15
+ end