weft-sdk 0.6.1 → 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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AccountDetails.md +8 -12
  3. data/docs/EnrolledResource.md +44 -0
  4. data/docs/Fetch403Response.md +49 -0
  5. data/docs/FetchBalanceSnapshot.md +5 -1
  6. data/docs/FetchResponse.md +1 -1
  7. data/docs/InsufficientScopeResponse.md +22 -0
  8. data/docs/MeApiKey.md +26 -0
  9. data/docs/MeApiKeyCreator.md +22 -0
  10. data/docs/ResourceEnrollmentRequest.md +24 -0
  11. data/docs/ResourceEnrollmentResponse.md +18 -0
  12. data/docs/ResourceStats.md +30 -0
  13. data/docs/ResourcesApi.md +72 -0
  14. data/docs/SearchFilters.md +1 -1
  15. data/docs/SearchResponse.md +1 -1
  16. data/docs/SearchResponseResultsInner.md +36 -0
  17. data/docs/Wallet.md +5 -1
  18. data/lib/weft/generated/api/account_api.rb +1 -1
  19. data/lib/weft/generated/api/api_keys_api.rb +1 -1
  20. data/lib/weft/generated/api/auth_api.rb +1 -1
  21. data/lib/weft/generated/api/balance_api.rb +1 -1
  22. data/lib/weft/generated/api/default_api.rb +1 -1
  23. data/lib/weft/generated/api/fetch_api.rb +1 -1
  24. data/lib/weft/generated/api/payments_api.rb +1 -1
  25. data/lib/weft/generated/api/resources_api.rb +90 -0
  26. data/lib/weft/generated/api/search_api.rb +1 -1
  27. data/lib/weft/generated/api_client.rb +1 -1
  28. data/lib/weft/generated/api_error.rb +1 -1
  29. data/lib/weft/generated/api_model_base.rb +1 -1
  30. data/lib/weft/generated/configuration.rb +1 -1
  31. data/lib/weft/generated/models/account_details.rb +65 -106
  32. data/lib/weft/generated/models/api_key.rb +1 -1
  33. data/lib/weft/generated/models/api_key_created.rb +1 -1
  34. data/lib/weft/generated/models/api_key_created_response.rb +1 -1
  35. data/lib/weft/generated/models/api_key_list_response.rb +1 -1
  36. data/lib/weft/generated/models/auth_response.rb +1 -1
  37. data/lib/weft/generated/models/auth_response_data.rb +1 -1
  38. data/lib/weft/generated/models/balance_response.rb +1 -1
  39. data/lib/weft/generated/models/confirm_request.rb +1 -1
  40. data/lib/weft/generated/models/create_api_key_request.rb +1 -1
  41. data/lib/weft/generated/models/enrolled_resource.rb +474 -0
  42. data/lib/weft/generated/models/error.rb +1 -1
  43. data/lib/weft/generated/models/error_response.rb +1 -1
  44. data/lib/weft/generated/models/fetch403_response.rb +104 -0
  45. data/lib/weft/generated/models/fetch_balance_snapshot.rb +58 -3
  46. data/lib/weft/generated/models/fetch_error_response.rb +4 -4
  47. data/lib/weft/generated/models/fetch_request.rb +1 -1
  48. data/lib/weft/generated/models/fetch_request_body.rb +1 -1
  49. data/lib/weft/generated/models/fetch_response.rb +3 -3
  50. data/lib/weft/generated/models/insufficient_scope_response.rb +242 -0
  51. data/lib/weft/generated/models/me_api_key.rb +217 -0
  52. data/lib/weft/generated/models/me_api_key_creator.rb +200 -0
  53. data/lib/weft/generated/models/me_response.rb +1 -1
  54. data/lib/weft/generated/models/merchant.rb +1 -1
  55. data/lib/weft/generated/models/message_response.rb +1 -1
  56. data/lib/weft/generated/models/message_response_data.rb +1 -1
  57. data/lib/weft/generated/models/pagination.rb +1 -1
  58. data/lib/weft/generated/models/password_reset_request.rb +1 -1
  59. data/lib/weft/generated/models/password_update_request.rb +1 -1
  60. data/lib/weft/generated/models/payment.rb +1 -1
  61. data/lib/weft/generated/models/payment_list_response.rb +1 -1
  62. data/lib/weft/generated/models/payment_response.rb +1 -1
  63. data/lib/weft/generated/models/promo_balance.rb +1 -1
  64. data/lib/weft/generated/models/resend_confirmation_request.rb +1 -1
  65. data/lib/weft/generated/models/resource_enrollment_request.rb +212 -0
  66. data/lib/weft/generated/models/resource_enrollment_response.rb +164 -0
  67. data/lib/weft/generated/models/resource_stats.rb +323 -0
  68. data/lib/weft/generated/models/search_agent_card.rb +1 -1
  69. data/lib/weft/generated/models/search_endpoints.rb +1 -1
  70. data/lib/weft/generated/models/search_error_response.rb +1 -1
  71. data/lib/weft/generated/models/search_filters.rb +4 -4
  72. data/lib/weft/generated/models/search_pricing.rb +1 -1
  73. data/lib/weft/generated/models/search_ranking.rb +1 -1
  74. data/lib/weft/generated/models/search_request.rb +1 -1
  75. data/lib/weft/generated/models/search_response.rb +3 -3
  76. data/lib/weft/generated/models/search_response_results_inner.rb +103 -0
  77. data/lib/weft/generated/models/search_result.rb +3 -3
  78. data/lib/weft/generated/models/search_skill.rb +1 -1
  79. data/lib/weft/generated/models/search_skill_endpoint.rb +1 -1
  80. data/lib/weft/generated/models/sign_in_request.rb +1 -1
  81. data/lib/weft/generated/models/sign_up_request.rb +1 -1
  82. data/lib/weft/generated/models/spending_policy.rb +1 -1
  83. data/lib/weft/generated/models/user.rb +1 -1
  84. data/lib/weft/generated/models/wallet.rb +57 -3
  85. data/lib/weft/generated/version.rb +2 -2
  86. data/lib/weft/sdk.rb +1 -1
  87. metadata +22 -2
@@ -0,0 +1,103 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
+
6
+ The version of the OpenAPI document: 0.7.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ module SearchResponseResultsInner
18
+ class << self
19
+ # List of class defined in anyOf (OpenAPI v3)
20
+ def openapi_any_of
21
+ [
22
+ :'Hash<String, Object>',
23
+ :'SearchResult'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of anyOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of anyOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
34
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
35
+ # - TODO: scalar values are de facto behaving as if they were nullable.
36
+ # - TODO: logging when debugging is set.
37
+ openapi_any_of.each do |klass|
38
+ begin
39
+ next if klass == :AnyType # "nullable: true"
40
+ return find_and_cast_into_type(klass, data)
41
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
42
+ end
43
+ end
44
+
45
+ openapi_any_of.include?(:AnyType) ? data : nil
46
+ end
47
+
48
+ private
49
+
50
+ SchemaMismatchError = Class.new(StandardError)
51
+
52
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
53
+ def find_and_cast_into_type(klass, data)
54
+ return if data.nil?
55
+
56
+ case klass.to_s
57
+ when 'Boolean'
58
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
59
+ when 'Float'
60
+ return data if data.instance_of?(Float)
61
+ when 'Integer'
62
+ return data if data.instance_of?(Integer)
63
+ when 'Time'
64
+ return Time.parse(data)
65
+ when 'Date'
66
+ return Date.iso8601(data)
67
+ when 'String'
68
+ return data if data.instance_of?(String)
69
+ when 'Object' # "type: object"
70
+ return data if data.instance_of?(Hash)
71
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
72
+ if data.instance_of?(Array)
73
+ sub_type = Regexp.last_match[:sub_type]
74
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
75
+ end
76
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
77
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
78
+ sub_type = Regexp.last_match[:sub_type]
79
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
80
+ end
81
+ else # model
82
+ const = Weft.const_get(klass)
83
+ if const
84
+ if const.respond_to?(:openapi_any_of) # nested anyOf model
85
+ model = const.build(data)
86
+ return model if model
87
+ else
88
+ # raise if data contains keys that are not known to the model
89
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
90
+ model = const.build_from_hash(data)
91
+ return model if model
92
+ end
93
+ end
94
+ end
95
+
96
+ raise # if no match by now, raise
97
+ rescue
98
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
99
+ end
100
+ end
101
+ end
102
+
103
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -243,7 +243,7 @@ module Weft
243
243
  return false if @score > 1
244
244
  return false if @score < 0
245
245
  return false if @protocol.nil?
246
- protocol_validator = EnumAttributeValidator.new('String', ["a2a", "mcp", "openapi"])
246
+ protocol_validator = EnumAttributeValidator.new('String', ["a2a", "mcp", "openapi", "AgentNet"])
247
247
  return false unless protocol_validator.valid?(@protocol)
248
248
  return false if @domain.nil?
249
249
  return false if @agent_card.nil?
@@ -284,7 +284,7 @@ module Weft
284
284
  # Custom attribute writer method checking allowed values (enum).
285
285
  # @param [Object] protocol Object to be assigned
286
286
  def protocol=(protocol)
287
- validator = EnumAttributeValidator.new('String', ["a2a", "mcp", "openapi"])
287
+ validator = EnumAttributeValidator.new('String', ["a2a", "mcp", "openapi", "AgentNet"])
288
288
  unless validator.valid?(protocol)
289
289
  fail ArgumentError, "invalid value for \"protocol\", must be one of #{validator.allowable_values}."
290
290
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -18,9 +18,15 @@ module Weft
18
18
  # EVM address of the buyer's Privy-managed wallet. Null if no wallet provisioned.
19
19
  attr_accessor :address
20
20
 
21
- # Live USDC balance, 2dp. Returns \"0.00\" if the upstream wallet provider is unreachable.
21
+ # Live Base USDC balance, 2dp. Returns \"0.00\" if the upstream wallet provider is unreachable.
22
22
  attr_accessor :balance_usdc
23
23
 
24
+ # Aggregated USD value of the allowlisted Tempo TIP-20 dollar tokens on the wallet's paired Tempo chain, 2dp. `null` when the value is UNKNOWN — the Tempo RPC read failed, or no dollar token is allowlisted for that chain yet (e.g. Tempo mainnet pre-launch). A null here is never \"0.00\"; it means \"we couldn't determine it\", and `total_usd` then reflects the Base component only.
25
+ attr_accessor :tempo_usd
26
+
27
+ # Single aggregated USD balance = Base USDC + Tempo dollar tokens, 2dp. When `tempo_usd` is null (unavailable/unallowlisted) this equals `balance_usdc` alone. Null when the Base USDC provider is unreachable, because the surface never claims zero for a component it could not read.
28
+ attr_accessor :total_usd
29
+
24
30
  # Wallet network (e.g. `base-sepolia`).
25
31
  attr_accessor :network
26
32
 
@@ -29,6 +35,8 @@ module Weft
29
35
  {
30
36
  :'address' => :'address',
31
37
  :'balance_usdc' => :'balance_usdc',
38
+ :'tempo_usd' => :'tempo_usd',
39
+ :'total_usd' => :'total_usd',
32
40
  :'network' => :'network'
33
41
  }
34
42
  end
@@ -48,6 +56,8 @@ module Weft
48
56
  {
49
57
  :'address' => :'String',
50
58
  :'balance_usdc' => :'String',
59
+ :'tempo_usd' => :'String',
60
+ :'total_usd' => :'String',
51
61
  :'network' => :'String'
52
62
  }
53
63
  end
@@ -86,6 +96,18 @@ module Weft
86
96
  self.balance_usdc = nil
87
97
  end
88
98
 
99
+ if attributes.key?(:'tempo_usd')
100
+ self.tempo_usd = attributes[:'tempo_usd']
101
+ else
102
+ self.tempo_usd = nil
103
+ end
104
+
105
+ if attributes.key?(:'total_usd')
106
+ self.total_usd = attributes[:'total_usd']
107
+ else
108
+ self.total_usd = nil
109
+ end
110
+
89
111
  if attributes.key?(:'network')
90
112
  self.network = attributes[:'network']
91
113
  else
@@ -106,6 +128,14 @@ module Weft
106
128
  invalid_properties.push('invalid value for "balance_usdc", balance_usdc cannot be nil.')
107
129
  end
108
130
 
131
+ if @tempo_usd.nil?
132
+ invalid_properties.push('invalid value for "tempo_usd", tempo_usd cannot be nil.')
133
+ end
134
+
135
+ if @total_usd.nil?
136
+ invalid_properties.push('invalid value for "total_usd", total_usd cannot be nil.')
137
+ end
138
+
109
139
  if @network.nil?
110
140
  invalid_properties.push('invalid value for "network", network cannot be nil.')
111
141
  end
@@ -119,6 +149,8 @@ module Weft
119
149
  warn '[DEPRECATED] the `valid?` method is obsolete'
120
150
  return false if @address.nil?
121
151
  return false if @balance_usdc.nil?
152
+ return false if @tempo_usd.nil?
153
+ return false if @total_usd.nil?
122
154
  return false if @network.nil?
123
155
  true
124
156
  end
@@ -143,6 +175,26 @@ module Weft
143
175
  @balance_usdc = balance_usdc
144
176
  end
145
177
 
178
+ # Custom attribute writer method with validation
179
+ # @param [Object] tempo_usd Value to be assigned
180
+ def tempo_usd=(tempo_usd)
181
+ if tempo_usd.nil?
182
+ fail ArgumentError, 'tempo_usd cannot be nil'
183
+ end
184
+
185
+ @tempo_usd = tempo_usd
186
+ end
187
+
188
+ # Custom attribute writer method with validation
189
+ # @param [Object] total_usd Value to be assigned
190
+ def total_usd=(total_usd)
191
+ if total_usd.nil?
192
+ fail ArgumentError, 'total_usd cannot be nil'
193
+ end
194
+
195
+ @total_usd = total_usd
196
+ end
197
+
146
198
  # Custom attribute writer method with validation
147
199
  # @param [Object] network Value to be assigned
148
200
  def network=(network)
@@ -160,6 +212,8 @@ module Weft
160
212
  self.class == o.class &&
161
213
  address == o.address &&
162
214
  balance_usdc == o.balance_usdc &&
215
+ tempo_usd == o.tempo_usd &&
216
+ total_usd == o.total_usd &&
163
217
  network == o.network
164
218
  end
165
219
 
@@ -172,7 +226,7 @@ module Weft
172
226
  # Calculates hash code according to all attributes.
173
227
  # @return [Integer] Hash code
174
228
  def hash
175
- [address, balance_usdc, network].hash
229
+ [address, balance_usdc, tempo_usd, total_usd, network].hash
176
230
  end
177
231
 
178
232
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.1
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Weft
14
- VERSION = '0.6.1'
14
+ VERSION = '0.7.0'
15
15
  end
data/lib/weft/sdk.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Weft
2
2
  module SDK
3
- VERSION = '0.6.1'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weft-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weft Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-01 00:00:00.000000000 Z
11
+ date: 2026-07-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -32,14 +32,19 @@ files:
32
32
  - docs/ConfirmRequest.md
33
33
  - docs/CreateApiKeyRequest.md
34
34
  - docs/DefaultApi.md
35
+ - docs/EnrolledResource.md
35
36
  - docs/Error.md
36
37
  - docs/ErrorResponse.md
38
+ - docs/Fetch403Response.md
37
39
  - docs/FetchApi.md
38
40
  - docs/FetchBalanceSnapshot.md
39
41
  - docs/FetchErrorResponse.md
40
42
  - docs/FetchRequest.md
41
43
  - docs/FetchRequestBody.md
42
44
  - docs/FetchResponse.md
45
+ - docs/InsufficientScopeResponse.md
46
+ - docs/MeApiKey.md
47
+ - docs/MeApiKeyCreator.md
43
48
  - docs/MeResponse.md
44
49
  - docs/Merchant.md
45
50
  - docs/MessageResponse.md
@@ -53,6 +58,10 @@ files:
53
58
  - docs/PaymentsApi.md
54
59
  - docs/PromoBalance.md
55
60
  - docs/ResendConfirmationRequest.md
61
+ - docs/ResourceEnrollmentRequest.md
62
+ - docs/ResourceEnrollmentResponse.md
63
+ - docs/ResourceStats.md
64
+ - docs/ResourcesApi.md
56
65
  - docs/SearchAgentCard.md
57
66
  - docs/SearchApi.md
58
67
  - docs/SearchEndpoints.md
@@ -62,6 +71,7 @@ files:
62
71
  - docs/SearchRanking.md
63
72
  - docs/SearchRequest.md
64
73
  - docs/SearchResponse.md
74
+ - docs/SearchResponseResultsInner.md
65
75
  - docs/SearchResult.md
66
76
  - docs/SearchSkill.md
67
77
  - docs/SearchSkillEndpoint.md
@@ -81,6 +91,7 @@ files:
81
91
  - lib/weft/generated/api/default_api.rb
82
92
  - lib/weft/generated/api/fetch_api.rb
83
93
  - lib/weft/generated/api/payments_api.rb
94
+ - lib/weft/generated/api/resources_api.rb
84
95
  - lib/weft/generated/api/search_api.rb
85
96
  - lib/weft/generated/api_client.rb
86
97
  - lib/weft/generated/api_error.rb
@@ -96,13 +107,18 @@ files:
96
107
  - lib/weft/generated/models/balance_response.rb
97
108
  - lib/weft/generated/models/confirm_request.rb
98
109
  - lib/weft/generated/models/create_api_key_request.rb
110
+ - lib/weft/generated/models/enrolled_resource.rb
99
111
  - lib/weft/generated/models/error.rb
100
112
  - lib/weft/generated/models/error_response.rb
113
+ - lib/weft/generated/models/fetch403_response.rb
101
114
  - lib/weft/generated/models/fetch_balance_snapshot.rb
102
115
  - lib/weft/generated/models/fetch_error_response.rb
103
116
  - lib/weft/generated/models/fetch_request.rb
104
117
  - lib/weft/generated/models/fetch_request_body.rb
105
118
  - lib/weft/generated/models/fetch_response.rb
119
+ - lib/weft/generated/models/insufficient_scope_response.rb
120
+ - lib/weft/generated/models/me_api_key.rb
121
+ - lib/weft/generated/models/me_api_key_creator.rb
106
122
  - lib/weft/generated/models/me_response.rb
107
123
  - lib/weft/generated/models/merchant.rb
108
124
  - lib/weft/generated/models/message_response.rb
@@ -115,6 +131,9 @@ files:
115
131
  - lib/weft/generated/models/payment_response.rb
116
132
  - lib/weft/generated/models/promo_balance.rb
117
133
  - lib/weft/generated/models/resend_confirmation_request.rb
134
+ - lib/weft/generated/models/resource_enrollment_request.rb
135
+ - lib/weft/generated/models/resource_enrollment_response.rb
136
+ - lib/weft/generated/models/resource_stats.rb
118
137
  - lib/weft/generated/models/search_agent_card.rb
119
138
  - lib/weft/generated/models/search_endpoints.rb
120
139
  - lib/weft/generated/models/search_error_response.rb
@@ -123,6 +142,7 @@ files:
123
142
  - lib/weft/generated/models/search_ranking.rb
124
143
  - lib/weft/generated/models/search_request.rb
125
144
  - lib/weft/generated/models/search_response.rb
145
+ - lib/weft/generated/models/search_response_results_inner.rb
126
146
  - lib/weft/generated/models/search_result.rb
127
147
  - lib/weft/generated/models/search_skill.rb
128
148
  - lib/weft/generated/models/search_skill_endpoint.rb