weft-sdk 0.9.1 → 0.14.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.
- checksums.yaml +4 -4
- data/docs/APIKeysApi.md +4 -0
- data/docs/AccountApi.md +1 -1
- data/docs/AccountBootstrapApproval.md +21 -0
- data/docs/AccountBootstrapCreated.md +29 -0
- data/docs/AccountBootstrapCreatedApproval.md +23 -0
- data/docs/AccountBootstrapCreatedResponse.md +17 -0
- data/docs/AccountBootstrapRequest.md +27 -0
- data/docs/AccountBootstrapStatus.md +25 -0
- data/docs/AccountBootstrapStatusResponse.md +17 -0
- data/docs/AgentBootstrapApi.md +209 -0
- data/docs/BalanceApi.md +1 -1
- data/docs/CuratedMarketplaceContract.md +31 -0
- data/docs/FetchApi.md +1 -1
- data/docs/FetchBalanceSnapshot.md +1 -1
- data/docs/FetchRequest.md +7 -1
- data/docs/RateLimitResponse.md +19 -0
- data/docs/SearchAccessMethod.md +37 -0
- data/docs/SearchApi.md +68 -1
- data/docs/SearchCuratedCallability.md +19 -0
- data/docs/SearchCuratedExecution.md +17 -0
- data/docs/SearchCuratedOperation.md +21 -0
- data/docs/SearchCuratedService.md +19 -0
- data/docs/SearchCuratedSource.md +21 -0
- data/docs/SearchEndpointHit.md +18 -0
- data/docs/SearchExecutionModeFilter.md +19 -0
- data/docs/SearchFilterSpec.md +11 -1
- data/docs/SearchMethodFilter.md +19 -0
- data/docs/SearchResponse.md +1 -3
- data/docs/SearchStringSetFilter.md +19 -0
- data/docs/SearchWeftFetchCompatibility.md +21 -0
- data/docs/Wallet.md +7 -3
- data/lib/weft/generated/api/account_api.rb +4 -4
- data/lib/weft/generated/api/agent_bootstrap_api.rb +224 -0
- data/lib/weft/generated/api/api_keys_api.rb +6 -2
- data/lib/weft/generated/api/auth_api.rb +2 -2
- data/lib/weft/generated/api/balance_api.rb +4 -4
- data/lib/weft/generated/api/default_api.rb +2 -2
- data/lib/weft/generated/api/fetch_api.rb +4 -4
- data/lib/weft/generated/api/payments_api.rb +2 -2
- data/lib/weft/generated/api/purchases_api.rb +2 -2
- data/lib/weft/generated/api/resources_api.rb +2 -2
- data/lib/weft/generated/api/search_api.rb +83 -4
- data/lib/weft/generated/api_client.rb +2 -2
- data/lib/weft/generated/api_error.rb +2 -2
- data/lib/weft/generated/api_model_base.rb +2 -2
- data/lib/weft/generated/configuration.rb +10 -10
- data/lib/weft/generated/models/account_bootstrap_approval.rb +259 -0
- data/lib/weft/generated/models/account_bootstrap_created.rb +349 -0
- data/lib/weft/generated/models/account_bootstrap_created_approval.rb +297 -0
- data/lib/weft/generated/models/account_bootstrap_created_response.rb +164 -0
- data/lib/weft/generated/models/account_bootstrap_request.rb +317 -0
- data/lib/weft/generated/models/account_bootstrap_status.rb +282 -0
- data/lib/weft/generated/models/account_bootstrap_status_response.rb +164 -0
- data/lib/weft/generated/models/account_details.rb +2 -2
- data/lib/weft/generated/models/api_key.rb +2 -2
- data/lib/weft/generated/models/api_key_created.rb +2 -2
- data/lib/weft/generated/models/api_key_created_response.rb +2 -2
- data/lib/weft/generated/models/api_key_list_response.rb +2 -2
- data/lib/weft/generated/models/auth_response.rb +2 -2
- data/lib/weft/generated/models/auth_response_data.rb +2 -2
- data/lib/weft/generated/models/balance_response.rb +2 -2
- data/lib/weft/generated/models/confirm_request.rb +2 -2
- data/lib/weft/generated/models/create_api_key_request.rb +2 -2
- data/lib/weft/generated/models/curated_marketplace_contract.rb +384 -0
- data/lib/weft/generated/models/enrolled_resource.rb +2 -2
- data/lib/weft/generated/models/error.rb +2 -2
- data/lib/weft/generated/models/error_response.rb +2 -2
- data/lib/weft/generated/models/fetch403_response.rb +2 -2
- data/lib/weft/generated/models/fetch_balance_snapshot.rb +3 -3
- data/lib/weft/generated/models/fetch_error_response.rb +4 -4
- data/lib/weft/generated/models/fetch_request.rb +36 -6
- data/lib/weft/generated/models/fetch_request_body.rb +2 -2
- data/lib/weft/generated/models/fetch_response.rb +2 -2
- data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
- data/lib/weft/generated/models/me_api_key.rb +2 -2
- data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
- data/lib/weft/generated/models/me_response.rb +2 -2
- data/lib/weft/generated/models/me_response_data.rb +2 -2
- data/lib/weft/generated/models/merchant.rb +2 -2
- data/lib/weft/generated/models/message_response.rb +2 -2
- data/lib/weft/generated/models/message_response_data.rb +2 -2
- data/lib/weft/generated/models/pagination.rb +2 -2
- data/lib/weft/generated/models/password_reset_request.rb +2 -2
- data/lib/weft/generated/models/password_update_request.rb +2 -2
- data/lib/weft/generated/models/payment.rb +2 -2
- data/lib/weft/generated/models/payment_list_response.rb +2 -2
- data/lib/weft/generated/models/payment_response.rb +2 -2
- data/lib/weft/generated/models/principal_wallet.rb +2 -2
- data/lib/weft/generated/models/promo_balance.rb +2 -2
- data/lib/weft/generated/models/purchase.rb +2 -2
- data/lib/weft/generated/models/purchase_artifact.rb +2 -2
- data/lib/weft/generated/models/purchase_list_response.rb +2 -2
- data/lib/weft/generated/models/purchase_response.rb +2 -2
- data/lib/weft/generated/models/rate_limit_response.rb +214 -0
- data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
- data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
- data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
- data/lib/weft/generated/models/resource_stats.rb +2 -2
- data/lib/weft/generated/models/search_access_method.rb +341 -0
- data/lib/weft/generated/models/search_capability_ref.rb +2 -2
- data/lib/weft/generated/models/search_curated_callability.rb +216 -0
- data/lib/weft/generated/models/search_curated_execution.rb +181 -0
- data/lib/weft/generated/models/search_curated_operation.rb +199 -0
- data/lib/weft/generated/models/search_curated_service.rb +190 -0
- data/lib/weft/generated/models/search_curated_source.rb +240 -0
- data/lib/weft/generated/models/search_endpoint_call.rb +2 -2
- data/lib/weft/generated/models/search_endpoint_hit.rb +86 -3
- data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
- data/lib/weft/generated/models/search_error_response.rb +2 -2
- data/lib/weft/generated/models/search_execution_mode_filter.rb +197 -0
- data/lib/weft/generated/models/search_filter_spec.rb +55 -6
- data/lib/weft/generated/models/search_method_filter.rb +197 -0
- data/lib/weft/generated/models/search_payment_offer.rb +2 -2
- data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
- data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
- data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
- data/lib/weft/generated/models/search_provider_ref.rb +2 -2
- data/lib/weft/generated/models/search_request.rb +2 -2
- data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
- data/lib/weft/generated/models/search_response.rb +7 -17
- data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
- data/lib/weft/generated/models/search_result.rb +2 -2
- data/lib/weft/generated/models/search_string_set_filter.rb +177 -0
- data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +240 -0
- data/lib/weft/generated/models/sign_in_request.rb +2 -2
- data/lib/weft/generated/models/sign_up_request.rb +2 -2
- data/lib/weft/generated/models/spending_policy.rb +2 -2
- data/lib/weft/generated/models/user.rb +2 -2
- data/lib/weft/generated/models/user_principal.rb +2 -2
- data/lib/weft/generated/models/wallet.rb +84 -6
- data/lib/weft/generated/version.rb +3 -3
- data/lib/weft/sdk.rb +1 -1
- metadata +42 -2
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Weft API
|
|
3
|
+
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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.14.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
|
+
class CuratedMarketplaceContract < ApiModelBase
|
|
18
|
+
attr_accessor :schema_version
|
|
19
|
+
|
|
20
|
+
attr_accessor :snapshot
|
|
21
|
+
|
|
22
|
+
attr_accessor :provider
|
|
23
|
+
|
|
24
|
+
attr_accessor :service
|
|
25
|
+
|
|
26
|
+
attr_accessor :operation
|
|
27
|
+
|
|
28
|
+
attr_accessor :request
|
|
29
|
+
|
|
30
|
+
attr_accessor :access_methods
|
|
31
|
+
|
|
32
|
+
attr_accessor :evidence
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'schema_version' => :'schema_version',
|
|
60
|
+
:'snapshot' => :'snapshot',
|
|
61
|
+
:'provider' => :'provider',
|
|
62
|
+
:'service' => :'service',
|
|
63
|
+
:'operation' => :'operation',
|
|
64
|
+
:'request' => :'request',
|
|
65
|
+
:'access_methods' => :'access_methods',
|
|
66
|
+
:'evidence' => :'evidence'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'schema_version' => :'Integer',
|
|
84
|
+
:'snapshot' => :'Hash<String, Object>',
|
|
85
|
+
:'provider' => :'Hash<String, Object>',
|
|
86
|
+
:'service' => :'Hash<String, Object>',
|
|
87
|
+
:'operation' => :'Hash<String, Object>',
|
|
88
|
+
:'request' => :'Hash<String, Object>',
|
|
89
|
+
:'access_methods' => :'Array<Hash<String, Object>>',
|
|
90
|
+
:'evidence' => :'Array<Hash<String, Object>>'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# List of attributes with nullable: true
|
|
95
|
+
def self.openapi_nullable
|
|
96
|
+
Set.new([
|
|
97
|
+
])
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Initializes the object
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
def initialize(attributes = {})
|
|
103
|
+
if (!attributes.is_a?(Hash))
|
|
104
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::CuratedMarketplaceContract` initialize method"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
108
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
110
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::CuratedMarketplaceContract`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
112
|
+
end
|
|
113
|
+
h[k.to_sym] = v
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'schema_version')
|
|
117
|
+
self.schema_version = attributes[:'schema_version']
|
|
118
|
+
else
|
|
119
|
+
self.schema_version = nil
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'snapshot')
|
|
123
|
+
if (value = attributes[:'snapshot']).is_a?(Hash)
|
|
124
|
+
self.snapshot = value
|
|
125
|
+
end
|
|
126
|
+
else
|
|
127
|
+
self.snapshot = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'provider')
|
|
131
|
+
if (value = attributes[:'provider']).is_a?(Hash)
|
|
132
|
+
self.provider = value
|
|
133
|
+
end
|
|
134
|
+
else
|
|
135
|
+
self.provider = nil
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'service')
|
|
139
|
+
if (value = attributes[:'service']).is_a?(Hash)
|
|
140
|
+
self.service = value
|
|
141
|
+
end
|
|
142
|
+
else
|
|
143
|
+
self.service = nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'operation')
|
|
147
|
+
if (value = attributes[:'operation']).is_a?(Hash)
|
|
148
|
+
self.operation = value
|
|
149
|
+
end
|
|
150
|
+
else
|
|
151
|
+
self.operation = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'request')
|
|
155
|
+
if (value = attributes[:'request']).is_a?(Hash)
|
|
156
|
+
self.request = value
|
|
157
|
+
end
|
|
158
|
+
else
|
|
159
|
+
self.request = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'access_methods')
|
|
163
|
+
if (value = attributes[:'access_methods']).is_a?(Array)
|
|
164
|
+
self.access_methods = value
|
|
165
|
+
end
|
|
166
|
+
else
|
|
167
|
+
self.access_methods = nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'evidence')
|
|
171
|
+
if (value = attributes[:'evidence']).is_a?(Array)
|
|
172
|
+
self.evidence = value
|
|
173
|
+
end
|
|
174
|
+
else
|
|
175
|
+
self.evidence = nil
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
180
|
+
# @return Array for valid properties with the reasons
|
|
181
|
+
def list_invalid_properties
|
|
182
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
183
|
+
invalid_properties = Array.new
|
|
184
|
+
if @schema_version.nil?
|
|
185
|
+
invalid_properties.push('invalid value for "schema_version", schema_version cannot be nil.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if @snapshot.nil?
|
|
189
|
+
invalid_properties.push('invalid value for "snapshot", snapshot cannot be nil.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if @provider.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "provider", provider cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @service.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "service", service cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @operation.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "operation", operation cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @request.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "request", request cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @access_methods.nil?
|
|
209
|
+
invalid_properties.push('invalid value for "access_methods", access_methods cannot be nil.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @evidence.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "evidence", evidence cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
invalid_properties
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Check to see if the all the properties in the model are valid
|
|
220
|
+
# @return true if the model is valid
|
|
221
|
+
def valid?
|
|
222
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
223
|
+
return false if @schema_version.nil?
|
|
224
|
+
schema_version_validator = EnumAttributeValidator.new('Integer', [1])
|
|
225
|
+
return false unless schema_version_validator.valid?(@schema_version)
|
|
226
|
+
return false if @snapshot.nil?
|
|
227
|
+
return false if @provider.nil?
|
|
228
|
+
return false if @service.nil?
|
|
229
|
+
return false if @operation.nil?
|
|
230
|
+
return false if @request.nil?
|
|
231
|
+
return false if @access_methods.nil?
|
|
232
|
+
return false if @evidence.nil?
|
|
233
|
+
true
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
237
|
+
# @param [Object] schema_version Object to be assigned
|
|
238
|
+
def schema_version=(schema_version)
|
|
239
|
+
validator = EnumAttributeValidator.new('Integer', [1])
|
|
240
|
+
unless validator.valid?(schema_version)
|
|
241
|
+
fail ArgumentError, "invalid value for \"schema_version\", must be one of #{validator.allowable_values}."
|
|
242
|
+
end
|
|
243
|
+
@schema_version = schema_version
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] snapshot Value to be assigned
|
|
248
|
+
def snapshot=(snapshot)
|
|
249
|
+
if snapshot.nil?
|
|
250
|
+
fail ArgumentError, 'snapshot cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
@snapshot = snapshot
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Custom attribute writer method with validation
|
|
257
|
+
# @param [Object] provider Value to be assigned
|
|
258
|
+
def provider=(provider)
|
|
259
|
+
if provider.nil?
|
|
260
|
+
fail ArgumentError, 'provider cannot be nil'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@provider = provider
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] service Value to be assigned
|
|
268
|
+
def service=(service)
|
|
269
|
+
if service.nil?
|
|
270
|
+
fail ArgumentError, 'service cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@service = service
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] operation Value to be assigned
|
|
278
|
+
def operation=(operation)
|
|
279
|
+
if operation.nil?
|
|
280
|
+
fail ArgumentError, 'operation cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@operation = operation
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] request Value to be assigned
|
|
288
|
+
def request=(request)
|
|
289
|
+
if request.nil?
|
|
290
|
+
fail ArgumentError, 'request cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@request = request
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Custom attribute writer method with validation
|
|
297
|
+
# @param [Object] access_methods Value to be assigned
|
|
298
|
+
def access_methods=(access_methods)
|
|
299
|
+
if access_methods.nil?
|
|
300
|
+
fail ArgumentError, 'access_methods cannot be nil'
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
@access_methods = access_methods
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Custom attribute writer method with validation
|
|
307
|
+
# @param [Object] evidence Value to be assigned
|
|
308
|
+
def evidence=(evidence)
|
|
309
|
+
if evidence.nil?
|
|
310
|
+
fail ArgumentError, 'evidence cannot be nil'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@evidence = evidence
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Checks equality by comparing each attribute.
|
|
317
|
+
# @param [Object] Object to be compared
|
|
318
|
+
def ==(o)
|
|
319
|
+
return true if self.equal?(o)
|
|
320
|
+
self.class == o.class &&
|
|
321
|
+
schema_version == o.schema_version &&
|
|
322
|
+
snapshot == o.snapshot &&
|
|
323
|
+
provider == o.provider &&
|
|
324
|
+
service == o.service &&
|
|
325
|
+
operation == o.operation &&
|
|
326
|
+
request == o.request &&
|
|
327
|
+
access_methods == o.access_methods &&
|
|
328
|
+
evidence == o.evidence
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# @see the `==` method
|
|
332
|
+
# @param [Object] Object to be compared
|
|
333
|
+
def eql?(o)
|
|
334
|
+
self == o
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Calculates hash code according to all attributes.
|
|
338
|
+
# @return [Integer] Hash code
|
|
339
|
+
def hash
|
|
340
|
+
[schema_version, snapshot, provider, service, operation, request, access_methods, evidence].hash
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Builds the object from hash
|
|
344
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
345
|
+
# @return [Object] Returns the model itself
|
|
346
|
+
def self.build_from_hash(attributes)
|
|
347
|
+
return nil unless attributes.is_a?(Hash)
|
|
348
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
349
|
+
transformed_hash = {}
|
|
350
|
+
openapi_types.each_pair do |key, type|
|
|
351
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
352
|
+
transformed_hash["#{key}"] = nil
|
|
353
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
354
|
+
# check to ensure the input is an array given that the attribute
|
|
355
|
+
# is documented as an array but the input is not
|
|
356
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
357
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
358
|
+
end
|
|
359
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
360
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
new(transformed_hash)
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Returns the object in the form of hash
|
|
367
|
+
# @return [Hash] Returns the object in the form of hash
|
|
368
|
+
def to_hash
|
|
369
|
+
hash = {}
|
|
370
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
371
|
+
value = self.send(attr)
|
|
372
|
+
if value.nil?
|
|
373
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
374
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
hash[param] = _to_hash(value)
|
|
378
|
+
end
|
|
379
|
+
hash
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.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
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.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
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.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
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.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
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -18,7 +18,7 @@ module Weft
|
|
|
18
18
|
class FetchBalanceSnapshot < ApiModelBase
|
|
19
19
|
attr_accessor :promo_usd
|
|
20
20
|
|
|
21
|
-
# Live Base USDC balance.
|
|
21
|
+
# Live Base USDC balance read server-side through Crossmint. Null when Crossmint is unavailable; never treat null as zero.
|
|
22
22
|
attr_accessor :wallet_usdc
|
|
23
23
|
|
|
24
24
|
# Aggregated USD of allowlisted Tempo dollar tokens, exact to the micro-dollar. `null` when UNKNOWN (RPC read failed or no token allowlisted for the paired chain) — never \"0.00\" for an unread component.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -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_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"])
|
|
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", "PAYMENT_AUTHORIZATION_REQUIRED", "WALLET_SETUP_INCOMPLETE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "SETTLEMENT_PENDING", "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_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"])
|
|
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", "PAYMENT_AUTHORIZATION_REQUIRED", "WALLET_SETUP_INCOMPLETE", "MERCHANT_RETURNED_NON_402", "ARTIFACT_TOO_LARGE", "DENYLISTED_RECIPIENT", "WALLET_ENVIRONMENT_MISMATCH", "SETTLEMENT_FAILED", "SETTLEMENT_PENDING", "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
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -29,6 +29,15 @@ module Weft
|
|
|
29
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
|
+
# The `query_trace_id` from the `POST /api/v1/search` response that surfaced this URL. Optional and advisory: it attributes the purchase to the search that found it, and is used only for measurement. It never affects payment, authorization, idempotency, or the response body — the buyer is always resolved from the credential, never from this field. A value that is not a well-formed handle is ignored rather than rejected, so an analytics mistake can never cost a fetch.
|
|
33
|
+
attr_accessor :search_id
|
|
34
|
+
|
|
35
|
+
# Advisory operation id returned by search.
|
|
36
|
+
attr_accessor :operation_id
|
|
37
|
+
|
|
38
|
+
# Advisory access-method id returned by search.
|
|
39
|
+
attr_accessor :access_method_id
|
|
40
|
+
|
|
32
41
|
class EnumAttributeValidator
|
|
33
42
|
attr_reader :datatype
|
|
34
43
|
attr_reader :allowable_values
|
|
@@ -58,7 +67,10 @@ module Weft
|
|
|
58
67
|
:'max_cost_usd' => :'max_cost_usd',
|
|
59
68
|
:'method' => :'method',
|
|
60
69
|
:'body' => :'body',
|
|
61
|
-
:'headers' => :'headers'
|
|
70
|
+
:'headers' => :'headers',
|
|
71
|
+
:'search_id' => :'search_id',
|
|
72
|
+
:'operation_id' => :'operation_id',
|
|
73
|
+
:'access_method_id' => :'access_method_id'
|
|
62
74
|
}
|
|
63
75
|
end
|
|
64
76
|
|
|
@@ -79,7 +91,10 @@ module Weft
|
|
|
79
91
|
:'max_cost_usd' => :'String',
|
|
80
92
|
:'method' => :'String',
|
|
81
93
|
:'body' => :'FetchRequestBody',
|
|
82
|
-
:'headers' => :'Hash<String, String>'
|
|
94
|
+
:'headers' => :'Hash<String, String>',
|
|
95
|
+
:'search_id' => :'String',
|
|
96
|
+
:'operation_id' => :'String',
|
|
97
|
+
:'access_method_id' => :'String'
|
|
83
98
|
}
|
|
84
99
|
end
|
|
85
100
|
|
|
@@ -133,6 +148,18 @@ module Weft
|
|
|
133
148
|
self.headers = value
|
|
134
149
|
end
|
|
135
150
|
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'search_id')
|
|
153
|
+
self.search_id = attributes[:'search_id']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'operation_id')
|
|
157
|
+
self.operation_id = attributes[:'operation_id']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'access_method_id')
|
|
161
|
+
self.access_method_id = attributes[:'access_method_id']
|
|
162
|
+
end
|
|
136
163
|
end
|
|
137
164
|
|
|
138
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -207,7 +234,10 @@ module Weft
|
|
|
207
234
|
max_cost_usd == o.max_cost_usd &&
|
|
208
235
|
method == o.method &&
|
|
209
236
|
body == o.body &&
|
|
210
|
-
headers == o.headers
|
|
237
|
+
headers == o.headers &&
|
|
238
|
+
search_id == o.search_id &&
|
|
239
|
+
operation_id == o.operation_id &&
|
|
240
|
+
access_method_id == o.access_method_id
|
|
211
241
|
end
|
|
212
242
|
|
|
213
243
|
# @see the `==` method
|
|
@@ -219,7 +249,7 @@ module Weft
|
|
|
219
249
|
# Calculates hash code according to all attributes.
|
|
220
250
|
# @return [Integer] Hash code
|
|
221
251
|
def hash
|
|
222
|
-
[url, max_cost_usd, method, body, headers].hash
|
|
252
|
+
[url, max_cost_usd, method, body, headers, search_id, operation_id, access_method_id].hash
|
|
223
253
|
end
|
|
224
254
|
|
|
225
255
|
# Builds the object from hash
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Weft API
|
|
3
3
|
|
|
4
|
-
#The Weft API
|
|
4
|
+
#The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. 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
|
+
The version of the OpenAPI document: 0.14.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|