@vonq/hapi-elements-types 1.60.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/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[]
@@ -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<ProductSupportingContractsComplete>
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<ProductSupportingContractsComplete>
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<Campaign>
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<ProductSupportingContractsComplete>
43
+ ) => Promise<CampaignDetail>
41
44
  export type CampaignServiceGetCampaignHandler = (
42
45
  campaignId: string,
43
46
  queryParams?: Record<string, any>,
44
- ) => Promise<ProductSupportingContractsComplete>
47
+ ) => Promise<Campaign>
45
48
  export type CampaignServiceSetCampaignCancellationHandler = (
46
49
  campaignId: string,
47
50
  body: Partial<Campaign>,
48
- ) => Promise<ProductSupportingContractsComplete>
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<Campaign>
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?: CampaignDetailedStatus //this is only added virtually on FE on demand
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
@@ -159,6 +159,7 @@ export type PostingRequirementRuleName =
159
159
  | "url"
160
160
  | "autocomplete"
161
161
  | "mimetype"
162
+ | "statischtype"
162
163
 
163
164
  export type PostingRequirementRule = {
164
165
  rule: PostingRequirementRuleName
package/language/enums.ts CHANGED
@@ -3,4 +3,6 @@ export enum LanguageSupportedLocale {
3
3
  "nl" = "nl",
4
4
  "de" = "de",
5
5
  "fr" = "fr",
6
+ "es" = "es",
7
+ "it" = "it",
6
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.60.0",
4
+ "version": "1.61.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",