@vapi-network/sources 0.9.2 → 0.9.4
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/index.js +37 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19766,8 +19766,10 @@ var listingIdentitySchema = external_exports.looseObject({
|
|
|
19766
19766
|
}).optional().catch(void 0)
|
|
19767
19767
|
});
|
|
19768
19768
|
var listingDisclosureShape = {
|
|
19769
|
-
|
|
19770
|
-
fee
|
|
19769
|
+
// Presentation metadata must not make an otherwise executable row vanish
|
|
19770
|
+
// when the registry adds a new group or changes the fee display shape.
|
|
19771
|
+
group: listingGroupSchema.optional().catch(void 0),
|
|
19772
|
+
fee: listingFeeSchema.optional().catch(void 0),
|
|
19771
19773
|
verification: listingVerificationFieldSchema,
|
|
19772
19774
|
liveness: listingLivenessSchema.optional().catch(void 0),
|
|
19773
19775
|
conformance: listingConformanceSchema.optional().catch(void 0),
|
|
@@ -19775,11 +19777,13 @@ var listingDisclosureShape = {
|
|
|
19775
19777
|
};
|
|
19776
19778
|
var marketplaceBadgeCodeSchema = external_exports.enum([
|
|
19777
19779
|
"live_x402",
|
|
19780
|
+
"mpp",
|
|
19778
19781
|
"partner",
|
|
19779
19782
|
"payout_wallet_confirmed",
|
|
19780
19783
|
"vapi_verified",
|
|
19781
19784
|
"external_catalog",
|
|
19782
|
-
"approved_vendor"
|
|
19785
|
+
"approved_vendor",
|
|
19786
|
+
"unverified"
|
|
19783
19787
|
]);
|
|
19784
19788
|
var marketplaceBadgeSchema = external_exports.looseObject({
|
|
19785
19789
|
code: marketplaceBadgeCodeSchema,
|
|
@@ -19798,7 +19802,13 @@ var marketplaceCardSchema = external_exports.looseObject({
|
|
|
19798
19802
|
summary: external_exports.string().trim().min(1).max(1e3),
|
|
19799
19803
|
byline: external_exports.string().trim().min(1).max(160).optional(),
|
|
19800
19804
|
bylineHref: marketplaceHrefSchema.optional(),
|
|
19801
|
-
badges: external_exports.
|
|
19805
|
+
badges: external_exports.preprocess(
|
|
19806
|
+
(badges) => Array.isArray(badges) ? badges.flatMap((badge) => {
|
|
19807
|
+
const parsed = marketplaceBadgeSchema.safeParse(badge);
|
|
19808
|
+
return parsed.success ? [parsed.data] : [];
|
|
19809
|
+
}) : badges,
|
|
19810
|
+
external_exports.array(marketplaceBadgeSchema).max(8)
|
|
19811
|
+
),
|
|
19802
19812
|
facts: external_exports.array(marketplacePublicFactSchema).max(12)
|
|
19803
19813
|
});
|
|
19804
19814
|
var marketplaceHitBase = {
|
|
@@ -20975,9 +20985,9 @@ function isSolanaAddress(value) {
|
|
|
20975
20985
|
var CALLABLE_CATEGORIES = ["ai", "data", "crypto", "compute", "search"];
|
|
20976
20986
|
var callableCategorySchema = external_exports.enum(CALLABLE_CATEGORIES);
|
|
20977
20987
|
var DISCOVERY_CATEGORIES = [...CALLABLE_CATEGORIES, "other"];
|
|
20978
|
-
var discoveryCategorySchema = external_exports.
|
|
20988
|
+
var discoveryCategorySchema = external_exports.string().trim().min(1);
|
|
20979
20989
|
var CALLABLE_CATEGORY_SET = new Set(CALLABLE_CATEGORIES);
|
|
20980
|
-
var serviceTierSchema = external_exports.
|
|
20990
|
+
var serviceTierSchema = external_exports.string().trim().min(1);
|
|
20981
20991
|
var discoveryEndpointSchema = external_exports.looseObject({
|
|
20982
20992
|
name: external_exports.string(),
|
|
20983
20993
|
method: external_exports.string(),
|
|
@@ -21007,6 +21017,24 @@ var discoveryEndpointSchema = external_exports.looseObject({
|
|
|
21007
21017
|
asset: external_exports.string().refine(isSolanaAddress, "Expected a Solana base58 address."),
|
|
21008
21018
|
payTo: external_exports.string().refine(isSolanaAddress, "Expected a Solana base58 address."),
|
|
21009
21019
|
checkedAt: external_exports.iso.datetime()
|
|
21020
|
+
}),
|
|
21021
|
+
external_exports.looseObject({
|
|
21022
|
+
protocol: external_exports.literal("mpp"),
|
|
21023
|
+
intent: external_exports.enum(["charge", "authorize", "subscription"]).nullable(),
|
|
21024
|
+
method: external_exports.string().trim().min(1).max(40).nullable(),
|
|
21025
|
+
checkedAt: external_exports.iso.datetime(),
|
|
21026
|
+
// Keep common x402 properties readable on the union while making it
|
|
21027
|
+
// impossible for MPP metadata to masquerade as executable x402 terms.
|
|
21028
|
+
network: external_exports.never().optional(),
|
|
21029
|
+
payTo: external_exports.never().optional()
|
|
21030
|
+
}),
|
|
21031
|
+
external_exports.looseObject({
|
|
21032
|
+
// Future payment protocols remain visible to callers so the payment
|
|
21033
|
+
// layer can refuse them explicitly instead of discovery losing the row.
|
|
21034
|
+
protocol: external_exports.string().trim().min(1).max(40),
|
|
21035
|
+
checkedAt: external_exports.iso.datetime(),
|
|
21036
|
+
network: external_exports.never().optional(),
|
|
21037
|
+
payTo: external_exports.never().optional()
|
|
21010
21038
|
})
|
|
21011
21039
|
]).optional()
|
|
21012
21040
|
});
|
|
@@ -21093,7 +21121,7 @@ function resolveTarget(service, endpointName) {
|
|
|
21093
21121
|
}
|
|
21094
21122
|
if (targets.size !== 1) {
|
|
21095
21123
|
const paymentNetworks = service.endpoints.flatMap(
|
|
21096
|
-
(endpoint) => endpoint.payment ? [endpoint.payment.network] : []
|
|
21124
|
+
(endpoint) => typeof endpoint.payment?.network === "string" ? [endpoint.payment.network] : []
|
|
21097
21125
|
);
|
|
21098
21126
|
throw new DiscoveryCatalogError(
|
|
21099
21127
|
"ambiguous_default",
|
|
@@ -21283,7 +21311,8 @@ function getVapiPaths(directory = process.env.VAPI_HOME?.trim() || join(homedir(
|
|
|
21283
21311
|
keystore: join(directory, "keystore.json"),
|
|
21284
21312
|
receipts: join(directory, "receipts.jsonl"),
|
|
21285
21313
|
searches: join(directory, "searches.jsonl"),
|
|
21286
|
-
ledger: join(directory, "spend-ledger.json")
|
|
21314
|
+
ledger: join(directory, "spend-ledger.json"),
|
|
21315
|
+
updateCheck: join(directory, "update-check.json")
|
|
21287
21316
|
};
|
|
21288
21317
|
}
|
|
21289
21318
|
|