Type Alias: DeleteMerchantDtoPayload\<T\>
@arolariu/website / types/invoices/Merchant / DeleteMerchantDtoPayload
Type Alias: DeleteMerchantDtoPayload<T>
DeleteMerchantDtoPayload<
T> =object
Defined in: types/invoices/Merchant.ts:270
DTO payload for deleting a merchant entry.
Remarks
Soft Delete: Merchants are soft-deleted and excluded from normal queries. Historical invoice references remain valid for audit purposes.
Authorization:
Requires parentCompanyId to validate hierarchical delete permissions.
Root-level merchants may require admin privileges to delete.
Cascade Behavior: Deleting a merchant does NOT cascade to child merchants. Child merchants become orphaned (parentCompanyId points to deleted entity).
Example
const deletePayload: DeleteMerchantDtoPayload = {
id: "merchant-uuid-to-delete",
parentCompanyId: "parent-company-uuid"
};
await fetch(`/api/merchants/${deletePayload.id}`, {
method: "DELETE",
body: JSON.stringify(deletePayload)
});
See
Merchant for the entity being deleted
Type Parameters
T
T = string
The type of the merchant identifier. Defaults to string.
Properties
id
readonlyid:T
Defined in: types/invoices/Merchant.ts:272
The unique identifier of the merchant.
parentCompanyId
readonlyparentCompanyId:string
Defined in: types/invoices/Merchant.ts:275
The unique identifier of the parent company.