@linagora/ldap-rest-client 1.0.11 → 1.0.13

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/index.d.mts CHANGED
@@ -622,11 +622,16 @@ interface Organization {
622
622
  * - suspended: Organization is temporarily disabled
623
623
  */
624
624
  type OrganizationStatus = 'active' | 'suspended';
625
+ /**
626
+ * Supported primitive types for metadata values
627
+ */
628
+ type MetadataValue = string | number | boolean | null;
625
629
  /**
626
630
  * Optional metadata for organization customization
627
631
  *
628
632
  * Allows storing custom properties like industry, company size,
629
633
  * contact information, or any other organization-specific data.
634
+ * Supports strings, numbers, booleans, and null values.
630
635
  */
631
636
  interface OrganizationMetadata {
632
637
  /** Industry/sector (e.g., 'Technology', 'Healthcare') */
@@ -636,7 +641,7 @@ interface OrganizationMetadata {
636
641
  /** Primary contact information */
637
642
  contact?: string;
638
643
  /** Additional custom fields as key-value pairs */
639
- [key: string]: string | undefined;
644
+ [key: string]: MetadataValue | undefined;
640
645
  }
641
646
  /**
642
647
  * Request parameters for creating an organization
@@ -955,7 +960,7 @@ declare class UsersResource extends BaseResource {
955
960
  * Returns organizations where the user is an admin or owner.
956
961
  * Optionally filter by specific role.
957
962
  *
958
- * @param {string} userId - User identifier (username)
963
+ * @param {string} userId - User identifier (email address - unique identifier, not username)
959
964
  * @param {string} [role] - Optional role filter ('owner', 'admin', 'moderator', 'member')
960
965
  * @returns {Promise<Organization[]>} Array of organizations
961
966
  * @throws {ApiError} On API errors
@@ -963,10 +968,10 @@ declare class UsersResource extends BaseResource {
963
968
  * @example
964
969
  * ```typescript
965
970
  * // Get all organizations where user has any role
966
- * const orgs = await client.users.getUserOrganizations('johndoe');
971
+ * const orgs = await client.users.getUserOrganizations('user@example.com');
967
972
  *
968
973
  * // Get only organizations where user is owner
969
- * const ownedOrgs = await client.users.getUserOrganizations('johndoe', 'owner');
974
+ * const ownedOrgs = await client.users.getUserOrganizations('user@example.com', 'owner');
970
975
  * ```
971
976
  */
972
977
  getUserOrganizations: (userId: string, role?: string) => Promise<Organization[]>;
@@ -1765,4 +1770,4 @@ declare class NetworkError extends LdapRestError {
1765
1770
  constructor(message: string, cause?: Error);
1766
1771
  }
1767
1772
 
1768
- export { type AddGroupMembersRequest, type Address, ApiError, AuthenticationError, AuthorizationError, type ChangeUserRoleRequest, type ChangeUserRoleResponse, type CheckAvailabilityParams, type CheckAvailabilityResponse, type CheckOrganizationAvailabilityParams, type ClientConfig, ConflictError, type CreateAdminRequest, type CreateB2BUserResponse, type CreateGroupRequest, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type EmailAddress, type ExtendedAddress, type FetchUserRequest, type GeoLocation, type GetOwnerResponse, type Group, GroupsResource, type InstantMessaging, LdapRestClient, LdapRestError, type ListGroupsParams, type ListGroupsResponse, type ListUsersParams, type ListUsersResponse, NetworkError, NotFoundError, type Organization, type OrganizationMetadata, type OrganizationOwner, type OrganizationRole, type OrganizationSearchField, type OrganizationStatus, OrganizationsResource, type PhoneNumber, RateLimitError, type SearchUsersParams, type SetOwnerRequest, type TransferOwnershipRequest, type UpdateGroupRequest, type UpdateOrganizationRequest, type UpdateUserRequest, type User, type UserCredentials, type UserKeys, type UserName, type UserSearchField, type UserStatus, UsersResource, ValidationError };
1773
+ export { type AddGroupMembersRequest, type Address, ApiError, AuthenticationError, AuthorizationError, type ChangeUserRoleRequest, type ChangeUserRoleResponse, type CheckAvailabilityParams, type CheckAvailabilityResponse, type CheckOrganizationAvailabilityParams, type ClientConfig, ConflictError, type CreateAdminRequest, type CreateB2BUserResponse, type CreateGroupRequest, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type EmailAddress, type ExtendedAddress, type FetchUserRequest, type GeoLocation, type GetOwnerResponse, type Group, GroupsResource, type InstantMessaging, LdapRestClient, LdapRestError, type ListGroupsParams, type ListGroupsResponse, type ListUsersParams, type ListUsersResponse, type MetadataValue, NetworkError, NotFoundError, type Organization, type OrganizationMetadata, type OrganizationOwner, type OrganizationRole, type OrganizationSearchField, type OrganizationStatus, OrganizationsResource, type PhoneNumber, RateLimitError, type SearchUsersParams, type SetOwnerRequest, type TransferOwnershipRequest, type UpdateGroupRequest, type UpdateOrganizationRequest, type UpdateUserRequest, type User, type UserCredentials, type UserKeys, type UserName, type UserSearchField, type UserStatus, UsersResource, ValidationError };
package/dist/index.d.ts CHANGED
@@ -622,11 +622,16 @@ interface Organization {
622
622
  * - suspended: Organization is temporarily disabled
623
623
  */
624
624
  type OrganizationStatus = 'active' | 'suspended';
625
+ /**
626
+ * Supported primitive types for metadata values
627
+ */
628
+ type MetadataValue = string | number | boolean | null;
625
629
  /**
626
630
  * Optional metadata for organization customization
627
631
  *
628
632
  * Allows storing custom properties like industry, company size,
629
633
  * contact information, or any other organization-specific data.
634
+ * Supports strings, numbers, booleans, and null values.
630
635
  */
631
636
  interface OrganizationMetadata {
632
637
  /** Industry/sector (e.g., 'Technology', 'Healthcare') */
@@ -636,7 +641,7 @@ interface OrganizationMetadata {
636
641
  /** Primary contact information */
637
642
  contact?: string;
638
643
  /** Additional custom fields as key-value pairs */
639
- [key: string]: string | undefined;
644
+ [key: string]: MetadataValue | undefined;
640
645
  }
641
646
  /**
642
647
  * Request parameters for creating an organization
@@ -955,7 +960,7 @@ declare class UsersResource extends BaseResource {
955
960
  * Returns organizations where the user is an admin or owner.
956
961
  * Optionally filter by specific role.
957
962
  *
958
- * @param {string} userId - User identifier (username)
963
+ * @param {string} userId - User identifier (email address - unique identifier, not username)
959
964
  * @param {string} [role] - Optional role filter ('owner', 'admin', 'moderator', 'member')
960
965
  * @returns {Promise<Organization[]>} Array of organizations
961
966
  * @throws {ApiError} On API errors
@@ -963,10 +968,10 @@ declare class UsersResource extends BaseResource {
963
968
  * @example
964
969
  * ```typescript
965
970
  * // Get all organizations where user has any role
966
- * const orgs = await client.users.getUserOrganizations('johndoe');
971
+ * const orgs = await client.users.getUserOrganizations('user@example.com');
967
972
  *
968
973
  * // Get only organizations where user is owner
969
- * const ownedOrgs = await client.users.getUserOrganizations('johndoe', 'owner');
974
+ * const ownedOrgs = await client.users.getUserOrganizations('user@example.com', 'owner');
970
975
  * ```
971
976
  */
972
977
  getUserOrganizations: (userId: string, role?: string) => Promise<Organization[]>;
@@ -1765,4 +1770,4 @@ declare class NetworkError extends LdapRestError {
1765
1770
  constructor(message: string, cause?: Error);
1766
1771
  }
1767
1772
 
1768
- export { type AddGroupMembersRequest, type Address, ApiError, AuthenticationError, AuthorizationError, type ChangeUserRoleRequest, type ChangeUserRoleResponse, type CheckAvailabilityParams, type CheckAvailabilityResponse, type CheckOrganizationAvailabilityParams, type ClientConfig, ConflictError, type CreateAdminRequest, type CreateB2BUserResponse, type CreateGroupRequest, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type EmailAddress, type ExtendedAddress, type FetchUserRequest, type GeoLocation, type GetOwnerResponse, type Group, GroupsResource, type InstantMessaging, LdapRestClient, LdapRestError, type ListGroupsParams, type ListGroupsResponse, type ListUsersParams, type ListUsersResponse, NetworkError, NotFoundError, type Organization, type OrganizationMetadata, type OrganizationOwner, type OrganizationRole, type OrganizationSearchField, type OrganizationStatus, OrganizationsResource, type PhoneNumber, RateLimitError, type SearchUsersParams, type SetOwnerRequest, type TransferOwnershipRequest, type UpdateGroupRequest, type UpdateOrganizationRequest, type UpdateUserRequest, type User, type UserCredentials, type UserKeys, type UserName, type UserSearchField, type UserStatus, UsersResource, ValidationError };
1773
+ export { type AddGroupMembersRequest, type Address, ApiError, AuthenticationError, AuthorizationError, type ChangeUserRoleRequest, type ChangeUserRoleResponse, type CheckAvailabilityParams, type CheckAvailabilityResponse, type CheckOrganizationAvailabilityParams, type ClientConfig, ConflictError, type CreateAdminRequest, type CreateB2BUserResponse, type CreateGroupRequest, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type EmailAddress, type ExtendedAddress, type FetchUserRequest, type GeoLocation, type GetOwnerResponse, type Group, GroupsResource, type InstantMessaging, LdapRestClient, LdapRestError, type ListGroupsParams, type ListGroupsResponse, type ListUsersParams, type ListUsersResponse, type MetadataValue, NetworkError, NotFoundError, type Organization, type OrganizationMetadata, type OrganizationOwner, type OrganizationRole, type OrganizationSearchField, type OrganizationStatus, OrganizationsResource, type PhoneNumber, RateLimitError, type SearchUsersParams, type SetOwnerRequest, type TransferOwnershipRequest, type UpdateGroupRequest, type UpdateOrganizationRequest, type UpdateUserRequest, type User, type UserCredentials, type UserKeys, type UserName, type UserSearchField, type UserStatus, UsersResource, ValidationError };
package/dist/index.js CHANGED
@@ -669,7 +669,7 @@ var UsersResource = class extends BaseResource {
669
669
  * Returns organizations where the user is an admin or owner.
670
670
  * Optionally filter by specific role.
671
671
  *
672
- * @param {string} userId - User identifier (username)
672
+ * @param {string} userId - User identifier (email address - unique identifier, not username)
673
673
  * @param {string} [role] - Optional role filter ('owner', 'admin', 'moderator', 'member')
674
674
  * @returns {Promise<Organization[]>} Array of organizations
675
675
  * @throws {ApiError} On API errors
@@ -677,10 +677,10 @@ var UsersResource = class extends BaseResource {
677
677
  * @example
678
678
  * ```typescript
679
679
  * // Get all organizations where user has any role
680
- * const orgs = await client.users.getUserOrganizations('johndoe');
680
+ * const orgs = await client.users.getUserOrganizations('user@example.com');
681
681
  *
682
682
  * // Get only organizations where user is owner
683
- * const ownedOrgs = await client.users.getUserOrganizations('johndoe', 'owner');
683
+ * const ownedOrgs = await client.users.getUserOrganizations('user@example.com', 'owner');
684
684
  * ```
685
685
  */
686
686
  getUserOrganizations = async (userId, role) => {
package/dist/index.mjs CHANGED
@@ -631,7 +631,7 @@ var UsersResource = class extends BaseResource {
631
631
  * Returns organizations where the user is an admin or owner.
632
632
  * Optionally filter by specific role.
633
633
  *
634
- * @param {string} userId - User identifier (username)
634
+ * @param {string} userId - User identifier (email address - unique identifier, not username)
635
635
  * @param {string} [role] - Optional role filter ('owner', 'admin', 'moderator', 'member')
636
636
  * @returns {Promise<Organization[]>} Array of organizations
637
637
  * @throws {ApiError} On API errors
@@ -639,10 +639,10 @@ var UsersResource = class extends BaseResource {
639
639
  * @example
640
640
  * ```typescript
641
641
  * // Get all organizations where user has any role
642
- * const orgs = await client.users.getUserOrganizations('johndoe');
642
+ * const orgs = await client.users.getUserOrganizations('user@example.com');
643
643
  *
644
644
  * // Get only organizations where user is owner
645
- * const ownedOrgs = await client.users.getUserOrganizations('johndoe', 'owner');
645
+ * const ownedOrgs = await client.users.getUserOrganizations('user@example.com', 'owner');
646
646
  * ```
647
647
  */
648
648
  getUserOrganizations = async (userId, role) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/ldap-rest-client",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "TypeScript API client for LDAP-REST",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",