@daml/hub-react
Version:
Daml React functions for Daml Hub
27 lines (26 loc) • 1.14 kB
TypeScript
import React from 'react';
import { Automation, Instance, SuccessResponse } from '../automation/schemas';
import { PartyToken } from '../party-token/PartyToken';
interface AutomationsProviderProps {
publicToken?: PartyToken | string;
partyToken?: PartyToken | string;
interval: number;
nonHubDomain?: boolean;
}
export declare const AutomationsProvider: React.FC<AutomationsProviderProps>;
/**
* React hook to manage automations and create deployments.
*/
export declare function useAutomations(): {
automations: Automation[] | undefined;
deployAutomation: ((artifactHash: string, trigger?: string | undefined, token?: string | undefined) => Promise<Instance>) | undefined;
};
/**
* React hook to manage instances of running automations.
*/
export declare function useAutomationInstances(): {
instances: Instance[] | undefined;
deployAutomation: ((artifactHash: string, trigger?: string | undefined, token?: string | undefined) => Promise<Instance>) | undefined;
deleteInstance: ((instanceId: string, owner: string, token?: string | undefined) => Promise<SuccessResponse>) | undefined;
};
export {};