@equinor/subsurface-app-management 4.2.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.
@@ -22,6 +22,8 @@ export type { MyTutorialDto } from './models/MyTutorialDto';
22
22
  export type { StepDto } from './models/StepDto';
23
23
  export { TutorialPosition } from './models/TutorialPosition';
24
24
  export type { MyFeatureDto } from './models/MyFeatureDto';
25
+ export type { Faq } from './models/Faq';
26
+ export type { FaqCategory } from './models/FaqCategory';
25
27
  export { AmplifyApplicationService } from './services/AmplifyApplicationService';
26
28
  export { FeatureToggleService } from './services/FeatureToggleService';
27
29
  export { ImpersonateUserService } from './services/ImpersonateUserService';
@@ -29,3 +31,4 @@ export { ReleaseNotesService } from './services/ReleaseNotesService';
29
31
  export { ServiceNowService } from './services/ServiceNowService';
30
32
  export { SlackService } from './services/SlackService';
31
33
  export { TutorialService } from './services/TutorialService';
34
+ export { FaqService } from './services/FaqService';
@@ -0,0 +1,9 @@
1
+ export type Faq = {
2
+ id: number;
3
+ question: string;
4
+ answer: string;
5
+ orderBy?: number | null;
6
+ faqCategoryId: number;
7
+ updatedDate?: string | null;
8
+ createdDate?: string | null;
9
+ };
@@ -0,0 +1,10 @@
1
+ import { Faq } from './..';
2
+ export type FaqCategory = {
3
+ id: number;
4
+ categoryName: string;
5
+ orderBy?: number | null;
6
+ applicationId: string;
7
+ faqs: Array<Faq>;
8
+ updatedDate?: string | null;
9
+ createdDate?: string | null;
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
  };
@@ -0,0 +1,40 @@
1
+ import type { Faq } from '../models/Faq';
2
+ import type { FaqCategory } from '../models/FaqCategory';
3
+ import type { CancelablePromise } from '../core/CancelablePromise';
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>>;
12
+ /**
13
+ * Get FAQ image
14
+ * @param path
15
+ * @returns string OK
16
+ * @throws ApiError
17
+ */
18
+ static getFaqImage(path: string): CancelablePromise<string>;
19
+ /**
20
+ * Get FAQ categories from application id
21
+ * @param applicationId
22
+ * @returns FaqCategory OK
23
+ * @throws ApiError
24
+ */
25
+ static getFaqCategoriesFromApplicationId(applicationId: string): CancelablePromise<Array<FaqCategory>>;
26
+ /**
27
+ * Get FAQs from category id
28
+ * @param categoryId
29
+ * @returns Faq OK
30
+ * @throws ApiError
31
+ */
32
+ static getFaqsFromCategoryId(categoryId: number): CancelablePromise<Array<Faq>>;
33
+ /**
34
+ * Get FAQ by id
35
+ * @param id
36
+ * @returns Faq OK
37
+ * @throws ApiError
38
+ */
39
+ static getFaqById(id: number): CancelablePromise<Faq>;
40
+ }
@@ -0,0 +1 @@
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/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{Feature}from"./components/Feature/Feature.js";export{FeatureRoute}from"./components/FeatureRoute/FeatureRoute.js";export{FeatureToggleProvider,useFeatureToggleContext}from"./providers/FeatureToggleProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{useTutorialsQuery}from"./hooks/useTutorialsQuery.js";export{useTutorialStepImage}from"./hooks/useTutorialStepImage.js";export{useSignalRMessages}from"./hooks/useSignalRMessages.js";export{TutorialProvider,useTutorials}from"./providers/TutorialProvider/TutorialProvider.js";export{ApplicationInsightsProvider}from"./providers/ApplicationInsightsProvider/ApplicationInsightsProvider.js";export{samTrackEvent,samTrackMetric}from"./providers/ApplicationInsightsProvider/ApplicationInsightsProvider.utils.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";import*as e from"./utils/environment.js";export{e as environment};export{ApiError}from"./api/core/ApiError.js";export{CancelError,CancelablePromise}from"./api/core/CancelablePromise.js";export{OpenAPI_APP,getJSEmbarkToken,getPortalToken,getSAMToken}from"./api/core/OpenAPI.js";export{request}from"./api/core/request.js";export{ApplicationCategory}from"./api/models/ApplicationCategory.js";export{ServiceNowUrgency}from"./api/models/ServiceNowUrgency.js";export{TutorialPosition}from"./api/models/TutorialPosition.js";export{AmplifyApplicationService}from"./api/services/AmplifyApplicationService.js";export{FeatureToggleService}from"./api/services/FeatureToggleService.js";export{ImpersonateUserService}from"./api/services/ImpersonateUserService.js";export{ReleaseNotesService}from"./api/services/ReleaseNotesService.js";export{ServiceNowService}from"./api/services/ServiceNowService.js";export{SlackService}from"./api/services/SlackService.js";export{TutorialService}from"./api/services/TutorialService.js";export{GET_FEATURE_TOGGLES_FOR_APP,GET_RELEASE_NOTES,GET_TUTORIALS_FOR_APP,GET_TUTORIALS_SAS_TOKEN,GET_TUTORIAL_STEP_IMAGE,SAM_QUERIES}from"./constants/queryKeys.js";
1
+ export{Feature}from"./components/Feature/Feature.js";export{FeatureRoute}from"./components/FeatureRoute/FeatureRoute.js";export{FeatureToggleProvider,useFeatureToggleContext}from"./providers/FeatureToggleProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{useTutorialsQuery}from"./hooks/useTutorialsQuery.js";export{useTutorialStepImage}from"./hooks/useTutorialStepImage.js";export{useSignalRMessages}from"./hooks/useSignalRMessages.js";export{TutorialProvider,useTutorials}from"./providers/TutorialProvider/TutorialProvider.js";export{ApplicationInsightsProvider}from"./providers/ApplicationInsightsProvider/ApplicationInsightsProvider.js";export{samTrackEvent,samTrackMetric}from"./providers/ApplicationInsightsProvider/ApplicationInsightsProvider.utils.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";import*as e from"./utils/environment.js";export{e as environment};export{ApiError}from"./api/core/ApiError.js";export{CancelError,CancelablePromise}from"./api/core/CancelablePromise.js";export{OpenAPI_APP,getJSEmbarkToken,getPortalToken,getSAMToken}from"./api/core/OpenAPI.js";export{request}from"./api/core/request.js";export{ApplicationCategory}from"./api/models/ApplicationCategory.js";export{ServiceNowUrgency}from"./api/models/ServiceNowUrgency.js";export{TutorialPosition}from"./api/models/TutorialPosition.js";export{AmplifyApplicationService}from"./api/services/AmplifyApplicationService.js";export{FeatureToggleService}from"./api/services/FeatureToggleService.js";export{ImpersonateUserService}from"./api/services/ImpersonateUserService.js";export{ReleaseNotesService}from"./api/services/ReleaseNotesService.js";export{ServiceNowService}from"./api/services/ServiceNowService.js";export{SlackService}from"./api/services/SlackService.js";export{TutorialService}from"./api/services/TutorialService.js";export{FaqService}from"./api/services/FaqService.js";export{GET_FEATURE_TOGGLES_FOR_APP,GET_RELEASE_NOTES,GET_TUTORIALS_FOR_APP,GET_TUTORIALS_SAS_TOKEN,GET_TUTORIAL_STEP_IMAGE,SAM_QUERIES}from"./constants/queryKeys.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "4.2.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",