UNPKG

autumn-js

Version:
37 lines (34 loc) 1.24 kB
import { AttachParams } from '../client/types/clientAttachTypes.mjs'; import { CheckParams, CancelParams, TrackParams } from '../client/types/clientGenTypes.mjs'; import * as swr from 'swr'; import { a as CheckResult } from '../genTypes-B5_6Pu_4.mjs'; import { E as Entity, A as AutumnPromise } from '../entTypes-35x0LnYH.mjs'; import { GetEntityParams } from '../client/types/clientEntTypes.mjs'; import 'zod/v4'; import '../prodTypes-C4aZSZfO.mjs'; import '../error-DHbclCVh.mjs'; import '../cusTypes-RU0fmR-t.mjs'; declare const useEntity: (entityId: string | null, params?: GetEntityParams) => { entity: Entity | null; isLoading: boolean; error: any; refetch: swr.KeyedMutator<Entity | null>; check: (params: CheckParams) => { data: CheckResult; error: null; }; attach: (params: AttachParams) => Promise<any>; cancel: (params: CancelParams) => AutumnPromise<{ success: boolean; customer_id: string; product_id: string; }>; track: (params: TrackParams) => AutumnPromise<{ id: string; code: string; customer_id: string; feature_id?: string | undefined; event_name?: string | undefined; }>; }; export { useEntity };