web4-oasis-api
Advanced tools
Comparing version 1.0.2 to 1.0.3
649
data/data.js
@@ -9,55 +9,20 @@ import axios from "axios"; | ||
async loadHolon(data) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/load-holon`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data: JSON.stringify(data), | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getLoadHolonById(id = "") { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${id}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonChildById( | ||
async loadHolon( | ||
data = { | ||
id: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
id: "188e0e27-3af2-478f-af86-030c56a42edb", | ||
LoadChildren: false, | ||
Recursive: false, | ||
MaxChildDepth: 1, | ||
ContinueOnError: false, | ||
Version: 1, | ||
ProviderType: "HoloOASIS", | ||
SetGlobally: false, | ||
ShowDetailedSettings: true, | ||
AutoFailOverEnabled: "true", | ||
AutoReplicationEnabled: "false", | ||
AutoLoadBalanceEnabled: "false", | ||
AutoFailOverProviders: "MongoDBOASIS, HoloOASIS", | ||
AutoReplicationProviders: "MongoDBOASIS, HoloOASIS", | ||
AutoLoadBalanceProviders: "MongoDBOASIS, HoloOASIS", | ||
WaitForAutoReplicationResult: false, | ||
} | ||
@@ -68,41 +33,28 @@ ) { | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.id}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
if (typeof data === "string") { | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonChildByIdAndSetGlobally( | ||
data = { | ||
id: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) | ||
return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.id}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}`, | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/load-holon`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data: JSON.stringify(data), | ||
}; | ||
@@ -120,20 +72,20 @@ | ||
async getHolonChildByIdAndSetGloballyWithMoreOptions( | ||
async loadAllHolons( | ||
data = { | ||
id: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
autoReplicationMode: "", | ||
autoFailOverMode: "", | ||
autoLoadBalanceMode: "", | ||
autoReplicationProviders: "", | ||
autoFailOverProviders: "", | ||
autoLoadBalanceProviders: "", | ||
waitForAutoReplicationResult: "", | ||
showDetailedSetting: "", | ||
HolonType: "Moon", | ||
LoadChildren: true, | ||
Recursive: true, | ||
MaxChildDepth: 0, | ||
ContinueOnError: false, | ||
Version: 0, | ||
ProviderType: "HoloOASIS", | ||
SetGlobally: false, | ||
ShowDetailedSettings: true, | ||
AutoFailOverEnabled: "true", | ||
AutoReplicationEnabled: "true", | ||
AutoLoadBalanceEnabled: "true", | ||
AutoFailOverProviders: "MongoDBOASIS, HoloOASOS", | ||
AutoReplicationProviders: "MongoDBOASIS, HoloOASOS", | ||
AutoLoadBalanceProviders: "MongoDBOASIS, HoloOASOS", | ||
WaitForAutoReplicationResult: false, | ||
} | ||
@@ -144,71 +96,25 @@ ) { | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.id}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}/${data.autoReplicationMode}/${data.autoFailOverMode}/${data.autoLoadBalanceMode}/${data.autoReplicationProviders}/${data.autoFailOverProviders}/${data.autoLoadBalanceProviders}/${data.waitForAutoReplicationResult}/${data.showDetailedSetting}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
if (data === undefined) { | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-all-holons/all`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
async getLoadHolonById(id = "") { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${id}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) | ||
return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async loadAllHolons(data) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/load-all-holons`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data: JSON.stringify(data) | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async loadAllHolonsForGivenType(holonType) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-all-holons/${holonType}`, | ||
@@ -218,2 +124,3 @@ headers: { | ||
}, | ||
data: JSON.stringify(data), | ||
}; | ||
@@ -231,10 +138,21 @@ | ||
async getHolonChildByHolonType( | ||
async loadHolonParent( | ||
data = { | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
Id: "89a935f4-d0ad-44af-b954-558041a76c18", | ||
HolonType: "Moon", | ||
LoadChildren: true, | ||
Recursive: true, | ||
MaxChildDepth: 0, | ||
ContinueOnError: false, | ||
Version: 0, | ||
ProviderType: "HoloOASIS", | ||
SetGlobally: false, | ||
ShowDetailedSettings: true, | ||
AutoFailOverEnabled: "true", | ||
AutoReplicationEnabled: "true", | ||
AutoLoadBalanceEnabled: "true", | ||
AutoFailOverProviders: "MongoDBOASIS, HoloOASOS", | ||
AutoReplicationProviders: "MongoDBOASIS, HoloOASOS", | ||
AutoLoadBalanceProviders: "MongoDBOASIS, HoloOASOS", | ||
WaitForAutoReplicationResult: false, | ||
} | ||
@@ -245,99 +163,22 @@ ) { | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
if (typeof data === "string") { | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holons-for-parent/${data}/all`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonChildByHolonTypeAndSetGlobally( | ||
data = { | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) | ||
return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonChildByHolonTypeAndSetGloballyWithMoreOptions( | ||
data = { | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
autoReplicationMode: "", | ||
autoFailOverMode: "", | ||
autoLoadBalanceMode: "", | ||
autoReplicationProviders: "", | ||
autoFailOverProviders: "", | ||
autoLoadBalanceProviders: "", | ||
waitForAutoReplicationResult: "", | ||
showDetailedSetting: "", | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holon/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}/${data.autoReplicationMode}/${data.autoFailOverMode}/${data.autoLoadBalanceMode}/${data.autoReplicationProviders}/${data.autoFailOverProviders}/${data.autoLoadBalanceProviders}/${data.waitForAutoReplicationResult}/${data.showDetailedSetting}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async loadHolonForParent(data) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "post", | ||
@@ -348,3 +189,3 @@ url: `https://api.oasisplatform.world/api/data/load-holons-for-parent`, | ||
}, | ||
data: JSON.stringify(data) | ||
data: JSON.stringify(data), | ||
}; | ||
@@ -362,135 +203,2 @@ | ||
async getLoadHolonParentByIdAndType(data={ | ||
id: "", | ||
holonType: "" | ||
}) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holons-for-parent/${data.id}/${data.holonType}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonParent( | ||
data = { | ||
id: "", | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holons-for-parent/${data.id}/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonParentAndSetGlobally( | ||
data = { | ||
id: "", | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holons-for-parent/${data.id}/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async getHolonParenteAndSetGloballyWithMoreOptions( | ||
data = { | ||
id: "", | ||
holonType: "", | ||
loadChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
version: 0, | ||
providerType: "", | ||
setGlobally: true, | ||
autoReplicationMode: "", | ||
autoFailOverMode: "", | ||
autoLoadBalanceMode: "", | ||
autoReplicationProviders: "", | ||
autoFailOverProviders: "", | ||
autoLoadBalanceProviders: "", | ||
waitForAutoReplicationResult: "", | ||
showDetailedSetting: "", | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "get", | ||
url: `https://api.oasisplatform.world/api/data/load-holons-for-parent/${data.id}/${data.holonType}/${data.loadChildren}/${data.recursive}/${data.maxChildDepth}/${data.continueOnError}/${data.version}/${data.providerType}/${data.setGlobally}/${data.autoReplicationMode}/${data.autoFailOverMode}/${data.autoLoadBalanceMode}/${data.autoReplicationProviders}/${data.autoFailOverProviders}/${data.autoLoadBalanceProviders}/${data.waitForAutoReplicationResult}/${data.showDetailedSetting}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async saveHolon(data) { | ||
@@ -520,131 +228,2 @@ data = JSON.stringify(data); | ||
async saveHolonByObj(holon="", data) { | ||
data = JSON.stringify(data); | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/save-holon/${holon}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data, | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async saveHolonWithParams( | ||
params = { | ||
saveChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
}, data | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
data = JSON.stringify(data); | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/save-holon/${params.saveChildren}/${params.recursive}/${params.maxChildDepth}/${params.continueOnError}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async saveHolonAndSetGlobally( | ||
params = { | ||
saveChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
providerType: "", | ||
setGlobally: true, | ||
}, data | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
data = JSON.stringify(data); | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/save-holon/${params.saveChildren}/${params.recursive}/${params.maxChildDepth}/${params.continueOnError}/${params.providerType}/${params.setGlobally}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async saveHolonAndSetGloballyWithMoreOptions( | ||
params = { | ||
saveChildren: true, | ||
recursive: true, | ||
maxChildDepth: 0, | ||
continueOnError: true, | ||
providerType: "", | ||
setGlobally: true, | ||
autoReplicationMode: "", | ||
autoFailOverMode: "", | ||
autoLoadBalanceMode: "", | ||
autoReplicationProviders: "", | ||
autoFailOverProviders: "", | ||
autoLoadBalanceProviders: "", | ||
waitForAutoReplicationResult: "", | ||
showDetailedSetting: "", | ||
}, data | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
if (this.token === -1) | ||
return { error: true, data: { message: "You are not logged in!" } }; | ||
data = JSON.stringify(data); | ||
const config = { | ||
method: "post", | ||
url: `https://api.oasisplatform.world/api/data/save-holon/${params.loadChildren}/${params.recursive}/${params.maxChildDepth}/${params.continueOnError}/${params.providerType}/${params.setGlobally}/${params.autoReplicationMode}/${params.autoFailOverMode}/${params.autoLoadBalanceMode}/${params.autoReplicationProviders}/${params.autoFailOverProviders}/${params.autoLoadBalanceProviders}/${params.waitForAutoReplicationResult}/${params.showDetailedSetting}`, | ||
headers: { | ||
Authorization: `Bearer ${this.token.jwtToken}`, | ||
}, | ||
data | ||
}; | ||
return axios(config) | ||
.then(function (response) { | ||
if (response.data.isError) return { error: true, data: response.data }; | ||
else return { error: false, data: response.data }; | ||
}) | ||
.catch(function (error) { | ||
return { error: true, data: error }; | ||
}); | ||
} | ||
async saveHolonOffChain(data) { | ||
@@ -674,6 +253,8 @@ data = JSON.stringify(data); | ||
async deleteHolon(data={ | ||
id: "", | ||
softDelete: true | ||
}) { | ||
async deleteHolon( | ||
data = { | ||
id: "", | ||
softDelete: true, | ||
} | ||
) { | ||
this.token = await this.avatar.callLogin(); | ||
@@ -680,0 +261,0 @@ if (this.token === -1) |
{ | ||
"name": "web4-oasis-api", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A JavaScript proxy for the WEB4 OASIS API. To be used only in the browser.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
85991
12
1160
949