autumn-js
Version:
Autumn JS Library
37 lines (34 loc) • 1.24 kB
TypeScript
import { AttachParams } from '../client/types/clientAttachTypes.js';
import { CheckParams, CancelParams, TrackParams } from '../client/types/clientGenTypes.js';
import * as swr from 'swr';
import { a as CheckResult } from '../genTypes-CY6GNiAn.js';
import { E as Entity, A as AutumnPromise } from '../entTypes-n2T2wpRx.js';
import { GetEntityParams } from '../client/types/clientEntTypes.js';
import 'zod/v4';
import '../prodTypes-C4aZSZfO.js';
import '../error-DHbclCVh.js';
import '../cusTypes-D3QQXjif.js';
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 };