0.0.3 • Published 1 month ago

oute-services-mail-sdk v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
1 month ago

This module expose helper functions

  • Initialization
  params = {
    url: @server url
    token: @access token
  }
  Mail = require("oute-services-mail-sdk")
  mail_instance = new Mail(params)

Cache functions

Core functions

  • Save
  body = {
    "asset_id": "q-GmTD5-K",
    "workspace_id": "ZzBfJMpfQ",
    "json": {
        "a": "test"
    },
    "html": "<html><body>hhhh</body></html>",
    "name" : "email template",
    "project_id" : "zZ3Fgzk1T",
    "type" : "FILE",
    "annotation" : "EMAIL_TEMPLATE",
    "user_id" : "test@gofo.app",
    "share_to_all": true
  }
  await mail_instance.save(body)
  • Find One
  query = {
    "_id": "UvuPE2PGn"
  }
  await mail_instance.findOne(query)
  • get by project id
  query = {
    "project_id": "zZ3Fgzk1T"
  }
  await mail_instance.getByProjectId(query)
0.0.3

1 month ago

0.0.2

1 month ago

0.0.1

2 months ago