svix 1.14.0 → 1.15.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: d64085aefdf468273eede3dc68655f48abac3a682d01d7bb182e5abace37fbd3
4
- data.tar.gz: e1bad67f258a28268b31f1d10418c593f8ef033cc91a5ea99006cb1eb72d7c2c
3
+ metadata.gz: a606b32c5ca79a0d0ccb3b18d578ec53a1a1f55cf324b22861148fe71af8041c
4
+ data.tar.gz: 7f31beb1b6ee11d0c9a76541a2997fb5e9b43dfae62f5e70e41d1e8f2ce12427
5
5
  SHA512:
6
- metadata.gz: 4d5d3697998262c85cb220125a5ba82798e0ea2163187816d23b4879a7e6268a17c04cc357766702822802cece5db1da0207f69cf9d889709b4ceac2e6a7b1c0
7
- data.tar.gz: 485b6eb5fd8cb140e1c38e6baedf10f5c24c4b910fdc2ffd154900f927946ee10aded4d66cef9db3c88de06fb9ab291a88f3814d166d37c36512eef31d78e4bd
6
+ metadata.gz: 2a14e95930d3df9d4625f102acc46d41d010fbd60795a95a38d2e36438bb8c36eeaa56840bb3896bb506df177b795f75a91c83f7cab1d4154a9b34de354afb07
7
+ data.tar.gz: 9798437a428c55b80863d9090f7db80091cd36ccf18a4c04159729b985c78ebad94ed3a3189eadd231d24db8906eeb09bbb6c7d22b79d8fdb5ea7f514fe4a7d4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.14.0)
4
+ svix (1.15.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -513,6 +513,7 @@ module Svix
513
513
  # @option opts [Time] :before Only include items created before a certain date
514
514
  # @option opts [Time] :after Only include items created after a certain date
515
515
  # @option opts [Boolean] :with_content When `true` message payloads are included in the response (default to true)
516
+ # @option opts [String] :tag Filter messages matching the provided tag
516
517
  # @option opts [Array<String>] :event_types Filter response based on the event type
517
518
  # @return [ListResponseMessageOut]
518
519
  def v1_message_list(app_id, opts = {})
@@ -530,6 +531,7 @@ module Svix
530
531
  # @option opts [Time] :before Only include items created before a certain date
531
532
  # @option opts [Time] :after Only include items created after a certain date
532
533
  # @option opts [Boolean] :with_content When &#x60;true&#x60; message payloads are included in the response
534
+ # @option opts [String] :tag Filter messages matching the provided tag
533
535
  # @option opts [Array<String>] :event_types Filter response based on the event type
534
536
  # @return [Array<(ListResponseMessageOut, Integer, Hash)>] ListResponseMessageOut data, response status code and response headers
535
537
  def v1_message_list_with_http_info(app_id, opts = {})
@@ -570,6 +572,15 @@ module Svix
570
572
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageApi.v1_message_list, must conform to the pattern #{pattern}."
571
573
  end
572
574
 
575
+ if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length > 128
576
+ fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling MessageApi.v1_message_list, the character length must be smaller than or equal to 128.'
577
+ end
578
+
579
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
580
+ if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'] !~ pattern
581
+ fail ArgumentError, "invalid value for 'opts[:\"tag\"]' when calling MessageApi.v1_message_list, must conform to the pattern #{pattern}."
582
+ end
583
+
573
584
  # resource path
574
585
  local_var_path = '/api/v1/app/{app_id}/msg/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
575
586
 
@@ -581,6 +592,7 @@ module Svix
581
592
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
582
593
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
583
594
  query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
595
+ query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
584
596
  query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
585
597
 
586
598
  # header parameters
@@ -580,6 +580,7 @@ module Svix
580
580
  # @option opts [Time] :before Only include items created before a certain date
581
581
  # @option opts [Time] :after Only include items created after a certain date
582
582
  # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
583
+ # @option opts [Boolean] :with_msg (default to false)
583
584
  # @option opts [Array<String>] :event_types Filter response based on the event type
584
585
  # @return [ListResponseMessageAttemptOut]
585
586
  def v1_message_attempt_list_by_endpoint(app_id, endpoint_id, opts = {})
@@ -600,6 +601,7 @@ module Svix
600
601
  # @option opts [Time] :before Only include items created before a certain date
601
602
  # @option opts [Time] :after Only include items created after a certain date
602
603
  # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response
604
+ # @option opts [Boolean] :with_msg
603
605
  # @option opts [Array<String>] :event_types Filter response based on the event type
604
606
  # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
605
607
  def v1_message_attempt_list_by_endpoint_with_http_info(app_id, endpoint_id, opts = {})
@@ -670,6 +672,7 @@ module Svix
670
672
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
671
673
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
672
674
  query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
675
+ query_params[:'with_msg'] = opts[:'with_msg'] if !opts[:'with_msg'].nil?
673
676
  query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
674
677
 
675
678
  # header parameters
@@ -25,8 +25,8 @@ module Svix
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
27
27
  # @return [AppUsageStatsOut]
28
- def aggregate_app_stats(app_usage_stats_in, opts = {})
29
- data, _status_code, _headers = aggregate_app_stats_with_http_info(app_usage_stats_in, opts)
28
+ def v1_statistics_aggregate_app_stats(app_usage_stats_in, opts = {})
29
+ data, _status_code, _headers = v1_statistics_aggregate_app_stats_with_http_info(app_usage_stats_in, opts)
30
30
  data
31
31
  end
32
32
 
@@ -36,13 +36,13 @@ module Svix
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
38
38
  # @return [Array<(AppUsageStatsOut, Integer, Hash)>] AppUsageStatsOut data, response status code and response headers
39
- def aggregate_app_stats_with_http_info(app_usage_stats_in, opts = {})
39
+ def v1_statistics_aggregate_app_stats_with_http_info(app_usage_stats_in, opts = {})
40
40
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: StatisticsApi.aggregate_app_stats ...'
41
+ @api_client.config.logger.debug 'Calling API: StatisticsApi.v1_statistics_aggregate_app_stats ...'
42
42
  end
43
43
  # verify the required parameter 'app_usage_stats_in' is set
44
44
  if @api_client.config.client_side_validation && app_usage_stats_in.nil?
45
- fail ArgumentError, "Missing the required parameter 'app_usage_stats_in' when calling StatisticsApi.aggregate_app_stats"
45
+ fail ArgumentError, "Missing the required parameter 'app_usage_stats_in' when calling StatisticsApi.v1_statistics_aggregate_app_stats"
46
46
  end
47
47
  # resource path
48
48
  local_var_path = '/api/v1/stats/usage/app/'
@@ -71,7 +71,7 @@ module Svix
71
71
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
72
 
73
73
  new_options = opts.merge(
74
- :operation => :"StatisticsApi.aggregate_app_stats",
74
+ :operation => :"StatisticsApi.v1_statistics_aggregate_app_stats",
75
75
  :header_params => header_params,
76
76
  :query_params => query_params,
77
77
  :form_params => form_params,
@@ -82,7 +82,7 @@ module Svix
82
82
 
83
83
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
84
  if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: StatisticsApi#aggregate_app_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ @api_client.config.logger.debug "API called: StatisticsApi#v1_statistics_aggregate_app_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
86
  end
87
87
  return data, status_code, headers
88
88
  end
@@ -91,8 +91,8 @@ module Svix
91
91
  # Creates a background task to calculate the listed event types for all apps in the organization. Note that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to retrieve the results of the operation.
92
92
  # @param [Hash] opts the optional parameters
93
93
  # @return [AggregateEventTypesOut]
94
- def aggregate_event_types(opts = {})
95
- data, _status_code, _headers = aggregate_event_types_with_http_info(opts)
94
+ def v1_statistics_aggregate_event_types(opts = {})
95
+ data, _status_code, _headers = v1_statistics_aggregate_event_types_with_http_info(opts)
96
96
  data
97
97
  end
98
98
 
@@ -100,9 +100,9 @@ module Svix
100
100
  # Creates a background task to calculate the listed event types for all apps in the organization. Note that this endpoint is asynchronous. You will need to poll the &#x60;Get Background Task&#x60; endpoint to retrieve the results of the operation.
101
101
  # @param [Hash] opts the optional parameters
102
102
  # @return [Array<(AggregateEventTypesOut, Integer, Hash)>] AggregateEventTypesOut data, response status code and response headers
103
- def aggregate_event_types_with_http_info(opts = {})
103
+ def v1_statistics_aggregate_event_types_with_http_info(opts = {})
104
104
  if @api_client.config.debugging
105
- @api_client.config.logger.debug 'Calling API: StatisticsApi.aggregate_event_types ...'
105
+ @api_client.config.logger.debug 'Calling API: StatisticsApi.v1_statistics_aggregate_event_types ...'
106
106
  end
107
107
  # resource path
108
108
  local_var_path = '/api/v1/stats/usage/event-types/'
@@ -128,7 +128,7 @@ module Svix
128
128
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
129
129
 
130
130
  new_options = opts.merge(
131
- :operation => :"StatisticsApi.aggregate_event_types",
131
+ :operation => :"StatisticsApi.v1_statistics_aggregate_event_types",
132
132
  :header_params => header_params,
133
133
  :query_params => query_params,
134
134
  :form_params => form_params,
@@ -139,7 +139,7 @@ module Svix
139
139
 
140
140
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
141
141
  if @api_client.config.debugging
142
- @api_client.config.logger.debug "API called: StatisticsApi#aggregate_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ @api_client.config.logger.debug "API called: StatisticsApi#v1_statistics_aggregate_event_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
143
  end
144
144
  return data, status_code, headers
145
145
  end
@@ -21,6 +21,8 @@ module Svix
21
21
  # The attempt's ID
22
22
  attr_accessor :id
23
23
 
24
+ attr_accessor :msg
25
+
24
26
  # The msg's ID
25
27
  attr_accessor :msg_id
26
28
 
@@ -41,6 +43,7 @@ module Svix
41
43
  {
42
44
  :'endpoint_id' => :'endpointId',
43
45
  :'id' => :'id',
46
+ :'msg' => :'msg',
44
47
  :'msg_id' => :'msgId',
45
48
  :'response' => :'response',
46
49
  :'response_status_code' => :'responseStatusCode',
@@ -61,6 +64,7 @@ module Svix
61
64
  {
62
65
  :'endpoint_id' => :'String',
63
66
  :'id' => :'String',
67
+ :'msg' => :'MessageOut',
64
68
  :'msg_id' => :'String',
65
69
  :'response' => :'String',
66
70
  :'response_status_code' => :'Integer',
@@ -100,6 +104,10 @@ module Svix
100
104
  self.id = attributes[:'id']
101
105
  end
102
106
 
107
+ if attributes.key?(:'msg')
108
+ self.msg = attributes[:'msg']
109
+ end
110
+
103
111
  if attributes.key?(:'msg_id')
104
112
  self.msg_id = attributes[:'msg_id']
105
113
  end
@@ -222,6 +230,7 @@ module Svix
222
230
  self.class == o.class &&
223
231
  endpoint_id == o.endpoint_id &&
224
232
  id == o.id &&
233
+ msg == o.msg &&
225
234
  msg_id == o.msg_id &&
226
235
  response == o.response &&
227
236
  response_status_code == o.response_status_code &&
@@ -240,7 +249,7 @@ module Svix
240
249
  # Calculates hash code according to all attributes.
241
250
  # @return [Integer] Hash code
242
251
  def hash
243
- [endpoint_id, id, msg_id, response, response_status_code, status, timestamp, trigger_type, url].hash
252
+ [endpoint_id, id, msg, msg_id, response, response_status_code, status, timestamp, trigger_type, url].hash
244
253
  end
245
254
 
246
255
  # Builds the object from hash
@@ -21,6 +21,8 @@ module Svix
21
21
  # The attempt's ID
22
22
  attr_accessor :id
23
23
 
24
+ attr_accessor :msg
25
+
24
26
  # The msg's ID
25
27
  attr_accessor :msg_id
26
28
 
@@ -41,6 +43,7 @@ module Svix
41
43
  {
42
44
  :'endpoint_id' => :'endpointId',
43
45
  :'id' => :'id',
46
+ :'msg' => :'msg',
44
47
  :'msg_id' => :'msgId',
45
48
  :'response' => :'response',
46
49
  :'response_status_code' => :'responseStatusCode',
@@ -61,6 +64,7 @@ module Svix
61
64
  {
62
65
  :'endpoint_id' => :'String',
63
66
  :'id' => :'String',
67
+ :'msg' => :'MessageOut',
64
68
  :'msg_id' => :'String',
65
69
  :'response' => :'String',
66
70
  :'response_status_code' => :'Integer',
@@ -100,6 +104,10 @@ module Svix
100
104
  self.id = attributes[:'id']
101
105
  end
102
106
 
107
+ if attributes.key?(:'msg')
108
+ self.msg = attributes[:'msg']
109
+ end
110
+
103
111
  if attributes.key?(:'msg_id')
104
112
  self.msg_id = attributes[:'msg_id']
105
113
  end
@@ -222,6 +230,7 @@ module Svix
222
230
  self.class == o.class &&
223
231
  endpoint_id == o.endpoint_id &&
224
232
  id == o.id &&
233
+ msg == o.msg &&
225
234
  msg_id == o.msg_id &&
226
235
  response == o.response &&
227
236
  response_status_code == o.response_status_code &&
@@ -240,7 +249,7 @@ module Svix
240
249
  # Calculates hash code according to all attributes.
241
250
  # @return [Integer] Hash code
242
251
  def hash
243
- [endpoint_id, id, msg_id, response, response_status_code, status, timestamp, trigger_type, url].hash
252
+ [endpoint_id, id, msg, msg_id, response, response_status_code, status, timestamp, trigger_type, url].hash
244
253
  end
245
254
 
246
255
  # Builds the object from hash
@@ -30,6 +30,9 @@ module Svix
30
30
 
31
31
  attr_accessor :payload_retention_period
32
32
 
33
+ # List of free-form tags that can be filtered by when listing messages
34
+ attr_accessor :tags
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -38,7 +41,8 @@ module Svix
38
41
  :'event_id' => :'eventId',
39
42
  :'event_type' => :'eventType',
40
43
  :'payload' => :'payload',
41
- :'payload_retention_period' => :'payloadRetentionPeriod'
44
+ :'payload_retention_period' => :'payloadRetentionPeriod',
45
+ :'tags' => :'tags'
42
46
  }
43
47
  end
44
48
 
@@ -55,7 +59,8 @@ module Svix
55
59
  :'event_id' => :'String',
56
60
  :'event_type' => :'String',
57
61
  :'payload' => :'Object',
58
- :'payload_retention_period' => :'Integer'
62
+ :'payload_retention_period' => :'Integer',
63
+ :'tags' => :'Array<String>'
59
64
  }
60
65
  end
61
66
 
@@ -64,6 +69,7 @@ module Svix
64
69
  Set.new([
65
70
  :'channels',
66
71
  :'event_id',
72
+ :'tags'
67
73
  ])
68
74
  end
69
75
 
@@ -109,6 +115,12 @@ module Svix
109
115
  else
110
116
  self.payload_retention_period = 90
111
117
  end
118
+
119
+ if attributes.key?(:'tags')
120
+ if (value = attributes[:'tags']).is_a?(Array)
121
+ self.tags = value
122
+ end
123
+ end
112
124
  end
113
125
 
114
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -161,6 +173,14 @@ module Svix
161
173
  invalid_properties.push('invalid value for "payload_retention_period", must be greater than or equal to 5.')
162
174
  end
163
175
 
176
+ if !@tags.nil? && @tags.length > 5
177
+ invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 5.')
178
+ end
179
+
180
+ if !@tags.nil? && @tags.length < 1
181
+ invalid_properties.push('invalid value for "tags", number of items must be greater than or equal to 1.')
182
+ end
183
+
164
184
  invalid_properties
165
185
  end
166
186
 
@@ -178,6 +198,8 @@ module Svix
178
198
  return false if @payload.nil?
179
199
  return false if !@payload_retention_period.nil? && @payload_retention_period > 90
180
200
  return false if !@payload_retention_period.nil? && @payload_retention_period < 5
201
+ return false if !@tags.nil? && @tags.length > 5
202
+ return false if !@tags.nil? && @tags.length < 1
181
203
  true
182
204
  end
183
205
 
@@ -247,6 +269,20 @@ module Svix
247
269
  @payload_retention_period = payload_retention_period
248
270
  end
249
271
 
272
+ # Custom attribute writer method with validation
273
+ # @param [Object] tags Value to be assigned
274
+ def tags=(tags)
275
+ if !tags.nil? && tags.length > 5
276
+ fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 5.'
277
+ end
278
+
279
+ if !tags.nil? && tags.length < 1
280
+ fail ArgumentError, 'invalid value for "tags", number of items must be greater than or equal to 1.'
281
+ end
282
+
283
+ @tags = tags
284
+ end
285
+
250
286
  # Checks equality by comparing each attribute.
251
287
  # @param [Object] Object to be compared
252
288
  def ==(o)
@@ -257,7 +293,8 @@ module Svix
257
293
  event_id == o.event_id &&
258
294
  event_type == o.event_type &&
259
295
  payload == o.payload &&
260
- payload_retention_period == o.payload_retention_period
296
+ payload_retention_period == o.payload_retention_period &&
297
+ tags == o.tags
261
298
  end
262
299
 
263
300
  # @see the `==` method
@@ -269,7 +306,7 @@ module Svix
269
306
  # Calculates hash code according to all attributes.
270
307
  # @return [Integer] Hash code
271
308
  def hash
272
- [application, channels, event_id, event_type, payload, payload_retention_period].hash
309
+ [application, channels, event_id, event_type, payload, payload_retention_period, tags].hash
273
310
  end
274
311
 
275
312
  # Builds the object from hash
@@ -16,11 +16,17 @@ require 'time'
16
16
  module Svix
17
17
  class TransformationTemplateKind
18
18
  CUSTOM = "Custom".freeze
19
- SLACK = "Slack".freeze
19
+ CUSTOMER_IO = "CustomerIO".freeze
20
20
  DISCORD = "Discord".freeze
21
- TEAMS = "Teams".freeze
21
+ HUBSPOT = "Hubspot".freeze
22
22
  INNGEST = "Inngest".freeze
23
+ SALESFORCE = "Salesforce".freeze
23
24
  SEGMENT = "Segment".freeze
25
+ SLACK = "Slack".freeze
26
+ TEAMS = "Teams".freeze
27
+ TRIGGER_DEV = "TriggerDev".freeze
28
+ WINDMILL = "Windmill".freeze
29
+ ZAPIER = "Zapier".freeze
24
30
 
25
31
  # Builds the enum from string
26
32
  # @param [String] The enum value in the form of the string
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "1.14.0"
4
+ VERSION = "1.15.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-17 00:00:00.000000000 Z
11
+ date: 2023-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus