Skip to content

Commit

Permalink
[Auto Generated] 1.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Oct 8, 2024
1 parent f77b178 commit 7357fd0
Show file tree
Hide file tree
Showing 34 changed files with 9,382 additions and 4,087 deletions.
3,507 changes: 3,507 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
The above code will log the curl command in the console

```bash
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.12' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.13' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
Active Theme: Emerge
```

Expand Down
2 changes: 1 addition & 1 deletion dist/application.js

Large diffs are not rendered by default.

271 changes: 136 additions & 135 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gofynd/fdk-client-javascript",
"version": "1.4.12",
"version": "1.4.13",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"loglevel": "^1.8.1",
"query-string": "^7.1.3",
"@gofynd/fp-signature": "^1.0.1",
"@gofynd/flick": "^1.0.8"
"@gofynd/flick": "^1.0.9"
},
"devDependencies": {
"axios-cookiejar-support": "^4.0.6",
Expand Down
5 changes: 3 additions & 2 deletions sdk/application/Content/ContentApplicationModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ export = ContentApplicationModel;
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/
declare class ContentApplicationModel {
}
Expand Down Expand Up @@ -2129,4 +2130,4 @@ type ActionPage = {
* @returns {PageType}
*/
declare function PageType(): PageType;
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
7 changes: 5 additions & 2 deletions sdk/application/Content/ContentApplicationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ const Joi = require("joi");
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/

class ContentApplicationModel {
Expand Down Expand Up @@ -1579,7 +1580,9 @@ class ContentApplicationModel {

"return-policy",

"order-status"
"order-status",

"locate-us"
);
}
}
Expand Down
5 changes: 3 additions & 2 deletions sdk/application/Theme/ThemeApplicationModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ export = ThemeApplicationModel;
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/
declare class ThemeApplicationModel {
}
Expand Down Expand Up @@ -1709,4 +1710,4 @@ type ActionPage = {
* @returns {PageType}
*/
declare function PageType(): PageType;
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
7 changes: 5 additions & 2 deletions sdk/application/Theme/ThemeApplicationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ const Joi = require("joi");
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/

class ThemeApplicationModel {
Expand Down Expand Up @@ -1416,7 +1417,9 @@ class ThemeApplicationModel {

"return-policy",

"order-status"
"order-status",

"locate-us"
);
}
}
Expand Down
12 changes: 12 additions & 0 deletions sdk/common/Clickstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ if (typeof window != "undefined") {

window.FPI.event.on("product_list.view", (eventData) => {
Logger({ level: "DEBUG", message: eventData });
if (eventData.user && eventData.user.user_id) {
//re identify user if the payload contains user id
Clickstream.identify(eventData.user.user_id, {}, false);
}
Clickstream.sendEvent("product_listing", {
event_type: "impression",
query: sg(() => eventData.slug["q"]),
Expand All @@ -372,6 +376,10 @@ if (typeof window != "undefined") {

window.FPI.event.on("product.view", (eventData) => {
Logger({ level: "DEBUG", message: eventData });
if (eventData.user && eventData.user.user_id) {
//re identify user if the payload contains user id
Clickstream.identify(eventData.user.user_id, {}, false);
}
const payload = {
event_type: "click",
product_id: sg(() => eventData.product["uid"]),
Expand Down Expand Up @@ -410,6 +418,10 @@ if (typeof window != "undefined") {
};
//filter eventData.data to find the products array and item total
let products = [];
if (eventData.user && eventData.user.user_id) {
//re identify user if the payload contains user id
Clickstream.identify(eventData.user.user_id, {}, false);
}
if (eventData.data && eventData.data.length > 0) {
products = eventData.data
.filter((item) => {
Expand Down
5 changes: 5 additions & 0 deletions sdk/common/Constant.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export namespace AVAILABLE_PAGE_TYPE {
const SHIPPING_POLICY: string;
const RETURN_POLICY: string;
const ORDER_STATUS: string;
const LOCATE_US: string;
}
export const NAVIGATORS: {
"about-us": {
Expand Down Expand Up @@ -296,4 +297,8 @@ export const NAVIGATORS: {
name: string;
link: string;
};
"locate-us": {
name: string;
link: string;
};
};
5 changes: 5 additions & 0 deletions sdk/common/Constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const AVAILABLE_PAGE_TYPE = {
SHIPPING_POLICY: "shipping-policy",
RETURN_POLICY: "return-policy",
ORDER_STATUS: "order-status",
LOCATE_US: "locate-us",
};

Object.freeze(AVAILABLE_PAGE_TYPE);
Expand Down Expand Up @@ -329,6 +330,10 @@ const NAVIGATORS = {
name: "Order status",
link: "/cart/order-status",
},
"locate-us": {
name: "Locate us",
link: "/locate-us",
},
};

module.exports = {
Expand Down
5 changes: 3 additions & 2 deletions sdk/partner/Theme/ThemePartnerModel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ export = ThemePartnerModel;
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/
declare class ThemePartnerModel {
}
Expand Down Expand Up @@ -1835,4 +1836,4 @@ type ActionPage = {
* @returns {PageType}
*/
declare function PageType(): PageType;
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us";
7 changes: 5 additions & 2 deletions sdk/partner/Theme/ThemePartnerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ const Joi = require("joi");
* | "register"
* | "shipping-policy"
* | "return-policy"
* | "order-status"} PageType
* | "order-status"
* | "locate-us"} PageType
*/

class ThemePartnerModel {
Expand Down Expand Up @@ -1717,7 +1718,9 @@ class ThemePartnerModel {

"return-policy",

"order-status"
"order-status",

"locate-us"
);
}
}
Expand Down
Loading

0 comments on commit 7357fd0

Please sign in to comment.