filters , order inspections , inventory items , credit notes
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { CrudClient } from "../infra/crud-client"
|
||||
import type { ApiClientOptions } from "../infra/client"
|
||||
import type { ApiPath } from "../infra/types"
|
||||
|
||||
export const EXPENSE_ITEM_ROUTES = {
|
||||
INDEX: "/api/expense-items",
|
||||
BY_ID: "/api/expense-items/{id}",
|
||||
} as const satisfies Record<string, ApiPath>
|
||||
|
||||
export class ExpenseItemsClient extends CrudClient<
|
||||
typeof EXPENSE_ITEM_ROUTES.INDEX,
|
||||
typeof EXPENSE_ITEM_ROUTES.BY_ID
|
||||
> {
|
||||
constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) {
|
||||
super(baseUrl, defaultOptions, EXPENSE_ITEM_ROUTES.INDEX, EXPENSE_ITEM_ROUTES.BY_ID)
|
||||
}
|
||||
}
|
||||
@@ -53,3 +53,5 @@ export { ServiceGroupPartsClient, SERVICE_GROUP_PART_ROUTES } from "./service-gr
|
||||
export { SettingsClient, SETTINGS_ROUTES } from "./settings"
|
||||
export { ConfigurationsClient, CONFIGURATION_ROUTES } from "./configurations"
|
||||
export { AutoGenerateClient, AUTO_GENERATE_ROUTES } from "./auto-generate"
|
||||
export { ExpenseItemsClient, EXPENSE_ITEM_ROUTES } from "./expense-items"
|
||||
export { InventoryCategoriesClient, INVENTORY_CATEGORY_ROUTES } from "./inventory-categories"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { CrudClient } from "../infra/crud-client"
|
||||
import type { ApiClientOptions } from "../infra/client"
|
||||
import type { ApiPath } from "../infra/types"
|
||||
|
||||
export const INVENTORY_CATEGORY_ROUTES = {
|
||||
INDEX: "/api/inventory-categories",
|
||||
BY_ID: "/api/inventory-categories/{id}",
|
||||
} as const satisfies Record<string, ApiPath>
|
||||
|
||||
export class InventoryCategoriesClient extends CrudClient<
|
||||
typeof INVENTORY_CATEGORY_ROUTES.INDEX,
|
||||
typeof INVENTORY_CATEGORY_ROUTES.BY_ID
|
||||
> {
|
||||
constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) {
|
||||
super(baseUrl, defaultOptions, INVENTORY_CATEGORY_ROUTES.INDEX, INVENTORY_CATEGORY_ROUTES.BY_ID)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user