monday-sdk-js 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface APIOptions {
|
|
1
|
+
export interface APIOptions {
|
|
2
2
|
/**
|
|
3
3
|
* Access token for the API
|
|
4
4
|
* If not set, will use the credentials of the current user (client only)
|
|
@@ -12,9 +12,9 @@ interface APIOptions {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* A string specifying which version of the API should be used
|
|
15
|
-
* If not set, will use the
|
|
15
|
+
* If not set, will use the current API version
|
|
16
16
|
*/
|
|
17
|
-
apiVersion?: string;
|
|
17
|
+
apiVersion?: string | undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
interface OAuthOptions {
|
|
@@ -46,6 +46,12 @@ export interface ClientApi {
|
|
|
46
46
|
*/
|
|
47
47
|
setToken(token: string): void;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Allows to set the API version for future requests.
|
|
51
|
+
* @param version A string specifying which version of the API should be used
|
|
52
|
+
*/
|
|
53
|
+
setApiVersion(version: string): void;
|
|
54
|
+
|
|
49
55
|
/**
|
|
50
56
|
* Performs a client-side redirection of the user to the monday OAuth screen with your client ID embedded in the URL,
|
|
51
57
|
* sin order to get their approval to generate a temporary OAuth token based on your requested permission scopes.
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Original Definitions were contributed by: Josh Parnham <https://github.com/josh->
|
|
2
2
|
import { ClientData } from './client-data.interface';
|
|
3
3
|
import { ClientExecute } from './client-execute.interface';
|
|
4
|
-
import { ClientApi } from './client-api.interface';
|
|
4
|
+
import { ClientApi, APIOptions } from './client-api.interface';
|
|
5
5
|
|
|
6
6
|
export as namespace mondaySdk;
|
|
7
7
|
|
|
@@ -10,7 +10,9 @@ type MondayClientSdk = ClientData & ClientExecute & ClientApi;
|
|
|
10
10
|
interface MondayServerSdk {
|
|
11
11
|
setToken(token: string): void;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
setApiVersion(version: string): void;
|
|
14
|
+
|
|
15
|
+
api(query: string, options?: APIOptions): Promise<any>;
|
|
14
16
|
|
|
15
17
|
oauthToken(code: string, clientId: string, clientSecret: string): Promise<any>;
|
|
16
18
|
}
|
|
@@ -19,12 +21,14 @@ declare function init(
|
|
|
19
21
|
config?: Partial<{
|
|
20
22
|
clientId: string;
|
|
21
23
|
apiToken: string;
|
|
24
|
+
apiVersion: string;
|
|
22
25
|
}>,
|
|
23
26
|
): MondayClientSdk;
|
|
24
27
|
|
|
25
28
|
declare function init(
|
|
26
29
|
config?: Partial<{
|
|
27
30
|
token: string;
|
|
31
|
+
apiVersion: string;
|
|
28
32
|
}>,
|
|
29
33
|
): MondayServerSdk;
|
|
30
34
|
|