@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.js
CHANGED
|
@@ -147,6 +147,10 @@ __export(src_exports, {
|
|
|
147
147
|
FetchResponseProtocolEnum: () => FetchResponseProtocolEnum,
|
|
148
148
|
FetchResponseToJSON: () => FetchResponseToJSON,
|
|
149
149
|
FetchResponseToJSONTyped: () => FetchResponseToJSONTyped,
|
|
150
|
+
GetPurchaseIdParameterFromJSON: () => GetPurchaseIdParameterFromJSON,
|
|
151
|
+
GetPurchaseIdParameterFromJSONTyped: () => GetPurchaseIdParameterFromJSONTyped,
|
|
152
|
+
GetPurchaseIdParameterToJSON: () => GetPurchaseIdParameterToJSON,
|
|
153
|
+
GetPurchaseIdParameterToJSONTyped: () => GetPurchaseIdParameterToJSONTyped,
|
|
150
154
|
InsufficientScopeResponseErrorEnum: () => InsufficientScopeResponseErrorEnum,
|
|
151
155
|
InsufficientScopeResponseFromJSON: () => InsufficientScopeResponseFromJSON,
|
|
152
156
|
InsufficientScopeResponseFromJSONTyped: () => InsufficientScopeResponseFromJSONTyped,
|
|
@@ -269,6 +273,40 @@ __export(src_exports, {
|
|
|
269
273
|
SearchCapabilityRefFromJSONTyped: () => SearchCapabilityRefFromJSONTyped,
|
|
270
274
|
SearchCapabilityRefToJSON: () => SearchCapabilityRefToJSON,
|
|
271
275
|
SearchCapabilityRefToJSONTyped: () => SearchCapabilityRefToJSONTyped,
|
|
276
|
+
SearchCompactAccessFromJSON: () => SearchCompactAccessFromJSON,
|
|
277
|
+
SearchCompactAccessFromJSONTyped: () => SearchCompactAccessFromJSONTyped,
|
|
278
|
+
SearchCompactAccessPriceFromJSON: () => SearchCompactAccessPriceFromJSON,
|
|
279
|
+
SearchCompactAccessPriceFromJSONTyped: () => SearchCompactAccessPriceFromJSONTyped,
|
|
280
|
+
SearchCompactAccessPriceToJSON: () => SearchCompactAccessPriceToJSON,
|
|
281
|
+
SearchCompactAccessPriceToJSONTyped: () => SearchCompactAccessPriceToJSONTyped,
|
|
282
|
+
SearchCompactAccessToJSON: () => SearchCompactAccessToJSON,
|
|
283
|
+
SearchCompactAccessToJSONTyped: () => SearchCompactAccessToJSONTyped,
|
|
284
|
+
SearchCompactNextCallFromJSON: () => SearchCompactNextCallFromJSON,
|
|
285
|
+
SearchCompactNextCallFromJSONTyped: () => SearchCompactNextCallFromJSONTyped,
|
|
286
|
+
SearchCompactNextCallMethodEnum: () => SearchCompactNextCallMethodEnum,
|
|
287
|
+
SearchCompactNextCallPathEnum: () => SearchCompactNextCallPathEnum,
|
|
288
|
+
SearchCompactNextCallToJSON: () => SearchCompactNextCallToJSON,
|
|
289
|
+
SearchCompactNextCallToJSONTyped: () => SearchCompactNextCallToJSONTyped,
|
|
290
|
+
SearchCompactResultAttributionFromJSON: () => SearchCompactResultAttributionFromJSON,
|
|
291
|
+
SearchCompactResultAttributionFromJSONTyped: () => SearchCompactResultAttributionFromJSONTyped,
|
|
292
|
+
SearchCompactResultAttributionToJSON: () => SearchCompactResultAttributionToJSON,
|
|
293
|
+
SearchCompactResultAttributionToJSONTyped: () => SearchCompactResultAttributionToJSONTyped,
|
|
294
|
+
SearchCompactResultBlockedScopesInnerFromJSON: () => SearchCompactResultBlockedScopesInnerFromJSON,
|
|
295
|
+
SearchCompactResultBlockedScopesInnerFromJSONTyped: () => SearchCompactResultBlockedScopesInnerFromJSONTyped,
|
|
296
|
+
SearchCompactResultBlockedScopesInnerToJSON: () => SearchCompactResultBlockedScopesInnerToJSON,
|
|
297
|
+
SearchCompactResultBlockedScopesInnerToJSONTyped: () => SearchCompactResultBlockedScopesInnerToJSONTyped,
|
|
298
|
+
SearchCompactResultFromJSON: () => SearchCompactResultFromJSON,
|
|
299
|
+
SearchCompactResultFromJSONTyped: () => SearchCompactResultFromJSONTyped,
|
|
300
|
+
SearchCompactResultOperationFromJSON: () => SearchCompactResultOperationFromJSON,
|
|
301
|
+
SearchCompactResultOperationFromJSONTyped: () => SearchCompactResultOperationFromJSONTyped,
|
|
302
|
+
SearchCompactResultOperationToJSON: () => SearchCompactResultOperationToJSON,
|
|
303
|
+
SearchCompactResultOperationToJSONTyped: () => SearchCompactResultOperationToJSONTyped,
|
|
304
|
+
SearchCompactResultProviderFromJSON: () => SearchCompactResultProviderFromJSON,
|
|
305
|
+
SearchCompactResultProviderFromJSONTyped: () => SearchCompactResultProviderFromJSONTyped,
|
|
306
|
+
SearchCompactResultProviderToJSON: () => SearchCompactResultProviderToJSON,
|
|
307
|
+
SearchCompactResultProviderToJSONTyped: () => SearchCompactResultProviderToJSONTyped,
|
|
308
|
+
SearchCompactResultToJSON: () => SearchCompactResultToJSON,
|
|
309
|
+
SearchCompactResultToJSONTyped: () => SearchCompactResultToJSONTyped,
|
|
272
310
|
SearchCuratedCallabilityFromJSON: () => SearchCuratedCallabilityFromJSON,
|
|
273
311
|
SearchCuratedCallabilityFromJSONTyped: () => SearchCuratedCallabilityFromJSONTyped,
|
|
274
312
|
SearchCuratedCallabilityStateEnum: () => SearchCuratedCallabilityStateEnum,
|
|
@@ -361,6 +399,7 @@ __export(src_exports, {
|
|
|
361
399
|
SearchRequestFromJSONTyped: () => SearchRequestFromJSONTyped,
|
|
362
400
|
SearchRequestToJSON: () => SearchRequestToJSON,
|
|
363
401
|
SearchRequestToJSONTyped: () => SearchRequestToJSONTyped,
|
|
402
|
+
SearchRequestViewEnum: () => SearchRequestViewEnum,
|
|
364
403
|
SearchResourceTypeFilterEqEnum: () => SearchResourceTypeFilterEqEnum,
|
|
365
404
|
SearchResourceTypeFilterFromJSON: () => SearchResourceTypeFilterFromJSON,
|
|
366
405
|
SearchResourceTypeFilterFromJSONTyped: () => SearchResourceTypeFilterFromJSONTyped,
|
|
@@ -376,6 +415,7 @@ __export(src_exports, {
|
|
|
376
415
|
SearchResponseServedFromEnum: () => SearchResponseServedFromEnum,
|
|
377
416
|
SearchResponseToJSON: () => SearchResponseToJSON,
|
|
378
417
|
SearchResponseToJSONTyped: () => SearchResponseToJSONTyped,
|
|
418
|
+
SearchResponseViewEnum: () => SearchResponseViewEnum,
|
|
379
419
|
SearchResponseWarningsInnerFromJSON: () => SearchResponseWarningsInnerFromJSON,
|
|
380
420
|
SearchResponseWarningsInnerFromJSONTyped: () => SearchResponseWarningsInnerFromJSONTyped,
|
|
381
421
|
SearchResponseWarningsInnerToJSON: () => SearchResponseWarningsInnerToJSON,
|
|
@@ -388,6 +428,7 @@ __export(src_exports, {
|
|
|
388
428
|
SearchStringSetFilterFromJSONTyped: () => SearchStringSetFilterFromJSONTyped,
|
|
389
429
|
SearchStringSetFilterToJSON: () => SearchStringSetFilterToJSON,
|
|
390
430
|
SearchStringSetFilterToJSONTyped: () => SearchStringSetFilterToJSONTyped,
|
|
431
|
+
SearchWeftFetchCompatibilityCoverageEnum: () => SearchWeftFetchCompatibilityCoverageEnum,
|
|
391
432
|
SearchWeftFetchCompatibilityFromJSON: () => SearchWeftFetchCompatibilityFromJSON,
|
|
392
433
|
SearchWeftFetchCompatibilityFromJSONTyped: () => SearchWeftFetchCompatibilityFromJSONTyped,
|
|
393
434
|
SearchWeftFetchCompatibilityStateEnum: () => SearchWeftFetchCompatibilityStateEnum,
|
|
@@ -479,6 +520,14 @@ __export(src_exports, {
|
|
|
479
520
|
instanceOfResourceStats: () => instanceOfResourceStats,
|
|
480
521
|
instanceOfSearchAccessMethod: () => instanceOfSearchAccessMethod,
|
|
481
522
|
instanceOfSearchCapabilityRef: () => instanceOfSearchCapabilityRef,
|
|
523
|
+
instanceOfSearchCompactAccess: () => instanceOfSearchCompactAccess,
|
|
524
|
+
instanceOfSearchCompactAccessPrice: () => instanceOfSearchCompactAccessPrice,
|
|
525
|
+
instanceOfSearchCompactNextCall: () => instanceOfSearchCompactNextCall,
|
|
526
|
+
instanceOfSearchCompactResult: () => instanceOfSearchCompactResult,
|
|
527
|
+
instanceOfSearchCompactResultAttribution: () => instanceOfSearchCompactResultAttribution,
|
|
528
|
+
instanceOfSearchCompactResultBlockedScopesInner: () => instanceOfSearchCompactResultBlockedScopesInner,
|
|
529
|
+
instanceOfSearchCompactResultOperation: () => instanceOfSearchCompactResultOperation,
|
|
530
|
+
instanceOfSearchCompactResultProvider: () => instanceOfSearchCompactResultProvider,
|
|
482
531
|
instanceOfSearchCuratedCallability: () => instanceOfSearchCuratedCallability,
|
|
483
532
|
instanceOfSearchCuratedExecution: () => instanceOfSearchCuratedExecution,
|
|
484
533
|
instanceOfSearchCuratedOperation: () => instanceOfSearchCuratedOperation,
|
|
@@ -2160,7 +2209,8 @@ function FetchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2160
2209
|
"paymentStatus": json["payment_status"],
|
|
2161
2210
|
"txHash": json["tx_hash"],
|
|
2162
2211
|
"protocol": json["protocol"],
|
|
2163
|
-
"artifactId": json["artifact_id"]
|
|
2212
|
+
"artifactId": json["artifact_id"],
|
|
2213
|
+
"purchaseId": json["purchase_id"] == null ? void 0 : json["purchase_id"]
|
|
2164
2214
|
};
|
|
2165
2215
|
}
|
|
2166
2216
|
function FetchResponseToJSON(json) {
|
|
@@ -2179,10 +2229,43 @@ function FetchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2179
2229
|
"payment_status": value["paymentStatus"],
|
|
2180
2230
|
"tx_hash": value["txHash"],
|
|
2181
2231
|
"protocol": value["protocol"],
|
|
2182
|
-
"artifact_id": value["artifactId"]
|
|
2232
|
+
"artifact_id": value["artifactId"],
|
|
2233
|
+
"purchase_id": value["purchaseId"]
|
|
2183
2234
|
};
|
|
2184
2235
|
}
|
|
2185
2236
|
|
|
2237
|
+
// src/generated/models/GetPurchaseIdParameter.ts
|
|
2238
|
+
function GetPurchaseIdParameterFromJSON(json) {
|
|
2239
|
+
return GetPurchaseIdParameterFromJSONTyped(json, false);
|
|
2240
|
+
}
|
|
2241
|
+
function GetPurchaseIdParameterFromJSONTyped(json, ignoreDiscriminator) {
|
|
2242
|
+
if (json == null) {
|
|
2243
|
+
return json;
|
|
2244
|
+
}
|
|
2245
|
+
if (typeof json === "number") {
|
|
2246
|
+
return json;
|
|
2247
|
+
}
|
|
2248
|
+
if (typeof json === "string") {
|
|
2249
|
+
return json;
|
|
2250
|
+
}
|
|
2251
|
+
return {};
|
|
2252
|
+
}
|
|
2253
|
+
function GetPurchaseIdParameterToJSON(json) {
|
|
2254
|
+
return GetPurchaseIdParameterToJSONTyped(json, false);
|
|
2255
|
+
}
|
|
2256
|
+
function GetPurchaseIdParameterToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2257
|
+
if (value == null) {
|
|
2258
|
+
return value;
|
|
2259
|
+
}
|
|
2260
|
+
if (typeof value === "number") {
|
|
2261
|
+
return value;
|
|
2262
|
+
}
|
|
2263
|
+
if (typeof value === "string") {
|
|
2264
|
+
return value;
|
|
2265
|
+
}
|
|
2266
|
+
return {};
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2186
2269
|
// src/generated/models/PrincipalWallet.ts
|
|
2187
2270
|
function instanceOfPrincipalWallet(value) {
|
|
2188
2271
|
if (!("address" in value) || value["address"] === void 0) return false;
|
|
@@ -2695,6 +2778,7 @@ function PurchaseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2695
2778
|
}
|
|
2696
2779
|
return {
|
|
2697
2780
|
"id": json["id"],
|
|
2781
|
+
"purchaseId": json["purchase_id"] == null ? void 0 : json["purchase_id"],
|
|
2698
2782
|
"status": json["status"],
|
|
2699
2783
|
"amountUsd": json["amount_usd"],
|
|
2700
2784
|
"recipientAddress": json["recipient_address"],
|
|
@@ -2721,6 +2805,7 @@ function PurchaseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2721
2805
|
}
|
|
2722
2806
|
return {
|
|
2723
2807
|
"id": value["id"],
|
|
2808
|
+
"purchase_id": value["purchaseId"],
|
|
2724
2809
|
"status": value["status"],
|
|
2725
2810
|
"amount_usd": value["amountUsd"],
|
|
2726
2811
|
"recipient_address": value["recipientAddress"],
|
|
@@ -2929,6 +3014,11 @@ var SearchWeftFetchCompatibilityStateEnum = {
|
|
|
2929
3014
|
Unsupported: "unsupported",
|
|
2930
3015
|
Unknown: "unknown"
|
|
2931
3016
|
};
|
|
3017
|
+
var SearchWeftFetchCompatibilityCoverageEnum = {
|
|
3018
|
+
TerminalResponse: "terminal_response",
|
|
3019
|
+
SubmissionOnly: "submission_only",
|
|
3020
|
+
None: "none"
|
|
3021
|
+
};
|
|
2932
3022
|
function instanceOfSearchWeftFetchCompatibility(value) {
|
|
2933
3023
|
if (!("state" in value) || value["state"] === void 0) return false;
|
|
2934
3024
|
if (!("reason" in value) || value["reason"] === void 0) return false;
|
|
@@ -2945,7 +3035,8 @@ function SearchWeftFetchCompatibilityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2945
3035
|
return {
|
|
2946
3036
|
"state": json["state"],
|
|
2947
3037
|
"reason": json["reason"],
|
|
2948
|
-
"contractVersion": json["contract_version"]
|
|
3038
|
+
"contractVersion": json["contract_version"],
|
|
3039
|
+
"coverage": json["coverage"] == null ? void 0 : json["coverage"]
|
|
2949
3040
|
};
|
|
2950
3041
|
}
|
|
2951
3042
|
function SearchWeftFetchCompatibilityToJSON(json) {
|
|
@@ -2958,7 +3049,8 @@ function SearchWeftFetchCompatibilityToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
2958
3049
|
return {
|
|
2959
3050
|
"state": value["state"],
|
|
2960
3051
|
"reason": value["reason"],
|
|
2961
|
-
"contract_version": value["contractVersion"]
|
|
3052
|
+
"contract_version": value["contractVersion"],
|
|
3053
|
+
"coverage": value["coverage"]
|
|
2962
3054
|
};
|
|
2963
3055
|
}
|
|
2964
3056
|
|
|
@@ -3052,6 +3144,331 @@ function SearchCapabilityRefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3052
3144
|
};
|
|
3053
3145
|
}
|
|
3054
3146
|
|
|
3147
|
+
// src/generated/models/SearchCompactAccessPrice.ts
|
|
3148
|
+
function instanceOfSearchCompactAccessPrice(value) {
|
|
3149
|
+
return true;
|
|
3150
|
+
}
|
|
3151
|
+
function SearchCompactAccessPriceFromJSON(json) {
|
|
3152
|
+
return SearchCompactAccessPriceFromJSONTyped(json, false);
|
|
3153
|
+
}
|
|
3154
|
+
function SearchCompactAccessPriceFromJSONTyped(json, ignoreDiscriminator) {
|
|
3155
|
+
if (json == null) {
|
|
3156
|
+
return json;
|
|
3157
|
+
}
|
|
3158
|
+
return {
|
|
3159
|
+
"kind": json["kind"] == null ? void 0 : json["kind"],
|
|
3160
|
+
"indexedUsd": json["indexed_usd"] == null ? void 0 : json["indexed_usd"],
|
|
3161
|
+
"unit": json["unit"] == null ? void 0 : json["unit"],
|
|
3162
|
+
"hint": json["hint"] == null ? void 0 : json["hint"]
|
|
3163
|
+
};
|
|
3164
|
+
}
|
|
3165
|
+
function SearchCompactAccessPriceToJSON(json) {
|
|
3166
|
+
return SearchCompactAccessPriceToJSONTyped(json, false);
|
|
3167
|
+
}
|
|
3168
|
+
function SearchCompactAccessPriceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3169
|
+
if (value == null) {
|
|
3170
|
+
return value;
|
|
3171
|
+
}
|
|
3172
|
+
return {
|
|
3173
|
+
"kind": value["kind"],
|
|
3174
|
+
"indexed_usd": value["indexedUsd"],
|
|
3175
|
+
"unit": value["unit"],
|
|
3176
|
+
"hint": value["hint"]
|
|
3177
|
+
};
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
// src/generated/models/SearchCompactAccess.ts
|
|
3181
|
+
function instanceOfSearchCompactAccess(value) {
|
|
3182
|
+
return true;
|
|
3183
|
+
}
|
|
3184
|
+
function SearchCompactAccessFromJSON(json) {
|
|
3185
|
+
return SearchCompactAccessFromJSONTyped(json, false);
|
|
3186
|
+
}
|
|
3187
|
+
function SearchCompactAccessFromJSONTyped(json, ignoreDiscriminator) {
|
|
3188
|
+
if (json == null) {
|
|
3189
|
+
return json;
|
|
3190
|
+
}
|
|
3191
|
+
return {
|
|
3192
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
3193
|
+
"protocol": json["protocol"] == null ? void 0 : json["protocol"],
|
|
3194
|
+
"weftFetch": json["weft_fetch"] == null ? void 0 : json["weft_fetch"],
|
|
3195
|
+
"price": json["price"] == null ? void 0 : SearchCompactAccessPriceFromJSON(json["price"])
|
|
3196
|
+
};
|
|
3197
|
+
}
|
|
3198
|
+
function SearchCompactAccessToJSON(json) {
|
|
3199
|
+
return SearchCompactAccessToJSONTyped(json, false);
|
|
3200
|
+
}
|
|
3201
|
+
function SearchCompactAccessToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3202
|
+
if (value == null) {
|
|
3203
|
+
return value;
|
|
3204
|
+
}
|
|
3205
|
+
return {
|
|
3206
|
+
"id": value["id"],
|
|
3207
|
+
"protocol": value["protocol"],
|
|
3208
|
+
"weft_fetch": value["weftFetch"],
|
|
3209
|
+
"price": SearchCompactAccessPriceToJSON(value["price"])
|
|
3210
|
+
};
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
// src/generated/models/SearchCompactNextCall.ts
|
|
3214
|
+
var SearchCompactNextCallMethodEnum = {
|
|
3215
|
+
Post: "POST"
|
|
3216
|
+
};
|
|
3217
|
+
var SearchCompactNextCallPathEnum = {
|
|
3218
|
+
ApiV1Fetch: "/api/v1/fetch"
|
|
3219
|
+
};
|
|
3220
|
+
function instanceOfSearchCompactNextCall(value) {
|
|
3221
|
+
if (!("method" in value) || value["method"] === void 0) return false;
|
|
3222
|
+
if (!("path" in value) || value["path"] === void 0) return false;
|
|
3223
|
+
if (!("body" in value) || value["body"] === void 0) return false;
|
|
3224
|
+
if (!("fill" in value) || value["fill"] === void 0) return false;
|
|
3225
|
+
return true;
|
|
3226
|
+
}
|
|
3227
|
+
function SearchCompactNextCallFromJSON(json) {
|
|
3228
|
+
return SearchCompactNextCallFromJSONTyped(json, false);
|
|
3229
|
+
}
|
|
3230
|
+
function SearchCompactNextCallFromJSONTyped(json, ignoreDiscriminator) {
|
|
3231
|
+
if (json == null) {
|
|
3232
|
+
return json;
|
|
3233
|
+
}
|
|
3234
|
+
return {
|
|
3235
|
+
"method": json["method"],
|
|
3236
|
+
"path": json["path"],
|
|
3237
|
+
"body": json["body"],
|
|
3238
|
+
"fill": json["fill"]
|
|
3239
|
+
};
|
|
3240
|
+
}
|
|
3241
|
+
function SearchCompactNextCallToJSON(json) {
|
|
3242
|
+
return SearchCompactNextCallToJSONTyped(json, false);
|
|
3243
|
+
}
|
|
3244
|
+
function SearchCompactNextCallToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3245
|
+
if (value == null) {
|
|
3246
|
+
return value;
|
|
3247
|
+
}
|
|
3248
|
+
return {
|
|
3249
|
+
"method": value["method"],
|
|
3250
|
+
"path": value["path"],
|
|
3251
|
+
"body": value["body"],
|
|
3252
|
+
"fill": value["fill"]
|
|
3253
|
+
};
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
// src/generated/models/SearchCompactResultBlockedScopesInner.ts
|
|
3257
|
+
function instanceOfSearchCompactResultBlockedScopesInner(value) {
|
|
3258
|
+
return true;
|
|
3259
|
+
}
|
|
3260
|
+
function SearchCompactResultBlockedScopesInnerFromJSON(json) {
|
|
3261
|
+
return SearchCompactResultBlockedScopesInnerFromJSONTyped(json, false);
|
|
3262
|
+
}
|
|
3263
|
+
function SearchCompactResultBlockedScopesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
3264
|
+
if (json == null) {
|
|
3265
|
+
return json;
|
|
3266
|
+
}
|
|
3267
|
+
return {
|
|
3268
|
+
"scope": json["scope"] == null ? void 0 : json["scope"],
|
|
3269
|
+
"state": json["state"] == null ? void 0 : json["state"]
|
|
3270
|
+
};
|
|
3271
|
+
}
|
|
3272
|
+
function SearchCompactResultBlockedScopesInnerToJSON(json) {
|
|
3273
|
+
return SearchCompactResultBlockedScopesInnerToJSONTyped(json, false);
|
|
3274
|
+
}
|
|
3275
|
+
function SearchCompactResultBlockedScopesInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3276
|
+
if (value == null) {
|
|
3277
|
+
return value;
|
|
3278
|
+
}
|
|
3279
|
+
return {
|
|
3280
|
+
"scope": value["scope"],
|
|
3281
|
+
"state": value["state"]
|
|
3282
|
+
};
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
// src/generated/models/SearchCompactResultOperation.ts
|
|
3286
|
+
function instanceOfSearchCompactResultOperation(value) {
|
|
3287
|
+
if (!("id" in value) || value["id"] === void 0) return false;
|
|
3288
|
+
return true;
|
|
3289
|
+
}
|
|
3290
|
+
function SearchCompactResultOperationFromJSON(json) {
|
|
3291
|
+
return SearchCompactResultOperationFromJSONTyped(json, false);
|
|
3292
|
+
}
|
|
3293
|
+
function SearchCompactResultOperationFromJSONTyped(json, ignoreDiscriminator) {
|
|
3294
|
+
if (json == null) {
|
|
3295
|
+
return json;
|
|
3296
|
+
}
|
|
3297
|
+
return {
|
|
3298
|
+
"id": json["id"],
|
|
3299
|
+
"name": json["name"] == null ? void 0 : json["name"],
|
|
3300
|
+
"description": json["description"] == null ? void 0 : json["description"]
|
|
3301
|
+
};
|
|
3302
|
+
}
|
|
3303
|
+
function SearchCompactResultOperationToJSON(json) {
|
|
3304
|
+
return SearchCompactResultOperationToJSONTyped(json, false);
|
|
3305
|
+
}
|
|
3306
|
+
function SearchCompactResultOperationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3307
|
+
if (value == null) {
|
|
3308
|
+
return value;
|
|
3309
|
+
}
|
|
3310
|
+
return {
|
|
3311
|
+
"id": value["id"],
|
|
3312
|
+
"name": value["name"],
|
|
3313
|
+
"description": value["description"]
|
|
3314
|
+
};
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3317
|
+
// src/generated/models/SearchHelperDocs.ts
|
|
3318
|
+
function instanceOfSearchHelperDocs(value) {
|
|
3319
|
+
return true;
|
|
3320
|
+
}
|
|
3321
|
+
function SearchHelperDocsFromJSON(json) {
|
|
3322
|
+
return SearchHelperDocsFromJSONTyped(json, false);
|
|
3323
|
+
}
|
|
3324
|
+
function SearchHelperDocsFromJSONTyped(json, ignoreDiscriminator) {
|
|
3325
|
+
if (json == null) {
|
|
3326
|
+
return json;
|
|
3327
|
+
}
|
|
3328
|
+
return {
|
|
3329
|
+
"website": json["website"] == null ? void 0 : json["website"],
|
|
3330
|
+
"homepage": json["homepage"] == null ? void 0 : json["homepage"],
|
|
3331
|
+
"api": json["api"] == null ? void 0 : json["api"],
|
|
3332
|
+
"llmsTxt": json["llms_txt"] == null ? void 0 : json["llms_txt"]
|
|
3333
|
+
};
|
|
3334
|
+
}
|
|
3335
|
+
function SearchHelperDocsToJSON(json) {
|
|
3336
|
+
return SearchHelperDocsToJSONTyped(json, false);
|
|
3337
|
+
}
|
|
3338
|
+
function SearchHelperDocsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3339
|
+
if (value == null) {
|
|
3340
|
+
return value;
|
|
3341
|
+
}
|
|
3342
|
+
return {
|
|
3343
|
+
"website": value["website"],
|
|
3344
|
+
"homepage": value["homepage"],
|
|
3345
|
+
"api": value["api"],
|
|
3346
|
+
"llms_txt": value["llmsTxt"]
|
|
3347
|
+
};
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
// src/generated/models/SearchCompactResultAttribution.ts
|
|
3351
|
+
function instanceOfSearchCompactResultAttribution(value) {
|
|
3352
|
+
return true;
|
|
3353
|
+
}
|
|
3354
|
+
function SearchCompactResultAttributionFromJSON(json) {
|
|
3355
|
+
return SearchCompactResultAttributionFromJSONTyped(json, false);
|
|
3356
|
+
}
|
|
3357
|
+
function SearchCompactResultAttributionFromJSONTyped(json, ignoreDiscriminator) {
|
|
3358
|
+
if (json == null) {
|
|
3359
|
+
return json;
|
|
3360
|
+
}
|
|
3361
|
+
return {
|
|
3362
|
+
"searchId": json["search_id"] == null ? void 0 : json["search_id"],
|
|
3363
|
+
"operationId": json["operation_id"] == null ? void 0 : json["operation_id"],
|
|
3364
|
+
"accessMethodId": json["access_method_id"] == null ? void 0 : json["access_method_id"]
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
function SearchCompactResultAttributionToJSON(json) {
|
|
3368
|
+
return SearchCompactResultAttributionToJSONTyped(json, false);
|
|
3369
|
+
}
|
|
3370
|
+
function SearchCompactResultAttributionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3371
|
+
if (value == null) {
|
|
3372
|
+
return value;
|
|
3373
|
+
}
|
|
3374
|
+
return {
|
|
3375
|
+
"search_id": value["searchId"],
|
|
3376
|
+
"operation_id": value["operationId"],
|
|
3377
|
+
"access_method_id": value["accessMethodId"]
|
|
3378
|
+
};
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
// src/generated/models/SearchCompactResultProvider.ts
|
|
3382
|
+
function instanceOfSearchCompactResultProvider(value) {
|
|
3383
|
+
return true;
|
|
3384
|
+
}
|
|
3385
|
+
function SearchCompactResultProviderFromJSON(json) {
|
|
3386
|
+
return SearchCompactResultProviderFromJSONTyped(json, false);
|
|
3387
|
+
}
|
|
3388
|
+
function SearchCompactResultProviderFromJSONTyped(json, ignoreDiscriminator) {
|
|
3389
|
+
if (json == null) {
|
|
3390
|
+
return json;
|
|
3391
|
+
}
|
|
3392
|
+
return {
|
|
3393
|
+
"id": json["id"] == null ? void 0 : json["id"],
|
|
3394
|
+
"name": json["name"] == null ? void 0 : json["name"]
|
|
3395
|
+
};
|
|
3396
|
+
}
|
|
3397
|
+
function SearchCompactResultProviderToJSON(json) {
|
|
3398
|
+
return SearchCompactResultProviderToJSONTyped(json, false);
|
|
3399
|
+
}
|
|
3400
|
+
function SearchCompactResultProviderToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3401
|
+
if (value == null) {
|
|
3402
|
+
return value;
|
|
3403
|
+
}
|
|
3404
|
+
return {
|
|
3405
|
+
"id": value["id"],
|
|
3406
|
+
"name": value["name"]
|
|
3407
|
+
};
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
// src/generated/models/SearchCompactResult.ts
|
|
3411
|
+
function instanceOfSearchCompactResult(value) {
|
|
3412
|
+
if (!("operation" in value) || value["operation"] === void 0) return false;
|
|
3413
|
+
if (!("access" in value) || value["access"] === void 0) return false;
|
|
3414
|
+
if (!("contractUrl" in value) || value["contractUrl"] === void 0) return false;
|
|
3415
|
+
if (!("contractDetail" in value) || value["contractDetail"] === void 0) return false;
|
|
3416
|
+
if (!("readiness" in value) || value["readiness"] === void 0) return false;
|
|
3417
|
+
return true;
|
|
3418
|
+
}
|
|
3419
|
+
function SearchCompactResultFromJSON(json) {
|
|
3420
|
+
return SearchCompactResultFromJSONTyped(json, false);
|
|
3421
|
+
}
|
|
3422
|
+
function SearchCompactResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
3423
|
+
if (json == null) {
|
|
3424
|
+
return json;
|
|
3425
|
+
}
|
|
3426
|
+
return {
|
|
3427
|
+
"provider": json["provider"] == null ? void 0 : SearchCompactResultProviderFromJSON(json["provider"]),
|
|
3428
|
+
"operation": SearchCompactResultOperationFromJSON(json["operation"]),
|
|
3429
|
+
"inputs": json["inputs"] == null ? void 0 : json["inputs"],
|
|
3430
|
+
"request": json["request"] == null ? void 0 : json["request"],
|
|
3431
|
+
"example": json["example"] == null ? void 0 : json["example"],
|
|
3432
|
+
"access": SearchCompactAccessFromJSON(json["access"]),
|
|
3433
|
+
"attribution": json["attribution"] == null ? void 0 : SearchCompactResultAttributionFromJSON(json["attribution"]),
|
|
3434
|
+
"output": json["output"] == null ? void 0 : json["output"],
|
|
3435
|
+
"docs": json["docs"] == null ? void 0 : SearchHelperDocsFromJSON(json["docs"]),
|
|
3436
|
+
"contractUrl": json["contract_url"],
|
|
3437
|
+
"contractDetail": json["contract_detail"],
|
|
3438
|
+
"completion": json["completion"] == null ? void 0 : json["completion"],
|
|
3439
|
+
"blockedScopes": json["blocked_scopes"] == null ? void 0 : json["blocked_scopes"].map(SearchCompactResultBlockedScopesInnerFromJSON),
|
|
3440
|
+
"contractGaps": json["contract_gaps"] == null ? void 0 : json["contract_gaps"],
|
|
3441
|
+
"readiness": mapValues(json["readiness"], SearchCompactResultBlockedScopesInnerFromJSON),
|
|
3442
|
+
"nextCall": json["next_call"] == null ? void 0 : SearchCompactNextCallFromJSON(json["next_call"])
|
|
3443
|
+
};
|
|
3444
|
+
}
|
|
3445
|
+
function SearchCompactResultToJSON(json) {
|
|
3446
|
+
return SearchCompactResultToJSONTyped(json, false);
|
|
3447
|
+
}
|
|
3448
|
+
function SearchCompactResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3449
|
+
if (value == null) {
|
|
3450
|
+
return value;
|
|
3451
|
+
}
|
|
3452
|
+
return {
|
|
3453
|
+
"provider": SearchCompactResultProviderToJSON(value["provider"]),
|
|
3454
|
+
"operation": SearchCompactResultOperationToJSON(value["operation"]),
|
|
3455
|
+
"inputs": value["inputs"],
|
|
3456
|
+
"request": value["request"],
|
|
3457
|
+
"example": value["example"],
|
|
3458
|
+
"access": SearchCompactAccessToJSON(value["access"]),
|
|
3459
|
+
"attribution": SearchCompactResultAttributionToJSON(value["attribution"]),
|
|
3460
|
+
"output": value["output"],
|
|
3461
|
+
"docs": SearchHelperDocsToJSON(value["docs"]),
|
|
3462
|
+
"contract_url": value["contractUrl"],
|
|
3463
|
+
"contract_detail": value["contractDetail"],
|
|
3464
|
+
"completion": value["completion"],
|
|
3465
|
+
"blocked_scopes": value["blockedScopes"] == null ? void 0 : value["blockedScopes"].map(SearchCompactResultBlockedScopesInnerToJSON),
|
|
3466
|
+
"contract_gaps": value["contractGaps"],
|
|
3467
|
+
"readiness": mapValues(value["readiness"], SearchCompactResultBlockedScopesInnerToJSON),
|
|
3468
|
+
"next_call": SearchCompactNextCallToJSON(value["nextCall"])
|
|
3469
|
+
};
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3055
3472
|
// src/generated/models/SearchCuratedCallability.ts
|
|
3056
3473
|
var SearchCuratedCallabilityStateEnum = {
|
|
3057
3474
|
Complete: "complete",
|
|
@@ -3312,39 +3729,6 @@ function SearchPaymentOfferToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3312
3729
|
};
|
|
3313
3730
|
}
|
|
3314
3731
|
|
|
3315
|
-
// src/generated/models/SearchHelperDocs.ts
|
|
3316
|
-
function instanceOfSearchHelperDocs(value) {
|
|
3317
|
-
return true;
|
|
3318
|
-
}
|
|
3319
|
-
function SearchHelperDocsFromJSON(json) {
|
|
3320
|
-
return SearchHelperDocsFromJSONTyped(json, false);
|
|
3321
|
-
}
|
|
3322
|
-
function SearchHelperDocsFromJSONTyped(json, ignoreDiscriminator) {
|
|
3323
|
-
if (json == null) {
|
|
3324
|
-
return json;
|
|
3325
|
-
}
|
|
3326
|
-
return {
|
|
3327
|
-
"website": json["website"] == null ? void 0 : json["website"],
|
|
3328
|
-
"homepage": json["homepage"] == null ? void 0 : json["homepage"],
|
|
3329
|
-
"api": json["api"] == null ? void 0 : json["api"],
|
|
3330
|
-
"llmsTxt": json["llms_txt"] == null ? void 0 : json["llms_txt"]
|
|
3331
|
-
};
|
|
3332
|
-
}
|
|
3333
|
-
function SearchHelperDocsToJSON(json) {
|
|
3334
|
-
return SearchHelperDocsToJSONTyped(json, false);
|
|
3335
|
-
}
|
|
3336
|
-
function SearchHelperDocsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
3337
|
-
if (value == null) {
|
|
3338
|
-
return value;
|
|
3339
|
-
}
|
|
3340
|
-
return {
|
|
3341
|
-
"website": value["website"],
|
|
3342
|
-
"homepage": value["homepage"],
|
|
3343
|
-
"api": value["api"],
|
|
3344
|
-
"llms_txt": value["llmsTxt"]
|
|
3345
|
-
};
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
3732
|
// src/generated/models/SearchEndpointPrice.ts
|
|
3349
3733
|
var SearchEndpointPriceSourceEnum = {
|
|
3350
3734
|
Probe: "probe",
|
|
@@ -3467,6 +3851,7 @@ var SearchErrorResponseErrorEnum = {
|
|
|
3467
3851
|
InvalidQuery: "INVALID_QUERY",
|
|
3468
3852
|
InvalidMaxResults: "INVALID_MAX_RESULTS",
|
|
3469
3853
|
InvalidFilters: "INVALID_FILTERS",
|
|
3854
|
+
InvalidView: "INVALID_VIEW",
|
|
3470
3855
|
UnknownParameter: "UNKNOWN_PARAMETER",
|
|
3471
3856
|
SearchUpstreamError: "SEARCH_UPSTREAM_ERROR",
|
|
3472
3857
|
SearchBackendMisconfigured: "SEARCH_BACKEND_MISCONFIGURED"
|
|
@@ -3848,6 +4233,10 @@ function SearchProviderRefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3848
4233
|
}
|
|
3849
4234
|
|
|
3850
4235
|
// src/generated/models/SearchRequest.ts
|
|
4236
|
+
var SearchRequestViewEnum = {
|
|
4237
|
+
Full: "full",
|
|
4238
|
+
Compact: "compact"
|
|
4239
|
+
};
|
|
3851
4240
|
function instanceOfSearchRequest(value) {
|
|
3852
4241
|
if (!("query" in value) || value["query"] === void 0) return false;
|
|
3853
4242
|
return true;
|
|
@@ -3862,7 +4251,8 @@ function SearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
3862
4251
|
return {
|
|
3863
4252
|
"query": json["query"],
|
|
3864
4253
|
"maxResults": json["max_results"] == null ? void 0 : json["max_results"],
|
|
3865
|
-
"filters": json["filters"] == null ? void 0 : SearchFilterSpecFromJSON(json["filters"])
|
|
4254
|
+
"filters": json["filters"] == null ? void 0 : SearchFilterSpecFromJSON(json["filters"]),
|
|
4255
|
+
"view": json["view"] == null ? void 0 : json["view"]
|
|
3866
4256
|
};
|
|
3867
4257
|
}
|
|
3868
4258
|
function SearchRequestToJSON(json) {
|
|
@@ -3875,7 +4265,8 @@ function SearchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
3875
4265
|
return {
|
|
3876
4266
|
"query": value["query"],
|
|
3877
4267
|
"max_results": value["maxResults"],
|
|
3878
|
-
"filters": SearchFilterSpecToJSON(value["filters"])
|
|
4268
|
+
"filters": SearchFilterSpecToJSON(value["filters"]),
|
|
4269
|
+
"view": value["view"]
|
|
3879
4270
|
};
|
|
3880
4271
|
}
|
|
3881
4272
|
|
|
@@ -3975,6 +4366,10 @@ var SearchResponseReasonEnum = {
|
|
|
3975
4366
|
UnsupportedFilterValue: "unsupported_filter_value",
|
|
3976
4367
|
IndexUnavailable: "index_unavailable"
|
|
3977
4368
|
};
|
|
4369
|
+
var SearchResponseViewEnum = {
|
|
4370
|
+
Full: "full",
|
|
4371
|
+
Compact: "compact"
|
|
4372
|
+
};
|
|
3978
4373
|
function instanceOfSearchResponse(value) {
|
|
3979
4374
|
if (!("queryTraceId" in value) || value["queryTraceId"] === void 0) return false;
|
|
3980
4375
|
if (!("query" in value) || value["query"] === void 0) return false;
|
|
@@ -4009,7 +4404,10 @@ function SearchResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4009
4404
|
"matchQuality": json["match_quality"] == null ? void 0 : json["match_quality"],
|
|
4010
4405
|
"reason": json["reason"] == null ? void 0 : json["reason"],
|
|
4011
4406
|
"suggestion": json["suggestion"] == null ? void 0 : json["suggestion"],
|
|
4012
|
-
"results": json["results"].map(SearchResultFromJSON)
|
|
4407
|
+
"results": json["results"].map(SearchResultFromJSON),
|
|
4408
|
+
"view": json["view"] == null ? void 0 : json["view"],
|
|
4409
|
+
"compactResults": json["compact_results"] == null ? void 0 : json["compact_results"].map(SearchCompactResultFromJSON),
|
|
4410
|
+
"omittedResults": json["omitted_results"] == null ? void 0 : json["omitted_results"]
|
|
4013
4411
|
};
|
|
4014
4412
|
}
|
|
4015
4413
|
function SearchResponseToJSON(json) {
|
|
@@ -4037,7 +4435,10 @@ function SearchResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4037
4435
|
"match_quality": value["matchQuality"],
|
|
4038
4436
|
"reason": value["reason"],
|
|
4039
4437
|
"suggestion": value["suggestion"],
|
|
4040
|
-
"results": value["results"].map(SearchResultToJSON)
|
|
4438
|
+
"results": value["results"].map(SearchResultToJSON),
|
|
4439
|
+
"view": value["view"],
|
|
4440
|
+
"compact_results": value["compactResults"] == null ? void 0 : value["compactResults"].map(SearchCompactResultToJSON),
|
|
4441
|
+
"omitted_results": value["omittedResults"]
|
|
4041
4442
|
};
|
|
4042
4443
|
}
|
|
4043
4444
|
|
|
@@ -4613,7 +5014,7 @@ var DocumentationApi = class extends BaseAPI {
|
|
|
4613
5014
|
// src/generated/apis/FetchApi.ts
|
|
4614
5015
|
var FetchApi = class extends BaseAPI {
|
|
4615
5016
|
/**
|
|
4616
|
-
* 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 `
|
|
5017
|
+
* 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.
|
|
4617
5018
|
* Pay-and-fetch any URL (x402/MPP proxy)
|
|
4618
5019
|
*/
|
|
4619
5020
|
async fetchRaw(requestParameters, initOverrides) {
|
|
@@ -4647,7 +5048,7 @@ var FetchApi = class extends BaseAPI {
|
|
|
4647
5048
|
return new JSONApiResponse(response, (jsonValue) => FetchResponseFromJSON(jsonValue));
|
|
4648
5049
|
}
|
|
4649
5050
|
/**
|
|
4650
|
-
* 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 `
|
|
5051
|
+
* 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.
|
|
4651
5052
|
* Pay-and-fetch any URL (x402/MPP proxy)
|
|
4652
5053
|
*/
|
|
4653
5054
|
async fetch(requestParameters, initOverrides) {
|
|
@@ -4847,7 +5248,7 @@ var ResourcesApi = class extends BaseAPI {
|
|
|
4847
5248
|
// src/generated/apis/SearchApi.ts
|
|
4848
5249
|
var SearchApi = class extends BaseAPI {
|
|
4849
5250
|
/**
|
|
4850
|
-
* 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.
|
|
5251
|
+
* 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.
|
|
4851
5252
|
* Search the Weft index
|
|
4852
5253
|
*/
|
|
4853
5254
|
async searchRaw(requestParameters, initOverrides) {
|
|
@@ -4878,7 +5279,7 @@ var SearchApi = class extends BaseAPI {
|
|
|
4878
5279
|
return new JSONApiResponse(response, (jsonValue) => SearchResponseFromJSON(jsonValue));
|
|
4879
5280
|
}
|
|
4880
5281
|
/**
|
|
4881
|
-
* 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.
|
|
5282
|
+
* 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.
|
|
4882
5283
|
* Search the Weft index
|
|
4883
5284
|
*/
|
|
4884
5285
|
async search(requestParameters, initOverrides) {
|
|
@@ -5331,6 +5732,10 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5331
5732
|
FetchResponseProtocolEnum,
|
|
5332
5733
|
FetchResponseToJSON,
|
|
5333
5734
|
FetchResponseToJSONTyped,
|
|
5735
|
+
GetPurchaseIdParameterFromJSON,
|
|
5736
|
+
GetPurchaseIdParameterFromJSONTyped,
|
|
5737
|
+
GetPurchaseIdParameterToJSON,
|
|
5738
|
+
GetPurchaseIdParameterToJSONTyped,
|
|
5334
5739
|
InsufficientScopeResponseErrorEnum,
|
|
5335
5740
|
InsufficientScopeResponseFromJSON,
|
|
5336
5741
|
InsufficientScopeResponseFromJSONTyped,
|
|
@@ -5453,6 +5858,40 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5453
5858
|
SearchCapabilityRefFromJSONTyped,
|
|
5454
5859
|
SearchCapabilityRefToJSON,
|
|
5455
5860
|
SearchCapabilityRefToJSONTyped,
|
|
5861
|
+
SearchCompactAccessFromJSON,
|
|
5862
|
+
SearchCompactAccessFromJSONTyped,
|
|
5863
|
+
SearchCompactAccessPriceFromJSON,
|
|
5864
|
+
SearchCompactAccessPriceFromJSONTyped,
|
|
5865
|
+
SearchCompactAccessPriceToJSON,
|
|
5866
|
+
SearchCompactAccessPriceToJSONTyped,
|
|
5867
|
+
SearchCompactAccessToJSON,
|
|
5868
|
+
SearchCompactAccessToJSONTyped,
|
|
5869
|
+
SearchCompactNextCallFromJSON,
|
|
5870
|
+
SearchCompactNextCallFromJSONTyped,
|
|
5871
|
+
SearchCompactNextCallMethodEnum,
|
|
5872
|
+
SearchCompactNextCallPathEnum,
|
|
5873
|
+
SearchCompactNextCallToJSON,
|
|
5874
|
+
SearchCompactNextCallToJSONTyped,
|
|
5875
|
+
SearchCompactResultAttributionFromJSON,
|
|
5876
|
+
SearchCompactResultAttributionFromJSONTyped,
|
|
5877
|
+
SearchCompactResultAttributionToJSON,
|
|
5878
|
+
SearchCompactResultAttributionToJSONTyped,
|
|
5879
|
+
SearchCompactResultBlockedScopesInnerFromJSON,
|
|
5880
|
+
SearchCompactResultBlockedScopesInnerFromJSONTyped,
|
|
5881
|
+
SearchCompactResultBlockedScopesInnerToJSON,
|
|
5882
|
+
SearchCompactResultBlockedScopesInnerToJSONTyped,
|
|
5883
|
+
SearchCompactResultFromJSON,
|
|
5884
|
+
SearchCompactResultFromJSONTyped,
|
|
5885
|
+
SearchCompactResultOperationFromJSON,
|
|
5886
|
+
SearchCompactResultOperationFromJSONTyped,
|
|
5887
|
+
SearchCompactResultOperationToJSON,
|
|
5888
|
+
SearchCompactResultOperationToJSONTyped,
|
|
5889
|
+
SearchCompactResultProviderFromJSON,
|
|
5890
|
+
SearchCompactResultProviderFromJSONTyped,
|
|
5891
|
+
SearchCompactResultProviderToJSON,
|
|
5892
|
+
SearchCompactResultProviderToJSONTyped,
|
|
5893
|
+
SearchCompactResultToJSON,
|
|
5894
|
+
SearchCompactResultToJSONTyped,
|
|
5456
5895
|
SearchCuratedCallabilityFromJSON,
|
|
5457
5896
|
SearchCuratedCallabilityFromJSONTyped,
|
|
5458
5897
|
SearchCuratedCallabilityStateEnum,
|
|
@@ -5545,6 +5984,7 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5545
5984
|
SearchRequestFromJSONTyped,
|
|
5546
5985
|
SearchRequestToJSON,
|
|
5547
5986
|
SearchRequestToJSONTyped,
|
|
5987
|
+
SearchRequestViewEnum,
|
|
5548
5988
|
SearchResourceTypeFilterEqEnum,
|
|
5549
5989
|
SearchResourceTypeFilterFromJSON,
|
|
5550
5990
|
SearchResourceTypeFilterFromJSONTyped,
|
|
@@ -5560,6 +6000,7 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5560
6000
|
SearchResponseServedFromEnum,
|
|
5561
6001
|
SearchResponseToJSON,
|
|
5562
6002
|
SearchResponseToJSONTyped,
|
|
6003
|
+
SearchResponseViewEnum,
|
|
5563
6004
|
SearchResponseWarningsInnerFromJSON,
|
|
5564
6005
|
SearchResponseWarningsInnerFromJSONTyped,
|
|
5565
6006
|
SearchResponseWarningsInnerToJSON,
|
|
@@ -5572,6 +6013,7 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5572
6013
|
SearchStringSetFilterFromJSONTyped,
|
|
5573
6014
|
SearchStringSetFilterToJSON,
|
|
5574
6015
|
SearchStringSetFilterToJSONTyped,
|
|
6016
|
+
SearchWeftFetchCompatibilityCoverageEnum,
|
|
5575
6017
|
SearchWeftFetchCompatibilityFromJSON,
|
|
5576
6018
|
SearchWeftFetchCompatibilityFromJSONTyped,
|
|
5577
6019
|
SearchWeftFetchCompatibilityStateEnum,
|
|
@@ -5663,6 +6105,14 @@ __reExport(src_exports, facilitator_exports, module.exports);
|
|
|
5663
6105
|
instanceOfResourceStats,
|
|
5664
6106
|
instanceOfSearchAccessMethod,
|
|
5665
6107
|
instanceOfSearchCapabilityRef,
|
|
6108
|
+
instanceOfSearchCompactAccess,
|
|
6109
|
+
instanceOfSearchCompactAccessPrice,
|
|
6110
|
+
instanceOfSearchCompactNextCall,
|
|
6111
|
+
instanceOfSearchCompactResult,
|
|
6112
|
+
instanceOfSearchCompactResultAttribution,
|
|
6113
|
+
instanceOfSearchCompactResultBlockedScopesInner,
|
|
6114
|
+
instanceOfSearchCompactResultOperation,
|
|
6115
|
+
instanceOfSearchCompactResultProvider,
|
|
5666
6116
|
instanceOfSearchCuratedCallability,
|
|
5667
6117
|
instanceOfSearchCuratedExecution,
|
|
5668
6118
|
instanceOfSearchCuratedOperation,
|