Skip to content

Commit

Permalink
Improve types.
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthovestadt committed Feb 11, 2017
1 parent 75f0cab commit 0aa13b2
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion lib/accounts.ts
Original file line number Diff line number Diff line change
@@ -586,6 +586,7 @@ export interface AccountsSetAccountInfoParams {
addLoginEmails?: string;
conflictHandling?: 'fail' | 'saveProfileAndFail';
data?: any;
subscriptions?: any;
isActive?: boolean;
isLockedOut?: boolean;
isVerified?: boolean;
@@ -652,6 +653,7 @@ export interface AccountsRegisterParams {
captchaToken?: string;
cid?: string;
data?: any;
subscriptions?: any;
finalizeRegistration?: boolean;
secretQuestion?: string;
secretAnswer?: string;
@@ -754,7 +756,10 @@ export interface AccountsSetSchemaParams {
dataSchema?: {
fields: { [key: string]: AccountsDataSetSchemaField; };
dynamicSchema?: boolean;
}
};
subscriptionSchema?: {
fields: { [key: string]: AccountsSubscriptionSetSchemaField; };
};
scope?: 'group' | 'site';
}
export interface AccountsProfileSetSchemaField {
@@ -768,6 +773,9 @@ export interface AccountsDataSetSchemaField extends AccountsProfileSetSchemaFiel
format?: string | null;
type?: AccountsSchemaType;
}
export interface AccountsSubscriptionSetSchemaField {
type?: 'boolean';
}

export interface AccountsGetSchemaParams {
filter?: 'full' | 'explicitOnly' | 'clientOnly';
11 changes: 9 additions & 2 deletions lib/admin.ts
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ export interface AdminUserSite {
}
export interface AdminGetUserSitesParams {
targetUserKey?: string;
targetPartnerID?: string;
targetPartnerID?: number;
}
export interface AdminGetUserSitesResponse {
sites: Array<{
@@ -158,6 +158,7 @@ export interface AdminGetSiteConfigParams {
explicitSiteGroupConfig?: boolean;
explicitSiteConfig?: boolean;
includeGigyaSettings?: boolean;
includeGlobalConf?: boolean;
}
export interface AdminGetSiteConfigResponse {
baseDomain: string;
@@ -178,13 +179,15 @@ export interface AdminGetSiteConfigResponse {
shortURLRedirMethod: string;
};
siteGroupConfig: {
members?: Array<string>;
enableSSO: boolean;
members: Array<string>;
SSOSegment: string; // It's always returned, but may be an empty string.
};
siteGroupOwner?: string;
enableDataSharing: boolean;
trustedShareURLs: Array<string>;
logoutURL?: string;
globalConf?: string;
}

export interface AdminSetSiteConfigParams {
@@ -241,8 +244,12 @@ export interface AdminSetSiteConfigParams {
};
siteGroupConfig?: {
enableSSO?: boolean;
SSOSegment?: string;
};
siteGroupOwner?: string | null;
enableDataSharing?: boolean;
trustedShareURLs?: Array<string>;
globalConf?: string;
}

export interface AdminSearchParams {
1 change: 1 addition & 0 deletions lib/interfaces/account.ts
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ export interface Account {
isActive: boolean;
profile: Profile;
data: any;
subscriptions: any;
iRank: number;
loginIDs: {
username: string;

0 comments on commit 0aa13b2

Please sign in to comment.