import { AggregateSuccess, SuccessResult } from "./results/success/SuccessResult.mjs"; import { AggregateError, ErrorResult } from "./results/error/ErrorResult.mjs"; import { Resource } from "./Resource.mjs"; import { LdoBase } from "@ldo/ldo"; //#region src/methods.d.ts /** * Begins tracking changes to eventually commit. * * @param input - A linked data object to track changes on * @param resource - A resource that all additions will eventually be committed to * @param additionalResources - Any additional resources that changes will eventually be committed to * * @returns A transactable Linked Data Object * * @example * ```typescript * import { changeData } from "@ldo/connected"; * * // ... * * const profile = connectedLdoDataset * .using(ProfileShapeType) * .fromSubject("https://example.com/profile#me"); * const resource = connectedLdoDataset.getResource("https://example.com/profile"); * * const cProfile = changeData(profile, resource); * cProfile.name = "My New Name"; * const result = await commitData(cProfile); * ``` */ declare function changeData(input: Type, resource: Resource, ...additionalResources: Resource[]): Type; /** * Commits the transaction to the global dataset, syncing all subscribing * components and connected Pods * * @param input - A transactable linked data object * * @example * ```typescript * import { changeData } from "@ldo/connected"; * * // ... * * const profile = connectedLdoDataset * .using(ProfileShapeType) * .fromSubject("https://example.com/profile#me"); * const resource = connectedLdoDataset.getResource("https://example.com/profile"); * * const cProfile = changeData(profile, resource); * cProfile.name = "My New Name"; * const result = await commitData(cProfile); * ``` */ declare function commitData(input: LdoBase): Promise | AggregateError>; //#endregion export { changeData, commitData }; //# sourceMappingURL=methods.d.mts.map