0.0.4 • Published 24 days ago

oute-services-authorized-data-sdk v0.0.4

Weekly downloads
-
License
-
Repository
-
Last release
24 days ago

This module expose helper functions

  • Initialization
  params = {
    url: @server url
    token: @access token
  }
  AuthorizedData = require("oute-services-authorized-data-sdk")
  authorized_data_instance = new AuthorizedData(params)

Cache functions

Core functions

  • Save
  body = {
    "_id": "FRldyxUB1",
    "name": "slack",
    "authorization_id": "FRldyxUB1",
    "request_id": "FRldyxUB1",
    "parent_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "configs": {"token": "test"},
    "state": "ACTIVE"
  }
  await authorized_data_instance.save(body)
  • delete by id
  authorized_data_id = "FRldyxUB1"
  await authorized_data_instance.deleteById(authorized_data_id)
  • get by parent id
  query = {
    parent_id: "q-GmTD5-K"
  }
  await authorized_data_instance.getByParent(query)
  • find one
  query = {
    parent_id: "q-GmTD5-K"
  }
  await authorized_data_instance.findOne(query)
  • map to assets
  body = {
    "authorized_data_ids": ["FRldyxUB1"],
    "workspace_id": "ZzBfJMpfQ",
    "asset_id" : "q-GmTD5-K"
  }
  await authorized_data_instance.mapToAsset(body)
0.0.4

24 days ago

0.0.3

1 month ago

0.0.2

1 month ago

0.0.1

3 months ago