Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3-storage/capabilities

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-storage/capabilities - npm Package Compare versions

Comparing version 13.0.0 to 13.1.0

9

dist/src/plan.d.ts

@@ -8,2 +8,11 @@ /**

}>, {}>>;
/**
* Capability can be invoked by an account to change its billing plan.
*/
export const set: import("@ucanto/interface").TheCapabilityParser<import("@ucanto/interface").CapabilityMatch<"plan/set", `did:mailto:${string}` & `did:${string}` & import("@ucanto/interface").Phantom<{
protocol: "did:";
}>, import("@ucanto/validator").InferStruct<{
product: typeof DID;
}>>>;
import { DID } from '@ucanto/validator';
//# sourceMappingURL=plan.d.ts.map

24

dist/src/types.d.ts

@@ -469,5 +469,17 @@ import type { TupleToUnion } from 'type-fest';

export type PlanGetFailure = PlanNotFound;
export type PlanSet = InferInvokedCapability<typeof PlanCaps.set>;
export type PlanSetSuccess = Unit;
/**
* @deprecate currently unused - used to be part of PlanSetFailure but we switched to CustomerNotFound
*/
export interface AccountNotFound extends Ucanto.Failure {
name: 'AccountNotFound';
}
export interface InvalidPlanName extends Ucanto.Failure {
name: 'InvalidPlanName';
}
export type PlanSetFailure = CustomerNotFound;
export type Top = InferInvokedCapability<typeof top>;
export type Abilities = TupleToUnion<AbilitiesArray>;
export type AbilitiesArray = [
export type ServiceAbility = TupleToUnion<ServiceAbilityArray>;
export type ServiceAbilityArray = [
Top['can'],

@@ -514,2 +526,10 @@ ProviderAdd['can'],

];
/**
* @deprecated use ServiceAbility
*/
export type Abilities = ServiceAbility;
/**
* @deprecated use ServiceAbilityArray
*/
export type AbilitiesArray = ServiceAbilityArray;
//# sourceMappingURL=types.d.ts.map

2

package.json
{
"name": "@web3-storage/capabilities",
"version": "13.0.0",
"version": "13.1.0",
"description": "UCAN Capabilities provided by web3.storage",

@@ -5,0 +5,0 @@ "homepage": "https://web3.storage",

@@ -1,3 +0,3 @@

import { capability, ok } from '@ucanto/validator'
import { AccountDID, equalWith, and } from './utils.js'
import { DID, capability, ok, struct } from '@ucanto/validator'
import { AccountDID, equal, equalWith, and } from './utils.js'

@@ -15,1 +15,19 @@ /**

})
/**
* Capability can be invoked by an account to change its billing plan.
*/
export const set = capability({
can: 'plan/set',
with: AccountDID,
nb: struct({
product: DID,
}),
derives: (child, parent) => {
return (
and(equalWith(child, parent)) ||
and(equal(child.nb.product, parent.nb.product, 'product')) ||
ok({})
)
},
})

@@ -633,8 +633,25 @@ import type { TupleToUnion } from 'type-fest'

export type PlanSet = InferInvokedCapability<typeof PlanCaps.set>
export type PlanSetSuccess = Unit
/**
* @deprecate currently unused - used to be part of PlanSetFailure but we switched to CustomerNotFound
*/
export interface AccountNotFound extends Ucanto.Failure {
name: 'AccountNotFound'
}
export interface InvalidPlanName extends Ucanto.Failure {
name: 'InvalidPlanName'
}
export type PlanSetFailure = CustomerNotFound
// Top
export type Top = InferInvokedCapability<typeof top>
export type Abilities = TupleToUnion<AbilitiesArray>
export type ServiceAbility = TupleToUnion<ServiceAbilityArray>
export type AbilitiesArray = [
export type ServiceAbilityArray = [
Top['can'],

@@ -681,1 +698,11 @@ ProviderAdd['can'],

]
/**
* @deprecated use ServiceAbility
*/
export type Abilities = ServiceAbility
/**
* @deprecated use ServiceAbilityArray
*/
export type AbilitiesArray = ServiceAbilityArray

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc