# Class JUserApi

#### Hierarchy (View Summary)

- JBaseApi
  - JUserApi

- Defined in jamespot-user-api/src/apis/user/user.ts:35

##### Index

### Constructors

constructor

### Properties

jApi
network

### Methods

autocomplete
checkPassword
configuration
fieldsConfiguration
get
getAIProfile
getFields
getNotificationsConfiguration
getProperty
getSpots
getUsersBirthday
setAIProfile
setNotificationsConfiguration
setProperty
signIn
updateBanner
updateImage
updateMail
userAddContact
userBusinessContactImport
userBusinessContactQueryList
userCreateBusinessContact
userDeleteBusinessContact
userList
userMap
userQueryList
userRemoveContact
userUpdateBusinessContact
userUpdateProfile

## Constructors

### constructor

- new JUserApi(jApi: JamespotUserApi): JUserApi

  #### Parameters

  - jApi: JamespotUserApi

  #### Returns JUserApi

  Inherited from JBaseApi.constructor

  - Defined in jamespot-user-api/src/apis/base.ts:8

## Properties

### jApi

jApi: JamespotUserApi

Inherited from JBaseApi.jApi

- Defined in jamespot-user-api/src/apis/base.ts:5

### network

network: Network

Inherited from JBaseApi.network

- Defined in jamespot-user-api/src/apis/base.ts:6

## Methods

### autocomplete

- autocomplete<T = jUserAutocomplete>(
  query: string,
  limit?: number,
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<T[]>

  autocomplete return a list users

  #### Type Parameters

  - T = jUserAutocomplete

  #### Parameters

  - query: string
  - `Optional` limit: number
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

  #### Returns Promise<T[]>

  - Defined in jamespot-user-api/src/apis/user/user.ts:40

### checkPassword

- checkPassword(
  password: string,
  signal?: AbortSignal,
  ): Promise<ApiWrapper<{ success: boolean }, BaseMessages>>

  #### Parameters

  - password: string
  - `Optional` signal: AbortSignal

  #### Returns Promise<ApiWrapper<{ success: boolean }, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:109

### configuration

- configuration(): Promise<ApiWrapper<UserDirectoryConfiguration, BaseMessages>>

  #### Returns Promise<ApiWrapper<UserDirectoryConfiguration, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:128

### fieldsConfiguration

- fieldsConfiguration(): Promise<
  ApiWrapper<
  {
  user_field_edit_profil: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_field_editable: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_field_my_page: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_page_mandatory_fields: {
  firstname: "0"
  | "1";
  lastname: "0" | "1";
  pseudo: "0" | "1";
  };
  },
  BaseMessages,
  >,
  >

  #### Returns Promise<
  ApiWrapper<
  {
  user_field_edit_profil: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_field_editable: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_field_my_page: Partial<
  Record<
  | "function"
  | "title"
  | "image"
  | "firstname"
  | "lastname"
  | "mail"
  | "description"
  | "dateOfBirth"
  | "phoneNumber"
  | "language"
  | "timeZone"
  | "mobileNumber"
  | "company"
  | "country"
  | "department"
  | "webSite"
  | "userBanner"
  | "field1"
  | "field2"
  | "field3"
  | "field4"
  | "field5",
  number,
  >,
  >;
  user_page_mandatory_fields: {
  firstname: "0"
  | "1";
  lastname: "0" | "1";
  pseudo: "0" | "1";
  };
  },
  BaseMessages,
  >,
  >

  - Defined in jamespot-user-api/src/apis/user/user.ts:132

### get

- get<T extends jObjectLittle = jObjectLittle>(
  uri: string,
  format?: string,
  signal?: AbortSignal,
  ): Promise<ApiWrapper<T, BaseMessages>>

  Get a user

  #### Type Parameters

  - T extends jObjectLittle = jObjectLittle

  #### Parameters

  - uri: string

    uri

  - format: string = 'little'

    little by default. If another format is provided, the generic types should be defined

  - `Optional` signal: AbortSignal

  #### Returns Promise<ApiWrapper<T, BaseMessages>>

  #### Ratelimit

  This endpoint may be subject to rate limiting based on the platform configuration

  - Defined in jamespot-user-api/src/apis/user/user.ts:61

### getAIProfile

- getAIProfile(
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<UserAIProfile, BaseMessages>>

  #### Parameters

  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<UserAIProfile, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:355

### getFields

- getFields(
  idUser: number,
  fieldsType: "popover",
  ): Promise<ApiWrapper<UserField[], BaseMessages>>

  #### Parameters

  - idUser: number
  - fieldsType: "popover"

  #### Returns Promise<ApiWrapper<UserField[], BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:275

### getNotificationsConfiguration

- getNotificationsConfiguration<UserNotificationsConfiguration>(
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<UserNotificationsConfiguration, BaseMessages>>

  #### Type Parameters

  - UserNotificationsConfiguration

  #### Parameters

  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<UserNotificationsConfiguration, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:299

### getProperty

- getProperty<T>(
  name: string,
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<T, BaseMessages>>

  #### Type Parameters

  - T

  #### Parameters

  - name: string
  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<T, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:321

### getSpots

- getSpots<T extends jGroupLittle = jGroupLittle>(
  __namedParameters?: {
  format?: "raw-little" | "raw-list" | "raw-view";
  idUser?: number;
  },
  __namedParameters?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<T[], BaseMessages>>

  #### Type Parameters

  - T extends jGroupLittle = jGroupLittle

  #### Parameters

  - __namedParameters: { format?: "raw-little" | "raw-list" | "raw-view"; idUser?: number } = {}
  - __namedParameters: { signal?: AbortSignal } = {}

  #### Returns Promise<ApiWrapper<T[], BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:284

### getUsersBirthday

- getUsersBirthday(
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<UserBirthday[], BaseMessages>>

  #### Parameters

  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<UserBirthday[], BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:376

### setAIProfile

- setAIProfile(
  payload: UserAIProfile,
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - payload: UserAIProfile
  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:365

### setNotificationsConfiguration

- setNotificationsConfiguration<Boolean>(
  userNotificationsConfiguration: UserNotificationsConfiguration,
  ): Promise<ApiWrapper<Boolean, BaseMessages>>

  #### Type Parameters

  - Boolean

  #### Parameters

  - userNotificationsConfiguration: UserNotificationsConfiguration

  #### Returns Promise<ApiWrapper<Boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:311

### setProperty

- setProperty<T>(
  name: string,
  value: T,
  options?: { signal?: AbortSignal },
  ): Promise<ApiDefaultWrapper<BaseMessages>>

  #### Type Parameters

  - T

  #### Parameters

  - name: string
  - value: T
  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiDefaultWrapper<BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:337

### signIn

- signIn<T extends jUserLittle = jUserList>(
  mail: string,
  pwd: string,
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<T, BaseMessages>>

  signIn function returns a Promise of users.

  #### Type Parameters

  - T extends jUserLittle = jUserList

  #### Parameters

  - mail: string

    Mail or username

  - pwd: string

    Password to be validated

  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

    Format of the response

  #### Returns Promise<ApiWrapper<T, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:267

### updateBanner

- updateBanner(
  idFile: number,
  format?: string,
  ): Promise<ApiWrapper<jObjectLittle, BaseMessages>>

  On upload file component, do to forget to set attrName to userBanner

  #### Parameters

  - idFile: number
  - format: string = 'raw-little'

  #### Returns Promise<ApiWrapper<jObjectLittle, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:86

### updateImage

- updateImage(
  idFile: number,
  format?: string,
  ): Promise<ApiWrapper<jObjectLittle, BaseMessages>>

  On upload file component, do to forget to set attrName to image

  #### Parameters

  - idFile: number
  - format: string = 'raw-little'

  #### Returns Promise<ApiWrapper<jObjectLittle, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:73

### updateMail

- updateMail(
  mail: string,
  password: string,
  ): Promise<ApiWrapper<{ success: boolean }, BaseMessages>>

  Update mail

  #### Parameters

  - mail: string

    as Mail

  - password: string

    as Password

  #### Returns Promise<ApiWrapper<{ success: boolean }, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:100

### userAddContact

- userAddContact(idUser: number): Promise<ApiDefaultWrapper<BaseMessages>>

  #### Parameters

  - idUser: number

  #### Returns Promise<ApiDefaultWrapper<BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:253

### userBusinessContactImport

- userBusinessContactImport(
  params: { file: File },
  options?: { signal?: AbortSignal },
  ): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - params: { file: File }
  - `Optional` options: { signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:239

### userBusinessContactQueryList

- userBusinessContactQueryList<T extends jObjectLittle = jBusinessContactLittle>(
  query: ObjectListProps,
  params?: { signal?: AbortSignal },
  ): Promise<ApiPagingResults<T>>

  #### Type Parameters

  - T extends jObjectLittle = jBusinessContactLittle

  #### Parameters

  - query: ObjectListProps
  - `Optional` params: { signal?: AbortSignal }

  #### Returns Promise<ApiPagingResults<T>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:170

### userCreateBusinessContact

- userCreateBusinessContact<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = VIEW,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  user: BusinessContact,
  options?: { format?: F; formatExtension?: E; signal?: AbortSignal },
  ): Promise<ApiWrapper<ArticleReturn<F, T, E>[], BaseMessages>>

  #### Type Parameters

  - F extends "raw-little" | "raw-list" | "raw-view" = VIEW
  - T extends string | number | symbol = never
  - E extends ArticleFormatsExtension = []

  #### Parameters

  - user: BusinessContact
  - `Optional` options: { format?: F; formatExtension?: E; signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<ArticleReturn<F, T, E>[], BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:177

### userDeleteBusinessContact

- userDeleteBusinessContact(
  idArticle: number,
  ): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - idArticle: number

  #### Returns Promise<ApiWrapper<boolean, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:235

### userList

- userList<T extends jObjectLittle = jUserLittle>(
  payload: ObjectListProps,
  params?: {
  formatExtension?: (
  | "comments"
  | "search"
  | "actions"
  | "attachments"
  | "contact"
  | "filebank"
  | "licenses"
  | "licensesExtrabot"
  | "messenger"
  | "filebankPath"
  | "parentArticle"
  | "quarantine"
  | "quizFieldDefinitions"
  | "quizResponseRecord"
  | "recurringEventRecord"
  | "socialEventRecord"
  | "surveyDateRecord"
  | "bookmark"
  )[];
  signal?: AbortSignal;
  },
  ): Promise<ApiPagingResults<T>>

  #### Type Parameters

  - T extends jObjectLittle = jUserLittle

  #### Parameters

  - payload: ObjectListProps
  - `Optional` params: {
    formatExtension?: (
    | "comments"
    | "search"
    | "actions"
    | "attachments"
    | "contact"
    | "filebank"
    | "licenses"
    | "licensesExtrabot"
    | "messenger"
    | "filebankPath"
    | "parentArticle"
    | "quarantine"
    | "quizFieldDefinitions"
    | "quizResponseRecord"
    | "recurringEventRecord"
    | "socialEventRecord"
    | "surveyDateRecord"
    | "bookmark"
    )[];
    signal?: AbortSignal;
    }

  #### Returns Promise<ApiPagingResults<T>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:136

### userMap

- userMap(
  payload: ObjectListProps,
  params?: { signal?: AbortSignal },
  ): Promise<ApiPagingResults<UserMapModel>>

  #### Parameters

  - payload: ObjectListProps
  - `Optional` params: { signal?: AbortSignal }

  #### Returns Promise<ApiPagingResults<UserMapModel>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:163

### userQueryList

- userQueryList<T extends jObjectLittle = jUserLittle>(
  payload: ObjectListProps,
  params?: {
  formatExtension?: (
  | "comments"
  | "search"
  | "actions"
  | "attachments"
  | "contact"
  | "filebank"
  | "licenses"
  | "licensesExtrabot"
  | "messenger"
  | "filebankPath"
  | "parentArticle"
  | "quarantine"
  | "quizFieldDefinitions"
  | "quizResponseRecord"
  | "recurringEventRecord"
  | "socialEventRecord"
  | "surveyDateRecord"
  | "bookmark"
  )[];
  signal?: AbortSignal;
  },
  ): Promise<ApiPagingResults<T>>

  #### Type Parameters

  - T extends jObjectLittle = jUserLittle

  #### Parameters

  - payload: ObjectListProps
  - `Optional` params: {
    formatExtension?: (
    | "comments"
    | "search"
    | "actions"
    | "attachments"
    | "contact"
    | "filebank"
    | "licenses"
    | "licensesExtrabot"
    | "messenger"
    | "filebankPath"
    | "parentArticle"
    | "quarantine"
    | "quizFieldDefinitions"
    | "quizResponseRecord"
    | "recurringEventRecord"
    | "socialEventRecord"
    | "surveyDateRecord"
    | "bookmark"
    )[];
    signal?: AbortSignal;
    }

  #### Returns Promise<ApiPagingResults<T>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:151

### userRemoveContact

- userRemoveContact(idUser: number): Promise<ApiDefaultWrapper<BaseMessages>>

  #### Parameters

  - idUser: number

  #### Returns Promise<ApiDefaultWrapper<BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:257

### userUpdateBusinessContact

- userUpdateBusinessContact<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = LIST,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  user: {
  company?: string;
  field1?: string;
  field2?: string;
  field3?: string;
  field4?: string;
  field5?: string;
  firstname: string;
  function?: string;
  lastname: string;
  mail?: string;
  phoneNumber?: string;
  title: string;
  uri: string;
  },
  options?: { format?: F; formatExtension?: E; signal?: AbortSignal },
  ): Promise<ApiWrapper<ArticleReturn<F, T, E>, BaseMessages>>

  #### Type Parameters

  - F extends "raw-little" | "raw-list" | "raw-view" = LIST
  - T extends string | number | symbol = never
  - E extends ArticleFormatsExtension = []

  #### Parameters

  - user: {
    company?: string;
    field1?: string;
    field2?: string;
    field3?: string;
    field4?: string;
    field5?: string;
    firstname: string;
    function?: string;
    lastname: string;
    mail?: string;
    phoneNumber?: string;
    title: string;
    uri: string;
    }
  - `Optional` options: { format?: F; formatExtension?: E; signal?: AbortSignal }

  #### Returns Promise<ApiWrapper<ArticleReturn<F, T, E>, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:204

### userUpdateProfile

- userUpdateProfile(
  values: {
  businessManagementManager?: UserLittle[];
  businessNetworkingUserToCompanySrc?: UserLittle[];
  company: string;
  country: string;
  dateOfBirth: string;
  department: string;
  description: string;
  field1: string;
  field2: string;
  field3: string;
  field4: string;
  field5: string;
  firstname: string;
  function: string;
  image?: string;
  language:
  | "es"
  | "de"
  | "en"
  | "fl"
  | "fr"
  | "it"
  | "nl"
  | "pl"
  | "pt"
  | "ro"
  | "tr";
  lastname: string;
  level: string;
  mail?: string;
  mobileNumber: string;
  phoneNumber: string;
  timeZone: string;
  title: string;
  userBanner?: string;
  webSite: string;
  },
  ): Promise<ApiWrapper<jUserLittle, BaseMessages>>

  #### Parameters

  - values: {
    businessManagementManager?: UserLittle[];
    businessNetworkingUserToCompanySrc?: UserLittle[];
    company: string;
    country: string;
    dateOfBirth: string;
    department: string;
    description: string;
    field1: string;
    field2: string;
    field3: string;
    field4: string;
    field5: string;
    firstname: string;
    function: string;
    image?: string;
    language:
    | "es"
    | "de"
    | "en"
    | "fl"
    | "fr"
    | "it"
    | "nl"
    | "pl"
    | "pt"
    | "ro"
    | "tr";
    lastname: string;
    level: string;
    mail?: string;
    mobileNumber: string;
    phoneNumber: string;
    timeZone: string;
    title: string;
    userBanner?: string;
    webSite: string;
    }

  #### Returns Promise<ApiWrapper<jUserLittle, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/user/user.ts:120