@ucanto/server
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -1,8 +0,8 @@ | ||
export function provide<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, Result extends API.Result<{}, {}>>(capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>, handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>): API.ServiceMethod<API.Capability<A, R, C>, Result["ok"] & {}, Result["error"] & {}>; | ||
export function provideAdvanced<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends {}>({ capability, handler, audience }: { | ||
export function provide<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends API.Failure, Result extends API.Result<O, X>>(capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>, handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>): API.ServiceMethod<API.Capability<A, R, C>, O & Result["ok"], X & Result["error"]>; | ||
export function provideAdvanced<A extends API.Ability, R extends API.URI<`${string}:`>, C extends API.Caveats, O extends {}, X extends API.Failure, Result extends API.Result<O, X>>({ capability, handler, audience }: { | ||
audience?: API.Reader<`did:${string}:${string}`, any, API.Failure> | undefined; | ||
capability: API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>, API.UnknownMatch>>; | ||
handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<API.Result<O, X>>; | ||
}): API.ServiceMethod<API.Capability<A, R, C>, O, X>; | ||
handler: (input: API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>; | ||
}): API.ServiceMethod<API.Capability<A, R, C>, O & Result["ok"], X & Result["error"]>; | ||
import * as API from "./api.js"; | ||
//# sourceMappingURL=handler.d.ts.map |
{ | ||
"name": "@ucanto/server", | ||
"description": "UCAN RPC Server", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"types": "./dist/src/lib.d.ts", | ||
@@ -6,0 +6,0 @@ "main": "./src/lib.js", |
@@ -13,6 +13,8 @@ import * as API from './api.js' | ||
* @template {API.Caveats} C | ||
* @template {API.Result<{}, {}>} Result | ||
* @template {{}} O | ||
* @template {API.Failure} X | ||
* @template {API.Result<O, X>} Result | ||
* @param {API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>>>} capability | ||
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>} handler | ||
* @returns {API.ServiceMethod<API.Capability<A, R, C>, Result['ok'] & {}, Result['error'] & {}>} | ||
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O & Result['ok'], X & Result['error']>} | ||
*/ | ||
@@ -35,8 +37,9 @@ | ||
* @template {{}} O | ||
* @template {{}} X | ||
* @template {API.Failure} X | ||
* @template {API.Result<O, X>} Result | ||
* @param {object} input | ||
* @param {API.Reader<API.DID>} [input.audience] | ||
* @param {API.CapabilityParser<API.Match<API.ParsedCapability<A, R, C>>>} input.capability | ||
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<API.Result<O, X>>} input.handler | ||
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O, X>} | ||
* @param {(input:API.ProviderInput<API.ParsedCapability<A, R, C>>) => API.Await<Result>} input.handler | ||
* @returns {API.ServiceMethod<API.Capability<A, R, C>, O & Result['ok'], X & Result['error']>} | ||
*/ | ||
@@ -43,0 +46,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22850
541