@realestate/types
Version:
Types for real estate
243 lines (215 loc) • 8.93 kB
TypeScript
/**
* Copyright (c) 2023 ListBird. All Rights Reserved.
*
* This software product includes software or other works developed by RESO,
* subject to the RESO End User License published at www.reso.org.
*
* Any modifications, derivative works, or redistributions of this source must
* maintain this copyright notice. See the RESO EULA for more information.
*/
import { OUID } from './OUID';
import { ResourceName } from './ResourceName';
import { ClassName } from './ClassName';
import { RuleFormat } from './RuleFormat';
import { HistoryTransactional } from './HistoryTransactional';
import { RuleType } from './RuleType';
export interface Rules {
/**
* {@link https://ddwiki.reso.org/display/DDW17/ClassName+%28Rules%29+Field}
*
* The class or table to which the Rule refers. i.e. Residential, Residential Lease, Income, Mobile, etc.
*/
ClassName?: ClassName;
/**
* {@link https://ddwiki.reso.org/display/DDW17/FieldKey+%28Rules%29+Field}
*
* The unique identifier of the field to which the Rule applies. This is a foreign key relating to the field
* found in the resource per the ResourceName.
*/
FieldKey?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/FieldKeyNumeric+%28Rules%29+Field}
*
* The unique identifier of the field to which the Rule applies. This is a foreign key relating to the field
* found in the resource per the ResourceName. This is the numeric only key and used as an alternative to
* the FieldKey field.
*/
FieldKeyNumeric?: number;
/**
* {@link https://ddwiki.reso.org/display/DDW17/FieldName+%28Rules%29+Field}
*
* The name of the field to which the Rule applies.
*/
FieldName?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/ModificationTimestamp+%28Rules%29+Field}
*
* The transactional timestamp automatically recorded by the MLS system representing the date/time the rule
* was last modified.
*/
ModificationTimestamp?: Date;
/**
* {@link https://ddwiki.reso.org/display/DDW17/OriginalEntryTimestamp+%28Rules%29+Field}
*
* The transactional timestamp automatically recorded by the MLS system representing the date/time the rule
* was initially entered.
*/
OriginalEntryTimestamp?: Date;
/**
* {@link https://ddwiki.reso.org/display/DDW17/OriginatingSystemID+%28Rules%29+Field}
*
* The RESO OUID's OrganizationUniqueId of the Originating record provider. The Originating system is the
* system with authoritative control over the record. For example; the name of the MLS where the Rule
* originated. In cases where the Originating system was not where the record originated (the authoritative
* system), see the Originating System fields.
*/
OriginatingSystemID?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/OriginatingSystemName+%28Rules%29+Field}
*
* The name of the Originating record provider. Most commonly the name of the MLS. The place where the Rules
* is originally input. The legal name of the company.
*/
OriginatingSystemName?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/OriginatingSystemRuleKey+Field}
*
* The system key, a unique record identifier, from the Originating system. The Originating system is the
* system with authoritative control over the record. For example, the Multiple Listing Service where the
* Rule originated. There may be cases where the Source System (how you received the record) is not the
* Originating System. See Source System Key for more information.
*/
OriginatingSystemRuleKey?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/ResourceName+%28Rules%29+Field}
*
* The resource to which the Rule refers. E.g. Property, Member, Office, Open House, etc.
*/
ResourceName?: ResourceName;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleAction+Field}
*
* The action to be taken when processing the rule.
*/
RuleAction?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleDescription+Field}
*
* A detailed textual description of the rule.
*/
RuleDescription?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleEnabledYN+Field}
*
* Is the rule currently enabled?
*/
RuleEnabledYN?: boolean;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleErrorText+Field}
*
* Textual information conveyed when the given rule is in error or fails. (e.g. The listing price must be
* greater than 0.)
*/
RuleErrorText?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleExpression+Field}
*
* The expression or details of the rule.
*/
RuleExpression?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleFormat+Field}
*
* $filter, JavaScript, RETS1.8, REBR, etc.… ?
*/
RuleFormat?: RuleFormat;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleHelpText+Field}
*
* The text that might be displayed on a form that helps the user fix the rule (e.g. enter phone number in
* the 10 digit format ###-###-####.)
*/
RuleHelpText?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleKey+Field}
*
* <ac:structured-macro ac:name="tooltip" ac:schema-version="1"
* ac:macro-id="d9385e45-37c2-4bf8-9f64-6a4568d6b0b4"><ac:parameter ac:name="tip">A single designation
* identifying what category of fields to which the given field belongs.</ac:parameter><ac:parameter
* ac:name="text">Group</ac:parameter></ac:structured-macro><ac:link ac:anchor="Group"><ri:page
* ri:content-title="Data Dictionary Terms and Meta Definitions"
* /><ac:plain-text-link-body><![CDATA[?]]></ac:plain-text-link-body></ac:link>: <ac:link><ri:page
* ri:content-title="Rules Resource" /><ac:link-body>Rules Resource</ac:link-body></ac:link>
*/
RuleKey?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleKeyNumeric+Field}
*
* <ac:structured-macro ac:name="tooltip" ac:schema-version="1"
* ac:macro-id="dddc1b50-f511-45b5-8c68-773cf136e7b5"><ac:parameter ac:name="tip">A single designation
* identifying what category of fields to which the given field belongs.</ac:parameter><ac:parameter
* ac:name="text">Group</ac:parameter></ac:structured-macro><ac:link ac:anchor="Group"><ri:page
* ri:content-title="Data Dictionary Terms and Meta Definitions"
* /><ac:plain-text-link-body><![CDATA[?]]></ac:plain-text-link-body></ac:link>: <ac:link><ri:page
* ri:content-title="Rules Resource" /><ac:link-body>Rules Resource</ac:link-body></ac:link>
*/
RuleKeyNumeric?: number;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleName+Field}
*
* A descriptive name for the rule.
*/
RuleName?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleOrder+Field}
*
* When in use, execution of rules are to follow the order specified by this field. Any rule that references
* another field will need to be ordered.
*/
RuleOrder?: number;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleType+Field}
*
* Validation, Required, Warning, etc.
*/
RuleType?: RuleType;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleVersion+Field}
*
* A semantically-versioned rule version. https://semver.org/
*/
RuleVersion?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/RuleWarningText+Field}
*
* Textual information conveyed when a given rule has met a condition that warrants a warning message. e.g.
* you've entered a sale price that is has a difference from the listing price greater than 25%.
*/
RuleWarningText?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/SourceSystemHistoryKey+%28Rules%29+Field}
*
* The system key, a unique record identifier, from the Source System. The Source System is the system from
* which the record was directly received. In cases where the Source System was not where the record
* originated (the authoritative system), see the Originating System fields.
*/
SourceSystemHistoryKey?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/SourceSystemID+%28Rules%29+Field}
*
* The RESO OUID's OrganizationUniqueId of the Source record provider. The source system is the system from
* which the record was directly received. In cases where the source system was not where the record
* originated (the authoritative system), see the Originating System fields.
*/
SourceSystemID?: string;
/**
* {@link https://ddwiki.reso.org/display/DDW17/SourceSystemName+%28Rules%29+Field}
*
* The name of the Rule record provider. The system from which the record was directly received. The legal
* name of the company.
*/
SourceSystemName?: string;
OriginatingSystem?: OUID;
SourceSystem?: OUID;
HistoryTransactional?: HistoryTransactional[];
}