import { APIResource } from "../../core/resource.mjs"; import * as ComponentsAPI from "./components.mjs"; import { ComponentDeployParams, ComponentDeployResponse, ComponentValidateParams, ComponentValidateResponse, Components } from "./components.mjs"; import * as DeploymentRunsAPI from "./deployment-runs.mjs"; import { DeploymentRunCreateParams, DeploymentRunCreateResponse, DeploymentRunGetResponse, DeploymentRuns } from "./deployment-runs.mjs"; import * as SchemaAPI from "./schema.mjs"; import { Schema, SchemaGetParams, SchemaGetResponse } from "./schema.mjs"; import * as TypesAPI from "./types.mjs"; import { TypeListResponse, Types } from "./types.mjs"; import * as ValidationRunsAPI from "./validation-runs.mjs"; import { ValidationRunCreateParams, ValidationRunCreateResponse, ValidationRunGetResponse, ValidationRuns } from "./validation-runs.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Custom objects defined by the company */ export declare class Metadata extends APIResource { types: TypesAPI.Types; schema: SchemaAPI.Schema; components: ComponentsAPI.Components; validationRuns: ValidationRunsAPI.ValidationRuns; deploymentRuns: DeploymentRunsAPI.DeploymentRuns; /** * Extract the company's selectable metadata components, optionally filtered by a * search query. Unreadable dependencies are omitted. * * Requires the Metadata entitlement. * * @example SDK usage * ```ts * const response = await client.metadata.extract(); * ``` * * @example HTTP * Representative request and response shapes. * ``` * GET /metadata/extract/?q=q&limit=1 HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "root_components": [ * { * "name": "string", * "identifier": {} * } * ], * "component_configs": [ * { * "type": "string" * } * ], * "install_order": [ * {} * ], * "dependency_graph": {}, * "external_managed_dependencies": [ * {} * ], * "context_complete": false, * "context_warnings": [ * "string" * ] * } * ``` */ extract(query?: MetadataExtractParams | null | undefined, options?: RequestOptions): APIPromise; /** * Extract exact metadata components and their readable dependency closure. * Requested components that cannot be read return 403; unreadable dependencies are * omitted. * * Requires the Metadata entitlement. * * @example SDK usage * ```ts * const response = await client.metadata.extractByIdentifiers( * { identifiers: [{ foo: 'bar' }] }, * ); * ``` * * @example HTTP * Representative request and response shapes. * ``` * POST /metadata/extract/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "identifiers": [ * { * "foo": "bar" * } * ] * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "component_configs": [ * { * "type": "string" * } * ], * "install_order": [ * {} * ], * "external_managed_dependencies": [ * {} * ] * } * ``` */ extractByIdentifiers(body: MetadataExtractByIdentifiersParams, options?: RequestOptions): APIPromise; } export interface MetadataExtractResponse { /** * Readable component configs for the selected roots. Dependencies the caller * cannot read are omitted, so the result may not be deployable as-is. */ component_configs: Array; /** * Serialized dependency graph for the extracted package. */ dependency_graph: { [key: string]: unknown; }; /** * Topological install order for the extracted package. */ install_order: Array<{ [key: string]: unknown; }>; /** * Components selected as extraction roots. */ root_components: Array; /** * For search-backed extraction, whether contextual expansion completed without * warnings or unreadable components being omitted. */ context_complete?: boolean; /** * Warnings from search-backed contextual expansion. */ context_warnings?: Array; external_managed_dependencies?: Array<{ [key: string]: unknown; }>; [k: string]: unknown; } export declare namespace MetadataExtractResponse { /** * A metadata component config. The `type` field selects the concrete component * schema. Fetch type-specific fields from GET /metadata/schema/?type=. */ interface ComponentConfig { /** * Metadata component type, such as CUSTOM_OBJECT or CUSTOM_OBJECT_FIELD. */ type: string; [k: string]: unknown; } /** * Selectable package root returned by metadata extraction. */ interface RootComponent { /** * Identifier for the selected component. */ identifier?: { [key: string]: unknown; }; /** * Display name for the selectable component. */ name?: string; [k: string]: unknown; } } export interface MetadataExtractByIdentifiersResponse { /** * Readable component configs for the requested roots. Unreadable dependencies are * omitted, so the result may not be deployable as-is. */ component_configs: Array; external_managed_dependencies: Array<{ [key: string]: unknown; }>; /** * Topological install order for the extracted package. */ install_order: Array<{ [key: string]: unknown; }>; } export declare namespace MetadataExtractByIdentifiersResponse { /** * A metadata component config. The `type` field selects the concrete component * schema. Fetch type-specific fields from GET /metadata/schema/?type=. */ interface ComponentConfig { /** * Metadata component type, such as CUSTOM_OBJECT or CUSTOM_OBJECT_FIELD. */ type: string; [k: string]: unknown; } } export interface MetadataExtractParams { /** * Maximum search results to return when q is provided. */ limit?: number; /** * Optional text search over selectable components. */ q?: string; } export interface MetadataExtractByIdentifiersParams { identifiers: Array<{ [key: string]: unknown; }>; } export declare namespace Metadata { export { type MetadataExtractResponse as MetadataExtractResponse, type MetadataExtractByIdentifiersResponse as MetadataExtractByIdentifiersResponse, type MetadataExtractParams as MetadataExtractParams, type MetadataExtractByIdentifiersParams as MetadataExtractByIdentifiersParams, }; export { Types as Types, type TypeListResponse as TypeListResponse }; export { Schema as Schema, type SchemaGetResponse as SchemaGetResponse, type SchemaGetParams as SchemaGetParams, }; export { Components as Components, type ComponentValidateResponse as ComponentValidateResponse, type ComponentDeployResponse as ComponentDeployResponse, type ComponentValidateParams as ComponentValidateParams, type ComponentDeployParams as ComponentDeployParams, }; export { ValidationRuns as ValidationRuns, type ValidationRunCreateResponse as ValidationRunCreateResponse, type ValidationRunGetResponse as ValidationRunGetResponse, type ValidationRunCreateParams as ValidationRunCreateParams, }; export { DeploymentRuns as DeploymentRuns, type DeploymentRunCreateResponse as DeploymentRunCreateResponse, type DeploymentRunGetResponse as DeploymentRunGetResponse, type DeploymentRunCreateParams as DeploymentRunCreateParams, }; } //# sourceMappingURL=metadata.d.mts.map