@gofynd/fdk-client-javascript 1.4.0-beta.2 → 1.4.0-beta.3

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/README.md CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- 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.0-beta.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ 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.0-beta.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.4.0-beta.2",
3
+ "version": "1.4.0-beta.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ export = ThemePartnerModel;
9
9
  * @typedef ActionPage
10
10
  * @property {Object} [params]
11
11
  * @property {Object} [query]
12
- * @property {string} [type]
12
+ * @property {PageType} type
13
13
  * @property {string} [url]
14
14
  */
15
15
  /**
@@ -544,10 +544,58 @@ export = ThemePartnerModel;
544
544
  * @property {MarketplaceThemeImages} [images]
545
545
  * @property {string} [name] - Variation name
546
546
  */
547
+ /**
548
+ * @typedef {| "about-us"
549
+ * | "addresses"
550
+ * | "blog"
551
+ * | "brands"
552
+ * | "cards"
553
+ * | "cart"
554
+ * | "categories"
555
+ * | "brand"
556
+ * | "category"
557
+ * | "collection"
558
+ * | "collections"
559
+ * | "contact-us"
560
+ * | "external"
561
+ * | "faq"
562
+ * | "freshchat"
563
+ * | "home"
564
+ * | "notification-settings"
565
+ * | "orders"
566
+ * | "page"
567
+ * | "policy"
568
+ * | "product"
569
+ * | "product-request"
570
+ * | "products"
571
+ * | "profile"
572
+ * | "profile-order-shipment"
573
+ * | "profile-basic"
574
+ * | "profile-company"
575
+ * | "profile-emails"
576
+ * | "profile-phones"
577
+ * | "rate-us"
578
+ * | "refer-earn"
579
+ * | "settings"
580
+ * | "shared-cart"
581
+ * | "tnc"
582
+ * | "track-order"
583
+ * | "wishlist"
584
+ * | "sections"
585
+ * | "form"
586
+ * | "cart-delivery"
587
+ * | "cart-payment"
588
+ * | "cart-review"
589
+ * | "login"
590
+ * | "register"
591
+ * | "shipping-policy"
592
+ * | "return-policy"
593
+ * | "order-status"} PageType
594
+ */
547
595
  declare class ThemePartnerModel {
548
596
  }
549
597
  declare namespace ThemePartnerModel {
550
- export { Action, ActionPage, AllAvailablePageSchema, Assets, AvailablePagePlatformPredicate, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchedulePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, CarouselItem, CatalogSize, CheckboxProp, Comments, CommonJS, Config, ContactInfo, CreateNewTheme, CSS, CustomConfig, CustomProps, DividerStrokeHighlight, Documentation, ExploreInfo, Feature, FeatureItem, Font, FontVariant, FontVariants, GlobalSchema, Highlight, ImagePickerProp, Images, MarketplaceTheme, MarketplaceThemeImages, MarketplaceThemeSchema, OrderTracking, OverlayPopup, Page, PaginationSchema, PaymentInfo, Predicate, Preset, Prop, RangeProp, Release, Route, Screen, Section, SectionItem, SectionPreset, SectionProps, SEObreadcrumb, SEOMetaItem, SEOMetaItems, SEOSitemap, TextProp, ThemeConfigListPage, ThemeConfigListPageSettingsProps, ThemeConfiguration, ThemeMeta, ThemePayment, ThemeRejectionReasons, ThemesSchema, ThemeUserSchema, UMDJs, UpdateThemeRequestBody, UrlProp, UserAlerts, Variation };
598
+ export { Action, ActionPage, AllAvailablePageSchema, Assets, AvailablePagePlatformPredicate, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchedulePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, CarouselItem, CatalogSize, CheckboxProp, Comments, CommonJS, Config, ContactInfo, CreateNewTheme, CSS, CustomConfig, CustomProps, DividerStrokeHighlight, Documentation, ExploreInfo, Feature, FeatureItem, Font, FontVariant, FontVariants, GlobalSchema, Highlight, ImagePickerProp, Images, MarketplaceTheme, MarketplaceThemeImages, MarketplaceThemeSchema, OrderTracking, OverlayPopup, Page, PaginationSchema, PaymentInfo, Predicate, Preset, Prop, RangeProp, Release, Route, Screen, Section, SectionItem, SectionPreset, SectionProps, SEObreadcrumb, SEOMetaItem, SEOMetaItems, SEOSitemap, TextProp, ThemeConfigListPage, ThemeConfigListPageSettingsProps, ThemeConfiguration, ThemeMeta, ThemePayment, ThemeRejectionReasons, ThemesSchema, ThemeUserSchema, UMDJs, UpdateThemeRequestBody, UrlProp, UserAlerts, Variation, PageType };
551
599
  }
552
600
  /** @returns {Action} */
553
601
  declare function Action(): Action;
@@ -561,7 +609,7 @@ declare function ActionPage(): ActionPage;
561
609
  type ActionPage = {
562
610
  params?: any;
563
611
  query?: any;
564
- type?: string;
612
+ type: PageType;
565
613
  url?: string;
566
614
  };
567
615
  /** @returns {AllAvailablePageSchema} */
@@ -1631,3 +1679,10 @@ type Variation = {
1631
1679
  */
1632
1680
  name?: string;
1633
1681
  };
1682
+ /**
1683
+ * Enum: PageType Used By: Theme
1684
+ *
1685
+ * @returns {PageType}
1686
+ */
1687
+ declare function PageType(): PageType;
1688
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "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";
@@ -11,7 +11,7 @@ const Joi = require("joi");
11
11
  * @typedef ActionPage
12
12
  * @property {Object} [params]
13
13
  * @property {Object} [query]
14
- * @property {string} [type]
14
+ * @property {PageType} type
15
15
  * @property {string} [url]
16
16
  */
17
17
 
@@ -623,6 +623,55 @@ const Joi = require("joi");
623
623
  * @property {string} [name] - Variation name
624
624
  */
625
625
 
626
+ /**
627
+ * @typedef {| "about-us"
628
+ * | "addresses"
629
+ * | "blog"
630
+ * | "brands"
631
+ * | "cards"
632
+ * | "cart"
633
+ * | "categories"
634
+ * | "brand"
635
+ * | "category"
636
+ * | "collection"
637
+ * | "collections"
638
+ * | "contact-us"
639
+ * | "external"
640
+ * | "faq"
641
+ * | "freshchat"
642
+ * | "home"
643
+ * | "notification-settings"
644
+ * | "orders"
645
+ * | "page"
646
+ * | "policy"
647
+ * | "product"
648
+ * | "product-request"
649
+ * | "products"
650
+ * | "profile"
651
+ * | "profile-order-shipment"
652
+ * | "profile-basic"
653
+ * | "profile-company"
654
+ * | "profile-emails"
655
+ * | "profile-phones"
656
+ * | "rate-us"
657
+ * | "refer-earn"
658
+ * | "settings"
659
+ * | "shared-cart"
660
+ * | "tnc"
661
+ * | "track-order"
662
+ * | "wishlist"
663
+ * | "sections"
664
+ * | "form"
665
+ * | "cart-delivery"
666
+ * | "cart-payment"
667
+ * | "cart-review"
668
+ * | "login"
669
+ * | "register"
670
+ * | "shipping-policy"
671
+ * | "return-policy"
672
+ * | "order-status"} PageType
673
+ */
674
+
626
675
  class ThemePartnerModel {
627
676
  /** @returns {Action} */
628
677
  static Action() {
@@ -644,7 +693,7 @@ class ThemePartnerModel {
644
693
  /\S/,
645
694
  Joi.array().items(Joi.string().allow(""))
646
695
  ),
647
- type: Joi.string().allow(""),
696
+ type: ThemePartnerModel.PageType().required(),
648
697
  url: Joi.string().allow(""),
649
698
  });
650
699
  }
@@ -1409,5 +1458,106 @@ class ThemePartnerModel {
1409
1458
  name: Joi.string().allow(""),
1410
1459
  });
1411
1460
  }
1461
+
1462
+ /**
1463
+ * Enum: PageType Used By: Theme
1464
+ *
1465
+ * @returns {PageType}
1466
+ */
1467
+ static PageType() {
1468
+ return Joi.string().valid(
1469
+ "about-us",
1470
+
1471
+ "addresses",
1472
+
1473
+ "blog",
1474
+
1475
+ "brands",
1476
+
1477
+ "cards",
1478
+
1479
+ "cart",
1480
+
1481
+ "categories",
1482
+
1483
+ "brand",
1484
+
1485
+ "category",
1486
+
1487
+ "collection",
1488
+
1489
+ "collections",
1490
+
1491
+ "contact-us",
1492
+
1493
+ "external",
1494
+
1495
+ "faq",
1496
+
1497
+ "freshchat",
1498
+
1499
+ "home",
1500
+
1501
+ "notification-settings",
1502
+
1503
+ "orders",
1504
+
1505
+ "page",
1506
+
1507
+ "policy",
1508
+
1509
+ "product",
1510
+
1511
+ "product-request",
1512
+
1513
+ "products",
1514
+
1515
+ "profile",
1516
+
1517
+ "profile-order-shipment",
1518
+
1519
+ "profile-basic",
1520
+
1521
+ "profile-company",
1522
+
1523
+ "profile-emails",
1524
+
1525
+ "profile-phones",
1526
+
1527
+ "rate-us",
1528
+
1529
+ "refer-earn",
1530
+
1531
+ "settings",
1532
+
1533
+ "shared-cart",
1534
+
1535
+ "tnc",
1536
+
1537
+ "track-order",
1538
+
1539
+ "wishlist",
1540
+
1541
+ "sections",
1542
+
1543
+ "form",
1544
+
1545
+ "cart-delivery",
1546
+
1547
+ "cart-payment",
1548
+
1549
+ "cart-review",
1550
+
1551
+ "login",
1552
+
1553
+ "register",
1554
+
1555
+ "shipping-policy",
1556
+
1557
+ "return-policy",
1558
+
1559
+ "order-status"
1560
+ );
1561
+ }
1412
1562
  }
1413
1563
  module.exports = ThemePartnerModel;
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const CartPlatformApplicationValidator = require("./CartPlatformApplicationValidator");
5
8
  const CartPlatformModel = require("./CartPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const CatalogPlatformApplicationValidator = require("./CatalogPlatformApplicationValidator");
5
8
  const CatalogPlatformModel = require("./CatalogPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const CommunicationPlatformApplicationValidator = require("./CommunicationPlatformApplicationValidator");
5
8
  const CommunicationPlatformModel = require("./CommunicationPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const ConfigurationPlatformApplicationValidator = require("./ConfigurationPlatformApplicationValidator");
5
8
  const ConfigurationPlatformModel = require("./ConfigurationPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const ContentPlatformApplicationValidator = require("./ContentPlatformApplicationValidator");
5
8
  const ContentPlatformModel = require("./ContentPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const FileStoragePlatformApplicationValidator = require("./FileStoragePlatformApplicationValidator");
5
8
  const FileStoragePlatformModel = require("./FileStoragePlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const LeadPlatformApplicationValidator = require("./LeadPlatformApplicationValidator");
5
8
  const LeadPlatformModel = require("./LeadPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const OrderPlatformApplicationValidator = require("./OrderPlatformApplicationValidator");
5
8
  const OrderPlatformModel = require("./OrderPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const PartnerPlatformApplicationValidator = require("./PartnerPlatformApplicationValidator");
5
8
  const PartnerPlatformModel = require("./PartnerPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const PaymentPlatformApplicationValidator = require("./PaymentPlatformApplicationValidator");
5
8
  const PaymentPlatformModel = require("./PaymentPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const RewardsPlatformApplicationValidator = require("./RewardsPlatformApplicationValidator");
5
8
  const RewardsPlatformModel = require("./RewardsPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const ServiceabilityPlatformApplicationValidator = require("./ServiceabilityPlatformApplicationValidator");
5
8
  const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const SharePlatformApplicationValidator = require("./SharePlatformApplicationValidator");
5
8
  const SharePlatformModel = require("./SharePlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const ThemePlatformApplicationValidator = require("./ThemePlatformApplicationValidator");
5
8
  const ThemePlatformModel = require("./ThemePlatformModel");
@@ -1,5 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
2
+ const {
3
+ FDKClientValidationError,
4
+ FDKResponseValidationError,
5
+ } = require("../../common/FDKError");
3
6
  const Paginator = require("../../common/Paginator");
4
7
  const UserPlatformApplicationValidator = require("./UserPlatformApplicationValidator");
5
8
  const UserPlatformModel = require("./UserPlatformModel");