@weftlabs/sdk 0.31.0 → 0.32.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.
- package/dist/facilitator/middleware/index.js +1 -1
- package/dist/facilitator/middleware/index.js.map +1 -1
- package/dist/facilitator/middleware/index.mjs +1 -1
- package/dist/facilitator/middleware/index.mjs.map +1 -1
- package/dist/index.d.mts +808 -156
- package/dist/index.d.ts +808 -156
- package/dist/index.js +495 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +495 -45
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +1 -1
- package/dist/server.mjs.map +1 -1
- package/docs/FetchApi.md +1 -1
- package/docs/FetchResponse.md +3 -1
- package/docs/GetPurchaseIdParameter.md +30 -0
- package/docs/Purchase.md +2 -0
- package/docs/PurchasesApi.md +3 -3
- package/docs/SearchApi.md +2 -2
- package/docs/SearchCompactAccess.md +39 -0
- package/docs/SearchCompactAccessPrice.md +38 -0
- package/docs/SearchCompactNextCall.md +39 -0
- package/docs/SearchCompactResult.md +63 -0
- package/docs/SearchCompactResultAttribution.md +37 -0
- package/docs/SearchCompactResultBlockedScopesInner.md +34 -0
- package/docs/SearchCompactResultOperation.md +36 -0
- package/docs/SearchCompactResultProvider.md +34 -0
- package/docs/SearchRequest.md +2 -0
- package/docs/SearchResponse.md +6 -0
- package/docs/SearchWeftFetchCompatibility.md +2 -0
- package/package.json +13 -11
package/dist/index.mjs
CHANGED
|
@@ -145,6 +145,10 @@ __export(src_exports, {
|
|
|
145
145
|
FetchResponseProtocolEnum: () => FetchResponseProtocolEnum,
|
|
146
146
|
FetchResponseToJSON: () => FetchResponseToJSON,
|
|
147
147
|
FetchResponseToJSONTyped: () => FetchResponseToJSONTyped,
|
|
148
|
+
GetPurchaseIdParameterFromJSON: () => GetPurchaseIdParameterFromJSON,
|
|
149
|
+
GetPurchaseIdParameterFromJSONTyped: () => GetPurchaseIdParameterFromJSONTyped,
|
|
150
|
+
GetPurchaseIdParameterToJSON: () => GetPurchaseIdParameterToJSON,
|
|
151
|
+
GetPurchaseIdParameterToJSONTyped: () => GetPurchaseIdParameterToJSONTyped,
|
|
148
152
|
InsufficientScopeResponseErrorEnum: () => InsufficientScopeResponseErrorEnum,
|
|
149
153
|
InsufficientScopeResponseFromJSON: () => InsufficientScopeResponseFromJSON,
|
|
150
154
|
InsufficientScopeResponseFromJSONTyped: () => InsufficientScopeResponseFromJSONTyped,
|
|
@@ -267,6 +271,40 @@ __export(src_exports, {
|
|
|
267
271
|
SearchCapabilityRefFromJSONTyped: () => SearchCapabilityRefFromJSONTyped,
|
|
268
272
|
SearchCapabilityRefToJSON: () => SearchCapabilityRefToJSON,
|
|
269
273
|
SearchCapabilityRefToJSONTyped: () => SearchCapabilityRefToJSONTyped,
|
|
274
|
+
SearchCompactAccessFromJSON: () => SearchCompactAccessFromJSON,
|
|
275
|
+
SearchCompactAccessFromJSONTyped: () => SearchCompactAccessFromJSONTyped,
|
|
276
|
+
SearchCompactAccessPriceFromJSON: () => SearchCompactAccessPriceFromJSON,
|
|
277
|
+
SearchCompactAccessPriceFromJSONTyped: () => SearchCompactAccessPriceFromJSONTyped,
|
|
278
|
+
SearchCompactAccessPriceToJSON: () => SearchCompactAccessPriceToJSON,
|
|
279
|
+
SearchCompactAccessPriceToJSONTyped: () => SearchCompactAccessPriceToJSONTyped,
|
|
280
|
+
SearchCompactAccessToJSON: () => SearchCompactAccessToJSON,
|
|
281
|
+
SearchCompactAccessToJSONTyped: () => SearchCompactAccessToJSONTyped,
|
|
282
|
+
SearchCompactNextCallFromJSON: () => SearchCompactNextCallFromJSON,
|
|
283
|
+
SearchCompactNextCallFromJSONTyped: () => SearchCompactNextCallFromJSONTyped,
|
|
284
|
+
SearchCompactNextCallMethodEnum: () => SearchCompactNextCallMethodEnum,
|
|
285
|
+
SearchCompactNextCallPathEnum: () => SearchCompactNextCallPathEnum,
|
|
286
|
+
SearchCompactNextCallToJSON: () => SearchCompactNextCallToJSON,
|
|
287
|
+
SearchCompactNextCallToJSONTyped: () => SearchCompactNextCallToJSONTyped,
|
|
288
|
+
SearchCompactResultAttributionFromJSON: () => SearchCompactResultAttributionFromJSON,
|
|
289
|
+
SearchCompactResultAttributionFromJSONTyped: () => SearchCompactResultAttributionFromJSONTyped,
|
|
290
|
+
SearchCompactResultAttributionToJSON: () => SearchCompactResultAttributionToJSON,
|
|
291
|
+
SearchCompactResultAttributionToJSONTyped: () => SearchCompactResultAttributionToJSONTyped,
|
|
292
|
+
SearchCompactResultBlockedScopesInnerFromJSON: () => SearchCompactResultBlockedScopesInnerFromJSON,
|
|
293
|
+
SearchCompactResultBlockedScopesInnerFromJSONTyped: () => SearchCompactResultBlockedScopesInnerFromJSONTyped,
|
|
294
|
+
SearchCompactResultBlockedScopesInnerToJSON: () => SearchCompactResultBlockedScopesInnerToJSON,
|
|
295
|
+
SearchCompactResultBlockedScopesInnerToJSONTyped: () => SearchCompactResultBlockedScopesInnerToJSONTyped,
|
|
296
|
+
SearchCompactResultFromJSON: () => SearchCompactResultFromJSON,
|
|
297
|
+
SearchCompactResultFromJSONTyped: () => SearchCompactResultFromJSONTyped,
|
|
298
|
+
SearchCompactResultOperationFromJSON: () => SearchCompactResultOperationFromJSON,
|
|
299
|
+
SearchCompactResultOperationFromJSONTyped: () => SearchCompactResultOperationFromJSONTyped,
|
|
300
|
+
SearchCompactResultOperationToJSON: () => SearchCompactResultOperationToJSON,
|
|
301
|
+
SearchCompactResultOperationToJSONTyped: () => SearchCompactResultOperationToJSONTyped,
|
|
302
|
+
SearchCompactResultProviderFromJSON: () => SearchCompactResultProviderFromJSON,
|
|
303
|
+
SearchCompactResultProviderFromJSONTyped: () => SearchCompactResultProviderFromJSONTyped,
|
|
304
|
+
SearchCompactResultProviderToJSON: () => SearchCompactResultProviderToJSON,
|
|
305
|
+
SearchCompactResultProviderToJSONTyped: () => SearchCompactResultProviderToJSONTyped,
|
|
306
|
+
SearchCompactResultToJSON: () => SearchCompactResultToJSON,
|
|
307
|
+
SearchCompactResultToJSONTyped: () => SearchCompactResultToJSONTyped,
|
|
270
308
|
SearchCuratedCallabilityFromJSON: () => SearchCuratedCallabilityFromJSON,
|
|
271
309
|
SearchCuratedCallabilityFromJSONTyped: () => SearchCuratedCallabilityFromJSONTyped,
|
|
272
310
|
SearchCuratedCallabilityStateEnum: () => SearchCuratedCallabilityStateEnum,
|
|
@@ -359,6 +397,7 @@ __export(src_exports, {
|
|
|
359
397
|
SearchRequestFromJSONTyped: () => SearchRequestFromJSONTyped,
|
|
360
398
|
SearchRequestToJSON: () => SearchRequestToJSON,
|
|
361
399
|
SearchRequestToJSONTyped: () => SearchRequestToJSONTyped,
|
|
400
|
+
SearchRequestViewEnum: () => SearchRequestViewEnum,
|
|
362
401
|
SearchResourceTypeFilterEqEnum: () => SearchResourceTypeFilterEqEnum,
|
|
363
402
|
SearchResourceTypeFilterFromJSON: () => SearchResourceTypeFilterFromJSON,
|
|
364
403
|
SearchResourceTypeFilterFromJSONTyped: () => SearchResourceTypeFilterFromJSONTyped,
|
|
@@ -374,6 +413,7 @@ __export(src_exports, {
|
|
|
374
413
|
SearchResponseServedFromEnum: () => SearchResponseServedFromEnum,
|
|
375
414
|
SearchResponseToJSON: () => SearchResponseToJSON,
|
|
376
415
|
SearchResponseToJSONTyped: () => SearchResponseToJSONTyped,
|
|
416
|
+
SearchResponseViewEnum: () => SearchResponseViewEnum,
|
|
377
417
|
SearchResponseWarningsInnerFromJSON: () => SearchResponseWarningsInnerFromJSON,
|
|
378
418
|
SearchResponseWarningsInnerFromJSONTyped: () => SearchResponseWarningsInnerFromJSONTyped,
|
|
379
419
|
SearchResponseWarningsInnerToJSON: () => SearchResponseWarningsInnerToJSON,
|
|
@@ -386,6 +426,7 @@ __export(src_exports, {
|
|
|
386
426
|
SearchStringSetFilterFromJSONTyped: () => SearchStringSetFilterFromJSONTyped,
|
|
387
427
|
SearchStringSetFilterToJSON: () => SearchStringSetFilterToJSON,
|
|
388
428
|
SearchStringSetFilterToJSONTyped: () => SearchStringSetFilterToJSONTyped,
|
|
429
|
+
SearchWeftFetchCompatibilityCoverageEnum: () => SearchWeftFetchCompatibilityCoverageEnum,
|
|
389
430
|
SearchWeftFetchCompatibilityFromJSON: () => SearchWeftFetchCompatibilityFromJSON,
|
|
390
431
|
SearchWeftFetchCompatibilityFromJSONTyped: () => SearchWeftFetchCompatibilityFromJSONTyped,
|
|
391
432
|
SearchWeftFetchCompatibilityStateEnum: () => SearchWeftFetchCompatibilityStateEnum,
|
|
@@ -477,6 +518,14 @@ __export(src_exports, {
|
|
|
477
518
|
instanceOfResourceStats: () => instanceOfResourceStats,
|
|
478
519
|
instanceOfSearchAccessMethod: () => instanceOfSearchAccessMethod,
|
|
479
520
|
instanceOfSearchCapabilityRef: () => instanceOfSearchCapabilityRef,
|
|
521
|
+
instanceOfSearchCompactAccess: () => instanceOfSearchCompactAccess,
|
|
522
|
+
instanceOfSearchCompactAccessPrice: () => instanceOfSearchCompactAccessPrice,
|
|
523
|
+
instanceOfSearchCompactNextCall: () => instanceOfSearchCompactNextCall,
|
|
524
|
+
instanceOfSearchCompactResult: () => instanceOfSearchCompactResult,
|
|
525
|
+
instanceOfSearchCompactResultAttribution: () => instanceOfSearchCompactResultAttribution,
|
|
526
|
+
instanceOfSearchCompactResultBlockedScopesInner: () => instanceOfSearchCompactResultBlockedScopesInner,
|
|
527
|
+
instanceOfSearchCompactResultOperation: () => instanceOfSearchCompactResultOperation,
|
|
528
|
+
instanceOfSearchCompactResultProvider: () => instanceOfSearchCompactResultProvider,
|
|
480
529
|
instanceOfSearchCuratedCallability: () => instanceOfSearchCuratedCallability,
|
|
481
530
|
instanceOfSearchCuratedExecution: () => instanceOfSearchCuratedExecution,
|
|
482
531
|
instanceOfSearchCuratedOperation: () => instanceOfSearchCuratedOperation,
|
|
@@ -2157,7 +2206,8 @@ function FetchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2157
2206
|
"paymentStatus": json["payment_status"],
|
|
2158
2207
|
"txHash": json["tx_hash"],
|
|
2159
2208
|
"protocol": json["protocol"],
|
|
2160
|
-
"artifactId": json["artifact_id"]
|
|
2209
|
+
"artifactId": json["artifact_id"],
|
|
2210
|
+
"purchaseId": json["purchase_id"] == null ? void 0 : json["purchase_id"]
|
|
2161
2211
|
};
|
|
2162
2212
|
}
|
|
2163
2213
|
function FetchResponseToJSON(json) {
|
|
@@ -2176,10 +2226,43 @@ function FetchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2176
2226
|
"payment_status": value["paymentStatus"],
|
|
2177
2227
|
"tx_hash": value["txHash"],
|
|
2178
2228
|
"protocol": value["protocol"],
|
|
2179
|
-
"artifact_id": value["artifactId"]
|
|
2229
|
+
"artifact_id": value["artifactId"],
|
|
2230
|
+
"purchase_id": value["purchaseId"]
|
|
2180
2231
|
};
|
|
2181
2232
|
}
|
|
2182
2233
|
|
|
2234
|
+
// src/generated/models/GetPurchaseIdParameter.ts
|
|
2235
|
+
function GetPurchaseIdParameterFromJSON(json) {
|
|
2236
|
+
return GetPurchaseIdParameterFromJSONTyped(json, false);
|
|
2237
|
+
}
|
|
2238
|
+
function GetPurchaseIdParameterFromJSONTyped(json, ignoreDiscriminator) {
|
|
2239
|
+
if (json == null) {
|
|
2240
|
+
return json;
|
|
2241
|
+
}
|
|
2242
|
+
if (typeof json === "number") {
|
|
2243
|
+
return json;
|
|
2244
|
+
}
|
|
2245
|
+
if (typeof json === "string") {
|
|
2246
|
+
return json;
|
|
2247
|
+
}
|
|
2248
|
+
return {};
|
|
2249
|
+
}
|
|
2250
|
+
function GetPurchaseIdParameterToJSON(json) {
|
|
2251
|
+
return GetPurchaseIdParameterToJSONTyped(json, false);
|
|
2252
|
+
}
|
|
2253
|
+
function GetPurchaseIdParameterToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2254
|
+
if (value == null) {
|
|
2255
|
+
return value;
|
|
2256
|
+
}
|
|
2257
|
+
if (typeof value === "number") {
|
|
2258
|
+
return value;
|
|
2259
|
+
}
|
|
2260
|
+
if (typeof value === "string") {
|
|
2261
|
+
return value;
|
|
2262
|
+
}
|
|
2263
|
+
return {};
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2183
2266
|
// src/generated/models/PrincipalWallet.ts
|
|
2184
2267
|
function instanceOfPrincipalWallet(value) {
|
|
2185
2268
|
if (!("address" in value) || value["address"] === void 0) return false;
|
|
@@ -2692,6 +2775,7 @@ function PurchaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2692
2775
|
}
|
|
2693
2776
|
return {
|
|
2694
2777
|
"id": json["id"],
|
|
2778
|
+
"purchaseId": json["purchase_id"] == null ? void 0 : json["purchase_id"],
|
|
2695
2779
|
"status": json["status"],
|
|
2696
2780
|
"amountUsd": json["amount_usd"],
|
|
2697
2781
|
"recipientAddress": json["recipient_address"],
|
|
@@ -2718,6 +2802,7 @@ function PurchaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2718
2802
|
}
|
|
2719
2803
|
return {
|
|
2720
2804
|
"id": value["id"],
|
|
2805
|
+
"purchase_id": value["purchaseId"],
|
|
2721
2806
|
"status": value["status"],
|
|
2722
2807
|
"amount_usd": value["amountUsd"],
|
|
2723
2808
|
"recipient_address": value["recipientAddress"],
|
|
@@ -2926,6 +3011,11 @@ var SearchWeftFetchCompatibilityStateEnum = {
|
|
|
2926
3011
|
Unsupported: "unsupported",
|
|
2927
3012
|
Unknown: "unknown"
|
|
2928
3013
|
};
|
|
3014
|
+
var SearchWeftFetchCompatibilityCoverageEnum = {
|
|
3015
|
+
TerminalResponse: "terminal_response",
|
|
3016
|
+
SubmissionOnly: "submission_only",
|
|
3017
|
+
None: "none"
|
|
3018
|
+
};
|
|
2929
3019
|
function instanceOfSearchWeftFetchCompatibility(value) {
|
|
2930
3020
|
if (!("state" in value) || value["state"] === void 0) return false;
|
|
2931
3021
|
if (!("reason" in value) || value["reason"] === void 0) return false;
|
|
@@ -2942,7 +3032,8 @@ function SearchWeftFetchCompatibilityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2942
3032
|
return {
|
|
2943
3033
|
"state": json["state"],
|
|
2944
3034
|
"reason": json["reason"],
|
|
2945
|
-
"contractVersion": json["contract_version"]
|
|
3035
|
+
"contractVersion": json["contract_version"],
|
|
3036
|
+
"coverage": json["coverage"] == null ? void 0 : json["coverage"]
|
|
2946
3037
|
};
|
|
2947
3038
|
}
|
|
2948
3039
|
function SearchWeftFetchCompatibilityToJSON(json) {
|
|
@@ -2955,7 +3046,8 @@ function SearchWeftFetchCompatibilityToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
2955
3046
|
return {
|
|
2956
3047
|
"state": value["state"],
|
|
2957
3048
|
"reason": value["reason"],
|
|
2958
|
-
"contract_version": value["contractVersion"]
|
|
3049
|
+
"contract_version": value["contractVersion"],
|
|
3050
|
+
"coverage": value["coverage"]
|
|
2959
3051
|
};
|
|
2960
3052
|
}
|
|
2961
3053
|
|
|
@@ -3049,6 +3141,331 @@ function SearchCapabilityRefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3049
3141
|
};
|
|
3050
3142
|
}
|
|
3051
3143
|
|
|
3144
|
+
// src/generated/models/SearchCompactAccessPrice.ts
|
|
3145
|
+
function instanceOfSearchCompactAccessPrice(value) {
|
|
3146
|
+
return true;
|
|
3147
|
+
}
|
|
3148
|
+
function SearchCompactAccessPriceFromJSON(json) {
|
|
3149
|
+
return SearchCompactAccessPriceFromJSONTyped(json, false);
|
|
3150
|
+
}
|
|
3151
|
+
function SearchCompactAccessPriceFromJSONTyped(json, ignoreDiscriminator) {
|
|
3152
|
+
if (json == null) {
|
|
3153
|
+
return json;
|
|
3154
|
+
}
|
|
3155
|
+
return {
|
|
3156
|
+
"kind": json["kind"] == null ? void 0 : json["kind"],
|
|
3157
|
+
"indexedUsd": json["indexed_usd"] == null ? void 0 : json["indexed_usd"],
|
|
3158
|
+
"unit": json["unit"] == null ? void 0 : json["unit"],
|
|
3159
|
+
"hint": json["hint"] == null ? void 0 : json["hint"]
|
|
3160
|
+
};
|
|
3161
|
+
}
|
|
3162
|
+
function SearchCompactAccessPriceToJSON(json) {
|
|
3163
|
+
return SearchCompactAccessPriceToJSONTyped(json, false);
|
|
3164
|
+
}
|
|
3165
|
+
function SearchCompactAccessPriceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3166
|
+
if (value == null) {
|
|
3167
|
+
return value;
|
|
3168
|
+
}
|
|
3169
|
+
return {
|
|
3170
|
+
"kind": value["kind"],
|
|
3171
|
+
"indexed_usd": value["indexedUsd"],
|
|
3172
|
+
"unit": value["unit"],
|
|
3173
|
+
"hint": value["hint"]
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
// src/generated/models/SearchCompactAccess.ts
|
|
3178
|
+
function instanceOfSearchCompactAccess(value) {
|
|
3179
|
+
return true;
|
|
3180
|
+
}
|
|
3181
|
+
function SearchCompactAccessFromJSON(json) {
|
|
3182
|
+
return SearchCompactAccessFromJSONTyped(json, false);
|
|
3183
|
+
}
|
|
3184
|
+
function SearchCompactAccessFromJSONTyped(json, ignoreDiscriminator) {
|
|
3185
|
+
if (json == null) {
|
|
3186
|
+
return json;
|
|
3187
|
+
}
|
|
3188
|
+
return {
|
|
3189
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
3190
|
+
"protocol": json["protocol"] == null ? void 0 : json["protocol"],
|
|
3191
|
+
"weftFetch": json["weft_fetch"] == null ? void 0 : json["weft_fetch"],
|
|
3192
|
+
"price": json["price"] == null ? void 0 : SearchCompactAccessPriceFromJSON(json["price"])
|
|
3193
|
+
};
|
|
3194
|
+
}
|
|
3195
|
+
function SearchCompactAccessToJSON(json) {
|
|
3196
|
+
return SearchCompactAccessToJSONTyped(json, false);
|
|
3197
|
+
}
|
|
3198
|
+
function SearchCompactAccessToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3199
|
+
if (value == null) {
|
|
3200
|
+
return value;
|
|
3201
|
+
}
|
|
3202
|
+
return {
|
|
3203
|
+
"id": value["id"],
|
|
3204
|
+
"protocol": value["protocol"],
|
|
3205
|
+
"weft_fetch": value["weftFetch"],
|
|
3206
|
+
"price": SearchCompactAccessPriceToJSON(value["price"])
|
|
3207
|
+
};
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
// src/generated/models/SearchCompactNextCall.ts
|
|
3211
|
+
var SearchCompactNextCallMethodEnum = {
|
|
3212
|
+
Post: "POST"
|
|
3213
|
+
};
|
|
3214
|
+
var SearchCompactNextCallPathEnum = {
|
|
3215
|
+
ApiV1Fetch: "/api/v1/fetch"
|
|
3216
|
+
};
|
|
3217
|
+
function instanceOfSearchCompactNextCall(value) {
|
|
3218
|
+
if (!("method" in value) || value["method"] === void 0) return false;
|
|
3219
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
3220
|
+
if (!("body" in value) || value["body"] === void 0) return false;
|
|
3221
|
+
if (!("fill" in value) || value["fill"] === void 0) return false;
|
|
3222
|
+
return true;
|
|
3223
|
+
}
|
|
3224
|
+
function SearchCompactNextCallFromJSON(json) {
|
|
3225
|
+
return SearchCompactNextCallFromJSONTyped(json, false);
|
|
3226
|
+
}
|
|
3227
|
+
function SearchCompactNextCallFromJSONTyped(json, ignoreDiscriminator) {
|
|
3228
|
+
if (json == null) {
|
|
3229
|
+
return json;
|
|
3230
|
+
}
|
|
3231
|
+
return {
|
|
3232
|
+
"method": json["method"],
|
|
3233
|
+
"path": json["path"],
|
|
3234
|
+
"body": json["body"],
|
|
3235
|
+
"fill": json["fill"]
|
|
3236
|
+
};
|
|
3237
|
+
}
|
|
3238
|
+
function SearchCompactNextCallToJSON(json) {
|
|
3239
|
+
return SearchCompactNextCallToJSONTyped(json, false);
|
|
3240
|
+
}
|
|
3241
|
+
function SearchCompactNextCallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3242
|
+
if (value == null) {
|
|
3243
|
+
return value;
|
|
3244
|
+
}
|
|
3245
|
+
return {
|
|
3246
|
+
"method": value["method"],
|
|
3247
|
+
"path": value["path"],
|
|
3248
|
+
"body": value["body"],
|
|
3249
|
+
"fill": value["fill"]
|
|
3250
|
+
};
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
// src/generated/models/SearchCompactResultBlockedScopesInner.ts
|
|
3254
|
+
function instanceOfSearchCompactResultBlockedScopesInner(value) {
|
|
3255
|
+
return true;
|
|
3256
|
+
}
|
|
3257
|
+
function SearchCompactResultBlockedScopesInnerFromJSON(json) {
|
|
3258
|
+
return SearchCompactResultBlockedScopesInnerFromJSONTyped(json, false);
|
|
3259
|
+
}
|
|
3260
|
+
function SearchCompactResultBlockedScopesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
3261
|
+
if (json == null) {
|
|
3262
|
+
return json;
|
|
3263
|
+
}
|
|
3264
|
+
return {
|
|
3265
|
+
"scope": json["scope"] == null ? void 0 : json["scope"],
|
|
3266
|
+
"state": json["state"] == null ? void 0 : json["state"]
|
|
3267
|
+
};
|
|
3268
|
+
}
|
|
3269
|
+
function SearchCompactResultBlockedScopesInnerToJSON(json) {
|
|
3270
|
+
return SearchCompactResultBlockedScopesInnerToJSONTyped(json, false);
|
|
3271
|
+
}
|
|
3272
|
+
function SearchCompactResultBlockedScopesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3273
|
+
if (value == null) {
|
|
3274
|
+
return value;
|
|
3275
|
+
}
|
|
3276
|
+
return {
|
|
3277
|
+
"scope": value["scope"],
|
|
3278
|
+
"state": value["state"]
|
|
3279
|
+
};
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
// src/generated/models/SearchCompactResultOperation.ts
|
|
3283
|
+
function instanceOfSearchCompactResultOperation(value) {
|
|
3284
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3285
|
+
return true;
|
|
3286
|
+
}
|
|
3287
|
+
function SearchCompactResultOperationFromJSON(json) {
|
|
3288
|
+
return SearchCompactResultOperationFromJSONTyped(json, false);
|
|
3289
|
+
}
|
|
3290
|
+
function SearchCompactResultOperationFromJSONTyped(json, ignoreDiscriminator) {
|
|
3291
|
+
if (json == null) {
|
|
3292
|
+
return json;
|
|
3293
|
+
}
|
|
3294
|
+
return {
|
|
3295
|
+
"id": json["id"],
|
|
3296
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
3297
|
+
"description": json["description"] == null ? void 0 : json["description"]
|
|
3298
|
+
};
|
|
3299
|
+
}
|
|
3300
|
+
function SearchCompactResultOperationToJSON(json) {
|
|
3301
|
+
return SearchCompactResultOperationToJSONTyped(json, false);
|
|
3302
|
+
}
|
|
3303
|
+
function SearchCompactResultOperationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3304
|
+
if (value == null) {
|
|
3305
|
+
return value;
|
|
3306
|
+
}
|
|
3307
|
+
return {
|
|
3308
|
+
"id": value["id"],
|
|
3309
|
+
"name": value["name"],
|
|
3310
|
+
"description": value["description"]
|
|
3311
|
+
};
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
// src/generated/models/SearchHelperDocs.ts
|
|
3315
|
+
function instanceOfSearchHelperDocs(value) {
|
|
3316
|
+
return true;
|
|
3317
|
+
}
|
|
3318
|
+
function SearchHelperDocsFromJSON(json) {
|
|
3319
|
+
return SearchHelperDocsFromJSONTyped(json, false);
|
|
3320
|
+
}
|
|
3321
|
+
function SearchHelperDocsFromJSONTyped(json, ignoreDiscriminator) {
|
|
3322
|
+
if (json == null) {
|
|
3323
|
+
return json;
|
|
3324
|
+
}
|
|
3325
|
+
return {
|
|
3326
|
+
"website": json["website"] == null ? void 0 : json["website"],
|
|
3327
|
+
"homepage": json["homepage"] == null ? void 0 : json["homepage"],
|
|
3328
|
+
"api": json["api"] == null ? void 0 : json["api"],
|
|
3329
|
+
"llmsTxt": json["llms_txt"] == null ? void 0 : json["llms_txt"]
|
|
3330
|
+
};
|
|
3331
|
+
}
|
|
3332
|
+
function SearchHelperDocsToJSON(json) {
|
|
3333
|
+
return SearchHelperDocsToJSONTyped(json, false);
|
|
3334
|
+
}
|
|
3335
|
+
function SearchHelperDocsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3336
|
+
if (value == null) {
|
|
3337
|
+
return value;
|
|
3338
|
+
}
|
|
3339
|
+
return {
|
|
3340
|
+
"website": value["website"],
|
|
3341
|
+
"homepage": value["homepage"],
|
|
3342
|
+
"api": value["api"],
|
|
3343
|
+
"llms_txt": value["llmsTxt"]
|
|
3344
|
+
};
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
// src/generated/models/SearchCompactResultAttribution.ts
|
|
3348
|
+
function instanceOfSearchCompactResultAttribution(value) {
|
|
3349
|
+
return true;
|
|
3350
|
+
}
|
|
3351
|
+
function SearchCompactResultAttributionFromJSON(json) {
|
|
3352
|
+
return SearchCompactResultAttributionFromJSONTyped(json, false);
|
|
3353
|
+
}
|
|
3354
|
+
function SearchCompactResultAttributionFromJSONTyped(json, ignoreDiscriminator) {
|
|
3355
|
+
if (json == null) {
|
|
3356
|
+
return json;
|
|
3357
|
+
}
|
|
3358
|
+
return {
|
|
3359
|
+
"searchId": json["search_id"] == null ? void 0 : json["search_id"],
|
|
3360
|
+
"operationId": json["operation_id"] == null ? void 0 : json["operation_id"],
|
|
3361
|
+
"accessMethodId": json["access_method_id"] == null ? void 0 : json["access_method_id"]
|
|
3362
|
+
};
|
|
3363
|
+
}
|
|
3364
|
+
function SearchCompactResultAttributionToJSON(json) {
|
|
3365
|
+
return SearchCompactResultAttributionToJSONTyped(json, false);
|
|
3366
|
+
}
|
|
3367
|
+
function SearchCompactResultAttributionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3368
|
+
if (value == null) {
|
|
3369
|
+
return value;
|
|
3370
|
+
}
|
|
3371
|
+
return {
|
|
3372
|
+
"search_id": value["searchId"],
|
|
3373
|
+
"operation_id": value["operationId"],
|
|
3374
|
+
"access_method_id": value["accessMethodId"]
|
|
3375
|
+
};
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
// src/generated/models/SearchCompactResultProvider.ts
|
|
3379
|
+
function instanceOfSearchCompactResultProvider(value) {
|
|
3380
|
+
return true;
|
|
3381
|
+
}
|
|
3382
|
+
function SearchCompactResultProviderFromJSON(json) {
|
|
3383
|
+
return SearchCompactResultProviderFromJSONTyped(json, false);
|
|
3384
|
+
}
|
|
3385
|
+
function SearchCompactResultProviderFromJSONTyped(json, ignoreDiscriminator) {
|
|
3386
|
+
if (json == null) {
|
|
3387
|
+
return json;
|
|
3388
|
+
}
|
|
3389
|
+
return {
|
|
3390
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
3391
|
+
"name": json["name"] == null ? void 0 : json["name"]
|
|
3392
|
+
};
|
|
3393
|
+
}
|
|
3394
|
+
function SearchCompactResultProviderToJSON(json) {
|
|
3395
|
+
return SearchCompactResultProviderToJSONTyped(json, false);
|
|
3396
|
+
}
|
|
3397
|
+
function SearchCompactResultProviderToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3398
|
+
if (value == null) {
|
|
3399
|
+
return value;
|
|
3400
|
+
}
|
|
3401
|
+
return {
|
|
3402
|
+
"id": value["id"],
|
|
3403
|
+
"name": value["name"]
|
|
3404
|
+
};
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
// src/generated/models/SearchCompactResult.ts
|
|
3408
|
+
function instanceOfSearchCompactResult(value) {
|
|
3409
|
+
if (!("operation" in value) || value["operation"] === void 0) return false;
|
|
3410
|
+
if (!("access" in value) || value["access"] === void 0) return false;
|
|
3411
|
+
if (!("contractUrl" in value) || value["contractUrl"] === void 0) return false;
|
|
3412
|
+
if (!("contractDetail" in value) || value["contractDetail"] === void 0) return false;
|
|
3413
|
+
if (!("readiness" in value) || value["readiness"] === void 0) return false;
|
|
3414
|
+
return true;
|
|
3415
|
+
}
|
|
3416
|
+
function SearchCompactResultFromJSON(json) {
|
|
3417
|
+
return SearchCompactResultFromJSONTyped(json, false);
|
|
3418
|
+
}
|
|
3419
|
+
function SearchCompactResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
3420
|
+
if (json == null) {
|
|
3421
|
+
return json;
|
|
3422
|
+
}
|
|
3423
|
+
return {
|
|
3424
|
+
"provider": json["provider"] == null ? void 0 : SearchCompactResultProviderFromJSON(json["provider"]),
|
|
3425
|
+
"operation": SearchCompactResultOperationFromJSON(json["operation"]),
|
|
3426
|
+
"inputs": json["inputs"] == null ? void 0 : json["inputs"],
|
|
3427
|
+
"request": json["request"] == null ? void 0 : json["request"],
|
|
3428
|
+
"example": json["example"] == null ? void 0 : json["example"],
|
|
3429
|
+
"access": SearchCompactAccessFromJSON(json["access"]),
|
|
3430
|
+
"attribution": json["attribution"] == null ? void 0 : SearchCompactResultAttributionFromJSON(json["attribution"]),
|
|
3431
|
+
"output": json["output"] == null ? void 0 : json["output"],
|
|
3432
|
+
"docs": json["docs"] == null ? void 0 : SearchHelperDocsFromJSON(json["docs"]),
|
|
3433
|
+
"contractUrl": json["contract_url"],
|
|
3434
|
+
"contractDetail": json["contract_detail"],
|
|
3435
|
+
"completion": json["completion"] == null ? void 0 : json["completion"],
|
|
3436
|
+
"blockedScopes": json["blocked_scopes"] == null ? void 0 : json["blocked_scopes"].map(SearchCompactResultBlockedScopesInnerFromJSON),
|
|
3437
|
+
"contractGaps": json["contract_gaps"] == null ? void 0 : json["contract_gaps"],
|
|
3438
|
+
"readiness": mapValues(json["readiness"], SearchCompactResultBlockedScopesInnerFromJSON),
|
|
3439
|
+
"nextCall": json["next_call"] == null ? void 0 : SearchCompactNextCallFromJSON(json["next_call"])
|
|
3440
|
+
};
|
|
3441
|
+
}
|
|
3442
|
+
function SearchCompactResultToJSON(json) {
|
|
3443
|
+
return SearchCompactResultToJSONTyped(json, false);
|
|
3444
|
+
}
|
|
3445
|
+
function SearchCompactResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3446
|
+
if (value == null) {
|
|
3447
|
+
return value;
|
|
3448
|
+
}
|
|
3449
|
+
return {
|
|
3450
|
+
"provider": SearchCompactResultProviderToJSON(value["provider"]),
|
|
3451
|
+
"operation": SearchCompactResultOperationToJSON(value["operation"]),
|
|
3452
|
+
"inputs": value["inputs"],
|
|
3453
|
+
"request": value["request"],
|
|
3454
|
+
"example": value["example"],
|
|
3455
|
+
"access": SearchCompactAccessToJSON(value["access"]),
|
|
3456
|
+
"attribution": SearchCompactResultAttributionToJSON(value["attribution"]),
|
|
3457
|
+
"output": value["output"],
|
|
3458
|
+
"docs": SearchHelperDocsToJSON(value["docs"]),
|
|
3459
|
+
"contract_url": value["contractUrl"],
|
|
3460
|
+
"contract_detail": value["contractDetail"],
|
|
3461
|
+
"completion": value["completion"],
|
|
3462
|
+
"blocked_scopes": value["blockedScopes"] == null ? void 0 : value["blockedScopes"].map(SearchCompactResultBlockedScopesInnerToJSON),
|
|
3463
|
+
"contract_gaps": value["contractGaps"],
|
|
3464
|
+
"readiness": mapValues(value["readiness"], SearchCompactResultBlockedScopesInnerToJSON),
|
|
3465
|
+
"next_call": SearchCompactNextCallToJSON(value["nextCall"])
|
|
3466
|
+
};
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3052
3469
|
// src/generated/models/SearchCuratedCallability.ts
|
|
3053
3470
|
var SearchCuratedCallabilityStateEnum = {
|
|
3054
3471
|
Complete: "complete",
|
|
@@ -3309,39 +3726,6 @@ function SearchPaymentOfferToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3309
3726
|
};
|
|
3310
3727
|
}
|
|
3311
3728
|
|
|
3312
|
-
// src/generated/models/SearchHelperDocs.ts
|
|
3313
|
-
function instanceOfSearchHelperDocs(value) {
|
|
3314
|
-
return true;
|
|
3315
|
-
}
|
|
3316
|
-
function SearchHelperDocsFromJSON(json) {
|
|
3317
|
-
return SearchHelperDocsFromJSONTyped(json, false);
|
|
3318
|
-
}
|
|
3319
|
-
function SearchHelperDocsFromJSONTyped(json, ignoreDiscriminator) {
|
|
3320
|
-
if (json == null) {
|
|
3321
|
-
return json;
|
|
3322
|
-
}
|
|
3323
|
-
return {
|
|
3324
|
-
"website": json["website"] == null ? void 0 : json["website"],
|
|
3325
|
-
"homepage": json["homepage"] == null ? void 0 : json["homepage"],
|
|
3326
|
-
"api": json["api"] == null ? void 0 : json["api"],
|
|
3327
|
-
"llmsTxt": json["llms_txt"] == null ? void 0 : json["llms_txt"]
|
|
3328
|
-
};
|
|
3329
|
-
}
|
|
3330
|
-
function SearchHelperDocsToJSON(json) {
|
|
3331
|
-
return SearchHelperDocsToJSONTyped(json, false);
|
|
3332
|
-
}
|
|
3333
|
-
function SearchHelperDocsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3334
|
-
if (value == null) {
|
|
3335
|
-
return value;
|
|
3336
|
-
}
|
|
3337
|
-
return {
|
|
3338
|
-
"website": value["website"],
|
|
3339
|
-
"homepage": value["homepage"],
|
|
3340
|
-
"api": value["api"],
|
|
3341
|
-
"llms_txt": value["llmsTxt"]
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
|
|
3345
3729
|
// src/generated/models/SearchEndpointPrice.ts
|
|
3346
3730
|
var SearchEndpointPriceSourceEnum = {
|
|
3347
3731
|
Probe: "probe",
|
|
@@ -3464,6 +3848,7 @@ var SearchErrorResponseErrorEnum = {
|
|
|
3464
3848
|
InvalidQuery: "INVALID_QUERY",
|
|
3465
3849
|
InvalidMaxResults: "INVALID_MAX_RESULTS",
|
|
3466
3850
|
InvalidFilters: "INVALID_FILTERS",
|
|
3851
|
+
InvalidView: "INVALID_VIEW",
|
|
3467
3852
|
UnknownParameter: "UNKNOWN_PARAMETER",
|
|
3468
3853
|
SearchUpstreamError: "SEARCH_UPSTREAM_ERROR",
|
|
3469
3854
|
SearchBackendMisconfigured: "SEARCH_BACKEND_MISCONFIGURED"
|
|
@@ -3845,6 +4230,10 @@ function SearchProviderRefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3845
4230
|
}
|
|
3846
4231
|
|
|
3847
4232
|
// src/generated/models/SearchRequest.ts
|
|
4233
|
+
var SearchRequestViewEnum = {
|
|
4234
|
+
Full: "full",
|
|
4235
|
+
Compact: "compact"
|
|
4236
|
+
};
|
|
3848
4237
|
function instanceOfSearchRequest(value) {
|
|
3849
4238
|
if (!("query" in value) || value["query"] === void 0) return false;
|
|
3850
4239
|
return true;
|
|
@@ -3859,7 +4248,8 @@ function SearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
3859
4248
|
return {
|
|
3860
4249
|
"query": json["query"],
|
|
3861
4250
|
"maxResults": json["max_results"] == null ? void 0 : json["max_results"],
|
|
3862
|
-
"filters": json["filters"] == null ? void 0 : SearchFilterSpecFromJSON(json["filters"])
|
|
4251
|
+
"filters": json["filters"] == null ? void 0 : SearchFilterSpecFromJSON(json["filters"]),
|
|
4252
|
+
"view": json["view"] == null ? void 0 : json["view"]
|
|
3863
4253
|
};
|
|
3864
4254
|
}
|
|
3865
4255
|
function SearchRequestToJSON(json) {
|
|
@@ -3872,7 +4262,8 @@ function SearchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3872
4262
|
return {
|
|
3873
4263
|
"query": value["query"],
|
|
3874
4264
|
"max_results": value["maxResults"],
|
|
3875
|
-
"filters": SearchFilterSpecToJSON(value["filters"])
|
|
4265
|
+
"filters": SearchFilterSpecToJSON(value["filters"]),
|
|
4266
|
+
"view": value["view"]
|
|
3876
4267
|
};
|
|
3877
4268
|
}
|
|
3878
4269
|
|
|
@@ -3972,6 +4363,10 @@ var SearchResponseReasonEnum = {
|
|
|
3972
4363
|
UnsupportedFilterValue: "unsupported_filter_value",
|
|
3973
4364
|
IndexUnavailable: "index_unavailable"
|
|
3974
4365
|
};
|
|
4366
|
+
var SearchResponseViewEnum = {
|
|
4367
|
+
Full: "full",
|
|
4368
|
+
Compact: "compact"
|
|
4369
|
+
};
|
|
3975
4370
|
function instanceOfSearchResponse(value) {
|
|
3976
4371
|
if (!("queryTraceId" in value) || value["queryTraceId"] === void 0) return false;
|
|
3977
4372
|
if (!("query" in value) || value["query"] === void 0) return false;
|
|
@@ -4006,7 +4401,10 @@ function SearchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4006
4401
|
"matchQuality": json["match_quality"] == null ? void 0 : json["match_quality"],
|
|
4007
4402
|
"reason": json["reason"] == null ? void 0 : json["reason"],
|
|
4008
4403
|
"suggestion": json["suggestion"] == null ? void 0 : json["suggestion"],
|
|
4009
|
-
"results": json["results"].map(SearchResultFromJSON)
|
|
4404
|
+
"results": json["results"].map(SearchResultFromJSON),
|
|
4405
|
+
"view": json["view"] == null ? void 0 : json["view"],
|
|
4406
|
+
"compactResults": json["compact_results"] == null ? void 0 : json["compact_results"].map(SearchCompactResultFromJSON),
|
|
4407
|
+
"omittedResults": json["omitted_results"] == null ? void 0 : json["omitted_results"]
|
|
4010
4408
|
};
|
|
4011
4409
|
}
|
|
4012
4410
|
function SearchResponseToJSON(json) {
|
|
@@ -4034,7 +4432,10 @@ function SearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4034
4432
|
"match_quality": value["matchQuality"],
|
|
4035
4433
|
"reason": value["reason"],
|
|
4036
4434
|
"suggestion": value["suggestion"],
|
|
4037
|
-
"results": value["results"].map(SearchResultToJSON)
|
|
4435
|
+
"results": value["results"].map(SearchResultToJSON),
|
|
4436
|
+
"view": value["view"],
|
|
4437
|
+
"compact_results": value["compactResults"] == null ? void 0 : value["compactResults"].map(SearchCompactResultToJSON),
|
|
4438
|
+
"omitted_results": value["omittedResults"]
|
|
4038
4439
|
};
|
|
4039
4440
|
}
|
|
4040
4441
|
|
|
@@ -4610,7 +5011,7 @@ var DocumentationApi = class extends BaseAPI {
|
|
|
4610
5011
|
// src/generated/apis/FetchApi.ts
|
|
4611
5012
|
var FetchApi = class extends BaseAPI {
|
|
4612
5013
|
/**
|
|
4613
|
-
* Universal x402/MPP fetch proxy. The caller provides a target `url`, a merchant-principal `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer\'s policy (`max_tx_usd`, daily/weekly limits). 4. If refill is allowed and an eligible mainnet MPP challenge finds its Tempo token short, creates or adopts a buyer-owned Base-to-Tempo refill and returns `409 FUNDING_PENDING` with `details.reason=funding_active`. If an overlapping payment invalidates the balance observation before a bridge is created, the same retryable response carries `details.reason=balance_changed`. The caller retries the identical fetch after `details.retry_after_seconds`; that later request obtains a fresh challenge and reruns rail selection and all payment controls. 5. Authorizes payment from the buyer\'s wallet on the selected rail. 6. Replays the request with the protocol-specific payment credential. 7. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and `
|
|
5014
|
+
* Universal x402/MPP fetch proxy. The caller provides a target `url`, a merchant-principal `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer\'s policy (`max_tx_usd`, daily/weekly limits). 4. If refill is allowed and an eligible mainnet MPP challenge finds its Tempo token short, creates or adopts a buyer-owned Base-to-Tempo refill and returns `409 FUNDING_PENDING` with `details.reason=funding_active`. If an overlapping payment invalidates the balance observation before a bridge is created, the same retryable response carries `details.reason=balance_changed`. The caller retries the identical fetch after `details.retry_after_seconds`; that later request obtains a fresh challenge and reruns rail selection and all payment controls. 5. Authorizes payment from the buyer\'s wallet on the selected rail. 6. Replays the request with the protocol-specific payment credential. 7. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, `protocol`, and `purchase_id`. `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`. `purchase_id` is the id that `GET /api/v1/purchases/{id}` accepts, so a caller can read how a pending charge ends. **Opt-in safety controls:** `allow_tempo_refill: false` prevents this request from creating, adopting, or enqueueing a Base-to-Tempo bridge. A Tempo shortfall returns `402 INSUFFICIENT_BALANCE`; unrelated bridges and their jobs remain unchanged. `access_method_id` is advisory and does not enforce a payment rail. `max_total_cost_usd` is an all-in ceiling covering merchant principal, network gas, provider fees, and prerequisite buyer-paid operations. It disables refill; explicitly combining it with `allow_tempo_refill: true` returns `422 INCOMPATIBLE_FETCH_CONTROLS`. Current wallet integrations provide no supported binding all-in fee guarantee. Therefore all-in requests return `402 TOTAL_COST_UNVERIFIABLE` before payment preparation, approval, reservation, or refill. This also refuses recovery of older payments and SIWX wallet signing; it admits no positive paid route. Increasing the ceiling does not resolve missing fee authority. Omitted controls preserve existing behavior. Ordinary non-402 merchant responses retain `MERCHANT_RETURNED_NON_402`. Stored-result replay is historical payment information, not a new bounded authorization. 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.
|
|
4614
5015
|
* Pay-and-fetch any URL (x402/MPP proxy)
|
|
4615
5016
|
*/
|
|
4616
5017
|
async fetchRaw(requestParameters, initOverrides) {
|
|
@@ -4644,7 +5045,7 @@ var FetchApi = class extends BaseAPI {
|
|
|
4644
5045
|
return new JSONApiResponse(response, (jsonValue) => FetchResponseFromJSON(jsonValue));
|
|
4645
5046
|
}
|
|
4646
5047
|
/**
|
|
4647
|
-
* Universal x402/MPP fetch proxy. The caller provides a target `url`, a merchant-principal `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer\'s policy (`max_tx_usd`, daily/weekly limits). 4. If refill is allowed and an eligible mainnet MPP challenge finds its Tempo token short, creates or adopts a buyer-owned Base-to-Tempo refill and returns `409 FUNDING_PENDING` with `details.reason=funding_active`. If an overlapping payment invalidates the balance observation before a bridge is created, the same retryable response carries `details.reason=balance_changed`. The caller retries the identical fetch after `details.retry_after_seconds`; that later request obtains a fresh challenge and reruns rail selection and all payment controls. 5. Authorizes payment from the buyer\'s wallet on the selected rail. 6. Replays the request with the protocol-specific payment credential. 7. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, and `
|
|
5048
|
+
* Universal x402/MPP fetch proxy. The caller provides a target `url`, a merchant-principal `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer\'s policy (`max_tx_usd`, daily/weekly limits). 4. If refill is allowed and an eligible mainnet MPP challenge finds its Tempo token short, creates or adopts a buyer-owned Base-to-Tempo refill and returns `409 FUNDING_PENDING` with `details.reason=funding_active`. If an overlapping payment invalidates the balance observation before a bridge is created, the same retryable response carries `details.reason=balance_changed`. The caller retries the identical fetch after `details.retry_after_seconds`; that later request obtains a fresh challenge and reruns rail selection and all payment controls. 5. Authorizes payment from the buyer\'s wallet on the selected rail. 6. Replays the request with the protocol-specific payment credential. 7. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, `protocol`, and `purchase_id`. `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`. `purchase_id` is the id that `GET /api/v1/purchases/{id}` accepts, so a caller can read how a pending charge ends. **Opt-in safety controls:** `allow_tempo_refill: false` prevents this request from creating, adopting, or enqueueing a Base-to-Tempo bridge. A Tempo shortfall returns `402 INSUFFICIENT_BALANCE`; unrelated bridges and their jobs remain unchanged. `access_method_id` is advisory and does not enforce a payment rail. `max_total_cost_usd` is an all-in ceiling covering merchant principal, network gas, provider fees, and prerequisite buyer-paid operations. It disables refill; explicitly combining it with `allow_tempo_refill: true` returns `422 INCOMPATIBLE_FETCH_CONTROLS`. Current wallet integrations provide no supported binding all-in fee guarantee. Therefore all-in requests return `402 TOTAL_COST_UNVERIFIABLE` before payment preparation, approval, reservation, or refill. This also refuses recovery of older payments and SIWX wallet signing; it admits no positive paid route. Increasing the ceiling does not resolve missing fee authority. Omitted controls preserve existing behavior. Ordinary non-402 merchant responses retain `MERCHANT_RETURNED_NON_402`. Stored-result replay is historical payment information, not a new bounded authorization. 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.
|
|
4648
5049
|
* Pay-and-fetch any URL (x402/MPP proxy)
|
|
4649
5050
|
*/
|
|
4650
5051
|
async fetch(requestParameters, initOverrides) {
|
|
@@ -4844,7 +5245,7 @@ var ResourcesApi = class extends BaseAPI {
|
|
|
4844
5245
|
// src/generated/apis/SearchApi.ts
|
|
4845
5246
|
var SearchApi = class extends BaseAPI {
|
|
4846
5247
|
/**
|
|
4847
|
-
* 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.
|
|
5248
|
+
* 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. Compact view: send `view: \"compact\"` to get the agent view of the hosted MCP `weft_search` tool. Each result is a small contract for the next paid call (below 2,000 JSON bytes): typed inputs, the request recipe, one access method with price, attribution, a ready `next_call` to `POST /api/v1/fetch` when the request is determined, and the authenticated `contract_url` for the full contract. Use it when you give search results to a model. The compact rows are in `compact_results`; `results` is empty. The compact view is JSON only and needs the curated search backend.
|
|
4848
5249
|
* Search the Weft index
|
|
4849
5250
|
*/
|
|
4850
5251
|
async searchRaw(requestParameters, initOverrides) {
|
|
@@ -4875,7 +5276,7 @@ var SearchApi = class extends BaseAPI {
|
|
|
4875
5276
|
return new JSONApiResponse(response, (jsonValue) => SearchResponseFromJSON(jsonValue));
|
|
4876
5277
|
}
|
|
4877
5278
|
/**
|
|
4878
|
-
* 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.
|
|
5279
|
+
* 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. Compact view: send `view: \"compact\"` to get the agent view of the hosted MCP `weft_search` tool. Each result is a small contract for the next paid call (below 2,000 JSON bytes): typed inputs, the request recipe, one access method with price, attribution, a ready `next_call` to `POST /api/v1/fetch` when the request is determined, and the authenticated `contract_url` for the full contract. Use it when you give search results to a model. The compact rows are in `compact_results`; `results` is empty. The compact view is JSON only and needs the curated search backend.
|
|
4879
5280
|
* Search the Weft index
|
|
4880
5281
|
*/
|
|
4881
5282
|
async search(requestParameters, initOverrides) {
|
|
@@ -5329,6 +5730,10 @@ export {
|
|
|
5329
5730
|
FetchResponseProtocolEnum,
|
|
5330
5731
|
FetchResponseToJSON,
|
|
5331
5732
|
FetchResponseToJSONTyped,
|
|
5733
|
+
GetPurchaseIdParameterFromJSON,
|
|
5734
|
+
GetPurchaseIdParameterFromJSONTyped,
|
|
5735
|
+
GetPurchaseIdParameterToJSON,
|
|
5736
|
+
GetPurchaseIdParameterToJSONTyped,
|
|
5332
5737
|
InsufficientScopeResponseErrorEnum,
|
|
5333
5738
|
InsufficientScopeResponseFromJSON,
|
|
5334
5739
|
InsufficientScopeResponseFromJSONTyped,
|
|
@@ -5451,6 +5856,40 @@ export {
|
|
|
5451
5856
|
SearchCapabilityRefFromJSONTyped,
|
|
5452
5857
|
SearchCapabilityRefToJSON,
|
|
5453
5858
|
SearchCapabilityRefToJSONTyped,
|
|
5859
|
+
SearchCompactAccessFromJSON,
|
|
5860
|
+
SearchCompactAccessFromJSONTyped,
|
|
5861
|
+
SearchCompactAccessPriceFromJSON,
|
|
5862
|
+
SearchCompactAccessPriceFromJSONTyped,
|
|
5863
|
+
SearchCompactAccessPriceToJSON,
|
|
5864
|
+
SearchCompactAccessPriceToJSONTyped,
|
|
5865
|
+
SearchCompactAccessToJSON,
|
|
5866
|
+
SearchCompactAccessToJSONTyped,
|
|
5867
|
+
SearchCompactNextCallFromJSON,
|
|
5868
|
+
SearchCompactNextCallFromJSONTyped,
|
|
5869
|
+
SearchCompactNextCallMethodEnum,
|
|
5870
|
+
SearchCompactNextCallPathEnum,
|
|
5871
|
+
SearchCompactNextCallToJSON,
|
|
5872
|
+
SearchCompactNextCallToJSONTyped,
|
|
5873
|
+
SearchCompactResultAttributionFromJSON,
|
|
5874
|
+
SearchCompactResultAttributionFromJSONTyped,
|
|
5875
|
+
SearchCompactResultAttributionToJSON,
|
|
5876
|
+
SearchCompactResultAttributionToJSONTyped,
|
|
5877
|
+
SearchCompactResultBlockedScopesInnerFromJSON,
|
|
5878
|
+
SearchCompactResultBlockedScopesInnerFromJSONTyped,
|
|
5879
|
+
SearchCompactResultBlockedScopesInnerToJSON,
|
|
5880
|
+
SearchCompactResultBlockedScopesInnerToJSONTyped,
|
|
5881
|
+
SearchCompactResultFromJSON,
|
|
5882
|
+
SearchCompactResultFromJSONTyped,
|
|
5883
|
+
SearchCompactResultOperationFromJSON,
|
|
5884
|
+
SearchCompactResultOperationFromJSONTyped,
|
|
5885
|
+
SearchCompactResultOperationToJSON,
|
|
5886
|
+
SearchCompactResultOperationToJSONTyped,
|
|
5887
|
+
SearchCompactResultProviderFromJSON,
|
|
5888
|
+
SearchCompactResultProviderFromJSONTyped,
|
|
5889
|
+
SearchCompactResultProviderToJSON,
|
|
5890
|
+
SearchCompactResultProviderToJSONTyped,
|
|
5891
|
+
SearchCompactResultToJSON,
|
|
5892
|
+
SearchCompactResultToJSONTyped,
|
|
5454
5893
|
SearchCuratedCallabilityFromJSON,
|
|
5455
5894
|
SearchCuratedCallabilityFromJSONTyped,
|
|
5456
5895
|
SearchCuratedCallabilityStateEnum,
|
|
@@ -5543,6 +5982,7 @@ export {
|
|
|
5543
5982
|
SearchRequestFromJSONTyped,
|
|
5544
5983
|
SearchRequestToJSON,
|
|
5545
5984
|
SearchRequestToJSONTyped,
|
|
5985
|
+
SearchRequestViewEnum,
|
|
5546
5986
|
SearchResourceTypeFilterEqEnum,
|
|
5547
5987
|
SearchResourceTypeFilterFromJSON,
|
|
5548
5988
|
SearchResourceTypeFilterFromJSONTyped,
|
|
@@ -5558,6 +5998,7 @@ export {
|
|
|
5558
5998
|
SearchResponseServedFromEnum,
|
|
5559
5999
|
SearchResponseToJSON,
|
|
5560
6000
|
SearchResponseToJSONTyped,
|
|
6001
|
+
SearchResponseViewEnum,
|
|
5561
6002
|
SearchResponseWarningsInnerFromJSON,
|
|
5562
6003
|
SearchResponseWarningsInnerFromJSONTyped,
|
|
5563
6004
|
SearchResponseWarningsInnerToJSON,
|
|
@@ -5570,6 +6011,7 @@ export {
|
|
|
5570
6011
|
SearchStringSetFilterFromJSONTyped,
|
|
5571
6012
|
SearchStringSetFilterToJSON,
|
|
5572
6013
|
SearchStringSetFilterToJSONTyped,
|
|
6014
|
+
SearchWeftFetchCompatibilityCoverageEnum,
|
|
5573
6015
|
SearchWeftFetchCompatibilityFromJSON,
|
|
5574
6016
|
SearchWeftFetchCompatibilityFromJSONTyped,
|
|
5575
6017
|
SearchWeftFetchCompatibilityStateEnum,
|
|
@@ -5661,6 +6103,14 @@ export {
|
|
|
5661
6103
|
instanceOfResourceStats,
|
|
5662
6104
|
instanceOfSearchAccessMethod,
|
|
5663
6105
|
instanceOfSearchCapabilityRef,
|
|
6106
|
+
instanceOfSearchCompactAccess,
|
|
6107
|
+
instanceOfSearchCompactAccessPrice,
|
|
6108
|
+
instanceOfSearchCompactNextCall,
|
|
6109
|
+
instanceOfSearchCompactResult,
|
|
6110
|
+
instanceOfSearchCompactResultAttribution,
|
|
6111
|
+
instanceOfSearchCompactResultBlockedScopesInner,
|
|
6112
|
+
instanceOfSearchCompactResultOperation,
|
|
6113
|
+
instanceOfSearchCompactResultProvider,
|
|
5664
6114
|
instanceOfSearchCuratedCallability,
|
|
5665
6115
|
instanceOfSearchCuratedExecution,
|
|
5666
6116
|
instanceOfSearchCuratedOperation,
|