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,190 @@
|
|
|
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 SearchCuratedService < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'id' => :'id',
|
|
26
|
+
:'name' => :'name'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'id' => :'String',
|
|
44
|
+
:'name' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::SearchCuratedService` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::SearchCuratedService`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'id')
|
|
71
|
+
self.id = attributes[:'id']
|
|
72
|
+
else
|
|
73
|
+
self.id = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'name')
|
|
77
|
+
self.name = attributes[:'name']
|
|
78
|
+
else
|
|
79
|
+
self.name = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @id.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @name.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @id.nil?
|
|
104
|
+
return false if @name.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] id Value to be assigned
|
|
110
|
+
def id=(id)
|
|
111
|
+
if id.nil?
|
|
112
|
+
fail ArgumentError, 'id cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@id = id
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] name Value to be assigned
|
|
120
|
+
def name=(name)
|
|
121
|
+
if name.nil?
|
|
122
|
+
fail ArgumentError, 'name cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@name = name
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
id == o.id &&
|
|
134
|
+
name == o.name
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[id, name].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
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 SearchCuratedSource < ApiModelBase
|
|
18
|
+
attr_accessor :catalog
|
|
19
|
+
|
|
20
|
+
attr_accessor :snapshot_version
|
|
21
|
+
|
|
22
|
+
attr_accessor :captured_at
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'catalog' => :'catalog',
|
|
50
|
+
:'snapshot_version' => :'snapshot_version',
|
|
51
|
+
:'captured_at' => :'captured_at'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'catalog' => :'String',
|
|
69
|
+
:'snapshot_version' => :'Integer',
|
|
70
|
+
:'captured_at' => :'Time'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::SearchCuratedSource` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::SearchCuratedSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'catalog')
|
|
97
|
+
self.catalog = attributes[:'catalog']
|
|
98
|
+
else
|
|
99
|
+
self.catalog = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'snapshot_version')
|
|
103
|
+
self.snapshot_version = attributes[:'snapshot_version']
|
|
104
|
+
else
|
|
105
|
+
self.snapshot_version = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'captured_at')
|
|
109
|
+
self.captured_at = attributes[:'captured_at']
|
|
110
|
+
else
|
|
111
|
+
self.captured_at = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @catalog.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "catalog", catalog cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @snapshot_version.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "snapshot_version", snapshot_version cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @captured_at.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "captured_at", captured_at cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @catalog.nil?
|
|
140
|
+
catalog_validator = EnumAttributeValidator.new('String', ["curated_marketplace"])
|
|
141
|
+
return false unless catalog_validator.valid?(@catalog)
|
|
142
|
+
return false if @snapshot_version.nil?
|
|
143
|
+
return false if @captured_at.nil?
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
148
|
+
# @param [Object] catalog Object to be assigned
|
|
149
|
+
def catalog=(catalog)
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["curated_marketplace"])
|
|
151
|
+
unless validator.valid?(catalog)
|
|
152
|
+
fail ArgumentError, "invalid value for \"catalog\", must be one of #{validator.allowable_values}."
|
|
153
|
+
end
|
|
154
|
+
@catalog = catalog
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] snapshot_version Value to be assigned
|
|
159
|
+
def snapshot_version=(snapshot_version)
|
|
160
|
+
if snapshot_version.nil?
|
|
161
|
+
fail ArgumentError, 'snapshot_version cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@snapshot_version = snapshot_version
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] captured_at Value to be assigned
|
|
169
|
+
def captured_at=(captured_at)
|
|
170
|
+
if captured_at.nil?
|
|
171
|
+
fail ArgumentError, 'captured_at cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@captured_at = captured_at
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
catalog == o.catalog &&
|
|
183
|
+
snapshot_version == o.snapshot_version &&
|
|
184
|
+
captured_at == o.captured_at
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @see the `==` method
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def eql?(o)
|
|
190
|
+
self == o
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Calculates hash code according to all attributes.
|
|
194
|
+
# @return [Integer] Hash code
|
|
195
|
+
def hash
|
|
196
|
+
[catalog, snapshot_version, captured_at].hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Builds the object from hash
|
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
201
|
+
# @return [Object] Returns the model itself
|
|
202
|
+
def self.build_from_hash(attributes)
|
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
|
204
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
205
|
+
transformed_hash = {}
|
|
206
|
+
openapi_types.each_pair do |key, type|
|
|
207
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = nil
|
|
209
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
210
|
+
# check to ensure the input is an array given that the attribute
|
|
211
|
+
# is documented as an array but the input is not
|
|
212
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
213
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
214
|
+
end
|
|
215
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
216
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
new(transformed_hash)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the object in the form of hash
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_hash
|
|
225
|
+
hash = {}
|
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
227
|
+
value = self.send(attr)
|
|
228
|
+
if value.nil?
|
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
hash[param] = _to_hash(value)
|
|
234
|
+
end
|
|
235
|
+
hash
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
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
|
|
@@ -30,6 +30,24 @@ module Weft
|
|
|
30
30
|
# The settlement routes this endpoint's own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of `call`: that block says how to shape the request, this says how to pay for it, so a caller can settle with its OWN x402/mpp SDK instead of guessing. A list because rails are irreducibly plural. Order is the provider's own preference order. Honest-empty when the pipeline observed no challenge.
|
|
31
31
|
attr_accessor :payment
|
|
32
32
|
|
|
33
|
+
attr_accessor :access_methods
|
|
34
|
+
|
|
35
|
+
attr_accessor :service
|
|
36
|
+
|
|
37
|
+
attr_accessor :operation
|
|
38
|
+
|
|
39
|
+
attr_accessor :output_schema
|
|
40
|
+
|
|
41
|
+
attr_accessor :output
|
|
42
|
+
|
|
43
|
+
attr_accessor :execution
|
|
44
|
+
|
|
45
|
+
attr_accessor :callability
|
|
46
|
+
|
|
47
|
+
attr_accessor :compatibility
|
|
48
|
+
|
|
49
|
+
attr_accessor :source
|
|
50
|
+
|
|
33
51
|
# Who you are actually paying. `first_party` = operated by the provider that makes the capability; `reseller` = resold, so the price carries someone else's margin. Null until the platform resolves the operator.
|
|
34
52
|
attr_accessor :operator_type
|
|
35
53
|
|
|
@@ -78,6 +96,15 @@ module Weft
|
|
|
78
96
|
:'call' => :'call',
|
|
79
97
|
:'price' => :'price',
|
|
80
98
|
:'payment' => :'payment',
|
|
99
|
+
:'access_methods' => :'access_methods',
|
|
100
|
+
:'service' => :'service',
|
|
101
|
+
:'operation' => :'operation',
|
|
102
|
+
:'output_schema' => :'output_schema',
|
|
103
|
+
:'output' => :'output',
|
|
104
|
+
:'execution' => :'execution',
|
|
105
|
+
:'callability' => :'callability',
|
|
106
|
+
:'compatibility' => :'compatibility',
|
|
107
|
+
:'source' => :'source',
|
|
81
108
|
:'operator_type' => :'operator_type',
|
|
82
109
|
:'operated_by_id' => :'operated_by_id',
|
|
83
110
|
:'settled_via_facilitator_id' => :'settled_via_facilitator_id',
|
|
@@ -107,6 +134,15 @@ module Weft
|
|
|
107
134
|
:'call' => :'SearchEndpointCall',
|
|
108
135
|
:'price' => :'SearchEndpointPrice',
|
|
109
136
|
:'payment' => :'Array<SearchPaymentOffer>',
|
|
137
|
+
:'access_methods' => :'Array<SearchAccessMethod>',
|
|
138
|
+
:'service' => :'SearchCuratedService',
|
|
139
|
+
:'operation' => :'SearchCuratedOperation',
|
|
140
|
+
:'output_schema' => :'Object',
|
|
141
|
+
:'output' => :'Object',
|
|
142
|
+
:'execution' => :'SearchCuratedExecution',
|
|
143
|
+
:'callability' => :'SearchCuratedCallability',
|
|
144
|
+
:'compatibility' => :'Object',
|
|
145
|
+
:'source' => :'SearchCuratedSource',
|
|
110
146
|
:'operator_type' => :'String',
|
|
111
147
|
:'operated_by_id' => :'String',
|
|
112
148
|
:'settled_via_facilitator_id' => :'String',
|
|
@@ -168,6 +204,44 @@ module Weft
|
|
|
168
204
|
end
|
|
169
205
|
end
|
|
170
206
|
|
|
207
|
+
if attributes.key?(:'access_methods')
|
|
208
|
+
if (value = attributes[:'access_methods']).is_a?(Array)
|
|
209
|
+
self.access_methods = value
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'service')
|
|
214
|
+
self.service = attributes[:'service']
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'operation')
|
|
218
|
+
self.operation = attributes[:'operation']
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if attributes.key?(:'output_schema')
|
|
222
|
+
self.output_schema = attributes[:'output_schema']
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if attributes.key?(:'output')
|
|
226
|
+
self.output = attributes[:'output']
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if attributes.key?(:'execution')
|
|
230
|
+
self.execution = attributes[:'execution']
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if attributes.key?(:'callability')
|
|
234
|
+
self.callability = attributes[:'callability']
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if attributes.key?(:'compatibility')
|
|
238
|
+
self.compatibility = attributes[:'compatibility']
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if attributes.key?(:'source')
|
|
242
|
+
self.source = attributes[:'source']
|
|
243
|
+
end
|
|
244
|
+
|
|
171
245
|
if attributes.key?(:'operator_type')
|
|
172
246
|
self.operator_type = attributes[:'operator_type']
|
|
173
247
|
end
|
|
@@ -232,6 +306,15 @@ module Weft
|
|
|
232
306
|
call == o.call &&
|
|
233
307
|
price == o.price &&
|
|
234
308
|
payment == o.payment &&
|
|
309
|
+
access_methods == o.access_methods &&
|
|
310
|
+
service == o.service &&
|
|
311
|
+
operation == o.operation &&
|
|
312
|
+
output_schema == o.output_schema &&
|
|
313
|
+
output == o.output &&
|
|
314
|
+
execution == o.execution &&
|
|
315
|
+
callability == o.callability &&
|
|
316
|
+
compatibility == o.compatibility &&
|
|
317
|
+
source == o.source &&
|
|
235
318
|
operator_type == o.operator_type &&
|
|
236
319
|
operated_by_id == o.operated_by_id &&
|
|
237
320
|
settled_via_facilitator_id == o.settled_via_facilitator_id &&
|
|
@@ -249,7 +332,7 @@ module Weft
|
|
|
249
332
|
# Calculates hash code according to all attributes.
|
|
250
333
|
# @return [Integer] Hash code
|
|
251
334
|
def hash
|
|
252
|
-
[endpoint_id, url, resource_type, primary_protocol, call, price, payment, operator_type, operated_by_id, settled_via_facilitator_id, settlements, last_verified_at, latency_p50_ms].hash
|
|
335
|
+
[endpoint_id, url, resource_type, primary_protocol, call, price, payment, access_methods, service, operation, output_schema, output, execution, callability, compatibility, source, operator_type, operated_by_id, settled_via_facilitator_id, settlements, last_verified_at, latency_p50_ms].hash
|
|
253
336
|
end
|
|
254
337
|
|
|
255
338
|
# 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
|
|
@@ -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
|