surge_api 0.5.0 → 0.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6419099e30ee4893563ecd9e9fd2e4707dedf5af633e5972d25b0848228deef9
4
- data.tar.gz: 1c60adc5936f072f87f8b534f26a4cab6bf3a34ea5d48428675c8cfea4da6159
3
+ metadata.gz: 3e8128de1b743d0dfdea80a3444fe70781bb029f32061761b09b749cd8a1abf7
4
+ data.tar.gz: 543611ed65fb81164bd534cd91af8a0c6bc2bf96e5efda155aec5204a57c63ce
5
5
  SHA512:
6
- metadata.gz: 3bcb5e868464704dad067a2a1e5b36a695689c3adf03e7b8e5978b2469dbe69bf2da75d7a4b0d6ad1613357a991e5a0f57e3110a95afc20eae0df4a7cc0ac751
7
- data.tar.gz: 95e41f79bf6d869ac3201c21f15c1ceb7514d2d2e35c5172cba0e5db199bd1817300c9eea8d2050ad3493f08b2ecade4288c6c6b8907f53309cff1baf2001f65
6
+ metadata.gz: 4b124f0da4f0ee63a4e0d418a16059b1f049b26ca9c1361f712e1bd8890fc73d51d9a930818345e753bb22850442085000c293d4a39f9df891582e87b2b31ff3
7
+ data.tar.gz: b1a17edfc1c13106f82f11cd1732984f20e2ec7c5afa0ae055c5f31e795c77c9f307520ba38b411c9dda6687f11f91dcefa4cf61cd2b26a1c0a433b43ab54970
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 (2026-01-18)
4
+
5
+ Full Changelog: [v0.6.0...v0.7.0](https://github.com/surgeapi/ruby-sdk/compare/v0.6.0...v0.7.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([3eaef18](https://github.com/surgeapi/ruby-sdk/commit/3eaef1827965563c4aba448425c32a7850d8d5ba))
10
+
11
+ ## 0.6.0 (2026-01-18)
12
+
13
+ Full Changelog: [v0.5.0...v0.6.0](https://github.com/surgeapi/ruby-sdk/compare/v0.5.0...v0.6.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([be3de20](https://github.com/surgeapi/ruby-sdk/commit/be3de209f18482fa76b1a447fd8e944efb56772f))
18
+
19
+
20
+ ### Chores
21
+
22
+ * **internal:** update `actions/checkout` version ([3d4be8e](https://github.com/surgeapi/ruby-sdk/commit/3d4be8e99c4f71d93e66a2d830d23e1008490abc))
23
+
3
24
  ## 0.5.0 (2026-01-15)
4
25
 
5
26
  Full Changelog: [v0.4.0...v0.5.0](https://github.com/surgeapi/ruby-sdk/compare/v0.4.0...v0.5.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "surge_api", "~> 0.5.0"
20
+ gem "surge_api", "~> 0.7.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class LinkFollowedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
6
+ # @!attribute account_id
7
+ # The ID of the account in which this event occurred
8
+ #
9
+ # @return [String]
10
+ required :account_id, String
11
+
12
+ # @!attribute data
13
+ # The data associated with the event
14
+ #
15
+ # @return [SurgeAPI::Models::LinkFollowedWebhookEvent::Data]
16
+ required :data, -> { SurgeAPI::LinkFollowedWebhookEvent::Data }
17
+
18
+ # @!attribute timestamp
19
+ # The timestamp when this event occurred, in ISO8601 format
20
+ #
21
+ # @return [Time]
22
+ required :timestamp, Time
23
+
24
+ # @!attribute type
25
+ # The type of the event. Always `link.followed` for this event.
26
+ #
27
+ # @return [Symbol, :"link.followed"]
28
+ required :type, const: :"link.followed"
29
+
30
+ # @!method initialize(account_id:, data:, timestamp:, type: :"link.followed")
31
+ # @param account_id [String] The ID of the account in which this event occurred
32
+ #
33
+ # @param data [SurgeAPI::Models::LinkFollowedWebhookEvent::Data] The data associated with the event
34
+ #
35
+ # @param timestamp [Time] The timestamp when this event occurred, in ISO8601 format
36
+ #
37
+ # @param type [Symbol, :"link.followed"] The type of the event. Always `link.followed` for this event.
38
+
39
+ # @see SurgeAPI::Models::LinkFollowedWebhookEvent#data
40
+ class Data < SurgeAPI::Internal::Type::BaseModel
41
+ # @!attribute id
42
+ # The unique identifier for the link
43
+ #
44
+ # @return [String]
45
+ required :id, String
46
+
47
+ # @!attribute message_id
48
+ # The unique identifier for the message that contained the link
49
+ #
50
+ # @return [String]
51
+ required :message_id, String
52
+
53
+ # @!attribute url
54
+ # The original URL that was shortened
55
+ #
56
+ # @return [String]
57
+ required :url, String
58
+
59
+ # @!method initialize(id:, message_id:, url:)
60
+ # The data associated with the event
61
+ #
62
+ # @param id [String] The unique identifier for the link
63
+ #
64
+ # @param message_id [String] The unique identifier for the message that contained the link
65
+ #
66
+ # @param url [String] The original URL that was shortened
67
+ end
68
+ end
69
+ end
70
+ end
@@ -27,7 +27,13 @@ module SurgeAPI
27
27
  # @return [SurgeAPI::Models::Message::Conversation, nil]
28
28
  optional :conversation, -> { SurgeAPI::Message::Conversation }
29
29
 
30
- # @!method initialize(id: nil, attachments: nil, body: nil, conversation: nil)
30
+ # @!attribute metadata
31
+ # Set of key-value pairs that will be stored with the object.
32
+ #
33
+ # @return [Hash{Symbol=>String}, nil]
34
+ optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
35
+
36
+ # @!method initialize(id: nil, attachments: nil, body: nil, conversation: nil, metadata: nil)
31
37
  # A Message is a communication sent to a Contact.
32
38
  #
33
39
  # @param id [String] Unique identifier for the object.
@@ -37,6 +43,8 @@ module SurgeAPI
37
43
  # @param body [String] The message body.
38
44
  #
39
45
  # @param conversation [SurgeAPI::Models::Message::Conversation] A conversation with a Contact
46
+ #
47
+ # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
40
48
 
41
49
  class Attachment < SurgeAPI::Internal::Type::BaseModel
42
50
  # @!attribute id
@@ -34,6 +34,12 @@ module SurgeAPI
34
34
  # @return [String, nil]
35
35
  optional :body, String
36
36
 
37
+ # @!attribute metadata
38
+ # Set of key-value pairs that will be stored with the object.
39
+ #
40
+ # @return [Hash{Symbol=>String}, nil]
41
+ optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
42
+
37
43
  # @!attribute send_at
38
44
  # An optional datetime for scheduling message up to a couple of months in the
39
45
  # future.
@@ -41,7 +47,7 @@ module SurgeAPI
41
47
  # @return [Time, nil]
42
48
  optional :send_at, Time
43
49
 
44
- # @!method initialize(conversation:, attachments: nil, body: nil, send_at: nil)
50
+ # @!method initialize(conversation:, attachments: nil, body: nil, metadata: nil, send_at: nil)
45
51
  # Some parameter documentations has been truncated, see
46
52
  # {SurgeAPI::Models::MessageParams::MessageParamsWithConversation} for more
47
53
  # details.
@@ -55,6 +61,8 @@ module SurgeAPI
55
61
  #
56
62
  # @param body [String] The message body.
57
63
  #
64
+ # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
65
+ #
58
66
  # @param send_at [Time] An optional datetime for scheduling message up to a couple of months in the futu
59
67
 
60
68
  # @see SurgeAPI::Models::MessageParams::MessageParamsWithConversation#conversation
@@ -172,6 +180,12 @@ module SurgeAPI
172
180
  # @return [String, nil]
173
181
  optional :from, String
174
182
 
183
+ # @!attribute metadata
184
+ # Set of key-value pairs that will be stored with the object.
185
+ #
186
+ # @return [Hash{Symbol=>String}, nil]
187
+ optional :metadata, SurgeAPI::Internal::Type::HashOf[String]
188
+
175
189
  # @!attribute send_at
176
190
  # An optional datetime for scheduling message up to a couple of months in the
177
191
  # future.
@@ -179,7 +193,7 @@ module SurgeAPI
179
193
  # @return [Time, nil]
180
194
  optional :send_at, Time
181
195
 
182
- # @!method initialize(to:, attachments: nil, body: nil, from: nil, send_at: nil)
196
+ # @!method initialize(to:, attachments: nil, body: nil, from: nil, metadata: nil, send_at: nil)
183
197
  # Some parameter documentations has been truncated, see
184
198
  # {SurgeAPI::Models::MessageParams::SimpleMessageParams} for more details.
185
199
  #
@@ -193,6 +207,8 @@ module SurgeAPI
193
207
  #
194
208
  # @param from [String] The sender's phone number in E.164 format or phone number ID. If omitted, uses t
195
209
  #
210
+ # @param metadata [Hash{Symbol=>String}] Set of key-value pairs that will be stored with the object.
211
+ #
196
212
  # @param send_at [Time] An optional datetime for scheduling message up to a couple of months in the futu
197
213
 
198
214
  class Attachment < SurgeAPI::Internal::Type::BaseModel
@@ -17,6 +17,8 @@ module SurgeAPI
17
17
 
18
18
  variant :"conversation.created", -> { SurgeAPI::ConversationCreatedWebhookEvent }
19
19
 
20
+ variant :"link.followed", -> { SurgeAPI::LinkFollowedWebhookEvent }
21
+
20
22
  variant :"message.delivered", -> { SurgeAPI::MessageDeliveredWebhookEvent }
21
23
 
22
24
  variant :"message.failed", -> { SurgeAPI::MessageFailedWebhookEvent }
@@ -26,7 +28,7 @@ module SurgeAPI
26
28
  variant :"message.sent", -> { SurgeAPI::MessageSentWebhookEvent }
27
29
 
28
30
  # @!method self.variants
29
- # @return [Array(SurgeAPI::Models::CallEndedWebhookEvent, SurgeAPI::Models::CampaignApprovedWebhookEvent, SurgeAPI::Models::ContactOptedInWebhookEvent, SurgeAPI::Models::ContactOptedOutWebhookEvent, SurgeAPI::Models::ConversationCreatedWebhookEvent, SurgeAPI::Models::MessageDeliveredWebhookEvent, SurgeAPI::Models::MessageFailedWebhookEvent, SurgeAPI::Models::MessageReceivedWebhookEvent, SurgeAPI::Models::MessageSentWebhookEvent)]
31
+ # @return [Array(SurgeAPI::Models::CallEndedWebhookEvent, SurgeAPI::Models::CampaignApprovedWebhookEvent, SurgeAPI::Models::ContactOptedInWebhookEvent, SurgeAPI::Models::ContactOptedOutWebhookEvent, SurgeAPI::Models::ConversationCreatedWebhookEvent, SurgeAPI::Models::LinkFollowedWebhookEvent, SurgeAPI::Models::MessageDeliveredWebhookEvent, SurgeAPI::Models::MessageFailedWebhookEvent, SurgeAPI::Models::MessageReceivedWebhookEvent, SurgeAPI::Models::MessageSentWebhookEvent)]
30
32
  end
31
33
  end
32
34
  end
@@ -81,6 +81,8 @@ module SurgeAPI
81
81
 
82
82
  Error = SurgeAPI::Models::Error
83
83
 
84
+ LinkFollowedWebhookEvent = SurgeAPI::Models::LinkFollowedWebhookEvent
85
+
84
86
  Message = SurgeAPI::Models::Message
85
87
 
86
88
  MessageCreateParams = SurgeAPI::Models::MessageCreateParams
@@ -5,7 +5,7 @@ module SurgeAPI
5
5
  class Webhooks
6
6
  # @param payload [String] The raw webhook payload as a string
7
7
  #
8
- # @return [SurgeAPI::Models::CallEndedWebhookEvent, SurgeAPI::Models::CampaignApprovedWebhookEvent, SurgeAPI::Models::ContactOptedInWebhookEvent, SurgeAPI::Models::ContactOptedOutWebhookEvent, SurgeAPI::Models::ConversationCreatedWebhookEvent, SurgeAPI::Models::MessageDeliveredWebhookEvent, SurgeAPI::Models::MessageFailedWebhookEvent, SurgeAPI::Models::MessageReceivedWebhookEvent, SurgeAPI::Models::MessageSentWebhookEvent]
8
+ # @return [SurgeAPI::Models::CallEndedWebhookEvent, SurgeAPI::Models::CampaignApprovedWebhookEvent, SurgeAPI::Models::ContactOptedInWebhookEvent, SurgeAPI::Models::ContactOptedOutWebhookEvent, SurgeAPI::Models::ConversationCreatedWebhookEvent, SurgeAPI::Models::LinkFollowedWebhookEvent, SurgeAPI::Models::MessageDeliveredWebhookEvent, SurgeAPI::Models::MessageFailedWebhookEvent, SurgeAPI::Models::MessageReceivedWebhookEvent, SurgeAPI::Models::MessageSentWebhookEvent]
9
9
  def unwrap(payload)
10
10
  parsed = JSON.parse(payload, symbolize_names: true)
11
11
  SurgeAPI::Internal::Type::Converter.coerce(SurgeAPI::Models::UnwrapWebhookEvent, parsed)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SurgeAPI
4
- VERSION = "0.5.0"
4
+ VERSION = "0.7.0"
5
5
  end
data/lib/surge_api.rb CHANGED
@@ -74,6 +74,7 @@ require_relative "surge_api/models/contact_retrieve_params"
74
74
  require_relative "surge_api/models/contact_update_params"
75
75
  require_relative "surge_api/models/conversation_created_webhook_event"
76
76
  require_relative "surge_api/models/error"
77
+ require_relative "surge_api/models/link_followed_webhook_event"
77
78
  require_relative "surge_api/models/message"
78
79
  require_relative "surge_api/models/message_create_params"
79
80
  require_relative "surge_api/models/message_delivered_webhook_event"
@@ -0,0 +1,110 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class LinkFollowedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(SurgeAPI::LinkFollowedWebhookEvent, SurgeAPI::Internal::AnyHash)
9
+ end
10
+
11
+ # The ID of the account in which this event occurred
12
+ sig { returns(String) }
13
+ attr_accessor :account_id
14
+
15
+ # The data associated with the event
16
+ sig { returns(SurgeAPI::LinkFollowedWebhookEvent::Data) }
17
+ attr_reader :data
18
+
19
+ sig do
20
+ params(data: SurgeAPI::LinkFollowedWebhookEvent::Data::OrHash).void
21
+ end
22
+ attr_writer :data
23
+
24
+ # The timestamp when this event occurred, in ISO8601 format
25
+ sig { returns(Time) }
26
+ attr_accessor :timestamp
27
+
28
+ # The type of the event. Always `link.followed` for this event.
29
+ sig { returns(Symbol) }
30
+ attr_accessor :type
31
+
32
+ sig do
33
+ params(
34
+ account_id: String,
35
+ data: SurgeAPI::LinkFollowedWebhookEvent::Data::OrHash,
36
+ timestamp: Time,
37
+ type: Symbol
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ # The ID of the account in which this event occurred
42
+ account_id:,
43
+ # The data associated with the event
44
+ data:,
45
+ # The timestamp when this event occurred, in ISO8601 format
46
+ timestamp:,
47
+ # The type of the event. Always `link.followed` for this event.
48
+ type: :"link.followed"
49
+ )
50
+ end
51
+
52
+ sig do
53
+ override.returns(
54
+ {
55
+ account_id: String,
56
+ data: SurgeAPI::LinkFollowedWebhookEvent::Data,
57
+ timestamp: Time,
58
+ type: Symbol
59
+ }
60
+ )
61
+ end
62
+ def to_hash
63
+ end
64
+
65
+ class Data < SurgeAPI::Internal::Type::BaseModel
66
+ OrHash =
67
+ T.type_alias do
68
+ T.any(
69
+ SurgeAPI::LinkFollowedWebhookEvent::Data,
70
+ SurgeAPI::Internal::AnyHash
71
+ )
72
+ end
73
+
74
+ # The unique identifier for the link
75
+ sig { returns(String) }
76
+ attr_accessor :id
77
+
78
+ # The unique identifier for the message that contained the link
79
+ sig { returns(String) }
80
+ attr_accessor :message_id
81
+
82
+ # The original URL that was shortened
83
+ sig { returns(String) }
84
+ attr_accessor :url
85
+
86
+ # The data associated with the event
87
+ sig do
88
+ params(id: String, message_id: String, url: String).returns(
89
+ T.attached_class
90
+ )
91
+ end
92
+ def self.new(
93
+ # The unique identifier for the link
94
+ id:,
95
+ # The unique identifier for the message that contained the link
96
+ message_id:,
97
+ # The original URL that was shortened
98
+ url:
99
+ )
100
+ end
101
+
102
+ sig do
103
+ override.returns({ id: String, message_id: String, url: String })
104
+ end
105
+ def to_hash
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -37,13 +37,21 @@ module SurgeAPI
37
37
  sig { params(conversation: SurgeAPI::Message::Conversation::OrHash).void }
38
38
  attr_writer :conversation
39
39
 
40
+ # Set of key-value pairs that will be stored with the object.
41
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
42
+ attr_reader :metadata
43
+
44
+ sig { params(metadata: T::Hash[Symbol, String]).void }
45
+ attr_writer :metadata
46
+
40
47
  # A Message is a communication sent to a Contact.
41
48
  sig do
42
49
  params(
43
50
  id: String,
44
51
  attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
45
52
  body: String,
46
- conversation: SurgeAPI::Message::Conversation::OrHash
53
+ conversation: SurgeAPI::Message::Conversation::OrHash,
54
+ metadata: T::Hash[Symbol, String]
47
55
  ).returns(T.attached_class)
48
56
  end
49
57
  def self.new(
@@ -53,7 +61,9 @@ module SurgeAPI
53
61
  # The message body.
54
62
  body: nil,
55
63
  # A conversation with a Contact
56
- conversation: nil
64
+ conversation: nil,
65
+ # Set of key-value pairs that will be stored with the object.
66
+ metadata: nil
57
67
  )
58
68
  end
59
69
 
@@ -63,7 +73,8 @@ module SurgeAPI
63
73
  id: String,
64
74
  attachments: T::Array[SurgeAPI::Message::Attachment],
65
75
  body: String,
66
- conversation: SurgeAPI::Message::Conversation
76
+ conversation: SurgeAPI::Message::Conversation,
77
+ metadata: T::Hash[Symbol, String]
67
78
  }
68
79
  )
69
80
  end
@@ -70,6 +70,13 @@ module SurgeAPI
70
70
  sig { params(body: String).void }
71
71
  attr_writer :body
72
72
 
73
+ # Set of key-value pairs that will be stored with the object.
74
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
75
+ attr_reader :metadata
76
+
77
+ sig { params(metadata: T::Hash[Symbol, String]).void }
78
+ attr_writer :metadata
79
+
73
80
  # An optional datetime for scheduling message up to a couple of months in the
74
81
  # future.
75
82
  sig { returns(T.nilable(Time)) }
@@ -89,6 +96,7 @@ module SurgeAPI
89
96
  SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment::OrHash
90
97
  ],
91
98
  body: String,
99
+ metadata: T::Hash[Symbol, String],
92
100
  send_at: Time
93
101
  ).returns(T.attached_class)
94
102
  end
@@ -99,6 +107,8 @@ module SurgeAPI
99
107
  attachments: nil,
100
108
  # The message body.
101
109
  body: nil,
110
+ # Set of key-value pairs that will be stored with the object.
111
+ metadata: nil,
102
112
  # An optional datetime for scheduling message up to a couple of months in the
103
113
  # future.
104
114
  send_at: nil
@@ -115,6 +125,7 @@ module SurgeAPI
115
125
  SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment
116
126
  ],
117
127
  body: String,
128
+ metadata: T::Hash[Symbol, String],
118
129
  send_at: Time
119
130
  }
120
131
  )
@@ -341,6 +352,13 @@ module SurgeAPI
341
352
  sig { params(from: String).void }
342
353
  attr_writer :from
343
354
 
355
+ # Set of key-value pairs that will be stored with the object.
356
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
357
+ attr_reader :metadata
358
+
359
+ sig { params(metadata: T::Hash[Symbol, String]).void }
360
+ attr_writer :metadata
361
+
344
362
  # An optional datetime for scheduling message up to a couple of months in the
345
363
  # future.
346
364
  sig { returns(T.nilable(Time)) }
@@ -359,6 +377,7 @@ module SurgeAPI
359
377
  ],
360
378
  body: String,
361
379
  from: String,
380
+ metadata: T::Hash[Symbol, String],
362
381
  send_at: Time
363
382
  ).returns(T.attached_class)
364
383
  end
@@ -372,6 +391,8 @@ module SurgeAPI
372
391
  # The sender's phone number in E.164 format or phone number ID. If omitted, uses
373
392
  # the account's default phone number. Cannot be used together with 'conversation'.
374
393
  from: nil,
394
+ # Set of key-value pairs that will be stored with the object.
395
+ metadata: nil,
375
396
  # An optional datetime for scheduling message up to a couple of months in the
376
397
  # future.
377
398
  send_at: nil
@@ -388,6 +409,7 @@ module SurgeAPI
388
409
  ],
389
410
  body: String,
390
411
  from: String,
412
+ metadata: T::Hash[Symbol, String],
391
413
  send_at: Time
392
414
  }
393
415
  )
@@ -13,6 +13,7 @@ module SurgeAPI
13
13
  SurgeAPI::ContactOptedInWebhookEvent,
14
14
  SurgeAPI::ContactOptedOutWebhookEvent,
15
15
  SurgeAPI::ConversationCreatedWebhookEvent,
16
+ SurgeAPI::LinkFollowedWebhookEvent,
16
17
  SurgeAPI::MessageDeliveredWebhookEvent,
17
18
  SurgeAPI::MessageFailedWebhookEvent,
18
19
  SurgeAPI::MessageReceivedWebhookEvent,
@@ -44,6 +44,8 @@ module SurgeAPI
44
44
 
45
45
  Error = SurgeAPI::Models::Error
46
46
 
47
+ LinkFollowedWebhookEvent = SurgeAPI::Models::LinkFollowedWebhookEvent
48
+
47
49
  Message = SurgeAPI::Models::Message
48
50
 
49
51
  MessageCreateParams = SurgeAPI::Models::MessageCreateParams
@@ -11,6 +11,7 @@ module SurgeAPI
11
11
  SurgeAPI::ContactOptedInWebhookEvent,
12
12
  SurgeAPI::ContactOptedOutWebhookEvent,
13
13
  SurgeAPI::ConversationCreatedWebhookEvent,
14
+ SurgeAPI::LinkFollowedWebhookEvent,
14
15
  SurgeAPI::MessageDeliveredWebhookEvent,
15
16
  SurgeAPI::MessageFailedWebhookEvent,
16
17
  SurgeAPI::MessageReceivedWebhookEvent,
@@ -0,0 +1,49 @@
1
+ module SurgeAPI
2
+ module Models
3
+ type link_followed_webhook_event =
4
+ {
5
+ account_id: String,
6
+ data: SurgeAPI::LinkFollowedWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"link.followed"
9
+ }
10
+
11
+ class LinkFollowedWebhookEvent < SurgeAPI::Internal::Type::BaseModel
12
+ attr_accessor account_id: String
13
+
14
+ attr_accessor data: SurgeAPI::LinkFollowedWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"link.followed"
19
+
20
+ def initialize: (
21
+ account_id: String,
22
+ data: SurgeAPI::LinkFollowedWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"link.followed"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ account_id: String,
29
+ data: SurgeAPI::LinkFollowedWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"link.followed"
32
+ }
33
+
34
+ type data = { id: String, message_id: String, url: String }
35
+
36
+ class Data < SurgeAPI::Internal::Type::BaseModel
37
+ attr_accessor id: String
38
+
39
+ attr_accessor message_id: String
40
+
41
+ attr_accessor url: String
42
+
43
+ def initialize: (id: String, message_id: String, url: String) -> void
44
+
45
+ def to_hash: -> { id: String, message_id: String, url: String }
46
+ end
47
+ end
48
+ end
49
+ end
@@ -5,7 +5,8 @@ module SurgeAPI
5
5
  id: String,
6
6
  attachments: ::Array[SurgeAPI::Message::Attachment],
7
7
  body: String,
8
- conversation: SurgeAPI::Message::Conversation
8
+ conversation: SurgeAPI::Message::Conversation,
9
+ metadata: ::Hash[Symbol, String]
9
10
  }
10
11
 
11
12
  class Message < SurgeAPI::Internal::Type::BaseModel
@@ -29,18 +30,24 @@ module SurgeAPI
29
30
  SurgeAPI::Message::Conversation
30
31
  ) -> SurgeAPI::Message::Conversation
31
32
 
33
+ attr_reader metadata: ::Hash[Symbol, String]?
34
+
35
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
36
+
32
37
  def initialize: (
33
38
  ?id: String,
34
39
  ?attachments: ::Array[SurgeAPI::Message::Attachment],
35
40
  ?body: String,
36
- ?conversation: SurgeAPI::Message::Conversation
41
+ ?conversation: SurgeAPI::Message::Conversation,
42
+ ?metadata: ::Hash[Symbol, String]
37
43
  ) -> void
38
44
 
39
45
  def to_hash: -> {
40
46
  id: String,
41
47
  attachments: ::Array[SurgeAPI::Message::Attachment],
42
48
  body: String,
43
- conversation: SurgeAPI::Message::Conversation
49
+ conversation: SurgeAPI::Message::Conversation,
50
+ metadata: ::Hash[Symbol, String]
44
51
  }
45
52
 
46
53
  type attachment = { id: String, type: String, url: String }
@@ -12,6 +12,7 @@ module SurgeAPI
12
12
  conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
13
13
  attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
14
14
  body: String,
15
+ metadata: ::Hash[Symbol, String],
15
16
  send_at: Time
16
17
  }
17
18
 
@@ -28,6 +29,10 @@ module SurgeAPI
28
29
 
29
30
  def body=: (String) -> String
30
31
 
32
+ attr_reader metadata: ::Hash[Symbol, String]?
33
+
34
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
35
+
31
36
  attr_reader send_at: Time?
32
37
 
33
38
  def send_at=: (Time) -> Time
@@ -36,6 +41,7 @@ module SurgeAPI
36
41
  conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
37
42
  ?attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
38
43
  ?body: String,
44
+ ?metadata: ::Hash[Symbol, String],
39
45
  ?send_at: Time
40
46
  ) -> void
41
47
 
@@ -43,6 +49,7 @@ module SurgeAPI
43
49
  conversation: SurgeAPI::MessageParams::MessageParamsWithConversation::Conversation,
44
50
  attachments: ::Array[SurgeAPI::MessageParams::MessageParamsWithConversation::Attachment],
45
51
  body: String,
52
+ metadata: ::Hash[Symbol, String],
46
53
  send_at: Time
47
54
  }
48
55
 
@@ -132,6 +139,7 @@ module SurgeAPI
132
139
  attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
133
140
  body: String,
134
141
  from: String,
142
+ metadata: ::Hash[Symbol, String],
135
143
  send_at: Time
136
144
  }
137
145
 
@@ -152,6 +160,10 @@ module SurgeAPI
152
160
 
153
161
  def from=: (String) -> String
154
162
 
163
+ attr_reader metadata: ::Hash[Symbol, String]?
164
+
165
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
166
+
155
167
  attr_reader send_at: Time?
156
168
 
157
169
  def send_at=: (Time) -> Time
@@ -161,6 +173,7 @@ module SurgeAPI
161
173
  ?attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
162
174
  ?body: String,
163
175
  ?from: String,
176
+ ?metadata: ::Hash[Symbol, String],
164
177
  ?send_at: Time
165
178
  ) -> void
166
179
 
@@ -169,6 +182,7 @@ module SurgeAPI
169
182
  attachments: ::Array[SurgeAPI::MessageParams::SimpleMessageParams::Attachment],
170
183
  body: String,
171
184
  from: String,
185
+ metadata: ::Hash[Symbol, String],
172
186
  send_at: Time
173
187
  }
174
188
 
@@ -6,6 +6,7 @@ module SurgeAPI
6
6
  | SurgeAPI::ContactOptedInWebhookEvent
7
7
  | SurgeAPI::ContactOptedOutWebhookEvent
8
8
  | SurgeAPI::ConversationCreatedWebhookEvent
9
+ | SurgeAPI::LinkFollowedWebhookEvent
9
10
  | SurgeAPI::MessageDeliveredWebhookEvent
10
11
  | SurgeAPI::MessageFailedWebhookEvent
11
12
  | SurgeAPI::MessageReceivedWebhookEvent
@@ -41,6 +41,8 @@ module SurgeAPI
41
41
 
42
42
  class Error = SurgeAPI::Models::Error
43
43
 
44
+ class LinkFollowedWebhookEvent = SurgeAPI::Models::LinkFollowedWebhookEvent
45
+
44
46
  class Message = SurgeAPI::Models::Message
45
47
 
46
48
  class MessageCreateParams = SurgeAPI::Models::MessageCreateParams
@@ -8,6 +8,7 @@ module SurgeAPI
8
8
  | SurgeAPI::ContactOptedInWebhookEvent
9
9
  | SurgeAPI::ContactOptedOutWebhookEvent
10
10
  | SurgeAPI::ConversationCreatedWebhookEvent
11
+ | SurgeAPI::LinkFollowedWebhookEvent
11
12
  | SurgeAPI::MessageDeliveredWebhookEvent
12
13
  | SurgeAPI::MessageFailedWebhookEvent
13
14
  | SurgeAPI::MessageReceivedWebhookEvent
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-15 00:00:00.000000000 Z
11
+ date: 2026-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -90,6 +90,7 @@ files:
90
90
  - lib/surge_api/models/contact_update_params.rb
91
91
  - lib/surge_api/models/conversation_created_webhook_event.rb
92
92
  - lib/surge_api/models/error.rb
93
+ - lib/surge_api/models/link_followed_webhook_event.rb
93
94
  - lib/surge_api/models/message.rb
94
95
  - lib/surge_api/models/message_create_params.rb
95
96
  - lib/surge_api/models/message_delivered_webhook_event.rb
@@ -166,6 +167,7 @@ files:
166
167
  - rbi/surge_api/models/contact_update_params.rbi
167
168
  - rbi/surge_api/models/conversation_created_webhook_event.rbi
168
169
  - rbi/surge_api/models/error.rbi
170
+ - rbi/surge_api/models/link_followed_webhook_event.rbi
169
171
  - rbi/surge_api/models/message.rbi
170
172
  - rbi/surge_api/models/message_create_params.rbi
171
173
  - rbi/surge_api/models/message_delivered_webhook_event.rbi
@@ -241,6 +243,7 @@ files:
241
243
  - sig/surge_api/models/contact_update_params.rbs
242
244
  - sig/surge_api/models/conversation_created_webhook_event.rbs
243
245
  - sig/surge_api/models/error.rbs
246
+ - sig/surge_api/models/link_followed_webhook_event.rbs
244
247
  - sig/surge_api/models/message.rbs
245
248
  - sig/surge_api/models/message_create_params.rbs
246
249
  - sig/surge_api/models/message_delivered_webhook_event.rbs