@cimplify/sdk 0.7.1 → 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>>;
@@ -1112,6 +1105,8 @@ interface CheckoutFormData {
1112
1105
  interface CheckoutResult {
1113
1106
  order_id: string;
1114
1107
  order_number: string;
1108
+ /** Token for guest order access. Store this and pass as `?token=` on order endpoints. */
1109
+ bill_token?: string;
1115
1110
  payment_reference?: string;
1116
1111
  payment_status: string;
1117
1112
  requires_authorization: boolean;
@@ -1189,8 +1184,9 @@ declare function generateIdempotencyKey(): string;
1189
1184
  declare class CheckoutService {
1190
1185
  private client;
1191
1186
  constructor(client: CimplifyClient);
1187
+ private orderTokenParam;
1192
1188
  process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
1193
- initializePayment(orderId: string, method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1189
+ initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1194
1190
  submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
1195
1191
  pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
1196
1192
  updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
@@ -1222,6 +1218,7 @@ interface GetOrdersOptions {
1222
1218
  declare class OrderQueries {
1223
1219
  private client;
1224
1220
  constructor(client: CimplifyClient);
1221
+ private orderTokenParam;
1225
1222
  list(options?: GetOrdersOptions): Promise<Result<Order[], CimplifyError>>;
1226
1223
  get(orderId: string): Promise<Result<Order, CimplifyError>>;
1227
1224
  getRecent(limit?: number): Promise<Result<Order[], CimplifyError>>;
@@ -1229,7 +1226,7 @@ declare class OrderQueries {
1229
1226
  cancel(orderId: string, reason?: string): Promise<Result<Order, CimplifyError>>;
1230
1227
  }
1231
1228
 
1232
- interface SuccessResult$2 {
1229
+ interface SuccessResult$1 {
1233
1230
  success: boolean;
1234
1231
  message?: string;
1235
1232
  }
@@ -1242,9 +1239,9 @@ declare class LinkService {
1242
1239
  private client;
1243
1240
  constructor(client: CimplifyClient);
1244
1241
  getProfile(): Promise<Result<LinkData["customer"], CimplifyError>>;
1245
- requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$2, CimplifyError>>;
1242
+ requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$1, CimplifyError>>;
1246
1243
  verifyOtp(input: VerifyOtpInput): Promise<Result<AuthResponse, CimplifyError>>;
1247
- logout(): Promise<Result<SuccessResult$2, CimplifyError>>;
1244
+ logout(): Promise<Result<SuccessResult$1, CimplifyError>>;
1248
1245
  checkStatus(contact: string): Promise<Result<LinkStatusResult, CimplifyError>>;
1249
1246
  getLinkData(): Promise<Result<LinkData, CimplifyError>>;
1250
1247
  getAddresses(): Promise<Result<CustomerAddress[], CimplifyError>>;
@@ -1252,28 +1249,28 @@ declare class LinkService {
1252
1249
  getPreferences(): Promise<Result<CustomerLinkPreferences, CimplifyError>>;
1253
1250
  enroll(data: EnrollmentData): Promise<Result<LinkEnrollResult, CimplifyError>>;
1254
1251
  enrollAndLinkOrder(data: EnrollAndLinkOrderInput): Promise<Result<EnrollAndLinkOrderResult, CimplifyError>>;
1255
- updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$2, CimplifyError>>;
1252
+ updatePreferences(preferences: Partial<CustomerLinkPreferences>): Promise<Result<SuccessResult$1, CimplifyError>>;
1256
1253
  createAddress(input: CreateAddressInput): Promise<Result<CustomerAddress, CimplifyError>>;
1257
- updateAddress(input: UpdateAddressInput): Promise<Result<SuccessResult$2, CimplifyError>>;
1258
- deleteAddress(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1259
- setDefaultAddress(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1260
- 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>>;
1261
1258
  createMobileMoney(input: CreateMobileMoneyInput): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1262
- deleteMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1263
- setDefaultMobileMoney(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1264
- trackMobileMoneyUsage(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1265
- 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>>;
1266
1263
  getSessions(): Promise<Result<LinkSession[], CimplifyError>>;
1267
1264
  revokeSession(sessionId: string): Promise<Result<RevokeSessionResult, CimplifyError>>;
1268
1265
  revokeAllSessions(): Promise<Result<RevokeAllSessionsResult, CimplifyError>>;
1269
1266
  getAddressesRest(): Promise<Result<CustomerAddress[], CimplifyError>>;
1270
1267
  createAddressRest(input: CreateAddressInput): Promise<Result<CustomerAddress, CimplifyError>>;
1271
- deleteAddressRest(addressId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1272
- 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>>;
1273
1270
  getMobileMoneyRest(): Promise<Result<CustomerMobileMoney[], CimplifyError>>;
1274
1271
  createMobileMoneyRest(input: CreateMobileMoneyInput): Promise<Result<CustomerMobileMoney, CimplifyError>>;
1275
- deleteMobileMoneyRest(mobileMoneyId: string): Promise<Result<SuccessResult$2, CimplifyError>>;
1276
- 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>>;
1277
1274
  }
1278
1275
 
1279
1276
  interface AuthStatus {
@@ -1290,11 +1287,7 @@ interface UpdateProfileInput {
1290
1287
  email?: string;
1291
1288
  phone?: string;
1292
1289
  }
1293
- interface ChangePasswordInput {
1294
- current_password: string;
1295
- new_password: string;
1296
- }
1297
- interface SuccessResult$1 {
1290
+ interface SuccessResult {
1298
1291
  success: boolean;
1299
1292
  }
1300
1293
  declare class AuthService {
@@ -1305,10 +1298,8 @@ declare class AuthService {
1305
1298
  isAuthenticated(): Promise<Result<boolean, CimplifyError>>;
1306
1299
  requestOtp(contact: string, contactType?: "phone" | "email"): Promise<Result<void, CimplifyError>>;
1307
1300
  verifyOtp(code: string, contact?: string): Promise<Result<OtpResult, CimplifyError>>;
1308
- logout(): Promise<Result<SuccessResult$1, CimplifyError>>;
1301
+ logout(): Promise<Result<SuccessResult, CimplifyError>>;
1309
1302
  updateProfile(input: UpdateProfileInput): Promise<Result<Customer, CimplifyError>>;
1310
- changePassword(input: ChangePasswordInput): Promise<Result<SuccessResult$1, CimplifyError>>;
1311
- resetPassword(email: string): Promise<Result<SuccessResult$1, CimplifyError>>;
1312
1303
  }
1313
1304
 
1314
1305
  type BusinessType = "eatery" | "retail" | "service" | "other" | "system" | "unset";
@@ -1609,6 +1600,7 @@ interface InventorySummary {
1609
1600
  declare class InventoryService {
1610
1601
  private client;
1611
1602
  constructor(client: CimplifyClient);
1603
+ private withQuery;
1612
1604
  getStockLevels(): Promise<Result<StockLevel[], CimplifyError>>;
1613
1605
  getProductStock(productId: string, locationId?: string): Promise<Result<ProductStock, CimplifyError>>;
1614
1606
  getVariantStock(variantId: string, locationId?: string): Promise<Result<StockLevel, CimplifyError>>;
@@ -1624,157 +1616,34 @@ declare class InventoryService {
1624
1616
  getAvailableQuantity(productId: string, locationId?: string): Promise<Result<number, CimplifyError>>;
1625
1617
  }
1626
1618
 
1627
- interface ServiceAvailabilityRule {
1628
- id: string;
1629
- business_id: string;
1630
- location_id: string;
1631
- item_id: string;
1632
- day_of_week: number;
1633
- start_time: string;
1634
- end_time: string;
1635
- capacity?: number;
1636
- created_at: string;
1637
- updated_at: string;
1638
- metadata?: Record<string, unknown>;
1639
- }
1640
- interface ServiceAvailabilityException {
1641
- id: string;
1642
- business_id: string;
1643
- location_id: string;
1644
- item_id: string;
1645
- exception_date: string;
1646
- is_closed: boolean;
1647
- start_time?: string;
1648
- end_time?: string;
1649
- capacity?: number;
1650
- reason?: string;
1651
- created_at: string;
1652
- updated_at: string;
1653
- metadata?: Record<string, unknown>;
1654
- }
1655
- interface StaffAvailabilityRule {
1656
- id: string;
1657
- staff_id: string;
1658
- location_id?: string;
1659
- day_of_week: number;
1660
- start_time: string;
1661
- end_time: string;
1662
- is_available: boolean;
1663
- created_at: string;
1664
- updated_at: string;
1665
- metadata?: Record<string, unknown>;
1666
- }
1667
- interface StaffAvailabilityException {
1668
- id: string;
1669
- staff_id: string;
1670
- location_id?: string;
1671
- exception_date: string;
1672
- is_unavailable_all_day: boolean;
1673
- start_time?: string;
1674
- end_time?: string;
1675
- reason?: string;
1676
- created_at: string;
1677
- updated_at: string;
1678
- metadata?: Record<string, unknown>;
1679
- }
1680
- interface ResourceAvailabilityRule {
1681
- id: string;
1682
- business_id: string;
1683
- location_id: string;
1684
- resource_id: string;
1685
- day_of_week: number;
1686
- start_time: string;
1687
- end_time: string;
1688
- is_available: boolean;
1689
- created_at: string;
1690
- updated_at: string;
1691
- metadata?: Record<string, unknown>;
1692
- }
1693
- interface ResourceAvailabilityException {
1694
- id: string;
1695
- business_id: string;
1696
- location_id: string;
1697
- resource_id: string;
1698
- exception_date: string;
1699
- is_unavailable_all_day: boolean;
1700
- start_time?: string;
1701
- end_time?: string;
1702
- reason?: string;
1703
- created_at: string;
1704
- updated_at: string;
1705
- metadata?: Record<string, unknown>;
1706
- }
1707
- interface StaffBookingProfile {
1708
- id: string;
1709
- staff_id: string;
1710
- skills?: string[];
1711
- can_be_booked: boolean;
1712
- default_service_duration_override?: number;
1713
- booking_buffer_minutes?: number;
1714
- max_daily_bookings?: number;
1715
- preferred_working_hours?: Record<string, unknown>;
1716
- created_at: string;
1717
- updated_at: string;
1718
- metadata?: Record<string, unknown>;
1719
- }
1720
- interface ServiceStaffRequirement {
1721
- id: string;
1722
- service_item_id: string;
1723
- role_id?: string;
1724
- required_skill?: string;
1725
- number_of_staff: number;
1726
- specific_staff_assignment_required: boolean;
1727
- created_at: string;
1728
- updated_at: string;
1729
- metadata?: Record<string, unknown>;
1730
- }
1731
- interface BookingRequirementOverride {
1732
- id: string;
1733
- appointment_id: string;
1734
- overridden_by: string;
1735
- reason: string;
1736
- missing_staff_requirements?: Record<string, unknown>;
1737
- missing_resource_requirements?: Record<string, unknown>;
1738
- created_at: string;
1739
- }
1740
- interface ResourceType {
1741
- id: string;
1742
- business_id: string;
1743
- name: string;
1744
- description?: string;
1745
- created_at: string;
1746
- updated_at: string;
1747
- }
1748
1619
  interface Service {
1749
1620
  id: string;
1750
- business_id: string;
1751
- product_id: string;
1752
1621
  name: string;
1753
1622
  description?: string;
1623
+ price?: Money;
1754
1624
  duration_minutes: number;
1755
- buffer_before_minutes: number;
1756
- buffer_after_minutes: number;
1757
- max_participants: number;
1758
- price: Money;
1759
- currency: CurrencyCode;
1760
- requires_staff: boolean;
1761
- is_active: boolean;
1762
- image_url?: string;
1763
- 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;
1764
1636
  metadata?: Record<string, unknown>;
1765
1637
  }
1766
- interface ServiceWithStaff extends Service {
1767
- available_staff: Staff[];
1768
- }
1769
1638
  interface Staff {
1770
1639
  id: string;
1771
- business_id: string;
1640
+ business_id?: string;
1772
1641
  name: string;
1773
1642
  email?: string;
1774
1643
  phone?: string;
1775
1644
  avatar_url?: string;
1776
1645
  bio?: string;
1777
- is_active: boolean;
1646
+ is_active?: boolean;
1778
1647
  services?: string[];
1779
1648
  }
1780
1649
  interface TimeSlot {
@@ -1787,57 +1656,79 @@ interface TimeSlot {
1787
1656
  }
1788
1657
  interface AvailableSlot extends TimeSlot {
1789
1658
  price?: Money;
1790
- duration_minutes: number;
1659
+ duration_minutes?: number;
1791
1660
  }
1792
1661
  interface DayAvailability {
1793
1662
  date: string;
1794
1663
  slots: TimeSlot[];
1795
- is_fully_booked: boolean;
1664
+ has_availability?: boolean;
1665
+ is_fully_booked?: boolean;
1796
1666
  }
1797
- type BookingStatus = "pending" | "confirmed" | "in_progress" | "completed" | "cancelled" | "no_show";
1667
+ type BookingStatus = "pending" | "confirmed" | "in_progress" | "completed" | "cancelled" | "no_show" | string;
1798
1668
  interface Booking {
1799
1669
  id: string;
1800
- business_id: string;
1801
- order_id: string;
1802
- line_item_id: string;
1803
- service_id: string;
1804
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;
1805
1683
  customer_id?: string;
1806
1684
  customer_name?: string;
1807
1685
  customer_phone?: string;
1808
1686
  staff_id?: string;
1809
- staff_name?: string;
1810
1687
  location_id?: string;
1811
1688
  location_name?: string;
1812
- start_time: string;
1813
- end_time: string;
1814
- duration_minutes: number;
1815
- participant_count: number;
1816
- status: BookingStatus;
1817
- notes?: string;
1689
+ duration_minutes?: number;
1818
1690
  cancellation_reason?: string;
1819
1691
  cancelled_at?: string;
1820
- created_at: string;
1821
- updated_at: string;
1692
+ created_at?: string;
1693
+ updated_at?: string;
1822
1694
  }
1823
1695
  interface BookingWithDetails extends Booking {
1824
- service: Service;
1696
+ service?: Service;
1825
1697
  staff?: Staff;
1826
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
+ }
1827
1713
  interface GetAvailableSlotsInput {
1828
1714
  service_id: string;
1829
1715
  date: string;
1830
1716
  participant_count?: number;
1831
1717
  duration_minutes?: number;
1832
- staff_id?: string;
1833
- location_id?: string;
1834
1718
  }
1835
1719
  interface CheckSlotAvailabilityInput {
1836
1720
  service_id: string;
1837
1721
  slot_time: string;
1838
1722
  duration_minutes?: number;
1839
1723
  participant_count?: number;
1840
- 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;
1841
1732
  }
1842
1733
  interface RescheduleBookingInput {
1843
1734
  order_id: string;
@@ -1846,131 +1737,116 @@ interface RescheduleBookingInput {
1846
1737
  new_end_time: string;
1847
1738
  new_staff_id?: string;
1848
1739
  reason?: string;
1740
+ reschedule_type?: "customer" | "business" | "system";
1849
1741
  }
1850
1742
  interface CancelBookingInput {
1851
1743
  booking_id: string;
1852
1744
  reason?: string;
1853
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
+ }
1854
1765
  interface ServiceAvailabilityParams {
1855
1766
  service_id: string;
1856
1767
  start_date: string;
1857
1768
  end_date: string;
1858
1769
  location_id?: string;
1859
- staff_id?: string;
1860
1770
  participant_count?: number;
1861
1771
  }
1862
1772
  interface ServiceAvailabilityResult {
1863
1773
  service_id: string;
1864
- days: DayAvailability[];
1774
+ location_id?: string;
1775
+ start_date: string;
1776
+ end_date: string;
1777
+ participant_count: number;
1778
+ availability: DayAvailability[];
1779
+ days?: DayAvailability[];
1865
1780
  }
1866
1781
 
1867
1782
  /**
1868
1783
  * Scheduling service with explicit error handling via Result type.
1869
1784
  *
1870
1785
  * All methods return `Result<T, CimplifyError>` - no exceptions thrown.
1871
- *
1872
- * @example
1873
- * ```typescript
1874
- * const result = await client.scheduling.getAvailableSlots({
1875
- * service_id: "svc_haircut",
1876
- * date: "2024-01-15"
1877
- * });
1878
- *
1879
- * if (result.ok) {
1880
- * console.log("Available slots:", result.value);
1881
- * } else {
1882
- * console.error("Failed:", result.error.code);
1883
- * }
1884
- * ```
1885
1786
  */
1886
1787
  declare class SchedulingService {
1887
1788
  private client;
1888
1789
  constructor(client: CimplifyClient);
1889
1790
  getServices(): Promise<Result<Service[], CimplifyError>>;
1890
1791
  /**
1891
- * Get a specific service by ID
1892
- * Note: Filters from all services client-side (no single-service endpoint)
1792
+ * Get a specific service by ID.
1893
1793
  */
1894
1794
  getService(serviceId: string): Promise<Result<Service | null, CimplifyError>>;
1895
1795
  getAvailableSlots(input: GetAvailableSlotsInput): Promise<Result<AvailableSlot[], CimplifyError>>;
1896
- checkSlotAvailability(input: CheckSlotAvailabilityInput): Promise<Result<{
1897
- available: boolean;
1898
- reason?: string;
1899
- }, CimplifyError>>;
1796
+ checkSlotAvailability(input: CheckSlotAvailabilityInput): Promise<Result<CheckSlotAvailabilityResult, CimplifyError>>;
1900
1797
  getServiceAvailability(params: ServiceAvailabilityParams): Promise<Result<ServiceAvailabilityResult, CimplifyError>>;
1901
1798
  getBooking(bookingId: string): Promise<Result<BookingWithDetails, CimplifyError>>;
1902
- getCustomerBookings(): Promise<Result<Booking[], CimplifyError>>;
1903
- getUpcomingBookings(): Promise<Result<Booking[], CimplifyError>>;
1904
- getPastBookings(limit?: number): Promise<Result<Booking[], CimplifyError>>;
1905
- cancelBooking(input: CancelBookingInput): Promise<Result<Booking, CimplifyError>>;
1906
- 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>>;
1907
1804
  getNextAvailableSlot(serviceId: string, fromDate?: string): Promise<Result<AvailableSlot | null, CimplifyError>>;
1908
1805
  hasAvailabilityOn(serviceId: string, date: string): Promise<Result<boolean, CimplifyError>>;
1806
+ getBookingLegacy(bookingId: string): Promise<Result<Booking, CimplifyError>>;
1909
1807
  }
1910
1808
 
1911
- interface LiteBootstrap {
1912
- business: Business;
1913
- location: Location;
1914
- categories: Category[];
1915
- table?: TableInfo;
1916
- cart: Cart | null;
1917
- currency: string;
1809
+ interface LiteBootstrapBusiness {
1810
+ id: string;
1811
+ name: string;
1812
+ handle: string;
1813
+ logo?: string | null;
1814
+ currency?: string | null;
1918
1815
  is_open: boolean;
1919
1816
  }
1920
- interface TableInfo {
1817
+ interface LiteBootstrapCategory {
1921
1818
  id: string;
1922
- number: string;
1923
- location_id: string;
1924
- capacity?: number;
1925
- status: "available" | "occupied" | "reserved";
1926
- current_order_id?: string;
1819
+ name: string;
1820
+ slug?: string | null;
1927
1821
  }
1928
- interface KitchenOrderItem {
1929
- product_id: string;
1930
- quantity: number;
1931
- variant_id?: string;
1932
- modifiers?: string[];
1933
- notes?: string;
1822
+ interface LiteBootstrapLocation {
1823
+ id: string;
1934
1824
  }
1935
- interface KitchenOrderResult {
1936
- success: boolean;
1937
- order_id: string;
1938
- order_number: string;
1939
- estimated_time_minutes?: number;
1825
+ interface LiteBootstrap {
1826
+ business: LiteBootstrapBusiness;
1827
+ categories: LiteBootstrapCategory[];
1828
+ location?: LiteBootstrapLocation | null;
1940
1829
  }
1941
- interface SuccessResult {
1942
- success: boolean;
1830
+ interface LiteTable {
1831
+ id: string;
1832
+ name: string;
1833
+ location_id?: string | null;
1943
1834
  }
1944
- interface RequestBillResult {
1945
- success: boolean;
1946
- order_id: string;
1835
+ interface LiteTableResponse {
1836
+ table: LiteTable;
1837
+ tab: Record<string, unknown> | null;
1947
1838
  }
1839
+ type TableInfo = LiteTableResponse;
1948
1840
  /**
1949
1841
  * Lite service for QR code ordering with explicit error handling via Result type.
1950
1842
  *
1951
1843
  * All methods return `Result<T, CimplifyError>` - no exceptions thrown.
1952
- *
1953
- * @example
1954
- * ```typescript
1955
- * const result = await client.lite.getBootstrap();
1956
- *
1957
- * if (result.ok) {
1958
- * console.log("Business:", result.value.business.name);
1959
- * console.log("Table:", result.value.table?.number);
1960
- * } else {
1961
- * console.error("Failed:", result.error.code);
1962
- * }
1963
- * ```
1964
1844
  */
1965
1845
  declare class LiteService {
1966
1846
  private client;
1967
1847
  constructor(client: CimplifyClient);
1968
1848
  getBootstrap(): Promise<Result<LiteBootstrap, CimplifyError>>;
1969
- getTable(tableId: string): Promise<Result<TableInfo, CimplifyError>>;
1970
- getTableByNumber(tableNumber: string, locationId?: string): Promise<Result<TableInfo, CimplifyError>>;
1971
- sendToKitchen(tableId: string, items: KitchenOrderItem[]): Promise<Result<KitchenOrderResult, CimplifyError>>;
1972
- callWaiter(tableId: string, reason?: string): Promise<Result<SuccessResult, CimplifyError>>;
1973
- requestBill(tableId: string): Promise<Result<RequestBillResult, CimplifyError>>;
1849
+ getTable(tableId: string): Promise<Result<LiteTableResponse, CimplifyError>>;
1974
1850
  getMenu(): Promise<Result<Product[], CimplifyError>>;
1975
1851
  getMenuByCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
1976
1852
  }
@@ -2323,7 +2199,9 @@ declare class CimplifyClient {
2323
2199
  isTestMode(): boolean;
2324
2200
  setAccessToken(token: string | null): void;
2325
2201
  clearSession(): void;
2326
- /** Set the active location/branch for all subsequent requests */
2202
+ setOrderToken(orderId: string, token: string): void;
2203
+ getOrderToken(orderId: string): string | null;
2204
+ clearOrderTokens(): void;
2327
2205
  setLocationId(locationId: string | null): void;
2328
2206
  /** Get the currently active location ID */
2329
2207
  getLocationId(): string | null;
@@ -2342,8 +2220,6 @@ declare class CimplifyClient {
2342
2220
  private resilientFetch;
2343
2221
  private getDedupeKey;
2344
2222
  private deduplicatedRequest;
2345
- query<T = unknown>(query: string, variables?: Record<string, unknown>): Promise<T>;
2346
- call<T = unknown>(method: string, args?: unknown): Promise<T>;
2347
2223
  get<T = unknown>(path: string): Promise<T>;
2348
2224
  post<T = unknown>(path: string, body?: unknown): Promise<T>;
2349
2225
  patch<T = unknown>(path: string, body?: unknown): Promise<T>;
@@ -2352,7 +2228,6 @@ declare class CimplifyClient {
2352
2228
  linkPost<T = unknown>(path: string, body?: unknown): Promise<T>;
2353
2229
  linkDelete<T = unknown>(path: string): Promise<T>;
2354
2230
  private handleRestResponse;
2355
- private handleResponse;
2356
2231
  get catalogue(): CatalogueQueries;
2357
2232
  get cart(): CartOperations;
2358
2233
  get checkout(): CheckoutService;
@@ -2382,4 +2257,4 @@ declare class CimplifyClient {
2382
2257
  }
2383
2258
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2384
2259
 
2385
- 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 };