@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15

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.
Files changed (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -17,7 +17,22 @@ class Content {
17
17
  constructor(_conf) {
18
18
  this._conf = _conf;
19
19
  this._relativeUrls = {
20
- getCredentialsByEntity: "/service/public/content/credentials/{entity}",
20
+ getAllLanguages: "/service/public/content/languages",
21
+ getAllTags: "/service/public/content/tags",
22
+ getAllTranslatableResources:
23
+ "/service/public/content/translatable/resources",
24
+ getAnalyticsTags: "/service/public/content/analytics-tags",
25
+ getBasicDetails: "/service/public/content/basic-details",
26
+ getCredentialsByEntity:
27
+ "/service/public/content/credentials/{entity_type}",
28
+ getCustomPage: "/service/public/content/custom-pages/{slug}",
29
+ getFooterContent: "/service/public/content/footer",
30
+ getHomePageContent: "/service/public/content/home-page",
31
+ getLanguageByLocale: "/service/public/content/languages/{locale}",
32
+ getMenuContent: "/service/public/content/menu",
33
+ getMenuContentByType: "/service/public/content/menu/{type}",
34
+ getNavbar: "/service/public/content/navbar",
35
+ getPricingBanner: "/service/public/content/pricing-banner",
21
36
  };
22
37
  this._urls = Object.entries(this._relativeUrls).reduce(
23
38
  (urls, [method, relativeUrl]) => {
@@ -35,20 +50,901 @@ class Content {
35
50
  };
36
51
  }
37
52
 
53
+ /**
54
+ * @param {ContentPublicValidator.GetAllLanguagesParam} arg - Arg object.
55
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
56
+ * @param {import("../PublicAPIClient").Options} - Options
57
+ * @returns {Promise<Object>} - Success response
58
+ * @name getAllLanguages
59
+ * @summary: Get All Languages
60
+ * @description: Fetches complete list of languages supported by the platform with their locale codes and text directions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAllLanguages/).
61
+ */
62
+ async getAllLanguages(
63
+ { isEnabled, requestHeaders } = { requestHeaders: {} },
64
+ { responseHeaders } = { responseHeaders: false }
65
+ ) {
66
+ const { error } = ContentPublicValidator.getAllLanguages().validate(
67
+ { isEnabled },
68
+ { abortEarly: false, allowUnknown: true }
69
+ );
70
+ if (error) {
71
+ return Promise.reject(new FDKClientValidationError(error));
72
+ }
73
+
74
+ // Showing warrnings if extra unknown parameters are found
75
+ const {
76
+ error: warrning,
77
+ } = ContentPublicValidator.getAllLanguages().validate(
78
+ { isEnabled },
79
+ { abortEarly: false, allowUnknown: false }
80
+ );
81
+ if (warrning) {
82
+ Logger({
83
+ level: "WARN",
84
+ message: `Parameter Validation warrnings for public > Content > getAllLanguages \n ${warrning}`,
85
+ });
86
+ }
87
+
88
+ const query_params = {};
89
+ query_params["is_enabled"] = isEnabled;
90
+
91
+ const xHeaders = {};
92
+
93
+ const response = await PublicAPIClient.execute(
94
+ this._conf,
95
+ "get",
96
+ constructUrl({
97
+ url: this._urls["getAllLanguages"],
98
+ params: {},
99
+ }),
100
+ query_params,
101
+ undefined,
102
+ { ...xHeaders, ...requestHeaders },
103
+ { responseHeaders }
104
+ );
105
+
106
+ let responseData = response;
107
+ if (responseHeaders) {
108
+ responseData = response[0];
109
+ }
110
+
111
+ const { error: res_error } = Joi.any().validate(responseData, {
112
+ abortEarly: false,
113
+ allowUnknown: true,
114
+ });
115
+
116
+ if (res_error) {
117
+ if (this._conf.options.strictResponseCheck === true) {
118
+ return Promise.reject(new FDKResponseValidationError(res_error));
119
+ } else {
120
+ Logger({
121
+ level: "WARN",
122
+ message: `Response Validation Warnings for public > Content > getAllLanguages \n ${res_error}`,
123
+ });
124
+ }
125
+ }
126
+
127
+ return response;
128
+ }
129
+
130
+ /**
131
+ * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object.
132
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
133
+ * @param {import("../PublicAPIClient").Options} - Options
134
+ * @returns {Promise<ContentPublicModel.TagsSchema>} - Success response
135
+ * @name getAllTags
136
+ * @summary: Retrieve tags with injected css/javascript info.
137
+ * @description: Retrieve custom tag with injected css/javascript info. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAllTags/).
138
+ */
139
+ async getAllTags(
140
+ { requestHeaders } = { requestHeaders: {} },
141
+ { responseHeaders } = { responseHeaders: false }
142
+ ) {
143
+ const { error } = ContentPublicValidator.getAllTags().validate(
144
+ {},
145
+ { abortEarly: false, allowUnknown: true }
146
+ );
147
+ if (error) {
148
+ return Promise.reject(new FDKClientValidationError(error));
149
+ }
150
+
151
+ // Showing warrnings if extra unknown parameters are found
152
+ const { error: warrning } = ContentPublicValidator.getAllTags().validate(
153
+ {},
154
+ { abortEarly: false, allowUnknown: false }
155
+ );
156
+ if (warrning) {
157
+ Logger({
158
+ level: "WARN",
159
+ message: `Parameter Validation warrnings for public > Content > getAllTags \n ${warrning}`,
160
+ });
161
+ }
162
+
163
+ const query_params = {};
164
+
165
+ const xHeaders = {};
166
+
167
+ const response = await PublicAPIClient.execute(
168
+ this._conf,
169
+ "get",
170
+ constructUrl({
171
+ url: this._urls["getAllTags"],
172
+ params: {},
173
+ }),
174
+ query_params,
175
+ undefined,
176
+ { ...xHeaders, ...requestHeaders },
177
+ { responseHeaders }
178
+ );
179
+
180
+ let responseData = response;
181
+ if (responseHeaders) {
182
+ responseData = response[0];
183
+ }
184
+
185
+ const {
186
+ error: res_error,
187
+ } = ContentPublicModel.TagsSchema().validate(responseData, {
188
+ abortEarly: false,
189
+ allowUnknown: true,
190
+ });
191
+
192
+ if (res_error) {
193
+ if (this._conf.options.strictResponseCheck === true) {
194
+ return Promise.reject(new FDKResponseValidationError(res_error));
195
+ } else {
196
+ Logger({
197
+ level: "WARN",
198
+ message: `Response Validation Warnings for public > Content > getAllTags \n ${res_error}`,
199
+ });
200
+ }
201
+ }
202
+
203
+ return response;
204
+ }
205
+
206
+ /**
207
+ * @param {ContentPublicValidator.GetAllTranslatableResourcesParam} arg - Arg object.
208
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
209
+ * @param {import("../PublicAPIClient").Options} - Options
210
+ * @returns {Promise<Object>} - Success response
211
+ * @name getAllTranslatableResources
212
+ * @summary: Get Translatable Items
213
+ * @description: Retrieves all resources that can be translated across different languages in the system. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAllTranslatableResources/).
214
+ */
215
+ async getAllTranslatableResources(
216
+ { requestHeaders } = { requestHeaders: {} },
217
+ { responseHeaders } = { responseHeaders: false }
218
+ ) {
219
+ const {
220
+ error,
221
+ } = ContentPublicValidator.getAllTranslatableResources().validate(
222
+ {},
223
+ { abortEarly: false, allowUnknown: true }
224
+ );
225
+ if (error) {
226
+ return Promise.reject(new FDKClientValidationError(error));
227
+ }
228
+
229
+ // Showing warrnings if extra unknown parameters are found
230
+ const {
231
+ error: warrning,
232
+ } = ContentPublicValidator.getAllTranslatableResources().validate(
233
+ {},
234
+ { abortEarly: false, allowUnknown: false }
235
+ );
236
+ if (warrning) {
237
+ Logger({
238
+ level: "WARN",
239
+ message: `Parameter Validation warrnings for public > Content > getAllTranslatableResources \n ${warrning}`,
240
+ });
241
+ }
242
+
243
+ const query_params = {};
244
+
245
+ const xHeaders = {};
246
+
247
+ const response = await PublicAPIClient.execute(
248
+ this._conf,
249
+ "get",
250
+ constructUrl({
251
+ url: this._urls["getAllTranslatableResources"],
252
+ params: {},
253
+ }),
254
+ query_params,
255
+ undefined,
256
+ { ...xHeaders, ...requestHeaders },
257
+ { responseHeaders }
258
+ );
259
+
260
+ let responseData = response;
261
+ if (responseHeaders) {
262
+ responseData = response[0];
263
+ }
264
+
265
+ const { error: res_error } = Joi.any().validate(responseData, {
266
+ abortEarly: false,
267
+ allowUnknown: true,
268
+ });
269
+
270
+ if (res_error) {
271
+ if (this._conf.options.strictResponseCheck === true) {
272
+ return Promise.reject(new FDKResponseValidationError(res_error));
273
+ } else {
274
+ Logger({
275
+ level: "WARN",
276
+ message: `Response Validation Warnings for public > Content > getAllTranslatableResources \n ${res_error}`,
277
+ });
278
+ }
279
+ }
280
+
281
+ return response;
282
+ }
283
+
284
+ /**
285
+ * @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object.
286
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
287
+ * @param {import("../PublicAPIClient").Options} - Options
288
+ * @returns {Promise<ContentPublicModel.AnalyticsTagsSchema>} - Success response
289
+ * @name getAnalyticsTags
290
+ * @summary: Get Analytics Tags
291
+ * @description: Retrieve analytics tags. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getAnalyticsTags/).
292
+ */
293
+ async getAnalyticsTags(
294
+ { requestHeaders } = { requestHeaders: {} },
295
+ { responseHeaders } = { responseHeaders: false }
296
+ ) {
297
+ const { error } = ContentPublicValidator.getAnalyticsTags().validate(
298
+ {},
299
+ { abortEarly: false, allowUnknown: true }
300
+ );
301
+ if (error) {
302
+ return Promise.reject(new FDKClientValidationError(error));
303
+ }
304
+
305
+ // Showing warrnings if extra unknown parameters are found
306
+ const {
307
+ error: warrning,
308
+ } = ContentPublicValidator.getAnalyticsTags().validate(
309
+ {},
310
+ { abortEarly: false, allowUnknown: false }
311
+ );
312
+ if (warrning) {
313
+ Logger({
314
+ level: "WARN",
315
+ message: `Parameter Validation warrnings for public > Content > getAnalyticsTags \n ${warrning}`,
316
+ });
317
+ }
318
+
319
+ const query_params = {};
320
+
321
+ const xHeaders = {};
322
+
323
+ const response = await PublicAPIClient.execute(
324
+ this._conf,
325
+ "get",
326
+ constructUrl({
327
+ url: this._urls["getAnalyticsTags"],
328
+ params: {},
329
+ }),
330
+ query_params,
331
+ undefined,
332
+ { ...xHeaders, ...requestHeaders },
333
+ { responseHeaders }
334
+ );
335
+
336
+ let responseData = response;
337
+ if (responseHeaders) {
338
+ responseData = response[0];
339
+ }
340
+
341
+ const {
342
+ error: res_error,
343
+ } = ContentPublicModel.AnalyticsTagsSchema().validate(responseData, {
344
+ abortEarly: false,
345
+ allowUnknown: true,
346
+ });
347
+
348
+ if (res_error) {
349
+ if (this._conf.options.strictResponseCheck === true) {
350
+ return Promise.reject(new FDKResponseValidationError(res_error));
351
+ } else {
352
+ Logger({
353
+ level: "WARN",
354
+ message: `Response Validation Warnings for public > Content > getAnalyticsTags \n ${res_error}`,
355
+ });
356
+ }
357
+ }
358
+
359
+ return response;
360
+ }
361
+
362
+ /**
363
+ * @param {ContentPublicValidator.GetBasicDetailsParam} arg - Arg object.
364
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
365
+ * @param {import("../PublicAPIClient").Options} - Options
366
+ * @returns {Promise<ContentPublicModel.BasicDetailsPayloadSchema>} - Success response
367
+ * @name getBasicDetails
368
+ * @summary: get basic platform information
369
+ * @description: get basic platform information on Admin panel like Common Settings, Appereance of Authentication Page, Text on Seller Login or Register Page, Business Account Restrictions, Seller Support Details and Footer Details - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getBasicDetails/).
370
+ */
371
+ async getBasicDetails(
372
+ { requestHeaders } = { requestHeaders: {} },
373
+ { responseHeaders } = { responseHeaders: false }
374
+ ) {
375
+ const { error } = ContentPublicValidator.getBasicDetails().validate(
376
+ {},
377
+ { abortEarly: false, allowUnknown: true }
378
+ );
379
+ if (error) {
380
+ return Promise.reject(new FDKClientValidationError(error));
381
+ }
382
+
383
+ // Showing warrnings if extra unknown parameters are found
384
+ const {
385
+ error: warrning,
386
+ } = ContentPublicValidator.getBasicDetails().validate(
387
+ {},
388
+ { abortEarly: false, allowUnknown: false }
389
+ );
390
+ if (warrning) {
391
+ Logger({
392
+ level: "WARN",
393
+ message: `Parameter Validation warrnings for public > Content > getBasicDetails \n ${warrning}`,
394
+ });
395
+ }
396
+
397
+ const query_params = {};
398
+
399
+ const xHeaders = {};
400
+
401
+ const response = await PublicAPIClient.execute(
402
+ this._conf,
403
+ "get",
404
+ constructUrl({
405
+ url: this._urls["getBasicDetails"],
406
+ params: {},
407
+ }),
408
+ query_params,
409
+ undefined,
410
+ { ...xHeaders, ...requestHeaders },
411
+ { responseHeaders }
412
+ );
413
+
414
+ let responseData = response;
415
+ if (responseHeaders) {
416
+ responseData = response[0];
417
+ }
418
+
419
+ const {
420
+ error: res_error,
421
+ } = ContentPublicModel.BasicDetailsPayloadSchema().validate(responseData, {
422
+ abortEarly: false,
423
+ allowUnknown: true,
424
+ });
425
+
426
+ if (res_error) {
427
+ if (this._conf.options.strictResponseCheck === true) {
428
+ return Promise.reject(new FDKResponseValidationError(res_error));
429
+ } else {
430
+ Logger({
431
+ level: "WARN",
432
+ message: `Response Validation Warnings for public > Content > getBasicDetails \n ${res_error}`,
433
+ });
434
+ }
435
+ }
436
+
437
+ return response;
438
+ }
439
+
38
440
  /**
39
441
  * @param {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object.
40
442
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
41
443
  * @param {import("../PublicAPIClient").Options} - Options
42
- * @returns {Promise<ContentPublicModel.CredentialsSchema>} - Success response
43
- * @name getCredentialsByEntity
44
- * @summary: Get credentials to power chat support systems
45
- * @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/).
444
+ * @returns {Promise<ContentPublicModel.CredentialsSchema>} - Success response
445
+ * @name getCredentialsByEntity
446
+ * @summary: Get credentials to power chat support systems
447
+ * @description: Get credentials for support system - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getCredentialsByEntity/).
448
+ */
449
+ async getCredentialsByEntity(
450
+ { entityType, requestHeaders } = { requestHeaders: {} },
451
+ { responseHeaders } = { responseHeaders: false }
452
+ ) {
453
+ const errors = validateRequiredParams(arguments[0], ["entityType"]);
454
+ if (errors.length > 0) {
455
+ const error = new FDKClientValidationError({
456
+ message: "Missing required field",
457
+ details: errors,
458
+ });
459
+ return Promise.reject(new FDKClientValidationError(error));
460
+ }
461
+
462
+ const { error } = ContentPublicValidator.getCredentialsByEntity().validate(
463
+ { entityType },
464
+ { abortEarly: false, allowUnknown: true }
465
+ );
466
+ if (error) {
467
+ return Promise.reject(new FDKClientValidationError(error));
468
+ }
469
+
470
+ // Showing warrnings if extra unknown parameters are found
471
+ const {
472
+ error: warrning,
473
+ } = ContentPublicValidator.getCredentialsByEntity().validate(
474
+ { entityType },
475
+ { abortEarly: false, allowUnknown: false }
476
+ );
477
+ if (warrning) {
478
+ Logger({
479
+ level: "WARN",
480
+ message: `Parameter Validation warrnings for public > Content > getCredentialsByEntity \n ${warrning}`,
481
+ });
482
+ }
483
+
484
+ const query_params = {};
485
+
486
+ const xHeaders = {};
487
+
488
+ const response = await PublicAPIClient.execute(
489
+ this._conf,
490
+ "get",
491
+ constructUrl({
492
+ url: this._urls["getCredentialsByEntity"],
493
+ params: { entityType },
494
+ }),
495
+ query_params,
496
+ undefined,
497
+ { ...xHeaders, ...requestHeaders },
498
+ { responseHeaders }
499
+ );
500
+
501
+ let responseData = response;
502
+ if (responseHeaders) {
503
+ responseData = response[0];
504
+ }
505
+
506
+ const {
507
+ error: res_error,
508
+ } = ContentPublicModel.CredentialsSchema().validate(responseData, {
509
+ abortEarly: false,
510
+ allowUnknown: true,
511
+ });
512
+
513
+ if (res_error) {
514
+ if (this._conf.options.strictResponseCheck === true) {
515
+ return Promise.reject(new FDKResponseValidationError(res_error));
516
+ } else {
517
+ Logger({
518
+ level: "WARN",
519
+ message: `Response Validation Warnings for public > Content > getCredentialsByEntity \n ${res_error}`,
520
+ });
521
+ }
522
+ }
523
+
524
+ return response;
525
+ }
526
+
527
+ /**
528
+ * @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object.
529
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
530
+ * @param {import("../PublicAPIClient").Options} - Options
531
+ * @returns {Promise<ContentPublicModel.CustomPageBySlugSchema>} - Success response
532
+ * @name getCustomPage
533
+ * @summary: Retrieve info for custom page.
534
+ * @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getCustomPage/).
535
+ */
536
+ async getCustomPage(
537
+ { slug, requestHeaders } = { requestHeaders: {} },
538
+ { responseHeaders } = { responseHeaders: false }
539
+ ) {
540
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
541
+ if (errors.length > 0) {
542
+ const error = new FDKClientValidationError({
543
+ message: "Missing required field",
544
+ details: errors,
545
+ });
546
+ return Promise.reject(new FDKClientValidationError(error));
547
+ }
548
+
549
+ const { error } = ContentPublicValidator.getCustomPage().validate(
550
+ { slug },
551
+ { abortEarly: false, allowUnknown: true }
552
+ );
553
+ if (error) {
554
+ return Promise.reject(new FDKClientValidationError(error));
555
+ }
556
+
557
+ // Showing warrnings if extra unknown parameters are found
558
+ const { error: warrning } = ContentPublicValidator.getCustomPage().validate(
559
+ { slug },
560
+ { abortEarly: false, allowUnknown: false }
561
+ );
562
+ if (warrning) {
563
+ Logger({
564
+ level: "WARN",
565
+ message: `Parameter Validation warrnings for public > Content > getCustomPage \n ${warrning}`,
566
+ });
567
+ }
568
+
569
+ const query_params = {};
570
+
571
+ const xHeaders = {};
572
+
573
+ const response = await PublicAPIClient.execute(
574
+ this._conf,
575
+ "get",
576
+ constructUrl({
577
+ url: this._urls["getCustomPage"],
578
+ params: { slug },
579
+ }),
580
+ query_params,
581
+ undefined,
582
+ { ...xHeaders, ...requestHeaders },
583
+ { responseHeaders }
584
+ );
585
+
586
+ let responseData = response;
587
+ if (responseHeaders) {
588
+ responseData = response[0];
589
+ }
590
+
591
+ const {
592
+ error: res_error,
593
+ } = ContentPublicModel.CustomPageBySlugSchema().validate(responseData, {
594
+ abortEarly: false,
595
+ allowUnknown: true,
596
+ });
597
+
598
+ if (res_error) {
599
+ if (this._conf.options.strictResponseCheck === true) {
600
+ return Promise.reject(new FDKResponseValidationError(res_error));
601
+ } else {
602
+ Logger({
603
+ level: "WARN",
604
+ message: `Response Validation Warnings for public > Content > getCustomPage \n ${res_error}`,
605
+ });
606
+ }
607
+ }
608
+
609
+ return response;
610
+ }
611
+
612
+ /**
613
+ * @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object.
614
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
615
+ * @param {import("../PublicAPIClient").Options} - Options
616
+ * @returns {Promise<ContentPublicModel.FooterSchema>} - Success response
617
+ * @name getFooterContent
618
+ * @summary: Get Footer Content
619
+ * @description: Retrieve footer content. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getFooterContent/).
620
+ */
621
+ async getFooterContent(
622
+ { requestHeaders } = { requestHeaders: {} },
623
+ { responseHeaders } = { responseHeaders: false }
624
+ ) {
625
+ const { error } = ContentPublicValidator.getFooterContent().validate(
626
+ {},
627
+ { abortEarly: false, allowUnknown: true }
628
+ );
629
+ if (error) {
630
+ return Promise.reject(new FDKClientValidationError(error));
631
+ }
632
+
633
+ // Showing warrnings if extra unknown parameters are found
634
+ const {
635
+ error: warrning,
636
+ } = ContentPublicValidator.getFooterContent().validate(
637
+ {},
638
+ { abortEarly: false, allowUnknown: false }
639
+ );
640
+ if (warrning) {
641
+ Logger({
642
+ level: "WARN",
643
+ message: `Parameter Validation warrnings for public > Content > getFooterContent \n ${warrning}`,
644
+ });
645
+ }
646
+
647
+ const query_params = {};
648
+
649
+ const xHeaders = {};
650
+
651
+ const response = await PublicAPIClient.execute(
652
+ this._conf,
653
+ "get",
654
+ constructUrl({
655
+ url: this._urls["getFooterContent"],
656
+ params: {},
657
+ }),
658
+ query_params,
659
+ undefined,
660
+ { ...xHeaders, ...requestHeaders },
661
+ { responseHeaders }
662
+ );
663
+
664
+ let responseData = response;
665
+ if (responseHeaders) {
666
+ responseData = response[0];
667
+ }
668
+
669
+ const {
670
+ error: res_error,
671
+ } = ContentPublicModel.FooterSchema().validate(responseData, {
672
+ abortEarly: false,
673
+ allowUnknown: true,
674
+ });
675
+
676
+ if (res_error) {
677
+ if (this._conf.options.strictResponseCheck === true) {
678
+ return Promise.reject(new FDKResponseValidationError(res_error));
679
+ } else {
680
+ Logger({
681
+ level: "WARN",
682
+ message: `Response Validation Warnings for public > Content > getFooterContent \n ${res_error}`,
683
+ });
684
+ }
685
+ }
686
+
687
+ return response;
688
+ }
689
+
690
+ /**
691
+ * @param {ContentPublicValidator.GetHomePageContentParam} arg - Arg object.
692
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
693
+ * @param {import("../PublicAPIClient").Options} - Options
694
+ * @returns {Promise<ContentPublicModel.HomePageContentSchema>} - Success response
695
+ * @name getHomePageContent
696
+ * @summary: Get Home Page Content
697
+ * @description: Retrieve home page content for a specific page type. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getHomePageContent/).
698
+ */
699
+ async getHomePageContent(
700
+ { pageType, requestHeaders } = { requestHeaders: {} },
701
+ { responseHeaders } = { responseHeaders: false }
702
+ ) {
703
+ const { error } = ContentPublicValidator.getHomePageContent().validate(
704
+ { pageType },
705
+ { abortEarly: false, allowUnknown: true }
706
+ );
707
+ if (error) {
708
+ return Promise.reject(new FDKClientValidationError(error));
709
+ }
710
+
711
+ // Showing warrnings if extra unknown parameters are found
712
+ const {
713
+ error: warrning,
714
+ } = ContentPublicValidator.getHomePageContent().validate(
715
+ { pageType },
716
+ { abortEarly: false, allowUnknown: false }
717
+ );
718
+ if (warrning) {
719
+ Logger({
720
+ level: "WARN",
721
+ message: `Parameter Validation warrnings for public > Content > getHomePageContent \n ${warrning}`,
722
+ });
723
+ }
724
+
725
+ const query_params = {};
726
+ query_params["page_type"] = pageType;
727
+
728
+ const xHeaders = {};
729
+
730
+ const response = await PublicAPIClient.execute(
731
+ this._conf,
732
+ "get",
733
+ constructUrl({
734
+ url: this._urls["getHomePageContent"],
735
+ params: {},
736
+ }),
737
+ query_params,
738
+ undefined,
739
+ { ...xHeaders, ...requestHeaders },
740
+ { responseHeaders }
741
+ );
742
+
743
+ let responseData = response;
744
+ if (responseHeaders) {
745
+ responseData = response[0];
746
+ }
747
+
748
+ const {
749
+ error: res_error,
750
+ } = ContentPublicModel.HomePageContentSchema().validate(responseData, {
751
+ abortEarly: false,
752
+ allowUnknown: true,
753
+ });
754
+
755
+ if (res_error) {
756
+ if (this._conf.options.strictResponseCheck === true) {
757
+ return Promise.reject(new FDKResponseValidationError(res_error));
758
+ } else {
759
+ Logger({
760
+ level: "WARN",
761
+ message: `Response Validation Warnings for public > Content > getHomePageContent \n ${res_error}`,
762
+ });
763
+ }
764
+ }
765
+
766
+ return response;
767
+ }
768
+
769
+ /**
770
+ * @param {ContentPublicValidator.GetLanguageByLocaleParam} arg - Arg object.
771
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
772
+ * @param {import("../PublicAPIClient").Options} - Options
773
+ * @returns {Promise<ContentPublicModel.Language>} - Success response
774
+ * @name getLanguageByLocale
775
+ * @summary: Get Single Language
776
+ * @description: Retrieves detailed information about a specific language using its locale identifier. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getLanguageByLocale/).
777
+ */
778
+ async getLanguageByLocale(
779
+ { locale, requestHeaders } = { requestHeaders: {} },
780
+ { responseHeaders } = { responseHeaders: false }
781
+ ) {
782
+ const errors = validateRequiredParams(arguments[0], ["locale"]);
783
+ if (errors.length > 0) {
784
+ const error = new FDKClientValidationError({
785
+ message: "Missing required field",
786
+ details: errors,
787
+ });
788
+ return Promise.reject(new FDKClientValidationError(error));
789
+ }
790
+
791
+ const { error } = ContentPublicValidator.getLanguageByLocale().validate(
792
+ { locale },
793
+ { abortEarly: false, allowUnknown: true }
794
+ );
795
+ if (error) {
796
+ return Promise.reject(new FDKClientValidationError(error));
797
+ }
798
+
799
+ // Showing warrnings if extra unknown parameters are found
800
+ const {
801
+ error: warrning,
802
+ } = ContentPublicValidator.getLanguageByLocale().validate(
803
+ { locale },
804
+ { abortEarly: false, allowUnknown: false }
805
+ );
806
+ if (warrning) {
807
+ Logger({
808
+ level: "WARN",
809
+ message: `Parameter Validation warrnings for public > Content > getLanguageByLocale \n ${warrning}`,
810
+ });
811
+ }
812
+
813
+ const query_params = {};
814
+
815
+ const xHeaders = {};
816
+
817
+ const response = await PublicAPIClient.execute(
818
+ this._conf,
819
+ "get",
820
+ constructUrl({
821
+ url: this._urls["getLanguageByLocale"],
822
+ params: { locale },
823
+ }),
824
+ query_params,
825
+ undefined,
826
+ { ...xHeaders, ...requestHeaders },
827
+ { responseHeaders }
828
+ );
829
+
830
+ let responseData = response;
831
+ if (responseHeaders) {
832
+ responseData = response[0];
833
+ }
834
+
835
+ const {
836
+ error: res_error,
837
+ } = ContentPublicModel.Language().validate(responseData, {
838
+ abortEarly: false,
839
+ allowUnknown: true,
840
+ });
841
+
842
+ if (res_error) {
843
+ if (this._conf.options.strictResponseCheck === true) {
844
+ return Promise.reject(new FDKResponseValidationError(res_error));
845
+ } else {
846
+ Logger({
847
+ level: "WARN",
848
+ message: `Response Validation Warnings for public > Content > getLanguageByLocale \n ${res_error}`,
849
+ });
850
+ }
851
+ }
852
+
853
+ return response;
854
+ }
855
+
856
+ /**
857
+ * @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object.
858
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
859
+ * @param {import("../PublicAPIClient").Options} - Options
860
+ * @returns {Promise<ContentPublicModel.MenusSchema>} - Success response
861
+ * @name getMenuContent
862
+ * @summary: Get desktop menu content
863
+ * @description: Retrieves the desktop menu content. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getMenuContent/).
46
864
  */
47
- async getCredentialsByEntity(
48
- { entity, requestHeaders } = { requestHeaders: {} },
865
+ async getMenuContent(
866
+ { requestHeaders } = { requestHeaders: {} },
867
+ { responseHeaders } = { responseHeaders: false }
868
+ ) {
869
+ const { error } = ContentPublicValidator.getMenuContent().validate(
870
+ {},
871
+ { abortEarly: false, allowUnknown: true }
872
+ );
873
+ if (error) {
874
+ return Promise.reject(new FDKClientValidationError(error));
875
+ }
876
+
877
+ // Showing warrnings if extra unknown parameters are found
878
+ const {
879
+ error: warrning,
880
+ } = ContentPublicValidator.getMenuContent().validate(
881
+ {},
882
+ { abortEarly: false, allowUnknown: false }
883
+ );
884
+ if (warrning) {
885
+ Logger({
886
+ level: "WARN",
887
+ message: `Parameter Validation warrnings for public > Content > getMenuContent \n ${warrning}`,
888
+ });
889
+ }
890
+
891
+ const query_params = {};
892
+
893
+ const xHeaders = {};
894
+
895
+ const response = await PublicAPIClient.execute(
896
+ this._conf,
897
+ "get",
898
+ constructUrl({
899
+ url: this._urls["getMenuContent"],
900
+ params: {},
901
+ }),
902
+ query_params,
903
+ undefined,
904
+ { ...xHeaders, ...requestHeaders },
905
+ { responseHeaders }
906
+ );
907
+
908
+ let responseData = response;
909
+ if (responseHeaders) {
910
+ responseData = response[0];
911
+ }
912
+
913
+ const {
914
+ error: res_error,
915
+ } = ContentPublicModel.MenusSchema().validate(responseData, {
916
+ abortEarly: false,
917
+ allowUnknown: true,
918
+ });
919
+
920
+ if (res_error) {
921
+ if (this._conf.options.strictResponseCheck === true) {
922
+ return Promise.reject(new FDKResponseValidationError(res_error));
923
+ } else {
924
+ Logger({
925
+ level: "WARN",
926
+ message: `Response Validation Warnings for public > Content > getMenuContent \n ${res_error}`,
927
+ });
928
+ }
929
+ }
930
+
931
+ return response;
932
+ }
933
+
934
+ /**
935
+ * @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object.
936
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
937
+ * @param {import("../PublicAPIClient").Options} - Options
938
+ * @returns {Promise<ContentPublicModel.MenuTypeSchema>} - Success response
939
+ * @name getMenuContentByType
940
+ * @summary: Get desktop menu content
941
+ * @description: Retrieves the desktop menu content. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getMenuContentByType/).
942
+ */
943
+ async getMenuContentByType(
944
+ { type, requestHeaders } = { requestHeaders: {} },
49
945
  { responseHeaders } = { responseHeaders: false }
50
946
  ) {
51
- const errors = validateRequiredParams(arguments[0], ["entity"]);
947
+ const errors = validateRequiredParams(arguments[0], ["type"]);
52
948
  if (errors.length > 0) {
53
949
  const error = new FDKClientValidationError({
54
950
  message: "Missing required field",
@@ -57,8 +953,8 @@ class Content {
57
953
  return Promise.reject(new FDKClientValidationError(error));
58
954
  }
59
955
 
60
- const { error } = ContentPublicValidator.getCredentialsByEntity().validate(
61
- { entity },
956
+ const { error } = ContentPublicValidator.getMenuContentByType().validate(
957
+ { type },
62
958
  { abortEarly: false, allowUnknown: true }
63
959
  );
64
960
  if (error) {
@@ -68,14 +964,14 @@ class Content {
68
964
  // Showing warrnings if extra unknown parameters are found
69
965
  const {
70
966
  error: warrning,
71
- } = ContentPublicValidator.getCredentialsByEntity().validate(
72
- { entity },
967
+ } = ContentPublicValidator.getMenuContentByType().validate(
968
+ { type },
73
969
  { abortEarly: false, allowUnknown: false }
74
970
  );
75
971
  if (warrning) {
76
972
  Logger({
77
973
  level: "WARN",
78
- message: `Parameter Validation warrnings for public > Content > getCredentialsByEntity \n ${warrning}`,
974
+ message: `Parameter Validation warrnings for public > Content > getMenuContentByType \n ${warrning}`,
79
975
  });
80
976
  }
81
977
 
@@ -87,8 +983,8 @@ class Content {
87
983
  this._conf,
88
984
  "get",
89
985
  constructUrl({
90
- url: this._urls["getCredentialsByEntity"],
91
- params: { entity },
986
+ url: this._urls["getMenuContentByType"],
987
+ params: { type },
92
988
  }),
93
989
  query_params,
94
990
  undefined,
@@ -103,7 +999,7 @@ class Content {
103
999
 
104
1000
  const {
105
1001
  error: res_error,
106
- } = ContentPublicModel.CredentialsSchema().validate(responseData, {
1002
+ } = ContentPublicModel.MenuTypeSchema().validate(responseData, {
107
1003
  abortEarly: false,
108
1004
  allowUnknown: true,
109
1005
  });
@@ -114,7 +1010,161 @@ class Content {
114
1010
  } else {
115
1011
  Logger({
116
1012
  level: "WARN",
117
- message: `Response Validation Warnings for public > Content > getCredentialsByEntity \n ${res_error}`,
1013
+ message: `Response Validation Warnings for public > Content > getMenuContentByType \n ${res_error}`,
1014
+ });
1015
+ }
1016
+ }
1017
+
1018
+ return response;
1019
+ }
1020
+
1021
+ /**
1022
+ * @param {ContentPublicValidator.GetNavbarParam} arg - Arg object.
1023
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1024
+ * @param {import("../PublicAPIClient").Options} - Options
1025
+ * @returns {Promise<ContentPublicModel.NavbarSchema>} - Success response
1026
+ * @name getNavbar
1027
+ * @summary: Get Navbar
1028
+ * @description: Retrieve navbar information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getNavbar/).
1029
+ */
1030
+ async getNavbar(
1031
+ { requestHeaders } = { requestHeaders: {} },
1032
+ { responseHeaders } = { responseHeaders: false }
1033
+ ) {
1034
+ const { error } = ContentPublicValidator.getNavbar().validate(
1035
+ {},
1036
+ { abortEarly: false, allowUnknown: true }
1037
+ );
1038
+ if (error) {
1039
+ return Promise.reject(new FDKClientValidationError(error));
1040
+ }
1041
+
1042
+ // Showing warrnings if extra unknown parameters are found
1043
+ const { error: warrning } = ContentPublicValidator.getNavbar().validate(
1044
+ {},
1045
+ { abortEarly: false, allowUnknown: false }
1046
+ );
1047
+ if (warrning) {
1048
+ Logger({
1049
+ level: "WARN",
1050
+ message: `Parameter Validation warrnings for public > Content > getNavbar \n ${warrning}`,
1051
+ });
1052
+ }
1053
+
1054
+ const query_params = {};
1055
+
1056
+ const xHeaders = {};
1057
+
1058
+ const response = await PublicAPIClient.execute(
1059
+ this._conf,
1060
+ "get",
1061
+ constructUrl({
1062
+ url: this._urls["getNavbar"],
1063
+ params: {},
1064
+ }),
1065
+ query_params,
1066
+ undefined,
1067
+ { ...xHeaders, ...requestHeaders },
1068
+ { responseHeaders }
1069
+ );
1070
+
1071
+ let responseData = response;
1072
+ if (responseHeaders) {
1073
+ responseData = response[0];
1074
+ }
1075
+
1076
+ const {
1077
+ error: res_error,
1078
+ } = ContentPublicModel.NavbarSchema().validate(responseData, {
1079
+ abortEarly: false,
1080
+ allowUnknown: true,
1081
+ });
1082
+
1083
+ if (res_error) {
1084
+ if (this._conf.options.strictResponseCheck === true) {
1085
+ return Promise.reject(new FDKResponseValidationError(res_error));
1086
+ } else {
1087
+ Logger({
1088
+ level: "WARN",
1089
+ message: `Response Validation Warnings for public > Content > getNavbar \n ${res_error}`,
1090
+ });
1091
+ }
1092
+ }
1093
+
1094
+ return response;
1095
+ }
1096
+
1097
+ /**
1098
+ * @param {ContentPublicValidator.GetPricingBannerParam} arg - Arg object.
1099
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1100
+ * @param {import("../PublicAPIClient").Options} - Options
1101
+ * @returns {Promise<ContentPublicModel.PricingBannerSchema>} - Success response
1102
+ * @name getPricingBanner
1103
+ * @summary: Get Pricing Banner
1104
+ * @description: Retrieve pricing banner information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/public/content/getPricingBanner/).
1105
+ */
1106
+ async getPricingBanner(
1107
+ { requestHeaders } = { requestHeaders: {} },
1108
+ { responseHeaders } = { responseHeaders: false }
1109
+ ) {
1110
+ const { error } = ContentPublicValidator.getPricingBanner().validate(
1111
+ {},
1112
+ { abortEarly: false, allowUnknown: true }
1113
+ );
1114
+ if (error) {
1115
+ return Promise.reject(new FDKClientValidationError(error));
1116
+ }
1117
+
1118
+ // Showing warrnings if extra unknown parameters are found
1119
+ const {
1120
+ error: warrning,
1121
+ } = ContentPublicValidator.getPricingBanner().validate(
1122
+ {},
1123
+ { abortEarly: false, allowUnknown: false }
1124
+ );
1125
+ if (warrning) {
1126
+ Logger({
1127
+ level: "WARN",
1128
+ message: `Parameter Validation warrnings for public > Content > getPricingBanner \n ${warrning}`,
1129
+ });
1130
+ }
1131
+
1132
+ const query_params = {};
1133
+
1134
+ const xHeaders = {};
1135
+
1136
+ const response = await PublicAPIClient.execute(
1137
+ this._conf,
1138
+ "get",
1139
+ constructUrl({
1140
+ url: this._urls["getPricingBanner"],
1141
+ params: {},
1142
+ }),
1143
+ query_params,
1144
+ undefined,
1145
+ { ...xHeaders, ...requestHeaders },
1146
+ { responseHeaders }
1147
+ );
1148
+
1149
+ let responseData = response;
1150
+ if (responseHeaders) {
1151
+ responseData = response[0];
1152
+ }
1153
+
1154
+ const {
1155
+ error: res_error,
1156
+ } = ContentPublicModel.PricingBannerSchema().validate(responseData, {
1157
+ abortEarly: false,
1158
+ allowUnknown: true,
1159
+ });
1160
+
1161
+ if (res_error) {
1162
+ if (this._conf.options.strictResponseCheck === true) {
1163
+ return Promise.reject(new FDKResponseValidationError(res_error));
1164
+ } else {
1165
+ Logger({
1166
+ level: "WARN",
1167
+ message: `Response Validation Warnings for public > Content > getPricingBanner \n ${res_error}`,
118
1168
  });
119
1169
  }
120
1170
  }