@bloock/sdk / SchemaBuilder
Class: SchemaBuilder
Is a builder pattern for constructing schema instances.
Table of contents
Constructors
Properties
- booleanAttributes
- configData
- dateAttributes
- dateTimeAttributes
- decimalAttributes
- decimalEnumAttributes
- description
- displayName
- integerAttributes
- integerEnumAttributes
- schemaType
- stringAttributes
- stringEnumAttributes
- version
Methods
- addBooleanAttribute
- addDateAttribute
- addDateTimeAttribute
- addDecimalAttribute
- addDecimalEnumAttribute
- addIntegerAttribute
- addIntegerEnumAttribute
- addStringAttribute
- addStringEnumAttribute
- build
Constructors
constructor
• new SchemaBuilder(displayName, schemaType, version, description, configData): SchemaBuilder
Creates a new instance of SchemaBuilder with initial values.
Parameters
| Name | Type |
|---|---|
displayName | string |
schemaType | string |
version | string |
description | string |
configData | ConfigData |
Returns
Defined in
entity/identity/schema_builder.ts:43
Properties
booleanAttributes
• booleanAttributes: BooleanAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:28
configData
• configData: ConfigData
Defined in
entity/identity/schema_builder.ts:23
dateAttributes
• dateAttributes: DateAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:29
dateTimeAttributes
• dateTimeAttributes: DateTimeAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:30
decimalAttributes
• decimalAttributes: DecimalAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:27
decimalEnumAttributes
• decimalEnumAttributes: DecimalEnumAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:33
description
• description: string
Defined in
entity/identity/schema_builder.ts:22
displayName
• displayName: string
Defined in
entity/identity/schema_builder.ts:19
integerAttributes
• integerAttributes: IntegerAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:26
integerEnumAttributes
• integerEnumAttributes: IntegerEnumAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:32
schemaType
• schemaType: string
Defined in
entity/identity/schema_builder.ts:20
stringAttributes
• stringAttributes: StringAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:25
stringEnumAttributes
• stringEnumAttributes: StringEnumAttributeDescriptor[]
Defined in
entity/identity/schema_builder.ts:31
version
• version: string
Defined in
entity/identity/schema_builder.ts:21
Methods
addBooleanAttribute
▸ addBooleanAttribute(name, technicalName, description, required): SchemaBuilder
Adds a boolean attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:134
addDateAttribute
▸ addDateAttribute(name, technicalName, description, required): SchemaBuilder
Adds a date attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:154
addDateTimeAttribute
▸ addDateTimeAttribute(name, technicalName, description, required): SchemaBuilder
Adds a datetime attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:174
addDecimalAttribute
▸ addDecimalAttribute(name, technicalName, description, required): SchemaBuilder
Adds a decimal attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:114
addDecimalEnumAttribute
▸ addDecimalEnumAttribute(name, technicalName, description, required, enumeration): SchemaBuilder
Adds a decimal enum attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
enumeration | number[] |
Returns
Defined in
entity/identity/schema_builder.ts:256
addIntegerAttribute
▸ addIntegerAttribute(name, technicalName, description, required): SchemaBuilder
Adds an integer attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:94
addIntegerEnumAttribute
▸ addIntegerEnumAttribute(name, technicalName, description, required, enumeration): SchemaBuilder
Adds an integer enum attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
enumeration | number[] |
Returns
Defined in
entity/identity/schema_builder.ts:228
addStringAttribute
▸ addStringAttribute(name, technicalName, description, required): SchemaBuilder
Adds a string attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
Returns
Defined in
entity/identity/schema_builder.ts:74
addStringEnumAttribute
▸ addStringEnumAttribute(name, technicalName, description, required, enumeration): SchemaBuilder
Adds a string enum attribute descriptor to the schema builder.
Parameters
| Name | Type |
|---|---|
name | string |
technicalName | string |
description | string |
required | boolean |
enumeration | string[] |
Returns
Defined in
entity/identity/schema_builder.ts:200
build
▸ build(): Promise<Schema>
Creates a schema using the configured attributes.
Returns
Promise<Schema>