import type { RipplingSDK } from "../../../client.js"; import type { CustomObject } from "../../../resources/custom-objects/custom-objects.js"; import type { CustomObjectField } from "../../../resources/custom-objects/fields.js"; import type { AnyCustomObjectDefinition, FieldNames } from "./types.js"; import type { CustomObjectCategoryDefinition, ReconciledCustomObjectCategory } from "./category.js"; /** Lifecycle action emitted by typed metadata reconciliation helpers. */ export type CustomObjectLifecycleAction = 'created' | 'updated' | 'deleted' | 'unchanged'; /** Reconciliation result for one logical custom-object field. */ export interface ReconciledCustomObjectField { /** Source typed object definition. */ readonly definition: TDefinition; /** Logical field name from the typed definition. */ readonly fieldName: FieldNames; /** Action applied to the field. */ readonly action: CustomObjectLifecycleAction; /** Remote field after reconciliation, when present. */ readonly field?: CustomObjectField; } /** Result returned by custom-object reconciliation helpers. */ export interface ReconciledCustomObject { /** Source typed object definition. */ readonly definition: TDefinition; /** Optional category reconciliation result, when a category definition was supplied. */ readonly category?: ReconciledCustomObjectCategory; /** Whether the object metadata was created, updated, or already matched. */ readonly objectAction: Exclude; /** Remote object after reconciliation. */ readonly object: CustomObject; /** Whether the platform-managed name field required an update. */ readonly nameFieldAction?: Exclude; /** Remote `name` field after applying `name_field_details`, when relevant. */ readonly nameField?: CustomObjectField; /** Per-field reconciliation results keyed by logical field name. */ readonly fields: Readonly, ReconciledCustomObjectField>>; /** Deleted extra remote fields keyed by api name. */ readonly deletedFieldApiNames: readonly string[]; } /** Options for reconciling one typed custom-object definition against the backend. */ export interface ReconcileCustomObjectDefinitionOptions { /** Optional typed category definition to reconcile before the object. */ readonly categoryDefinition?: CustomObjectCategoryDefinition; /** Resolved category id used by the live REST object APIs. */ readonly categoryIdentifier?: string; /** Whether to delete non-standard remote fields that are absent from the typed definition. */ readonly deleteMissingFields?: boolean; /** Whether to update the platform-managed `name` field when using autonumber metadata. Defaults to `true`. */ readonly updateNameFieldDetails?: boolean; } /** Options for reconciling multiple typed custom-object definitions in one batch. */ export interface ReconcileCustomObjectDefinitionsOptions extends Omit { /** Optional typed categories to reconcile before object reconciliation. */ readonly categoryDefinitions?: readonly CustomObjectCategoryDefinition[]; /** Resolved category ids keyed by object api name for definitions without embedded category definitions. */ readonly categoryIdentifiersByObjectApiName?: Readonly>; } /** * Reconciles one typed custom-object definition against the backend. * * @param client - SDK client used to call the metadata APIs. * @param definition - Typed object definition to reconcile. * @param options - Reconciliation behavior flags for categories, name fields, and deletions. * @returns Frozen reconciliation result describing the final backend state. * @typeParam TDefinition - Object definition being reconciled. */ export declare function reconcileCustomObjectDefinition(client: RipplingSDK, definition: TDefinition, options?: ReconcileCustomObjectDefinitionOptions): Promise>; /** * Reconciles multiple typed custom-object definitions in a relationship-safe batch. * * @param client - SDK client used to call the metadata APIs. * @param definitions - Typed object definitions to reconcile. * @param options - Batch reconciliation behavior flags. * @returns Frozen reconciliation results in input order. */ export declare function reconcileCustomObjectDefinitions(client: RipplingSDK, definitions: readonly AnyCustomObjectDefinition[], options?: ReconcileCustomObjectDefinitionsOptions): Promise; /** * Deletes one typed custom object definition by its compiled API name. * * @param client - SDK client used to call the object APIs. * @param definition - Typed object definition identifying the object to delete. * @typeParam TDefinition - Object definition being deleted. */ export declare function deleteCustomObjectDefinition(client: RipplingSDK, definition: TDefinition): Promise; //# sourceMappingURL=lifecycle.d.ts.map