@cimplify/sdk 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,8 @@ import { K as Category, q as Product, F as AddOnWithOptions, d as Pagination, h
26
26
  /** Context passed to request lifecycle hooks */
27
27
  interface RequestContext {
28
28
  /** HTTP method */
29
- method: "GET" | "POST" | "DELETE";
30
- /** Request path (e.g., "/api/q", "/api/m") */
29
+ method: "GET" | "POST" | "PATCH" | "DELETE";
30
+ /** Request path (e.g., "/api/v1/catalogue", "/api/v1/cart/items") */
31
31
  path: string;
32
32
  /** Full URL */
33
33
  url: string;
@@ -367,14 +367,7 @@ declare class CatalogueQueries {
367
367
  getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
368
368
  getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
369
369
  getVariantAxes(productId: string): Promise<Result<VariantAxis[], CimplifyError>>;
370
- /**
371
- * Find a variant by axis selections (e.g., { "Size": "Large", "Color": "Red" })
372
- * Returns the matching variant or null if no match found.
373
- */
374
370
  getVariantByAxisSelections(productId: string, selections: VariantAxisSelection): Promise<Result<ProductVariant | null, CimplifyError>>;
375
- /**
376
- * Get a specific variant by its ID
377
- */
378
371
  getVariantById(productId: string, variantId: string): Promise<Result<ProductVariant, CimplifyError>>;
379
372
  getAddOns(productId: string): Promise<Result<AddOn[], CimplifyError>>;
380
373
  getCategories(): Promise<Result<Category[], CimplifyError>>;
@@ -1193,7 +1186,7 @@ declare class CheckoutService {
1193
1186
  constructor(client: CimplifyClient);
1194
1187
  private orderTokenParam;
1195
1188
  process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
1196
- initializePayment(orderId: string, method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1189
+ initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1197
1190
  submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
1198
1191
  pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
1199
1192
  updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
@@ -1233,7 +1226,7 @@ declare class OrderQueries {
1233
1226
  cancel(orderId: string, reason?: string): Promise<Result<Order, CimplifyError>>;
1234
1227
  }
1235
1228
 
1236
- interface SuccessResult$2 {
1229
+ interface SuccessResult$1 {
1237
1230
  success: boolean;
1238
1231
  message?: string;
1239
1232
  }
@@ -1246,9 +1239,9 @@ declare class LinkService {
1246
1239
  private client;
1247
1240
  constructor(client: CimplifyClient);
1248
1241
  getProfile(): Promise<Result<LinkData["customer"], CimplifyError>>;
1249
- requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$2, CimplifyError>>;
1242
+ requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$1, CimplifyError>>;
1250
1243
  verifyOtp(input: VerifyOtpInput): Promise<Result<AuthResponse, CimplifyError>>;
1251
- logout(): Promise<Result<SuccessResult$2, CimplifyError>>;
1244
+ logout(): Promise<Result<SuccessResult$1, CimplifyError>>;
1252
1245
  checkStatus(contact: string): Promise<Result<LinkStatusResult, CimplifyError>>;
1253
1246
  getLinkData(): Promise<Result<LinkData, CimplifyError>>;
1254
1247
  getAddresses(): Promise<Result<CustomerAddress[], CimplifyError>>;
@@ -1256,28 +1249,28 @@ declare class LinkService {
1256
1249
  getPreferences(): Promise<Result<CustomerLinkPreferences, CimplifyError>>;
1257
1250
  enroll(data: EnrollmentData): Promise<Result<LinkEnrollResult, CimplifyError>>;
1258
1251
  enrollAndLinkOrder(data: EnrollAndLinkOrderInput): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1259
- updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$2, CimplifyError>>;
1252
+ updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$1, CimplifyError>>;
1260
1253
  createAddress(input: CreateAddressInput): Promise<Result<CustomerAddress, CimplifyError>>;
1261
- updateAddress(input: UpdateAddressInput): Promise<Result<SuccessResult$2, CimplifyError>>;
1262
- deleteAddress(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1263
- setDefaultAddress(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1264
- trackAddressUsage(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1254
+ updateAddress(input: UpdateAddressInput): Promise<Result<SuccessResult$1, CimplifyError>>;
1255
+ deleteAddress(addressId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1256
+ setDefaultAddress(addressId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1257
+ trackAddressUsage(addressId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1265
1258
  createMobileMoney(input: CreateMobileMoneyInput): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1266
- deleteMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1267
- setDefaultMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1268
- trackMobileMoneyUsage(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1269
- verifyMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1259
+ deleteMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1260
+ setDefaultMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1261
+ trackMobileMoneyUsage(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1262
+ verifyMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1270
1263
  getSessions(): Promise<Result<LinkSession[], CimplifyError>>;
1271
1264
  revokeSession(sessionId: string): Promise<Result<RevokeSessionResult, CimplifyError>>;
1272
1265
  revokeAllSessions(): Promise<Result<RevokeAllSessionsResult, CimplifyError>>;
1273
1266
  getAddressesRest(): Promise<Result<CustomerAddress[], CimplifyError>>;
1274
1267
  createAddressRest(input: CreateAddressInput): Promise<Result<CustomerAddress, CimplifyError>>;
1275
- deleteAddressRest(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1276
- setDefaultAddressRest(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1268
+ deleteAddressRest(addressId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1269
+ setDefaultAddressRest(addressId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1277
1270
  getMobileMoneyRest(): Promise<Result<CustomerMobileMoney[], CimplifyError>>;
1278
1271
  createMobileMoneyRest(input: CreateMobileMoneyInput): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1279
- deleteMobileMoneyRest(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1280
- setDefaultMobileMoneyRest(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1272
+ deleteMobileMoneyRest(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1273
+ setDefaultMobileMoneyRest(mobileMoneyId: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1281
1274
  }
1282
1275
 
1283
1276
  interface AuthStatus {
@@ -1294,11 +1287,7 @@ interface UpdateProfileInput {
1294
1287
  email?: string;
1295
1288
  phone?: string;
1296
1289
  }
1297
- interface ChangePasswordInput {
1298
- current_password: string;
1299
- new_password: string;
1300
- }
1301
- interface SuccessResult$1 {
1290
+ interface SuccessResult {
1302
1291
  success: boolean;
1303
1292
  }
1304
1293
  declare class AuthService {
@@ -1309,10 +1298,8 @@ declare class AuthService {
1309
1298
  isAuthenticated(): Promise<Result<boolean, CimplifyError>>;
1310
1299
  requestOtp(contact: string, contactType?: "phone" | "email"): Promise<Result<void, CimplifyError>>;
1311
1300
  verifyOtp(code: string, contact?: string): Promise<Result<OtpResult, CimplifyError>>;
1312
- logout(): Promise<Result<SuccessResult$1, CimplifyError>>;
1301
+ logout(): Promise<Result<SuccessResult, CimplifyError>>;
1313
1302
  updateProfile(input: UpdateProfileInput): Promise<Result<Customer, CimplifyError>>;
1314
- changePassword(input: ChangePasswordInput): Promise<Result<SuccessResult$1, CimplifyError>>;
1315
- resetPassword(email: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1316
1303
  }
1317
1304
 
1318
1305
  type BusinessType = "eatery" | "retail" | "service" | "other" | "system" | "unset";
@@ -1613,6 +1600,7 @@ interface InventorySummary {
1613
1600
  declare class InventoryService {
1614
1601
  private client;
1615
1602
  constructor(client: CimplifyClient);
1603
+ private withQuery;
1616
1604
  getStockLevels(): Promise<Result<StockLevel[], CimplifyError>>;
1617
1605
  getProductStock(productId: string, locationId?: string): Promise<Result<ProductStock, CimplifyError>>;
1618
1606
  getVariantStock(variantId: string, locationId?: string): Promise<Result<StockLevel, CimplifyError>>;
@@ -1628,157 +1616,34 @@ declare class InventoryService {
1628
1616
  getAvailableQuantity(productId: string, locationId?: string): Promise<Result<number, CimplifyError>>;
1629
1617
  }
1630
1618
 
1631
- interface ServiceAvailabilityRule {
1632
- id: string;
1633
- business_id: string;
1634
- location_id: string;
1635
- item_id: string;
1636
- day_of_week: number;
1637
- start_time: string;
1638
- end_time: string;
1639
- capacity?: number;
1640
- created_at: string;
1641
- updated_at: string;
1642
- metadata?: Record<string, unknown>;
1643
- }
1644
- interface ServiceAvailabilityException {
1645
- id: string;
1646
- business_id: string;
1647
- location_id: string;
1648
- item_id: string;
1649
- exception_date: string;
1650
- is_closed: boolean;
1651
- start_time?: string;
1652
- end_time?: string;
1653
- capacity?: number;
1654
- reason?: string;
1655
- created_at: string;
1656
- updated_at: string;
1657
- metadata?: Record<string, unknown>;
1658
- }
1659
- interface StaffAvailabilityRule {
1660
- id: string;
1661
- staff_id: string;
1662
- location_id?: string;
1663
- day_of_week: number;
1664
- start_time: string;
1665
- end_time: string;
1666
- is_available: boolean;
1667
- created_at: string;
1668
- updated_at: string;
1669
- metadata?: Record<string, unknown>;
1670
- }
1671
- interface StaffAvailabilityException {
1672
- id: string;
1673
- staff_id: string;
1674
- location_id?: string;
1675
- exception_date: string;
1676
- is_unavailable_all_day: boolean;
1677
- start_time?: string;
1678
- end_time?: string;
1679
- reason?: string;
1680
- created_at: string;
1681
- updated_at: string;
1682
- metadata?: Record<string, unknown>;
1683
- }
1684
- interface ResourceAvailabilityRule {
1685
- id: string;
1686
- business_id: string;
1687
- location_id: string;
1688
- resource_id: string;
1689
- day_of_week: number;
1690
- start_time: string;
1691
- end_time: string;
1692
- is_available: boolean;
1693
- created_at: string;
1694
- updated_at: string;
1695
- metadata?: Record<string, unknown>;
1696
- }
1697
- interface ResourceAvailabilityException {
1698
- id: string;
1699
- business_id: string;
1700
- location_id: string;
1701
- resource_id: string;
1702
- exception_date: string;
1703
- is_unavailable_all_day: boolean;
1704
- start_time?: string;
1705
- end_time?: string;
1706
- reason?: string;
1707
- created_at: string;
1708
- updated_at: string;
1709
- metadata?: Record<string, unknown>;
1710
- }
1711
- interface StaffBookingProfile {
1712
- id: string;
1713
- staff_id: string;
1714
- skills?: string[];
1715
- can_be_booked: boolean;
1716
- default_service_duration_override?: number;
1717
- booking_buffer_minutes?: number;
1718
- max_daily_bookings?: number;
1719
- preferred_working_hours?: Record<string, unknown>;
1720
- created_at: string;
1721
- updated_at: string;
1722
- metadata?: Record<string, unknown>;
1723
- }
1724
- interface ServiceStaffRequirement {
1725
- id: string;
1726
- service_item_id: string;
1727
- role_id?: string;
1728
- required_skill?: string;
1729
- number_of_staff: number;
1730
- specific_staff_assignment_required: boolean;
1731
- created_at: string;
1732
- updated_at: string;
1733
- metadata?: Record<string, unknown>;
1734
- }
1735
- interface BookingRequirementOverride {
1736
- id: string;
1737
- appointment_id: string;
1738
- overridden_by: string;
1739
- reason: string;
1740
- missing_staff_requirements?: Record<string, unknown>;
1741
- missing_resource_requirements?: Record<string, unknown>;
1742
- created_at: string;
1743
- }
1744
- interface ResourceType {
1745
- id: string;
1746
- business_id: string;
1747
- name: string;
1748
- description?: string;
1749
- created_at: string;
1750
- updated_at: string;
1751
- }
1752
1619
  interface Service {
1753
1620
  id: string;
1754
- business_id: string;
1755
- product_id: string;
1756
1621
  name: string;
1757
1622
  description?: string;
1623
+ price?: Money;
1758
1624
  duration_minutes: number;
1759
- buffer_before_minutes: number;
1760
- buffer_after_minutes: number;
1761
- max_participants: number;
1762
- price: Money;
1763
- currency: CurrencyCode;
1764
- requires_staff: boolean;
1765
- is_active: boolean;
1766
- image_url?: string;
1767
- category_id?: string;
1625
+ image_url?: string | null;
1626
+ category_id?: string | null;
1627
+ is_available: boolean;
1628
+ business_id?: string;
1629
+ product_id?: string;
1630
+ buffer_before_minutes?: number;
1631
+ buffer_after_minutes?: number;
1632
+ max_participants?: number;
1633
+ currency?: string;
1634
+ requires_staff?: boolean;
1635
+ is_active?: boolean;
1768
1636
  metadata?: Record<string, unknown>;
1769
1637
  }
1770
- interface ServiceWithStaff extends Service {
1771
- available_staff: Staff[];
1772
- }
1773
1638
  interface Staff {
1774
1639
  id: string;
1775
- business_id: string;
1640
+ business_id?: string;
1776
1641
  name: string;
1777
1642
  email?: string;
1778
1643
  phone?: string;
1779
1644
  avatar_url?: string;
1780
1645
  bio?: string;
1781
- is_active: boolean;
1646
+ is_active?: boolean;
1782
1647
  services?: string[];
1783
1648
  }
1784
1649
  interface TimeSlot {
@@ -1791,57 +1656,79 @@ interface TimeSlot {
1791
1656
  }
1792
1657
  interface AvailableSlot extends TimeSlot {
1793
1658
  price?: Money;
1794
- duration_minutes: number;
1659
+ duration_minutes?: number;
1795
1660
  }
1796
1661
  interface DayAvailability {
1797
1662
  date: string;
1798
1663
  slots: TimeSlot[];
1799
- is_fully_booked: boolean;
1664
+ has_availability?: boolean;
1665
+ is_fully_booked?: boolean;
1800
1666
  }
1801
- type BookingStatus = "pending" | "confirmed" | "in_progress" | "completed" | "cancelled" | "no_show";
1667
+ type BookingStatus = "pending" | "confirmed" | "in_progress" | "completed" | "cancelled" | "no_show" | string;
1802
1668
  interface Booking {
1803
1669
  id: string;
1804
- business_id: string;
1805
- order_id: string;
1806
- line_item_id: string;
1807
- service_id: string;
1808
1670
  service_name: string;
1671
+ start_time: string;
1672
+ end_time: string;
1673
+ status: BookingStatus;
1674
+ confirmation_code?: string;
1675
+ total_amount?: Money;
1676
+ participant_count: number;
1677
+ staff_name?: string | null;
1678
+ notes?: unknown;
1679
+ business_id?: string;
1680
+ order_id?: string;
1681
+ line_item_id?: string;
1682
+ service_id?: string;
1809
1683
  customer_id?: string;
1810
1684
  customer_name?: string;
1811
1685
  customer_phone?: string;
1812
1686
  staff_id?: string;
1813
- staff_name?: string;
1814
1687
  location_id?: string;
1815
1688
  location_name?: string;
1816
- start_time: string;
1817
- end_time: string;
1818
- duration_minutes: number;
1819
- participant_count: number;
1820
- status: BookingStatus;
1821
- notes?: string;
1689
+ duration_minutes?: number;
1822
1690
  cancellation_reason?: string;
1823
1691
  cancelled_at?: string;
1824
- created_at: string;
1825
- updated_at: string;
1692
+ created_at?: string;
1693
+ updated_at?: string;
1826
1694
  }
1827
1695
  interface BookingWithDetails extends Booking {
1828
- service: Service;
1696
+ service?: Service;
1829
1697
  staff?: Staff;
1830
1698
  }
1699
+ interface CustomerBookingServiceItem {
1700
+ service_id: string;
1701
+ scheduled_start?: string | null;
1702
+ scheduled_end?: string | null;
1703
+ confirmation_code?: string | null;
1704
+ status?: string | null;
1705
+ }
1706
+ interface CustomerBooking {
1707
+ order_id: string;
1708
+ service_items: CustomerBookingServiceItem[];
1709
+ status: BookingStatus;
1710
+ created_at: string;
1711
+ total_price: Money;
1712
+ }
1831
1713
  interface GetAvailableSlotsInput {
1832
1714
  service_id: string;
1833
1715
  date: string;
1834
1716
  participant_count?: number;
1835
1717
  duration_minutes?: number;
1836
- staff_id?: string;
1837
- location_id?: string;
1838
1718
  }
1839
1719
  interface CheckSlotAvailabilityInput {
1840
1720
  service_id: string;
1841
1721
  slot_time: string;
1842
1722
  duration_minutes?: number;
1843
1723
  participant_count?: number;
1844
- staff_id?: string;
1724
+ }
1725
+ interface CheckSlotAvailabilityResult {
1726
+ available: boolean;
1727
+ reason?: string;
1728
+ service_id?: string;
1729
+ start_time?: string;
1730
+ duration_minutes?: number;
1731
+ participant_count?: number;
1845
1732
  }
1846
1733
  interface RescheduleBookingInput {
1847
1734
  order_id: string;
@@ -1850,131 +1737,116 @@ interface RescheduleBookingInput {
1850
1737
  new_end_time: string;
1851
1738
  new_staff_id?: string;
1852
1739
  reason?: string;
1740
+ reschedule_type?: "customer" | "business" | "system";
1853
1741
  }
1854
1742
  interface CancelBookingInput {
1855
1743
  booking_id: string;
1856
1744
  reason?: string;
1857
1745
  }
1746
+ interface CancelBookingResult {
1747
+ message: string;
1748
+ }
1749
+ interface RescheduleBookingResult {
1750
+ success: boolean;
1751
+ appointment_id: string;
1752
+ old_time: {
1753
+ start: string;
1754
+ end: string;
1755
+ };
1756
+ new_time: {
1757
+ start: string;
1758
+ end: string;
1759
+ };
1760
+ staff_changed: boolean;
1761
+ old_staff_id?: string | null;
1762
+ new_staff_id?: string | null;
1763
+ fee_charged?: string;
1764
+ }
1858
1765
  interface ServiceAvailabilityParams {
1859
1766
  service_id: string;
1860
1767
  start_date: string;
1861
1768
  end_date: string;
1862
1769
  location_id?: string;
1863
- staff_id?: string;
1864
1770
  participant_count?: number;
1865
1771
  }
1866
1772
  interface ServiceAvailabilityResult {
1867
1773
  service_id: string;
1868
- days: DayAvailability[];
1774
+ location_id?: string;
1775
+ start_date: string;
1776
+ end_date: string;
1777
+ participant_count: number;
1778
+ availability: DayAvailability[];
1779
+ days?: DayAvailability[];
1869
1780
  }
1870
1781
 
1871
1782
  /**
1872
1783
  * Scheduling service with explicit error handling via Result type.
1873
1784
  *
1874
1785
  * All methods return `Result<T, CimplifyError>` - no exceptions thrown.
1875
- *
1876
- * @example
1877
- * ```typescript
1878
- * const result = await client.scheduling.getAvailableSlots({
1879
- * service_id: "svc_haircut",
1880
- * date: "2024-01-15"
1881
- * });
1882
- *
1883
- * if (result.ok) {
1884
- * console.log("Available slots:", result.value);
1885
- * } else {
1886
- * console.error("Failed:", result.error.code);
1887
- * }
1888
- * ```
1889
1786
  */
1890
1787
  declare class SchedulingService {
1891
1788
  private client;
1892
1789
  constructor(client: CimplifyClient);
1893
1790
  getServices(): Promise<Result<Service[], CimplifyError>>;
1894
1791
  /**
1895
- * Get a specific service by ID
1896
- * Note: Filters from all services client-side (no single-service endpoint)
1792
+ * Get a specific service by ID.
1897
1793
  */
1898
1794
  getService(serviceId: string): Promise<Result<Service | null, CimplifyError>>;
1899
1795
  getAvailableSlots(input: GetAvailableSlotsInput): Promise<Result<AvailableSlot[], CimplifyError>>;
1900
- checkSlotAvailability(input: CheckSlotAvailabilityInput): Promise<Result<{
1901
- available: boolean;
1902
- reason?: string;
1903
- }, CimplifyError>>;
1796
+ checkSlotAvailability(input: CheckSlotAvailabilityInput): Promise<Result<CheckSlotAvailabilityResult, CimplifyError>>;
1904
1797
  getServiceAvailability(params: ServiceAvailabilityParams): Promise<Result<ServiceAvailabilityResult, CimplifyError>>;
1905
1798
  getBooking(bookingId: string): Promise<Result<BookingWithDetails, CimplifyError>>;
1906
- getCustomerBookings(): Promise<Result<Booking[], CimplifyError>>;
1907
- getUpcomingBookings(): Promise<Result<Booking[], CimplifyError>>;
1908
- getPastBookings(limit?: number): Promise<Result<Booking[], CimplifyError>>;
1909
- cancelBooking(input: CancelBookingInput): Promise<Result<Booking, CimplifyError>>;
1910
- rescheduleBooking(input: RescheduleBookingInput): Promise<Result<Booking, CimplifyError>>;
1799
+ getCustomerBookings(customerId?: string): Promise<Result<CustomerBooking[], CimplifyError>>;
1800
+ getUpcomingBookings(): Promise<Result<CustomerBooking[], CimplifyError>>;
1801
+ getPastBookings(limit?: number): Promise<Result<CustomerBooking[], CimplifyError>>;
1802
+ cancelBooking(input: CancelBookingInput): Promise<Result<CancelBookingResult, CimplifyError>>;
1803
+ rescheduleBooking(input: RescheduleBookingInput): Promise<Result<RescheduleBookingResult, CimplifyError>>;
1911
1804
  getNextAvailableSlot(serviceId: string, fromDate?: string): Promise<Result<AvailableSlot | null, CimplifyError>>;
1912
1805
  hasAvailabilityOn(serviceId: string, date: string): Promise<Result<boolean, CimplifyError>>;
1806
+ getBookingLegacy(bookingId: string): Promise<Result<Booking, CimplifyError>>;
1913
1807
  }
1914
1808
 
1915
- interface LiteBootstrap {
1916
- business: Business;
1917
- location: Location;
1918
- categories: Category[];
1919
- table?: TableInfo;
1920
- cart: Cart | null;
1921
- currency: string;
1809
+ interface LiteBootstrapBusiness {
1810
+ id: string;
1811
+ name: string;
1812
+ handle: string;
1813
+ logo?: string | null;
1814
+ currency?: string | null;
1922
1815
  is_open: boolean;
1923
1816
  }
1924
- interface TableInfo {
1817
+ interface LiteBootstrapCategory {
1925
1818
  id: string;
1926
- number: string;
1927
- location_id: string;
1928
- capacity?: number;
1929
- status: "available" | "occupied" | "reserved";
1930
- current_order_id?: string;
1819
+ name: string;
1820
+ slug?: string | null;
1931
1821
  }
1932
- interface KitchenOrderItem {
1933
- product_id: string;
1934
- quantity: number;
1935
- variant_id?: string;
1936
- modifiers?: string[];
1937
- notes?: string;
1822
+ interface LiteBootstrapLocation {
1823
+ id: string;
1938
1824
  }
1939
- interface KitchenOrderResult {
1940
- success: boolean;
1941
- order_id: string;
1942
- order_number: string;
1943
- estimated_time_minutes?: number;
1825
+ interface LiteBootstrap {
1826
+ business: LiteBootstrapBusiness;
1827
+ categories: LiteBootstrapCategory[];
1828
+ location?: LiteBootstrapLocation | null;
1944
1829
  }
1945
- interface SuccessResult {
1946
- success: boolean;
1830
+ interface LiteTable {
1831
+ id: string;
1832
+ name: string;
1833
+ location_id?: string | null;
1947
1834
  }
1948
- interface RequestBillResult {
1949
- success: boolean;
1950
- order_id: string;
1835
+ interface LiteTableResponse {
1836
+ table: LiteTable;
1837
+ tab: Record<string, unknown> | null;
1951
1838
  }
1839
+ type TableInfo = LiteTableResponse;
1952
1840
  /**
1953
1841
  * Lite service for QR code ordering with explicit error handling via Result type.
1954
1842
  *
1955
1843
  * All methods return `Result<T, CimplifyError>` - no exceptions thrown.
1956
- *
1957
- * @example
1958
- * ```typescript
1959
- * const result = await client.lite.getBootstrap();
1960
- *
1961
- * if (result.ok) {
1962
- * console.log("Business:", result.value.business.name);
1963
- * console.log("Table:", result.value.table?.number);
1964
- * } else {
1965
- * console.error("Failed:", result.error.code);
1966
- * }
1967
- * ```
1968
1844
  */
1969
1845
  declare class LiteService {
1970
1846
  private client;
1971
1847
  constructor(client: CimplifyClient);
1972
1848
  getBootstrap(): Promise<Result<LiteBootstrap, CimplifyError>>;
1973
- getTable(tableId: string): Promise<Result<TableInfo, CimplifyError>>;
1974
- getTableByNumber(tableNumber: string, locationId?: string): Promise<Result<TableInfo, CimplifyError>>;
1975
- sendToKitchen(tableId: string, items: KitchenOrderItem[]): Promise<Result<KitchenOrderResult, CimplifyError>>;
1976
- callWaiter(tableId: string, reason?: string): Promise<Result<SuccessResult, CimplifyError>>;
1977
- requestBill(tableId: string): Promise<Result<RequestBillResult, CimplifyError>>;
1849
+ getTable(tableId: string): Promise<Result<LiteTableResponse, CimplifyError>>;
1978
1850
  getMenu(): Promise<Result<Product[], CimplifyError>>;
1979
1851
  getMenuByCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
1980
1852
  }
@@ -2348,8 +2220,6 @@ declare class CimplifyClient {
2348
2220
  private resilientFetch;
2349
2221
  private getDedupeKey;
2350
2222
  private deduplicatedRequest;
2351
- query<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<T>;
2352
- call<T = unknown>(method: string, args?: unknown): Promise<T>;
2353
2223
  get<T = unknown>(path: string): Promise<T>;
2354
2224
  post<T = unknown>(path: string, body?: unknown): Promise<T>;
2355
2225
  patch<T = unknown>(path: string, body?: unknown): Promise<T>;
@@ -2358,7 +2228,6 @@ declare class CimplifyClient {
2358
2228
  linkPost<T = unknown>(path: string, body?: unknown): Promise<T>;
2359
2229
  linkDelete<T = unknown>(path: string): Promise<T>;
2360
2230
  private handleRestResponse;
2361
- private handleResponse;
2362
2231
  get catalogue(): CatalogueQueries;
2363
2232
  get cart(): CartOperations;
2364
2233
  get checkout(): CheckoutService;
@@ -2388,4 +2257,4 @@ declare class CimplifyClient {
2388
2257
  }
2389
2258
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2390
2259
 
2391
- export { type ProcessAndResolveOptions as $, AuthService as A, BusinessService as B, CimplifyClient as C, type ElementType as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type ElementEventType as H, InventoryService as I, type CheckoutMode as J, type KitchenOrderItem as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutOrderType as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutPaymentMethod as V, type CheckoutStep as W, type CheckoutFormData as X, type CheckoutResult as Y, type ProcessCheckoutOptions as Z, type ProcessCheckoutResult as _, type CimplifyConfig as a, type OrderGroupDetails as a$, type CheckoutStatus as a0, type CheckoutStatusContext as a1, type AbortablePromise as a2, type MobileMoneyProvider as a3, type DeviceType as a4, type ContactType as a5, CHECKOUT_MODE as a6, ORDER_TYPE as a7, PAYMENT_METHOD as a8, CHECKOUT_STEP as a9, toNullable as aA, fromPromise as aB, tryCatch as aC, combine as aD, combineObject as aE, type CatalogueResult as aF, type CatalogueSnapshot as aG, type OrderStatus as aH, type PaymentState as aI, type OrderChannel as aJ, type LineType as aK, type OrderLineState as aL, type OrderLineStatus as aM, type FulfillmentType as aN, type FulfillmentStatus as aO, type FulfillmentLink as aP, type OrderFulfillmentSummary as aQ, type FeeBearerType as aR, type AmountToPay as aS, type LineItem as aT, type Order as aU, type OrderHistory as aV, type OrderGroupPaymentState as aW, type OrderGroup as aX, type OrderGroupPayment as aY, type OrderSplitDetail as aZ, type OrderGroupPaymentSummary as a_, PAYMENT_STATE as aa, PICKUP_TIME_TYPE as ab, MOBILE_MONEY_PROVIDER as ac, AUTHORIZATION_TYPE as ad, DEVICE_TYPE as ae, CONTACT_TYPE as af, LINK_QUERY as ag, LINK_MUTATION as ah, AUTH_MUTATION as ai, CHECKOUT_MUTATION as aj, PAYMENT_MUTATION as ak, ORDER_MUTATION as al, DEFAULT_CURRENCY as am, DEFAULT_COUNTRY as an, type Result as ao, type Ok as ap, type Err as aq, ok as ar, err as as, isOk as at, isErr as au, mapResult as av, mapError as aw, flatMap as ax, getOrElse as ay, unwrap as az, CatalogueQueries as b, type CancelBookingInput as b$, type OrderPaymentEvent as b0, type OrderFilter as b1, type CheckoutInput as b2, type UpdateOrderStatusInput as b3, type CancelOrderInput as b4, type RefundOrderInput as b5, type ServiceStatus as b6, type StaffRole as b7, type ReminderMethod as b8, type CustomerServicePreferences as b9, type BusinessWithLocations as bA, type LocationWithDetails as bB, type BusinessSettings as bC, type BusinessHours as bD, type CategoryInfo as bE, type ServiceAvailabilityRule as bF, type ServiceAvailabilityException as bG, type StaffAvailabilityRule as bH, type StaffAvailabilityException as bI, type ResourceAvailabilityRule as bJ, type ResourceAvailabilityException as bK, type StaffBookingProfile as bL, type ServiceStaffRequirement as bM, type BookingRequirementOverride as bN, type ResourceType as bO, type Service as bP, type ServiceWithStaff as bQ, type Staff as bR, type TimeSlot as bS, type AvailableSlot as bT, type DayAvailability as bU, type BookingStatus as bV, type Booking as bW, type BookingWithDetails as bX, type GetAvailableSlotsInput as bY, type CheckSlotAvailabilityInput as bZ, type RescheduleBookingInput as b_, type BufferTimes as ba, type ReminderSettings as bb, type CancellationPolicy as bc, type ServiceNotes as bd, type PricingOverrides as be, type SchedulingMetadata as bf, type StaffAssignment as bg, type ResourceAssignment as bh, type SchedulingResult as bi, type DepositResult as bj, type ServiceScheduleRequest as bk, type StaffScheduleItem as bl, type LocationAppointment as bm, type BusinessType as bn, type BusinessPreferences as bo, type Business as bp, type LocationTaxBehavior as bq, type LocationTaxOverrides as br, type Location as bs, type TimeRange as bt, type TimeRanges as bu, type LocationTimeProfile as bv, type Table as bw, type Room as bx, type ServiceCharge as by, type StorefrontBootstrap as bz, createCimplifyClient as c, type ServiceAvailabilityParams as c0, type ServiceAvailabilityResult as c1, type StockOwnershipType as c2, type StockStatus as c3, type Stock as c4, type StockLevel as c5, type ProductStock as c6, type VariantStock as c7, type LocationStock as c8, type AvailabilityCheck as c9, type MobileMoneyDetails as cA, type CheckoutCustomerInfo as cB, type FxQuoteRequest as cC, type FxQuote as cD, type FxRateResponse as cE, type RequestContext as cF, type RequestStartEvent as cG, type RequestSuccessEvent as cH, type RequestErrorEvent as cI, type RetryEvent as cJ, type SessionChangeEvent as cK, type ObservabilityHooks as cL, type ElementAppearance as cM, type AddressInfo as cN, type PaymentMethodInfo as cO, type AuthenticatedCustomer as cP, type ElementsCustomerInfo as cQ, type AuthenticatedData as cR, type ElementsCheckoutData as cS, type ElementsCheckoutResult as cT, type ParentToIframeMessage as cU, type IframeToParentMessage as cV, type ElementEventHandler as cW, type AvailabilityResult as ca, type InventorySummary as cb, type Customer as cc, type CustomerAddress as cd, type CustomerMobileMoney as ce, type CustomerLinkPreferences as cf, type LinkData as cg, type CreateAddressInput as ch, type UpdateAddressInput as ci, type CreateMobileMoneyInput as cj, type EnrollmentData as ck, type AddressData as cl, type MobileMoneyData as cm, type EnrollAndLinkOrderInput as cn, type LinkStatusResult as co, type LinkEnrollResult as cp, type EnrollAndLinkOrderResult as cq, type LinkSession as cr, type RevokeSessionResult as cs, type RevokeAllSessionsResult as ct, type RequestOtpInput as cu, type VerifyOtpInput as cv, type AuthResponse as cw, type PickupTimeType as cx, type PickupTime as cy, type CheckoutAddressInfo as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, type ChangePasswordInput as o, SchedulingService as p, LiteService as q, FxService as r, type LiteBootstrap as s, type KitchenOrderResult as t, CimplifyElements as u, CimplifyElement as v, createElements as w, ELEMENT_TYPES as x, type ElementsOptions as y, type ElementOptions as z };
2260
+ export { type AbortablePromise as $, AuthService as A, BusinessService as B, CimplifyClient as C, type CheckoutMode as D, EVENT_TYPES as E, type FetchQuoteInput as F, type GetProductsOptions as G, type CheckoutOrderType as H, InventoryService as I, type CheckoutPaymentMethod as J, type CheckoutStep as K, LinkService as L, MESSAGE_TYPES as M, type CheckoutFormData as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, type SearchOptions as S, type TableInfo as T, type UpdateProfileInput as U, type CheckoutResult as V, type ProcessCheckoutOptions as W, type ProcessCheckoutResult as X, type ProcessAndResolveOptions as Y, type CheckoutStatus as Z, type CheckoutStatusContext as _, type CimplifyConfig as a, type CheckoutInput as a$, type MobileMoneyProvider as a0, type DeviceType as a1, type ContactType as a2, CHECKOUT_MODE as a3, ORDER_TYPE as a4, PAYMENT_METHOD as a5, CHECKOUT_STEP as a6, PAYMENT_STATE as a7, PICKUP_TIME_TYPE as a8, MOBILE_MONEY_PROVIDER as a9, combine as aA, combineObject as aB, type CatalogueResult as aC, type CatalogueSnapshot as aD, type OrderStatus as aE, type PaymentState as aF, type OrderChannel as aG, type LineType as aH, type OrderLineState as aI, type OrderLineStatus as aJ, type FulfillmentType as aK, type FulfillmentStatus as aL, type FulfillmentLink as aM, type OrderFulfillmentSummary as aN, type FeeBearerType as aO, type AmountToPay as aP, type LineItem as aQ, type Order as aR, type OrderHistory as aS, type OrderGroupPaymentState as aT, type OrderGroup as aU, type OrderGroupPayment as aV, type OrderSplitDetail as aW, type OrderGroupPaymentSummary as aX, type OrderGroupDetails as aY, type OrderPaymentEvent as aZ, type OrderFilter as a_, AUTHORIZATION_TYPE as aa, DEVICE_TYPE as ab, CONTACT_TYPE as ac, LINK_QUERY as ad, LINK_MUTATION as ae, AUTH_MUTATION as af, CHECKOUT_MUTATION as ag, PAYMENT_MUTATION as ah, ORDER_MUTATION as ai, DEFAULT_CURRENCY as aj, DEFAULT_COUNTRY as ak, type Result as al, type Ok as am, type Err as an, ok as ao, err as ap, isOk as aq, isErr as ar, mapResult as as, mapError as at, flatMap as au, getOrElse as av, unwrap as aw, toNullable as ax, fromPromise as ay, tryCatch as az, CatalogueQueries as b, type LocationStock as b$, type UpdateOrderStatusInput as b0, type CancelOrderInput as b1, type RefundOrderInput as b2, type ServiceStatus as b3, type StaffRole as b4, type ReminderMethod as b5, type CustomerServicePreferences as b6, type BufferTimes as b7, type ReminderSettings as b8, type CancellationPolicy as b9, type BusinessHours as bA, type CategoryInfo as bB, type Service as bC, type Staff as bD, type TimeSlot as bE, type AvailableSlot as bF, type DayAvailability as bG, type BookingStatus as bH, type Booking as bI, type BookingWithDetails as bJ, type CustomerBookingServiceItem as bK, type CustomerBooking as bL, type GetAvailableSlotsInput as bM, type CheckSlotAvailabilityInput as bN, type CheckSlotAvailabilityResult as bO, type RescheduleBookingInput as bP, type CancelBookingInput as bQ, type CancelBookingResult as bR, type RescheduleBookingResult as bS, type ServiceAvailabilityParams as bT, type ServiceAvailabilityResult as bU, type StockOwnershipType as bV, type StockStatus as bW, type Stock as bX, type StockLevel as bY, type ProductStock as bZ, type VariantStock as b_, type ServiceNotes as ba, type PricingOverrides as bb, type SchedulingMetadata as bc, type StaffAssignment as bd, type ResourceAssignment as be, type SchedulingResult as bf, type DepositResult as bg, type ServiceScheduleRequest as bh, type StaffScheduleItem as bi, type LocationAppointment as bj, type BusinessType as bk, type BusinessPreferences as bl, type Business as bm, type LocationTaxBehavior as bn, type LocationTaxOverrides as bo, type Location as bp, type TimeRange as bq, type TimeRanges as br, type LocationTimeProfile as bs, type Table as bt, type Room as bu, type ServiceCharge as bv, type StorefrontBootstrap as bw, type BusinessWithLocations as bx, type LocationWithDetails as by, type BusinessSettings as bz, createCimplifyClient as c, type AvailabilityCheck as c0, type AvailabilityResult as c1, type InventorySummary as c2, type Customer as c3, type CustomerAddress as c4, type CustomerMobileMoney as c5, type CustomerLinkPreferences as c6, type LinkData as c7, type CreateAddressInput as c8, type UpdateAddressInput as c9, type RetryEvent as cA, type SessionChangeEvent as cB, type ObservabilityHooks as cC, type ElementAppearance as cD, type AddressInfo as cE, type PaymentMethodInfo as cF, type AuthenticatedCustomer as cG, type ElementsCustomerInfo as cH, type AuthenticatedData as cI, type ElementsCheckoutData as cJ, type ElementsCheckoutResult as cK, type ParentToIframeMessage as cL, type IframeToParentMessage as cM, type ElementEventHandler as cN, type CreateMobileMoneyInput as ca, type EnrollmentData as cb, type AddressData as cc, type MobileMoneyData as cd, type EnrollAndLinkOrderInput as ce, type LinkStatusResult as cf, type LinkEnrollResult as cg, type EnrollAndLinkOrderResult as ch, type LinkSession as ci, type RevokeSessionResult as cj, type RevokeAllSessionsResult as ck, type RequestOtpInput as cl, type VerifyOtpInput as cm, type AuthResponse as cn, type PickupTimeType as co, type PickupTime as cp, type CheckoutAddressInfo as cq, type MobileMoneyDetails as cr, type CheckoutCustomerInfo as cs, type FxQuoteRequest as ct, type FxQuote as cu, type FxRateResponse as cv, type RequestContext as cw, type RequestStartEvent as cx, type RequestSuccessEvent as cy, type RequestErrorEvent as cz, type QuoteBundleSelectionInput as d, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RefreshQuoteResult as h, CartOperations as i, CheckoutService as j, generateIdempotencyKey as k, type GetOrdersOptions as l, type AuthStatus as m, type OtpResult as n, SchedulingService as o, LiteService as p, FxService as q, type LiteBootstrap as r, CimplifyElements as s, CimplifyElement as t, createElements as u, ELEMENT_TYPES as v, type ElementsOptions as w, type ElementOptions as x, type ElementType as y, type ElementEventType as z };