@equinor/subsurface-app-management 5.1.0 → 5.1.2

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.
@@ -25,6 +25,7 @@ export type { MyFeatureDto } from './models/MyFeatureDto';
25
25
  export type { Faq } from './models/Faq';
26
26
  export type { FaqDto } from './models/FaqDto';
27
27
  export type { FaqCategoriesWithFaqDto } from './models/FaqCategoriesWithFaqDto';
28
+ export type { BrowseImpactMetricDto } from './models/BrowseImpactMetricDto';
28
29
  export { AmplifyApplicationService } from './services/AmplifyApplicationService';
29
30
  export { FeatureToggleService } from './services/FeatureToggleService';
30
31
  export { ImpersonateUserService } from './services/ImpersonateUserService';
@@ -33,3 +34,4 @@ export { ServiceNowService } from './services/ServiceNowService';
33
34
  export { SlackService } from './services/SlackService';
34
35
  export { TutorialService } from './services/TutorialService';
35
36
  export { FaqService } from './services/FaqService';
37
+ export { AppAnalyticsService } from './services/AppAnalyticsService';
@@ -0,0 +1,10 @@
1
+ import type { BrowseImpactUrl } from './BrowseImpactUrl';
2
+ export type BrowseImpactMetric = {
3
+ id: string;
4
+ startTimeStamp: string;
5
+ endTimeStamp: string;
6
+ clickCount: number;
7
+ listUrlIds?: Array<BrowseImpactUrl> | null;
8
+ userId: string;
9
+ isSuccessful?: boolean | null;
10
+ };
@@ -0,0 +1,8 @@
1
+ import type { BrowseImpactUrlDto } from './BrowseImpactUrlDto';
2
+ export type BrowseImpactMetricDto = {
3
+ startTimeStamp: string;
4
+ endTimeStamp: string;
5
+ listUrlIds?: Array<BrowseImpactUrlDto> | null;
6
+ userId: string;
7
+ isSuccessful: boolean;
8
+ };
@@ -0,0 +1,6 @@
1
+ export type BrowseImpactUrl = {
2
+ id: number;
3
+ urlId: string;
4
+ timeStamp: string;
5
+ fkBrowseImpactMetricId: string;
6
+ };
@@ -0,0 +1,4 @@
1
+ export type BrowseImpactUrlDto = {
2
+ urlId: string;
3
+ timeStamp: string;
4
+ };
@@ -0,0 +1,11 @@
1
+ import type { BrowseImpactMetric } from '../models/BrowseImpactMetric';
2
+ import type { BrowseImpactMetricDto } from '../models/BrowseImpactMetricDto';
3
+ import type { CancelablePromise } from '../core/CancelablePromise';
4
+ export declare class AppAnalyticsService {
5
+ /**
6
+ * @param requestBody
7
+ * @returns BrowseImpactMetric OK
8
+ * @throws ApiError
9
+ */
10
+ static postApiV1AppAnalyticsPwexAddBrowseImpactMetrics(requestBody?: BrowseImpactMetricDto): CancelablePromise<BrowseImpactMetric>;
11
+ }
@@ -0,0 +1 @@
1
+ import{OpenAPI_SAM as r}from"../core/OpenAPI.js";import{request as e}from"../core/request.js";class o{static postApiV1AppAnalyticsPwexAddBrowseImpactMetrics(o){return e(r,{method:"POST",url:"/api/v1/AppAnalytics/pwex/addBrowseImpactMetrics",body:o,mediaType:"application/json",errors:{404:"Not Found"}})}}export{o as AppAnalyticsService};
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,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";
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,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{AppAnalyticsService}from"./api/services/AppAnalyticsService.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 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{createContext as r,useState as i,useMemo as t,useContext as e}from"react";import{useMatchRoute as s}from"@tanstack/react-router";import{useSeenTutorials as a}from"./useSeenTutorials.js";import"../FeatureToggleProvider.js";import"@tanstack/react-query";import"../../api/core/OpenAPI.js";import{useTutorialsQuery as n}from"../../hooks/useTutorialsQuery.js";import"@microsoft/signalr";import"../../api/models/ApplicationCategory.js";import"../../api/models/ServiceNowUrgency.js";import"../../api/models/TutorialPosition.js";import"../../types/Environment.js";import{usePrefetchTutorialStepImages as u}from"./hooks/usePrefetchTutorialStepImages.js";const p=r(void 0);function d(){const o=e(p);if(void 0===o)throw new Error("'useTutorials' must be used within provider");return o}const l=({children:r})=>{const{data:e=[]}=n(),[d,l]=i(void 0),[c,m]=i(void 0),[v,f]=a();u();const T=s(),h=t((()=>e?.filter((o=>T({to:o.path})))),[T,e]),w=t((()=>h?.filter((o=>!v.includes(o.id)&&o.willPopUp))),[v,h]);return o(p.Provider,{value:{allTutorials:e,tutorialsOnThisPage:h,unseenTutorialsOnThisPage:w,activeTutorial:d,activeStep:c,seenTutorialIDs:v,startTutorial:o=>{if(!e?.some((r=>o===r.id)))throw new Error("Tutorial not found");l(e.find((r=>o===r.id))),m(0)},skipTutorial:o=>{d&&d.id===o&&(l(void 0),m(void 0)),f(o)},goToNextStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");c+1>=d.steps.length?(f(d.id),l(void 0),m(void 0)):m(c+1)},goToPreviousStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");0===c?(l(void 0),m(void 0)):m(c-1)}},children:r})};export{p as TutorialDataContext,l as TutorialProvider,d as useTutorials};
1
+ import{jsx as o}from"react/jsx-runtime";import{createContext as r,useState as i,useMemo as t,useContext as e}from"react";import{useMatchRoute as s}from"@tanstack/react-router";import{useSeenTutorials as a}from"./useSeenTutorials.js";import"../FeatureToggleProvider.js";import"@tanstack/react-query";import"../../api/core/OpenAPI.js";import{useTutorialsQuery as n}from"../../hooks/useTutorialsQuery.js";import"@microsoft/signalr";import"../../api/models/ApplicationCategory.js";import"../../api/models/ServiceNowUrgency.js";import"../../api/models/TutorialPosition.js";import"../../types/Environment.js";import{usePrefetchTutorialStepImages as u}from"./hooks/usePrefetchTutorialStepImages.js";const p=r(void 0);function d(){const o=e(p);if(void 0===o)throw new Error("'useTutorials' must be used within provider");return o}const l=({children:r})=>{const{data:e=[]}=n(),[d,l]=i(void 0),[c,m]=i(void 0),[v,f]=a();u();const T=s(),h=e?.filter((o=>!!T({to:o.path}))),w=t((()=>h?.filter((o=>!v.includes(o.id)&&o.willPopUp))),[v,h]);return o(p.Provider,{value:{allTutorials:e,tutorialsOnThisPage:h,unseenTutorialsOnThisPage:w,activeTutorial:d,activeStep:c,seenTutorialIDs:v,startTutorial:o=>{if(!e?.some((r=>o===r.id)))throw new Error("Tutorial not found");l(e.find((r=>o===r.id))),m(0)},skipTutorial:o=>{d&&d.id===o&&(l(void 0),m(void 0)),f(o)},goToNextStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");c+1>=d.steps.length?(f(d.id),l(void 0),m(void 0)):m(c+1)},goToPreviousStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");0===c?(l(void 0),m(void 0)):m(c-1)}},children:r})};export{p as TutorialDataContext,l as TutorialProvider,d as useTutorials};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "React Typescript components/hooks to communicate with equinor/sam",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",