This commit is contained in:
seb
2026-09-27 16:19:45 +02:00
parent e7f92ebef8
commit cd57f21af8
25 changed files with 412 additions and 49 deletions

View File

@@ -45,13 +45,13 @@ Lists the brands of the user's selected company.
**Returns**
`Promise<Array<{id: number, name: string, gsprpinfo: string|null}>>` — The brands.
`Promise<Array<{id: number, name: string, gsprpinfo: string|null, pics: Array<{id: number, sort: number, fullHash: string, thumbW: number, thumbH: number, thumbHash: string}>}>>` — The brands.
**Example**
```js
const brands = await store.brand.list(42);
// => [{ id, name, gsprpinfo }]
// => [{ id, name, gsprpinfo, pics: [{ sort, fullHash, thumbW, thumbH, thumbHash }] }]
```
## `brand.upsert`
@@ -72,7 +72,7 @@ Creates or updates a brand for the user's selected company, keyed by name.
**Returns**
`Promise<{id: number, name: string, gsprpinfo: string|null}>` — The upserted brand.
`Promise<{id: number, name: string, gsprpinfo: string|null, pics: Array<{id: number, sort: number, fullHash: string, thumbW: number, thumbH: number, thumbHash: string}>}>` — The upserted brand.
**Throws**
@@ -82,5 +82,5 @@ Creates or updates a brand for the user's selected company, keyed by name.
```js
const brand = await store.brand.upsert(42, { name: 'Coca-Cola', gsprpinfo: 'x' });
// => { id, name, gsprpinfo }
// => { id, name, gsprpinfo, pics: [] }
```