u
This commit is contained in:
@@ -71,6 +71,48 @@ export class ApiClient {
|
||||
delete: (id) => this.#empty('DELETE', `/api/brand/${enc(id)}`),
|
||||
};
|
||||
|
||||
this.attributename = {
|
||||
/** GET /api/attributename */
|
||||
list: () => this.#json('GET', '/api/attributename'),
|
||||
/** POST /api/attributename */
|
||||
create: (body) => this.#json('POST', '/api/attributename', { body }),
|
||||
/** PATCH /api/attributename/{id} */
|
||||
update: (id, body) => this.#json('PATCH', `/api/attributename/${enc(id)}`, { body }),
|
||||
/** DELETE /api/attributename/{id} */
|
||||
delete: (id) => this.#json('DELETE', `/api/attributename/${enc(id)}`),
|
||||
/** PUT /api/attributename/order */
|
||||
order: (body) => this.#json('PUT', '/api/attributename/order', { body }),
|
||||
};
|
||||
|
||||
this.attributevalue = {
|
||||
/** GET /api/attributename/{attributeId}/value */
|
||||
listByAttributeId: (attributeId) =>
|
||||
this.#json('GET', `/api/attributename/${enc(attributeId)}/value`),
|
||||
/** POST /api/attributename/{attributeId}/value */
|
||||
create: (attributeId, body) =>
|
||||
this.#json('POST', `/api/attributename/${enc(attributeId)}/value`, { body }),
|
||||
/** PATCH /api/attributevalue/{id} */
|
||||
update: (id, body) => this.#json('PATCH', `/api/attributevalue/${enc(id)}`, { body }),
|
||||
/** DELETE /api/attributevalue/{id} */
|
||||
delete: (id) => this.#json('DELETE', `/api/attributevalue/${enc(id)}`),
|
||||
/** PUT /api/attributename/{attributeId}/value/order */
|
||||
order: (attributeId, body) =>
|
||||
this.#json('PUT', `/api/attributename/${enc(attributeId)}/value/order`, { body }),
|
||||
};
|
||||
|
||||
this.propertyname = {
|
||||
/** GET /api/propertyname */
|
||||
list: () => this.#json('GET', '/api/propertyname'),
|
||||
/** POST /api/propertyname */
|
||||
create: (body) => this.#json('POST', '/api/propertyname', { body }),
|
||||
/** PATCH /api/propertyname/{id} */
|
||||
update: (id, body) => this.#json('PATCH', `/api/propertyname/${enc(id)}`, { body }),
|
||||
/** DELETE /api/propertyname/{id} */
|
||||
delete: (id) => this.#json('DELETE', `/api/propertyname/${enc(id)}`),
|
||||
/** PUT /api/propertyname/order */
|
||||
order: (body) => this.#json('PUT', '/api/propertyname/order', { body }),
|
||||
};
|
||||
|
||||
this.supplier = {
|
||||
/** GET /api/supplier → { suppliers: Supplier[] } */
|
||||
list: () => this.#json('GET', '/api/supplier'),
|
||||
@@ -425,6 +467,21 @@ export class ApiClient {
|
||||
/** DELETE /api/article/{sku}/supplier/{id} */
|
||||
deleteSupplier: (sku, id) =>
|
||||
this.#empty('DELETE', `/api/article/${enc(sku)}/supplier/${enc(id)}`),
|
||||
/** GET /api/article/{sku}/attributevalue */
|
||||
getAttributeValues: (sku) =>
|
||||
this.#json('GET', `/api/article/${enc(sku)}/attributevalue`),
|
||||
/** PUT /api/article/{sku}/attributevalue */
|
||||
setAttributeValues: (sku, body) =>
|
||||
this.#json('PUT', `/api/article/${enc(sku)}/attributevalue`, { body }),
|
||||
/** GET /api/article/{sku}/property */
|
||||
getProperties: (sku) =>
|
||||
this.#json('GET', `/api/article/${enc(sku)}/property`),
|
||||
/** PUT /api/article/{sku}/property */
|
||||
setProperties: (sku, body) =>
|
||||
this.#json('PUT', `/api/article/${enc(sku)}/property`, { body }),
|
||||
/** DELETE /api/article/{sku}/property/{propertyId} */
|
||||
deleteProperty: (sku, propertyId) =>
|
||||
this.#json('DELETE', `/api/article/${enc(sku)}/property/${enc(propertyId)}`),
|
||||
};
|
||||
|
||||
this.posterminal = {
|
||||
|
||||
Reference in New Issue
Block a user