ChainGraph API Documentation / @badaitech/chaingraph-types / SecretPort
Class: SecretPort<S>
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:20
Concrete implementation of a SecretPort.
Extends
Type Parameters
S
S extends SecretType
Implements
Constructors
Constructor
new SecretPort<
S>(config):SecretPort<S>
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:23
Parameters
config
Returns
SecretPort<S>
Overrides
Properties
config
protectedconfig:SecretPortConfig
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:16
Inherited from
value?
protectedoptionalvalue:SecretPortValue<S>
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:17
Inherited from
Accessors
id
Get Signature
get id():
string
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:25
The unique identifier of the port.
Returns
string
Implementation of
Inherited from
key
Get Signature
get key():
string
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:29
The key of the port.
Returns
string
Implementation of
Inherited from
Methods
addConnection()
addConnection(
nodeId,portId):void
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:153
Adds a connection to the port metadata.
Parameters
nodeId
string
The ID of the node to connect to.
portId
string
The ID of the port to connect to.
Returns
void
Implementation of
Inherited from
clone()
clone():
IPort<SecretPortConfig<S>>
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:130
Clones the port instance.
Returns
A new port instance with the same configuration and value.
Implementation of
Inherited from
cloneWithNewId()
cloneWithNewId():
IPort<SecretPortConfig<S>>
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:84
Clones cloneWithNewId
Returns
Implementation of
Overrides
deserialize()
deserialize(
data):IPort<SecretPortConfig<S>>
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:79
Deserializes the given JSONValue (expected to hold { config, value }) and updates both the config and current value.
Parameters
data
unknown
Returns
Implementation of
Inherited from
deserializeConfig()
deserializeConfig(
data):SecretPortConfig<S>
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:73
Deserializes a JSONValue into a configuration object of type C.
Parameters
data
unknown
Returns
Implementation of
Overrides
deserializeValue()
deserializeValue(
data):SecretPortValue<S>
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:80
Deserializes a JSONValue into a port value of type T.
Parameters
data
unknown
Returns
Implementation of
Overrides
getConfig()
getConfig():
SecretPortConfig
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:33
Retrieves the current port configuration.
Returns
The port configuration of type C.
Implementation of
Inherited from
getDefaultValue()
getDefaultValue():
undefined
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:38
Returns the default value. Concrete implementations can use a default provided by the configuration.
Returns
undefined
Implementation of
Overrides
getValue()
getValue():
SecretPortValue<S> |undefined
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:42
Gets the current port value.
Returns
SecretPortValue<S> | undefined
The port value, or undefined if none is set.
Implementation of
Inherited from
isCompatibleWith()
isCompatibleWith(
otherPort):boolean
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:95
Parameters
otherPort
Returns
boolean
isSystem()
isSystem():
boolean
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:138
Check if the port is a system port.
Returns
boolean
True if the port is a system port, otherwise false.
Implementation of
Inherited from
isSystemError()
isSystemError():
boolean
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:142
Check if the port is a system error port.
Returns
boolean
True if the port is a system error port, otherwise false.
Implementation of
Inherited from
removeConnection()
removeConnection(
nodeId,portId):void
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:179
Removes a connection from the port metadata.
Parameters
nodeId
string
The ID of the node to disconnect from.
portId
string
The ID of the port to disconnect from.
Returns
void
Implementation of
Inherited from
reset()
reset():
void
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:50
Resets the port’s current value.
In typical implementations, this resets the value to a default (if available).
Returns
void
Implementation of
Inherited from
serialize()
serialize():
unknown
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:59
Serializes both config and value into a JSONValue–compatible object. It calls the abstract serializeConfig and serializeValue methods.
Returns
unknown
Implementation of
Inherited from
serializeConfig()
serializeConfig(
config):unknown
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:59
Serializes the configuration (of type C) to a JSONValue.
Parameters
config
Returns
unknown
Implementation of
Overrides
serializeValue()
serializeValue(
value):unknown
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:66
Serializes the port value (of type T) to a JSONValue.
Parameters
value
Returns
unknown
Implementation of
Overrides
setConfig()
setConfig(
newConfig):void
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:37
Updates the port configuration with a new configuration object.
Parameters
newConfig
New configuration of type C.
Returns
void
Implementation of
Inherited from
setValue()
setValue(
newValue):void
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:46
Sets or updates the port value. The value must be validated before being accepted.
Parameters
newValue
The new value to set for the port.
SecretPortValue<S> | undefined
Returns
void
Implementation of
Inherited from
unwrap()
unwrap():
IPort<SecretPortConfig<S>>
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:237
Unwrap to get underlying port instance For regular ports, returns this (already unwrapped)
Returns
Implementation of
Inherited from
validate()
validate():
boolean
Defined in: packages/chaingraph-types/src/port/base/BasePort.ts:118
Validates both the current configuration and value. It defers to the abstract validateConfig and validateValue methods.
Returns
boolean
Implementation of
Inherited from
validateConfig()
validateConfig(
config):boolean
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:52
Validates the port configuration. Must return true if the configuration is valid, false otherwise.
Parameters
config
Returns
boolean
Implementation of
Overrides
validateValue()
validateValue(
value):boolean
Defined in: packages/chaingraph-types/src/port/instances/SecretPort.ts:45
Validates the port value. Must return true if the value is valid, false otherwise.
Parameters
value
Returns
boolean