@vonq/hapi-elements-types 1.14.0 → 1.16.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.
@@ -13,10 +13,7 @@ import { RecursivePartial } from "../common"
13
13
  export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
14
14
  {
15
15
  isObject: (item: any) => boolean
16
- mergeDeepOverwriteArrays: <T>(
17
- original: T,
18
- overwrites: RecursivePartial<T>,
19
- ) => T
16
+ mergeDeepOverwriteArrays: (original: any, overwrites: any) => any
20
17
  getComponentNameIndexSuffix: (instanceName: string) => string
21
18
  getIframeLoadingSpinner: () => HTMLDivElement
22
19
  product: WindowHapiUtilsProduct
package/ats/api.types.ts CHANGED
@@ -1,10 +1,5 @@
1
1
  import { AxiosRequestConfig } from "axios/index"
2
- import {
3
- ATSDataResponse,
4
- ATSMessage,
5
- ATSSettings,
6
- ATSUserTokenResponse,
7
- } from "./types"
2
+ import { ATSMessage, ATSSettings, ATSUserTokenResponse } from "./types"
8
3
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
9
4
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
10
5
 
@@ -2,12 +2,15 @@ import {
2
2
  HapiServiceFunctionWithLifecycleHooks,
3
3
  WindowHapiService,
4
4
  } from "../_window/service.types"
5
- import { ATSMessage, ATSSettings } from "./types"
5
+ import { ATSMessage, 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
+
12
+ export type ATSServiceGetUserDataHandler = () => Promise<ATSUserData | undefined>
13
+
11
14
  export type ATSServiceGetMessagesHandler = () => Promise<ATSMessage[]>
12
15
 
13
16
  export type ATSServiceSendMessageHandler = (
@@ -1,6 +1,7 @@
1
- import { ATSSettings, ATSUserPaymentSetting } from "./types"
1
+ import { ATSSettings, ATSUserPaymentSetting, ATSUserData } from "./types"
2
2
 
3
3
  export type ATSState = {
4
4
  userSettings: ATSSettings | null
5
+ userData: ATSUserData | null
5
6
  displayCurrencyPaymentSettings: ATSUserPaymentSetting | null
6
7
  }
package/ats/types.ts CHANGED
@@ -22,6 +22,16 @@ export type ATSSettings = {
22
22
  settings: ATSUserSettings
23
23
  }
24
24
 
25
+ export type ATSUserData = {
26
+ customer_id: string;
27
+ id: string;
28
+ ats: {
29
+ id: string;
30
+ hapi_partner_id: string;
31
+ name: string;
32
+ }
33
+ };
34
+
25
35
  export type ATSUserTokenResponse = {
26
36
  token: string
27
37
  }
@@ -14,7 +14,6 @@ import {
14
14
  } from "./types"
15
15
  import { Product } from "../product/types"
16
16
  import { Contract } from "../contract/types"
17
- import { BasketProduct } from "../basket/types"
18
17
  import { WindowHapiUtils } from "../_window/utils.types"
19
18
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
20
19
 
@@ -3,10 +3,6 @@ import { WindowHapiUtils } from "../_window/utils.types"
3
3
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
4
4
  import { Contract } from "../contract"
5
5
  import { Product } from "../product"
6
- import {
7
- orderJourneyGetContractIdFromContractStepKey,
8
- orderJourneyGetContractStepKey,
9
- } from "../../common/orderJourney/utils"
10
6
 
11
7
  export type WindowHapiUtilsOrderJourney = WindowHapiModuleWithConstructorArgs<
12
8
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.14.0",
4
+ "version": "1.16.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
@@ -11,10 +11,6 @@ import {
11
11
  } from "./types"
12
12
  import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
13
13
  import { PaginatedAPIResponseV1, PaginationLimitOffset } from "../common/types"
14
- import {
15
- WindowHapiAPIATSConfigs,
16
- WindowHapiAPIATSRequests,
17
- } from "../ats/api.types"
18
14
  import { WindowHapiModuleWithConstructorArgs } from "../_window"
19
15
 
20
16
  export type WindowHapiAPIProductConfigs = {