@punkbit/test24jan
Version:
A standalone package for Fleek Agents AI user-interface
58 lines (57 loc) • 1.59 kB
TypeScript
type getSubscriptionsType = (projectId?: string, token?: string) => Promise<{
ok: boolean;
data?: {
id: string;
status: string;
startDate: string;
periodEndDate: string;
productId: string;
endDate?: string;
items: {
quantity: number;
id: string;
name: string;
description: string;
price: number;
createdAt: string;
updatedAt: string;
metadata?: Record<string, string>;
productId: string;
}[];
}[];
error?: string;
}>;
type getPlansType = (token?: string) => Promise<{
ok: boolean;
data?: {
id: string;
name: string;
description: string;
price: number;
createdAt: string;
updatedAt: string;
metadata: Record<string, string>;
}[];
error?: string;
}>;
type CreateSubscriptionResponse = {
ok: boolean;
data?: {
url?: string;
};
error?: string;
};
/** Main interface. */
export interface ElizaIntegrationLayerProps {
accessToken?: string;
activeProjectId?: string;
isLoggedIn: boolean;
isLoggingIn: boolean;
login: () => void;
getSubscriptions: getSubscriptionsType;
getPlans: getPlansType;
createSubscription: (projectId?: string, productId?: string, token?: string) => Promise<CreateSubscriptionResponse>;
}
/** Package will define and export this component. */
export declare const ElizaIntegrationLayer: React.FC<ElizaIntegrationLayerProps>;
export default ElizaIntegrationLayer;