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.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +1 -2
  3. data/docs/AccountApi.md +6 -5
  4. data/docs/AccountDetails.md +10 -13
  5. data/docs/ApiKey.md +0 -1
  6. data/docs/ApiKeyCreated.md +0 -1
  7. data/docs/ApiKeyCreatedResponse.md +0 -1
  8. data/docs/ApiKeyListResponse.md +0 -1
  9. data/docs/AuthApi.md +6 -7
  10. data/docs/AuthResponse.md +0 -1
  11. data/docs/AuthResponseData.md +0 -1
  12. data/docs/BalanceApi.md +1 -2
  13. data/docs/BalanceResponse.md +3 -4
  14. data/docs/ConfirmRequest.md +0 -1
  15. data/docs/CreateApiKeyRequest.md +0 -1
  16. data/docs/DefaultApi.md +0 -1
  17. data/docs/EnrolledResource.md +43 -0
  18. data/docs/Error.md +0 -1
  19. data/docs/ErrorResponse.md +0 -1
  20. data/docs/Fetch403Response.md +48 -0
  21. data/docs/FetchApi.md +10 -7
  22. data/docs/FetchBalanceSnapshot.md +5 -2
  23. data/docs/FetchErrorResponse.md +0 -1
  24. data/docs/FetchRequest.md +0 -1
  25. data/docs/FetchRequestBody.md +0 -1
  26. data/docs/FetchResponse.md +6 -3
  27. data/docs/InsufficientScopeResponse.md +21 -0
  28. data/docs/MeApiKey.md +25 -0
  29. data/docs/MeApiKeyCreator.md +21 -0
  30. data/docs/MeResponse.md +1 -2
  31. data/docs/MeResponseData.md +78 -0
  32. data/docs/Merchant.md +0 -1
  33. data/docs/MessageResponse.md +0 -1
  34. data/docs/MessageResponseData.md +0 -1
  35. data/docs/Pagination.md +0 -1
  36. data/docs/PasswordResetRequest.md +0 -1
  37. data/docs/PasswordUpdateRequest.md +0 -1
  38. data/docs/Payment.md +0 -3
  39. data/docs/PaymentListResponse.md +0 -1
  40. data/docs/PaymentResponse.md +0 -1
  41. data/docs/PaymentsApi.md +0 -1
  42. data/docs/PrincipalWallet.md +19 -0
  43. data/docs/PromoBalance.md +0 -1
  44. data/docs/Purchase.md +43 -0
  45. data/docs/PurchaseArtifact.md +23 -0
  46. data/docs/PurchaseListResponse.md +19 -0
  47. data/docs/PurchaseResponse.md +17 -0
  48. data/docs/PurchasesApi.md +148 -0
  49. data/docs/ResendConfirmationRequest.md +0 -1
  50. data/docs/ResourceEnrollmentRequest.md +23 -0
  51. data/docs/ResourceEnrollmentResponse.md +17 -0
  52. data/docs/ResourceStats.md +29 -0
  53. data/docs/ResourcesApi.md +71 -0
  54. data/docs/SearchApi.md +2 -3
  55. data/docs/SearchCapabilityRef.md +19 -0
  56. data/docs/SearchEndpointCall.md +23 -0
  57. data/docs/SearchEndpointHit.md +41 -0
  58. data/docs/SearchEndpointPrice.md +25 -0
  59. data/docs/SearchErrorResponse.md +0 -1
  60. data/docs/SearchFilterSpec.md +23 -0
  61. data/docs/SearchPaymentOffer.md +31 -0
  62. data/docs/SearchPriceAtomicFilter.md +25 -0
  63. data/docs/SearchPriceUsdFilter.md +25 -0
  64. data/docs/SearchProtocolFilter.md +19 -0
  65. data/docs/SearchProviderRef.md +21 -0
  66. data/docs/SearchRequest.md +3 -4
  67. data/docs/SearchResourceTypeFilter.md +19 -0
  68. data/docs/SearchResponse.md +35 -8
  69. data/docs/SearchResponseWarningsInner.md +23 -0
  70. data/docs/SearchResult.md +8 -21
  71. data/docs/SignInRequest.md +0 -1
  72. data/docs/SignUpRequest.md +0 -1
  73. data/docs/SpendingPolicy.md +0 -1
  74. data/docs/User.md +0 -1
  75. data/docs/UserPrincipal.md +33 -0
  76. data/docs/Wallet.md +5 -2
  77. data/lib/weft/generated/api/account_api.rb +6 -4
  78. data/lib/weft/generated/api/api_keys_api.rb +4 -4
  79. data/lib/weft/generated/api/auth_api.rb +14 -14
  80. data/lib/weft/generated/api/balance_api.rb +4 -4
  81. data/lib/weft/generated/api/default_api.rb +2 -2
  82. data/lib/weft/generated/api/fetch_api.rb +22 -6
  83. data/lib/weft/generated/api/payments_api.rb +2 -2
  84. data/lib/weft/generated/api/purchases_api.rb +150 -0
  85. data/lib/weft/generated/api/resources_api.rb +90 -0
  86. data/lib/weft/generated/api/search_api.rb +6 -6
  87. data/lib/weft/generated/api_client.rb +2 -2
  88. data/lib/weft/generated/api_error.rb +2 -2
  89. data/lib/weft/generated/api_model_base.rb +2 -2
  90. data/lib/weft/generated/configuration.rb +2 -2
  91. data/lib/weft/generated/models/account_details.rb +94 -85
  92. data/lib/weft/generated/models/api_key.rb +2 -2
  93. data/lib/weft/generated/models/api_key_created.rb +2 -2
  94. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  95. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  96. data/lib/weft/generated/models/auth_response.rb +2 -2
  97. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  98. data/lib/weft/generated/models/balance_response.rb +5 -5
  99. data/lib/weft/generated/models/confirm_request.rb +2 -2
  100. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  101. data/lib/weft/generated/models/enrolled_resource.rb +474 -0
  102. data/lib/weft/generated/models/error.rb +3 -3
  103. data/lib/weft/generated/models/error_response.rb +3 -3
  104. data/lib/weft/generated/models/fetch403_response.rb +104 -0
  105. data/lib/weft/generated/models/fetch_balance_snapshot.rb +59 -4
  106. data/lib/weft/generated/models/fetch_error_response.rb +5 -5
  107. data/lib/weft/generated/models/fetch_request.rb +5 -5
  108. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  109. data/lib/weft/generated/models/fetch_response.rb +85 -7
  110. data/lib/weft/generated/models/insufficient_scope_response.rb +242 -0
  111. data/lib/weft/generated/models/{search_skill.rb → me_api_key.rb} +50 -92
  112. data/lib/weft/generated/models/me_api_key_creator.rb +200 -0
  113. data/lib/weft/generated/models/me_response.rb +3 -3
  114. data/lib/weft/generated/models/me_response_data.rb +55 -0
  115. data/lib/weft/generated/models/merchant.rb +2 -2
  116. data/lib/weft/generated/models/message_response.rb +2 -2
  117. data/lib/weft/generated/models/message_response_data.rb +2 -2
  118. data/lib/weft/generated/models/pagination.rb +2 -2
  119. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  120. data/lib/weft/generated/models/password_update_request.rb +2 -2
  121. data/lib/weft/generated/models/payment.rb +3 -12
  122. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  123. data/lib/weft/generated/models/payment_response.rb +2 -2
  124. data/lib/weft/generated/models/principal_wallet.rb +190 -0
  125. data/lib/weft/generated/models/promo_balance.rb +3 -3
  126. data/lib/weft/generated/models/purchase.rb +427 -0
  127. data/lib/weft/generated/models/purchase_artifact.rb +237 -0
  128. data/lib/weft/generated/models/purchase_list_response.rb +192 -0
  129. data/lib/weft/generated/models/purchase_response.rb +164 -0
  130. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  131. data/lib/weft/generated/models/{search_agent_card.rb → resource_enrollment_request.rb} +59 -75
  132. data/lib/weft/generated/models/resource_enrollment_response.rb +164 -0
  133. data/lib/weft/generated/models/resource_stats.rb +323 -0
  134. data/lib/weft/generated/models/{search_skill_endpoint.rb → search_capability_ref.rb} +18 -19
  135. data/lib/weft/generated/models/search_endpoint_call.rb +179 -0
  136. data/lib/weft/generated/models/search_endpoint_hit.rb +296 -0
  137. data/lib/weft/generated/models/search_endpoint_price.rb +223 -0
  138. data/lib/weft/generated/models/search_error_response.rb +5 -5
  139. data/lib/weft/generated/models/search_filter_spec.rb +175 -0
  140. data/lib/weft/generated/models/{search_pricing.rb → search_payment_offer.rb} +64 -67
  141. data/lib/weft/generated/models/search_price_atomic_filter.rb +284 -0
  142. data/lib/weft/generated/models/search_price_usd_filter.rb +294 -0
  143. data/lib/weft/generated/models/search_protocol_filter.rb +200 -0
  144. data/lib/weft/generated/models/{search_endpoints.rb → search_provider_ref.rb} +26 -36
  145. data/lib/weft/generated/models/search_request.rb +36 -27
  146. data/lib/weft/generated/models/search_resource_type_filter.rb +200 -0
  147. data/lib/weft/generated/models/search_response.rb +366 -30
  148. data/lib/weft/generated/models/search_response_warnings_inner.rb +210 -0
  149. data/lib/weft/generated/models/search_result.rb +68 -220
  150. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  151. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  152. data/lib/weft/generated/models/spending_policy.rb +2 -2
  153. data/lib/weft/generated/models/user.rb +2 -2
  154. data/lib/weft/generated/models/user_principal.rb +370 -0
  155. data/lib/weft/generated/models/wallet.rb +58 -4
  156. data/lib/weft/generated/version.rb +3 -3
  157. data/lib/weft/generated.rb +10 -4
  158. data/lib/weft/sdk.rb +1 -1
  159. metadata +75 -17
  160. data/docs/SearchAgentCard.md +0 -34
  161. data/docs/SearchEndpoints.md +0 -24
  162. data/docs/SearchFilters.md +0 -26
  163. data/docs/SearchPricing.md +0 -24
  164. data/docs/SearchRanking.md +0 -26
  165. data/docs/SearchSkill.md +0 -36
  166. data/docs/SearchSkillEndpoint.md +0 -20
  167. data/lib/weft/generated/models/search_filters.rb +0 -277
  168. data/lib/weft/generated/models/search_ranking.rb +0 -277
@@ -15,4 +15,3 @@ instance = Weft::MessageResponse.new(
15
15
  data: null
16
16
  )
17
17
  ```
18
-
@@ -15,4 +15,3 @@ instance = Weft::MessageResponseData.new(
15
15
  message: null
16
16
  )
17
17
  ```
18
-
data/docs/Pagination.md CHANGED
@@ -21,4 +21,3 @@ instance = Weft::Pagination.new(
21
21
  total_pages: null
22
22
  )
23
23
  ```
24
-
@@ -15,4 +15,3 @@ instance = Weft::PasswordResetRequest.new(
15
15
  email: null
16
16
  )
17
17
  ```
18
-
@@ -19,4 +19,3 @@ instance = Weft::PasswordUpdateRequest.new(
19
19
  password_confirmation: null
20
20
  )
21
21
  ```
22
-
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
-
@@ -17,4 +17,3 @@ instance = Weft::PaymentListResponse.new(
17
17
  pagination: null
18
18
  )
19
19
  ```
20
-
@@ -15,4 +15,3 @@ instance = Weft::PaymentResponse.new(
15
15
  data: null
16
16
  )
17
17
  ```
18
-
data/docs/PaymentsApi.md CHANGED
@@ -144,4 +144,3 @@ end
144
144
 
145
145
  - **Content-Type**: Not defined
146
146
  - **Accept**: application/json
147
-
@@ -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
@@ -19,4 +19,3 @@ instance = Weft::PromoBalance.new(
19
19
  expires_at: null
20
20
  )
21
21
  ```
22
-
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
@@ -15,4 +15,3 @@ instance = Weft::ResendConfirmationRequest.new(
15
15
  email: null
16
16
  )
17
17
  ```
18
-
@@ -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 &#x60;agent&#x60;); 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 carries a free-text `query`, an optional `limit`, and an optional `filters` object that narrows by price band, payment protocol, agent protocol, or domain tag. Filters are applied as a post-filter after the embedding score is computed. 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 same 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.
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&#39;s own 402 challenge / OpenAPI spec declares one. | [optional] |
8
+ | **input_schema** | **Object** | The provider&#39;s OWN structured declaration of the arguments this endpoint takes — the machine-usable form of what &#x60;usage_instructions&#x60; states in prose. Null when the provider declares nothing. | [optional] |
9
+ | **example_request** | **Object** | A worked set of arguments grouped by slot (&#x60;query&#x60; / &#x60;body&#x60; / &#x60;path&#x60;). 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&lt;SearchPaymentOffer&gt;**](SearchPaymentOffer.md) | The settlement routes this endpoint&#39;s own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of &#x60;call&#x60;: 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&#39;s own preference order. Honest-empty when the pipeline observed no challenge. | [optional] |
14
+ | **operator_type** | **String** | Who you are actually paying. &#x60;first_party&#x60; &#x3D; operated by the provider that makes the capability; &#x60;reseller&#x60; &#x3D; resold, so the price carries someone else&#39;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&#39;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. \&quot;0.008\&quot;) — 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 &#x60;indexed_usd&#x60; is. Use this for settlement. | [optional] |
9
+ | **source** | **String** | Where the amount came from. &#x60;probe&#x60; &#x3D; observed live in the endpoint&#39;s own 402 payment-required challenge — an observation, the strongest evidence we hold. &#x60;inferred&#x60; &#x3D; derived from a spec (OpenAPI) or a resale edge by the extraction pipeline, so it can lag a provider&#39;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 &#x60;false&#x60; 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
+ ```
@@ -17,4 +17,3 @@ instance = Weft::SearchErrorResponse.new(
17
17
  details: null
18
18
  )
19
19
  ```
20
-
@@ -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
+ ```