svix 1.61.0 → 1.61.1

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/application.rb +6 -12
  4. data/lib/svix/api/authentication.rb +4 -8
  5. data/lib/svix/api/background_task.rb +2 -4
  6. data/lib/svix/api/endpoint.rb +17 -34
  7. data/lib/svix/api/environment.rb +2 -4
  8. data/lib/svix/api/event_type.rb +7 -14
  9. data/lib/svix/api/health.rb +1 -2
  10. data/lib/svix/api/ingest_endpoint.rb +100 -0
  11. data/lib/svix/api/integration.rb +7 -14
  12. data/lib/svix/api/message.rb +6 -11
  13. data/lib/svix/api/message_attempt.rb +7 -14
  14. data/lib/svix/api/operational_webhook_endpoint.rb +9 -18
  15. data/lib/svix/api/statistics.rb +2 -4
  16. data/lib/svix/models/endpoint_in.rb +4 -0
  17. data/lib/svix/models/expunge_all_contents_out.rb +55 -0
  18. data/lib/svix/models/ingest_endpoint_headers_in.rb +49 -0
  19. data/lib/svix/models/ingest_endpoint_headers_out.rb +52 -0
  20. data/lib/svix/models/ingest_endpoint_in.rb +64 -0
  21. data/lib/svix/models/ingest_endpoint_out.rb +70 -0
  22. data/lib/svix/models/ingest_endpoint_secret_in.rb +49 -0
  23. data/lib/svix/models/ingest_endpoint_secret_out.rb +49 -0
  24. data/lib/svix/models/ingest_endpoint_update.rb +61 -0
  25. data/lib/svix/models/list_response_ingest_endpoint_out.rb +58 -0
  26. data/lib/svix/version.rb +1 -1
  27. data/lib/svix.rb +10 -1
  28. data/templates/api_extra/application_create.rb +16 -0
  29. data/templates/api_extra/message.rb +26 -0
  30. data/templates/api_resource.rb.jinja +71 -0
  31. data/templates/component_type.rb.jinja +7 -0
  32. data/templates/summary.rb.jinja +41 -0
  33. data/templates/types/integer_enum.rb.jinja +37 -0
  34. data/templates/types/string_enum.rb.jinja +37 -0
  35. data/templates/types/struct.rb.jinja +87 -0
  36. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a12085b499abae88367f5d52adae4a8aa8c48fe0e1a389436d2711d3581852f
4
- data.tar.gz: 18579ae17dc10b56661ec8b44644c5e9122968b3976ff62fbf1fa1e1bda50515
3
+ metadata.gz: aa17a27bdc015d0f0504a2dac80f05120e5bfc738662764faf12e8e9de9ac688
4
+ data.tar.gz: 4f0cb4280e4bf560f2525c119ff7f9bc7c7d3e1df06374b4d8044bcc3e554890
5
5
  SHA512:
6
- metadata.gz: 5b7d60e054ebfbb8586cbaab24557a7bfe6bed00400f395343b69cb5c2f0ba5a8876dbb325ab0da2f0932efac5a302adb3ad0872619db0111361f686f0e0556d
7
- data.tar.gz: 4e8bf9d68b41140cf759da0dfc9cd356710a84ea785d356ac11aca69fde91ae7e984c0c2bd10761a355950a518b1bb6a9e3b7eb08cec192fc2b18c9f86a164f6
6
+ metadata.gz: 64891cf4c992c19cfa4e9bdfc4b5a4f3293c24193a47d6b42ace10e50ee4553805b140efbcd618ccd968abd6c250a2ec7e12a6f67007746958854a09e0b0348f
7
+ data.tar.gz: 6b785b761aca9c72c70bac22fc089b2deae9e07ef4983b1a284277107e5d7685b2881804399fb40f6be4640368e8b9c88c6a30c30e0388df9b3c0ba70cc36760
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.61.0)
4
+ svix (1.61.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def list(options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/app"
15
14
  res = @client.execute_request(
16
15
  "GET",
17
- path,
16
+ "/api/v1/app",
18
17
  query_params: {
19
18
  "limit" => options["limit"],
20
19
  "iterator" => options["iterator"],
@@ -26,10 +25,9 @@ module Svix
26
25
 
27
26
  def create(application_in, options = {})
28
27
  options = options.transform_keys(&:to_s)
29
- path = "/api/v1/app"
30
28
  res = @client.execute_request(
31
29
  "POST",
32
- path,
30
+ "/api/v1/app",
33
31
  headers: {
34
32
  "idempotency-key" => options["idempotency-key"]
35
33
  },
@@ -56,37 +54,33 @@ module Svix
56
54
  end
57
55
 
58
56
  def get(app_id)
59
- path = "/api/v1/app/#{app_id}"
60
57
  res = @client.execute_request(
61
58
  "GET",
62
- path
59
+ "/api/v1/app/#{app_id}"
63
60
  )
64
61
  ApplicationOut.deserialize(res)
65
62
  end
66
63
 
67
64
  def update(app_id, application_in)
68
- path = "/api/v1/app/#{app_id}"
69
65
  res = @client.execute_request(
70
66
  "PUT",
71
- path,
67
+ "/api/v1/app/#{app_id}",
72
68
  body: application_in
73
69
  )
74
70
  ApplicationOut.deserialize(res)
75
71
  end
76
72
 
77
73
  def delete(app_id)
78
- path = "/api/v1/app/#{app_id}"
79
74
  @client.execute_request(
80
75
  "DELETE",
81
- path
76
+ "/api/v1/app/#{app_id}"
82
77
  )
83
78
  end
84
79
 
85
80
  def patch(app_id, application_patch)
86
- path = "/api/v1/app/#{app_id}"
87
81
  res = @client.execute_request(
88
82
  "PATCH",
89
- path,
83
+ "/api/v1/app/#{app_id}",
90
84
  body: application_patch
91
85
  )
92
86
  ApplicationOut.deserialize(res)
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def app_portal_access(app_id, app_portal_access_in, options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/auth/app-portal-access/#{app_id}"
15
14
  res = @client.execute_request(
16
15
  "POST",
17
- path,
16
+ "/api/v1/auth/app-portal-access/#{app_id}",
18
17
  headers: {
19
18
  "idempotency-key" => options["idempotency-key"]
20
19
  },
@@ -25,10 +24,9 @@ module Svix
25
24
 
26
25
  def expire_all(app_id, application_token_expire_in, options = {})
27
26
  options = options.transform_keys(&:to_s)
28
- path = "/api/v1/auth/app/#{app_id}/expire-all"
29
27
  @client.execute_request(
30
28
  "POST",
31
- path,
29
+ "/api/v1/auth/app/#{app_id}/expire-all",
32
30
  headers: {
33
31
  "idempotency-key" => options["idempotency-key"]
34
32
  },
@@ -38,10 +36,9 @@ module Svix
38
36
 
39
37
  def dashboard_access(app_id, options = {})
40
38
  options = options.transform_keys(&:to_s)
41
- path = "/api/v1/auth/dashboard-access/#{app_id}"
42
39
  res = @client.execute_request(
43
40
  "POST",
44
- path,
41
+ "/api/v1/auth/dashboard-access/#{app_id}",
45
42
  headers: {
46
43
  "idempotency-key" => options["idempotency-key"]
47
44
  }
@@ -51,10 +48,9 @@ module Svix
51
48
 
52
49
  def logout(options = {})
53
50
  options = options.transform_keys(&:to_s)
54
- path = "/api/v1/auth/logout"
55
51
  @client.execute_request(
56
52
  "POST",
57
- path,
53
+ "/api/v1/auth/logout",
58
54
  headers: {
59
55
  "idempotency-key" => options["idempotency-key"]
60
56
  }
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def list(options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/background-task"
15
14
  res = @client.execute_request(
16
15
  "GET",
17
- path,
16
+ "/api/v1/background-task",
18
17
  query_params: {
19
18
  "status" => options["status"],
20
19
  "task" => options["task"],
@@ -27,10 +26,9 @@ module Svix
27
26
  end
28
27
 
29
28
  def get(task_id)
30
- path = "/api/v1/background-task/#{task_id}"
31
29
  res = @client.execute_request(
32
30
  "GET",
33
- path
31
+ "/api/v1/background-task/#{task_id}"
34
32
  )
35
33
  BackgroundTaskOut.deserialize(res)
36
34
  end
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def list(app_id, options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/app/#{app_id}/endpoint"
15
14
  res = @client.execute_request(
16
15
  "GET",
17
- path,
16
+ "/api/v1/app/#{app_id}/endpoint",
18
17
  query_params: {
19
18
  "limit" => options["limit"],
20
19
  "iterator" => options["iterator"],
@@ -26,10 +25,9 @@ module Svix
26
25
 
27
26
  def create(app_id, endpoint_in, options = {})
28
27
  options = options.transform_keys(&:to_s)
29
- path = "/api/v1/app/#{app_id}/endpoint"
30
28
  res = @client.execute_request(
31
29
  "POST",
32
- path,
30
+ "/api/v1/app/#{app_id}/endpoint",
33
31
  headers: {
34
32
  "idempotency-key" => options["idempotency-key"]
35
33
  },
@@ -39,75 +37,67 @@ module Svix
39
37
  end
40
38
 
41
39
  def get(app_id, endpoint_id)
42
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
43
40
  res = @client.execute_request(
44
41
  "GET",
45
- path
42
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
46
43
  )
47
44
  EndpointOut.deserialize(res)
48
45
  end
49
46
 
50
47
  def update(app_id, endpoint_id, endpoint_update)
51
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
52
48
  res = @client.execute_request(
53
49
  "PUT",
54
- path,
50
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}",
55
51
  body: endpoint_update
56
52
  )
57
53
  EndpointOut.deserialize(res)
58
54
  end
59
55
 
60
56
  def delete(app_id, endpoint_id)
61
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
62
57
  @client.execute_request(
63
58
  "DELETE",
64
- path
59
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
65
60
  )
66
61
  end
67
62
 
68
63
  def patch(app_id, endpoint_id, endpoint_patch)
69
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}"
70
64
  res = @client.execute_request(
71
65
  "PATCH",
72
- path,
66
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}",
73
67
  body: endpoint_patch
74
68
  )
75
69
  EndpointOut.deserialize(res)
76
70
  end
77
71
 
78
72
  def get_headers(app_id, endpoint_id)
79
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers"
80
73
  res = @client.execute_request(
81
74
  "GET",
82
- path
75
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers"
83
76
  )
84
77
  EndpointHeadersOut.deserialize(res)
85
78
  end
86
79
 
87
80
  def update_headers(app_id, endpoint_id, endpoint_headers_in)
88
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers"
89
81
  @client.execute_request(
90
82
  "PUT",
91
- path,
83
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers",
92
84
  body: endpoint_headers_in
93
85
  )
94
86
  end
95
87
 
96
88
  def patch_headers(app_id, endpoint_id, endpoint_headers_patch_in)
97
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers"
98
89
  @client.execute_request(
99
90
  "PATCH",
100
- path,
91
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/headers",
101
92
  body: endpoint_headers_patch_in
102
93
  )
103
94
  end
104
95
 
105
96
  def recover(app_id, endpoint_id, recover_in, options = {})
106
97
  options = options.transform_keys(&:to_s)
107
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/recover"
108
98
  res = @client.execute_request(
109
99
  "POST",
110
- path,
100
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/recover",
111
101
  headers: {
112
102
  "idempotency-key" => options["idempotency-key"]
113
103
  },
@@ -118,10 +108,9 @@ module Svix
118
108
 
119
109
  def replay_missing(app_id, endpoint_id, replay_in, options = {})
120
110
  options = options.transform_keys(&:to_s)
121
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/replay-missing"
122
111
  res = @client.execute_request(
123
112
  "POST",
124
- path,
113
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/replay-missing",
125
114
  headers: {
126
115
  "idempotency-key" => options["idempotency-key"]
127
116
  },
@@ -131,20 +120,18 @@ module Svix
131
120
  end
132
121
 
133
122
  def get_secret(app_id, endpoint_id)
134
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/secret"
135
123
  res = @client.execute_request(
136
124
  "GET",
137
- path
125
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/secret"
138
126
  )
139
127
  EndpointSecretOut.deserialize(res)
140
128
  end
141
129
 
142
130
  def rotate_secret(app_id, endpoint_id, endpoint_secret_rotate_in, options = {})
143
131
  options = options.transform_keys(&:to_s)
144
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/secret/rotate"
145
132
  @client.execute_request(
146
133
  "POST",
147
- path,
134
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/secret/rotate",
148
135
  headers: {
149
136
  "idempotency-key" => options["idempotency-key"]
150
137
  },
@@ -154,10 +141,9 @@ module Svix
154
141
 
155
142
  def send_example(app_id, endpoint_id, event_example_in, options = {})
156
143
  options = options.transform_keys(&:to_s)
157
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/send-example"
158
144
  res = @client.execute_request(
159
145
  "POST",
160
- path,
146
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/send-example",
161
147
  headers: {
162
148
  "idempotency-key" => options["idempotency-key"]
163
149
  },
@@ -168,10 +154,9 @@ module Svix
168
154
 
169
155
  def get_stats(app_id, endpoint_id, options = {})
170
156
  options = options.transform_keys(&:to_s)
171
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/stats"
172
157
  res = @client.execute_request(
173
158
  "GET",
174
- path,
159
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/stats",
175
160
  query_params: {
176
161
  "since" => options["since"],
177
162
  "until" => options["until"]
@@ -181,19 +166,17 @@ module Svix
181
166
  end
182
167
 
183
168
  def transformation_get(app_id, endpoint_id)
184
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation"
185
169
  res = @client.execute_request(
186
170
  "GET",
187
- path
171
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation"
188
172
  )
189
173
  EndpointTransformationOut.deserialize(res)
190
174
  end
191
175
 
192
176
  def transformation_partial_update(app_id, endpoint_id, endpoint_transformation_in)
193
- path = "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation"
194
177
  @client.execute_request(
195
178
  "PATCH",
196
- path,
179
+ "/api/v1/app/#{app_id}/endpoint/#{endpoint_id}/transformation",
197
180
  body: endpoint_transformation_in
198
181
  )
199
182
  end
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def export(options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/environment/export"
15
14
  res = @client.execute_request(
16
15
  "POST",
17
- path,
16
+ "/api/v1/environment/export",
18
17
  headers: {
19
18
  "idempotency-key" => options["idempotency-key"]
20
19
  }
@@ -24,10 +23,9 @@ module Svix
24
23
 
25
24
  def import(environment_in, options = {})
26
25
  options = options.transform_keys(&:to_s)
27
- path = "/api/v1/environment/import"
28
26
  @client.execute_request(
29
27
  "POST",
30
- path,
28
+ "/api/v1/environment/import",
31
29
  headers: {
32
30
  "idempotency-key" => options["idempotency-key"]
33
31
  },
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def list(options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/event-type"
15
14
  res = @client.execute_request(
16
15
  "GET",
17
- path,
16
+ "/api/v1/event-type",
18
17
  query_params: {
19
18
  "limit" => options["limit"],
20
19
  "iterator" => options["iterator"],
@@ -28,10 +27,9 @@ module Svix
28
27
 
29
28
  def create(event_type_in, options = {})
30
29
  options = options.transform_keys(&:to_s)
31
- path = "/api/v1/event-type"
32
30
  res = @client.execute_request(
33
31
  "POST",
34
- path,
32
+ "/api/v1/event-type",
35
33
  headers: {
36
34
  "idempotency-key" => options["idempotency-key"]
37
35
  },
@@ -42,10 +40,9 @@ module Svix
42
40
 
43
41
  def import_openapi(event_type_import_open_api_in, options = {})
44
42
  options = options.transform_keys(&:to_s)
45
- path = "/api/v1/event-type/import/openapi"
46
43
  res = @client.execute_request(
47
44
  "POST",
48
- path,
45
+ "/api/v1/event-type/import/openapi",
49
46
  headers: {
50
47
  "idempotency-key" => options["idempotency-key"]
51
48
  },
@@ -55,19 +52,17 @@ module Svix
55
52
  end
56
53
 
57
54
  def get(event_type_name)
58
- path = "/api/v1/event-type/#{event_type_name}"
59
55
  res = @client.execute_request(
60
56
  "GET",
61
- path
57
+ "/api/v1/event-type/#{event_type_name}"
62
58
  )
63
59
  EventTypeOut.deserialize(res)
64
60
  end
65
61
 
66
62
  def update(event_type_name, event_type_update)
67
- path = "/api/v1/event-type/#{event_type_name}"
68
63
  res = @client.execute_request(
69
64
  "PUT",
70
- path,
65
+ "/api/v1/event-type/#{event_type_name}",
71
66
  body: event_type_update
72
67
  )
73
68
  EventTypeOut.deserialize(res)
@@ -75,10 +70,9 @@ module Svix
75
70
 
76
71
  def delete(event_type_name, options = {})
77
72
  options = options.transform_keys(&:to_s)
78
- path = "/api/v1/event-type/#{event_type_name}"
79
73
  @client.execute_request(
80
74
  "DELETE",
81
- path,
75
+ "/api/v1/event-type/#{event_type_name}",
82
76
  query_params: {
83
77
  "expunge" => options["expunge"]
84
78
  }
@@ -86,10 +80,9 @@ module Svix
86
80
  end
87
81
 
88
82
  def patch(event_type_name, event_type_patch)
89
- path = "/api/v1/event-type/#{event_type_name}"
90
83
  res = @client.execute_request(
91
84
  "PATCH",
92
- path,
85
+ "/api/v1/event-type/#{event_type_name}",
93
86
  body: event_type_patch
94
87
  )
95
88
  EventTypeOut.deserialize(res)
@@ -10,10 +10,9 @@ module Svix
10
10
  end
11
11
 
12
12
  def get
13
- path = "/api/v1/health"
14
13
  @client.execute_request(
15
14
  "GET",
16
- path
15
+ "/api/v1/health"
17
16
  )
18
17
  end
19
18
 
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class IngestEndpoint
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def list(options = {})
13
+ options = options.transform_keys(&:to_s)
14
+ res = @client.execute_request(
15
+ "GET",
16
+ "/ingest/api/v1/source/{source_id}/endpoint",
17
+ query_params: {
18
+ "limit" => options["limit"],
19
+ "iterator" => options["iterator"],
20
+ "order" => options["order"]
21
+ }
22
+ )
23
+ ListResponseIngestEndpointOut.deserialize(res)
24
+ end
25
+
26
+ def create(ingest_endpoint_in, options = {})
27
+ options = options.transform_keys(&:to_s)
28
+ res = @client.execute_request(
29
+ "POST",
30
+ "/ingest/api/v1/source/{source_id}/endpoint",
31
+ headers: {
32
+ "idempotency-key" => options["idempotency-key"]
33
+ },
34
+ body: ingest_endpoint_in
35
+ )
36
+ IngestEndpointOut.deserialize(res)
37
+ end
38
+
39
+ def get(endpoint_id)
40
+ res = @client.execute_request(
41
+ "GET",
42
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}"
43
+ )
44
+ IngestEndpointOut.deserialize(res)
45
+ end
46
+
47
+ def update(endpoint_id, ingest_endpoint_update)
48
+ res = @client.execute_request(
49
+ "PUT",
50
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}",
51
+ body: ingest_endpoint_update
52
+ )
53
+ IngestEndpointOut.deserialize(res)
54
+ end
55
+
56
+ def delete(endpoint_id)
57
+ @client.execute_request(
58
+ "DELETE",
59
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}"
60
+ )
61
+ end
62
+
63
+ def get_headers(endpoint_id)
64
+ res = @client.execute_request(
65
+ "GET",
66
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}/headers"
67
+ )
68
+ IngestEndpointHeadersOut.deserialize(res)
69
+ end
70
+
71
+ def update_headers(endpoint_id, ingest_endpoint_headers_in)
72
+ @client.execute_request(
73
+ "PUT",
74
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}/headers",
75
+ body: ingest_endpoint_headers_in
76
+ )
77
+ end
78
+
79
+ def get_secret(endpoint_id)
80
+ res = @client.execute_request(
81
+ "GET",
82
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}/secret"
83
+ )
84
+ IngestEndpointSecretOut.deserialize(res)
85
+ end
86
+
87
+ def rotate_secret(endpoint_id, ingest_endpoint_secret_in, options = {})
88
+ options = options.transform_keys(&:to_s)
89
+ @client.execute_request(
90
+ "POST",
91
+ "/ingest/api/v1/source/{source_id}/endpoint/#{endpoint_id}/secret/rotate",
92
+ headers: {
93
+ "idempotency-key" => options["idempotency-key"]
94
+ },
95
+ body: ingest_endpoint_secret_in
96
+ )
97
+ end
98
+
99
+ end
100
+ end
@@ -11,10 +11,9 @@ module Svix
11
11
 
12
12
  def list(app_id, options = {})
13
13
  options = options.transform_keys(&:to_s)
14
- path = "/api/v1/app/#{app_id}/integration"
15
14
  res = @client.execute_request(
16
15
  "GET",
17
- path,
16
+ "/api/v1/app/#{app_id}/integration",
18
17
  query_params: {
19
18
  "limit" => options["limit"],
20
19
  "iterator" => options["iterator"],
@@ -26,10 +25,9 @@ module Svix
26
25
 
27
26
  def create(app_id, integration_in, options = {})
28
27
  options = options.transform_keys(&:to_s)
29
- path = "/api/v1/app/#{app_id}/integration"
30
28
  res = @client.execute_request(
31
29
  "POST",
32
- path,
30
+ "/api/v1/app/#{app_id}/integration",
33
31
  headers: {
34
32
  "idempotency-key" => options["idempotency-key"]
35
33
  },
@@ -39,47 +37,42 @@ module Svix
39
37
  end
40
38
 
41
39
  def get(app_id, integ_id)
42
- path = "/api/v1/app/#{app_id}/integration/#{integ_id}"
43
40
  res = @client.execute_request(
44
41
  "GET",
45
- path
42
+ "/api/v1/app/#{app_id}/integration/#{integ_id}"
46
43
  )
47
44
  IntegrationOut.deserialize(res)
48
45
  end
49
46
 
50
47
  def update(app_id, integ_id, integration_update)
51
- path = "/api/v1/app/#{app_id}/integration/#{integ_id}"
52
48
  res = @client.execute_request(
53
49
  "PUT",
54
- path,
50
+ "/api/v1/app/#{app_id}/integration/#{integ_id}",
55
51
  body: integration_update
56
52
  )
57
53
  IntegrationOut.deserialize(res)
58
54
  end
59
55
 
60
56
  def delete(app_id, integ_id)
61
- path = "/api/v1/app/#{app_id}/integration/#{integ_id}"
62
57
  @client.execute_request(
63
58
  "DELETE",
64
- path
59
+ "/api/v1/app/#{app_id}/integration/#{integ_id}"
65
60
  )
66
61
  end
67
62
 
68
63
  def get_key(app_id, integ_id)
69
- path = "/api/v1/app/#{app_id}/integration/#{integ_id}/key"
70
64
  res = @client.execute_request(
71
65
  "GET",
72
- path
66
+ "/api/v1/app/#{app_id}/integration/#{integ_id}/key"
73
67
  )
74
68
  IntegrationKeyOut.deserialize(res)
75
69
  end
76
70
 
77
71
  def rotate_key(app_id, integ_id, options = {})
78
72
  options = options.transform_keys(&:to_s)
79
- path = "/api/v1/app/#{app_id}/integration/#{integ_id}/key/rotate"
80
73
  res = @client.execute_request(
81
74
  "POST",
82
- path,
75
+ "/api/v1/app/#{app_id}/integration/#{integ_id}/key/rotate",
83
76
  headers: {
84
77
  "idempotency-key" => options["idempotency-key"]
85
78
  }