vtb-appit 0.0.52 → 0.0.53
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/appit-base-transformer.js +11 -0
- package/appit.js +7 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ class AppitBaseTransformer {
|
|
|
8
8
|
{
|
|
9
9
|
const data = JSON.parse(fs.readFileSync(pth.join(__dirname, '../../assets/travelplan.json'), {encoding: 'utf8' }));
|
|
10
10
|
this.travelplan = JSON.parse(JSON.stringify(data));
|
|
11
|
+
this.profile = {};
|
|
11
12
|
|
|
12
13
|
try {
|
|
13
14
|
this.token = fs.readFileSync(pth.join(__dirname, '../../assets/token.jwt'), {encoding: 'utf8' });
|
|
@@ -142,6 +143,16 @@ class AppitBaseTransformer {
|
|
|
142
143
|
return result;
|
|
143
144
|
}
|
|
144
145
|
|
|
146
|
+
homescreen()
|
|
147
|
+
{
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
settings()
|
|
152
|
+
{
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
|
|
145
156
|
|
|
146
157
|
async tsGetData()
|
|
147
158
|
{
|
package/appit.js
CHANGED
|
@@ -51,6 +51,8 @@ class Appit {
|
|
|
51
51
|
{
|
|
52
52
|
if(!await this.login()) return false;
|
|
53
53
|
|
|
54
|
+
this.transformer.profile = await this.fetchProfile();
|
|
55
|
+
|
|
54
56
|
if(this.options && this.options.tsData) {
|
|
55
57
|
try {
|
|
56
58
|
this.transformer.tsData = await this.transformer.tsGetData();
|
|
@@ -516,6 +518,11 @@ class Appit {
|
|
|
516
518
|
return object
|
|
517
519
|
}
|
|
518
520
|
|
|
521
|
+
async fetchProfile(data)
|
|
522
|
+
{
|
|
523
|
+
return await this.request('POST', `workspaces/${this.transformer.workspace_id}/organizations/profile`, data);
|
|
524
|
+
}
|
|
525
|
+
|
|
519
526
|
async login()
|
|
520
527
|
{
|
|
521
528
|
let crediantials = await this.request('POST', 'login', {
|