Skip to content

Commit bb561b3

Browse files
author
Ashish Modi
committed
typings for trigger
1 parent 8f1b66d commit bb561b3

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

src/index.d.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import {Trigger} from './trigger'
2+
3+
export * from './trigger'
4+
5+
// Stitch Client
6+
export interface StitchApiClient {
7+
// application: Application;
8+
// email: Email;
9+
// log: Log;
10+
// rule: Rule;
11+
// security: Security;
12+
// service: Service;
13+
// stitchFunction: StitchFunction;
14+
// token: Token;
15+
trigger: Trigger;
16+
// webhook: Webhook
17+
}
18+
19+
export interface StitchApiClientOptions {
20+
/**
21+
* API Access Public Key
22+
*/
23+
publicKey: string;
24+
/**
25+
* API Access Private Key
26+
*/
27+
privateKey: string;
28+
/**
29+
* Base URL for Stitch API
30+
*/
31+
baseUrl: string;
32+
/**
33+
* Target Project ID in Atlas account
34+
*/
35+
projectId: String;
36+
/**
37+
* Target App Id
38+
*/
39+
appId: string
40+
}
41+
42+
export = getMongodbStitchApiClient;
43+
44+
declare function getMongodbStitchApiClient(options: StitchApiClientOptions): StitchApiClient;

src/trigger.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface Trigger {
2+
get(triggerId: string) : Promise<any>
3+
getAll() : Promise<any>
4+
delete(triggerId: string) : Promise<any>
5+
create(body: any) : Promise<any>
6+
update(triggerId: string, body: any) : Promise<any>
7+
resume(triggerId: string) : Promise<any>
8+
}

0 commit comments

Comments
 (0)