@project-sunbird/collection-editor-react 0.1.6 → 0.1.8

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.
@@ -42,4 +42,4 @@ export interface IParsedCategoryDefinition {
42
42
  sourcingSettings: Record<string, unknown>;
43
43
  }
44
44
  export type ICategoryDefinitionField = ICategoryField;
45
- export declare function getCategoryDefinition(categoryName: string, channel: string, objectType?: string): Promise<IParsedCategoryDefinition>;
45
+ export declare function getCategoryDefinition(categoryName: string, channel: string, objectType?: string, version?: 'v1' | 'v4'): Promise<IParsedCategoryDefinition>;
@@ -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/email. Mirrors the Sunbird collaborator
17
- * search: restricts to CONTENT_CREATOR role and (optionally) the same org.
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
  /**