How to use the forge-apis.ActivitiesApi function in forge-apis

To help you get started, we’ve selected a few forge-apis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / forge-apis / forge-apis-tests.ts View on Github external
// $ExpectType void
authClientTwoLegged.setCredentials(authToken);
// $ExpectType boolean
authClientTwoLegged.isAuthorized();

// $ExpectType AuthClientThreeLegged
const authClientThreeLegged = new AuthClientThreeLegged('', '', '', [], true);
// $ExpectType string
authClientThreeLegged.generateAuthUrl();
// $ExpectType Promise
authClientThreeLegged.getToken('');
// $ExpectType Promise
authClientThreeLegged.refreshToken(authToken);

// $ExpectType ActivitiesApi
const activitiesApi = new ActivitiesApi();

// $ExpectType Promise
activitiesApi.createActivity(
    {
        Id: '',
        Instruction: {},
        AppPackages: [''],
        RequiredEngineVersion: '',
        Parameters: {},
        AllowedChildProcesses: [{}],
        Version: 0,
        Description: '',
        HostApplication: '',
        IsPublic: true,
    },
    authClientTwoLegged,