cja-phoenix 0.14.26 → 0.14.27

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.
@@ -5723,24 +5723,20 @@ const r8 = async (e) => {
5723
5723
  ];
5724
5724
  }
5725
5725
  )
5726
- ), g8 = (e, t) => fetch(
5727
- new URL(
5728
- `/core/apis/data/applyProductData?${new URLSearchParams({
5729
- action: "OPEN_CHECKOUT",
5730
- category: t.category,
5731
- cggId: t.product.cggId,
5732
- apply: "apply",
5733
- journeyId: t.journeyId || "",
5734
- path: encodeURIComponent(t.path),
5735
- position: t.index.toString(),
5736
- providerCggId: t.product.provider.cggId
5737
- })}`,
5738
- e
5739
- ),
5740
- {
5741
- method: "POST"
5742
- }
5743
- );
5726
+ ), g8 = (e, t) => fetch(new URL("/core/apis/data/applyProductData", e), {
5727
+ method: "POST",
5728
+ body: JSON.stringify({
5729
+ action: "OPEN_APPLICATION_FORM",
5730
+ intent: "apply",
5731
+ journeyId: t.journeyId,
5732
+ path: t.path,
5733
+ position: t.index,
5734
+ offerSelected: t.productName,
5735
+ cggId: t.productId,
5736
+ providerCggId: t.providerId,
5737
+ has_been_clicked: !0
5738
+ })
5739
+ });
5744
5740
  const Oe = (e, t) => {
5745
5741
  const a = e.__vccOpts || e;
5746
5742
  for (const [n, r] of t)
@@ -1,12 +1,8 @@
1
1
  export declare const applyProductData: (origin: string, options: {
2
2
  journeyId: string | undefined;
3
- category: string;
4
3
  index: number;
5
4
  path: string;
6
- product: {
7
- cggId: string;
8
- provider: {
9
- cggId: string;
10
- };
11
- };
5
+ productName: string;
6
+ productId: string;
7
+ providerId: string;
12
8
  }) => Promise<Response>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cja-phoenix",
3
- "version": "0.14.26",
3
+ "version": "0.14.27",
4
4
  "scripts": {
5
5
  "build:dev": "rimraf dist && vue-tsc && vite build -m development",
6
6
  "build:link": "rimraf dist && vue-tsc && vite build -m development && npm link",
@@ -2,32 +2,24 @@ export const applyProductData = (
2
2
  origin: string,
3
3
  options: {
4
4
  journeyId: string | undefined;
5
- category: string;
6
5
  index: number;
7
6
  path: string;
8
- product: {
9
- cggId: string;
10
- provider: {
11
- cggId: string;
12
- };
13
- };
7
+ productName: string;
8
+ productId: string;
9
+ providerId: string;
14
10
  }
15
11
  ) =>
16
- fetch(
17
- new URL(
18
- `/core/apis/data/applyProductData?${new URLSearchParams({
19
- action: "OPEN_CHECKOUT",
20
- category: options.category,
21
- cggId: options.product.cggId,
22
- apply: "apply",
23
- journeyId: options.journeyId || "",
24
- path: encodeURIComponent(options.path),
25
- position: options.index.toString(),
26
- providerCggId: options.product.provider.cggId,
27
- })}`,
28
- origin
29
- ),
30
- {
31
- method: "POST",
32
- }
33
- );
12
+ fetch(new URL("/core/apis/data/applyProductData", origin), {
13
+ method: "POST",
14
+ body: JSON.stringify({
15
+ action: "OPEN_APPLICATION_FORM",
16
+ intent: "apply",
17
+ journeyId: options.journeyId,
18
+ path: options.path,
19
+ position: options.index,
20
+ offerSelected: options.productName,
21
+ cggId: options.productId,
22
+ providerCggId: options.providerId,
23
+ has_been_clicked: true,
24
+ }),
25
+ });