mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
zenaton typescript types (#36933)
This commit is contained in:
committed by
Andrew Branch
parent
8b09cb88d7
commit
c20ee8f995
264
types/zenaton/index.d.ts
vendored
Normal file
264
types/zenaton/index.d.ts
vendored
Normal file
@@ -0,0 +1,264 @@
|
||||
// Type definitions for zenaton 0.5
|
||||
// Project: https://zenaton.com
|
||||
// Definitions by: Julien <https://github.com/jalric>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
export class Client {
|
||||
constructor(...args: any[]);
|
||||
|
||||
findWorkflow(...args: any[]): any;
|
||||
|
||||
getAppEnv(...args: any[]): any;
|
||||
|
||||
getBodyForTask(...args: any[]): any;
|
||||
|
||||
getBodyForWorkflow(...args: any[]): any;
|
||||
|
||||
getWebsiteUrl(...args: any[]): any;
|
||||
|
||||
getWorkerUrl(...args: any[]): any;
|
||||
|
||||
getWorkerUrlNew(...args: any[]): any;
|
||||
|
||||
killWorkflow(...args: any[]): any;
|
||||
|
||||
mustBeScheduled(...args: any[]): any;
|
||||
|
||||
pauseWorkflow(...args: any[]): any;
|
||||
|
||||
resumeWorkflow(...args: any[]): any;
|
||||
|
||||
sendEvent(...args: any[]): any;
|
||||
|
||||
sendEventByInstanceId(...args: any[]): any;
|
||||
|
||||
startInstantTask(...args: any[]): any;
|
||||
|
||||
startInstantWorkflow(...args: any[]): any;
|
||||
|
||||
startScheduledTask(...args: any[]): any;
|
||||
|
||||
startScheduledWorkflow(...args: any[]): any;
|
||||
|
||||
startTask(...args: any[]): any;
|
||||
|
||||
startWorkflow(...args: any[]): any;
|
||||
|
||||
updateInstance(...args: any[]): any;
|
||||
|
||||
static init(...args: any[]): any;
|
||||
}
|
||||
|
||||
export class Engine {
|
||||
constructor(...args: any[]);
|
||||
|
||||
checkArguments(...args: any[]): any;
|
||||
|
||||
dispatch(...args: any[]): any;
|
||||
|
||||
execute(...args: any[]): any;
|
||||
|
||||
getInstanceId(...args: any[]): any;
|
||||
|
||||
isTask(...args: any[]): any;
|
||||
|
||||
isWorkflow(...args: any[]): any;
|
||||
|
||||
setProcessor(...args: any[]): any;
|
||||
}
|
||||
|
||||
export class LastClient {
|
||||
constructor(...args: any[]);
|
||||
|
||||
findWorkflow(...args: any[]): any;
|
||||
|
||||
getAppEnv(...args: any[]): any;
|
||||
|
||||
getBodyForTask(...args: any[]): any;
|
||||
|
||||
getBodyForWorkflow(...args: any[]): any;
|
||||
|
||||
getWebsiteUrl(...args: any[]): any;
|
||||
|
||||
getWorkerUrl(...args: any[]): any;
|
||||
|
||||
getWorkerUrlNew(...args: any[]): any;
|
||||
|
||||
killWorkflow(...args: any[]): any;
|
||||
|
||||
mustBeScheduled(...args: any[]): any;
|
||||
|
||||
pauseWorkflow(...args: any[]): any;
|
||||
|
||||
resumeWorkflow(...args: any[]): any;
|
||||
|
||||
sendEvent(...args: any[]): any;
|
||||
|
||||
sendEventByInstanceId(...args: any[]): any;
|
||||
|
||||
startInstantTask(...args: any[]): any;
|
||||
|
||||
startInstantWorkflow(...args: any[]): any;
|
||||
|
||||
startScheduledTask(...args: any[]): any;
|
||||
|
||||
startScheduledWorkflow(...args: any[]): any;
|
||||
|
||||
startTask(...args: any[]): any;
|
||||
|
||||
startWorkflow(...args: any[]): any;
|
||||
|
||||
updateInstance(...args: any[]): any;
|
||||
|
||||
static init(...args: any[]): any;
|
||||
}
|
||||
|
||||
export class Parallel {
|
||||
constructor(...args: any[]);
|
||||
|
||||
dispatch(...args: any[]): any;
|
||||
|
||||
execute(...args: any[]): any;
|
||||
}
|
||||
|
||||
export class Wait {
|
||||
constructor(...args: any[]);
|
||||
|
||||
at(...args: any[]): any;
|
||||
|
||||
dayOfMonth(...args: any[]): any;
|
||||
|
||||
days(...args: any[]): any;
|
||||
|
||||
friday(...args: any[]): any;
|
||||
|
||||
hours(...args: any[]): any;
|
||||
|
||||
minutes(...args: any[]): any;
|
||||
|
||||
monday(...args: any[]): any;
|
||||
|
||||
months(...args: any[]): any;
|
||||
|
||||
saturday(...args: any[]): any;
|
||||
|
||||
seconds(...args: any[]): any;
|
||||
|
||||
sunday(...args: any[]): any;
|
||||
|
||||
thursday(...args: any[]): any;
|
||||
|
||||
timestamp(...args: any[]): any;
|
||||
|
||||
tuesday(...args: any[]): any;
|
||||
|
||||
wednesday(...args: any[]): any;
|
||||
|
||||
weeks(...args: any[]): any;
|
||||
|
||||
years(...args: any[]): any;
|
||||
|
||||
static methods(...args: any[]): any;
|
||||
|
||||
static timezone(timezone: any): any;
|
||||
}
|
||||
|
||||
export const infos: {
|
||||
appVersion: string;
|
||||
codePath: string;
|
||||
};
|
||||
|
||||
export function Task(name: any, task: any): any;
|
||||
|
||||
export function Version(name: any, implementation: any): any;
|
||||
|
||||
export function Workflow(name: any, flow: any): any;
|
||||
|
||||
export namespace Errors {
|
||||
function EnvironmentNotSetError(...args: any[]): any;
|
||||
|
||||
function ExternalZenatonError(...args: any[]): any;
|
||||
|
||||
function InternalZenatonError(...args: any[]): any;
|
||||
|
||||
function InvalidArgumentError(...args: any[]): any;
|
||||
|
||||
function ModifiedDeciderError(...args: any[]): any;
|
||||
|
||||
function ScheduledBoxError(...args: any[]): any;
|
||||
|
||||
function ZenatonError(...args: any[]): any;
|
||||
|
||||
namespace EnvironmentNotSetError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace ExternalZenatonError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace InternalZenatonError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace InvalidArgumentError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace ModifiedDeciderError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace ScheduledBoxError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
|
||||
namespace ZenatonError {
|
||||
const stackTraceLimit: number;
|
||||
|
||||
function captureStackTrace(p0: any, p1: any): any;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace serializer {
|
||||
const CURRENT_VERSION: string;
|
||||
|
||||
function decode(data: any): any;
|
||||
|
||||
function encode(data: any): any;
|
||||
}
|
||||
|
||||
export namespace taskManager {
|
||||
const tasks: {};
|
||||
|
||||
function getClass(...args: any[]): any;
|
||||
|
||||
function getTask(...args: any[]): any;
|
||||
|
||||
function setClass(...args: any[]): any;
|
||||
}
|
||||
|
||||
export namespace workflowManager {
|
||||
const workflows: {};
|
||||
|
||||
function getClass(...args: any[]): any;
|
||||
|
||||
function getWorkflow(...args: any[]): any;
|
||||
|
||||
function setClass(...args: any[]): any;
|
||||
}
|
||||
23
types/zenaton/tsconfig.json
Normal file
23
types/zenaton/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"zenaton-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/zenaton/tslint.json
Normal file
1
types/zenaton/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
11
types/zenaton/zenaton-tests.ts
Normal file
11
types/zenaton/zenaton-tests.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
declare var setTimeout: any;
|
||||
import { Client, Task, Wait } from "zenaton";
|
||||
|
||||
Client.init("APP_ID", "API_TOKEN", "APP_ENV");
|
||||
|
||||
export default Task("TestTask", async () => {
|
||||
await new Wait().seconds(30).execute();
|
||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||
|
||||
return "Hello world!";
|
||||
});
|
||||
Reference in New Issue
Block a user