npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dhicn/domain-paas-sdk-ts

v4.2.4

Published

<h1 align="center"> Domain-PaaS-SDK for Typescript </h1> <div align="center">

Downloads

983

Readme

Version License

这是一个DHI 中国 业务中台 的 Client SDK 开发辅助包,帮您快速通过我们的业务中台构建应用。

🔆 功能清单

  • [x] identity-service 用户认证管理服务
  • [x] scenario-service 方案管理管理服务
  • [ ] message-service 消息服务
  • [ ] document-service 文档服务
  • [x] scenario-compute-service 方案计算服务
  • [x] model-driver-service 模型计算服务
  • [x] result-analysis-service 结果分析服务
  • [x] model-information-service 模型分析服务
  • [x] model-configuration-service 模型计算服务
  • [ ] text-search-service 全文搜索服务
  • [ ] device-management-service 资产设备服务
  • [x] accident-management-service 事故管理服务
  • [x] digital-twin-service 模型映射服务
  • [x] iot-service IoT 服务
  • [x] wwtp-domain-main-bus-service 污水业务中台基础服务
  • [x] wwtp-domain-infrastructure-service 污水业务中台邻域服务
  • [x] wd-domain-service 供水业务中台邻域服务
  • [x] log-service 日志服务
  • [x] data-center-service 数据中台服务
  • [x] plugin-service 插件服务
  • [x] file-service 文件服务

🌏 第三方依赖

axios axios qs axios

📦 安装

$ npm install @dhicn/domain-paas-sdk-ts

🔨 使用

需要先联系我们获取的 DHI 中国 业务中台 使用许可和认证信息。

基础使用

import { Helper, IdentityServiceApi } from '@dhicn/domain-paas-sdk-ts'

export class ApiHelperExtend extends Helper.ApiHelper {
  userApi: IdentityServiceApi.UsersMnangerApi
  scenarioGroup: ScenarioServiceApi.ScenarioGroupApi
  // ...自定义需要使用API
  constructor() {
    super()
    // 在构造函数中实例化对应API,需要传入API访问前缀和axios实例
    this.userApi = new IdentityServiceApi.UsersMnangerApi(
      DomainServiceUrlMap.identity,
      this.axiosInstance,
    )
    this.scenarioGroup = new ScenarioServiceApi.ScenarioGroupApi(
      DomainServiceUrlMap.scenario,
      this.axiosInstance,
    )
    // ...这里可以对 AxiosInstance 进行自行修改
  }
}
const apiHelper = new ApiHelperExtend()
// 根据业务中台使用许可
const { tenantId, client_id, grant_type, client_secret, username, password } = tokenParas
// 登录,登录成功后自动设置Token和TenantId
await apiHelper.logIn(tenantId, client_id, grant_type, client_secret, username, password)
// 登录成功后可以,使用其他API,例如通过Token获取登录用户-权限信息
await apiHelper.userApi.apiAppUsersMnangerUserPersGet()

分文件引用

import { ApiHelper, DomainServiceUrlMap } from '@dhicn/domain-paas-sdk-ts/sdk-helper'
import { UsersMnangerApi } from '@dhicn/domain-paas-sdk-ts/identity-service'
import { ScenarioGroupApi } from '@dhicn/domain-paas-sdk-ts/scenario-service'

export class ApiHelperExtend extends Helper.ApiHelper {
  userApi: IdentityServiceApi.UsersMnangerApi
  scenarioGroup: ScenarioServiceApi.ScenarioGroupApi
  // ...自定义需要使用API
  constructor() {
    super()
    // 在构造函数中实例化对应API,需要传入API访问前缀和axios实例
    this.userApi = new IdentityServiceApi.UsersMnangerApi(
      DomainServiceUrlMap.identity,
      this.axiosInstance,
    )
    this.scenarioGroup = new ScenarioServiceApi.ScenarioGroupApi(
      DomainServiceUrlMap.scenario,
      this.axiosInstance,
    )
    // ...这里可以对 AxiosInstance 进行自行修改
  }
}