@ibm-cloud/platform-services
Version:
Node.js client library for IBM Cloud Platform Services
785 lines (784 loc) • 89.9 kB
TypeScript
/**
* (C) Copyright IBM Corp. 2025.
*
* 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" />
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
import { AbortSignal, BaseService, UserOptions } from 'ibm-cloud-sdk-core';
/**
* The catalog service manages offerings across geographies as the system of record. The catalog supports a RESTful API
* where users can retrieve information about existing offerings and create, manage, and delete their offerings. Start
* with the base URL and use the endpoints to retrieve metadata about services in the catalog and manage service
* visbility. Depending on the kind of object, the metadata can include information about pricing, provisioning,
* regions, and more. For more information, see the [catalog
* documentation](https://cloud.ibm.com/docs/overview/catalog.html#global-catalog-overview).
*
* API Version: 1.0.3
*/
declare class GlobalCatalogV1 extends BaseService {
static DEFAULT_SERVICE_URL: string;
static DEFAULT_SERVICE_NAME: string;
/*************************
* Factory method
************************/
/**
* Constructs an instance of GlobalCatalogV1 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 {GlobalCatalogV1}
*/
static newInstance(options: UserOptions): GlobalCatalogV1;
/**
* Construct a GlobalCatalogV1 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 {GlobalCatalogV1}
*/
constructor(options: UserOptions);
/*************************
* object
************************/
/**
* Returns parent catalog entries.
*
* Includes key information, such as ID, name, kind, CRN, tags, and provider. This endpoint is ETag enabled.
*
* @param {Object} [params] - The parameters to send to the service.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.include] - A GET call by default returns a basic set of properties. To include other
* properties, you must add this parameter. A wildcard (`*`) includes all properties for an object, for example `GET
* /?include=*`. To include specific metadata fields, separate each field with a colon (:), for example `GET
* /?include=metadata.ui:metadata.pricing`.
* @param {string} [params.q] - Searches the catalog entries for keywords. Add filters to refine your search. A query
* filter, for example, `q=kind:iaas service_name rc:true`, filters entries of kind iaas with
* metadata.service.rc_compatible set to true and have a service name is in their name, display name, or description.
* Valid tags are **kind**:<string>, **tag**:<strging>, **rc**:[true|false], **iam**:[true|false],
* **active**:[true|false], **geo**:<string>, and **price**:<string>.
* @param {string} [params.sortBy] - The field on which the output is sorted. Sorts by default by **name** property.
* Available fields are **name**, **displayname** (overview_ui.display_name), **kind**, **provider** (provider.name),
* **sbsindex** (metadata.ui.side_by_side_index), and the time **created**, and **updated**.
* @param {string} [params.descending] - Sets the sort order. The default is false, which is ascending.
* @param {string} [params.languages] - Return the data strings in a specified language. By default, the strings
* returned are of the language preferred by your browser through the Accept-Language header, which allows an override
* of the header. Languages are specified in standard form, such as `en-us`. To include all languages use a wildcard
* (*).
* @param {boolean} [params.catalog] - Checks to see if a catalog's object is visible, or if it's filtered by service,
* plan, deployment, or region. Use the value `?catalog=true`. If a `200` code is returned, the object is visible. If
* a `403` code is returned, the object is not visible for the user.
* @param {boolean} [params.complete] - Returns all available fields for all languages. Use the value `?complete=true`
* as shortcut for ?include=*&languages=*.
* @param {number} [params.offset] - Useful for pagination, specifies index (origin 0) of first item to return in
* response.
* @param {number} [params.limit] - Useful for pagination, specifies the maximum number of items to return in the
* response.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EntrySearchResult>>}
*/
listCatalogEntries(params?: GlobalCatalogV1.ListCatalogEntriesParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EntrySearchResult>>;
/**
* Create a catalog entry.
*
* The created catalog entry is restricted by default. You must have an administrator or editor role in the scope of
* the provided token. This API will return an ETag that can be used for standard ETag processing, except when depth
* query is used.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.name - Programmatic name for this catalog entry, which must be formatted like a CRN segment.
* See the display name in OverviewUI for a user-readable name.
* @param {string} params.kind - The type of catalog entry which determines the type and shape of the object. Valid GC
* types are buildpack, cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard.
* @param {JsonObject} params.overviewUi - Overview is nested in the top level. The key value pair is
* `[_language_]overview_ui`.
* @param {Image} params.images - Image annotation for this catalog entry. The image is a URL.
* @param {boolean} params.disabled - Boolean value that determines the global visibility for the catalog entry, and
* its children. If it is not enabled, all plans are disabled.
* @param {string[]} params.tags - A searchable list of tags. For example, IBM, 3rd Party, Beta, GA, and Single
* Tenant. Valid values found at https://globalcatalog.test.cloud.ibm.com/search.
* @param {Provider} params.provider - Information related to the provider associated with a catalog entry.
* @param {string} params.id - Catalog entry's unique ID. It's the same across all catalog instances.
* @param {string} [params.parentId] - The ID of the parent catalog entry if it exists.
* @param {boolean} [params.group] - Boolean value that determines whether the catalog entry is a group.
* @param {boolean} [params.active] - Boolean value that describes whether the service is active.
* @param {string} [params.url] - Url of the object.
* @param {ObjectMetadataSet} [params.metadata] - Model used to describe metadata object that can be set.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>}
*/
createCatalogEntry(params: GlobalCatalogV1.CreateCatalogEntryParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>;
/**
* Get a specific catalog object.
*
* This endpoint returns a specific catalog entry using the object's unique identifier, for example
* `/_*service_name*?complete=true`. This endpoint is ETag enabled. This can be used by an unauthenticated user for
* publicly available services.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The catalog entry's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.include] - A GET call by default returns a basic set of properties. To include other
* properties, you must add this parameter. A wildcard (`*`) includes all properties for an object, for example `GET
* /id?include=*`. To include specific metadata fields, separate each field with a colon (:), for example `GET
* /id?include=metadata.ui:metadata.pricing`.
* @param {string} [params.languages] - Return the data strings in the specified language. By default the strings
* returned are of the language preferred by your browser through the Accept-Language header, which allows an override
* of the header. Languages are specified in standard form, such as `en-us`. To include all languages use a wildcard
* (*).
* @param {boolean} [params.complete] - Returns all available fields for all languages. Use the value `?complete=true`
* as shortcut for ?include=*&languages=*.
* @param {number} [params.depth] - Return the children down to the requested depth. Use * to include the entire
* children tree. If there are more children than the maximum permitted an error will be returned. Be judicious with
* this as it can cause a large number of database accesses and can result in a large amount of data returned.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>}
*/
getCatalogEntry(params: GlobalCatalogV1.GetCatalogEntryParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>;
/**
* Update a catalog entry.
*
* Update a catalog entry. The visibility of the catalog entry cannot be modified with this endpoint. You must be an
* administrator or editor in the scope of the provided token. This endpoint is ETag enabled.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} params.name - Programmatic name for this catalog entry, which must be formatted like a CRN segment.
* See the display name in OverviewUI for a user-readable name.
* @param {string} params.kind - The type of catalog entry which determines the type and shape of the object. Valid GC
* types are buildpack, cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard.
* @param {JsonObject} params.overviewUi - Overview is nested in the top level. The key value pair is
* `[_language_]overview_ui`.
* @param {Image} params.images - Image annotation for this catalog entry. The image is a URL.
* @param {boolean} params.disabled - Boolean value that determines the global visibility for the catalog entry, and
* its children. If it is not enabled, all plans are disabled.
* @param {string[]} params.tags - A searchable list of tags. For example, IBM, 3rd Party, Beta, GA, and Single
* Tenant. Valid values found at https://globalcatalog.test.cloud.ibm.com/search.
* @param {Provider} params.provider - Information related to the provider associated with a catalog entry.
* @param {string} [params.parentId] - The ID of the parent catalog entry if it exists.
* @param {boolean} [params.group] - Boolean value that determines whether the catalog entry is a group.
* @param {boolean} [params.active] - Boolean value that describes whether the service is active.
* @param {string} [params.url] - Url of the object.
* @param {ObjectMetadataSet} [params.metadata] - Model used to describe metadata object that can be set.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.move] - Reparenting object. In the body set the parent_id to a different parent. Or remove
* the parent_id field to reparent to the root of the catalog. If this is not set to 'true' then changing the
* parent_id in the body of the request will not be permitted. If this is 'true' and no change to parent_id then this
* is also error. This is to prevent accidental changing of parent.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>}
*/
updateCatalogEntry(params: GlobalCatalogV1.UpdateCatalogEntryParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.CatalogEntry>>;
/**
* Delete a catalog entry.
*
* Delete a catalog entry. This will archive the catalog entry for a minimum of two weeks. While archived, it can be
* restored using the PUT restore API. After two weeks, it will be deleted and cannot be restored. You must have
* administrator role in the scope of the provided token to modify it. This endpoint is ETag enabled.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {boolean} [params.force] - This will cause entry to be deleted fully. By default it is archived for two
* weeks, so that it can be restored if necessary.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>}
*/
deleteCatalogEntry(params: GlobalCatalogV1.DeleteCatalogEntryParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>;
/**
* Get child catalog entries of a specific kind.
*
* Fetch child catalog entries for a catalog entry with a specific id. This endpoint is ETag enabled. This can be used
* by an unauthenticated user for publicly available services.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The parent catalog entry's ID.
* @param {string} params.kind - The **kind** of child catalog entries to search for. A wildcard (*) includes all
* child catalog entries for all kinds, for example `GET /service_name/_*`.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.include] - A colon (:) separated list of properties to include. A GET call by defaults
* return a limited set of properties. To include other properties, you must add the include parameter. A wildcard
* (*) includes all properties.
* @param {string} [params.q] - A query filter, for example, `q=kind:iaas IBM` will filter on entries of **kind**
* iaas that has `IBM` in their name, display name, or description.
* @param {string} [params.sortBy] - The field on which to sort the output. By default by name. Available fields are
* **name**, **kind**, and **provider**.
* @param {string} [params.descending] - The sort order. The default is false, which is ascending.
* @param {string} [params.languages] - Return the data strings in the specified language. By default the strings
* returned are of the language preferred by your browser through the Accept-Language header. This allows an override
* of the header. Languages are specified in standard form, such as `en-us`. To include all languages use the wildcard
* (*).
* @param {boolean} [params.complete] - Use the value `?complete=true` as shortcut for ?include=*&languages=*.
* @param {number} [params.offset] - Useful for pagination, specifies index (origin 0) of first item to return in
* response.
* @param {number} [params.limit] - Useful for pagination, specifies the maximum number of items to return in the
* response.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EntrySearchResult>>}
*/
getChildObjects(params: GlobalCatalogV1.GetChildObjectsParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EntrySearchResult>>;
/**
* Restore archived catalog entry.
*
* Restore an archived catalog entry. You must have an administrator role in the scope of the provided token.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The catalog entry's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>}
*/
restoreCatalogEntry(params: GlobalCatalogV1.RestoreCatalogEntryParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>;
/*************************
* visibility
************************/
/**
* Get the visibility constraints for an object.
*
* This endpoint returns the visibility rules for this object. Overall visibility is determined by the parent objects
* and any further restrictions on this object. You must have an administrator role in the scope of the provided
* token. This endpoint is ETag enabled.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.Visibility>>}
*/
getVisibility(params: GlobalCatalogV1.GetVisibilityParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.Visibility>>;
/**
* Update visibility.
*
* Update an Object's Visibility. You must have an administrator role in the scope of the provided token. This
* endpoint is ETag enabled.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.restrictions] - This controls the overall visibility. It is an enum of *public*,
* *nonibm_only*, *ibm_only*, and *private*. public means it is visible to all. nonibm_only means it is visible to all
* except IBM unless their account is explicitly included, ibm_only means it is visible to all IBM unless their
* account is explicitly excluded. private means it is visible only to the included accounts.
* @param {boolean} [params.extendable] - Allows the visibility to be extendable.
* @param {VisibilityDetail} [params.include] - Visibility details related to a catalog entry.
* @param {VisibilityDetail} [params.exclude] - Visibility details related to a catalog entry.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>}
*/
updateVisibility(params: GlobalCatalogV1.UpdateVisibilityParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>;
/*************************
* pricing
************************/
/**
* Get the pricing for an object.
*
* This endpoint returns the pricing for an object. Static pricing is defined in the catalog. Dynamic pricing is
* stored in IBM Cloud Pricing Catalog. This can be used by an unauthenticated user for publicly available services.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.deploymentRegion] - Specify a region to retrieve plan pricing for a global deployment. The
* value must match an entry in the `deployment_regions` list.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.PricingGet>>}
*/
getPricing(params: GlobalCatalogV1.GetPricingParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.PricingGet>>;
/**
* Get the pricing deployments for a plan.
*
* This endpoint returns the deployment pricing for a plan. For a plan it returns a pricing for each visible child
* deployment object. Static pricing is defined in the catalog. Dynamic pricing is stored in IBM Cloud Pricing
* Catalog. This can be used by an unauthenticated user for publicly available services.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.PricingSearchResult>>}
*/
getPricingDeployments(params: GlobalCatalogV1.GetPricingDeploymentsParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.PricingSearchResult>>;
/*************************
* audit
************************/
/**
* Get the audit logs for an object.
*
* This endpoint returns the audit logs for an object. Only administrators and editors can get logs.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.id - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {string} [params.ascending] - Sets the sort order. False is descending.
* @param {string} [params.startat] - Starting time for the logs. If it's descending then the entries will be equal or
* earlier. The default is latest. For ascending it will entries equal or later. The default is earliest. It can be
* either a number or a string. If a number then it is in the format of Unix timestamps. If it is a string then it is
* a date in the format YYYY-MM-DDTHH:MM:SSZ and the time is UTC. The T and the Z are required. For example:
* 2017-12-24T12:00:00Z for Noon UTC on Dec 24, 2017.
* @param {number} [params.offset] - Count of number of log entries to skip before returning logs. The default is
* zero.
* @param {number} [params.limit] - Count of number of entries to return. The default is fifty. The maximum value is
* two hundred.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.AuditSearchResult>>}
*/
getAuditLogs(params: GlobalCatalogV1.GetAuditLogsParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.AuditSearchResult>>;
/*************************
* artifact
************************/
/**
* Get artifacts.
*
* This endpoint returns a list of artifacts for an object.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.objectId - The object's unique ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.Artifacts>>}
*/
listArtifacts(params: GlobalCatalogV1.ListArtifactsParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.Artifacts>>;
/**
* Get artifact.
*
* This endpoint returns the binary of an artifact.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.objectId - The object's unique ID.
* @param {string} params.artifactId - The artifact's ID.
* @param {string} [params.accept] - The type of the response: *_/_*.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<NodeJS.ReadableStream>>}
*/
getArtifact(params: GlobalCatalogV1.GetArtifactParams): Promise<GlobalCatalogV1.Response<NodeJS.ReadableStream>>;
/**
* Upload artifact.
*
* This endpoint uploads the binary for an artifact. Only administrators and editors can upload artifacts.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.objectId - The object's unique ID.
* @param {string} params.artifactId - The artifact's ID.
* @param {NodeJS.ReadableStream | Buffer} [params.artifact] -
* @param {string} [params.contentType] - The type of the input.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>}
*/
uploadArtifact(params: GlobalCatalogV1.UploadArtifactParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>;
/**
* Delete artifact.
*
* This endpoint deletes an artifact. Only administrators and editors can delete artifacts.
*
* @param {Object} params - The parameters to send to the service.
* @param {string} params.objectId - The object's unique ID.
* @param {string} params.artifactId - The artifact's ID.
* @param {string} [params.account] - This changes the scope of the request regardless of the authorization header.
* Example scopes are `account` and `global`. `account=global` is reqired if operating with a service ID that has a
* global admin policy, for example `GET /?account=global`.
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
* @returns {Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>}
*/
deleteArtifact(params: GlobalCatalogV1.DeleteArtifactParams): Promise<GlobalCatalogV1.Response<GlobalCatalogV1.EmptyObject>>;
}
/*************************
* interfaces
************************/
declare namespace GlobalCatalogV1 {
/** 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 `listCatalogEntries` operation. */
export interface ListCatalogEntriesParams extends DefaultParams {
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** A GET call by default returns a basic set of properties. To include other properties, you must add this
* parameter. A wildcard (`*`) includes all properties for an object, for example `GET /?include=*`. To include
* specific metadata fields, separate each field with a colon (:), for example `GET
* /?include=metadata.ui:metadata.pricing`.
*/
include?: string;
/** Searches the catalog entries for keywords. Add filters to refine your search. A query filter, for example,
* `q=kind:iaas service_name rc:true`, filters entries of kind iaas with metadata.service.rc_compatible set to true
* and have a service name is in their name, display name, or description. Valid tags are **kind**:<string>,
* **tag**:<strging>, **rc**:[true|false], **iam**:[true|false], **active**:[true|false], **geo**:<string>, and
* **price**:<string>.
*/
q?: string;
/** The field on which the output is sorted. Sorts by default by **name** property. Available fields are
* **name**, **displayname** (overview_ui.display_name), **kind**, **provider** (provider.name), **sbsindex**
* (metadata.ui.side_by_side_index), and the time **created**, and **updated**.
*/
sortBy?: string;
/** Sets the sort order. The default is false, which is ascending. */
descending?: string;
/** Return the data strings in a specified language. By default, the strings returned are of the language
* preferred by your browser through the Accept-Language header, which allows an override of the header. Languages
* are specified in standard form, such as `en-us`. To include all languages use a wildcard (*).
*/
languages?: string;
/** Checks to see if a catalog's object is visible, or if it's filtered by service, plan, deployment, or region.
* Use the value `?catalog=true`. If a `200` code is returned, the object is visible. If a `403` code is returned,
* the object is not visible for the user.
*/
catalog?: boolean;
/** Returns all available fields for all languages. Use the value `?complete=true` as shortcut for
* ?include=*&languages=*.
*/
complete?: boolean;
/** Useful for pagination, specifies index (origin 0) of first item to return in response. */
offset?: number;
/** Useful for pagination, specifies the maximum number of items to return in the response. */
limit?: number;
}
/** Parameters for the `createCatalogEntry` operation. */
export interface CreateCatalogEntryParams extends DefaultParams {
/** Programmatic name for this catalog entry, which must be formatted like a CRN segment. See the display name
* in OverviewUI for a user-readable name.
*/
name: string;
/** The type of catalog entry which determines the type and shape of the object. Valid GC types are buildpack,
* cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard.
*/
kind: CreateCatalogEntryConstants.Kind | string;
/** Overview is nested in the top level. The key value pair is `[_language_]overview_ui`. */
overviewUi: JsonObject;
/** Image annotation for this catalog entry. The image is a URL. */
images: Image;
/** Boolean value that determines the global visibility for the catalog entry, and its children. If it is not
* enabled, all plans are disabled.
*/
disabled: boolean;
/** A searchable list of tags. For example, IBM, 3rd Party, Beta, GA, and Single Tenant. Valid values found at
* https://globalcatalog.test.cloud.ibm.com/search.
*/
tags: string[];
/** Information related to the provider associated with a catalog entry. */
provider: Provider;
/** Catalog entry's unique ID. It's the same across all catalog instances. */
id: string;
/** The ID of the parent catalog entry if it exists. */
parentId?: string;
/** Boolean value that determines whether the catalog entry is a group. */
group?: boolean;
/** Boolean value that describes whether the service is active. */
active?: boolean;
/** Url of the object. */
url?: string;
/** Model used to describe metadata object that can be set. */
metadata?: ObjectMetadataSet;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
}
/** Constants for the `createCatalogEntry` operation. */
export namespace CreateCatalogEntryConstants {
/** The type of catalog entry which determines the type and shape of the object. Valid GC types are buildpack, cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard. */
enum Kind {
SERVICE = "service",
TEMPLATE = "template",
DASHBOARD = "dashboard"
}
}
/** Parameters for the `getCatalogEntry` operation. */
export interface GetCatalogEntryParams extends DefaultParams {
/** The catalog entry's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** A GET call by default returns a basic set of properties. To include other properties, you must add this
* parameter. A wildcard (`*`) includes all properties for an object, for example `GET /id?include=*`. To include
* specific metadata fields, separate each field with a colon (:), for example `GET
* /id?include=metadata.ui:metadata.pricing`.
*/
include?: string;
/** Return the data strings in the specified language. By default the strings returned are of the language
* preferred by your browser through the Accept-Language header, which allows an override of the header. Languages
* are specified in standard form, such as `en-us`. To include all languages use a wildcard (*).
*/
languages?: string;
/** Returns all available fields for all languages. Use the value `?complete=true` as shortcut for
* ?include=*&languages=*.
*/
complete?: boolean;
/** Return the children down to the requested depth. Use * to include the entire children tree. If there are
* more children than the maximum permitted an error will be returned. Be judicious with this as it can cause a
* large number of database accesses and can result in a large amount of data returned.
*/
depth?: number;
}
/** Parameters for the `updateCatalogEntry` operation. */
export interface UpdateCatalogEntryParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** Programmatic name for this catalog entry, which must be formatted like a CRN segment. See the display name
* in OverviewUI for a user-readable name.
*/
name: string;
/** The type of catalog entry which determines the type and shape of the object. Valid GC types are buildpack,
* cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard.
*/
kind: UpdateCatalogEntryConstants.Kind | string;
/** Overview is nested in the top level. The key value pair is `[_language_]overview_ui`. */
overviewUi: JsonObject;
/** Image annotation for this catalog entry. The image is a URL. */
images: Image;
/** Boolean value that determines the global visibility for the catalog entry, and its children. If it is not
* enabled, all plans are disabled.
*/
disabled: boolean;
/** A searchable list of tags. For example, IBM, 3rd Party, Beta, GA, and Single Tenant. Valid values found at
* https://globalcatalog.test.cloud.ibm.com/search.
*/
tags: string[];
/** Information related to the provider associated with a catalog entry. */
provider: Provider;
/** The ID of the parent catalog entry if it exists. */
parentId?: string;
/** Boolean value that determines whether the catalog entry is a group. */
group?: boolean;
/** Boolean value that describes whether the service is active. */
active?: boolean;
/** Url of the object. */
url?: string;
/** Model used to describe metadata object that can be set. */
metadata?: ObjectMetadataSet;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** Reparenting object. In the body set the parent_id to a different parent. Or remove the parent_id field to
* reparent to the root of the catalog. If this is not set to 'true' then changing the parent_id in the body of the
* request will not be permitted. If this is 'true' and no change to parent_id then this is also error. This is to
* prevent accidental changing of parent.
*/
move?: string;
}
/** Constants for the `updateCatalogEntry` operation. */
export namespace UpdateCatalogEntryConstants {
/** The type of catalog entry which determines the type and shape of the object. Valid GC types are buildpack, cname, dataset, geography, iaas, platform_service, runtime, service, template, ui-dashboard. */
enum Kind {
SERVICE = "service",
TEMPLATE = "template",
DASHBOARD = "dashboard"
}
}
/** Parameters for the `deleteCatalogEntry` operation. */
export interface DeleteCatalogEntryParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** This will cause entry to be deleted fully. By default it is archived for two weeks, so that it can be
* restored if necessary.
*/
force?: boolean;
}
/** Parameters for the `getChildObjects` operation. */
export interface GetChildObjectsParams extends DefaultParams {
/** The parent catalog entry's ID. */
id: string;
/** The **kind** of child catalog entries to search for. A wildcard (*) includes all child catalog entries for
* all kinds, for example `GET /service_name/_*`.
*/
kind: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** A colon (:) separated list of properties to include. A GET call by defaults return a limited set of
* properties. To include other properties, you must add the include parameter. A wildcard (*) includes all
* properties.
*/
include?: string;
/** A query filter, for example, `q=kind:iaas IBM` will filter on entries of **kind** iaas that has `IBM` in
* their name, display name, or description.
*/
q?: string;
/** The field on which to sort the output. By default by name. Available fields are **name**, **kind**, and
* **provider**.
*/
sortBy?: string;
/** The sort order. The default is false, which is ascending. */
descending?: string;
/** Return the data strings in the specified language. By default the strings returned are of the language
* preferred by your browser through the Accept-Language header. This allows an override of the header. Languages
* are specified in standard form, such as `en-us`. To include all languages use the wildcard (*).
*/
languages?: string;
/** Use the value `?complete=true` as shortcut for ?include=*&languages=*. */
complete?: boolean;
/** Useful for pagination, specifies index (origin 0) of first item to return in response. */
offset?: number;
/** Useful for pagination, specifies the maximum number of items to return in the response. */
limit?: number;
}
/** Parameters for the `restoreCatalogEntry` operation. */
export interface RestoreCatalogEntryParams extends DefaultParams {
/** The catalog entry's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
}
/** Parameters for the `getVisibility` operation. */
export interface GetVisibilityParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
}
/** Parameters for the `updateVisibility` operation. */
export interface UpdateVisibilityParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This controls the overall visibility. It is an enum of *public*, *nonibm_only*, *ibm_only*, and *private*.
* public means it is visible to all. nonibm_only means it is visible to all except IBM unless their account is
* explicitly included, ibm_only means it is visible to all IBM unless their account is explicitly excluded.
* private means it is visible only to the included accounts.
*/
restrictions?: string;
/** Allows the visibility to be extendable. */
extendable?: boolean;
/** Visibility details related to a catalog entry. */
include?: VisibilityDetail;
/** Visibility details related to a catalog entry. */
exclude?: VisibilityDetail;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
}
/** Parameters for the `getPricing` operation. */
export interface GetPricingParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** Specify a region to retrieve plan pricing for a global deployment. The value must match an entry in the
* `deployment_regions` list.
*/
deploymentRegion?: string;
}
/** Parameters for the `getPricingDeployments` operation. */
export interface GetPricingDeploymentsParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
}
/** Parameters for the `getAuditLogs` operation. */
export interface GetAuditLogsParams extends DefaultParams {
/** The object's unique ID. */
id: string;
/** This changes the scope of the request regardless of the authorization header. Example scopes are `account`
* and `global`. `account=global` is reqired if operating with a service ID that has a global admin policy, for
* example `GET /?account=global`.
*/
account?: string;
/** Sets the sort order. False is descending. */
ascending?: string;
/** Starting time for the logs. If it's descending then the entries will be equal or earlier. The default is
* latest. For ascending it will entries equal or later. The default is earliest. It can be either a number or a
* string. If a number then it is in the format of Unix timestamps. If it is a string then it is a date in the
* format YYYY-MM-DDTHH:MM:SSZ and the time is UTC. The T and the Z are required. For example:
* 2017-12-24T12:00:00Z for Noon UTC on Dec 24, 2017.
*/
startat?: string;
/** Count of number of log entries to skip before returning logs. The default is zero. */