Class: OrgMember
org.OrgMember
Represents an Accounts membership to an Org
Hierarchy
-
↳
OrgMember
Constructors
constructor
• new OrgMember(__namedParameters?
)
Parameters
Name | Type |
---|---|
__namedParameters |
Partial <OrgMember > |
Overrides
Defined in
Properties
_propertySerializationOptions
• _propertySerializationOptions:
SerializationOptions
[]
Inherited from
Serializable._propertySerializationOptions
Defined in
accountId
• Optional
accountId: string
= undefined
id of the corresponding Account
Defined in
• email: string
= ""
email address of the corresponding Account
Defined in
name
• name: string
= ""
name of the corresponding Account
Defined in
orgSignature
• Optional
orgSignature: Uint8Array
signature used by the member to verify Org.id and [[Org.publickey]] of the organization
Defined in
publicKey
• Optional
publicKey: Uint8Array
public key of the corresponding Account
Defined in
role
• role: OrgRole
= OrgRole.Member
the members organization role
Defined in
signature
• Optional
signature: Uint8Array
signature used by other members to verify id, email and publicKey
Defined in
status
• status: OrgMemberStatus
=
OrgMemberStatus.Active
Defined in
updated
• updated: Date
time the member was last updated
Defined in
vaults
• vaults: { id
: string
; readonly
: boolean
}[] = []
vaults assigned to this member
Defined in
Accessors
id
• get
id(): undefined
| string
Returns
undefined
| string
Defined in
kind
• get
kind(): string
A string representing the objects "type", useful for segmenting storage, among other things. Defaults to the lowercase class name, but can be overwritten by subclasses
Returns
string
Inherited from
Serializable.kind
Defined in
Methods
_fromRaw
▸ Protected
_fromRaw(raw
): void
Restore values from a raw object. The default implementation simply copies over all iterable properties from the base object. Overwrite this method for properties that require special treatment
Parameters
Name | Type |
---|---|
raw |
any |
Returns
void
Inherited from
Defined in
_toRaw
▸ Protected
_toRaw(version
): any
Transform this object into a raw javascript object used for serialization. The default implementation simply copies all iterable properties not included in the [[exlude]] array and calls toRaw on any properties that are themselfes instances of Serializable. This method should be overwritten by subclasses if certain properties require special treatment.
Parameters
Name | Type |
---|---|
version |
undefined | string |
Returns
any
Inherited from
Defined in
clone
▸ clone(): OrgMember
Creates a deep clone of the object
Returns
Inherited from
Defined in
fromBytes
▸ fromBytes(bytes
): OrgMember
Deserializes the object from a byte array
Parameters
Name | Type |
---|---|
bytes |
Uint8Array |
Returns
Inherited from
Defined in
fromJSON
▸ fromJSON(json
): OrgMember
Deserializes the object from a JSON string
Parameters
Name | Type |
---|---|
json |
string |
Returns
Inherited from
Defined in
fromRaw
▸ fromRaw(raw
): OrgMember
Restores propertiers from a raw object of the same form generated by
toRaw. The base implementation blindly copies over
values from the raw object via Object.assign
so subclasses should explictly
process any propertyies that need special treatment.
Also takes are of validation and "upgrading" in case the raw object has an old version. Use the protected _fromRaw method to implement subclass-specific behavior.
Parameters
Name | Type |
---|---|
raw |
any |
Returns
Inherited from
Defined in
toBytes
▸ toBytes(): Uint8Array
Returns a serialization of the object in form of a byte array
Returns
Uint8Array
Inherited from
Defined in
toJSON
▸ toJSON(): string
Returns a JSON serialization of the object
Returns
string
Inherited from
Defined in
toRaw
▸ toRaw(version?
): any
Creates a raw javascript object representation of the class, which can be used for storage or data transmission. Also handles "downgrading" to previous versions. Use _toRaw for subclass-specific behavior.
Parameters
Name | Type |
---|---|
version? |
string |
Returns
any
Inherited from
Defined in
validate
▸ validate(): boolean
This is called during deserialization and should verify that all properties have been populated with values of the correct type. Subclasses should implement this method based on their class structure.
Returns
boolean