weft-sdk 0.9.1 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +4 -0
  3. data/docs/AccountApi.md +1 -1
  4. data/docs/AccountBootstrapApproval.md +21 -0
  5. data/docs/AccountBootstrapCreated.md +29 -0
  6. data/docs/AccountBootstrapCreatedApproval.md +23 -0
  7. data/docs/AccountBootstrapCreatedResponse.md +17 -0
  8. data/docs/AccountBootstrapRequest.md +27 -0
  9. data/docs/AccountBootstrapStatus.md +25 -0
  10. data/docs/AccountBootstrapStatusResponse.md +17 -0
  11. data/docs/AgentBootstrapApi.md +209 -0
  12. data/docs/BalanceApi.md +1 -1
  13. data/docs/CuratedMarketplaceContract.md +31 -0
  14. data/docs/FetchApi.md +1 -1
  15. data/docs/FetchBalanceSnapshot.md +1 -1
  16. data/docs/FetchRequest.md +7 -1
  17. data/docs/RateLimitResponse.md +19 -0
  18. data/docs/SearchAccessMethod.md +37 -0
  19. data/docs/SearchApi.md +68 -1
  20. data/docs/SearchCuratedCallability.md +19 -0
  21. data/docs/SearchCuratedExecution.md +17 -0
  22. data/docs/SearchCuratedOperation.md +21 -0
  23. data/docs/SearchCuratedService.md +19 -0
  24. data/docs/SearchCuratedSource.md +21 -0
  25. data/docs/SearchEndpointHit.md +18 -0
  26. data/docs/SearchExecutionModeFilter.md +19 -0
  27. data/docs/SearchFilterSpec.md +11 -1
  28. data/docs/SearchMethodFilter.md +19 -0
  29. data/docs/SearchResponse.md +1 -3
  30. data/docs/SearchStringSetFilter.md +19 -0
  31. data/docs/SearchWeftFetchCompatibility.md +21 -0
  32. data/docs/Wallet.md +7 -3
  33. data/lib/weft/generated/api/account_api.rb +4 -4
  34. data/lib/weft/generated/api/agent_bootstrap_api.rb +224 -0
  35. data/lib/weft/generated/api/api_keys_api.rb +6 -2
  36. data/lib/weft/generated/api/auth_api.rb +2 -2
  37. data/lib/weft/generated/api/balance_api.rb +4 -4
  38. data/lib/weft/generated/api/default_api.rb +2 -2
  39. data/lib/weft/generated/api/fetch_api.rb +4 -4
  40. data/lib/weft/generated/api/payments_api.rb +2 -2
  41. data/lib/weft/generated/api/purchases_api.rb +2 -2
  42. data/lib/weft/generated/api/resources_api.rb +2 -2
  43. data/lib/weft/generated/api/search_api.rb +83 -4
  44. data/lib/weft/generated/api_client.rb +2 -2
  45. data/lib/weft/generated/api_error.rb +2 -2
  46. data/lib/weft/generated/api_model_base.rb +2 -2
  47. data/lib/weft/generated/configuration.rb +10 -10
  48. data/lib/weft/generated/models/account_bootstrap_approval.rb +259 -0
  49. data/lib/weft/generated/models/account_bootstrap_created.rb +349 -0
  50. data/lib/weft/generated/models/account_bootstrap_created_approval.rb +297 -0
  51. data/lib/weft/generated/models/account_bootstrap_created_response.rb +164 -0
  52. data/lib/weft/generated/models/account_bootstrap_request.rb +317 -0
  53. data/lib/weft/generated/models/account_bootstrap_status.rb +282 -0
  54. data/lib/weft/generated/models/account_bootstrap_status_response.rb +164 -0
  55. data/lib/weft/generated/models/account_details.rb +2 -2
  56. data/lib/weft/generated/models/api_key.rb +2 -2
  57. data/lib/weft/generated/models/api_key_created.rb +2 -2
  58. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  59. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  60. data/lib/weft/generated/models/auth_response.rb +2 -2
  61. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  62. data/lib/weft/generated/models/balance_response.rb +2 -2
  63. data/lib/weft/generated/models/confirm_request.rb +2 -2
  64. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  65. data/lib/weft/generated/models/curated_marketplace_contract.rb +384 -0
  66. data/lib/weft/generated/models/enrolled_resource.rb +2 -2
  67. data/lib/weft/generated/models/error.rb +2 -2
  68. data/lib/weft/generated/models/error_response.rb +2 -2
  69. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  70. data/lib/weft/generated/models/fetch_balance_snapshot.rb +3 -3
  71. data/lib/weft/generated/models/fetch_error_response.rb +4 -4
  72. data/lib/weft/generated/models/fetch_request.rb +36 -6
  73. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  74. data/lib/weft/generated/models/fetch_response.rb +2 -2
  75. data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
  76. data/lib/weft/generated/models/me_api_key.rb +2 -2
  77. data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
  78. data/lib/weft/generated/models/me_response.rb +2 -2
  79. data/lib/weft/generated/models/me_response_data.rb +2 -2
  80. data/lib/weft/generated/models/merchant.rb +2 -2
  81. data/lib/weft/generated/models/message_response.rb +2 -2
  82. data/lib/weft/generated/models/message_response_data.rb +2 -2
  83. data/lib/weft/generated/models/pagination.rb +2 -2
  84. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  85. data/lib/weft/generated/models/password_update_request.rb +2 -2
  86. data/lib/weft/generated/models/payment.rb +2 -2
  87. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  88. data/lib/weft/generated/models/payment_response.rb +2 -2
  89. data/lib/weft/generated/models/principal_wallet.rb +2 -2
  90. data/lib/weft/generated/models/promo_balance.rb +2 -2
  91. data/lib/weft/generated/models/purchase.rb +2 -2
  92. data/lib/weft/generated/models/purchase_artifact.rb +2 -2
  93. data/lib/weft/generated/models/purchase_list_response.rb +2 -2
  94. data/lib/weft/generated/models/purchase_response.rb +2 -2
  95. data/lib/weft/generated/models/rate_limit_response.rb +214 -0
  96. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  97. data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
  98. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  99. data/lib/weft/generated/models/resource_stats.rb +2 -2
  100. data/lib/weft/generated/models/search_access_method.rb +341 -0
  101. data/lib/weft/generated/models/search_capability_ref.rb +2 -2
  102. data/lib/weft/generated/models/search_curated_callability.rb +216 -0
  103. data/lib/weft/generated/models/search_curated_execution.rb +181 -0
  104. data/lib/weft/generated/models/search_curated_operation.rb +199 -0
  105. data/lib/weft/generated/models/search_curated_service.rb +190 -0
  106. data/lib/weft/generated/models/search_curated_source.rb +240 -0
  107. data/lib/weft/generated/models/search_endpoint_call.rb +2 -2
  108. data/lib/weft/generated/models/search_endpoint_hit.rb +86 -3
  109. data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
  110. data/lib/weft/generated/models/search_error_response.rb +2 -2
  111. data/lib/weft/generated/models/search_execution_mode_filter.rb +197 -0
  112. data/lib/weft/generated/models/search_filter_spec.rb +55 -6
  113. data/lib/weft/generated/models/search_method_filter.rb +197 -0
  114. data/lib/weft/generated/models/search_payment_offer.rb +2 -2
  115. data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
  116. data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
  117. data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
  118. data/lib/weft/generated/models/search_provider_ref.rb +2 -2
  119. data/lib/weft/generated/models/search_request.rb +2 -2
  120. data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
  121. data/lib/weft/generated/models/search_response.rb +7 -17
  122. data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
  123. data/lib/weft/generated/models/search_result.rb +2 -2
  124. data/lib/weft/generated/models/search_string_set_filter.rb +177 -0
  125. data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +240 -0
  126. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  127. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  128. data/lib/weft/generated/models/spending_policy.rb +2 -2
  129. data/lib/weft/generated/models/user.rb +2 -2
  130. data/lib/weft/generated/models/user_principal.rb +2 -2
  131. data/lib/weft/generated/models/wallet.rb +84 -6
  132. data/lib/weft/generated/version.rb +3 -3
  133. data/lib/weft/sdk.rb +1 -1
  134. metadata +42 -2
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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
@@ -20,7 +20,7 @@ module Weft
20
20
  @api_client = api_client
21
21
  end
22
22
  # Pay-and-fetch any URL (x402 proxy)
23
- # Universal x402 fetch proxy. The caller provides a target `url`, a hard `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and the merchant's reputation snapshot. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
23
+ # Universal x402 fetch proxy. The caller provides a target `url`, a hard `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and the merchant's reputation snapshot. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `fetch`, or a claimed `wbt_*` bearer. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
24
24
  # @param fetch_request [FetchRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :idempotency_key Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request.
@@ -31,7 +31,7 @@ module Weft
31
31
  end
32
32
 
33
33
  # Pay-and-fetch any URL (x402 proxy)
34
- # Universal x402 fetch proxy. The caller provides a target `url`, a hard `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and the merchant's reputation snapshot. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
34
+ # Universal x402 fetch proxy. The caller provides a target `url`, a hard `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and the merchant's reputation snapshot. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `fetch`, or a claimed `wbt_*` bearer. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
35
35
  # @param fetch_request [FetchRequest]
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [String] :idempotency_key Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request.
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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
@@ -19,8 +19,87 @@ module Weft
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Get a curated marketplace operation contract
23
+ # Public, content-addressed detail document linked from compact hosted-MCP search results. A matching document is cacheable for one year and immutable. The digest is the SHA-256 of the canonical JSON document. Every reviewed endpoint includes its request and response evidence; asynchronous endpoints also include the authored submit-and-poll lifecycle, identity-header reuse, terminal states, and known gaps.
24
+ # @param digest [String]
25
+ # @param operation_id [String]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [CuratedMarketplaceContract]
28
+ def get_curated_marketplace_contract(digest, operation_id, opts = {})
29
+ data, _status_code, _headers = get_curated_marketplace_contract_with_http_info(digest, operation_id, opts)
30
+ data
31
+ end
32
+
33
+ # Get a curated marketplace operation contract
34
+ # Public, content-addressed detail document linked from compact hosted-MCP search results. A matching document is cacheable for one year and immutable. The digest is the SHA-256 of the canonical JSON document. Every reviewed endpoint includes its request and response evidence; asynchronous endpoints also include the authored submit-and-poll lifecycle, identity-header reuse, terminal states, and known gaps.
35
+ # @param digest [String]
36
+ # @param operation_id [String]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(CuratedMarketplaceContract, Integer, Hash)>] CuratedMarketplaceContract data, response status code and response headers
39
+ def get_curated_marketplace_contract_with_http_info(digest, operation_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: SearchApi.get_curated_marketplace_contract ...'
42
+ end
43
+ # verify the required parameter 'digest' is set
44
+ if @api_client.config.client_side_validation && digest.nil?
45
+ fail ArgumentError, "Missing the required parameter 'digest' when calling SearchApi.get_curated_marketplace_contract"
46
+ end
47
+ pattern = Regexp.new(/^[0-9a-f]{64}$/)
48
+ if @api_client.config.client_side_validation && digest !~ pattern
49
+ fail ArgumentError, "invalid value for 'digest' when calling SearchApi.get_curated_marketplace_contract, must conform to the pattern #{pattern}."
50
+ end
51
+
52
+ # verify the required parameter 'operation_id' is set
53
+ if @api_client.config.client_side_validation && operation_id.nil?
54
+ fail ArgumentError, "Missing the required parameter 'operation_id' when calling SearchApi.get_curated_marketplace_contract"
55
+ end
56
+ pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
57
+ if @api_client.config.client_side_validation && operation_id !~ pattern
58
+ fail ArgumentError, "invalid value for 'operation_id' when calling SearchApi.get_curated_marketplace_contract, must conform to the pattern #{pattern}."
59
+ end
60
+
61
+ # resource path
62
+ local_var_path = '/contracts/curated-marketplace/{digest}/{operation_id}.json'.sub('{' + 'digest' + '}', CGI.escape(digest.to_s)).sub('{' + 'operation_id' + '}', CGI.escape(operation_id.to_s))
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
71
+
72
+ # form parameters
73
+ form_params = opts[:form_params] || {}
74
+
75
+ # http body (model)
76
+ post_body = opts[:debug_body]
77
+
78
+ # return_type
79
+ return_type = opts[:debug_return_type] || 'CuratedMarketplaceContract'
80
+
81
+ # auth_names
82
+ auth_names = opts[:debug_auth_names] || []
83
+
84
+ new_options = opts.merge(
85
+ :operation => :"SearchApi.get_curated_marketplace_contract",
86
+ :header_params => header_params,
87
+ :query_params => query_params,
88
+ :form_params => form_params,
89
+ :body => post_body,
90
+ :auth_names => auth_names,
91
+ :return_type => return_type
92
+ )
93
+
94
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "API called: SearchApi#get_curated_marketplace_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
22
101
  # Search the Weft index
23
- # 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.
102
+ # 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. Account-scoped: the bearer token must be a buyer-scoped API key, an OAuth token carrying `search`, or a pending or claimed `wbt_*` bootstrap bearer. Pending bootstrap access uses an anonymous bootstrap identity; after claim, the promoted bearer uses its bound User. Rejection, cancellation, expiry, and revocation end bootstrap search. Bootstrap search is limited to 60 requests per credential and 120 per IP each hour before native credential promotion. 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.
24
103
  # @param search_request [SearchRequest]
25
104
  # @param [Hash] opts the optional parameters
26
105
  # @return [SearchResponse]
@@ -30,7 +109,7 @@ module Weft
30
109
  end
31
110
 
32
111
  # Search the Weft index
33
- # Semantic search over the Weft index of paid agent resources. The request body is the weft-search-platform &#x60;/v1/search&#x60; contract: a free-text &#x60;query&#x60;, optional &#x60;max_results&#x60;, and optional structured &#x60;filters&#x60; (price / price_atomic / type / protocol — the canonical FilterSpec v1 vocabulary, vendored verbatim from the platform). Price is a dual representation of one constraint: &#x60;price&#x60; in USD decimal strings (the reasoning form) XOR &#x60;price_atomic&#x60; in integer micro-USD (the settlement form) — mutually exclusive, set at most one. Backend selection is server-side via the &#x60;SEARCH_BACKEND&#x60; env var: &#x60;mock&#x60; (default, reads YAML fixtures and sets &#x60;_mock: true&#x60; in the response) or &#x60;platform&#x60; (proxies to the upstream search service). Both backends return the platform &#x60;SearchResponse&#x60; 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: &#x60;Accept: application/json&#x60; (default) returns the structured envelope; &#x60;Accept: text/markdown&#x60; returns a rendered Markdown digest of the same results — useful for piping into a chat UI or LLM prompt.
112
+ # Semantic search over the Weft index of paid agent resources. The request body is the weft-search-platform &#x60;/v1/search&#x60; contract: a free-text &#x60;query&#x60;, optional &#x60;max_results&#x60;, and optional structured &#x60;filters&#x60; (price / price_atomic / type / protocol — the canonical FilterSpec v1 vocabulary, vendored verbatim from the platform). Price is a dual representation of one constraint: &#x60;price&#x60; in USD decimal strings (the reasoning form) XOR &#x60;price_atomic&#x60; in integer micro-USD (the settlement form) — mutually exclusive, set at most one. Account-scoped: the bearer token must be a buyer-scoped API key, an OAuth token carrying &#x60;search&#x60;, or a pending or claimed &#x60;wbt_*&#x60; bootstrap bearer. Pending bootstrap access uses an anonymous bootstrap identity; after claim, the promoted bearer uses its bound User. Rejection, cancellation, expiry, and revocation end bootstrap search. Bootstrap search is limited to 60 requests per credential and 120 per IP each hour before native credential promotion. Response negotiation: &#x60;Accept: application/json&#x60; (default) returns the structured envelope; &#x60;Accept: text/markdown&#x60; returns a rendered Markdown digest of the same results — useful for piping into a chat UI or LLM prompt.
34
113
  # @param search_request [SearchRequest]
35
114
  # @param [Hash] opts the optional parameters
36
115
  # @return [Array<(SearchResponse, Integer, Hash)>] SearchResponse data, response status code and response headers
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Weft API
3
3
 
4
- #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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 is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/purchases`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
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.9.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
@@ -252,6 +252,14 @@ module Weft
252
252
  key: 'Authorization',
253
253
  value: "Bearer #{access_token_with_refresh}"
254
254
  },
255
+ 'bootstrapAuth' =>
256
+ {
257
+ type: 'bearer',
258
+ in: 'header',
259
+ format: 'BootstrapToken',
260
+ key: 'Authorization',
261
+ value: "Bearer #{access_token_with_refresh}"
262
+ },
255
263
  }
256
264
  end
257
265
 
@@ -261,14 +269,6 @@ module Weft
261
269
  {
262
270
  url: "https://weft.network",
263
271
  description: "Production",
264
- },
265
- {
266
- url: "https://staging.weft.network",
267
- description: "Staging",
268
- },
269
- {
270
- url: "http://localhost:3000",
271
- description: "Development",
272
272
  }
273
273
  ]
274
274
  end
@@ -0,0 +1,259 @@
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 AccountBootstrapApproval < ApiModelBase
18
+ attr_accessor :method
19
+
20
+ attr_accessor :expires_in
21
+
22
+ # Minimum status polling interval in seconds.
23
+ attr_accessor :interval
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'method' => :'method',
51
+ :'expires_in' => :'expires_in',
52
+ :'interval' => :'interval'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'method' => :'String',
70
+ :'expires_in' => :'Integer',
71
+ :'interval' => :'Integer'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::AccountBootstrapApproval` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::AccountBootstrapApproval`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'method')
98
+ self.method = attributes[:'method']
99
+ else
100
+ self.method = nil
101
+ end
102
+
103
+ if attributes.key?(:'expires_in')
104
+ self.expires_in = attributes[:'expires_in']
105
+ else
106
+ self.expires_in = nil
107
+ end
108
+
109
+ if attributes.key?(:'interval')
110
+ self.interval = attributes[:'interval']
111
+ else
112
+ self.interval = nil
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
120
+ invalid_properties = Array.new
121
+ if @method.nil?
122
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
123
+ end
124
+
125
+ if @expires_in.nil?
126
+ invalid_properties.push('invalid value for "expires_in", expires_in cannot be nil.')
127
+ end
128
+
129
+ if @expires_in < 0
130
+ invalid_properties.push('invalid value for "expires_in", must be greater than or equal to 0.')
131
+ end
132
+
133
+ if @interval.nil?
134
+ invalid_properties.push('invalid value for "interval", interval cannot be nil.')
135
+ end
136
+
137
+ if @interval < 1
138
+ invalid_properties.push('invalid value for "interval", must be greater than or equal to 1.')
139
+ end
140
+
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
+ return false if @method.nil?
149
+ method_validator = EnumAttributeValidator.new('String', ["email_link"])
150
+ return false unless method_validator.valid?(@method)
151
+ return false if @expires_in.nil?
152
+ return false if @expires_in < 0
153
+ return false if @interval.nil?
154
+ return false if @interval < 1
155
+ true
156
+ end
157
+
158
+ # Custom attribute writer method checking allowed values (enum).
159
+ # @param [Object] method Object to be assigned
160
+ def method=(method)
161
+ validator = EnumAttributeValidator.new('String', ["email_link"])
162
+ unless validator.valid?(method)
163
+ fail ArgumentError, "invalid value for \"method\", must be one of #{validator.allowable_values}."
164
+ end
165
+ @method = method
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param [Object] expires_in Value to be assigned
170
+ def expires_in=(expires_in)
171
+ if expires_in.nil?
172
+ fail ArgumentError, 'expires_in cannot be nil'
173
+ end
174
+
175
+ if expires_in < 0
176
+ fail ArgumentError, 'invalid value for "expires_in", must be greater than or equal to 0.'
177
+ end
178
+
179
+ @expires_in = expires_in
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] interval Value to be assigned
184
+ def interval=(interval)
185
+ if interval.nil?
186
+ fail ArgumentError, 'interval cannot be nil'
187
+ end
188
+
189
+ if interval < 1
190
+ fail ArgumentError, 'invalid value for "interval", must be greater than or equal to 1.'
191
+ end
192
+
193
+ @interval = interval
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(o)
199
+ return true if self.equal?(o)
200
+ self.class == o.class &&
201
+ method == o.method &&
202
+ expires_in == o.expires_in &&
203
+ interval == o.interval
204
+ end
205
+
206
+ # @see the `==` method
207
+ # @param [Object] Object to be compared
208
+ def eql?(o)
209
+ self == o
210
+ end
211
+
212
+ # Calculates hash code according to all attributes.
213
+ # @return [Integer] Hash code
214
+ def hash
215
+ [method, expires_in, interval].hash
216
+ end
217
+
218
+ # Builds the object from hash
219
+ # @param [Hash] attributes Model attributes in the form of hash
220
+ # @return [Object] Returns the model itself
221
+ def self.build_from_hash(attributes)
222
+ return nil unless attributes.is_a?(Hash)
223
+ attributes = attributes.transform_keys(&:to_sym)
224
+ transformed_hash = {}
225
+ openapi_types.each_pair do |key, type|
226
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = nil
228
+ elsif type =~ /\AArray<(.*)>/i
229
+ # check to ensure the input is an array given that the attribute
230
+ # is documented as an array but the input is not
231
+ if attributes[attribute_map[key]].is_a?(Array)
232
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
233
+ end
234
+ elsif !attributes[attribute_map[key]].nil?
235
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
236
+ end
237
+ end
238
+ new(transformed_hash)
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ end
258
+
259
+ end