cja-phoenix 1.2.23 → 1.2.24

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
3
  "configKey": "cja-phoenix",
4
- "version": "1.2.23",
4
+ "version": "1.2.24",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -13,6 +13,8 @@ export const useCjaGtm = (vertical, source) => {
13
13
  return "broadband";
14
14
  case "CI":
15
15
  return "car-insurance-funnel";
16
+ case "CC":
17
+ return "credit-card";
16
18
  }
17
19
  })();
18
20
  const { formType, location } = (() => {
@@ -130,6 +132,28 @@ export const useCjaGtm = (vertical, source) => {
130
132
  quantity: 1
131
133
  }
132
134
  ];
135
+ case "credit-card":
136
+ return [
137
+ {
138
+ name: product.description,
139
+ id: product.cggId,
140
+ brand: product.name,
141
+ position: index,
142
+ approvalRate: product.approvalRate,
143
+ dimension3: source2,
144
+ dimension4: product.banner.bannerType,
145
+ dimension5: product.showCTALeadCapture,
146
+ dimension6: `
147
+ annualFee: ${product.fee.annualFee},
148
+ basicAPR: ${product.fee.taeg},
149
+ basic: ${product.fee.tan}
150
+ `,
151
+ category: "credit-card",
152
+ list: category,
153
+ price: "5.00",
154
+ quantity: 1
155
+ }
156
+ ];
133
157
  default:
134
158
  console.error(
135
159
  `Unrecognized category ${category}, implement vertical specific gtm product`
@@ -1,4 +1,4 @@
1
- export type VerticalCode = 'HL' | 'PL' | 'EN' | 'BB' | 'CI';
1
+ export type VerticalCode = 'HL' | 'PL' | 'EN' | 'BB' | 'CI' | 'CC';
2
2
  export type JourneyLocation = 'funnel' | 'results' | 'checkout' | 'contact';
3
3
  export type StepData = {
4
4
  index: number;
@@ -1,8 +1,10 @@
1
1
  export declare const applyProductData: (options: {
2
+ action: string;
2
3
  journeyId: string | undefined;
3
4
  index: number;
4
- path: string;
5
5
  productName: string;
6
6
  productId: string;
7
7
  providerId: string;
8
- }) => Promise<Response>;
8
+ viewId: string;
9
+ category?: string;
10
+ }) => Promise<unknown>;
@@ -1,18 +1,22 @@
1
- import { useRuntimeConfig } from "#imports";
1
+ import { useRoute, useRuntimeConfig } from "#imports";
2
2
  export const applyProductData = (options) => {
3
3
  const { apiURL } = useRuntimeConfig().public;
4
- return fetch(new URL("/core/apis/data/applyProductData", apiURL), {
4
+ const { path } = useRoute();
5
+ return $fetch("/core/apis/data/applyProductData", {
6
+ baseURL: apiURL,
5
7
  method: "POST",
6
- body: JSON.stringify({
7
- action: "OPEN_APPLICATION_FORM",
8
+ body: {
9
+ path,
8
10
  intent: "apply",
11
+ action: options.action || "OPEN_APPLICATION_FORM",
9
12
  journeyId: options.journeyId,
10
- path: options.path,
11
13
  position: options.index,
12
14
  offerSelected: options.productName,
13
15
  cggId: options.productId,
14
16
  providerCggId: options.providerId,
17
+ category: options.category,
18
+ viewId: options.viewId,
15
19
  has_been_clicked: true
16
- })
20
+ }
17
21
  });
18
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "Phoenix utility",
5
5
  "repository": "comparaja/phoenix",
6
6
  "license": "MIT",