riveter-sdk 1.1.0 → 1.2.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: c11eb2e15de73602df663800326a931a9300daf4ccc615a761e761e1ed776a71
4
- data.tar.gz: '092c593d7aac42080efd1ea487822e36eae8218f2095f3cbb706950048fb011b'
3
+ metadata.gz: 5287a59260bd3fbf2f4069af7bcc49ec2c8cb9015d55e36db170c50c62ca5fa9
4
+ data.tar.gz: 50ecfae1ff05b163f8479d9c63aabad0a18e31f001fd2a7fb4656901dc471f00
5
5
  SHA512:
6
- metadata.gz: 60c2971793274fdaa1ed1ed545ac3c0ce389ece4f408eee7e79131b3d0d4f59d2988460a1f90e432cb7d48ad4bb440b909b40fec7f5873ce4d75c445d7dd8184
7
- data.tar.gz: 586e72eb77cdf4fd1818cfa75285a02bf9df60ef8331f4fd0542baf1a636be79e92fbca855957cc9741e3b01148417ed6dcb15333a5e0940e4099870eb7ad4ae
6
+ metadata.gz: 2bd4722b2d5c49a06390a520ca1b7f0319923390debe5a3301496cd58f6257de10aff9e28254175a52c9745b9a9038915a27bc6acaa354137641fc3b61b3c414
7
+ data.tar.gz: ad7644661ae6d842485962aa4db8006936f26db528243ebebcdc721440f2cf879c4a05734a78924b3cf4b75d335e70ab2a36409f32a65c4d64b5af73426c81f3
@@ -43,7 +43,7 @@ module Riveter
43
43
  end
44
44
 
45
45
  # Builds an APIError from either the clean { "error" => {...} } envelope
46
- # or the legacy { "request_status" => "error" } shape (401s).
46
+ # or the { "request_status" => "error" } shape (401s).
47
47
  def self.from_response(status, body)
48
48
  if body.is_a?(Hash)
49
49
  error = body["error"]
@@ -57,14 +57,13 @@ module Riveter
57
57
  # Endpoint-specific kickoff extras (dataset_id, credits_charged, ...) are
58
58
  # plain fields; #output is nil until the run finishes. An `estimate_cost: true`
59
59
  # kickoff returns this shape with #estimate_cost set, no #id, and the priced
60
- # #credit_detail. #legacy ({"notice", "successor", "docs"}) is set when the
61
- # kickoff took a legacy mode.
60
+ # #credit_detail.
62
61
  class Run < Model
63
62
  field :id, :type, :status, :credits_used, :estimate_cost, :app_url, :result_url,
64
63
  :started_at, :finished_at, :error, :stopped_reason, :enrichment_id, :enrichment_name,
65
64
  :dataset_id, :extraction_id, :monitor_id, :webhook_url, :output,
66
65
  :max_items, :configured_dataset_id, :credits_charged, :variables,
67
- :validation_warning, :tier, :legacy
66
+ :validation_warning, :tier
68
67
  model_field :progress, RunProgress
69
68
  model_field :credit_detail, CreditDetail
70
69
 
@@ -87,21 +86,18 @@ module Riveter
87
86
  field :counts
88
87
  end
89
88
 
90
- # Compact list-endpoint shape. Column configuration is on Enrichments#get. #status,
91
- # #app_url, and #dataset_id (the dataset copy to fill instead) are set on legacy
92
- # enrichments only.
89
+ # Compact list-endpoint shape. Column configuration is on Enrichments#get.
93
90
  class EnrichmentSummary < Model
94
- field :id, :name, :status, :app_url, :dataset_id, :column_count, :input_columns,
91
+ field :id, :name, :column_count, :input_columns,
95
92
  :output_columns, :column_names_truncated, :created_at, :updated_at
96
93
  end
97
94
 
98
95
  # An enrichment: #prompt, #input_columns, #output as an array of column hashes ("name" /
99
96
  # "prompt" / "output_schema" / "tool"), #tools, the budget fields, and #version.
100
- # #dataset_id / #app_url are set on Enrichments#create. A legacy enrichment's id answers
101
- # its older shape (the legacy API docs, kept in #raw) with #legacy set.
97
+ # #dataset_id / #app_url are set on Enrichments#create.
102
98
  class Enrichment < Model
103
99
  field :id, :name, :prompt, :input_columns, :output, :tools, :budget_credits_per_row,
104
- :budget_locked, :version, :created_at, :updated_at, :app_url, :dataset_id, :legacy
100
+ :budget_locked, :version, :created_at, :updated_at, :app_url, :dataset_id
105
101
  end
106
102
 
107
103
  # One cell. #state is pending / running / ok / not_found / failed / manual / stale;
@@ -237,19 +233,17 @@ module Riveter
237
233
  end
238
234
 
239
235
  # A monitor fills #dataset_id's #columns (every output column when nil) again on a
240
- # schedule. #enrichment_name and #has_input belong to a monitor on a legacy enrichment;
241
- # #legacy is true on such a list item and the notice hash on Monitors#get / #update. An
242
- # `estimate_cost: true` create returns this shape with #estimate_cost set, no #id, and
243
- # the priced #credit_detail for one tick.
236
+ # schedule. An `estimate_cost: true` create returns this shape with #estimate_cost set,
237
+ # no #id, and the priced #credit_detail for one tick.
244
238
  class Monitor < Model
245
239
  field :id, :name, :enabled, :cadence, :minute, :hour, :day_of_week,
246
240
  :day_of_month, :timezone, :webhook_url, :alert_rule, :output_format,
247
241
  :next_run_at, :schedule_summary, :dataset_id, :dataset_name, :columns,
248
- :enrichment_id, :enrichment_name, :created_at, :has_input, :legacy, :estimate_cost
242
+ :enrichment_id, :created_at, :estimate_cost
249
243
  model_field :credit_detail, CreditDetail
250
244
  end
251
245
 
252
- # Synchronous scrape result (legacy request_status format, per the spec).
246
+ # Synchronous scrape result (request_status format, per the spec).
253
247
  class ScrapeResult < Model
254
248
  field :request_status, :text, :url, :base_url_for_links, :status_code,
255
249
  :possibly_blocked, :credit_used, :riveter_app_link, :estimate_cost
@@ -269,7 +263,7 @@ module Riveter
269
263
  field :name, :last_used_at, :created_by
270
264
  end
271
265
 
272
- # Account info (legacy request_status format, per the spec).
266
+ # Account info (request_status format, per the spec).
273
267
  class AccountInfo < Model
274
268
  field :request_status, :message
275
269
  model_field :account, Account
@@ -58,8 +58,8 @@ module Riveter
58
58
  @client = client
59
59
  end
60
60
 
61
- # Paginated compact list of enrichments: names, status, column names and
62
- # counts. Params: status:, name:, page:, per_page:. (operationId: listEnrichments)
61
+ # Paginated compact list of enrichments: names, column names and counts.
62
+ # Params: name:, page:, per_page:. (operationId: listEnrichments)
63
63
  def list(**params)
64
64
  fetch_page = ->(page) { @client.request(:get, "/enrichments", query: params.merge(page: page)) }
65
65
  EnrichmentsPage.new(fetch_page.call(params[:page] || 1), fetch_page)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Riveter
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riveter-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riveter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-11-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Client for the Riveter API — enrich data, build datasets, scrape pages,
14
14
  and run web searches. https://docs.riveterhq.com