# Interface: NodeCollections

Defined in: [packages/core/src/node/types.ts:362](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L362)

## Methods

### define()

```ts
define(spaceId, definition): Promise<NodeCollection>;
```

Defined in: [packages/core/src/node/types.ts:366](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L366)

Publishes a definition into the space, as a signed record that syncs like any other

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |
| `definition` | [`DefineCollection`](https://minca.dev/api/core/interfaces/DefineCollection.md) |

#### Returns

`Promise`\<[`NodeCollection`](https://minca.dev/api/core/interfaces/NodeCollection.md)\>

***

### delete()

```ts
delete(spaceId, name): Promise<void>;
```

Defined in: [packages/core/src/node/types.ts:368](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L368)

Takes a definition out of the space; refused while the collection still has records

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |
| `name` | `string` |

#### Returns

`Promise`\<`void`\>

***

### list()

```ts
list(spaceId): Promise<readonly NodeCollection[]>;
```

Defined in: [packages/core/src/node/types.ts:364](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L364)

What a space holds: every defined collection, and every collection with records

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |

#### Returns

`Promise`\<readonly [`NodeCollection`](https://minca.dev/api/core/interfaces/NodeCollection.md)[]\>

***

### tag()

```ts
tag(
   spaceId, 
   collection, 
   field, 
   value
): Promise<string>;
```

Defined in: [packages/core/src/node/types.ts:370](https://github.com/leifriksheim/minca/blob/main/core/src/node/types.ts#L370)

The topic tag a record with this value carries; keyed in a private space, so only members can work it out

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `spaceId` | `string` |
| `collection` | `string` |
| `field` | `string` |
| `value` | `string` \| `number` \| `boolean` |

#### Returns

`Promise`\<`string`\>
