weft-sdk 0.7.0 → 0.9.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 (170) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +1 -2
  3. data/docs/AccountApi.md +6 -5
  4. data/docs/AccountDetails.md +2 -1
  5. data/docs/ApiKey.md +0 -1
  6. data/docs/ApiKeyCreated.md +0 -1
  7. data/docs/ApiKeyCreatedResponse.md +0 -1
  8. data/docs/ApiKeyListResponse.md +0 -1
  9. data/docs/AuthApi.md +6 -7
  10. data/docs/AuthResponse.md +0 -1
  11. data/docs/AuthResponseData.md +0 -1
  12. data/docs/BalanceApi.md +1 -2
  13. data/docs/BalanceResponse.md +3 -4
  14. data/docs/ConfirmRequest.md +0 -1
  15. data/docs/CreateApiKeyRequest.md +0 -1
  16. data/docs/DefaultApi.md +0 -1
  17. data/docs/EnrolledResource.md +0 -1
  18. data/docs/Error.md +0 -1
  19. data/docs/ErrorResponse.md +0 -1
  20. data/docs/Fetch403Response.md +0 -1
  21. data/docs/FetchApi.md +10 -7
  22. data/docs/FetchBalanceSnapshot.md +2 -3
  23. data/docs/FetchErrorResponse.md +0 -1
  24. data/docs/FetchRequest.md +0 -1
  25. data/docs/FetchRequestBody.md +0 -1
  26. data/docs/FetchResponse.md +5 -2
  27. data/docs/InsufficientScopeResponse.md +0 -1
  28. data/docs/MeApiKey.md +0 -1
  29. data/docs/MeApiKeyCreator.md +0 -1
  30. data/docs/MeResponse.md +1 -2
  31. data/docs/MeResponseData.md +78 -0
  32. data/docs/Merchant.md +0 -1
  33. data/docs/MessageResponse.md +0 -1
  34. data/docs/MessageResponseData.md +0 -1
  35. data/docs/Pagination.md +0 -1
  36. data/docs/PasswordResetRequest.md +0 -1
  37. data/docs/PasswordUpdateRequest.md +0 -1
  38. data/docs/Payment.md +0 -3
  39. data/docs/PaymentListResponse.md +0 -1
  40. data/docs/PaymentResponse.md +0 -1
  41. data/docs/PaymentsApi.md +0 -1
  42. data/docs/PrincipalWallet.md +19 -0
  43. data/docs/PromoBalance.md +0 -1
  44. data/docs/Purchase.md +43 -0
  45. data/docs/PurchaseArtifact.md +23 -0
  46. data/docs/PurchaseListResponse.md +19 -0
  47. data/docs/PurchaseResponse.md +17 -0
  48. data/docs/PurchasesApi.md +148 -0
  49. data/docs/ResendConfirmationRequest.md +0 -1
  50. data/docs/ResourceEnrollmentRequest.md +0 -1
  51. data/docs/ResourceEnrollmentResponse.md +0 -1
  52. data/docs/ResourceStats.md +0 -1
  53. data/docs/ResourcesApi.md +2 -3
  54. data/docs/SearchApi.md +2 -3
  55. data/docs/SearchCapabilityRef.md +19 -0
  56. data/docs/SearchEndpointCall.md +23 -0
  57. data/docs/SearchEndpointHit.md +41 -0
  58. data/docs/SearchEndpointPrice.md +25 -0
  59. data/docs/SearchErrorResponse.md +0 -1
  60. data/docs/SearchFilterSpec.md +23 -0
  61. data/docs/SearchPaymentOffer.md +31 -0
  62. data/docs/SearchPriceAtomicFilter.md +25 -0
  63. data/docs/SearchPriceUsdFilter.md +25 -0
  64. data/docs/SearchProtocolFilter.md +19 -0
  65. data/docs/SearchProviderRef.md +21 -0
  66. data/docs/SearchRequest.md +3 -4
  67. data/docs/SearchResourceTypeFilter.md +19 -0
  68. data/docs/SearchResponse.md +35 -8
  69. data/docs/SearchResponseWarningsInner.md +23 -0
  70. data/docs/SearchResult.md +8 -21
  71. data/docs/SignInRequest.md +0 -1
  72. data/docs/SignUpRequest.md +0 -1
  73. data/docs/SpendingPolicy.md +0 -1
  74. data/docs/User.md +0 -1
  75. data/docs/UserPrincipal.md +33 -0
  76. data/docs/Wallet.md +3 -4
  77. data/lib/weft/generated/api/account_api.rb +6 -4
  78. data/lib/weft/generated/api/api_keys_api.rb +4 -4
  79. data/lib/weft/generated/api/auth_api.rb +14 -14
  80. data/lib/weft/generated/api/balance_api.rb +4 -4
  81. data/lib/weft/generated/api/default_api.rb +2 -2
  82. data/lib/weft/generated/api/fetch_api.rb +22 -6
  83. data/lib/weft/generated/api/payments_api.rb +2 -2
  84. data/lib/weft/generated/api/purchases_api.rb +150 -0
  85. data/lib/weft/generated/api/resources_api.rb +6 -6
  86. data/lib/weft/generated/api/search_api.rb +6 -6
  87. data/lib/weft/generated/api_client.rb +2 -2
  88. data/lib/weft/generated/api_error.rb +2 -2
  89. data/lib/weft/generated/api_model_base.rb +2 -2
  90. data/lib/weft/generated/configuration.rb +2 -2
  91. data/lib/weft/generated/models/account_details.rb +54 -4
  92. data/lib/weft/generated/models/api_key.rb +2 -2
  93. data/lib/weft/generated/models/api_key_created.rb +2 -2
  94. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  95. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  96. data/lib/weft/generated/models/auth_response.rb +2 -2
  97. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  98. data/lib/weft/generated/models/balance_response.rb +5 -5
  99. data/lib/weft/generated/models/confirm_request.rb +2 -2
  100. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  101. data/lib/weft/generated/models/enrolled_resource.rb +4 -4
  102. data/lib/weft/generated/models/error.rb +3 -3
  103. data/lib/weft/generated/models/error_response.rb +3 -3
  104. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  105. data/lib/weft/generated/models/fetch_balance_snapshot.rb +5 -5
  106. data/lib/weft/generated/models/fetch_error_response.rb +5 -5
  107. data/lib/weft/generated/models/fetch_request.rb +5 -5
  108. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  109. data/lib/weft/generated/models/fetch_response.rb +83 -5
  110. data/lib/weft/generated/models/insufficient_scope_response.rb +3 -3
  111. data/lib/weft/generated/models/me_api_key.rb +2 -2
  112. data/lib/weft/generated/models/me_api_key_creator.rb +3 -3
  113. data/lib/weft/generated/models/me_response.rb +3 -3
  114. data/lib/weft/generated/models/me_response_data.rb +55 -0
  115. data/lib/weft/generated/models/merchant.rb +2 -2
  116. data/lib/weft/generated/models/message_response.rb +2 -2
  117. data/lib/weft/generated/models/message_response_data.rb +2 -2
  118. data/lib/weft/generated/models/pagination.rb +2 -2
  119. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  120. data/lib/weft/generated/models/password_update_request.rb +2 -2
  121. data/lib/weft/generated/models/payment.rb +3 -12
  122. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  123. data/lib/weft/generated/models/payment_response.rb +2 -2
  124. data/lib/weft/generated/models/principal_wallet.rb +190 -0
  125. data/lib/weft/generated/models/promo_balance.rb +3 -3
  126. data/lib/weft/generated/models/purchase.rb +427 -0
  127. data/lib/weft/generated/models/{search_agent_card.rb → purchase_artifact.rb} +91 -82
  128. data/lib/weft/generated/models/purchase_list_response.rb +192 -0
  129. data/lib/weft/generated/models/purchase_response.rb +164 -0
  130. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  131. data/lib/weft/generated/models/resource_enrollment_request.rb +5 -5
  132. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  133. data/lib/weft/generated/models/resource_stats.rb +2 -2
  134. data/lib/weft/generated/models/{search_skill_endpoint.rb → search_capability_ref.rb} +18 -19
  135. data/lib/weft/generated/models/search_endpoint_call.rb +179 -0
  136. data/lib/weft/generated/models/search_endpoint_hit.rb +296 -0
  137. data/lib/weft/generated/models/{search_skill.rb → search_endpoint_price.rb} +76 -112
  138. data/lib/weft/generated/models/search_error_response.rb +5 -5
  139. data/lib/weft/generated/models/search_filter_spec.rb +175 -0
  140. data/lib/weft/generated/models/{search_pricing.rb → search_payment_offer.rb} +64 -67
  141. data/lib/weft/generated/models/search_price_atomic_filter.rb +284 -0
  142. data/lib/weft/generated/models/search_price_usd_filter.rb +294 -0
  143. data/lib/weft/generated/models/search_protocol_filter.rb +200 -0
  144. data/lib/weft/generated/models/{search_endpoints.rb → search_provider_ref.rb} +26 -36
  145. data/lib/weft/generated/models/search_request.rb +36 -27
  146. data/lib/weft/generated/models/search_resource_type_filter.rb +200 -0
  147. data/lib/weft/generated/models/search_response.rb +367 -31
  148. data/lib/weft/generated/models/search_response_warnings_inner.rb +210 -0
  149. data/lib/weft/generated/models/search_result.rb +68 -220
  150. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  151. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  152. data/lib/weft/generated/models/spending_policy.rb +2 -2
  153. data/lib/weft/generated/models/user.rb +2 -2
  154. data/lib/weft/generated/models/user_principal.rb +370 -0
  155. data/lib/weft/generated/models/wallet.rb +5 -5
  156. data/lib/weft/generated/version.rb +3 -3
  157. data/lib/weft/generated.rb +10 -4
  158. data/lib/weft/sdk.rb +1 -1
  159. metadata +57 -19
  160. data/docs/SearchAgentCard.md +0 -34
  161. data/docs/SearchEndpoints.md +0 -24
  162. data/docs/SearchFilters.md +0 -26
  163. data/docs/SearchPricing.md +0 -24
  164. data/docs/SearchRanking.md +0 -26
  165. data/docs/SearchResponseResultsInner.md +0 -36
  166. data/docs/SearchSkill.md +0 -36
  167. data/docs/SearchSkillEndpoint.md +0 -20
  168. data/lib/weft/generated/models/search_filters.rb +0 -277
  169. data/lib/weft/generated/models/search_ranking.rb +0 -277
  170. data/lib/weft/generated/models/search_response_results_inner.rb +0 -103
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Weft
17
- # Bespoke error envelope for `/api/v1/fetch`. Every error carries the buyer's current `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. `error` values include the fixed codes listed below plus the `POLICY_VIOLATION_<REASON>` family, where `<REASON>` is the violated policy field (`MAX_TX`, `DAILY`, or `WEEKLY` — see `PolicyViolation::REASONS`).
17
+ # Bespoke error envelope for `/api/v1/fetch`. Every error carries the buyer's current `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. `error` values include the fixed codes listed below plus the `POLICY_VIOLATION_<REASON>` family, where `<REASON>` is the violated policy field (`MAX_TX`, `DAILY`, or `WEEKLY` — see `PolicyViolation::REASONS`).
18
18
  class FetchErrorResponse < ApiModelBase
19
19
  # Stable error code.
20
20
  attr_accessor :error
@@ -171,7 +171,7 @@ module Weft
171
171
  def valid?
172
172
  warn '[DEPRECATED] the `valid?` method is obsolete'
173
173
  return false if @error.nil?
174
- error_validator = EnumAttributeValidator.new('String', ["INVALID_URL", "EXCEEDED_MAX_COST", "INSUFFICIENT_BALANCE", "CONVERSION_UNAVAILABLE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "UNSUPPORTED_PAYMENT_METHOD", "POLICY_VIOLATION_MAX_TX", "POLICY_VIOLATION_DAILY", "POLICY_VIOLATION_WEEKLY"])
174
+ error_validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "UNKNOWN_PARAMETER", "INVALID_URL", "INVALID_MAX_COST_USD", "UNSUPPORTED_METHOD", "INVALID_BODY", "INVALID_HEADERS", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_CONFLICT", "EXCEEDED_MAX_COST", "INSUFFICIENT_BALANCE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "UNSUPPORTED_PAYMENT_METHOD", "UNSUPPORTED_ASSET", "POLICY_VIOLATION_MAX_TX", "POLICY_VIOLATION_DAILY", "POLICY_VIOLATION_WEEKLY"])
175
175
  return false unless error_validator.valid?(@error)
176
176
  return false if @details.nil?
177
177
  return false if @policy.nil?
@@ -183,7 +183,7 @@ module Weft
183
183
  # Custom attribute writer method checking allowed values (enum).
184
184
  # @param [Object] error Object to be assigned
185
185
  def error=(error)
186
- validator = EnumAttributeValidator.new('String', ["INVALID_URL", "EXCEEDED_MAX_COST", "INSUFFICIENT_BALANCE", "CONVERSION_UNAVAILABLE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "UNSUPPORTED_PAYMENT_METHOD", "POLICY_VIOLATION_MAX_TX", "POLICY_VIOLATION_DAILY", "POLICY_VIOLATION_WEEKLY"])
186
+ validator = EnumAttributeValidator.new('String', ["INVALID_REQUEST", "UNKNOWN_PARAMETER", "INVALID_URL", "INVALID_MAX_COST_USD", "UNSUPPORTED_METHOD", "INVALID_BODY", "INVALID_HEADERS", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_CONFLICT", "EXCEEDED_MAX_COST", "INSUFFICIENT_BALANCE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "UNSUPPORTED_PAYMENT_METHOD", "UNSUPPORTED_ASSET", "POLICY_VIOLATION_MAX_TX", "POLICY_VIOLATION_DAILY", "POLICY_VIOLATION_WEEKLY"])
187
187
  unless validator.valid?(error)
188
188
  fail ArgumentError, "invalid value for \"error\", must be one of #{validator.allowable_values}."
189
189
  end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -26,7 +26,7 @@ module Weft
26
26
 
27
27
  attr_accessor :body
28
28
 
29
- # Headers forwarded to the upstream. Up to 32 headers, 4 KB total. The following are silently stripped: `host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`.
29
+ # Headers forwarded to the upstream. Up to 32 headers, 4 KB total. The following are silently stripped: `host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`.
30
30
  attr_accessor :headers
31
31
 
32
32
  class EnumAttributeValidator
@@ -158,7 +158,7 @@ module Weft
158
158
  warn '[DEPRECATED] the `valid?` method is obsolete'
159
159
  return false if @url.nil?
160
160
  return false if !@max_cost_usd.nil? && @max_cost_usd !~ Regexp.new(/^\d+(\.\d{1,6})?$/)
161
- method_validator = EnumAttributeValidator.new('String', ["GET", "POST", "PUT", "PATCH", "DELETE"])
161
+ method_validator = EnumAttributeValidator.new('String', ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])
162
162
  return false unless method_validator.valid?(@method)
163
163
  true
164
164
  end
@@ -191,7 +191,7 @@ module Weft
191
191
  # Custom attribute writer method checking allowed values (enum).
192
192
  # @param [Object] method Object to be assigned
193
193
  def method=(method)
194
- validator = EnumAttributeValidator.new('String', ["GET", "POST", "PUT", "PATCH", "DELETE"])
194
+ validator = EnumAttributeValidator.new('String', ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])
195
195
  unless validator.valid?(method)
196
196
  fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
197
197
  end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Weft
17
- # Successful fetch envelope. `body_base64` is the upstream artifact bytes, base64-encoded. `paid_usd`, `tx_hash`, and `merchant` are populated only when the upstream charged for the response.
17
+ # Successful fetch envelope. `body_base64` is the upstream artifact bytes, base64-encoded. `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and `merchant` are populated only when the upstream charged for the response. `paid_usd` is \"0.00\" (never the nominal charge amount) until the charge is CONFIRMED settled on-chain — a signed-but-unsettled hold reports its amount in `held_usd` instead. This is a deliberate honesty fix: earlier versions of this endpoint returned the nominal amount in `paid_usd` unconditionally, even when the charge never settled. **Money string format.** Every USD amount on this surface is exact to the micro-dollar and never narrower than two decimals: a whole-cent amount renders \"0.50\", a sub-cent amount keeps its real precision (\"0.000892\"), and zero renders \"0.00\". Amounts are never rounded — an agent reconciling its own spend reads the truth, not a display value. Parse these as decimals; do NOT compare them as strings against a bare zero literal.
18
18
  class FetchResponse < ApiModelBase
19
19
  # HTTP status returned by the upstream after the paid replay.
20
20
  attr_accessor :status
@@ -25,9 +25,15 @@ module Weft
25
25
  # Base64-encoded response body. Empty string for empty bodies.
26
26
  attr_accessor :body_base64
27
27
 
28
- # USD amount actually settled. Null for free upstreams.
28
+ # USD amount actually settled on-chain. \"0.00\" for free upstreams AND for any charge that hasn't (yet, or ever) settled — a signed hold is not yet spend. See `held_usd` for the nominal amount in that case. Exact to the micro-dollar, minimum two decimals; parse as a decimal rather than string-comparing against a bare zero literal.
29
29
  attr_accessor :paid_usd
30
30
 
31
+ # The nominal charge amount when `paid_usd` is \"0.00\" — a hold awaiting settlement, or a charge that failed/expired without ever settling. `null` once `paid_usd` reflects the real settlement (or for a free upstream, where nothing was ever charged). Same format as `paid_usd`: exact to the micro-dollar, minimum two decimals.
32
+ attr_accessor :held_usd
33
+
34
+ # Agent-facing settlement status. `pending` = signed, no refusal signal yet (settlement may still land, e.g. x402's async facilitator webhook). `declined-pending` = the merchant refused but the authorization isn't provably dead yet. `declined` / `expired` / `reverted` are terminal — the money never moved (or, for `reverted`, moved and then reversed on-chain) and never will for this charge.
35
+ attr_accessor :payment_status
36
+
31
37
  # Settlement transaction hash. Null for free upstreams.
32
38
  attr_accessor :tx_hash
33
39
 
@@ -37,6 +43,28 @@ module Weft
37
43
  # Merchant reputation snapshot. Null for free upstreams.
38
44
  attr_accessor :merchant
39
45
 
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
40
68
  # Attribute mapping from ruby-style variable name to JSON key.
41
69
  def self.attribute_map
42
70
  {
@@ -44,6 +72,8 @@ module Weft
44
72
  :'headers' => :'headers',
45
73
  :'body_base64' => :'body_base64',
46
74
  :'paid_usd' => :'paid_usd',
75
+ :'held_usd' => :'held_usd',
76
+ :'payment_status' => :'payment_status',
47
77
  :'tx_hash' => :'tx_hash',
48
78
  :'artifact_id' => :'artifact_id',
49
79
  :'merchant' => :'merchant'
@@ -67,6 +97,8 @@ module Weft
67
97
  :'headers' => :'Hash<String, String>',
68
98
  :'body_base64' => :'String',
69
99
  :'paid_usd' => :'String',
100
+ :'held_usd' => :'String',
101
+ :'payment_status' => :'String',
70
102
  :'tx_hash' => :'String',
71
103
  :'artifact_id' => :'Integer',
72
104
  :'merchant' => :'Merchant'
@@ -121,6 +153,18 @@ module Weft
121
153
  self.paid_usd = nil
122
154
  end
123
155
 
156
+ if attributes.key?(:'held_usd')
157
+ self.held_usd = attributes[:'held_usd']
158
+ else
159
+ self.held_usd = nil
160
+ end
161
+
162
+ if attributes.key?(:'payment_status')
163
+ self.payment_status = attributes[:'payment_status']
164
+ else
165
+ self.payment_status = nil
166
+ end
167
+
124
168
  if attributes.key?(:'tx_hash')
125
169
  self.tx_hash = attributes[:'tx_hash']
126
170
  else
@@ -161,6 +205,14 @@ module Weft
161
205
  invalid_properties.push('invalid value for "paid_usd", paid_usd cannot be nil.')
162
206
  end
163
207
 
208
+ if @held_usd.nil?
209
+ invalid_properties.push('invalid value for "held_usd", held_usd cannot be nil.')
210
+ end
211
+
212
+ if @payment_status.nil?
213
+ invalid_properties.push('invalid value for "payment_status", payment_status cannot be nil.')
214
+ end
215
+
164
216
  if @tx_hash.nil?
165
217
  invalid_properties.push('invalid value for "tx_hash", tx_hash cannot be nil.')
166
218
  end
@@ -184,6 +236,10 @@ module Weft
184
236
  return false if @headers.nil?
185
237
  return false if @body_base64.nil?
186
238
  return false if @paid_usd.nil?
239
+ return false if @held_usd.nil?
240
+ return false if @payment_status.nil?
241
+ payment_status_validator = EnumAttributeValidator.new('String', ["settled", "pending", "declined-pending", "declined", "expired", "reverted"])
242
+ return false unless payment_status_validator.valid?(@payment_status)
187
243
  return false if @tx_hash.nil?
188
244
  return false if @artifact_id.nil?
189
245
  return false if @merchant.nil?
@@ -230,6 +286,26 @@ module Weft
230
286
  @paid_usd = paid_usd
231
287
  end
232
288
 
289
+ # Custom attribute writer method with validation
290
+ # @param [Object] held_usd Value to be assigned
291
+ def held_usd=(held_usd)
292
+ if held_usd.nil?
293
+ fail ArgumentError, 'held_usd cannot be nil'
294
+ end
295
+
296
+ @held_usd = held_usd
297
+ end
298
+
299
+ # Custom attribute writer method checking allowed values (enum).
300
+ # @param [Object] payment_status Object to be assigned
301
+ def payment_status=(payment_status)
302
+ validator = EnumAttributeValidator.new('String', ["settled", "pending", "declined-pending", "declined", "expired", "reverted"])
303
+ unless validator.valid?(payment_status)
304
+ fail ArgumentError, "invalid value for \"payment_status\", must be one of #{validator.allowable_values}."
305
+ end
306
+ @payment_status = payment_status
307
+ end
308
+
233
309
  # Custom attribute writer method with validation
234
310
  # @param [Object] tx_hash Value to be assigned
235
311
  def tx_hash=(tx_hash)
@@ -269,6 +345,8 @@ module Weft
269
345
  headers == o.headers &&
270
346
  body_base64 == o.body_base64 &&
271
347
  paid_usd == o.paid_usd &&
348
+ held_usd == o.held_usd &&
349
+ payment_status == o.payment_status &&
272
350
  tx_hash == o.tx_hash &&
273
351
  artifact_id == o.artifact_id &&
274
352
  merchant == o.merchant
@@ -283,7 +361,7 @@ module Weft
283
361
  # Calculates hash code according to all attributes.
284
362
  # @return [Integer] Hash code
285
363
  def hash
286
- [status, headers, body_base64, paid_usd, tx_hash, artifact_id, merchant].hash
364
+ [status, headers, body_base64, paid_usd, held_usd, payment_status, tx_hash, artifact_id, merchant].hash
287
365
  end
288
366
 
289
367
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Weft
17
- # RFC 6750 §3.1 `insufficient_scope` error. Returned with HTTP 403 and a `WWW-Authenticate: Bearer error=\"insufficient_scope\", scope=\"...\"` header when an OAuth access token authenticates successfully but does not carry the scope the endpoint requires. Only OAuth bearer tokens are scope-gated; `wk_`-prefixed API keys are unscoped and never see this response.
17
+ # RFC 6750 §3.1 `insufficient_scope` error. Returned with HTTP 403 and a `WWW-Authenticate: Bearer error=\"insufficient_scope\", scope=\"...\"` header when an OAuth access token authenticates successfully but does not carry the scope the endpoint requires. Only OAuth bearer tokens are scope-gated; `wk_`-prefixed API keys are unscoped and never see this response.
18
18
  class InsufficientScopeResponse < ApiModelBase
19
19
  attr_accessor :error
20
20
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Weft
17
- # The user who minted this API key, surfaced for audit rendering only. `null` if that user has since left the Organization. NEVER use for authorization.
17
+ # The user who minted this API key, surfaced for audit rendering only. `null` if that user has since left the Organization. NEVER use for authorization.
18
18
  class MeApiKeyCreator < ApiModelBase
19
19
  attr_accessor :id
20
20
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -37,7 +37,7 @@ module Weft
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'data' => :'AccountDetails'
40
+ :'data' => :'MeResponseData'
41
41
  }
42
42
  end
43
43
 
@@ -0,0 +1,55 @@
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/purchases`) 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.9.1
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 MeResponseData
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'AccountDetails',
23
+ :'UserPrincipal'
24
+ ]
25
+ end
26
+
27
+ # Discriminator's property name (OpenAPI v3)
28
+ def openapi_discriminator_name
29
+ :'principal_type'
30
+ end
31
+
32
+ # Discriminator's mapping (OpenAPI v3)
33
+ def openapi_discriminator_mapping
34
+ {
35
+ :'organization' => :'AccountDetails',
36
+ :'user' => :'UserPrincipal'
37
+ }
38
+ end
39
+
40
+ # Builds the object
41
+ # @param [Mixed] Data to be matched against the list of oneOf items
42
+ # @return [Object] Returns the model or the data itself
43
+ def build(data)
44
+ discriminator_value = data[openapi_discriminator_name] || data[openapi_discriminator_name.to_s]
45
+ return nil if discriminator_value.nil?
46
+
47
+ klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
48
+ return nil unless klass
49
+
50
+ Weft.const_get(klass).build_from_hash(data)
51
+ end
52
+ end
53
+ end
54
+
55
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -38,8 +38,6 @@ module Weft
38
38
 
39
39
  attr_accessor :resource_host
40
40
 
41
- attr_accessor :fee_amount
42
-
43
41
  attr_accessor :settlement_latency_ms
44
42
 
45
43
  attr_accessor :settled_at
@@ -59,7 +57,6 @@ module Weft
59
57
  :'network' => :'network',
60
58
  :'resource_url' => :'resource_url',
61
59
  :'resource_host' => :'resource_host',
62
- :'fee_amount' => :'fee_amount',
63
60
  :'settlement_latency_ms' => :'settlement_latency_ms',
64
61
  :'settled_at' => :'settled_at',
65
62
  :'api_key_name' => :'api_key_name'
@@ -89,7 +86,6 @@ module Weft
89
86
  :'network' => :'String',
90
87
  :'resource_url' => :'String',
91
88
  :'resource_host' => :'String',
92
- :'fee_amount' => :'Integer',
93
89
  :'settlement_latency_ms' => :'Integer',
94
90
  :'settled_at' => :'Time',
95
91
  :'api_key_name' => :'String'
@@ -174,10 +170,6 @@ module Weft
174
170
  self.resource_host = attributes[:'resource_host']
175
171
  end
176
172
 
177
- if attributes.key?(:'fee_amount')
178
- self.fee_amount = attributes[:'fee_amount']
179
- end
180
-
181
173
  if attributes.key?(:'settlement_latency_ms')
182
174
  self.settlement_latency_ms = attributes[:'settlement_latency_ms']
183
175
  end
@@ -375,7 +367,6 @@ module Weft
375
367
  network == o.network &&
376
368
  resource_url == o.resource_url &&
377
369
  resource_host == o.resource_host &&
378
- fee_amount == o.fee_amount &&
379
370
  settlement_latency_ms == o.settlement_latency_ms &&
380
371
  settled_at == o.settled_at &&
381
372
  api_key_name == o.api_key_name
@@ -390,7 +381,7 @@ module Weft
390
381
  # Calculates hash code according to all attributes.
391
382
  # @return [Integer] Hash code
392
383
  def hash
393
- [id, tx_hash, payer_address, recipient_address, amount, amount_formatted, currency, network, resource_url, resource_host, fee_amount, settlement_latency_ms, settled_at, api_key_name].hash
384
+ [id, tx_hash, payer_address, recipient_address, amount, amount_formatted, currency, network, resource_url, resource_host, settlement_latency_ms, settled_at, api_key_name].hash
394
385
  end
395
386
 
396
387
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
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`.
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/purchases`) 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.7.0
6
+ The version of the OpenAPI document: 0.9.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0