UNPKG

@mindconnect/mindconnect-nodejs

Version:

NodeJS Library for Siemens Insights Hub Connectivity - TypeScript SDK for Insights Hub and Industrial IoT - Command Line Interface - Insights Hub Development Proxy (Siemens Insights Hub was formerly known as MindSphere)

44 lines (43 loc) 1.69 kB
import { TokenRotation } from "../../mindconnect-base"; import { AppCredentials, ServiceCrendtials } from "./credentials"; export declare abstract class SdkClient { GetToken(): Promise<string>; RenewToken(): Promise<boolean>; GetGateway(): string; GetTenant(): string; GetUserTenant(): string | undefined; protected _authenticator: TokenRotation; HttpAction({ verb, gateway, baseUrl, authorization, body, message, octetStream, multiPartFormData, additionalHeaders, noResponse, rawResponse, returnHeaders, ignoreCodes, }: { verb: "GET" | "POST" | "PATCH" | "PUT" | "DELETE"; gateway: string; baseUrl: string; authorization: string; body?: Object; message?: string; octetStream?: boolean; multiPartFormData?: boolean; additionalHeaders?: Object; noResponse?: boolean; rawResponse?: boolean; returnHeaders?: boolean; ignoreCodes?: number[]; }): Promise<Object | undefined>; /** * * Creates a client for MinSphere API * * @param {(TokenRotation | ServiceCrendtials | AppCredentials)} [credentialsOrAuthorizer] * * you can pass either an instance an Authorizer: * UserAuth, BrowserAuth, CredentialsAuth, TokenManagerAuth or MindConnectAgent * * or a set of Credentials: * ServiceCredentials or AppCredentials * * implement the TokenRotation interface if you want to provide your own authorizer. * * The default constructor uses frontend authorization. * * @memberOf SdkClient */ constructor(credentialsOrAuthorizer?: TokenRotation | ServiceCrendtials | AppCredentials); }