# @apex-pub/convector-core-model

> Convector Model base class

Latest version **2.0.2** (published 2026-10-29) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @apex-pub/convector-core-model
pnpm add @apex-pub/convector-core-model
yarn add @apex-pub/convector-core-model
bun add @apex-pub/convector-core-model
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-10-29 |
| First published | 2023-06-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 39.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 143 |
| Maintainers | akshaysood112, rodolfoleal |
| Keywords | typescript, chaincode, blockchain, hyperledger, solutions, environment, hyperledger fabric, smart contract, run, hurley, composer |

## Links

- npm: https://www.npmjs.com/package/@apex-pub/convector-core-model
- Repository: https://github.com/hyperledger-labs/convector.git#develop
- Homepage: https://worldsibu.tech/convector/convector-smart-contracts/
- Issues: https://github.com/hyperledger-labs/convector/issues
- npm.io page: https://npm.io/package/@apex-pub/convector-core-model

## Dependencies (5)

- [yup](https://npm.io/package/yup.md) ^0.26.10
- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [window-or-global](https://npm.io/package/window-or-global.md) ^1.0.1
- [@apex-pub/convector-core-errors](https://npm.io/package/@apex-pub/convector-core-errors.md) ^2.0.2
- [@apex-pub/convector-core-storage](https://npm.io/package/@apex-pub/convector-core-storage.md) ^2.0.2

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2026-10-29
- 1.5.2-0-alpha.51b9133d (canary) — 2025-06-18
- 2.0.1 — 2026-10-28
- 2.0.0-alpha.3 — 2026-06-16
- 2.0.0 — 2026-06-16
- 1.5.0 — 2024-07-29
- 1.4.1-4-alpha.5f94f88e — 2023-07-27
- 1.4.1-4-alpha.808cd029 — 2023-07-27
- 1.4.1-4-alpha.71b29c8b — 2023-07-27
- 1.4.1-4-alpha.c429017f — 2023-07-27
- 1.4.1-4-alpha.e17c6b86 — 2023-07-27
- 1.4.1-4-alpha.5d0544b6 — 2023-07-27
- 1.4.1-4-alpha.4ece38f3 — 2023-07-26
- 1.4.1-4-alpha.8939dce7 — 2023-07-25
- 1.4.1-4-alpha.8d3ff686 — 2023-07-25
- … 13 more at https://npm.io/package/@apex-pub/convector-core-model/versions

## README

# Convector Model

This module contains the base model to be used as a base for any other model.

## Usage

The children classes can be used in 1 of 3 ways:

### As an model query

```ts
class MyModel extends ConvectorModel<MyModel> { ... }

const model = new MyModel(id);
model.fetch()
  .then(onModelFound)
  .catch(onModelNotFound);
```

### As a param constructor and validator

```ts
class MyModel extends ConvectorModel<MyModel> { /* ... */ }

@Controller('my-controller')
class MyController {
  @Invokable()
  public async myMethod(
    @Param(MyModel)
    myModel: MyModel
  ) {
    myModel.save();
  }
}
```

### As a container to start filling the model

```ts
class MyModel extends ConvectorModel<MyModel> { /* ... */ }

const myModel = new MyModel();
myModel.name = 'name';
myModel.info = 'info';
/* ... */
myModel.save();
```

---
_Source: https://npm.io/package/@apex-pub/convector-core-model · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
