stigg 0.1.0.pre.beta.31 → 0.1.0.pre.beta.32

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: 62b43ccdd36eb38e4c60c014fafbae81b9dcbde64df188b41acf6dc3fa68ed84
4
- data.tar.gz: 5f3f6bf7dbaaf3c9c5757a2f145ff99e90e7918ac9160f662075fc0a748c27d1
3
+ metadata.gz: eda0bdec54ee6cdc8dc45238592cd94bb312bd76ee04cda49b670f415d307ece
4
+ data.tar.gz: ffa90d94220b32f28176f37fbf5de7cb5af3bc7315852011e2dffa8d4462ff82
5
5
  SHA512:
6
- metadata.gz: abecfb4018b4e477bc69e7d2a21b86dc4a2bcb872d0f84187c80f9a99b2a81f49c455249b2d97af69b595aff2c97f7b1a7dca9d67447dac48549f1199c346285
7
- data.tar.gz: 9b63fe79671b002b75d89b5ce2fc15a1916ed2a245800871e7ee29c2549f0b0fe3a3d9f98615ab49d25a2b5a34a522cefcd45f8efe30bccc02cc9df86c5e8f36
6
+ metadata.gz: d80cbaef350054651bca50277a785888375c2a61a8cb9ed726473a45e758cdf4f15d1e3bc95231d7768a6bf35fa457afa064e00b1b65c96b2216de47a9a723eb
7
+ data.tar.gz: aa7f8cb93a9b5079f023419e5fe63affab772b479afd0a54dd7997312b347232952424553393d14e88cb27fa654bfb87cc1c753e0a64e86ccad737039ef831e8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-beta.32 (2026-06-23)
4
+
5
+ Full Changelog: [v0.1.0-beta.31...v0.1.0-beta.32](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.31...v0.1.0-beta.32)
6
+
7
+ ### Features
8
+
9
+ * **api:** add update method to data_export destinations ([a28cc2d](https://github.com/stiggio/stigg-ruby/commit/a28cc2d135579e2923fad3a6ab26b4185fea28b3))
10
+
3
11
  ## 0.1.0-beta.31 (2026-06-23)
4
12
 
5
13
  Full Changelog: [v0.1.0-beta.30...v0.1.0-beta.31](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-beta.30...v0.1.0-beta.31)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "stigg", "~> 0.1.0.pre.beta.31"
27
+ gem "stigg", "~> 0.1.0.pre.beta.32"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ module DataExport
8
+ # @see Stigg::Resources::V1::Events::DataExport::Destinations#update
9
+ class DestinationUpdateParams < Stigg::Internal::Type::BaseModel
10
+ extend Stigg::Internal::Type::RequestParameters::Converter
11
+ include Stigg::Internal::Type::RequestParameters
12
+
13
+ # @!attribute destination_id
14
+ #
15
+ # @return [String]
16
+ required :destination_id, String
17
+
18
+ # @!attribute enabled_models
19
+ #
20
+ # @return [Array<String>]
21
+ required :enabled_models, Stigg::Internal::Type::ArrayOf[String], api_name: :enabledModels
22
+
23
+ # @!attribute integration_id
24
+ # Target integration row hosting the destination
25
+ #
26
+ # @return [String]
27
+ required :integration_id, String, api_name: :integrationId
28
+
29
+ # @!attribute x_account_id
30
+ #
31
+ # @return [String, nil]
32
+ optional :x_account_id, String
33
+
34
+ # @!attribute x_environment_id
35
+ #
36
+ # @return [String, nil]
37
+ optional :x_environment_id, String
38
+
39
+ # @!method initialize(destination_id:, enabled_models:, integration_id:, x_account_id: nil, x_environment_id: nil, request_options: {})
40
+ # @param destination_id [String]
41
+ #
42
+ # @param enabled_models [Array<String>]
43
+ #
44
+ # @param integration_id [String] Target integration row hosting the destination
45
+ #
46
+ # @param x_account_id [String]
47
+ #
48
+ # @param x_environment_id [String]
49
+ #
50
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,148 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ module DataExport
8
+ # @see Stigg::Resources::V1::Events::DataExport::Destinations#update
9
+ class DestinationUpdateResponse < Stigg::Internal::Type::BaseModel
10
+ # @!attribute data
11
+ # Current destinations under the DATA_EXPORT integration.
12
+ #
13
+ # @return [Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data]
14
+ required :data, -> { Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data }
15
+
16
+ # @!method initialize(data:)
17
+ # Response object
18
+ #
19
+ # @param data [Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data] Current destinations under the DATA_EXPORT integration.
20
+
21
+ # @see Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse#data
22
+ class Data < Stigg::Internal::Type::BaseModel
23
+ # @!attribute destinations
24
+ # Current destinations under the DATA_EXPORT integration
25
+ #
26
+ # @return [Array<Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination>]
27
+ required :destinations,
28
+ -> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination] }
29
+
30
+ # @!method initialize(destinations:)
31
+ # Current destinations under the DATA_EXPORT integration.
32
+ #
33
+ # @param destinations [Array<Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination>] Current destinations under the DATA_EXPORT integration
34
+
35
+ class Destination < Stigg::Internal::Type::BaseModel
36
+ # @!attribute connected_at
37
+ # ISO8601 timestamp of when the destination was connected
38
+ #
39
+ # @return [String]
40
+ required :connected_at, String, api_name: :connectedAt
41
+
42
+ # @!attribute destination_id
43
+ # Provider destination ID
44
+ #
45
+ # @return [String]
46
+ required :destination_id, String, api_name: :destinationId
47
+
48
+ # @!attribute type
49
+ # Destination type (snowflake, bigquery, ...)
50
+ #
51
+ # @return [String]
52
+ required :type, String
53
+
54
+ # @!attribute connection_status
55
+ # Connection status of the destination (connected, failed)
56
+ #
57
+ # @return [String, nil]
58
+ optional :connection_status, String, api_name: :connectionStatus
59
+
60
+ # @!attribute enabled_models
61
+ #
62
+ # @return [Array<String>, nil]
63
+ optional :enabled_models, Stigg::Internal::Type::ArrayOf[String], api_name: :enabledModels
64
+
65
+ # @!attribute last_sync_status
66
+ # Latest sync snapshot for the destination, refreshed by the provider webhook
67
+ #
68
+ # @return [Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus, nil]
69
+ optional :last_sync_status,
70
+ -> { Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus },
71
+ api_name: :lastSyncStatus
72
+
73
+ # @!method initialize(connected_at:, destination_id:, type:, connection_status: nil, enabled_models: nil, last_sync_status: nil)
74
+ # A single destination entry under the DATA_EXPORT integration.
75
+ #
76
+ # @param connected_at [String] ISO8601 timestamp of when the destination was connected
77
+ #
78
+ # @param destination_id [String] Provider destination ID
79
+ #
80
+ # @param type [String] Destination type (snowflake, bigquery, ...)
81
+ #
82
+ # @param connection_status [String] Connection status of the destination (connected, failed)
83
+ #
84
+ # @param enabled_models [Array<String>]
85
+ #
86
+ # @param last_sync_status [Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus] Latest sync snapshot for the destination, refreshed by the provider webhook
87
+
88
+ # @see Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination#last_sync_status
89
+ class LastSyncStatus < Stigg::Internal::Type::BaseModel
90
+ # @!attribute finished_at
91
+ # ISO8601 timestamp of when the latest sync finished
92
+ #
93
+ # @return [String]
94
+ required :finished_at, String, api_name: :finishedAt
95
+
96
+ # @!attribute status
97
+ # Sync status (PENDING, RUNNING, INCOMPLETE, FAILED, SUCCEEDED, CANCELLED)
98
+ #
99
+ # @return [String]
100
+ required :status, String
101
+
102
+ # @!attribute transfer_id
103
+ # Provider transfer ID of the latest sync
104
+ #
105
+ # @return [String]
106
+ required :transfer_id, String, api_name: :transferId
107
+
108
+ # @!attribute blamed_party
109
+ # Party responsible for a failed sync, as reported by the data-export provider
110
+ #
111
+ # @return [String, nil]
112
+ optional :blamed_party, String, api_name: :blamedParty
113
+
114
+ # @!attribute failure_message
115
+ # Customer-friendly failure message, when the latest sync failed
116
+ #
117
+ # @return [String, nil]
118
+ optional :failure_message, String, api_name: :failureMessage
119
+
120
+ # @!attribute rows_transferred
121
+ # Number of rows transferred in the latest sync
122
+ #
123
+ # @return [Float, nil]
124
+ optional :rows_transferred, Float, api_name: :rowsTransferred
125
+
126
+ # @!method initialize(finished_at:, status:, transfer_id:, blamed_party: nil, failure_message: nil, rows_transferred: nil)
127
+ # Latest sync snapshot for the destination, refreshed by the provider webhook
128
+ #
129
+ # @param finished_at [String] ISO8601 timestamp of when the latest sync finished
130
+ #
131
+ # @param status [String] Sync status (PENDING, RUNNING, INCOMPLETE, FAILED, SUCCEEDED, CANCELLED)
132
+ #
133
+ # @param transfer_id [String] Provider transfer ID of the latest sync
134
+ #
135
+ # @param blamed_party [String] Party responsible for a failed sync, as reported by the data-export provider
136
+ #
137
+ # @param failure_message [String] Customer-friendly failure message, when the latest sync failed
138
+ #
139
+ # @param rows_transferred [Float] Number of rows transferred in the latest sync
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
145
+ end
146
+ end
147
+ end
148
+ end
@@ -44,6 +44,44 @@ module Stigg
44
44
  )
45
45
  end
46
46
 
47
+ # Some parameter documentations has been truncated, see
48
+ # {Stigg::Models::V1::Events::DataExport::DestinationUpdateParams} for more
49
+ # details.
50
+ #
51
+ # Update a destination's entity selection. Pushes the new enabled_models to the
52
+ # provider first, then persists the selection. Applies on the next scheduled
53
+ # transfer.
54
+ #
55
+ # @overload update(destination_id, enabled_models:, integration_id:, x_account_id: nil, x_environment_id: nil, request_options: {})
56
+ #
57
+ # @param destination_id [String] Path param: Provider destination ID to update
58
+ #
59
+ # @param enabled_models [Array<String>] Body param
60
+ #
61
+ # @param integration_id [String] Body param: Target integration row hosting the destination
62
+ #
63
+ # @param x_account_id [String] Header param: Account ID — optional when authenticating with a user JWT (Bearer
64
+ #
65
+ # @param x_environment_id [String] Header param: Environment ID — required when authenticating with a user JWT (Bea
66
+ #
67
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}, nil]
68
+ #
69
+ # @return [Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse]
70
+ #
71
+ # @see Stigg::Models::V1::Events::DataExport::DestinationUpdateParams
72
+ def update(destination_id, params)
73
+ parsed, options = Stigg::V1::Events::DataExport::DestinationUpdateParams.dump_request(params)
74
+ header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"}
75
+ @client.request(
76
+ method: :patch,
77
+ path: ["api/v1/data-export/destinations/%1$s", destination_id],
78
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
79
+ body: parsed.except(*header_params.keys),
80
+ model: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse,
81
+ options: options
82
+ )
83
+ end
84
+
47
85
  # Some parameter documentations has been truncated, see
48
86
  # {Stigg::Models::V1::Events::DataExport::DestinationDeleteParams} for more
49
87
  # details.
data/lib/stigg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stigg
4
- VERSION = "0.1.0.pre.beta.31"
4
+ VERSION = "0.1.0.pre.beta.32"
5
5
  end
data/lib/stigg.rb CHANGED
@@ -140,6 +140,8 @@ require_relative "stigg/models/v1/events/data_export/destination_create_params"
140
140
  require_relative "stigg/models/v1/events/data_export/destination_create_response"
141
141
  require_relative "stigg/models/v1/events/data_export/destination_delete_params"
142
142
  require_relative "stigg/models/v1/events/data_export/destination_delete_response"
143
+ require_relative "stigg/models/v1/events/data_export/destination_update_params"
144
+ require_relative "stigg/models/v1/events/data_export/destination_update_response"
143
145
  require_relative "stigg/models/v1/events/data_export_list_models_params"
144
146
  require_relative "stigg/models/v1/events/data_export_list_models_response"
145
147
  require_relative "stigg/models/v1/events/data_export_mint_scoped_token_params"
@@ -0,0 +1,82 @@
1
+ # typed: strong
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ module DataExport
8
+ class DestinationUpdateParams < Stigg::Internal::Type::BaseModel
9
+ extend Stigg::Internal::Type::RequestParameters::Converter
10
+ include Stigg::Internal::Type::RequestParameters
11
+
12
+ OrHash =
13
+ T.type_alias do
14
+ T.any(
15
+ Stigg::V1::Events::DataExport::DestinationUpdateParams,
16
+ Stigg::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :destination_id
22
+
23
+ sig { returns(T::Array[String]) }
24
+ attr_accessor :enabled_models
25
+
26
+ # Target integration row hosting the destination
27
+ sig { returns(String) }
28
+ attr_accessor :integration_id
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :x_account_id
32
+
33
+ sig { params(x_account_id: String).void }
34
+ attr_writer :x_account_id
35
+
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :x_environment_id
38
+
39
+ sig { params(x_environment_id: String).void }
40
+ attr_writer :x_environment_id
41
+
42
+ sig do
43
+ params(
44
+ destination_id: String,
45
+ enabled_models: T::Array[String],
46
+ integration_id: String,
47
+ x_account_id: String,
48
+ x_environment_id: String,
49
+ request_options: Stigg::RequestOptions::OrHash
50
+ ).returns(T.attached_class)
51
+ end
52
+ def self.new(
53
+ destination_id:,
54
+ enabled_models:,
55
+ # Target integration row hosting the destination
56
+ integration_id:,
57
+ x_account_id: nil,
58
+ x_environment_id: nil,
59
+ request_options: {}
60
+ )
61
+ end
62
+
63
+ sig do
64
+ override.returns(
65
+ {
66
+ destination_id: String,
67
+ enabled_models: T::Array[String],
68
+ integration_id: String,
69
+ x_account_id: String,
70
+ x_environment_id: String,
71
+ request_options: Stigg::RequestOptions
72
+ }
73
+ )
74
+ end
75
+ def to_hash
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,290 @@
1
+ # typed: strong
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ module Events
7
+ module DataExport
8
+ class DestinationUpdateResponse < Stigg::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse,
13
+ Stigg::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Current destinations under the DATA_EXPORT integration.
18
+ sig do
19
+ returns(
20
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
21
+ )
22
+ end
23
+ attr_reader :data
24
+
25
+ sig do
26
+ params(
27
+ data:
28
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::OrHash
29
+ ).void
30
+ end
31
+ attr_writer :data
32
+
33
+ # Response object
34
+ sig do
35
+ params(
36
+ data:
37
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::OrHash
38
+ ).returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+ # Current destinations under the DATA_EXPORT integration.
42
+ data:
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ data:
50
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+
57
+ class Data < Stigg::Internal::Type::BaseModel
58
+ OrHash =
59
+ T.type_alias do
60
+ T.any(
61
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data,
62
+ Stigg::Internal::AnyHash
63
+ )
64
+ end
65
+
66
+ # Current destinations under the DATA_EXPORT integration
67
+ sig do
68
+ returns(
69
+ T::Array[
70
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination
71
+ ]
72
+ )
73
+ end
74
+ attr_accessor :destinations
75
+
76
+ # Current destinations under the DATA_EXPORT integration.
77
+ sig do
78
+ params(
79
+ destinations:
80
+ T::Array[
81
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::OrHash
82
+ ]
83
+ ).returns(T.attached_class)
84
+ end
85
+ def self.new(
86
+ # Current destinations under the DATA_EXPORT integration
87
+ destinations:
88
+ )
89
+ end
90
+
91
+ sig do
92
+ override.returns(
93
+ {
94
+ destinations:
95
+ T::Array[
96
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination
97
+ ]
98
+ }
99
+ )
100
+ end
101
+ def to_hash
102
+ end
103
+
104
+ class Destination < Stigg::Internal::Type::BaseModel
105
+ OrHash =
106
+ T.type_alias do
107
+ T.any(
108
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination,
109
+ Stigg::Internal::AnyHash
110
+ )
111
+ end
112
+
113
+ # ISO8601 timestamp of when the destination was connected
114
+ sig { returns(String) }
115
+ attr_accessor :connected_at
116
+
117
+ # Provider destination ID
118
+ sig { returns(String) }
119
+ attr_accessor :destination_id
120
+
121
+ # Destination type (snowflake, bigquery, ...)
122
+ sig { returns(String) }
123
+ attr_accessor :type
124
+
125
+ # Connection status of the destination (connected, failed)
126
+ sig { returns(T.nilable(String)) }
127
+ attr_reader :connection_status
128
+
129
+ sig { params(connection_status: String).void }
130
+ attr_writer :connection_status
131
+
132
+ sig { returns(T.nilable(T::Array[String])) }
133
+ attr_reader :enabled_models
134
+
135
+ sig { params(enabled_models: T::Array[String]).void }
136
+ attr_writer :enabled_models
137
+
138
+ # Latest sync snapshot for the destination, refreshed by the provider webhook
139
+ sig do
140
+ returns(
141
+ T.nilable(
142
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
143
+ )
144
+ )
145
+ end
146
+ attr_reader :last_sync_status
147
+
148
+ sig do
149
+ params(
150
+ last_sync_status:
151
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus::OrHash
152
+ ).void
153
+ end
154
+ attr_writer :last_sync_status
155
+
156
+ # A single destination entry under the DATA_EXPORT integration.
157
+ sig do
158
+ params(
159
+ connected_at: String,
160
+ destination_id: String,
161
+ type: String,
162
+ connection_status: String,
163
+ enabled_models: T::Array[String],
164
+ last_sync_status:
165
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus::OrHash
166
+ ).returns(T.attached_class)
167
+ end
168
+ def self.new(
169
+ # ISO8601 timestamp of when the destination was connected
170
+ connected_at:,
171
+ # Provider destination ID
172
+ destination_id:,
173
+ # Destination type (snowflake, bigquery, ...)
174
+ type:,
175
+ # Connection status of the destination (connected, failed)
176
+ connection_status: nil,
177
+ enabled_models: nil,
178
+ # Latest sync snapshot for the destination, refreshed by the provider webhook
179
+ last_sync_status: nil
180
+ )
181
+ end
182
+
183
+ sig do
184
+ override.returns(
185
+ {
186
+ connected_at: String,
187
+ destination_id: String,
188
+ type: String,
189
+ connection_status: String,
190
+ enabled_models: T::Array[String],
191
+ last_sync_status:
192
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
193
+ }
194
+ )
195
+ end
196
+ def to_hash
197
+ end
198
+
199
+ class LastSyncStatus < Stigg::Internal::Type::BaseModel
200
+ OrHash =
201
+ T.type_alias do
202
+ T.any(
203
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus,
204
+ Stigg::Internal::AnyHash
205
+ )
206
+ end
207
+
208
+ # ISO8601 timestamp of when the latest sync finished
209
+ sig { returns(String) }
210
+ attr_accessor :finished_at
211
+
212
+ # Sync status (PENDING, RUNNING, INCOMPLETE, FAILED, SUCCEEDED, CANCELLED)
213
+ sig { returns(String) }
214
+ attr_accessor :status
215
+
216
+ # Provider transfer ID of the latest sync
217
+ sig { returns(String) }
218
+ attr_accessor :transfer_id
219
+
220
+ # Party responsible for a failed sync, as reported by the data-export provider
221
+ sig { returns(T.nilable(String)) }
222
+ attr_reader :blamed_party
223
+
224
+ sig { params(blamed_party: String).void }
225
+ attr_writer :blamed_party
226
+
227
+ # Customer-friendly failure message, when the latest sync failed
228
+ sig { returns(T.nilable(String)) }
229
+ attr_reader :failure_message
230
+
231
+ sig { params(failure_message: String).void }
232
+ attr_writer :failure_message
233
+
234
+ # Number of rows transferred in the latest sync
235
+ sig { returns(T.nilable(Float)) }
236
+ attr_reader :rows_transferred
237
+
238
+ sig { params(rows_transferred: Float).void }
239
+ attr_writer :rows_transferred
240
+
241
+ # Latest sync snapshot for the destination, refreshed by the provider webhook
242
+ sig do
243
+ params(
244
+ finished_at: String,
245
+ status: String,
246
+ transfer_id: String,
247
+ blamed_party: String,
248
+ failure_message: String,
249
+ rows_transferred: Float
250
+ ).returns(T.attached_class)
251
+ end
252
+ def self.new(
253
+ # ISO8601 timestamp of when the latest sync finished
254
+ finished_at:,
255
+ # Sync status (PENDING, RUNNING, INCOMPLETE, FAILED, SUCCEEDED, CANCELLED)
256
+ status:,
257
+ # Provider transfer ID of the latest sync
258
+ transfer_id:,
259
+ # Party responsible for a failed sync, as reported by the data-export provider
260
+ blamed_party: nil,
261
+ # Customer-friendly failure message, when the latest sync failed
262
+ failure_message: nil,
263
+ # Number of rows transferred in the latest sync
264
+ rows_transferred: nil
265
+ )
266
+ end
267
+
268
+ sig do
269
+ override.returns(
270
+ {
271
+ finished_at: String,
272
+ status: String,
273
+ transfer_id: String,
274
+ blamed_party: String,
275
+ failure_message: String,
276
+ rows_transferred: Float
277
+ }
278
+ )
279
+ end
280
+ def to_hash
281
+ end
282
+ end
283
+ end
284
+ end
285
+ end
286
+ end
287
+ end
288
+ end
289
+ end
290
+ end
@@ -39,6 +39,39 @@ module Stigg
39
39
  )
40
40
  end
41
41
 
42
+ # Update a destination's entity selection. Pushes the new enabled_models to the
43
+ # provider first, then persists the selection. Applies on the next scheduled
44
+ # transfer.
45
+ sig do
46
+ params(
47
+ destination_id: String,
48
+ enabled_models: T::Array[String],
49
+ integration_id: String,
50
+ x_account_id: String,
51
+ x_environment_id: String,
52
+ request_options: Stigg::RequestOptions::OrHash
53
+ ).returns(
54
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse
55
+ )
56
+ end
57
+ def update(
58
+ # Path param: Provider destination ID to update
59
+ destination_id,
60
+ # Body param
61
+ enabled_models:,
62
+ # Body param: Target integration row hosting the destination
63
+ integration_id:,
64
+ # Header param: Account ID — optional when authenticating with a user JWT (Bearer
65
+ # token); falls back to the user's first membership. Ignored for API-key auth.
66
+ x_account_id: nil,
67
+ # Header param: Environment ID — required when authenticating with a user JWT
68
+ # (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
69
+ # intrinsic to the key).
70
+ x_environment_id: nil,
71
+ request_options: {}
72
+ )
73
+ end
74
+
42
75
  # Remove a destination from the DATA_EXPORT integration metadata. Idempotent.
43
76
  sig do
44
77
  params(
@@ -0,0 +1,56 @@
1
+ module Stigg
2
+ module Models
3
+ module V1
4
+ module Events
5
+ module DataExport
6
+ type destination_update_params =
7
+ {
8
+ destination_id: String,
9
+ enabled_models: ::Array[String],
10
+ integration_id: String,
11
+ x_account_id: String,
12
+ x_environment_id: String
13
+ }
14
+ & Stigg::Internal::Type::request_parameters
15
+
16
+ class DestinationUpdateParams < Stigg::Internal::Type::BaseModel
17
+ extend Stigg::Internal::Type::RequestParameters::Converter
18
+ include Stigg::Internal::Type::RequestParameters
19
+
20
+ attr_accessor destination_id: String
21
+
22
+ attr_accessor enabled_models: ::Array[String]
23
+
24
+ attr_accessor integration_id: String
25
+
26
+ attr_reader x_account_id: String?
27
+
28
+ def x_account_id=: (String) -> String
29
+
30
+ attr_reader x_environment_id: String?
31
+
32
+ def x_environment_id=: (String) -> String
33
+
34
+ def initialize: (
35
+ destination_id: String,
36
+ enabled_models: ::Array[String],
37
+ integration_id: String,
38
+ ?x_account_id: String,
39
+ ?x_environment_id: String,
40
+ ?request_options: Stigg::request_opts
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ destination_id: String,
45
+ enabled_models: ::Array[String],
46
+ integration_id: String,
47
+ x_account_id: String,
48
+ x_environment_id: String,
49
+ request_options: Stigg::RequestOptions
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,141 @@
1
+ module Stigg
2
+ module Models
3
+ module V1
4
+ module Events
5
+ module DataExport
6
+ type destination_update_response =
7
+ {
8
+ data: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
9
+ }
10
+
11
+ class DestinationUpdateResponse < Stigg::Internal::Type::BaseModel
12
+ attr_accessor data: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
13
+
14
+ def initialize: (
15
+ data: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ data: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data
20
+ }
21
+
22
+ type data =
23
+ {
24
+ destinations: ::Array[Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination]
25
+ }
26
+
27
+ class Data < Stigg::Internal::Type::BaseModel
28
+ attr_accessor destinations: ::Array[Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination]
29
+
30
+ def initialize: (
31
+ destinations: ::Array[Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination]
32
+ ) -> void
33
+
34
+ def to_hash: -> {
35
+ destinations: ::Array[Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination]
36
+ }
37
+
38
+ type destination =
39
+ {
40
+ connected_at: String,
41
+ destination_id: String,
42
+ type: String,
43
+ connection_status: String,
44
+ enabled_models: ::Array[String],
45
+ last_sync_status: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
46
+ }
47
+
48
+ class Destination < Stigg::Internal::Type::BaseModel
49
+ attr_accessor connected_at: String
50
+
51
+ attr_accessor destination_id: String
52
+
53
+ attr_accessor type: String
54
+
55
+ attr_reader connection_status: String?
56
+
57
+ def connection_status=: (String) -> String
58
+
59
+ attr_reader enabled_models: ::Array[String]?
60
+
61
+ def enabled_models=: (::Array[String]) -> ::Array[String]
62
+
63
+ attr_reader last_sync_status: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus?
64
+
65
+ def last_sync_status=: (
66
+ Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
67
+ ) -> Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
68
+
69
+ def initialize: (
70
+ connected_at: String,
71
+ destination_id: String,
72
+ type: String,
73
+ ?connection_status: String,
74
+ ?enabled_models: ::Array[String],
75
+ ?last_sync_status: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
76
+ ) -> void
77
+
78
+ def to_hash: -> {
79
+ connected_at: String,
80
+ destination_id: String,
81
+ type: String,
82
+ connection_status: String,
83
+ enabled_models: ::Array[String],
84
+ last_sync_status: Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse::Data::Destination::LastSyncStatus
85
+ }
86
+
87
+ type last_sync_status =
88
+ {
89
+ finished_at: String,
90
+ status: String,
91
+ transfer_id: String,
92
+ blamed_party: String,
93
+ failure_message: String,
94
+ rows_transferred: Float
95
+ }
96
+
97
+ class LastSyncStatus < Stigg::Internal::Type::BaseModel
98
+ attr_accessor finished_at: String
99
+
100
+ attr_accessor status: String
101
+
102
+ attr_accessor transfer_id: String
103
+
104
+ attr_reader blamed_party: String?
105
+
106
+ def blamed_party=: (String) -> String
107
+
108
+ attr_reader failure_message: String?
109
+
110
+ def failure_message=: (String) -> String
111
+
112
+ attr_reader rows_transferred: Float?
113
+
114
+ def rows_transferred=: (Float) -> Float
115
+
116
+ def initialize: (
117
+ finished_at: String,
118
+ status: String,
119
+ transfer_id: String,
120
+ ?blamed_party: String,
121
+ ?failure_message: String,
122
+ ?rows_transferred: Float
123
+ ) -> void
124
+
125
+ def to_hash: -> {
126
+ finished_at: String,
127
+ status: String,
128
+ transfer_id: String,
129
+ blamed_party: String,
130
+ failure_message: String,
131
+ rows_transferred: Float
132
+ }
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
@@ -13,6 +13,15 @@ module Stigg
13
13
  ?request_options: Stigg::request_opts
14
14
  ) -> Stigg::Models::V1::Events::DataExport::DestinationCreateResponse
15
15
 
16
+ def update: (
17
+ String destination_id,
18
+ enabled_models: ::Array[String],
19
+ integration_id: String,
20
+ ?x_account_id: String,
21
+ ?x_environment_id: String,
22
+ ?request_options: Stigg::request_opts
23
+ ) -> Stigg::Models::V1::Events::DataExport::DestinationUpdateResponse
24
+
16
25
  def delete: (
17
26
  String destination_id,
18
27
  ?x_account_id: String,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stigg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.beta.31
4
+ version: 0.1.0.pre.beta.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stigg
@@ -157,6 +157,8 @@ files:
157
157
  - lib/stigg/models/v1/events/data_export/destination_create_response.rb
158
158
  - lib/stigg/models/v1/events/data_export/destination_delete_params.rb
159
159
  - lib/stigg/models/v1/events/data_export/destination_delete_response.rb
160
+ - lib/stigg/models/v1/events/data_export/destination_update_params.rb
161
+ - lib/stigg/models/v1/events/data_export/destination_update_response.rb
160
162
  - lib/stigg/models/v1/events/data_export_list_models_params.rb
161
163
  - lib/stigg/models/v1/events/data_export_list_models_response.rb
162
164
  - lib/stigg/models/v1/events/data_export_mint_scoped_token_params.rb
@@ -391,6 +393,8 @@ files:
391
393
  - rbi/stigg/models/v1/events/data_export/destination_create_response.rbi
392
394
  - rbi/stigg/models/v1/events/data_export/destination_delete_params.rbi
393
395
  - rbi/stigg/models/v1/events/data_export/destination_delete_response.rbi
396
+ - rbi/stigg/models/v1/events/data_export/destination_update_params.rbi
397
+ - rbi/stigg/models/v1/events/data_export/destination_update_response.rbi
394
398
  - rbi/stigg/models/v1/events/data_export_list_models_params.rbi
395
399
  - rbi/stigg/models/v1/events/data_export_list_models_response.rbi
396
400
  - rbi/stigg/models/v1/events/data_export_mint_scoped_token_params.rbi
@@ -624,6 +628,8 @@ files:
624
628
  - sig/stigg/models/v1/events/data_export/destination_create_response.rbs
625
629
  - sig/stigg/models/v1/events/data_export/destination_delete_params.rbs
626
630
  - sig/stigg/models/v1/events/data_export/destination_delete_response.rbs
631
+ - sig/stigg/models/v1/events/data_export/destination_update_params.rbs
632
+ - sig/stigg/models/v1/events/data_export/destination_update_response.rbs
627
633
  - sig/stigg/models/v1/events/data_export_list_models_params.rbs
628
634
  - sig/stigg/models/v1/events/data_export_list_models_response.rbs
629
635
  - sig/stigg/models/v1/events/data_export_mint_scoped_token_params.rbs