@project-sunbird/collection-editor-react 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/user.d.ts +12 -2
- package/dist/collection-editor.umd.js +24 -24
- package/dist/index.cjs +22 -22
- package/dist/index.js +3565 -3549
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/api/user.d.ts
CHANGED
|
@@ -3,18 +3,28 @@ export interface IUser {
|
|
|
3
3
|
firstName: string;
|
|
4
4
|
lastName?: string;
|
|
5
5
|
email?: string;
|
|
6
|
+
phone?: string;
|
|
6
7
|
userName?: string;
|
|
8
|
+
rootOrgName?: string;
|
|
7
9
|
organisations?: Array<{
|
|
8
10
|
orgName?: string;
|
|
11
|
+
roles?: string[];
|
|
9
12
|
}>;
|
|
10
13
|
}
|
|
11
14
|
interface SearchOpts {
|
|
12
15
|
rootOrgId?: string;
|
|
16
|
+
objectType?: string;
|
|
13
17
|
limit?: number;
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
|
-
* Search content-creator users by name
|
|
17
|
-
*
|
|
20
|
+
* Search content-creator users by name, email, or phone number.
|
|
21
|
+
* Mirrors the Angular collaborator plugin's three-branch detection logic:
|
|
22
|
+
* - Contains "@" → filters.email (exact match)
|
|
23
|
+
* - All digits, ≥10 chars → filters.phone (exact match)
|
|
24
|
+
* - Everything else → request.query (free-text name search)
|
|
25
|
+
*
|
|
26
|
+
* The ?fields=orgName query param instructs the API to populate orgName inside
|
|
27
|
+
* each user's organisations array, which is required to display the org name.
|
|
18
28
|
*/
|
|
19
29
|
export declare function searchUsers(query: string, opts?: SearchOpts): Promise<IUser[]>;
|
|
20
30
|
/**
|