mirror of
https://github.com/Kong/insomnia.git
synced 2026-11-04 20:13:48 -05:00
28 lines
569 B
TypeScript
28 lines
569 B
TypeScript
import { fetch } from './fetch';
|
|
|
|
// GET /v1/trials/eligibility
|
|
interface TrialEligibility {
|
|
isEligible: boolean;
|
|
}
|
|
|
|
export const getTrialEligibility = ({ sessionId }: { sessionId: string }) => {
|
|
return fetch<TrialEligibility>({
|
|
method: 'GET',
|
|
path: '/v1/trials/eligibility',
|
|
sessionId,
|
|
});
|
|
};
|
|
|
|
// POST /v1/trials/start
|
|
interface StartTrialResult {
|
|
success: boolean;
|
|
}
|
|
|
|
export const startTrial = ({ sessionId }: { sessionId: string }) => {
|
|
return fetch<StartTrialResult>({
|
|
method: 'POST',
|
|
path: '/v1/trials/start',
|
|
sessionId,
|
|
});
|
|
};
|