0.0.39 • Published 2 years ago
oute-services-variable-sdk v0.0.39
This module expose helper functions
- Initialization
var params = {
url: @server url
token: @access token
}
var Variable = require("oute-services-variable-sdk")
var variable_instance = new Variable(params)Cache functions
- transformed variable to state
variables = {LOCAL: []}
environment_id = null
variable_instance.transformedToState(variables, environment_id)Core functions
- Save
body = {
"_id": "ZX7c062wq",
"name": "test2",
"data_type": "STRING",
"mode": "LOCAL",
"default" : "test",
"state": "ACTIVE",
"workspace_id": "work",
"asset_id" : "q-GmTD5-K",
"parent_id" : "q-GmTD5-K",
"env":{
"default": "test1"
}
}
await variable_instance.save(body)- Delete
variable_id = "ZX7c062wq"
await variable_instance.delete(variable_id)- Get by parent/project id
parent_id = "q-GmTD5-K"
asset_cache_obj = {
"_id": "test@gofo.app|ZzBfJMpfQ",
"user_id": "test@gofo.app",
"workspace_id": "ZzBfJMpfQ",
"workspace": {
"_id": "ZzBfJMpfQ",
"name": "test"
},
"user": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
"email_id": "test@gofo.app"
},
"folders": [
{
"_id": "q-GmTD5-K",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
},
"is_favorite": false,
"childs": [
{
"_id": "MyTbZOnfH",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
},
"is_favorite": false
}
]
}
],
"files": [
{
"_id": "q-GmTD5-K",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test"
},
"is_favorite": false,
"childs": [
{
"_id": "MyTbZOnfH",
"owner_id": "test@gofo.app",
"name": "test form",
"owner": {
"_id": "test@gofo.app",
"name": "test",
"src": "test",
},
"is_favorite": false
}
]
}
],
"recent": [],
"recommendation": [],
"shared": [],
"favourites": [],
"trash": [],
"checksum": "68fe37b0-9101-49e8-b8b7-35e7c89b0759",
"created_at": "2023-07-11T18:25:53.863Z",
"updated_at": "2023-07-12T11:20:44.818Z"
}
await a.getByParent(parent_id, asset_cache_obj)- Save
body = {
"variable_ids": ["ZX7c062wq"],
"workspace_id": "ZzBfJMpfQ",
"asset_id" : "q-GmTD5-K"
}
await variable_instance.mapToAsset(body)0.0.21
2 years ago
0.0.22
2 years ago
0.0.23
2 years ago
0.0.24
2 years ago
0.0.25
2 years ago
0.0.37
2 years ago
0.0.38
2 years ago
0.0.39
2 years ago
0.0.30
2 years ago
0.0.31
2 years ago
0.0.32
2 years ago
0.0.33
2 years ago
0.0.34
2 years ago
0.0.35
2 years ago
0.0.36
2 years ago
0.0.26
2 years ago
0.0.27
2 years ago
0.0.28
2 years ago
0.0.29
2 years ago
0.0.20
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
3 years ago
0.0.11
3 years ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago