Skip to content

Commit

Permalink
Merge pull request #4148 from systeminit/feat-docs-Experimenting-with…
Browse files Browse the repository at this point in the history
…-automating-our-asset_builder-docs

feat(docs): Experimenting with automating our asset_builder docs
  • Loading branch information
keeb authored Jul 19, 2024
2 parents 168e6a0 + 24f4cbb commit 392282f
Show file tree
Hide file tree
Showing 43 changed files with 3,946 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ prelude
app/docs/src/.vitepress/cache/
app/docs/dist/

bin/lang-js/docs/

.turbo
.netlify

Expand Down
2 changes: 1 addition & 1 deletion app/docs/src/changelog/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog
# Changelog Autocreate

All notable changes to this project will be documented in this file.

Expand Down
288 changes: 288 additions & 0 deletions app/docs/src/reference/asset-builder/classes/AssetBuilder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
[**lang-js**](../README.md)**Docs**

***

[lang-js](../README.md) / AssetBuilder

# Class: AssetBuilder

Represents a builder for creating System Initiative Asset Schemas.

## Example

```ts
const asset = new AssetBuilder();

const myProp = new PropBuilder().setName("myProp").setKind("string").build();
asset.addProp(myProp);

return asset.build();
```

## Implements

- [`IAssetBuilder`](../interfaces/IAssetBuilder.md)

## Constructors

### new AssetBuilder()

> **new AssetBuilder**(): [`AssetBuilder`](AssetBuilder.md)
#### Returns

[`AssetBuilder`](AssetBuilder.md)

#### Defined in

[asset\_builder.ts:1061](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1061)

## Properties

### asset

> **asset**: [`Asset`](../interfaces/Asset.md)
#### Defined in

[asset\_builder.ts:1059](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1059)

## Methods

### addProp()

> **addProp**(`prop`): [`AssetBuilder`](AssetBuilder.md)
Adds a prop to the asset.

#### Parameters

**prop**: [`PropDefinition`](../interfaces/PropDefinition.md)

The prop definition to add

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addProp`](../interfaces/IAssetBuilder.md#addprop)

#### Defined in

[asset\_builder.ts:1071](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1071)

***

### addSecretProp()

> **addSecretProp**(`prop`): [`AssetBuilder`](AssetBuilder.md)
Adds a secret prop to the asset.

#### Parameters

**prop**: [`SecretPropDefinition`](../interfaces/SecretPropDefinition.md)

The secret prop definition to add

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addSecretProp`](../interfaces/IAssetBuilder.md#addsecretprop)

#### Defined in

[asset\_builder.ts:1085](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1085)

***

### defineSecret()

> **defineSecret**(`definition`): `this`
Adds a secret to the asset.

#### Parameters

**definition**: [`SecretDefinition`](../interfaces/SecretDefinition.md)

The secret definition to add

#### Returns

`this`

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`defineSecret`](../interfaces/IAssetBuilder.md#definesecret)

#### Defined in

[asset\_builder.ts:1123](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1123)

***

### addResourceProp()

> **addResourceProp**(`prop`): [`AssetBuilder`](AssetBuilder.md)
Adds a resource prop to the asset.

#### Parameters

**prop**: [`PropDefinition`](../interfaces/PropDefinition.md)

The prop definition to add

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addResourceProp`](../interfaces/IAssetBuilder.md#addresourceprop)

#### Defined in

[asset\_builder.ts:1164](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1164)

***

### addInputSocket()

> **addInputSocket**(`socket`): [`AssetBuilder`](AssetBuilder.md)
Adds an input socket to the asset.

#### Parameters

**socket**: [`SocketDefinition`](../interfaces/SocketDefinition.md)

The socket definition to add

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addInputSocket`](../interfaces/IAssetBuilder.md#addinputsocket)

#### Defined in

[asset\_builder.ts:1178](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1178)

***

### addOutputSocket()

> **addOutputSocket**(`socket`): [`AssetBuilder`](AssetBuilder.md)
Adds an output socket to the asset.

#### Parameters

**socket**: [`SocketDefinition`](../interfaces/SocketDefinition.md)

The socket definition to add

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addOutputSocket`](../interfaces/IAssetBuilder.md#addoutputsocket)

#### Defined in

[asset\_builder.ts:1192](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1192)

***

### addSiPropValueFrom()

> **addSiPropValueFrom**(`siPropValueFrom`): `this`
#### Parameters

**siPropValueFrom**: [`SiPropValueFromDefinition`](../interfaces/SiPropValueFromDefinition.md)

#### Returns

`this`

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addSiPropValueFrom`](../interfaces/IAssetBuilder.md#addsipropvaluefrom)

#### Defined in

[asset\_builder.ts:1200](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1200)

***

### addDocLink()

> **addDocLink**(`key`, `value`): [`AssetBuilder`](AssetBuilder.md)
Adds a doc link to the asset.

#### Parameters

**key**: `string`

the name of the doc link

**value**: `string`

the value for the doc link

#### Returns

[`AssetBuilder`](AssetBuilder.md)

This AssetBuilder instance for method chaining

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`addDocLink`](../interfaces/IAssetBuilder.md#adddoclink)

#### Defined in

[asset\_builder.ts:1215](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1215)

***

### build()

> **build**(): [`Asset`](../interfaces/Asset.md)
#### Returns

[`Asset`](../interfaces/Asset.md)

#### Implementation of

[`IAssetBuilder`](../interfaces/IAssetBuilder.md).[`build`](../interfaces/IAssetBuilder.md#build)

#### Defined in

[asset\_builder.ts:1223](https://github.com/systeminit/si/blob/main/bin/lang-js/src/asset_builder.ts#L1223)
Loading

0 comments on commit 392282f

Please sign in to comment.