Skip to content

ActionPermission represents a standard permission with no extra criteria.

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:546

ActionPermission represents a standard permission with no extra criteria.

Extends

Type Parameters

T

T extends NumberType

Implements

Constructors

Constructor

new ActionPermission<T>(msg): ActionPermission<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:550

Parameters

msg

iActionPermission<T>

Returns

ActionPermission<T>

Overrides

BaseNumberTypeClass.constructor

Properties

permanentlyForbiddenTimes

permanentlyForbiddenTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:548

The forbidden times of the permission.

Implementation of

iActionPermission.permanentlyForbiddenTimes


permanentlyPermittedTimes

permanentlyPermittedTimes: UintRangeArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:547

The permitted times of the permission.

Implementation of

iActionPermission.permanentlyPermittedTimes

Methods

castToUniversalPermission()

castToUniversalPermission(): UniversalPermission

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:592

Returns

UniversalPermission


clone()

clone(): ActionPermission

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:151

Deep copies the object and returns a new instance.

Returns

ActionPermission

Inherited from

BaseNumberTypeClass.clone


convert()

convert<U>(convertFunction, options?): ActionPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:556

Converts the object to a different NumberType equivalent.

Type Parameters

U

U extends NumberType

Parameters

convertFunction

(item) => U

options?

ConvertOptions

Returns

ActionPermission<U>

Overrides

BaseNumberTypeClass.convert


equals()

equals<U>(other, normalizeNumberTypes?): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:147

Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

Type Parameters

U

U extends CustomType<U>

Parameters

other

CustomType<U> | null | undefined

normalizeNumberTypes?

boolean

Returns

boolean

Inherited from

BaseNumberTypeClass.equals


getNumberFieldNames()

getNumberFieldNames(): string[]

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:157

Internal helper method to convert the number fields of the object to a different NumberType equivalent.

Returns

string[]

Inherited from

BaseNumberTypeClass.getNumberFieldNames


hasNumberFields()

hasNumberFields(): boolean

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161

Checks if the object has number fields.

Returns

boolean

Inherited from

BaseNumberTypeClass.hasNumberFields


toJson()

toJson(): JsonObject

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:139

Converts the object to a JSON object with all primitive types.

Returns

JsonObject

Inherited from

BaseNumberTypeClass.toJson


toJsonString()

toJsonString(): string

Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:143

Converts the object to a JSON string.

Returns

string

Inherited from

BaseNumberTypeClass.toJsonString


toProto()

toProto(): ActionPermission

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:565

Returns

ActionPermission


check()

static check<T>(permissions, time?): Error | null

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:606

Type Parameters

T

T extends NumberType

Parameters

permissions

ActionPermission<T>[]

time?

T

Returns

Error | null


fromJson()

static fromJson<U>(jsonValue, convertFunction, options?): ActionPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:569

Type Parameters

U

U extends NumberType

Parameters

jsonValue

JsonValue

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

ActionPermission<U>


fromJsonString()

static fromJsonString<U>(jsonString, convertFunction, options?): ActionPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:577

Type Parameters

U

U extends NumberType

Parameters

jsonString

string

convertFunction

(item) => U

options?

Partial<JsonReadOptions>

Returns

ActionPermission<U>


fromProto()

static fromProto<U>(protoMsg, convertFunction): ActionPermission<U>

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:585

Type Parameters

U

U extends NumberType

Parameters

protoMsg

ActionPermission

convertFunction

(item) => U

Returns

ActionPermission<U>


validateUpdate()

static validateUpdate<U>(permissions, newPermission): Error | null

Defined in: packages/bitbadgesjs-sdk/src/core/permissions.ts:600

Type Parameters

U

U extends NumberType

Parameters

permissions

ActionPermission<U>[]

newPermission

ActionPermission<U>[]

Returns

Error | null

Edit this page on GitHub