weft-sdk 0.10.1 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AccountApi.md +1 -1
  3. data/docs/AccountBootstrapApproval.md +21 -0
  4. data/docs/AccountBootstrapCreated.md +29 -0
  5. data/docs/AccountBootstrapCreatedApproval.md +23 -0
  6. data/docs/AccountBootstrapCreatedResponse.md +17 -0
  7. data/docs/AccountBootstrapRequest.md +27 -0
  8. data/docs/AccountBootstrapStatus.md +25 -0
  9. data/docs/AccountBootstrapStatusResponse.md +17 -0
  10. data/docs/AgentBootstrapApi.md +209 -0
  11. data/docs/BalanceApi.md +1 -1
  12. data/docs/CuratedMarketplaceContract.md +31 -0
  13. data/docs/FetchApi.md +1 -1
  14. data/docs/FetchBalanceSnapshot.md +1 -1
  15. data/docs/FetchRequest.md +5 -1
  16. data/docs/RateLimitResponse.md +19 -0
  17. data/docs/SearchAccessMethod.md +37 -0
  18. data/docs/SearchApi.md +68 -1
  19. data/docs/SearchCuratedCallability.md +19 -0
  20. data/docs/SearchCuratedExecution.md +17 -0
  21. data/docs/SearchCuratedOperation.md +21 -0
  22. data/docs/SearchCuratedService.md +19 -0
  23. data/docs/SearchCuratedSource.md +21 -0
  24. data/docs/SearchEndpointHit.md +18 -0
  25. data/docs/SearchExecutionModeFilter.md +19 -0
  26. data/docs/SearchFilterSpec.md +11 -1
  27. data/docs/SearchMethodFilter.md +19 -0
  28. data/docs/SearchResponse.md +1 -3
  29. data/docs/SearchStringSetFilter.md +19 -0
  30. data/docs/SearchWeftFetchCompatibility.md +21 -0
  31. data/docs/Wallet.md +7 -3
  32. data/lib/weft/generated/api/account_api.rb +4 -4
  33. data/lib/weft/generated/api/agent_bootstrap_api.rb +224 -0
  34. data/lib/weft/generated/api/api_keys_api.rb +2 -2
  35. data/lib/weft/generated/api/auth_api.rb +2 -2
  36. data/lib/weft/generated/api/balance_api.rb +4 -4
  37. data/lib/weft/generated/api/default_api.rb +2 -2
  38. data/lib/weft/generated/api/fetch_api.rb +4 -4
  39. data/lib/weft/generated/api/payments_api.rb +2 -2
  40. data/lib/weft/generated/api/purchases_api.rb +2 -2
  41. data/lib/weft/generated/api/resources_api.rb +2 -2
  42. data/lib/weft/generated/api/search_api.rb +83 -4
  43. data/lib/weft/generated/api_client.rb +2 -2
  44. data/lib/weft/generated/api_error.rb +2 -2
  45. data/lib/weft/generated/api_model_base.rb +2 -2
  46. data/lib/weft/generated/configuration.rb +10 -2
  47. data/lib/weft/generated/models/account_bootstrap_approval.rb +259 -0
  48. data/lib/weft/generated/models/account_bootstrap_created.rb +349 -0
  49. data/lib/weft/generated/models/account_bootstrap_created_approval.rb +297 -0
  50. data/lib/weft/generated/models/account_bootstrap_created_response.rb +164 -0
  51. data/lib/weft/generated/models/account_bootstrap_request.rb +317 -0
  52. data/lib/weft/generated/models/account_bootstrap_status.rb +282 -0
  53. data/lib/weft/generated/models/account_bootstrap_status_response.rb +164 -0
  54. data/lib/weft/generated/models/account_details.rb +2 -2
  55. data/lib/weft/generated/models/api_key.rb +2 -2
  56. data/lib/weft/generated/models/api_key_created.rb +2 -2
  57. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  58. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  59. data/lib/weft/generated/models/auth_response.rb +2 -2
  60. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  61. data/lib/weft/generated/models/balance_response.rb +2 -2
  62. data/lib/weft/generated/models/confirm_request.rb +2 -2
  63. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  64. data/lib/weft/generated/models/curated_marketplace_contract.rb +384 -0
  65. data/lib/weft/generated/models/enrolled_resource.rb +2 -2
  66. data/lib/weft/generated/models/error.rb +2 -2
  67. data/lib/weft/generated/models/error_response.rb +2 -2
  68. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  69. data/lib/weft/generated/models/fetch_balance_snapshot.rb +3 -3
  70. data/lib/weft/generated/models/fetch_error_response.rb +4 -4
  71. data/lib/weft/generated/models/fetch_request.rb +26 -6
  72. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  73. data/lib/weft/generated/models/fetch_response.rb +2 -2
  74. data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
  75. data/lib/weft/generated/models/me_api_key.rb +2 -2
  76. data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
  77. data/lib/weft/generated/models/me_response.rb +2 -2
  78. data/lib/weft/generated/models/me_response_data.rb +2 -2
  79. data/lib/weft/generated/models/merchant.rb +2 -2
  80. data/lib/weft/generated/models/message_response.rb +2 -2
  81. data/lib/weft/generated/models/message_response_data.rb +2 -2
  82. data/lib/weft/generated/models/pagination.rb +2 -2
  83. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  84. data/lib/weft/generated/models/password_update_request.rb +2 -2
  85. data/lib/weft/generated/models/payment.rb +2 -2
  86. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  87. data/lib/weft/generated/models/payment_response.rb +2 -2
  88. data/lib/weft/generated/models/principal_wallet.rb +2 -2
  89. data/lib/weft/generated/models/promo_balance.rb +2 -2
  90. data/lib/weft/generated/models/purchase.rb +2 -2
  91. data/lib/weft/generated/models/purchase_artifact.rb +2 -2
  92. data/lib/weft/generated/models/purchase_list_response.rb +2 -2
  93. data/lib/weft/generated/models/purchase_response.rb +2 -2
  94. data/lib/weft/generated/models/rate_limit_response.rb +214 -0
  95. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  96. data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
  97. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  98. data/lib/weft/generated/models/resource_stats.rb +2 -2
  99. data/lib/weft/generated/models/search_access_method.rb +341 -0
  100. data/lib/weft/generated/models/search_capability_ref.rb +2 -2
  101. data/lib/weft/generated/models/search_curated_callability.rb +216 -0
  102. data/lib/weft/generated/models/search_curated_execution.rb +181 -0
  103. data/lib/weft/generated/models/search_curated_operation.rb +199 -0
  104. data/lib/weft/generated/models/search_curated_service.rb +190 -0
  105. data/lib/weft/generated/models/search_curated_source.rb +240 -0
  106. data/lib/weft/generated/models/search_endpoint_call.rb +2 -2
  107. data/lib/weft/generated/models/search_endpoint_hit.rb +86 -3
  108. data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
  109. data/lib/weft/generated/models/search_error_response.rb +2 -2
  110. data/lib/weft/generated/models/search_execution_mode_filter.rb +197 -0
  111. data/lib/weft/generated/models/search_filter_spec.rb +55 -6
  112. data/lib/weft/generated/models/search_method_filter.rb +197 -0
  113. data/lib/weft/generated/models/search_payment_offer.rb +2 -2
  114. data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
  115. data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
  116. data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
  117. data/lib/weft/generated/models/search_provider_ref.rb +2 -2
  118. data/lib/weft/generated/models/search_request.rb +2 -2
  119. data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
  120. data/lib/weft/generated/models/search_response.rb +7 -17
  121. data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
  122. data/lib/weft/generated/models/search_result.rb +2 -2
  123. data/lib/weft/generated/models/search_string_set_filter.rb +177 -0
  124. data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +240 -0
  125. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  126. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  127. data/lib/weft/generated/models/spending_policy.rb +2 -2
  128. data/lib/weft/generated/models/user.rb +2 -2
  129. data/lib/weft/generated/models/user_principal.rb +2 -2
  130. data/lib/weft/generated/models/wallet.rb +84 -6
  131. data/lib/weft/generated/version.rb +3 -3
  132. data/lib/weft/sdk.rb +1 -1
  133. metadata +42 -2
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
+
6
+ The version of the OpenAPI document: 0.14.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ class SearchCuratedSource < ApiModelBase
18
+ attr_accessor :catalog
19
+
20
+ attr_accessor :snapshot_version
21
+
22
+ attr_accessor :captured_at
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'catalog' => :'catalog',
50
+ :'snapshot_version' => :'snapshot_version',
51
+ :'captured_at' => :'captured_at'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'catalog' => :'String',
69
+ :'snapshot_version' => :'Integer',
70
+ :'captured_at' => :'Time'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::SearchCuratedSource` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::SearchCuratedSource`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'catalog')
97
+ self.catalog = attributes[:'catalog']
98
+ else
99
+ self.catalog = nil
100
+ end
101
+
102
+ if attributes.key?(:'snapshot_version')
103
+ self.snapshot_version = attributes[:'snapshot_version']
104
+ else
105
+ self.snapshot_version = nil
106
+ end
107
+
108
+ if attributes.key?(:'captured_at')
109
+ self.captured_at = attributes[:'captured_at']
110
+ else
111
+ self.captured_at = nil
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @catalog.nil?
121
+ invalid_properties.push('invalid value for "catalog", catalog cannot be nil.')
122
+ end
123
+
124
+ if @snapshot_version.nil?
125
+ invalid_properties.push('invalid value for "snapshot_version", snapshot_version cannot be nil.')
126
+ end
127
+
128
+ if @captured_at.nil?
129
+ invalid_properties.push('invalid value for "captured_at", captured_at cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ return false if @catalog.nil?
140
+ catalog_validator = EnumAttributeValidator.new('String', ["curated_marketplace"])
141
+ return false unless catalog_validator.valid?(@catalog)
142
+ return false if @snapshot_version.nil?
143
+ return false if @captured_at.nil?
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method checking allowed values (enum).
148
+ # @param [Object] catalog Object to be assigned
149
+ def catalog=(catalog)
150
+ validator = EnumAttributeValidator.new('String', ["curated_marketplace"])
151
+ unless validator.valid?(catalog)
152
+ fail ArgumentError, "invalid value for \"catalog\", must be one of #{validator.allowable_values}."
153
+ end
154
+ @catalog = catalog
155
+ end
156
+
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] snapshot_version Value to be assigned
159
+ def snapshot_version=(snapshot_version)
160
+ if snapshot_version.nil?
161
+ fail ArgumentError, 'snapshot_version cannot be nil'
162
+ end
163
+
164
+ @snapshot_version = snapshot_version
165
+ end
166
+
167
+ # Custom attribute writer method with validation
168
+ # @param [Object] captured_at Value to be assigned
169
+ def captured_at=(captured_at)
170
+ if captured_at.nil?
171
+ fail ArgumentError, 'captured_at cannot be nil'
172
+ end
173
+
174
+ @captured_at = captured_at
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ catalog == o.catalog &&
183
+ snapshot_version == o.snapshot_version &&
184
+ captured_at == o.captured_at
185
+ end
186
+
187
+ # @see the `==` method
188
+ # @param [Object] Object to be compared
189
+ def eql?(o)
190
+ self == o
191
+ end
192
+
193
+ # Calculates hash code according to all attributes.
194
+ # @return [Integer] Hash code
195
+ def hash
196
+ [catalog, snapshot_version, captured_at].hash
197
+ end
198
+
199
+ # Builds the object from hash
200
+ # @param [Hash] attributes Model attributes in the form of hash
201
+ # @return [Object] Returns the model itself
202
+ def self.build_from_hash(attributes)
203
+ return nil unless attributes.is_a?(Hash)
204
+ attributes = attributes.transform_keys(&:to_sym)
205
+ transformed_hash = {}
206
+ openapi_types.each_pair do |key, type|
207
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = nil
209
+ elsif type =~ /\AArray<(.*)>/i
210
+ # check to ensure the input is an array given that the attribute
211
+ # is documented as an array but the input is not
212
+ if attributes[attribute_map[key]].is_a?(Array)
213
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
214
+ end
215
+ elsif !attributes[attribute_map[key]].nil?
216
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
217
+ end
218
+ end
219
+ new(transformed_hash)
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key or an OAuth access token with the relevant scope. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. The two key types are not interchangeable. 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`.
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.10.1
6
+ The version of the OpenAPI document: 0.14.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key or an OAuth access token with the relevant scope. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. The two key types are not interchangeable. 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`.
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.10.1
6
+ The version of the OpenAPI document: 0.14.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -30,6 +30,24 @@ module Weft
30
30
  # The settlement routes this endpoint's own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of `call`: that block says how to shape the request, this says how to pay for it, so a caller can settle with its OWN x402/mpp SDK instead of guessing. A list because rails are irreducibly plural. Order is the provider's own preference order. Honest-empty when the pipeline observed no challenge.
31
31
  attr_accessor :payment
32
32
 
33
+ attr_accessor :access_methods
34
+
35
+ attr_accessor :service
36
+
37
+ attr_accessor :operation
38
+
39
+ attr_accessor :output_schema
40
+
41
+ attr_accessor :output
42
+
43
+ attr_accessor :execution
44
+
45
+ attr_accessor :callability
46
+
47
+ attr_accessor :compatibility
48
+
49
+ attr_accessor :source
50
+
33
51
  # Who you are actually paying. `first_party` = operated by the provider that makes the capability; `reseller` = resold, so the price carries someone else's margin. Null until the platform resolves the operator.
34
52
  attr_accessor :operator_type
35
53
 
@@ -78,6 +96,15 @@ module Weft
78
96
  :'call' => :'call',
79
97
  :'price' => :'price',
80
98
  :'payment' => :'payment',
99
+ :'access_methods' => :'access_methods',
100
+ :'service' => :'service',
101
+ :'operation' => :'operation',
102
+ :'output_schema' => :'output_schema',
103
+ :'output' => :'output',
104
+ :'execution' => :'execution',
105
+ :'callability' => :'callability',
106
+ :'compatibility' => :'compatibility',
107
+ :'source' => :'source',
81
108
  :'operator_type' => :'operator_type',
82
109
  :'operated_by_id' => :'operated_by_id',
83
110
  :'settled_via_facilitator_id' => :'settled_via_facilitator_id',
@@ -107,6 +134,15 @@ module Weft
107
134
  :'call' => :'SearchEndpointCall',
108
135
  :'price' => :'SearchEndpointPrice',
109
136
  :'payment' => :'Array<SearchPaymentOffer>',
137
+ :'access_methods' => :'Array<SearchAccessMethod>',
138
+ :'service' => :'SearchCuratedService',
139
+ :'operation' => :'SearchCuratedOperation',
140
+ :'output_schema' => :'Object',
141
+ :'output' => :'Object',
142
+ :'execution' => :'SearchCuratedExecution',
143
+ :'callability' => :'SearchCuratedCallability',
144
+ :'compatibility' => :'Object',
145
+ :'source' => :'SearchCuratedSource',
110
146
  :'operator_type' => :'String',
111
147
  :'operated_by_id' => :'String',
112
148
  :'settled_via_facilitator_id' => :'String',
@@ -168,6 +204,44 @@ module Weft
168
204
  end
169
205
  end
170
206
 
207
+ if attributes.key?(:'access_methods')
208
+ if (value = attributes[:'access_methods']).is_a?(Array)
209
+ self.access_methods = value
210
+ end
211
+ end
212
+
213
+ if attributes.key?(:'service')
214
+ self.service = attributes[:'service']
215
+ end
216
+
217
+ if attributes.key?(:'operation')
218
+ self.operation = attributes[:'operation']
219
+ end
220
+
221
+ if attributes.key?(:'output_schema')
222
+ self.output_schema = attributes[:'output_schema']
223
+ end
224
+
225
+ if attributes.key?(:'output')
226
+ self.output = attributes[:'output']
227
+ end
228
+
229
+ if attributes.key?(:'execution')
230
+ self.execution = attributes[:'execution']
231
+ end
232
+
233
+ if attributes.key?(:'callability')
234
+ self.callability = attributes[:'callability']
235
+ end
236
+
237
+ if attributes.key?(:'compatibility')
238
+ self.compatibility = attributes[:'compatibility']
239
+ end
240
+
241
+ if attributes.key?(:'source')
242
+ self.source = attributes[:'source']
243
+ end
244
+
171
245
  if attributes.key?(:'operator_type')
172
246
  self.operator_type = attributes[:'operator_type']
173
247
  end
@@ -232,6 +306,15 @@ module Weft
232
306
  call == o.call &&
233
307
  price == o.price &&
234
308
  payment == o.payment &&
309
+ access_methods == o.access_methods &&
310
+ service == o.service &&
311
+ operation == o.operation &&
312
+ output_schema == o.output_schema &&
313
+ output == o.output &&
314
+ execution == o.execution &&
315
+ callability == o.callability &&
316
+ compatibility == o.compatibility &&
317
+ source == o.source &&
235
318
  operator_type == o.operator_type &&
236
319
  operated_by_id == o.operated_by_id &&
237
320
  settled_via_facilitator_id == o.settled_via_facilitator_id &&
@@ -249,7 +332,7 @@ module Weft
249
332
  # Calculates hash code according to all attributes.
250
333
  # @return [Integer] Hash code
251
334
  def hash
252
- [endpoint_id, url, resource_type, primary_protocol, call, price, payment, operator_type, operated_by_id, settled_via_facilitator_id, settlements, last_verified_at, latency_p50_ms].hash
335
+ [endpoint_id, url, resource_type, primary_protocol, call, price, payment, access_methods, service, operation, output_schema, output, execution, callability, compatibility, source, operator_type, operated_by_id, settled_via_facilitator_id, settlements, last_verified_at, latency_p50_ms].hash
253
336
  end
254
337
 
255
338
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key or an OAuth access token with the relevant scope. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. The two key types are not interchangeable. 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`.
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.10.1
6
+ The version of the OpenAPI document: 0.14.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key or an OAuth access token with the relevant scope. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. The two key types are not interchangeable. 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`.
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.10.1
6
+ The version of the OpenAPI document: 0.14.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -0,0 +1,197 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #The Weft API powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and third-party applications that discover and pay for resources on Weft. The buyer runtime covers six concerns: 1. Account creation and recovery (`/api/v1/auth/*`) 2. Credential identity (`/api/v1/me`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Buyer runtime calls require a dashboard-created `wk_*` account key, an OAuth access token with the relevant scope, or a claimed `wbt_*` bearer on its fixed allowlist. The organization-scoped API key and payment operations in this document are seller administration surfaces and require an `ax_live_*` resource key. These credential types are not interchangeable. Before claim, a `wbt_*` bearer is temporary and permits only search plus its own status/cancel operations for 30 minutes. Human approval binds it to the User and promotes the same secret to durable identity, search, balance, fetch, purchase-history, status, and revocation capabilities. It remains valid until revoked. Seller, organization, API-key administration, dashboard-session, transfer, withdrawal, and MCP surfaces always refuse it. Bootstrap lifecycle successes follow the API-standard `{ \"data\": ... }` envelope. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
+
6
+ The version of the OpenAPI document: 0.14.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Weft
17
+ class SearchExecutionModeFilter < ApiModelBase
18
+ attr_accessor :eq
19
+
20
+ attr_accessor :_in
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'eq' => :'eq',
48
+ :'_in' => :'in'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'eq' => :'String',
66
+ :'_in' => :'Array<String>'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::SearchExecutionModeFilter` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::SearchExecutionModeFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'eq')
93
+ self.eq = attributes[:'eq']
94
+ end
95
+
96
+ if attributes.key?(:'_in')
97
+ if (value = attributes[:'_in']).is_a?(Array)
98
+ self._in = value
99
+ end
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ if !@_in.nil? && @_in.length < 1
109
+ invalid_properties.push('invalid value for "_in", number of items must be greater than or equal to 1.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ eq_validator = EnumAttributeValidator.new('String', ["sync", "async", "stream"])
120
+ return false unless eq_validator.valid?(@eq)
121
+ return false if !@_in.nil? && @_in.length < 1
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method checking allowed values (enum).
126
+ # @param [Object] eq Object to be assigned
127
+ def eq=(eq)
128
+ validator = EnumAttributeValidator.new('String', ["sync", "async", "stream"])
129
+ unless validator.valid?(eq)
130
+ fail ArgumentError, "invalid value for \"eq\", must be one of #{validator.allowable_values}."
131
+ end
132
+ @eq = eq
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(o)
138
+ return true if self.equal?(o)
139
+ self.class == o.class &&
140
+ eq == o.eq &&
141
+ _in == o._in
142
+ end
143
+
144
+ # @see the `==` method
145
+ # @param [Object] Object to be compared
146
+ def eql?(o)
147
+ self == o
148
+ end
149
+
150
+ # Calculates hash code according to all attributes.
151
+ # @return [Integer] Hash code
152
+ def hash
153
+ [eq, _in].hash
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def self.build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ transformed_hash = {}
163
+ openapi_types.each_pair do |key, type|
164
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
165
+ transformed_hash["#{key}"] = nil
166
+ elsif type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[attribute_map[key]].is_a?(Array)
170
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
171
+ end
172
+ elsif !attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
174
+ end
175
+ end
176
+ new(transformed_hash)
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ end
196
+
197
+ end