# Class JFaqApi

#### Hierarchy (View Summary)

- JBaseApi
  - JFaqApi

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

##### Index

### Constructors

constructor

### Properties

jApi
network

### Methods

addEntry
checkItem
createCategory
createEntry
createTheme
deleteCategory
deleteEntry
deleteTheme
getAccess
getCategoriesList
getEntry
getHookProperties
getTaxonomy
moveEntry
moveTheme
updateCategory
updateEntry
updateTheme

## Constructors

### constructor

- new JFaqApi(jApi: JamespotUserApi): JFaqApi

  #### Parameters

  - jApi: JamespotUserApi

  #### Returns JFaqApi

  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

### addEntry

- addEntry<T extends jArticleLittle = FaqView>(
  params: { idCategory: number; idEntry: number; theme: number },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<T, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqView

  #### Parameters

  - params: { idCategory: number; idEntry: number; theme: number }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

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

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

### checkItem

- checkItem<T extends FaqItemList>(
  query: string,
  page?: number,
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<PagingResults<Merge<T, FaqItemExtra>>, BaseMessages>>

  #### Type Parameters

  - T extends FaqItemList

  #### Parameters

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

  #### Returns Promise<ApiWrapper<PagingResults<Merge<T, FaqItemExtra>>, BaseMessages>>

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

### createCategory

- createCategory<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = VIEW,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  payload: Omit<CreateFaqCategory, "type">,
  options?: { format?: F; formatExtension?: E },
  ): PromiseApiWrapper<ArticleReturn<F, T, E>[]>

  #### Type Parameters

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

  #### Parameters

  - payload: Omit<CreateFaqCategory, "type">
  - `Optional` options: { format?: F; formatExtension?: E }

  #### Returns PromiseApiWrapper<ArticleReturn<F, T, E>[]>

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

### createEntry

- createEntry<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = VIEW,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  payload: Omit<CreateFaqEntry, "type">,
  options?: { format?: F; formatExtension?: E },
  ): PromiseApiWrapper<ArticleReturn<F, T, E>[]>

  #### Type Parameters

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

  #### Parameters

  - payload: Omit<CreateFaqEntry, "type">
  - `Optional` options: { format?: F; formatExtension?: E }

  #### Returns PromiseApiWrapper<ArticleReturn<F, T, E>[]>

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

### createTheme

- createTheme<T extends jArticleLittle = FaqView>(
  params: { idCategory: number; title: string },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<T, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqView

  #### Parameters

  - params: { idCategory: number; title: string }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

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

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

### deleteCategory

- deleteCategory(id: number): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - id: number

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

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

### deleteEntry

- deleteEntry(id: number): Promise<ApiWrapper<boolean, BaseMessages>>

  #### Parameters

  - id: number

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

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

### deleteTheme

- deleteTheme<T extends jArticleLittle = FaqView>(
  params: {
  deleteEntries?: boolean;
  idCategory: number;
  indexTheme: number;
  },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<T, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqView

  #### Parameters

  - params: { deleteEntries?: boolean; idCategory: number; indexTheme: number }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

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

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

### getAccess

- getAccess(): Promise<ApiWrapper<{ createCategory: boolean }, BaseMessages>>

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

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

### getCategoriesList

- getCategoriesList<
  T extends ExtendedFaqCategory<FaqList> = ExtendedFaqCategory<FaqList>,
  >(
  format?: "raw-little" | "raw-list" | "raw-view",
  orders?: Orders,
  ): Promise<ApiWrapper<PagingResults<T>, BaseMessages>>

  #### Type Parameters

  - T extends ExtendedFaqCategory<FaqList> = ExtendedFaqCategory<FaqList>

  #### Parameters

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

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

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

### getEntry

- getEntry<T extends jArticleLittle = FaqItemView>(
  uri: string,
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<T, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqItemView

  #### Parameters

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

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

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

### getHookProperties

- getHookProperties(
  properties?: optionalKeys<
  baseObjectOutputType<
  {
  _displayComment: ZodOptional<
  ZodUnion<[ZodLiteral<"0">, ZodLiteral<"1">, ZodLiteral<"">]>,
  >;
  _web: ZodOptional<
  ZodUnion<[ZodLiteral<"0">, ZodLiteral<"1">, ZodLiteral<"">]>,
  >;
  appImage: ZodOptional<
  ZodUnion<
  [
  ZodString,
  ZodObject<
  { image: ZodObject<(...), (...), (...), (...), (...)> },
  "strip",
  ZodTypeAny,
  { image: { id: ...; type: ... } },
  { image: { id: ...; type: ... } },
  >,
  ],
  >,
  >;
  appImageText: ZodOptional<ZodString>;
  },
  >,
  >[],
  ): Promise<
  ApiWrapper<
  {
  _displayComment?: ""
  | "0"
  | "1";
  _web?: "" | "0" | "1";
  appImage?: string | { image: { id: string; type: string } };
  appImageText?: string;
  },
  BaseMessages,
  >,
  >

  #### Parameters

  - `Optional` properties: optionalKeys<
    baseObjectOutputType<
    {
    _displayComment: ZodOptional<
    ZodUnion<[ZodLiteral<"0">, ZodLiteral<"1">, ZodLiteral<"">]>,
    >;
    _web: ZodOptional<
    ZodUnion<[ZodLiteral<"0">, ZodLiteral<"1">, ZodLiteral<"">]>,
    >;
    appImage: ZodOptional<
    ZodUnion<
    [
    ZodString,
    ZodObject<
    { image: ZodObject<(...), (...), (...), (...), (...)> },
    "strip",
    ZodTypeAny,
    { image: { id: ...; type: ... } },
    { image: { id: ...; type: ... } },
    >,
    ],
    >,
    >;
    appImageText: ZodOptional<ZodString>;
    },
    >,
    >[]

  #### Returns Promise<
  ApiWrapper<
  {
  _displayComment?: ""
  | "0"
  | "1";
  _web?: "" | "0" | "1";
  appImage?: string | { image: { id: string; type: string } };
  appImageText?: string;
  },
  BaseMessages,
  >,
  >

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

### getTaxonomy

- getTaxonomy(): Promise<ApiWrapper<{ id: string; title: string }, BaseMessages>>

  #### Returns Promise<ApiWrapper<{ id: string; title: string }, BaseMessages>>

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

### moveEntry

- moveEntry<T extends jArticleLittle = FaqView>(
  params: {
  entryURI: string;
  sourceURI?: string;
  targetURI: string;
  theme: number;
  },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<{ source?: T; target: T }, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqView

  #### Parameters

  - params: { entryURI: string; sourceURI?: string; targetURI: string; theme: number }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

  #### Returns Promise<ApiWrapper<{ source?: T; target: T }, BaseMessages>>

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

### moveTheme

- moveTheme<T extends jArticleLittle = FaqView>(
  params: { sourceUri: string; targetUri: string; themeIndex: number },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiWrapper<{ source: T; target: T }, BaseMessages>>

  #### Type Parameters

  - T extends jArticleLittle = FaqView

  #### Parameters

  - params: { sourceUri: string; targetUri: string; themeIndex: number }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

  #### Returns Promise<ApiWrapper<{ source: T; target: T }, BaseMessages>>

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

### updateCategory

- updateCategory<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = LIST,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  payload: Omit<EditFaqCategory, "type">,
  options?: { format?: F; formatExtension?: E },
  ): PromiseApiWrapper<ArticleReturn<F, T, E>>

  #### Type Parameters

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

  #### Parameters

  - payload: Omit<EditFaqCategory, "type">
  - `Optional` options: { format?: F; formatExtension?: E }

  #### Returns PromiseApiWrapper<ArticleReturn<F, T, E>>

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

### updateEntry

- updateEntry<
  F extends "raw-little"
  | "raw-list"
  | "raw-view" = LIST,
  T extends string | number | symbol = never,
  E extends ArticleFormatsExtension = [],
  >(
  payload: Omit<EditFaqEntry, "type">,
  options?: { format?: F; formatExtension?: E },
  ): 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

  - payload: Omit<EditFaqEntry, "type">
  - `Optional` options: { format?: F; formatExtension?: E }

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

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

### updateTheme

- updateTheme(
  params: { idCategory: number; indexTheme: number; title: string },
  format?: "raw-little" | "raw-list" | "raw-view",
  ): Promise<ApiDefaultWrapper<BaseMessages>>

  #### Parameters

  - params: { idCategory: number; indexTheme: number; title: string }
  - `Optional` format: "raw-little" | "raw-list" | "raw-view"

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

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