zocrmsdkmiblu 0.2.4 → 0.2.6
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/README.md +19 -19
- package/lib/js/OAuth.js +67 -66
- package/lib/js/REST_API/Records.js +82 -87
- package/lib/js/REST_API/actions.js +30 -30
- package/lib/js/REST_API/attachments.js +43 -43
- package/lib/js/REST_API/functions.js +22 -22
- package/lib/js/REST_API/org.js +17 -17
- package/lib/js/REST_API/settings.js +45 -45
- package/lib/js/REST_API/users.js +18 -18
- package/lib/js/ZCRMRestClient.js +348 -340
- package/lib/js/config.js +11 -0
- package/lib/js/crmapi.js +32 -32
- package/lib/js/mysql/mysql_util.js +161 -161
- package/lib/js/util.js +267 -326
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# BLUELABEL PROGRAMERS SDK ZOHOCRM
|
|
2
|
-
|
|
3
|
-
Please Install
|
|
4
|
-
|
|
5
|
-
npm i zocrmsdk
|
|
6
|
-
|
|
7
|
-
GET RECORD CRM V4
|
|
8
|
-
|
|
9
|
-
await zcrm.initialize({
|
|
10
|
-
client_id: "",
|
|
11
|
-
client_secret: "",
|
|
12
|
-
user_identifier: "",
|
|
13
|
-
redirect_url: "",
|
|
14
|
-
mysql_username: "",
|
|
15
|
-
mysql_password: ""
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
var response = await zcrm.API.MODULES.get({ module: "", id: "" })
|
|
19
|
-
|
|
1
|
+
# BLUELABEL PROGRAMERS SDK ZOHOCRM
|
|
2
|
+
|
|
3
|
+
Please Install
|
|
4
|
+
|
|
5
|
+
npm i zocrmsdk
|
|
6
|
+
|
|
7
|
+
GET RECORD CRM V4
|
|
8
|
+
|
|
9
|
+
await zcrm.initialize({
|
|
10
|
+
client_id: "",
|
|
11
|
+
client_secret: "",
|
|
12
|
+
user_identifier: "",
|
|
13
|
+
redirect_url: "",
|
|
14
|
+
mysql_username: "",
|
|
15
|
+
mysql_password: ""
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
var response = await zcrm.API.MODULES.get({ module: "", id: "" })
|
|
19
|
+
|
package/lib/js/OAuth.js
CHANGED
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
var config = null;
|
|
3
|
-
var qs = require('querystring');
|
|
4
|
-
var httpclient = require('request');
|
|
5
|
-
|
|
6
|
-
var actionvsurl = {
|
|
7
|
-
|
|
8
|
-
generate_token:'/oauth/v2/token'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
var mand_configurations = {
|
|
12
|
-
|
|
13
|
-
generate_token : ['client_id','client_secret','redirect_uri','code','grant_type'],
|
|
14
|
-
refresh_access_token : ['client_id','client_secret','grant_type','refresh_token']
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var OAuth = function (configuration,action) {
|
|
19
|
-
if (!configuration)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
|
|
2
|
+
var config = null;
|
|
3
|
+
var qs = require('querystring');
|
|
4
|
+
var httpclient = require('request');
|
|
5
|
+
|
|
6
|
+
var actionvsurl = {
|
|
7
|
+
|
|
8
|
+
generate_token:'/oauth/v2/token'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var mand_configurations = {
|
|
12
|
+
|
|
13
|
+
generate_token : ['client_id','client_secret','redirect_uri','code','grant_type'],
|
|
14
|
+
refresh_access_token : ['client_id','client_secret','grant_type','refresh_token']
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var OAuth = function (configuration,action) {
|
|
19
|
+
if (!configuration)
|
|
20
|
+
console.log(configuration);
|
|
21
|
+
throw new Error('Missing configuration for Zoho OAuth2 service');
|
|
22
|
+
assertConfigAttributesAreSet(configuration, mand_configurations[action]);
|
|
23
|
+
config = configuration;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function assertConfigAttributesAreSet(configuration, attributes) {
|
|
28
|
+
attributes.forEach(function (attribute) {
|
|
29
|
+
if (!configuration[attribute])
|
|
30
|
+
throw new Error('Missing configuration for Zoho OAuth service: '+ attribute);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
OAuth.constructurl=function(action){
|
|
35
|
+
|
|
36
|
+
var crmclient = require('./ZCRMRestClient');
|
|
37
|
+
var url = "https://"+crmclient.getIAMUrl()+actionvsurl[action]+'?' + qs.stringify(config);
|
|
38
|
+
return url;
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
OAuth.generateTokens=function(url){
|
|
43
|
+
return new Promise(function(resolve,reject){
|
|
44
|
+
|
|
45
|
+
httpclient.post(url,{
|
|
46
|
+
|
|
47
|
+
},function (err, response) {
|
|
48
|
+
|
|
49
|
+
var resultObj = {};
|
|
50
|
+
|
|
51
|
+
if(err){
|
|
52
|
+
|
|
53
|
+
resolve(err);
|
|
54
|
+
}
|
|
55
|
+
resolve(response);
|
|
56
|
+
|
|
57
|
+
});
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
module.exports = OAuth;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
@@ -1,88 +1,83 @@
|
|
|
1
|
-
var util = require('../util');
|
|
2
|
-
|
|
3
|
-
var modules = function modules()
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
get : function(input)
|
|
8
|
-
{
|
|
9
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.GET, false));//No I18N
|
|
10
|
-
},
|
|
11
|
-
getRelated : function(input)
|
|
12
|
-
{
|
|
13
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/"+input.related_module, HTTP_METHODS.GET, false));//No I18N
|
|
14
|
-
},
|
|
15
|
-
post : function(input)
|
|
16
|
-
{
|
|
17
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.POST, false));//No I18N
|
|
18
|
-
},
|
|
19
|
-
put : function(input)
|
|
20
|
-
{
|
|
21
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.PUT, false));//No I18N
|
|
22
|
-
},
|
|
23
|
-
delete : function (input)
|
|
24
|
-
{
|
|
25
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.DELETE, false));//No I18N
|
|
26
|
-
},
|
|
27
|
-
getAllDeletedRecords : function (input)
|
|
28
|
-
{
|
|
29
|
-
if (input.params)
|
|
30
|
-
{
|
|
31
|
-
input.params.type = "all";
|
|
32
|
-
}
|
|
33
|
-
else
|
|
34
|
-
{
|
|
35
|
-
input.params = {
|
|
36
|
-
"type" : "all"//No I18N
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
41
|
-
},
|
|
42
|
-
getRecycleBinRecords : function (input)
|
|
43
|
-
{
|
|
44
|
-
if (input.params)
|
|
45
|
-
{
|
|
46
|
-
input.type = "recycle";
|
|
47
|
-
}
|
|
48
|
-
else
|
|
49
|
-
{
|
|
50
|
-
input.params = {
|
|
51
|
-
"type" : "recycle"//No I18N
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
56
|
-
},
|
|
57
|
-
getPermanentlyDeletedRecords : function (input)
|
|
58
|
-
{
|
|
59
|
-
if (input.params)
|
|
60
|
-
{
|
|
61
|
-
input.type = "permanent";
|
|
62
|
-
}
|
|
63
|
-
else
|
|
64
|
-
{
|
|
65
|
-
input.params = {
|
|
66
|
-
"type" : "permanent"//No I18N
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
71
|
-
},
|
|
72
|
-
search : function (input)
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.api_name, HTTP_METHODS.POST, false));//No I18N
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
1
|
+
var util = require('../util');
|
|
2
|
+
|
|
3
|
+
var modules = function modules()
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
get : function(input)
|
|
8
|
+
{
|
|
9
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.GET, false));//No I18N
|
|
10
|
+
},
|
|
11
|
+
getRelated : function(input)
|
|
12
|
+
{
|
|
13
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/"+input.related_module, HTTP_METHODS.GET, false));//No I18N
|
|
14
|
+
},
|
|
15
|
+
post : function(input)
|
|
16
|
+
{
|
|
17
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.POST, false));//No I18N
|
|
18
|
+
},
|
|
19
|
+
put : function(input)
|
|
20
|
+
{
|
|
21
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.PUT, false));//No I18N
|
|
22
|
+
},
|
|
23
|
+
delete : function (input)
|
|
24
|
+
{
|
|
25
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}", HTTP_METHODS.DELETE, false));//No I18N
|
|
26
|
+
},
|
|
27
|
+
getAllDeletedRecords : function (input)
|
|
28
|
+
{
|
|
29
|
+
if (input.params)
|
|
30
|
+
{
|
|
31
|
+
input.params.type = "all";
|
|
32
|
+
}
|
|
33
|
+
else
|
|
34
|
+
{
|
|
35
|
+
input.params = {
|
|
36
|
+
"type" : "all"//No I18N
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
41
|
+
},
|
|
42
|
+
getRecycleBinRecords : function (input)
|
|
43
|
+
{
|
|
44
|
+
if (input.params)
|
|
45
|
+
{
|
|
46
|
+
input.type = "recycle";
|
|
47
|
+
}
|
|
48
|
+
else
|
|
49
|
+
{
|
|
50
|
+
input.params = {
|
|
51
|
+
"type" : "recycle"//No I18N
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
56
|
+
},
|
|
57
|
+
getPermanentlyDeletedRecords : function (input)
|
|
58
|
+
{
|
|
59
|
+
if (input.params)
|
|
60
|
+
{
|
|
61
|
+
input.type = "permanent";
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
{
|
|
65
|
+
input.params = {
|
|
66
|
+
"type" : "permanent"//No I18N
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/deleted", HTTP_METHODS.GET, false));//No I18N
|
|
71
|
+
},
|
|
72
|
+
search : function (input)
|
|
73
|
+
{
|
|
74
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/search", HTTP_METHODS.GET, false));//No I18N
|
|
75
|
+
},
|
|
76
|
+
coql: function(input) {
|
|
77
|
+
input.api_name = 'coql';
|
|
78
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.api_name, HTTP_METHODS.POST, false));//No I18N
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
88
83
|
module.exports = modules;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var util = require("../util");
|
|
2
|
-
|
|
3
|
-
var actions = function actions()
|
|
4
|
-
{
|
|
5
|
-
return {
|
|
6
|
-
convert : function (input)
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
return util.promiseResponse(util.constructRequestDetails(input, "Leads/{id}/actions/convert", HTTP_METHODS.POST, false));//No I18N
|
|
10
|
-
},
|
|
11
|
-
blueprint : function (input)
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/blueprint", HTTP_METHODS.PUT, false));//No I18N
|
|
15
|
-
},
|
|
16
|
-
getblueprint : function (input)
|
|
17
|
-
{
|
|
18
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/blueprint", HTTP_METHODS.GET, false));//No I18N
|
|
19
|
-
},
|
|
20
|
-
sendemail : function (input)
|
|
21
|
-
{
|
|
22
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/send_mail", HTTP_METHODS.POST, false));//No I18N
|
|
23
|
-
},
|
|
24
|
-
emailAttchDownload : function (input)
|
|
25
|
-
{
|
|
26
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/Emails/actions/download_attachments", HTTP_METHODS.GET, false));//No I18N
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
1
|
+
var util = require("../util");
|
|
2
|
+
|
|
3
|
+
var actions = function actions()
|
|
4
|
+
{
|
|
5
|
+
return {
|
|
6
|
+
convert : function (input)
|
|
7
|
+
{
|
|
8
|
+
|
|
9
|
+
return util.promiseResponse(util.constructRequestDetails(input, "Leads/{id}/actions/convert", HTTP_METHODS.POST, false));//No I18N
|
|
10
|
+
},
|
|
11
|
+
blueprint : function (input)
|
|
12
|
+
{
|
|
13
|
+
|
|
14
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/blueprint", HTTP_METHODS.PUT, false));//No I18N
|
|
15
|
+
},
|
|
16
|
+
getblueprint : function (input)
|
|
17
|
+
{
|
|
18
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/blueprint", HTTP_METHODS.GET, false));//No I18N
|
|
19
|
+
},
|
|
20
|
+
sendemail : function (input)
|
|
21
|
+
{
|
|
22
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/actions/send_mail", HTTP_METHODS.POST, false));//No I18N
|
|
23
|
+
},
|
|
24
|
+
emailAttchDownload : function (input)
|
|
25
|
+
{
|
|
26
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+"/{id}/Emails/actions/download_attachments", HTTP_METHODS.GET, false));//No I18N
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
31
|
module.exports = actions;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
var util = require('../util');
|
|
3
|
-
var attachments = function attachments()
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
uploadFile : function (input)
|
|
8
|
-
{
|
|
9
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments", HTTP_METHODS.POST, false));//No I18N
|
|
10
|
-
},
|
|
11
|
-
deleteFile : function (input)
|
|
12
|
-
{
|
|
13
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments/"+input.relatedId, HTTP_METHODS.DELETE, false));//No I18N
|
|
14
|
-
},
|
|
15
|
-
downloadFile : function (input)
|
|
16
|
-
{
|
|
17
|
-
input.download_file = true;
|
|
18
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments/"+input.relatedId, HTTP_METHODS.GET, false));//No I18N
|
|
19
|
-
},
|
|
20
|
-
uploadLink : function (input)
|
|
21
|
-
{
|
|
22
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments", HTTP_METHODS.POST, false));//No I18N
|
|
23
|
-
},
|
|
24
|
-
uploadPhoto : function (input)
|
|
25
|
-
{
|
|
26
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/photo", HTTP_METHODS.POST, false));//No I18N
|
|
27
|
-
},
|
|
28
|
-
downloadPhoto : function (input)
|
|
29
|
-
{
|
|
30
|
-
input.download_file = true;
|
|
31
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/photo", HTTP_METHODS.GET, false));//No I18N
|
|
32
|
-
},
|
|
33
|
-
deletePhoto : function (input)
|
|
34
|
-
{
|
|
35
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/photo", HTTP_METHODS.DELETE, false));//No I18N
|
|
36
|
-
},
|
|
37
|
-
getAllAttachments : function (input)
|
|
38
|
-
{
|
|
39
|
-
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/attachments", HTTP_METHODS.GET, false));//No I18N
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
1
|
+
|
|
2
|
+
var util = require('../util');
|
|
3
|
+
var attachments = function attachments()
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
uploadFile : function (input)
|
|
8
|
+
{
|
|
9
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments", HTTP_METHODS.POST, false));//No I18N
|
|
10
|
+
},
|
|
11
|
+
deleteFile : function (input)
|
|
12
|
+
{
|
|
13
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments/"+input.relatedId, HTTP_METHODS.DELETE, false));//No I18N
|
|
14
|
+
},
|
|
15
|
+
downloadFile : function (input)
|
|
16
|
+
{
|
|
17
|
+
input.download_file = true;
|
|
18
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments/"+input.relatedId, HTTP_METHODS.GET, false));//No I18N
|
|
19
|
+
},
|
|
20
|
+
uploadLink : function (input)
|
|
21
|
+
{
|
|
22
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/Attachments", HTTP_METHODS.POST, false));//No I18N
|
|
23
|
+
},
|
|
24
|
+
uploadPhoto : function (input)
|
|
25
|
+
{
|
|
26
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module+ "/{id}/photo", HTTP_METHODS.POST, false));//No I18N
|
|
27
|
+
},
|
|
28
|
+
downloadPhoto : function (input)
|
|
29
|
+
{
|
|
30
|
+
input.download_file = true;
|
|
31
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/photo", HTTP_METHODS.GET, false));//No I18N
|
|
32
|
+
},
|
|
33
|
+
deletePhoto : function (input)
|
|
34
|
+
{
|
|
35
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/photo", HTTP_METHODS.DELETE, false));//No I18N
|
|
36
|
+
},
|
|
37
|
+
getAllAttachments : function (input)
|
|
38
|
+
{
|
|
39
|
+
return util.promiseResponse(util.constructRequestDetails(input, input.module + "/{id}/attachments", HTTP_METHODS.GET, false));//No I18N
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
44
|
module.exports = attachments;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var util = require('../util');
|
|
2
|
-
var url = "functions/{api_name}/actions/execute";
|
|
3
|
-
|
|
4
|
-
var functions = function functions(){
|
|
5
|
-
|
|
6
|
-
return{
|
|
7
|
-
|
|
8
|
-
executeFunctionsInGet :function(input){
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return util.promiseResponse(util.constructRequestDetails(input, url , HTTP_METHODS.GET, true));//No I18N
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
executeFunctionsInPost :function(input){
|
|
15
|
-
|
|
16
|
-
return util.promiseResponse(util.constructRequestDetails(input, url , HTTP_METHODS.POST, true));//No I18N
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
module.exports = functions;
|
|
1
|
+
var util = require('../util');
|
|
2
|
+
var url = "functions/{api_name}/actions/execute";
|
|
3
|
+
|
|
4
|
+
var functions = function functions(){
|
|
5
|
+
|
|
6
|
+
return{
|
|
7
|
+
|
|
8
|
+
executeFunctionsInGet :function(input){
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
return util.promiseResponse(util.constructRequestDetails(input, url , HTTP_METHODS.GET, true));//No I18N
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
executeFunctionsInPost :function(input){
|
|
15
|
+
|
|
16
|
+
return util.promiseResponse(util.constructRequestDetails(input, url , HTTP_METHODS.POST, true));//No I18N
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = functions;
|
package/lib/js/REST_API/org.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
var util = require('../util');
|
|
3
|
-
|
|
4
|
-
var org = function org()
|
|
5
|
-
{
|
|
6
|
-
return {
|
|
7
|
-
get : function (input)
|
|
8
|
-
{
|
|
9
|
-
return util.promiseResponse(util.constructRequestDetails(input, "org", HTTP_METHODS.GET, true));//No I18N
|
|
10
|
-
},
|
|
11
|
-
authoken:function(isInvalid=false)
|
|
12
|
-
{
|
|
13
|
-
return util.getAuthToken(isInvalid)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
1
|
+
|
|
2
|
+
var util = require('../util');
|
|
3
|
+
|
|
4
|
+
var org = function org()
|
|
5
|
+
{
|
|
6
|
+
return {
|
|
7
|
+
get : function (input)
|
|
8
|
+
{
|
|
9
|
+
return util.promiseResponse(util.constructRequestDetails(input, "org", HTTP_METHODS.GET, true));//No I18N
|
|
10
|
+
},
|
|
11
|
+
authoken:function(isInvalid=false)
|
|
12
|
+
{
|
|
13
|
+
return util.getAuthToken(isInvalid)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
18
|
module.exports = org;
|