docs
This commit is contained in:
38
API.brand.md
Normal file
38
API.brand.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# brand
|
||||
|
||||
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
||||
|
||||
## `brand.delete`
|
||||
|
||||
*Source: `src/store/brand/delete.js`*
|
||||
|
||||
Deletes a brand for a company by its id.
|
||||
|
||||
```js
|
||||
const fn = del(pool);
|
||||
await fn(42, 1, 3);
|
||||
```
|
||||
|
||||
## `brand.list`
|
||||
|
||||
*Source: `src/store/brand/list.js`*
|
||||
|
||||
Lists the brands of a company.
|
||||
|
||||
```js
|
||||
const fn = list(pool);
|
||||
const brands = await fn(42, 1);
|
||||
// => [{ id, name, gsprpinfo }]
|
||||
```
|
||||
|
||||
## `brand.upsert`
|
||||
|
||||
*Source: `src/store/brand/upsert.js`*
|
||||
|
||||
Creates or updates a brand for a company, keyed by name.
|
||||
|
||||
```js
|
||||
const fn = upsert(pool);
|
||||
const brand = await fn(42, 1, { name: 'Coca-Cola', gsprpinfo: 'x' });
|
||||
// => { id, name, gsprpinfo }
|
||||
```
|
||||
Reference in New Issue
Block a user