Skip to content

TypeScript Function APIDocs


TypeScript Function API / asset_builder / SecretPropBuilder

Class: SecretPropBuilder

Creates a prop [and a socket] in an asset with which to connect a secret

Example

ts
const secretPropName = new SecretPropBuilder()
  .setName("credential")
  .setSecretKind("DigitalOcean Credential")
 .build();

Implements

Constructors

new SecretPropBuilder()

new SecretPropBuilder(): SecretPropBuilder

Returns

SecretPropBuilder

Defined in

asset_builder.ts:822

Properties

prop

prop: SecretPropDefinition

Defined in

asset_builder.ts:820

Methods

setName()

setName(name): this

The secret prop name. This will appear in the model UI and can be any value

Parameters

name: string

the name of the secret prop

Returns

this

this

Example

ts
.setName("token")

Implementation of

ISecretPropBuilder.setName

Defined in

asset_builder.ts:842


setSecretKind()

setSecretKind(kind): this

The type of the secret - relates to the Secret Definition Name

Parameters

kind: string

Returns

this

this

Example

ts
.setSecretKind("DigitalOcean Credential")

Implementation of

ISecretPropBuilder.setSecretKind

Defined in

asset_builder.ts:857


setConnectionAnnotation()

setConnectionAnnotation(annotation): this

Parameters

annotation: string

Returns

this

Implementation of

ISecretPropBuilder.setConnectionAnnotation

Defined in

asset_builder.ts:862


setDocLinkRef()

setDocLinkRef(ref): this

Parameters

ref: string

Returns

this

Implementation of

ISecretPropBuilder.setDocLinkRef

Defined in

asset_builder.ts:867


setDocLink(link): this

Parameters

link: string

Returns

this

Implementation of

ISecretPropBuilder.setDocLink

Defined in

asset_builder.ts:872


skipInputSocket()

skipInputSocket(): this

Whether the prop should disable the auto-creation of an input socket

Returns

this

this

Example

ts
.skipInputSocket()

Implementation of

ISecretPropBuilder.skipInputSocket

Defined in

asset_builder.ts:885


build()

build(): SecretPropDefinition

Returns

SecretPropDefinition

Implementation of

ISecretPropBuilder.build

Defined in

asset_builder.ts:890