@vonq/hapi-elements-types 1.41.0 → 1.42.0

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.
@@ -4,7 +4,7 @@ import {
4
4
  RawAxiosRequestConfig,
5
5
  RawAxiosRequestHeaders,
6
6
  } from "axios"
7
- import { WindowHapiModuleName } from "../common/enums"
7
+ import { WindowHapiModuleName, WindowHapiSubmoduleName } from "../common/enums"
8
8
  import { WindowHapiAPIATS } from "../ats/api.types"
9
9
  import { WindowHapiAPICampaign } from "../campaign/api.types"
10
10
  import { WindowHapiAPIContract } from "../contract/api.types"
@@ -111,11 +111,17 @@ export type WindowHapiAPI = WindowHapiModuleWithConstructorArgs<
111
111
  headers: RawAxiosRequestHeaders
112
112
  setHeaders: (headers: RawAxiosRequestHeaders) => void
113
113
  baseRequestConfig: RawAxiosRequestConfig<any>
114
- makeDataRequest: (
115
- method: "get" | "put" | "patch",
114
+ makeElementsAPIRequest: (
115
+ method: string,
116
116
  endpoint: string,
117
117
  data?: any,
118
+ params?: Record<string, any>,
118
119
  ) => Promise<any>
120
+ makeSDKUsageElementsAPIRequest: (
121
+ moduleName: WindowHapiSubmoduleName,
122
+ functionName: string,
123
+ functionType?: string,
124
+ ) => void
119
125
  modules: WindowHapiAPIModules
120
126
  } & WindowHapiAPIModules,
121
127
  { readonly core: WindowHapiClassInterface }
@@ -3,3 +3,7 @@ export type DebugPanelPosition =
3
3
  | "bottom-right"
4
4
  | "top-left"
5
5
  | "top-right"
6
+
7
+ export type HE_SDK_USAGE_LOG_FLAG_OBJECT_TYPE = {
8
+ __he_skipLoggingSDKUsage: boolean
9
+ }
@@ -29,6 +29,7 @@ export type HapiServiceFunctionLifecycleHookHandler = (
29
29
 
30
30
  export type HapiServiceFunctionWithLifecycleHooks<HandlerType> = {
31
31
  run: HandlerType
32
+ runWithoutSDKUsageLog: HandlerType
32
33
  onStart: HapiServiceFunctionLifecycleHookHandler
33
34
  onSuccess: HapiServiceFunctionLifecycleHookHandler
34
35
  onFailure: HapiServiceFunctionLifecycleHookHandler
package/ats/api.types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from "axios/index"
2
- import { ATSMessage, ATSSettings, ATSUserTokenResponse } from "./types"
2
+ import { ATSSettings, ATSUserTokenResponse } from "./types"
3
3
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
4
4
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
5
5
 
@@ -15,8 +15,6 @@ export type WindowHapiAPIATSRequests = {
15
15
  refreshJWTToken: () => Promise<ATSUserTokenResponse>
16
16
  validateJWTToken: () => Promise<boolean>
17
17
  getUserData: () => Promise<any>
18
- getMessages: () => Promise<ATSMessage[]>
19
- sendMessage: (ticket: ATSMessage) => Promise<ATSMessage[]>
20
18
  }
21
19
  export type WindowHapiAPIATS = WindowHapiModuleWithConstructorArgs<
22
20
  WindowHapiAPIModule<WindowHapiAPIATSRequests, WindowHapiAPIATSConfigs>,
@@ -2,26 +2,20 @@ import {
2
2
  HapiServiceFunctionWithLifecycleHooks,
3
3
  WindowHapiService,
4
4
  } from "../_window/service.types"
5
- import { ATSMessage, ATSSettings, ATSUserData } from "./types"
5
+ import { ATSSettings, ATSUserData } from "./types"
6
6
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
7
7
 
8
8
  export type ATSServiceGetUserSettingsHandler = () => Promise<
9
9
  ATSSettings | undefined
10
10
  >
11
11
 
12
- export type ATSServiceGetUserDataHandler = () => Promise<ATSUserData | undefined>
13
-
14
- export type ATSServiceGetMessagesHandler = () => Promise<ATSMessage[]>
15
-
16
- export type ATSServiceSendMessageHandler = (
17
- message: ATSMessage,
18
- ) => Promise<ATSMessage[]>
12
+ export type ATSServiceGetUserDataHandler = () => Promise<
13
+ ATSUserData | undefined
14
+ >
19
15
 
20
16
  export type WindowHapiServiceATS = WindowHapiModuleWithConstructorArgs<
21
17
  {
22
18
  getUserSettings: HapiServiceFunctionWithLifecycleHooks<ATSServiceGetUserSettingsHandler>
23
- getMessages: HapiServiceFunctionWithLifecycleHooks<ATSServiceGetMessagesHandler>
24
- sendMessage: HapiServiceFunctionWithLifecycleHooks<ATSServiceSendMessageHandler>
25
19
  },
26
20
  { readonly service: WindowHapiService }
27
21
  >
package/ats/types.ts CHANGED
@@ -54,17 +54,3 @@ export type ATSUserData = {
54
54
  export type ATSUserTokenResponse = {
55
55
  token: string
56
56
  }
57
-
58
- export type ATSMessage = {
59
- id?: string
60
- sender: "ats" | "vonq"
61
- createdAt?: string
62
- message: string
63
- }
64
-
65
- export type ATSDataResponse = {
66
- data: {
67
- messages: ATSMessage[]
68
- }
69
- type: "elements"
70
- }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.41.0",
4
+ "version": "1.42.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",