Skip to content

Commit

Permalink
feat(modules): added fields to auth_email_get_signup_settings response
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Carr committed May 21, 2020
1 parent b8b92ba commit 0746334
Showing 1 changed file with 179 additions and 3 deletions.
182 changes: 179 additions & 3 deletions src/modules/auth/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,192 @@ import Module from "..";
import { FunctionResponse } from "../../functions";
import { Warning } from "../shared";

interface ProfileField {
/**
* The field's unique ID.
*/
id?: number;

/**
* The field's shortname.
*/
shortname?: string;

/**
* The field's name.
*/
name?: string;

/**
* The field's data type.
*/
datatype?: string;

/**
* The field's description.
*/
description?: string;

/**
* The field's description format code.
*
* `0` - Moodle
* `1` - HTML
* `2` - plain text
* `4` - Markdown
*/
descriptionformat?: number;

/**
* The field's category ID.
*/
categoryid?: number;

/**
* The field's category name.
*/
categoryname?: string;

/**
* The field's sorting order.
*/
sortorder?: number;

/**
* Whether the field is required (1)
* or not (0).
*/
required?: number;

/**
* Whether the field is locked (1)
* or not (0).
*/
locked?: number;

/**
* Whether the field is visible (1)
* or not (0).
*/
visible?: number;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
forceunique?: number;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
signup?: number;

/**
* The field's default data.
*/
defaultdata?: string;

/**
* The field's default data format code.
*
* `0` - Moodle
* `1` - HTML
* `2` - plain text
* `4` - Markdown
*/
defaultdataformat?: number;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
param1?: string;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
param2?: string;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
param3?: string;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
param4?: string;

/**
* @todo Add documentation. Moodle's
* documentation is not helpful.
*/
param5?: string;
}

export interface SignUpSettingsResponse extends FunctionResponse {
/**
* The fields that a user can provide during sign up to identify their name.
* The fields that a user can provide during sign
* up to identify their name.
*/
namefields: string[];

/**
* Users signing up to this Moodle site must use a password that meets this policy's requirements.
* Users signing up to this Moodle site must use
* a password that meets this policy's requirements.
*/
passwordpolicy?: string;

/**
* The site's policy.
*/
sitepolicy?: string;

/**
* The site's policy handler.
*/
sitepolicyhandler?: string;

/**
* The site's default home city for a user.
*/
defaultcity?: string;

/**
* The site's default home country for a user.
*/
country?: string;

/**
* Required profile fields that the user must
* provide when signing up.
*/
profilefields?: ProfileField[];

/**
* The site's Google reCAPTCHA public key.
*/
recaptchapublickey?: string;

/**
* The site's Google reCAPTCHA challenge hash.
*/
recaptchachallengehash?: string;

/**
* The site's Google reCAPTCHA challenge image.
*/
recaptchachallengeimage?: string;

/**
* The URL Of the site's Google reCAPTCHA
* challenge JS.
*/
passwordpolicy: string;
recaptchachallengejs?: string;

warnings?: Warning[];
}
Expand Down

0 comments on commit 0746334

Please sign in to comment.