@web3-storage/access
Advanced tools
Comparing version 16.2.1 to 16.3.0
@@ -112,2 +112,8 @@ /** | ||
} | undefined): Promise<void>; | ||
/** | ||
* | ||
* @param {AccessAgent} agent | ||
* @param {import('@web3-storage/did-mailto/types').DidMailto} account | ||
*/ | ||
export function getAccountPlan(agent: AccessAgent, account: import('@web3-storage/did-mailto/types').DidMailto): Promise<Ucanto.Result<import("@web3-storage/capabilities/types").PlanGetSuccess, Ucanto.HandlerNotFound | Ucanto.HandlerExecutionError | Ucanto.InvalidAudience | Ucanto.Unauthorized | import("@web3-storage/capabilities/types").PlanNotFound>>; | ||
export type DelegationsChecker = (delegations: Ucanto.Delegation<Ucanto.Capabilities>[]) => boolean; | ||
@@ -114,0 +120,0 @@ export type AuthorizationWaiterOpts<T = {}> = { |
@@ -5,3 +5,3 @@ import { addSpacesFromDelegations, Agent as AccessAgent } from './agent.js'; | ||
import { bytesToDelegations } from './encoding.js'; | ||
import { Provider } from '@web3-storage/capabilities'; | ||
import { Provider, Plan } from '@web3-storage/capabilities'; | ||
import * as w3caps from '@web3-storage/capabilities'; | ||
@@ -269,2 +269,13 @@ import { AgentData, isSessionProof } from './agent-data.js'; | ||
} | ||
/** | ||
* | ||
* @param {AccessAgent} agent | ||
* @param {import('@web3-storage/did-mailto/types').DidMailto} account | ||
*/ | ||
export async function getAccountPlan(agent, account) { | ||
const receipt = await agent.invokeAndExecute(Plan.get, { | ||
with: account, | ||
}); | ||
return receipt.out; | ||
} | ||
//# sourceMappingURL=agent-use-cases.js.map |
import type { Capabilities, ConnectionView, Fact, Failure, Phantom, Principal, RequestEncoder, Resource, ResponseDecoder, ServiceMethod, InferInvokedCapability, CapabilityParser, Match, Ability, UnknownMatch, Delegation, DID, Signer, SignerArchive, SigAlg, Caveats } from '@ucanto/interface'; | ||
import type { Abilities, SpaceInfo, AccessAuthorize, AccessAuthorizeSuccess, AccessDelegate, AccessDelegateFailure, AccessDelegateSuccess, AccessClaim, AccessClaimSuccess, AccessClaimFailure, ProviderAdd, ProviderAddSuccess, ProviderAddFailure, AccessConfirm, AccessConfirmSuccess, AccessConfirmFailure, UCANRevoke, UCANRevokeSuccess, UCANRevokeFailure } from '@web3-storage/capabilities/types'; | ||
import type { Abilities, SpaceInfo, AccessAuthorize, AccessAuthorizeSuccess, AccessDelegate, AccessDelegateFailure, AccessDelegateSuccess, AccessClaim, AccessClaimSuccess, AccessClaimFailure, ProviderAdd, ProviderAddSuccess, ProviderAddFailure, AccessConfirm, AccessConfirmSuccess, AccessConfirmFailure, UCANRevoke, UCANRevokeSuccess, UCANRevokeFailure, PlanGet, PlanGetSuccess, PlanGetFailure } from '@web3-storage/capabilities/types'; | ||
import type { SetRequired } from 'type-fest'; | ||
@@ -31,2 +31,5 @@ import { Driver } from './drivers/types.js'; | ||
}; | ||
plan: { | ||
get: ServiceMethod<PlanGet, PlanGetSuccess, PlanGetFailure>; | ||
}; | ||
} | ||
@@ -33,0 +36,0 @@ /** |
{ | ||
"name": "@web3-storage/access", | ||
"version": "16.2.1", | ||
"version": "16.3.0", | ||
"description": "w3access client", | ||
@@ -65,3 +65,3 @@ "homepage": "https://github.com/web3-storage/w3-protocol/tree/main/packages/access-client", | ||
"uint8arrays": "^4.0.6", | ||
"@web3-storage/capabilities": "^11.0.0", | ||
"@web3-storage/capabilities": "^11.0.1", | ||
"@web3-storage/did-mailto": "^2.0.2" | ||
@@ -68,0 +68,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
173630
2888
1