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
data/docs/MessageResponse.md
CHANGED
data/docs/MessageResponseData.md
CHANGED
data/docs/Pagination.md
CHANGED
data/docs/Payment.md
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
| **network** | **String** | CAIP-2 chain identifier | |
|
|
15
15
|
| **resource_url** | **String** | | [optional] |
|
|
16
16
|
| **resource_host** | **String** | | [optional] |
|
|
17
|
-
| **fee_amount** | **Integer** | | [optional] |
|
|
18
17
|
| **settlement_latency_ms** | **Integer** | | [optional] |
|
|
19
18
|
| **settled_at** | **Time** | | |
|
|
20
19
|
| **api_key_name** | **String** | | |
|
|
@@ -35,10 +34,8 @@ instance = Weft::Payment.new(
|
|
|
35
34
|
network: null,
|
|
36
35
|
resource_url: null,
|
|
37
36
|
resource_host: null,
|
|
38
|
-
fee_amount: null,
|
|
39
37
|
settlement_latency_ms: null,
|
|
40
38
|
settled_at: null,
|
|
41
39
|
api_key_name: null
|
|
42
40
|
)
|
|
43
41
|
```
|
|
44
|
-
|
data/docs/PaymentListResponse.md
CHANGED
data/docs/PaymentResponse.md
CHANGED
data/docs/PaymentsApi.md
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::PrincipalWallet
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **address** | **String** | | |
|
|
8
|
+
| **network** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::PrincipalWallet.new(
|
|
16
|
+
address: null,
|
|
17
|
+
network: null
|
|
18
|
+
)
|
|
19
|
+
```
|
data/docs/PromoBalance.md
CHANGED
data/docs/Purchase.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Weft::Purchase
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | |
|
|
8
|
+
| **status** | **String** | | |
|
|
9
|
+
| **amount_usd** | **String** | Exact decimal USD amount with up to six fractional digits. | |
|
|
10
|
+
| **recipient_address** | **String** | | |
|
|
11
|
+
| **network** | **String** | | |
|
|
12
|
+
| **protocol** | **String** | | |
|
|
13
|
+
| **context** | **String** | | |
|
|
14
|
+
| **tx_hash** | **String** | | |
|
|
15
|
+
| **reject_reason** | **String** | | |
|
|
16
|
+
| **failure_reason** | **String** | | |
|
|
17
|
+
| **idempotency_key** | **String** | | |
|
|
18
|
+
| **signed_at** | **Time** | | |
|
|
19
|
+
| **settled_at** | **Time** | | |
|
|
20
|
+
| **artifact** | [**PurchaseArtifact**](PurchaseArtifact.md) | | |
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'weft-sdk'
|
|
26
|
+
|
|
27
|
+
instance = Weft::Purchase.new(
|
|
28
|
+
id: null,
|
|
29
|
+
status: null,
|
|
30
|
+
amount_usd: null,
|
|
31
|
+
recipient_address: null,
|
|
32
|
+
network: null,
|
|
33
|
+
protocol: null,
|
|
34
|
+
context: null,
|
|
35
|
+
tx_hash: null,
|
|
36
|
+
reject_reason: null,
|
|
37
|
+
failure_reason: null,
|
|
38
|
+
idempotency_key: null,
|
|
39
|
+
signed_at: null,
|
|
40
|
+
settled_at: null,
|
|
41
|
+
artifact: null
|
|
42
|
+
)
|
|
43
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Weft::PurchaseArtifact
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | |
|
|
8
|
+
| **merchant_url** | **String** | | |
|
|
9
|
+
| **bytes** | **Integer** | | |
|
|
10
|
+
| **mime** | **String** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'weft-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Weft::PurchaseArtifact.new(
|
|
18
|
+
id: null,
|
|
19
|
+
merchant_url: null,
|
|
20
|
+
bytes: null,
|
|
21
|
+
mime: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::PurchaseListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<Purchase>**](Purchase.md) | | |
|
|
8
|
+
| **pagination** | [**Pagination**](Pagination.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::PurchaseListResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Weft::PurchaseResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Purchase**](Purchase.md) | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'weft-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Weft::PurchaseResponse.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Weft::PurchasesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://weft.network*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_purchase**](PurchasesApi.md#get_purchase) | **GET** /api/v1/purchases/{id} | Get a buyer purchase |
|
|
8
|
+
| [**list_purchases**](PurchasesApi.md#list_purchases) | **GET** /api/v1/purchases | List buyer purchases |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_purchase
|
|
12
|
+
|
|
13
|
+
> <PurchaseResponse> get_purchase(id)
|
|
14
|
+
|
|
15
|
+
Get a buyer purchase
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'time'
|
|
21
|
+
require 'weft-sdk'
|
|
22
|
+
# setup authorization
|
|
23
|
+
Weft.configure do |config|
|
|
24
|
+
# Configure Bearer authorization (APIKey): bearerAuth
|
|
25
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
api_instance = Weft::PurchasesApi.new
|
|
29
|
+
id = 56 # Integer | Purchase ID
|
|
30
|
+
|
|
31
|
+
begin
|
|
32
|
+
# Get a buyer purchase
|
|
33
|
+
result = api_instance.get_purchase(id)
|
|
34
|
+
p result
|
|
35
|
+
rescue Weft::ApiError => e
|
|
36
|
+
puts "Error when calling PurchasesApi->get_purchase: #{e}"
|
|
37
|
+
end
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Using the get_purchase_with_http_info variant
|
|
41
|
+
|
|
42
|
+
This returns an Array which contains the response data, status code and headers.
|
|
43
|
+
|
|
44
|
+
> <Array(<PurchaseResponse>, Integer, Hash)> get_purchase_with_http_info(id)
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
begin
|
|
48
|
+
# Get a buyer purchase
|
|
49
|
+
data, status_code, headers = api_instance.get_purchase_with_http_info(id)
|
|
50
|
+
p status_code # => 2xx
|
|
51
|
+
p headers # => { ... }
|
|
52
|
+
p data # => <PurchaseResponse>
|
|
53
|
+
rescue Weft::ApiError => e
|
|
54
|
+
puts "Error when calling PurchasesApi->get_purchase_with_http_info: #{e}"
|
|
55
|
+
end
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
| ---- | ---- | ----------- | ----- |
|
|
62
|
+
| **id** | **Integer** | Purchase ID | |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**PurchaseResponse**](PurchaseResponse.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: application/json
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## list_purchases
|
|
79
|
+
|
|
80
|
+
> <PurchaseListResponse> list_purchases(opts)
|
|
81
|
+
|
|
82
|
+
List buyer purchases
|
|
83
|
+
|
|
84
|
+
Returns the authenticated buyer's signing and settlement ledger. Unlike `/api/v1/payments`, this endpoint is User-scoped and backed by `signed_events`, so rejected and pending attempts are included. Scoped to the buyer's own merchant spend, matching the dashboard's Purchases page. Internal signings are excluded: the Tempo refill self-transfer (`rebalance`) and operator signings (`manual`) are not payments the buyer made and never appear here.
|
|
85
|
+
|
|
86
|
+
### Examples
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
require 'time'
|
|
90
|
+
require 'weft-sdk'
|
|
91
|
+
# setup authorization
|
|
92
|
+
Weft.configure do |config|
|
|
93
|
+
# Configure Bearer authorization (APIKey): bearerAuth
|
|
94
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
api_instance = Weft::PurchasesApi.new
|
|
98
|
+
opts = {
|
|
99
|
+
page: 56, # Integer | Page number
|
|
100
|
+
per_page: 56 # Integer | Items per page
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
begin
|
|
104
|
+
# List buyer purchases
|
|
105
|
+
result = api_instance.list_purchases(opts)
|
|
106
|
+
p result
|
|
107
|
+
rescue Weft::ApiError => e
|
|
108
|
+
puts "Error when calling PurchasesApi->list_purchases: #{e}"
|
|
109
|
+
end
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Using the list_purchases_with_http_info variant
|
|
113
|
+
|
|
114
|
+
This returns an Array which contains the response data, status code and headers.
|
|
115
|
+
|
|
116
|
+
> <Array(<PurchaseListResponse>, Integer, Hash)> list_purchases_with_http_info(opts)
|
|
117
|
+
|
|
118
|
+
```ruby
|
|
119
|
+
begin
|
|
120
|
+
# List buyer purchases
|
|
121
|
+
data, status_code, headers = api_instance.list_purchases_with_http_info(opts)
|
|
122
|
+
p status_code # => 2xx
|
|
123
|
+
p headers # => { ... }
|
|
124
|
+
p data # => <PurchaseListResponse>
|
|
125
|
+
rescue Weft::ApiError => e
|
|
126
|
+
puts "Error when calling PurchasesApi->list_purchases_with_http_info: #{e}"
|
|
127
|
+
end
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
| Name | Type | Description | Notes |
|
|
133
|
+
| ---- | ---- | ----------- | ----- |
|
|
134
|
+
| **page** | **Integer** | Page number | [optional][default to 1] |
|
|
135
|
+
| **per_page** | **Integer** | Items per page | [optional][default to 25] |
|
|
136
|
+
|
|
137
|
+
### Return type
|
|
138
|
+
|
|
139
|
+
[**PurchaseListResponse**](PurchaseListResponse.md)
|
|
140
|
+
|
|
141
|
+
### Authorization
|
|
142
|
+
|
|
143
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
144
|
+
|
|
145
|
+
### HTTP request headers
|
|
146
|
+
|
|
147
|
+
- **Content-Type**: Not defined
|
|
148
|
+
- **Accept**: application/json
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Weft::ResourceEnrollmentRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **kind** | **String** | Resource kind. Must be one of the supported kinds (currently `agent`); an unknown value is rejected with a 422. | |
|
|
8
|
+
| **name** | **String** | Human-readable name; the server derives the slug from it. | |
|
|
9
|
+
| **description** | **String** | | [optional] |
|
|
10
|
+
| **wallet_address** | **String** | Declared EVM wallet address for the ghost resource. Stored as a claim (unverified) until the resource is claimed. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'weft-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Weft::ResourceEnrollmentRequest.new(
|
|
18
|
+
kind: agent,
|
|
19
|
+
name: Self-Enrolled Bot,
|
|
20
|
+
description: null,
|
|
21
|
+
wallet_address: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Weft::ResourceEnrollmentResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**EnrolledResource**](EnrolledResource.md) | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'weft-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Weft::ResourceEnrollmentResponse.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Weft::ResourceStats
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **total_paid** | **Integer** | Total atomic units paid out by this resource. | |
|
|
8
|
+
| **total_received** | **Integer** | Total atomic units received by this resource. | |
|
|
9
|
+
| **payments_made** | **Integer** | | |
|
|
10
|
+
| **payments_received** | **Integer** | | |
|
|
11
|
+
| **unique_counterparties** | **Integer** | | |
|
|
12
|
+
| **first_seen** | **Time** | | |
|
|
13
|
+
| **last_active** | **Time** | | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'weft-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Weft::ResourceStats.new(
|
|
21
|
+
total_paid: null,
|
|
22
|
+
total_received: null,
|
|
23
|
+
payments_made: null,
|
|
24
|
+
payments_received: null,
|
|
25
|
+
unique_counterparties: null,
|
|
26
|
+
first_seen: null,
|
|
27
|
+
last_active: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Weft::ResourcesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://weft.network*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**enroll_resource**](ResourcesApi.md#enroll_resource) | **POST** /api/v1/resources/enroll | Self-enroll a ghost resource (public, no auth) |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## enroll_resource
|
|
11
|
+
|
|
12
|
+
> <ResourceEnrollmentResponse> enroll_resource(resource_enrollment_request)
|
|
13
|
+
|
|
14
|
+
Self-enroll a ghost resource (public, no auth)
|
|
15
|
+
|
|
16
|
+
Lets an unauthenticated agent (or its operator) self-enroll a Resource as a \"ghost\" (no owning provider). The server generates the `slug` and a single-use `claim_token`; the response also carries a `claim_url` the agent hands to its human controller to claim the resource from the dashboard. Client-supplied `slug` and `category` are silently ignored: slugs are server-generated from `name` (so callers cannot squat on reserved names), and `category` is a post-claim concern set by a real human. Rate-limited to 10 enrollments/hour/IP.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'weft-sdk'
|
|
23
|
+
|
|
24
|
+
api_instance = Weft::ResourcesApi.new
|
|
25
|
+
resource_enrollment_request = Weft::ResourceEnrollmentRequest.new({kind: 'agent', name: 'Self-Enrolled Bot'}) # ResourceEnrollmentRequest |
|
|
26
|
+
|
|
27
|
+
begin
|
|
28
|
+
# Self-enroll a ghost resource (public, no auth)
|
|
29
|
+
result = api_instance.enroll_resource(resource_enrollment_request)
|
|
30
|
+
p result
|
|
31
|
+
rescue Weft::ApiError => e
|
|
32
|
+
puts "Error when calling ResourcesApi->enroll_resource: #{e}"
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Using the enroll_resource_with_http_info variant
|
|
37
|
+
|
|
38
|
+
This returns an Array which contains the response data, status code and headers.
|
|
39
|
+
|
|
40
|
+
> <Array(<ResourceEnrollmentResponse>, Integer, Hash)> enroll_resource_with_http_info(resource_enrollment_request)
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
begin
|
|
44
|
+
# Self-enroll a ghost resource (public, no auth)
|
|
45
|
+
data, status_code, headers = api_instance.enroll_resource_with_http_info(resource_enrollment_request)
|
|
46
|
+
p status_code # => 2xx
|
|
47
|
+
p headers # => { ... }
|
|
48
|
+
p data # => <ResourceEnrollmentResponse>
|
|
49
|
+
rescue Weft::ApiError => e
|
|
50
|
+
puts "Error when calling ResourcesApi->enroll_resource_with_http_info: #{e}"
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
| Name | Type | Description | Notes |
|
|
57
|
+
| ---- | ---- | ----------- | ----- |
|
|
58
|
+
| **resource_enrollment_request** | [**ResourceEnrollmentRequest**](ResourceEnrollmentRequest.md) | | |
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
[**ResourceEnrollmentResponse**](ResourceEnrollmentResponse.md)
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
No authorization required
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: application/json
|
|
71
|
+
- **Accept**: application/json
|
data/docs/SearchApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
|
|
|
13
13
|
|
|
14
14
|
Search the Weft index
|
|
15
15
|
|
|
16
|
-
Semantic search over the Weft index of paid agent resources. The request body
|
|
16
|
+
Semantic search over the Weft index of paid agent resources. The request body is the weft-search-platform `/v1/search` contract: a free-text `query`, optional `max_results`, and optional structured `filters` (price / price_atomic / type / protocol — the canonical FilterSpec v1 vocabulary, vendored verbatim from the platform). Price is a dual representation of one constraint: `price` in USD decimal strings (the reasoning form) XOR `price_atomic` in integer micro-USD (the settlement form) — mutually exclusive, set at most one. Backend selection is server-side via the `SEARCH_BACKEND` env var: `mock` (default, reads YAML fixtures and sets `_mock: true` in the response) or `platform` (proxies to the upstream search service). Both backends return the platform `SearchResponse` envelope. Account-scoped: the bearer token must be a buyer-scoped API key. Free for authenticated buyers in v1; billing is planned for a later release. Response negotiation: `Accept: application/json` (default) returns the structured envelope; `Accept: text/markdown` returns a rendered Markdown digest of the same results — useful for piping into a chat UI or LLM prompt.
|
|
17
17
|
|
|
18
18
|
### Examples
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ Weft.configure do |config|
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
api_instance = Weft::SearchApi.new
|
|
30
|
-
search_request = Weft::SearchRequest.new({query: 'send email from an agent'}) # SearchRequest |
|
|
30
|
+
search_request = Weft::SearchRequest.new({query: 'send email from an agent'}) # SearchRequest |
|
|
31
31
|
|
|
32
32
|
begin
|
|
33
33
|
# Search the Weft index
|
|
@@ -74,4 +74,3 @@ end
|
|
|
74
74
|
|
|
75
75
|
- **Content-Type**: application/json
|
|
76
76
|
- **Accept**: application/json, text/markdown
|
|
77
|
-
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Weft::SearchCapabilityRef
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **capability_id** | **String** | | [optional] |
|
|
8
|
+
| **capability_type** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'weft-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Weft::SearchCapabilityRef.new(
|
|
16
|
+
capability_id: null,
|
|
17
|
+
capability_type: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Weft::SearchEndpointCall
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **method** | **String** | The HTTP verb to send. Empty string when neither the index nor the provider's own 402 challenge / OpenAPI spec declares one. | [optional] |
|
|
8
|
+
| **input_schema** | **Object** | The provider's OWN structured declaration of the arguments this endpoint takes — the machine-usable form of what `usage_instructions` states in prose. Null when the provider declares nothing. | [optional] |
|
|
9
|
+
| **example_request** | **Object** | A worked set of arguments grouped by slot (`query` / `body` / `path`). Every value is one the PROVIDER published; never synthesized. | [optional] |
|
|
10
|
+
| **example_response** | **Object** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'weft-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Weft::SearchEndpointCall.new(
|
|
18
|
+
method: null,
|
|
19
|
+
input_schema: null,
|
|
20
|
+
example_request: null,
|
|
21
|
+
example_response: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Weft::SearchEndpointHit
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **endpoint_id** | **String** | | [optional] |
|
|
8
|
+
| **url** | **String** | | [optional] |
|
|
9
|
+
| **resource_type** | **String** | | [optional] |
|
|
10
|
+
| **primary_protocol** | **String** | | [optional] |
|
|
11
|
+
| **call** | [**SearchEndpointCall**](SearchEndpointCall.md) | | [optional] |
|
|
12
|
+
| **price** | [**SearchEndpointPrice**](SearchEndpointPrice.md) | | [optional] |
|
|
13
|
+
| **payment** | [**Array<SearchPaymentOffer>**](SearchPaymentOffer.md) | 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. | [optional] |
|
|
14
|
+
| **operator_type** | **String** | 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. | [optional] |
|
|
15
|
+
| **operated_by_id** | **String** | | [optional] |
|
|
16
|
+
| **settled_via_facilitator_id** | **String** | | [optional] |
|
|
17
|
+
| **settlements** | **Integer** | Count of payments observed settling against this endpoint by ANYONE (chain-indexed), not just by Weft — the reliability signal a caller can act on. Null when unknown. | [optional] |
|
|
18
|
+
| **last_verified_at** | **Time** | When Weft last CONFIRMED this endpoint answers — the most recent conclusive probe. Null when never probed, or when the latest probe errored: an endpoint we last failed to reach has no current verification. | [optional] |
|
|
19
|
+
| **latency_p50_ms** | **Integer** | Median time-to-first-byte in ms across the endpoint's probe call set. First-byte latency, not full-response time. Null when unmeasured (never 0). | [optional] |
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'weft-sdk'
|
|
25
|
+
|
|
26
|
+
instance = Weft::SearchEndpointHit.new(
|
|
27
|
+
endpoint_id: null,
|
|
28
|
+
url: null,
|
|
29
|
+
resource_type: null,
|
|
30
|
+
primary_protocol: null,
|
|
31
|
+
call: null,
|
|
32
|
+
price: null,
|
|
33
|
+
payment: null,
|
|
34
|
+
operator_type: null,
|
|
35
|
+
operated_by_id: null,
|
|
36
|
+
settled_via_facilitator_id: null,
|
|
37
|
+
settlements: null,
|
|
38
|
+
last_verified_at: null,
|
|
39
|
+
latency_p50_ms: null
|
|
40
|
+
)
|
|
41
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Weft::SearchEndpointPrice
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **indexed_usd** | **String** | The indexed price in USD as a decimal string (e.g. \"0.008\") — the dollar value people and agents reason in. A decimal string, never a float; trailing zeros trimmed. Null when unpriced. | [optional] |
|
|
8
|
+
| **atomic** | **Integer** | The same price in integer micro-USD — the settlement grain, exact. Null exactly when `indexed_usd` is. Use this for settlement. | [optional] |
|
|
9
|
+
| **source** | **String** | Where the amount came from. `probe` = observed live in the endpoint's own 402 payment-required challenge — an observation, the strongest evidence we hold. `inferred` = derived from a spec (OpenAPI) or a resale edge by the extraction pipeline, so it can lag a provider's re-pricing. Null when the endpoint carries no price. | [optional] |
|
|
10
|
+
| **last_observed_at** | **Time** | When the amount was observed. Null when unrecorded. | [optional] |
|
|
11
|
+
| **live_verified** | **Boolean** | Whether this amount was confirmed against a live 402 challenge for THIS response. Search does not issue a payment-required probe at query time, so this is `false` today — treat an unflagged price as indexed, not verified. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'weft-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Weft::SearchEndpointPrice.new(
|
|
19
|
+
indexed_usd: null,
|
|
20
|
+
atomic: null,
|
|
21
|
+
source: null,
|
|
22
|
+
last_observed_at: null,
|
|
23
|
+
live_verified: null
|
|
24
|
+
)
|
|
25
|
+
```
|
data/docs/SearchErrorResponse.md
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Weft::SearchFilterSpec
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **price** | [**SearchPriceUsdFilter**](SearchPriceUsdFilter.md) | | [optional] |
|
|
8
|
+
| **price_atomic** | [**SearchPriceAtomicFilter**](SearchPriceAtomicFilter.md) | | [optional] |
|
|
9
|
+
| **type** | [**SearchResourceTypeFilter**](SearchResourceTypeFilter.md) | | [optional] |
|
|
10
|
+
| **protocol** | [**SearchProtocolFilter**](SearchProtocolFilter.md) | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'weft-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Weft::SearchFilterSpec.new(
|
|
18
|
+
price: null,
|
|
19
|
+
price_atomic: null,
|
|
20
|
+
type: null,
|
|
21
|
+
protocol: null
|
|
22
|
+
)
|
|
23
|
+
```
|