This commit is contained in:
seb
2026-10-10 18:17:14 +02:00
parent 004e0de869
commit a20668cd61
31 changed files with 572 additions and 76 deletions

View File

@@ -2,33 +2,43 @@ import { http } from './http.js';
export const attributevalue = {
/** GET /api/attributename/:attributeId/value → { values: AttributeValue[] } */
// #region GET /api/attributename/:attributeId/value — listByAttributeId
listByAttributeId(attributeId) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`);
},
// #endregion
/** POST /api/attributename/:attributeId/value → 201 { attributevalue } */
// #region POST /api/attributename/:attributeId/value — create
create(attributeId, body) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value`, {
method: 'POST',
body,
});
},
// #endregion
/** PATCH /api/attributevalue/:id → 200 { attributevalue } */
// #region PATCH /api/attributevalue/:id — update
update(id, body) {
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'PATCH', body });
},
// #endregion
/** DELETE /api/attributevalue/:id → 200 */
// #region DELETE /api/attributevalue/:id — delete
delete(id) {
return http(`/api/attributevalue/${encodeURIComponent(id)}`, { method: 'DELETE' });
},
// #endregion
/** PUT /api/attributename/:attributeId/value/order → 200 */
// #region PUT /api/attributename/:attributeId/value/order — order
order(attributeId, attributevalueIds) {
return http(`/api/attributename/${encodeURIComponent(attributeId)}/value/order`, {
method: 'PUT',
body: { attributevalueIds },
});
},
// #endregion
};