weft-sdk 0.6.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/APIKeysApi.md +1 -2
- data/docs/AccountApi.md +6 -5
- data/docs/AccountDetails.md +10 -13
- data/docs/ApiKey.md +0 -1
- data/docs/ApiKeyCreated.md +0 -1
- data/docs/ApiKeyCreatedResponse.md +0 -1
- data/docs/ApiKeyListResponse.md +0 -1
- data/docs/AuthApi.md +6 -7
- data/docs/AuthResponse.md +0 -1
- data/docs/AuthResponseData.md +0 -1
- data/docs/BalanceApi.md +1 -2
- data/docs/BalanceResponse.md +3 -4
- data/docs/ConfirmRequest.md +0 -1
- data/docs/CreateApiKeyRequest.md +0 -1
- data/docs/DefaultApi.md +0 -1
- data/docs/EnrolledResource.md +43 -0
- data/docs/Error.md +0 -1
- data/docs/ErrorResponse.md +0 -1
- data/docs/Fetch403Response.md +48 -0
- data/docs/FetchApi.md +10 -7
- data/docs/FetchBalanceSnapshot.md +5 -2
- data/docs/FetchErrorResponse.md +0 -1
- data/docs/FetchRequest.md +0 -1
- data/docs/FetchRequestBody.md +0 -1
- data/docs/FetchResponse.md +6 -3
- data/docs/InsufficientScopeResponse.md +21 -0
- data/docs/MeApiKey.md +25 -0
- data/docs/MeApiKeyCreator.md +21 -0
- data/docs/MeResponse.md +1 -2
- data/docs/MeResponseData.md +78 -0
- data/docs/Merchant.md +0 -1
- data/docs/MessageResponse.md +0 -1
- data/docs/MessageResponseData.md +0 -1
- data/docs/Pagination.md +0 -1
- data/docs/PasswordResetRequest.md +0 -1
- data/docs/PasswordUpdateRequest.md +0 -1
- data/docs/Payment.md +0 -3
- data/docs/PaymentListResponse.md +0 -1
- data/docs/PaymentResponse.md +0 -1
- data/docs/PaymentsApi.md +0 -1
- data/docs/PrincipalWallet.md +19 -0
- data/docs/PromoBalance.md +0 -1
- data/docs/Purchase.md +43 -0
- data/docs/PurchaseArtifact.md +23 -0
- data/docs/PurchaseListResponse.md +19 -0
- data/docs/PurchaseResponse.md +17 -0
- data/docs/PurchasesApi.md +148 -0
- data/docs/ResendConfirmationRequest.md +0 -1
- data/docs/ResourceEnrollmentRequest.md +23 -0
- data/docs/ResourceEnrollmentResponse.md +17 -0
- data/docs/ResourceStats.md +29 -0
- data/docs/ResourcesApi.md +71 -0
- data/docs/SearchApi.md +2 -3
- data/docs/SearchCapabilityRef.md +19 -0
- data/docs/SearchEndpointCall.md +23 -0
- data/docs/SearchEndpointHit.md +41 -0
- data/docs/SearchEndpointPrice.md +25 -0
- data/docs/SearchErrorResponse.md +0 -1
- data/docs/SearchFilterSpec.md +23 -0
- data/docs/SearchPaymentOffer.md +31 -0
- data/docs/SearchPriceAtomicFilter.md +25 -0
- data/docs/SearchPriceUsdFilter.md +25 -0
- data/docs/SearchProtocolFilter.md +19 -0
- data/docs/SearchProviderRef.md +21 -0
- data/docs/SearchRequest.md +3 -4
- data/docs/SearchResourceTypeFilter.md +19 -0
- data/docs/SearchResponse.md +35 -8
- data/docs/SearchResponseWarningsInner.md +23 -0
- data/docs/SearchResult.md +8 -21
- data/docs/SignInRequest.md +0 -1
- data/docs/SignUpRequest.md +0 -1
- data/docs/SpendingPolicy.md +0 -1
- data/docs/User.md +0 -1
- data/docs/UserPrincipal.md +33 -0
- data/docs/Wallet.md +5 -2
- data/lib/weft/generated/api/account_api.rb +6 -4
- data/lib/weft/generated/api/api_keys_api.rb +4 -4
- data/lib/weft/generated/api/auth_api.rb +14 -14
- 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 +22 -6
- data/lib/weft/generated/api/payments_api.rb +2 -2
- data/lib/weft/generated/api/purchases_api.rb +150 -0
- data/lib/weft/generated/api/resources_api.rb +90 -0
- data/lib/weft/generated/api/search_api.rb +6 -6
- 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 +2 -2
- data/lib/weft/generated/models/account_details.rb +94 -85
- 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 +5 -5
- 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/enrolled_resource.rb +474 -0
- data/lib/weft/generated/models/error.rb +3 -3
- data/lib/weft/generated/models/error_response.rb +3 -3
- data/lib/weft/generated/models/fetch403_response.rb +104 -0
- data/lib/weft/generated/models/fetch_balance_snapshot.rb +59 -4
- data/lib/weft/generated/models/fetch_error_response.rb +5 -5
- data/lib/weft/generated/models/fetch_request.rb +5 -5
- data/lib/weft/generated/models/fetch_request_body.rb +2 -2
- data/lib/weft/generated/models/fetch_response.rb +85 -7
- data/lib/weft/generated/models/insufficient_scope_response.rb +242 -0
- data/lib/weft/generated/models/{search_skill.rb → me_api_key.rb} +50 -92
- data/lib/weft/generated/models/me_api_key_creator.rb +200 -0
- data/lib/weft/generated/models/me_response.rb +3 -3
- data/lib/weft/generated/models/me_response_data.rb +55 -0
- 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 +3 -12
- 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 +190 -0
- data/lib/weft/generated/models/promo_balance.rb +3 -3
- data/lib/weft/generated/models/purchase.rb +427 -0
- data/lib/weft/generated/models/purchase_artifact.rb +237 -0
- data/lib/weft/generated/models/purchase_list_response.rb +192 -0
- data/lib/weft/generated/models/purchase_response.rb +164 -0
- data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
- data/lib/weft/generated/models/{search_agent_card.rb → resource_enrollment_request.rb} +59 -75
- data/lib/weft/generated/models/resource_enrollment_response.rb +164 -0
- data/lib/weft/generated/models/resource_stats.rb +323 -0
- data/lib/weft/generated/models/{search_skill_endpoint.rb → search_capability_ref.rb} +18 -19
- data/lib/weft/generated/models/search_endpoint_call.rb +179 -0
- data/lib/weft/generated/models/search_endpoint_hit.rb +296 -0
- data/lib/weft/generated/models/search_endpoint_price.rb +223 -0
- data/lib/weft/generated/models/search_error_response.rb +5 -5
- data/lib/weft/generated/models/search_filter_spec.rb +175 -0
- data/lib/weft/generated/models/{search_pricing.rb → search_payment_offer.rb} +64 -67
- data/lib/weft/generated/models/search_price_atomic_filter.rb +284 -0
- data/lib/weft/generated/models/search_price_usd_filter.rb +294 -0
- data/lib/weft/generated/models/search_protocol_filter.rb +200 -0
- data/lib/weft/generated/models/{search_endpoints.rb → search_provider_ref.rb} +26 -36
- data/lib/weft/generated/models/search_request.rb +36 -27
- data/lib/weft/generated/models/search_resource_type_filter.rb +200 -0
- data/lib/weft/generated/models/search_response.rb +366 -30
- data/lib/weft/generated/models/search_response_warnings_inner.rb +210 -0
- data/lib/weft/generated/models/search_result.rb +68 -220
- 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 +370 -0
- data/lib/weft/generated/models/wallet.rb +58 -4
- data/lib/weft/generated/version.rb +3 -3
- data/lib/weft/generated.rb +10 -4
- data/lib/weft/sdk.rb +1 -1
- metadata +75 -17
- data/docs/SearchAgentCard.md +0 -34
- data/docs/SearchEndpoints.md +0 -24
- data/docs/SearchFilters.md +0 -26
- data/docs/SearchPricing.md +0 -24
- data/docs/SearchRanking.md +0 -26
- data/docs/SearchSkill.md +0 -36
- data/docs/SearchSkillEndpoint.md +0 -20
- data/lib/weft/generated/models/search_filters.rb +0 -277
- data/lib/weft/generated/models/search_ranking.rb +0 -277
|
@@ -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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -14,20 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Weft
|
|
17
|
+
# The Organization that owns the authenticated API key — the principal in API v1 (the key represents an Org, not a person). `api_key` carries audit info about the key itself, including the user who minted it (`created_by`, which may be `null` if that user has left the Org).
|
|
17
18
|
class AccountDetails < ApiModelBase
|
|
18
|
-
attr_accessor :
|
|
19
|
-
|
|
20
|
-
attr_accessor :email
|
|
19
|
+
attr_accessor :principal_type
|
|
21
20
|
|
|
22
|
-
attr_accessor :
|
|
21
|
+
attr_accessor :id
|
|
23
22
|
|
|
24
|
-
attr_accessor :
|
|
23
|
+
attr_accessor :name
|
|
25
24
|
|
|
26
|
-
attr_accessor :
|
|
25
|
+
attr_accessor :slug
|
|
27
26
|
|
|
28
|
-
attr_accessor :
|
|
27
|
+
attr_accessor :kind
|
|
29
28
|
|
|
30
|
-
attr_accessor :
|
|
29
|
+
attr_accessor :api_key
|
|
31
30
|
|
|
32
31
|
class EnumAttributeValidator
|
|
33
32
|
attr_reader :datatype
|
|
@@ -54,13 +53,12 @@ module Weft
|
|
|
54
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
54
|
def self.attribute_map
|
|
56
55
|
{
|
|
56
|
+
:'principal_type' => :'principal_type',
|
|
57
57
|
:'id' => :'id',
|
|
58
|
-
:'
|
|
59
|
-
:'
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
62
|
-
:'public_slug' => :'public_slug',
|
|
63
|
-
:'created_at' => :'created_at'
|
|
58
|
+
:'name' => :'name',
|
|
59
|
+
:'slug' => :'slug',
|
|
60
|
+
:'kind' => :'kind',
|
|
61
|
+
:'api_key' => :'api_key'
|
|
64
62
|
}
|
|
65
63
|
end
|
|
66
64
|
|
|
@@ -77,13 +75,12 @@ module Weft
|
|
|
77
75
|
# Attribute type mapping.
|
|
78
76
|
def self.openapi_types
|
|
79
77
|
{
|
|
78
|
+
:'principal_type' => :'String',
|
|
80
79
|
:'id' => :'Integer',
|
|
81
|
-
:'
|
|
82
|
-
:'
|
|
83
|
-
:'
|
|
84
|
-
:'
|
|
85
|
-
:'public_slug' => :'String',
|
|
86
|
-
:'created_at' => :'Time'
|
|
80
|
+
:'name' => :'String',
|
|
81
|
+
:'slug' => :'String',
|
|
82
|
+
:'kind' => :'String',
|
|
83
|
+
:'api_key' => :'MeApiKey'
|
|
87
84
|
}
|
|
88
85
|
end
|
|
89
86
|
|
|
@@ -109,42 +106,40 @@ module Weft
|
|
|
109
106
|
h[k.to_sym] = v
|
|
110
107
|
}
|
|
111
108
|
|
|
109
|
+
if attributes.key?(:'principal_type')
|
|
110
|
+
self.principal_type = attributes[:'principal_type']
|
|
111
|
+
else
|
|
112
|
+
self.principal_type = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
112
115
|
if attributes.key?(:'id')
|
|
113
116
|
self.id = attributes[:'id']
|
|
114
117
|
else
|
|
115
118
|
self.id = nil
|
|
116
119
|
end
|
|
117
120
|
|
|
118
|
-
if attributes.key?(:'
|
|
119
|
-
self.
|
|
121
|
+
if attributes.key?(:'name')
|
|
122
|
+
self.name = attributes[:'name']
|
|
120
123
|
else
|
|
121
|
-
self.
|
|
124
|
+
self.name = nil
|
|
122
125
|
end
|
|
123
126
|
|
|
124
|
-
if attributes.key?(:'
|
|
125
|
-
self.
|
|
127
|
+
if attributes.key?(:'slug')
|
|
128
|
+
self.slug = attributes[:'slug']
|
|
126
129
|
else
|
|
127
|
-
self.
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
if attributes.key?(:'display_name')
|
|
131
|
-
self.display_name = attributes[:'display_name']
|
|
130
|
+
self.slug = nil
|
|
132
131
|
end
|
|
133
132
|
|
|
134
|
-
if attributes.key?(:'
|
|
135
|
-
self.
|
|
133
|
+
if attributes.key?(:'kind')
|
|
134
|
+
self.kind = attributes[:'kind']
|
|
136
135
|
else
|
|
137
|
-
self.
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
if attributes.key?(:'public_slug')
|
|
141
|
-
self.public_slug = attributes[:'public_slug']
|
|
136
|
+
self.kind = nil
|
|
142
137
|
end
|
|
143
138
|
|
|
144
|
-
if attributes.key?(:'
|
|
145
|
-
self.
|
|
139
|
+
if attributes.key?(:'api_key')
|
|
140
|
+
self.api_key = attributes[:'api_key']
|
|
146
141
|
else
|
|
147
|
-
self.
|
|
142
|
+
self.api_key = nil
|
|
148
143
|
end
|
|
149
144
|
end
|
|
150
145
|
|
|
@@ -153,24 +148,28 @@ module Weft
|
|
|
153
148
|
def list_invalid_properties
|
|
154
149
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
155
150
|
invalid_properties = Array.new
|
|
151
|
+
if @principal_type.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "principal_type", principal_type cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
156
155
|
if @id.nil?
|
|
157
156
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
158
157
|
end
|
|
159
158
|
|
|
160
|
-
if @
|
|
161
|
-
invalid_properties.push('invalid value for "
|
|
159
|
+
if @name.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
162
161
|
end
|
|
163
162
|
|
|
164
|
-
if @
|
|
165
|
-
invalid_properties.push('invalid value for "
|
|
163
|
+
if @slug.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "slug", slug cannot be nil.')
|
|
166
165
|
end
|
|
167
166
|
|
|
168
|
-
if @
|
|
169
|
-
invalid_properties.push('invalid value for "
|
|
167
|
+
if @kind.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "kind", kind cannot be nil.')
|
|
170
169
|
end
|
|
171
170
|
|
|
172
|
-
if @
|
|
173
|
-
invalid_properties.push('invalid value for "
|
|
171
|
+
if @api_key.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
|
174
173
|
end
|
|
175
174
|
|
|
176
175
|
invalid_properties
|
|
@@ -180,16 +179,27 @@ module Weft
|
|
|
180
179
|
# @return true if the model is valid
|
|
181
180
|
def valid?
|
|
182
181
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
182
|
+
return false if @principal_type.nil?
|
|
183
|
+
principal_type_validator = EnumAttributeValidator.new('String', ["organization"])
|
|
184
|
+
return false unless principal_type_validator.valid?(@principal_type)
|
|
183
185
|
return false if @id.nil?
|
|
184
|
-
return false if @
|
|
185
|
-
return false if @
|
|
186
|
-
|
|
187
|
-
return false
|
|
188
|
-
return false if @public_profile.nil?
|
|
189
|
-
return false if @created_at.nil?
|
|
186
|
+
return false if @name.nil?
|
|
187
|
+
return false if @slug.nil?
|
|
188
|
+
return false if @kind.nil?
|
|
189
|
+
return false if @api_key.nil?
|
|
190
190
|
true
|
|
191
191
|
end
|
|
192
192
|
|
|
193
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
194
|
+
# @param [Object] principal_type Object to be assigned
|
|
195
|
+
def principal_type=(principal_type)
|
|
196
|
+
validator = EnumAttributeValidator.new('String', ["organization"])
|
|
197
|
+
unless validator.valid?(principal_type)
|
|
198
|
+
fail ArgumentError, "invalid value for \"principal_type\", must be one of #{validator.allowable_values}."
|
|
199
|
+
end
|
|
200
|
+
@principal_type = principal_type
|
|
201
|
+
end
|
|
202
|
+
|
|
193
203
|
# Custom attribute writer method with validation
|
|
194
204
|
# @param [Object] id Value to be assigned
|
|
195
205
|
def id=(id)
|
|
@@ -201,43 +211,43 @@ module Weft
|
|
|
201
211
|
end
|
|
202
212
|
|
|
203
213
|
# Custom attribute writer method with validation
|
|
204
|
-
# @param [Object]
|
|
205
|
-
def
|
|
206
|
-
if
|
|
207
|
-
fail ArgumentError, '
|
|
214
|
+
# @param [Object] name Value to be assigned
|
|
215
|
+
def name=(name)
|
|
216
|
+
if name.nil?
|
|
217
|
+
fail ArgumentError, 'name cannot be nil'
|
|
208
218
|
end
|
|
209
219
|
|
|
210
|
-
@
|
|
220
|
+
@name = name
|
|
211
221
|
end
|
|
212
222
|
|
|
213
|
-
# Custom attribute writer method
|
|
214
|
-
# @param [Object]
|
|
215
|
-
def
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] slug Value to be assigned
|
|
225
|
+
def slug=(slug)
|
|
226
|
+
if slug.nil?
|
|
227
|
+
fail ArgumentError, 'slug cannot be nil'
|
|
219
228
|
end
|
|
220
|
-
|
|
229
|
+
|
|
230
|
+
@slug = slug
|
|
221
231
|
end
|
|
222
232
|
|
|
223
233
|
# Custom attribute writer method with validation
|
|
224
|
-
# @param [Object]
|
|
225
|
-
def
|
|
226
|
-
if
|
|
227
|
-
fail ArgumentError, '
|
|
234
|
+
# @param [Object] kind Value to be assigned
|
|
235
|
+
def kind=(kind)
|
|
236
|
+
if kind.nil?
|
|
237
|
+
fail ArgumentError, 'kind cannot be nil'
|
|
228
238
|
end
|
|
229
239
|
|
|
230
|
-
@
|
|
240
|
+
@kind = kind
|
|
231
241
|
end
|
|
232
242
|
|
|
233
243
|
# Custom attribute writer method with validation
|
|
234
|
-
# @param [Object]
|
|
235
|
-
def
|
|
236
|
-
if
|
|
237
|
-
fail ArgumentError, '
|
|
244
|
+
# @param [Object] api_key Value to be assigned
|
|
245
|
+
def api_key=(api_key)
|
|
246
|
+
if api_key.nil?
|
|
247
|
+
fail ArgumentError, 'api_key cannot be nil'
|
|
238
248
|
end
|
|
239
249
|
|
|
240
|
-
@
|
|
250
|
+
@api_key = api_key
|
|
241
251
|
end
|
|
242
252
|
|
|
243
253
|
# Checks equality by comparing each attribute.
|
|
@@ -245,13 +255,12 @@ module Weft
|
|
|
245
255
|
def ==(o)
|
|
246
256
|
return true if self.equal?(o)
|
|
247
257
|
self.class == o.class &&
|
|
258
|
+
principal_type == o.principal_type &&
|
|
248
259
|
id == o.id &&
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
public_slug == o.public_slug &&
|
|
254
|
-
created_at == o.created_at
|
|
260
|
+
name == o.name &&
|
|
261
|
+
slug == o.slug &&
|
|
262
|
+
kind == o.kind &&
|
|
263
|
+
api_key == o.api_key
|
|
255
264
|
end
|
|
256
265
|
|
|
257
266
|
# @see the `==` method
|
|
@@ -263,7 +272,7 @@ module Weft
|
|
|
263
272
|
# Calculates hash code according to all attributes.
|
|
264
273
|
# @return [Integer] Hash code
|
|
265
274
|
def hash
|
|
266
|
-
[
|
|
275
|
+
[principal_type, id, name, slug, kind, api_key].hash
|
|
267
276
|
end
|
|
268
277
|
|
|
269
278
|
# 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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|
|
@@ -14,16 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Weft
|
|
17
|
-
# Buyer's wallet snapshot. Note: unlike `/me` / `/payments` / `/api_keys`, this endpoint does NOT use a `data:` envelope — the response object is the snapshot directly.
|
|
17
|
+
# Buyer's wallet snapshot. Note: unlike `/me` / `/payments` / `/api_keys`, this endpoint does NOT use a `data:` envelope — the response object is the snapshot directly.
|
|
18
18
|
class BalanceResponse < ApiModelBase
|
|
19
19
|
attr_accessor :promo
|
|
20
20
|
|
|
21
21
|
attr_accessor :wallet
|
|
22
22
|
|
|
23
|
-
# USD spent in the current calendar day (UTC),
|
|
23
|
+
# USD spent in the current calendar day (UTC). Exact to the micro-dollar so sub-cent micro-payments survive (\"0.0005\", \"0.42\"), never narrower than two decimals; a zero total renders as \"0.00\".
|
|
24
24
|
attr_accessor :spent_today_usd
|
|
25
25
|
|
|
26
|
-
# USD spent in the current calendar week (UTC, Monday start),
|
|
26
|
+
# USD spent in the current calendar week (UTC, Monday start). Exact to the micro-dollar (\"0.0005\", \"3.10\"), never narrower than two decimals; a zero total renders as \"0.00\".
|
|
27
27
|
attr_accessor :spent_week_usd
|
|
28
28
|
|
|
29
29
|
attr_accessor :policy
|
|
@@ -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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
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/
|
|
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.
|
|
6
|
+
The version of the OpenAPI document: 0.9.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.19.0
|