Merge branch 'dev' into hugo-shipping-notice
This commit is contained in:
commit
472b530be3
397 files changed
+46450
-34171
No files matched your search
@@ -21,6 +21,24 @@ import type {
|
||||
const auth = () => ({ headers: getAuthHeaders() });
|
||||
const jsonAuth = () => ({ headers: { 'Content-Type': 'application/json', ...getAuthHeaders() } });
|
||||
|
||||
export type LinkedServicePayload = {
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
sort_order?: number;
|
||||
enabled?: boolean;
|
||||
is_enabled?: boolean;
|
||||
};
|
||||
|
||||
export const listLinkedServices = () => requestJson<any[]>('/api/admin/linked-services', auth());
|
||||
export const createLinkedService = (payload: LinkedServicePayload) =>
|
||||
requestJson<any>('/api/admin/linked-services', { method: 'POST', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const updateLinkedService = (id: number, payload: LinkedServicePayload) =>
|
||||
requestJson<any>(`/api/admin/linked-services/${id}`, { method: 'PUT', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const deleteLinkedService = (id: number) =>
|
||||
requestJson<void>(`/api/admin/linked-services/${id}`, { method: 'DELETE', ...auth() });
|
||||
|
||||
export type ShippingInventoryReadinessCheck = {
|
||||
code: string;
|
||||
status: 'passed' | 'pending' | 'failed' | 'stale' | 'empty';
|
||||
|
||||
Reference in new issue
Block a user