126 lines
7.2 KiB
TypeScript
126 lines
7.2 KiB
TypeScript
import type { ApiClientOptions } from "./infra/client"
|
|
import { AuthClient } from "./clients/auth"
|
|
import { CustomersClient } from "./clients/customers"
|
|
import { ReferralSourcesClient } from "./clients/referral-sources"
|
|
import { VehiclesClient } from "./clients/vehicles"
|
|
import { VehicleAttributesClient } from "./clients/vehicle-attributes"
|
|
import { VehicleDocumentsClient } from "./clients/vehicle-documents"
|
|
import { DepartmentsClient } from "./clients/departments"
|
|
import { EmployeesClient } from "./clients/employees"
|
|
import { GeoClient } from "./clients/geo"
|
|
import { PaymentTermsClient } from "./clients/payment-terms"
|
|
import { ShopTypesClient } from "./clients/shop-types"
|
|
import { InventoryClient } from "./clients/inventory"
|
|
import { VendorsClient } from "./clients/vendors"
|
|
import { InspectionsClient } from "./clients/inspections"
|
|
import { LabelsClient } from "./clients/labels"
|
|
import { InsuranceTypesClient } from "./clients/insurance-types"
|
|
import { EstimatesClient } from "./clients/estimates"
|
|
import { QuickRemarksClient } from "./clients/quick-remarks"
|
|
import { QuickNotesClient } from "./clients/quick-notes"
|
|
import { ShopRecommendationsClient } from "./clients/shop-recommendations"
|
|
import { JobCardsClient } from "./clients/job-cards"
|
|
import { PaymentModesClient } from "./clients/payment-modes"
|
|
import { PaymentReceivedClient } from "./clients/payment-received"
|
|
import { PartsClient } from "./clients/parts"
|
|
import { PurchaseOrdersClient } from "./clients/purchase-orders"
|
|
import { ServicesClient } from "./clients/services"
|
|
import { ServiceGroupsClient } from "./clients/service-groups"
|
|
import { ExpensesClient } from "./clients/expenses"
|
|
import { TasksClient } from "./clients/tasks"
|
|
import { TaskTypesClient } from "./clients/task-types"
|
|
import { TaskSectionsClient } from "./clients/task-sections"
|
|
import { AppointmentsClient } from "./clients/appointments"
|
|
import { ShopTimingsClient } from "./clients/shop-timings"
|
|
import { ShopCalendarsClient } from "./clients/shop-calendars"
|
|
import { HolidayYearsClient } from "./clients/holiday-years"
|
|
import { TaxesClient } from "./clients/taxes"
|
|
import { InvoicesClient } from "./clients/invoices"
|
|
import { HomeClient } from "./clients/home"
|
|
import { BillsClient } from "./clients/bills"
|
|
import { ReasonsClient } from "./clients/reasons"
|
|
import { HolidaysClient } from "./clients/holidays"
|
|
import { MakeAndModelsClient } from "./clients/make-and-models"
|
|
import { TimeSheetsClient } from "./clients/time-sheets"
|
|
import { InvoiceSequencesClient } from "./clients/invoice-sequences"
|
|
import { CreditNotesClient } from "./clients/credit-notes"
|
|
import { PaymentMadesClient } from "./clients/payment-mades"
|
|
import { VendorCreditsClient } from "./clients/vendor-credits"
|
|
import { InventoryAdjustmentsClient } from "./clients/inventory-adjustments"
|
|
import { ServiceGroupIncludesClient } from "./clients/service-group-includes"
|
|
import { ServiceGroupPricingsClient } from "./clients/service-group-pricings"
|
|
import { ServiceGroupServicesClient } from "./clients/service-group-services"
|
|
import { ServiceGroupPartsClient } from "./clients/service-group-parts"
|
|
import { SettingsClient } from "./clients/settings"
|
|
import { ConfigurationsClient } from "./clients/configurations"
|
|
import { AutoGenerateClient } from "./clients/auto-generate"
|
|
import { ExpenseItemsClient } from "./clients/expense-items"
|
|
import { InventoryCategoriesClient } from "./clients/inventory-categories"
|
|
import { DocumentPrintClient } from "./clients/document-print"
|
|
|
|
export function createApi(options?: ApiClientOptions) {
|
|
return {
|
|
auth: new AuthClient(undefined, options),
|
|
customers: new CustomersClient(undefined, options),
|
|
referralSources: new ReferralSourcesClient(undefined, options),
|
|
vehicles: new VehiclesClient(undefined, options),
|
|
vehicleAttributes: new VehicleAttributesClient(undefined, options),
|
|
vehicleDocuments: new VehicleDocumentsClient(undefined, options),
|
|
departments: new DepartmentsClient(undefined, options),
|
|
employees: new EmployeesClient(undefined, options),
|
|
geo: new GeoClient(undefined, options),
|
|
paymentTerms: new PaymentTermsClient(undefined, options),
|
|
shopTypes: new ShopTypesClient(undefined, options),
|
|
inventory: new InventoryClient(undefined, options),
|
|
vendors: new VendorsClient(undefined, options),
|
|
inspections: new InspectionsClient(undefined, options),
|
|
labels: new LabelsClient(undefined, options),
|
|
insuranceTypes: new InsuranceTypesClient(undefined, options),
|
|
estimates: new EstimatesClient(undefined, options),
|
|
quickRemarks: new QuickRemarksClient(undefined, options),
|
|
quickNotes: new QuickNotesClient(undefined, options),
|
|
shopRecommendations: new ShopRecommendationsClient(undefined, options),
|
|
jobCards: new JobCardsClient(undefined, options),
|
|
paymentModes: new PaymentModesClient(undefined, options),
|
|
paymentReceived: new PaymentReceivedClient(undefined, options),
|
|
parts: new PartsClient(undefined, options),
|
|
purchaseOrders: new PurchaseOrdersClient(undefined, options),
|
|
services: new ServicesClient(undefined, options),
|
|
serviceGroups: new ServiceGroupsClient(undefined, options),
|
|
expenses: new ExpensesClient(undefined, options),
|
|
tasks: new TasksClient(undefined, options),
|
|
taskTypes: new TaskTypesClient(undefined, options),
|
|
taskSections: new TaskSectionsClient(undefined, options),
|
|
appointments: new AppointmentsClient(undefined, options),
|
|
shopTimings: new ShopTimingsClient(undefined, options),
|
|
shopCalendars: new ShopCalendarsClient(undefined, options),
|
|
holidayYears: new HolidayYearsClient(undefined, options),
|
|
taxes: new TaxesClient(undefined, options),
|
|
invoices: new InvoicesClient(undefined, options),
|
|
home: new HomeClient(undefined, options),
|
|
bills: new BillsClient(undefined, options),
|
|
reasons: new ReasonsClient(undefined, options),
|
|
holidays: new HolidaysClient(undefined, options),
|
|
makeAndModels: new MakeAndModelsClient(undefined, options),
|
|
timeSheets: new TimeSheetsClient(undefined, options),
|
|
invoiceSequences: new InvoiceSequencesClient(undefined, options),
|
|
creditNotes: new CreditNotesClient(undefined, options),
|
|
paymentMades: new PaymentMadesClient(undefined, options),
|
|
vendorCredits: new VendorCreditsClient(undefined, options),
|
|
inventoryAdjustments: new InventoryAdjustmentsClient(undefined, options),
|
|
serviceGroupIncludes: new ServiceGroupIncludesClient(undefined, options),
|
|
serviceGroupPricings: new ServiceGroupPricingsClient(undefined, options),
|
|
serviceGroupServices: new ServiceGroupServicesClient(undefined, options),
|
|
serviceGroupParts: new ServiceGroupPartsClient(undefined, options),
|
|
settings: new SettingsClient(undefined, options),
|
|
configurations: new ConfigurationsClient(undefined, options),
|
|
autoGenerate: new AutoGenerateClient(undefined, options),
|
|
expenseItems: new ExpenseItemsClient(undefined, options),
|
|
inventoryCategories: new InventoryCategoriesClient(undefined, options),
|
|
documentPrint: new DocumentPrintClient(undefined, options),
|
|
}
|
|
}
|
|
|
|
/** Unauthenticated singleton — use for public calls (login, register) */
|
|
export const api = createApi()
|