import type { RipplingSDK } from "../../../client.mjs"; import type { ObjectCategory, ObjectCategoryCreateParams, ObjectCategoryUpdateParams } from "../../../resources/object-categories.mjs"; import type { CategoryApiName, LogicalCategoryName } from "./types.mjs"; /** * Author input accepted by {@link defineCustomObjectCategory}. * * @typeParam TName - Logical category name supplied by the caller. */ interface CustomObjectCategoryDefinitionInput { /** Logical unsuffixed snake_case category name. */ readonly name: LogicalCategoryName; /** Human-readable display name applied after creation. */ readonly displayName: string; /** Optional category description. */ readonly description?: string; } /** Immutable typed category definition used by provisioning and lifecycle helpers. */ export interface CustomObjectCategoryDefinition { /** Logical unsuffixed snake_case category name. */ readonly name: TName; /** Compiled wire-level category api name. */ readonly apiName: CategoryApiName; /** Human-readable display name. */ readonly displayName: string; /** Optional category description. */ readonly description?: string; } /** Result returned by category provisioning helpers. */ export interface ProvisionedCustomObjectCategory { /** Source typed category definition. */ readonly definition: CustomObjectCategoryDefinition; /** Response returned by `client.objectCategories.create(...)`. */ readonly createdCategory: ObjectCategory; /** Response returned by `client.objectCategories.update(...)`. */ readonly updatedCategory: ObjectCategory; } /** Lifecycle action emitted by category reconciliation helpers. */ export type CustomObjectCategoryLifecycleAction = 'created' | 'updated' | 'unchanged'; /** Result returned by category reconciliation helpers. */ export interface ReconciledCustomObjectCategory { /** Source typed category definition. */ readonly definition: CustomObjectCategoryDefinition; /** Whether the remote category was created, updated, or already matched. */ readonly action: CustomObjectCategoryLifecycleAction; /** Remote category after reconciliation. */ readonly category: ObjectCategory; } /** Options for category provisioning and reconciliation helpers. */ export interface CustomObjectCategoryMutationOptions { /** Whether to apply the follow-up display-metadata update. Defaults to `true`. */ readonly updateDisplayMetadata?: boolean; } /** * Creates an immutable typed custom-object category definition. * * @param definition - Logical category metadata to normalize and freeze. * @returns Immutable typed category definition with compiled API name. * @typeParam TName - Logical category name supplied by the caller. */ export declare function defineCustomObjectCategory(definition: CustomObjectCategoryDefinitionInput): Readonly>>; /** * Builds the low-level create payload for an object category. * * @param definition - Typed category definition to compile. * @returns REST create payload using the logical category name. * @typeParam TName - Logical category name carried by the definition. */ export declare function buildObjectCategoryCreateParams(definition: CustomObjectCategoryDefinition): ObjectCategoryCreateParams; /** * Builds the low-level update payload for an object category. * * @param definition - Typed category definition to compile. * @returns REST update payload using human-facing display metadata. * @typeParam TName - Logical category name carried by the definition. */ export declare function buildObjectCategoryUpdateParams(definition: CustomObjectCategoryDefinition): ObjectCategoryUpdateParams; /** * Creates one typed custom-object category through the REST SDK. * * @param client - SDK client used to call the category APIs. * @param definition - Typed category definition to provision. * @param options - Provisioning behavior flags for display-metadata updates. * @returns Frozen summary of the created and updated backend category DTOs. * @typeParam TName - Logical category name carried by the definition. */ export declare function provisionCustomObjectCategoryDefinition(client: RipplingSDK, definition: CustomObjectCategoryDefinition, options?: CustomObjectCategoryMutationOptions): Promise>; /** * Creates multiple typed custom-object categories through the REST SDK. * * @param client - SDK client used to call the category APIs. * @param definitions - Typed category definitions to provision. * @param options - Provisioning behavior flags shared across the batch. * @returns Frozen batch of provisioning results in input order. */ export declare function provisionCustomObjectCategoryDefinitions(client: RipplingSDK, definitions: readonly CustomObjectCategoryDefinition[], options?: CustomObjectCategoryMutationOptions): Promise; /** * Reconciles one typed category definition against the backend by name. * * @param client - SDK client used to call the category APIs. * @param definition - Typed category definition to reconcile. * @param options - Reconciliation behavior flags for display-metadata updates. * @returns Frozen reconciliation result describing the final backend category state. * @typeParam TName - Logical category name carried by the definition. */ export declare function reconcileCustomObjectCategoryDefinition(client: RipplingSDK, definition: CustomObjectCategoryDefinition, options?: CustomObjectCategoryMutationOptions): Promise>; /** * Reconciles multiple typed category definitions against the backend by name. * * @param client - SDK client used to call the category APIs. * @param definitions - Typed category definitions to reconcile. * @param options - Reconciliation behavior flags shared across the batch. * @returns Frozen batch of reconciliation results in input order. */ export declare function reconcileCustomObjectCategoryDefinitions(client: RipplingSDK, definitions: readonly CustomObjectCategoryDefinition[], options?: CustomObjectCategoryMutationOptions): Promise; /** * Deletes a category that matches the typed definition's logical or display name. * * @param client - SDK client used to call the category APIs. * @param definition - Typed category definition used to find the category to delete. * @returns Whether a matching category existed and was deleted. * @typeParam TName - Logical category name carried by the definition. */ export declare function deleteCustomObjectCategoryDefinition(client: RipplingSDK, definition: CustomObjectCategoryDefinition): Promise; export {}; //# sourceMappingURL=category.d.mts.map