@ibm-cloud/platform-services
Version:
Node.js client library for IBM Cloud Platform Services
127 lines (126 loc) • 4.7 kB
TypeScript
/**
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types="node" />
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
import { AbortSignal, BaseService, UserOptions } from 'ibm-cloud-sdk-core';
/**
* The Account Management API allows for the management of Account
*
* API Version: 4.0.0
*/
declare class AccountManagementV4 extends BaseService {
static DEFAULT_SERVICE_URL: string;
static DEFAULT_SERVICE_NAME: string;
/*************************
* Factory method
************************/
/**
* Constructs an instance of AccountManagementV4 with passed in options and external configuration.
*
* @param {UserOptions} [options] - The parameters to send to the service.
* @param {string} [options.serviceName] - The name of the service to configure
* @param {Authenticator} [options.authenticator] - The Authenticator object used to authenticate requests to the service
* @param {string} [options.serviceUrl] - The base URL for the service
* @returns {AccountManagementV4}
*/
static newInstance(options: UserOptions): AccountManagementV4;
/**
* Construct a AccountManagementV4 object.
*
* @param {Object} options - Options for the service.
* @param {string} [options.serviceUrl] - The base URL for the service
* @param {OutgoingHttpHeaders} [options.headers] - Default headers that shall be included with every request to the service.
* @param {Authenticator} options.authenticator - The Authenticator object used to authenticate requests to the service
* @constructor
* @returns {AccountManagementV4}
*/
constructor(options: UserOptions);
/*************************
* default
************************/
/**
* Get Account by Account ID.
*
* Returns the details of an account.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.accountId - The unique identifier of the account you want to retrieve.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<AccountManagementV4.Response<AccountManagementV4.AccountResponse>>}
*/
getAccount(params: AccountManagementV4.GetAccountParams): Promise<AccountManagementV4.Response<AccountManagementV4.AccountResponse>>;
}
/*************************
* interfaces
************************/
declare namespace AccountManagementV4 {
/** An operation response. */
export interface Response<T = any> {
result: T;
status: number;
statusText: string;
headers: IncomingHttpHeaders;
}
/** The callback for a service request. */
export type Callback<T> = (error: any, response?: Response<T>) => void;
/** The body of a service request that returns no response data. */
export interface EmptyObject {
}
/** A standard JS object, defined to avoid the limitations of `Object` and `object` */
export interface JsonObject {
[key: string]: any;
}
/*************************
* request interfaces
************************/
interface DefaultParams {
headers?: OutgoingHttpHeaders;
signal?: AbortSignal;
}
/** Parameters for the `getAccount` operation. */
export interface GetAccountParams extends DefaultParams {
/** The unique identifier of the account you want to retrieve. */
accountId: string;
}
/*************************
* model interfaces
************************/
/**
* AccountResponseTraits.
*/
export interface AccountResponseTraits {
eu_supported: boolean;
poc: boolean;
hippa: boolean;
}
/**
* AccountResponse.
*/
export interface AccountResponse {
name: string;
id: string;
owner: string;
owner_userid: string;
owner_iamid: string;
type: string;
status: string;
linked_softlayer_account: string;
team_directory_enabled: boolean;
traits: AccountResponseTraits;
}
export {};
}
export = AccountManagementV4;