fix: add js doc comments.

This commit is contained in:
StevanFreeborn
2023-02-05 15:32:22 -06:00
parent e6eae35e03
commit fac2367052
5 changed files with 142 additions and 0 deletions
+34
View File
@@ -1,13 +1,47 @@
import { FieldType } from '../enums/FieldType';
/**
* @class FileInfo - Represents a file info.
*/
export class FileInfo {
/**
* @property {FieldType} type - The type of the file.
*/
public type: FieldType;
/**
* @property {string} contentType - The content type of the file.
*/
public contentType: string;
/**
* @property {string} name - The name of the file.
*/
public name: string;
/**
* @property {Date} createdDate - The created date of the file.
*/
public createdDate: Date;
/**
* @property {Date} modifiedDate - The modified date of the file.
*/
public modifiedDate: Date;
/**
* @property {string} owner - The owner of the file.
*/
public owner: string;
/**
* @property {string} notes - The notes of the file.
*/
public notes: string;
/**
* @property {string} fileHref - The href of the file.
*/
public fileHref: string;
constructor(
+24
View File
@@ -2,10 +2,34 @@ import { FormulaOutputType } from '../enums/FormulaOutputType';
import { Field } from './Field';
import { type ListValue } from './ListValue';
/**
* @class FormulaField - Represents a formula field.
*/
export class FormulaField extends Field {
/**
* @property {FormulaOutputType} outputType - The output type of the formula.
*/
public outputType: FormulaOutputType;
/**
* @property {ListValue[]} values - The list values of the formula.
*/
public values: ListValue[];
/**
* @constructor - Creates a new FormulaField.
* @param {number} id - The id of the formula field.
* @param {number} appId - The id of the app the formula field belongs to.
* @param {string} name - The name of the formula field.
* @param {string} type - The type of the formula field.
* @param {string} status - The status of the formula field.
* @param {boolean} isRequired - Whether the formula field is required.
* @param {boolean} isUnique - Whether the formula field is unique.
* @param {string} outputType - The output type of the formula field.
* @param {ListValue[]} values - The list values of the formula field.
* @returns {FormulaField} - A new FormulaField.
* @throws {Error} - Throws an error if the outputType is not a valid FormulaOutputType.
*/
constructor(
id: number,
appId: number,
+29
View File
@@ -2,11 +2,40 @@ import { Multiplicity } from '../enums/Multiplicity';
import { Field } from './Field';
import { type ListValue } from './ListValue';
/**
* @class ListField - Represents a list field.
*/
export class ListField extends Field {
/**
* @property {Multiplicity} multiplicity - The multiplicity of the list field.
*/
public multiplicity: Multiplicity;
/**
* @property {number} listId - The id of the list the list field belongs to.
*/
public listId: number;
/**
* @property {ListValue[]} values - The list values of the list field.
*/
public values: ListValue[];
/**
* @constructor - Creates a new ListField.
* @param {number} id - The id of the list field.
* @param {number} appId - The id of the app the list field belongs to.
* @param {string} name - The name of the list field.
* @param {string} type - The type of the list field.
* @param {string} status - The status of the list field.
* @param {boolean} isRequired - Whether the list field is required.
* @param {boolean} isUnique - Whether the list field is unique.
* @param {string} multiplicity - The multiplicity of the list field.
* @param {number} listId - The id of the list the list field belongs to.
* @param {ListValue[]} values - The list values of the list field.
* @returns {ListField} - A new ListField.
* @throws {Error} - Throws an error if the multiplicity is not a valid Multiplicity.
*/
constructor(
id: number,
appId: number,
+31
View File
@@ -1,10 +1,41 @@
/**
* @class ListValue - Represents a list value.
*/
export class ListValue {
/**
* @property {string} id - The id of the list value.
*/
public id: string;
/**
* @property {string} name - The name of the list value.
*/
public name: string;
/**
* @property {number} sortOrder - The sort order of the list value.
*/
public sortOrder: number;
/**
* @property {number} numericValue - The numeric value of the list value.
*/
public numericValue: number;
/**
*
*/
public color: string;
/**
* @constructor - Creates a new ListValue.
* @param {string} id - The id of the list value.
* @param {string} name - The name of the list value.
* @param {number} sortOrder - The sort order of the list value.
* @param {number} numericValue - The numeric value of the list value.
* @param {string} color - The color of the list value.
* @returns {ListValue} - A new ListValue.
*/
constructor(
id: string,
name: string,
+24
View File
@@ -1,10 +1,34 @@
import { Multiplicity } from '../enums/Multiplicity';
import { Field } from './Field';
/**
* @class ReferenceField - Represents a reference field.
*/
export class ReferenceField extends Field {
/**
* @property {Multiplicity} multiplicity - The multiplicity of the reference field.
*/
public multiplicity: Multiplicity;
/**
* @property {number} referencedAppId - The id of the app the reference field references.
*/
public referencedAppId: number;
/**
* @constructor - Creates a new ReferenceField.
* @param {number} id - The id of the reference field.
* @param {number} appId - The id of the app the reference field belongs to.
* @param {string} name - The name of the reference field.
* @param {string} type - The type of the reference field.
* @param {string} status - The status of the reference field.
* @param {boolean} isRequired - Whether the reference field is required.
* @param {boolean} isUnique - Whether the reference field is unique.
* @param {string} multiplicity - The multiplicity of the reference field.
* @param {number} referencedAppId - The id of the app the reference field references.
* @returns {ReferenceField} - A new ReferenceField.
* @throws {Error} - Throws an error if the multiplicity is not a valid Multiplicity.jjkdleroritlasaxmvjd
*/
constructor(
id: number,
appId: number,