import Sdk from '../sdk'; import { BaseData } from '../types/base'; import Watchable from '../watchable'; /** * Abstract superclass for all models. You won't use this class directly. * * @docsPath models/advanced/AbstractModel */ declare abstract class AbstractModel extends Watchable { /** @internal */ static _className: string; /** * This method is essentially abstract, but as of this writing, TypeScript * does not support abstract static methods. This necessitates a concrete * implementation which must be explicitly ignored by the test coverage * tooling. * * @internal */ static _isWatchableKey(key: string): boolean; /** @internal */ _baseData: BaseData; /** @internal */ _id: string; /** @internal */ _sdk: Sdk; /** * @internal */ constructor(sdk: Sdk, modelId: string); /** * The ID for this model. */ get id(): string; /** * @internal */ abstract get _dataOrNullIfDeleted(): DataType | null; /** * @internal */ get _data(): DataType; /** * `true` if the model has been deleted, and `false` otherwise. * * In general, it's best to avoid keeping a reference to an object past the * current event loop, since it may be deleted and trying to access any data * of a deleted object (other than its ID) will throw. But if you keep a * reference, you can use `isDeleted` to check that it's safe to access the * model's data. */ get isDeleted(): boolean; /** * @internal */ _spawnErrorForDeletion(): Error; /** * A string representation of the model for use in debugging. */ toString(): string; } export default AbstractModel;