@vonq/hapi-elements-types 1.7.0 → 1.8.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.
- package/README.md +21 -0
- package/_window/sdk.types.ts +9 -0
- package/_window/state.types.ts +1 -0
- package/ats/types.ts +1 -1
- package/basket/state.types.ts +4 -0
- package/package.json +1 -1
- package/product/enums.ts +1 -0
- package/product/utils.types.ts +0 -4
- package/routing/state.types.ts +1 -1
package/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
This package contains type definitions for VONQ HAPI Elements project.
|
2
|
+
|
3
|
+
To get started using the types, install the package as a dev dependency:
|
4
|
+
|
5
|
+
|
6
|
+
Using NPM:
|
7
|
+
```
|
8
|
+
npm install @vonq/hapi-elements-types --save-dev
|
9
|
+
```
|
10
|
+
|
11
|
+
Using Yarn:
|
12
|
+
```
|
13
|
+
yarn add -D @vonq/hapi-elements-types
|
14
|
+
```
|
15
|
+
|
16
|
+
All the types have been exported in a single file so you can get started using the types as such:
|
17
|
+
```
|
18
|
+
import {CreateCampaignForm} from "@vonq/hapi-elements-types";
|
19
|
+
|
20
|
+
const campaignObject: CreateCampaignForm = {} //Typescript will warn about missing properties
|
21
|
+
```
|
package/_window/sdk.types.ts
CHANGED
@@ -40,6 +40,7 @@ import {
|
|
40
40
|
WindowHapiClassInterface,
|
41
41
|
} from "./window"
|
42
42
|
import { WindowHapiServiceUI } from "../ui/service.types"
|
43
|
+
import { ATSState, WindowHapiAPIATS, WindowHapiServiceATS } from "../ats"
|
43
44
|
|
44
45
|
export type WindowHapiSDKModule<
|
45
46
|
APIModule,
|
@@ -126,8 +127,16 @@ export type WindowHapiSDKUI = WindowHapiSDKModule<
|
|
126
127
|
undefined,
|
127
128
|
undefined
|
128
129
|
>
|
130
|
+
export type WindowHapiSDKATS = WindowHapiSDKModule<
|
131
|
+
WindowHapiAPIATS,
|
132
|
+
WindowHapiServiceATS,
|
133
|
+
undefined,
|
134
|
+
WindowHapiStateModule<ATSState>
|
135
|
+
>
|
136
|
+
|
129
137
|
export type WindowHapiSDK = WindowHapiModuleWithConstructorArgs<
|
130
138
|
{
|
139
|
+
[WindowHapiModuleName.ats]: WindowHapiSDKATS
|
131
140
|
[WindowHapiModuleName.contract]: WindowHapiSDKContract
|
132
141
|
[WindowHapiModuleName.basket]: WindowHapiSDKBasket
|
133
142
|
[WindowHapiModuleName.campaign]: WindowHapiSDKCampaign
|
package/_window/state.types.ts
CHANGED
package/ats/types.ts
CHANGED
@@ -11,7 +11,7 @@ export type ATSUserSettings = {
|
|
11
11
|
ats_managed_payment: boolean
|
12
12
|
can_pay_with_purchase_order: boolean
|
13
13
|
can_use_wallets: boolean
|
14
|
-
invoice_currency: string
|
14
|
+
invoice_currency: string | null
|
15
15
|
}
|
16
16
|
export type ATSSettings = {
|
17
17
|
payment_settings: ATSUserPaymentSetting[]
|
package/basket/state.types.ts
CHANGED
@@ -23,6 +23,10 @@ export type BasketState = {
|
|
23
23
|
* Sum of prices of Products and/or Contracts in GBP currency. **This value is a computed getter meaning that it cannot be set from outside**
|
24
24
|
*/
|
25
25
|
totalInGBP: number
|
26
|
+
/**
|
27
|
+
* Sum of prices of Products and/or Contracts in AUD currency. **This value is a computed getter meaning that it cannot be set from outside**
|
28
|
+
*/
|
29
|
+
totalInAUD: number
|
26
30
|
/**
|
27
31
|
* Sum of prices of Products and/or Contracts in the current display currency that is used throughout the widgets. **This value is a computed getter meaning that it cannot be set from outside**
|
28
32
|
*/
|
package/package.json
CHANGED
package/product/enums.ts
CHANGED
package/product/utils.types.ts
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
|
2
2
|
import { PaginationResponseV1 } from "../common/types"
|
3
|
-
import {
|
4
|
-
OrderJourneyPaymentMethod,
|
5
|
-
OrderJourneyStepKey,
|
6
|
-
} from "../orderJourney/enums"
|
7
3
|
import { WindowHapiUtils } from "../_window/utils.types"
|
8
4
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
5
|
|
package/routing/state.types.ts
CHANGED