@vonq/hapi-elements-types 1.59.0 → 1.61.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/_window/sdk.types.ts +1 -1
- package/_window/state.types.ts +1 -1
- package/ats/types.ts +4 -0
- package/basket/service.types.ts +0 -1
- package/campaign/api.types.ts +5 -3
- package/campaign/service.types.ts +9 -4
- package/campaign/types.ts +6 -13
- package/common/types.ts +1 -0
- package/language/enums.ts +2 -0
- package/package.json +1 -1
package/_window/sdk.types.ts
CHANGED
|
@@ -54,7 +54,7 @@ import { ExperimentalState } from "../experimental/state.types"
|
|
|
54
54
|
import { ProductCacheState } from "../product/state.cache.types"
|
|
55
55
|
import { WindowHapiValidationsUI } from "../ui/validations.types"
|
|
56
56
|
import { WindowHapiUtilsUI } from "../ui/utils.types"
|
|
57
|
-
import { UIState } from "
|
|
57
|
+
import { UIState } from "../ui/state.types"
|
|
58
58
|
import { WindowHapiEventStorageRemoveHandler } from "./events.types"
|
|
59
59
|
|
|
60
60
|
export type WindowHapiSDKModule<
|
package/_window/state.types.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { DebuggingState } from "../debugging/state.types"
|
|
|
6
6
|
import { LanguageState } from "../language/state.types"
|
|
7
7
|
import { ProductState } from "../product/state.types"
|
|
8
8
|
import { ThemingState } from "../theming/state.types"
|
|
9
|
-
import { UIState } from "
|
|
9
|
+
import { UIState } from "../ui/state.types"
|
|
10
10
|
import { OrderJourneyState } from "../orderJourney/state.types"
|
|
11
11
|
import { WalletState } from "../wallet/state.types"
|
|
12
12
|
import { ModalState } from "../modal/state.types"
|
package/ats/types.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type ATSUserPaymentSetting = {
|
|
|
18
18
|
}
|
|
19
19
|
payment_method_types: WalletPaymentIntentPaymentMethod[] | null
|
|
20
20
|
}
|
|
21
|
+
|
|
21
22
|
export type ATSUserSettings = {
|
|
22
23
|
ats_managed_payment: boolean
|
|
23
24
|
can_pay_with_purchase_order: boolean
|
|
@@ -35,6 +36,9 @@ export type ATSUserSettings = {
|
|
|
35
36
|
campaigns?: {
|
|
36
37
|
enable_weekly_working_minutes: boolean
|
|
37
38
|
}
|
|
39
|
+
products?: {
|
|
40
|
+
he_product_filters_layout: "v1" | "v2"
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
43
|
export type ATSSettings = {
|
|
40
44
|
payment_settings: ATSUserPaymentSetting[]
|
package/basket/service.types.ts
CHANGED
package/campaign/api.types.ts
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
Campaign,
|
|
4
4
|
CampaignApplication,
|
|
5
5
|
CampaignApplicationFileGenerated,
|
|
6
|
+
CampaignDetail,
|
|
7
|
+
CampaignDraftOldBackwardsCompatability,
|
|
6
8
|
CampaignEditRequestBody,
|
|
7
9
|
CampaignIdResponse,
|
|
8
10
|
CampaignOrderRequestBody,
|
|
@@ -54,7 +56,7 @@ export type WindowHapiAPICampaignRequests = {
|
|
|
54
56
|
getCampaignDetail: (
|
|
55
57
|
campaignId: string,
|
|
56
58
|
detail: "status",
|
|
57
|
-
) => Promise<
|
|
59
|
+
) => Promise<CampaignDetail>
|
|
58
60
|
getCampaignApplications: (
|
|
59
61
|
campaignId: string,
|
|
60
62
|
queryParams?: Record<string, any>,
|
|
@@ -67,13 +69,13 @@ export type WindowHapiAPICampaignRequests = {
|
|
|
67
69
|
setCampaignCancellation: (
|
|
68
70
|
campaignId: string,
|
|
69
71
|
body: Partial<Campaign>,
|
|
70
|
-
) => Promise<
|
|
72
|
+
) => Promise<CampaignIdResponse>
|
|
71
73
|
getEducationLevels: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
|
|
72
74
|
getSeniorities: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
|
|
73
75
|
orderCampaign: (
|
|
74
76
|
postBody: CampaignOrderRequestBody,
|
|
75
77
|
queryParams?: Record<string, any>,
|
|
76
|
-
) => Promise<
|
|
78
|
+
) => Promise<CampaignIdResponse & CampaignDraftOldBackwardsCompatability>
|
|
77
79
|
saveCampaign: (postBody: CampaignEditRequestBody) => Promise<Campaign>
|
|
78
80
|
validateCampaign: (postBody: CampaignOrderRequestBody) => Promise<Campaign>
|
|
79
81
|
validateCampaignPostingRequirements: (
|
|
@@ -6,6 +6,9 @@ import { ProductSupportingContractsComplete } from "../product/types"
|
|
|
6
6
|
import {
|
|
7
7
|
Campaign,
|
|
8
8
|
CampaignCreateForm,
|
|
9
|
+
CampaignDetail,
|
|
10
|
+
CampaignDraft,
|
|
11
|
+
CampaignDraftOldBackwardsCompatability,
|
|
9
12
|
CampaignEditForm,
|
|
10
13
|
CampaignIdResponse,
|
|
11
14
|
CampaignOrderRequestBody,
|
|
@@ -37,22 +40,24 @@ export type CampaignServiceGetCampaignsLabeledHandler = (
|
|
|
37
40
|
export type CampaignServiceGetCampaignDetailHandler = (
|
|
38
41
|
campaignId: string,
|
|
39
42
|
detail: "status",
|
|
40
|
-
) => Promise<
|
|
43
|
+
) => Promise<CampaignDetail>
|
|
41
44
|
export type CampaignServiceGetCampaignHandler = (
|
|
42
45
|
campaignId: string,
|
|
43
46
|
queryParams?: Record<string, any>,
|
|
44
|
-
) => Promise<
|
|
47
|
+
) => Promise<Campaign>
|
|
45
48
|
export type CampaignServiceSetCampaignCancellationHandler = (
|
|
46
49
|
campaignId: string,
|
|
47
50
|
body: Partial<Campaign>,
|
|
48
|
-
) => Promise<
|
|
51
|
+
) => Promise<CampaignIdResponse>
|
|
49
52
|
export type CampaignServiceGetEducationLevelsHandler = () => Promise<
|
|
50
53
|
TaxonomyEducationAndSeniorityLevel[]
|
|
51
54
|
>
|
|
52
55
|
export type CampaignServiceGetSenioritiesHandler = () => Promise<
|
|
53
56
|
TaxonomyEducationAndSeniorityLevel[]
|
|
54
57
|
>
|
|
55
|
-
export type CampaignServiceOrderCampaignHandler = () => Promise<
|
|
58
|
+
export type CampaignServiceOrderCampaignHandler = () => Promise<
|
|
59
|
+
CampaignIdResponse & CampaignDraftOldBackwardsCompatability
|
|
60
|
+
>
|
|
56
61
|
export type CampaignServiceCopyCampaignHandler = (
|
|
57
62
|
campaign: Campaign,
|
|
58
63
|
withExistingProducts: boolean,
|
package/campaign/types.ts
CHANGED
|
@@ -46,6 +46,11 @@ export type CampaignDetail = {
|
|
|
46
46
|
campaignId: string
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
//alias for backwards compatibility
|
|
50
|
+
export type CampaignDetailsStatusOrderedProductStatus = CampaignProductStatus
|
|
51
|
+
//alias for backwards compatibility
|
|
52
|
+
export type CampaignDetailedStatus = CampaignDetail
|
|
53
|
+
|
|
49
54
|
export type CampaignPostingDetailsContactInfo = {
|
|
50
55
|
emailAddress?: string | null
|
|
51
56
|
name?: string | null
|
|
@@ -144,18 +149,6 @@ export type CampaignStatus =
|
|
|
144
149
|
| "online"
|
|
145
150
|
| "not processed"
|
|
146
151
|
|
|
147
|
-
export type CampaignDetailsStatusOrderedProductStatus = {
|
|
148
|
-
productId: string
|
|
149
|
-
status: CampaignStatus
|
|
150
|
-
statusDescription: string | null
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export type CampaignDetailedStatus = {
|
|
154
|
-
campaignId: string
|
|
155
|
-
status: CampaignStatus
|
|
156
|
-
orderedProductsStatuses: CampaignDetailsStatusOrderedProductStatus[]
|
|
157
|
-
}
|
|
158
|
-
|
|
159
152
|
export type CampaignDraftOldBackwardsCompatability = {
|
|
160
153
|
// there is a recipe /docs/recipes/order-journey-campaign-recipes/campaign-order-success-event/
|
|
161
154
|
// it says if payment method is direct-charge, BE returns `draftCampaignId` instead of `campaignId`
|
|
@@ -202,7 +195,7 @@ export type Campaign = Pick<CampaignDraft, "campaignId"> &
|
|
|
202
195
|
targetGroup: CampaignTargetGroup
|
|
203
196
|
totalPrice: CampaignTotalPrice
|
|
204
197
|
walletId: string
|
|
205
|
-
detailedStatus?:
|
|
198
|
+
detailedStatus?: CampaignStatus //this is only added virtually on FE on demand
|
|
206
199
|
isEditable: boolean
|
|
207
200
|
modifiedOn: string
|
|
208
201
|
metadata?: CampaignMetadata
|
package/common/types.ts
CHANGED
package/language/enums.ts
CHANGED
package/package.json
CHANGED