InappropriateTaskListTitleError
Type parameters
▪ T: SuperConstructor
Hierarchy
DomainError
↳ InappropriateTaskListTitleError
Implements
- Definable
- Hookable
- Versionable
- Ejsonable
Index
Constructors
Properties
Methods
- equals
- fillErrorProps
- getActions
- getHook
- getHookOrThrow
- getHooks
- getLegacyTransformer
- getLegacyTransformers
- getPropTypes
- getPropertyInitializers
- getSchemaVersion
- getTypeName
- hasAction
- hasHook
- hasLegacyTransformer
- overrideHook
- overrideLegacyTransformer
- registerHook
- registerLegacyTransformer
- removeHook
- toJSONValue
- toPlainObject
- toString
- transformLegacyProps
- typeName
- validateProps
- getPropTypes
- getPropertyInitializers
- getTypeName
- toString
- typeName
Constructors
constructor
+ new InappropriateTaskListTitleError(taskListId
: string, title
: string): InappropriateTaskListTitleError
Overrides void
Parameters:
Name | Type |
---|---|
taskListId | string |
title | string |
Returns: InappropriateTaskListTitleError
Properties
Optional
code
• code? : number
Inherited from CancelingEmploymentUnavailableForEmployee.code
Overrides StateError.code
message
• message: string
Inherited from CancelingEmploymentUnavailableForEmployee.message
Overrides StateError.message
name
• name: string
Inherited from CancelingEmploymentUnavailableForEmployee.name
Overrides StateError.name
Optional
schemaVersion
• schemaVersion? : number
Inherited from CancelingEmploymentUnavailableForEmployee.schemaVersion
Overrides void
Optional
stack
• stack? : string
Inherited from CancelingEmploymentUnavailableForEmployee.stack
Overrides StateError.stack
Methods
equals
▸ equals(other
: any): boolean
Inherited from CreateEmployee.equals
Evaluates if value and value's type of passed other instance are equal to current one.
example
example
example
Parameters:
Name | Type | Description |
---|---|---|
other | any | Other instance of DefinableMixin. |
Returns: boolean
Returns true
if other instance of DefinableMixin is equal, else false
.
fillErrorProps
▸ fillErrorProps(props
: ErrorProps): ErrorProps
Inherited from StateError.fillErrorProps
Parameters:
Name | Type |
---|---|
props | ErrorProps |
Returns: ErrorProps
getActions
▸ getActions(): Actions
Inherited from CreateEmployee.getActions
Returns a collection of all available actions with matching registered hooks as nested collection.
Returns: Actions
Collection of actions(key) with matching registered hooks as nested collection(value).
getHook
▸ getHook(action
: string, id
: string): Hook | undefined
Inherited from CreateEmployee.getHook
Returns hook for action and id.
example
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook is resolved. |
id | string | Identifier under which hook was was registered. |
Returns: Hook | undefined
Hook as a function
matching declaration, else undefined
.
getHookOrThrow
▸ getHookOrThrow(action
: string, id
: string): Hook
Inherited from CreateEmployee.getHookOrThrow
Returns hook for action and id or throws.
throws
{HandlerNotFoundError}
Thrown if there is no hook registered for action with id.
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook is resolved. |
id | string | Identifier under which hook was was registered. |
Returns: Hook
Hook as a function
matching declaration, else throws.
getHooks
▸ getHooks(action
: string): Mappings
Inherited from CreateEmployee.getHooks
Returns a collection of all available hooks registered for action.
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hooks are resolved. |
Returns: Mappings
Collection of hooks.
getLegacyTransformer
▸ getLegacyTransformer(schemaVersion
: number): Hook
Inherited from CreateEmployee.getLegacyTransformer
Returns legacy transformer for schema version.
throws
{LegacyTransformerNotFoundError}
Thrown if transformer for schema version can't be found.
Parameters:
Name | Type | Description |
---|---|---|
schemaVersion | number | Schema version. |
Returns: Hook
Legacy transformer for schema version.
getLegacyTransformers
▸ getLegacyTransformers(): LegacyTransformers
Inherited from CreateEmployee.getLegacyTransformers
Returns all available legacy transformers.
Returns: LegacyTransformers
Map instance of all registered legacy transformers with number version as a key and transformer function as a value.
getPropTypes
▸ getPropTypes(): Props
Inherited from CreateEmployee.getPropTypes
Returns class properties types from whole inheritance tree.
example
Returns: Props
Plain object representation of properties types.
getPropertyInitializers
▸ getPropertyInitializers(): Props
Inherited from CreateEmployee.getPropertyInitializers
Returns default values metadata from property initializers conversion for whole inheritance tree.
example
Returns: Props
Default values for properties.
getSchemaVersion
▸ getSchemaVersion(): number | undefined
Inherited from CreateEmployee.getSchemaVersion
Returns current instance schema version.
Returns: number | undefined
Schema version as a number, else undefined
.
getTypeName
▸ getTypeName(): TypeName
Inherited from CreateEmployee.getTypeName
Returns definable type name.
Returns: TypeName
Type name as a string.
hasAction
▸ hasAction(action
: string): boolean
Inherited from CreateEmployee.hasAction
Evaluates if hooks for action are registered.
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook is existence is evaluated. |
Returns: boolean
Returns true if hooks for action exists, else false.
hasHook
▸ hasHook(action
: string, id
: string): boolean
Inherited from CreateEmployee.hasHook
Evaluates if hook for action with id is registered.
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook is existence is evaluated. |
id | string | Identifier under which hook was was registered. |
Returns: boolean
Returns true if hook exists, else false.
hasLegacyTransformer
▸ hasLegacyTransformer(schemaVersion
: number): boolean
Inherited from CreateEmployee.hasLegacyTransformer
Evaluates is there is registered legacy transformer for schema version.
Parameters:
Name | Type | Description |
---|---|---|
schemaVersion | number | Schema version. |
Returns: boolean
Returns true
if legacy transformer for schema version is registered, else false
.
overrideHook
▸ overrideHook(action
: string, id
: string, hook
: Hook): void
Inherited from CreateEmployee.overrideHook
Overrides registered hook by action and id or registers a new one.
throws
{InvalidHookActionError}
Thrown if the the action argument is not a string
.
throws
{InvalidHookIdError}
Thrown if the the id argument is not a string
.
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook will be registered(like onConstruction , onSend , onPublish etc.) |
id | string | Identifier under which hook will be registered for further reference. |
hook | Hook | Hook as a function matching declaration for required action that will be invoked upon action. |
Returns: void
overrideLegacyTransformer
▸ overrideLegacyTransformer(schemaVersion
: number, transformer
: Hook): void
Inherited from CreateEmployee.overrideLegacyTransformer
Overrides registered transformer by schema version or registers a new one.
throws
{InvalidSchemaVersionError}
Thrown if the the schema version argument is not a number.
Parameters:
Name | Type | Description |
---|---|---|
schemaVersion | number | Schema version. |
transformer | Hook | Transformer function. |
Returns: void
registerHook
▸ registerHook(action
: string, id
: string, hook
: Hook, shouldOverride
: boolean): void
Inherited from CreateEmployee.registerHook
Registers hook by action type and id.
throws
{InvalidHookActionError}
Thrown if the the action argument is not a string.
throws
{InvalidHookIdError}
Thrown if the the id argument is not a string.
throws
{HookAlreadyExistsError}
Thrown if the existing hook with id would be overridden.
example
Parameters:
Name | Type | Default | Description |
---|---|---|---|
action | string | - | Action for which hook will be registered(like onConstruction , onSend , onPublish etc.) |
id | string | - | Identifier under which hook will be registered for further reference. |
hook | Hook | - | Hook as a function matching declaration for required action that will be invoked upon action. |
shouldOverride | boolean | false | Flag indicating that hook should be overridden if exist. |
Returns: void
registerLegacyTransformer
▸ registerLegacyTransformer(schemaVersion
: number, transformer
: Hook, shouldOverride
: boolean): void
Inherited from CreateEmployee.registerLegacyTransformer
Registers legacy transformer for version.
throws
{InvalidSchemaVersionError}
Thrown if the the schema version argument is not a number.
throws
{LegacyTransformerAlreadyExistsError}
Thrown if transformer for version would overridden without explicit call.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
schemaVersion | number | - | Schema version. |
transformer | Hook | - | Transformer function. |
shouldOverride | boolean | false | Flag indicating that transformer should be overridden if exist. |
Returns: void
removeHook
▸ removeHook(action
: string, id
: string): void
Inherited from CreateEmployee.removeHook
Removes a hook by action and id.
example
Parameters:
Name | Type | Description |
---|---|---|
action | string | Action for which hook is removed. |
id | string | Identifier under which hook was was registered. |
Returns: void
toJSONValue
▸ toJSONValue(): Record‹string, any›
Inherited from CreateEmployee.toJSONValue
Serializes value into a JSON-compatible value. It preserves all custom field types, however the initial value type is not saved.
example
Returns: Props
Public properties with assigned values as plain object.
toString
▸ toString(): TypeName
Inherited from CreateEmployee.toString
Returns definable type name
Returns: TypeName
Type name as a string.
transformLegacyProps
▸ transformLegacyProps(props
: Props): Props
Inherited from CreateEmployee.transformLegacyProps
Registrable hook for transforming legacy schema.
Parameters:
Name | Type | Description |
---|---|---|
props | Props | Properties object to be transformed. |
Returns: Props
Transformed legacy properties or their unchanged state if up to date.
typeName
▸ typeName(): TypeName
Inherited from CreateEmployee.typeName
alias
getTypeName
remarks
Compatibility for EJSON serializer: @eveble/ejson
Returns: TypeName
validateProps
▸ validateProps(props
: Props, propTypes
: PropTypes, isStrict
: boolean): boolean
Inherited from CreateEmployee.validateProps
Validates if provided properties matches prop types.
throws
{ValidationError}
Thrown if the passed properties do not match prop types.
remarks
Disabling of runtime validation is possible via Kernel's configuration(and by
that env flags also) or by annotating class with @validable(false)
.
This is useful when there is external layer(like transportation) that does all the heavy lifting of validation and there are no other sources of incoming data beside points that is handled by layer.
Use env EVEBLE_VALIDATION_TYPE
set to manual
to disable validation on
initialization. You ca re-enable it again on your application configuration via
path validation.type
set to runtime
before staring application.
example
Parameters:
Name | Type | Default | Description |
---|---|---|---|
props | Props | {} | Properties to validate. |
propTypes | PropTypes | - | Properties types. |
isStrict | boolean | true | Flag indicating that validation should be done in strict mode. |
Returns: boolean
Returns true
if properties are valid, else throws.
Static
getPropTypes
▸ getPropTypes(): Props
Inherited from CreateEmployee.getPropTypes
Returns class properties types from whole inheritance tree.
example
Returns: Props
Plain object representation of properties types.
Static
getPropertyInitializers
▸ getPropertyInitializers(): Props
Inherited from CreateEmployee.getPropertyInitializers
Returns class property initializers for whole inheritance tree.
example
Returns: Props
Plain object representation of property initializers.
Static
getTypeName
▸ getTypeName(): TypeName
Inherited from CreateEmployee.getTypeName
Returns definable type name.
Returns: TypeName
Type name as a string.
Static
toString
▸ toString(): TypeName
Inherited from CreateEmployee.toString
Returns definable type name
Returns: TypeName
Type name as a string.
Static
typeName
▸ typeName(): TypeName
Inherited from CreateEmployee.typeName
alias
getTypeName
remarks
Compatibility for EJSON serializer: @eveble/ejson
Returns: TypeName