@equinor/subsurface-app-management 4.3.0 → 4.3.1

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.
@@ -2,8 +2,8 @@ export type Faq = {
2
2
  id: number;
3
3
  question: string;
4
4
  answer: string;
5
- visible: boolean;
6
5
  orderBy?: number | null;
7
- roles?: Array<string> | null;
8
6
  faqCategoryId: number;
7
+ updatedDate?: string | null;
8
+ createdDate?: string | null;
9
9
  };
@@ -1,6 +1,10 @@
1
+ import { Faq } from './..';
1
2
  export type FaqCategory = {
2
3
  id: number;
3
4
  categoryName: string;
4
5
  orderBy?: number | null;
5
6
  applicationId: string;
7
+ faqs: Array<Faq>;
8
+ updatedDate?: string | null;
9
+ createdDate?: string | null;
6
10
  };
@@ -6,4 +6,5 @@ export type Step = {
6
6
  key?: string | null;
7
7
  position?: TutorialPosition;
8
8
  imgUrl?: string | null;
9
+ orderBy?: number | null;
9
10
  };
@@ -5,4 +5,5 @@ export type StepDto = {
5
5
  imgUrl?: string | null;
6
6
  highlightElement?: boolean | null;
7
7
  custom?: boolean | null;
8
+ orderBy?: number | null;
8
9
  };
@@ -2,6 +2,13 @@ import type { Faq } from '../models/Faq';
2
2
  import type { FaqCategory } from '../models/FaqCategory';
3
3
  import type { CancelablePromise } from '../core/CancelablePromise';
4
4
  export declare class FaqService {
5
+ /**
6
+ * Get FAQ categories and related FAQs based on application id
7
+ * @param applicationId
8
+ * @returns FaqCategory OK
9
+ * @throws ApiError
10
+ */
11
+ static getCategoriesWithFaqsFromApplicationName(applicationName: string): CancelablePromise<Array<FaqCategory>>;
5
12
  /**
6
13
  * Get FAQ image
7
14
  * @param path
@@ -1 +1 @@
1
- import{OpenAPI_SAM_Prod as t}from"../core/OpenAPI.js";import{request as a}from"../core/request.js";class r{static getFaqImage(r){return a(t,{method:"GET",url:"/api/v1/Faq/getfaqimage/{path}",path:{path:r},errors:{404:"Not Found"}})}static getFaqCategoriesFromApplicationId(r){return a(t,{method:"GET",url:"/api/v1/Faq/faqcategories/{applicationId}",path:{applicationId:r}})}static getFaqsFromCategoryId(r){return a(t,{method:"GET",url:"/api/v1/Faq/faqs/{categoryId}",path:{categoryId:r}})}static getFaqById(r){return a(t,{method:"GET",url:"/api/v1/Faq/faq/{id}",path:{id:r}})}}export{r as FaqService};
1
+ import{OpenAPI_SAM_Prod as a}from"../core/OpenAPI.js";import{request as t}from"../core/request.js";class e{static getCategoriesWithFaqsFromApplicationName(e){return t(a,{method:"GET",url:"/api/v1/Faq/faqcategorieswithfaqs/{applicationName}",path:{applicationName:e}})}static getFaqImage(e){return t(a,{method:"GET",url:"/api/v1/Faq/getfaqimage/{path}",path:{path:e},errors:{404:"Not Found"}})}static getFaqCategoriesFromApplicationId(e){return t(a,{method:"GET",url:"/api/v1/Faq/faqcategories/{applicationId}",path:{applicationId:e}})}static getFaqsFromCategoryId(e){return t(a,{method:"GET",url:"/api/v1/Faq/faqs/{categoryId}",path:{categoryId:e}})}static getFaqById(e){return t(a,{method:"GET",url:"/api/v1/Faq/faq/{id}",path:{id:e}})}}export{e as FaqService};
@@ -1 +1 @@
1
- import{useQuery as t}from"@tanstack/react-query";import"../api/core/OpenAPI.js";import"../api/models/ApplicationCategory.js";import"../api/models/ServiceNowUrgency.js";import"../api/models/TutorialPosition.js";import{TutorialService as r}from"../api/services/TutorialService.js";import{GET_TUTORIALS_FOR_APP as i}from"../constants/queryKeys.js";import{EnvironmentType as o}from"../types/Environment.js";import"../types/ReleaseNotes.js";import{getEnvironmentName as e,getAppName as a}from"../utils/environment.js";function p(){return t({queryKey:[i],queryFn:async()=>{if(e(import.meta.env.VITE_ENVIRONMENT_NAME)===o.PRODUCTION){return(await r.getMyTutorialsForApplication(a(import.meta.env.VITE_NAME),!1)).map((t=>({...t,id:t.tutorialDraftId?t.tutorialDraftId:t.id})))}return r.getDraftTutorialsForApplication(a(import.meta.env.VITE_NAME))}})}export{p as useTutorialsQuery};
1
+ import{useQuery as r}from"@tanstack/react-query";import"../api/core/OpenAPI.js";import"../api/models/ApplicationCategory.js";import"../api/models/ServiceNowUrgency.js";import"../api/models/TutorialPosition.js";import{TutorialService as t}from"../api/services/TutorialService.js";import{GET_TUTORIALS_FOR_APP as o}from"../constants/queryKeys.js";import{EnvironmentType as e}from"../types/Environment.js";import"../types/ReleaseNotes.js";import{getEnvironmentName as i,getAppName as s}from"../utils/environment.js";function p(){return r({queryKey:[o],queryFn:async()=>{if(i(import.meta.env.VITE_ENVIRONMENT_NAME)===e.PRODUCTION){return(await t.getMyTutorialsForApplication(s(import.meta.env.VITE_NAME),!1)).map((r=>({...r,id:r.tutorialDraftId?r.tutorialDraftId:r.id,steps:r.steps.sort(((r,t)=>(r.orderBy??0)-(t.orderBy??0)))})))}return t.getDraftTutorialsForApplication(s(import.meta.env.VITE_NAME))}})}export{p as useTutorialsQuery};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "React Typescript components/hooks to communicate with equinor/sam",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",