@gofynd/fdk-client-javascript 1.4.16-beta.2 → 1.4.16-beta.4

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 (242) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +27 -114
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +29 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -51
  14. package/sdk/application/Content/ContentApplicationClient.js +56 -161
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -9
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -7
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  18. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  19. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  20. package/sdk/application/Logistic/LogisticApplicationClient.js +8 -101
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  22. package/sdk/application/Order/OrderApplicationClient.js +8 -56
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  24. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  25. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  27. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  28. package/sdk/application/Theme/ThemeApplicationClient.js +2 -4
  29. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  30. package/sdk/application/User/UserApplicationClient.js +6 -6
  31. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  32. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  33. package/sdk/common/Utility.js +6 -3
  34. package/sdk/common/utils.d.ts +0 -1
  35. package/sdk/common/utils.js +0 -14
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  41. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  42. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  43. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  44. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  45. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  47. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  49. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  51. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  52. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  53. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  54. package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
  55. package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
  56. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  57. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  58. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  59. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  60. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  62. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  64. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  66. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  72. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  73. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  74. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  75. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  76. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  77. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  78. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -121
  82. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  83. package/sdk/platform/Cart/CartPlatformModel.d.ts +1294 -5068
  84. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1992
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  88. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  89. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  90. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  91. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6389
  92. package/sdk/platform/Catalog/CatalogPlatformModel.js +1681 -3222
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  94. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  95. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  96. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  97. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  98. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  103. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  104. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  110. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  116. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  118. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  120. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -204
  122. package/sdk/platform/Content/ContentPlatformApplicationClient.js +475 -1073
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -253
  124. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -256
  125. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  126. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  127. package/sdk/platform/Content/ContentPlatformModel.d.ts +403 -1375
  128. package/sdk/platform/Content/ContentPlatformModel.js +394 -631
  129. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  130. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  131. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  132. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  133. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  134. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  135. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  142. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  146. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  147. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  148. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  149. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  150. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  151. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  152. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  153. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  154. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  155. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  156. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  161. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  162. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  163. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  164. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  165. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  166. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  167. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  168. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  169. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  170. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  172. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  174. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  175. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  176. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  177. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  178. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  179. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  180. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  181. package/sdk/platform/PlatformClient.d.ts +2 -0
  182. package/sdk/platform/PlatformClient.js +4 -0
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  188. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +49 -45
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -28
  199. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  200. package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
  201. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -3
  202. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  203. package/sdk/platform/Share/SharePlatformModel.d.ts +7 -46
  204. package/sdk/platform/Share/SharePlatformModel.js +6 -31
  205. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  206. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  207. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  208. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  209. package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
  210. package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
  211. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  212. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  213. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  214. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  215. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  216. package/sdk/platform/User/UserPlatformModel.js +23 -23
  217. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  218. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  219. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  220. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  221. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  222. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  223. package/sdk/platform/index.d.ts +1 -0
  224. package/sdk/platform/index.js +2 -0
  225. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  226. package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
  227. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  228. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  229. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  230. package/sdk/public/Content/ContentPublicClient.js +6 -810
  231. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  232. package/sdk/public/Content/ContentPublicModel.js +3 -649
  233. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  234. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  235. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  236. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  237. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  238. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  239. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  240. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  241. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  242. package/sdk/application/Finance/FinanceApplicationClient.js +0 -111
@@ -17,18 +17,7 @@ class Content {
17
17
  constructor(_conf) {
18
18
  this._conf = _conf;
19
19
  this._relativeUrls = {
20
- getAllTags: "/service/public/content/tags",
21
- getAnalyticsTags: "/service/public/content/analytics-tags",
22
- getBasicDetails: "/service/public/content/basic-details",
23
- getCredentialsByEntity:
24
- "/service/public/content/credentials/{entity_type}",
25
- getCustomPage: "/service/public/content/custom-pages/{slug}",
26
- getFooterContent: "/service/public/content/footer",
27
- getHomePageContent: "/service/public/content/home-page",
28
- getMenuContent: "/service/public/content/menu",
29
- getMenuContentByType: "/service/public/content/menu/{type}",
30
- getNavbar: "/service/public/content/navbar",
31
- getPricingBanner: "/service/public/content/pricing-banner",
20
+ getCredentialsByEntity: "/service/public/content/credentials/{entity}",
32
21
  };
33
22
  this._urls = Object.entries(this._relativeUrls).reduce(
34
23
  (urls, [method, relativeUrl]) => {
@@ -46,238 +35,6 @@ class Content {
46
35
  };
47
36
  }
48
37
 
49
- /**
50
- * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object.
51
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
52
- * @param {import("../PublicAPIClient").Options} - Options
53
- * @returns {Promise<ContentPublicModel.TagsSchema>} - Success response
54
- * @name getAllTags
55
- * @summary: Retrieve tags with injected css/javascript info.
56
- * @description: Retrieve custom tag with injected css/javascript info. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTags/).
57
- */
58
- async getAllTags(
59
- { requestHeaders } = { requestHeaders: {} },
60
- { responseHeaders } = { responseHeaders: false }
61
- ) {
62
- const { error } = ContentPublicValidator.getAllTags().validate(
63
- {},
64
- { abortEarly: false, allowUnknown: true }
65
- );
66
- if (error) {
67
- return Promise.reject(new FDKClientValidationError(error));
68
- }
69
-
70
- // Showing warrnings if extra unknown parameters are found
71
- const { error: warrning } = ContentPublicValidator.getAllTags().validate(
72
- {},
73
- { abortEarly: false, allowUnknown: false }
74
- );
75
- if (warrning) {
76
- Logger({
77
- level: "WARN",
78
- message: `Parameter Validation warrnings for public > Content > getAllTags \n ${warrning}`,
79
- });
80
- }
81
-
82
- const query_params = {};
83
-
84
- const xHeaders = {};
85
-
86
- const response = await PublicAPIClient.execute(
87
- this._conf,
88
- "get",
89
- constructUrl({
90
- url: this._urls["getAllTags"],
91
- params: {},
92
- }),
93
- query_params,
94
- undefined,
95
- { ...xHeaders, ...requestHeaders },
96
- { responseHeaders }
97
- );
98
-
99
- let responseData = response;
100
- if (responseHeaders) {
101
- responseData = response[0];
102
- }
103
-
104
- const {
105
- error: res_error,
106
- } = ContentPublicModel.TagsSchema().validate(responseData, {
107
- abortEarly: false,
108
- allowUnknown: true,
109
- });
110
-
111
- if (res_error) {
112
- if (this._conf.options.strictResponseCheck === true) {
113
- return Promise.reject(new FDKResponseValidationError(res_error));
114
- } else {
115
- Logger({
116
- level: "WARN",
117
- message: `Response Validation Warnings for public > Content > getAllTags \n ${res_error}`,
118
- });
119
- }
120
- }
121
-
122
- return response;
123
- }
124
-
125
- /**
126
- * @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object.
127
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
128
- * @param {import("../PublicAPIClient").Options} - Options
129
- * @returns {Promise<ContentPublicModel.AnalyticsTagsSchema>} - Success response
130
- * @name getAnalyticsTags
131
- * @summary: Get Analytics Tags
132
- * @description: Retrieve analytics tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAnalyticsTags/).
133
- */
134
- async getAnalyticsTags(
135
- { requestHeaders } = { requestHeaders: {} },
136
- { responseHeaders } = { responseHeaders: false }
137
- ) {
138
- const { error } = ContentPublicValidator.getAnalyticsTags().validate(
139
- {},
140
- { abortEarly: false, allowUnknown: true }
141
- );
142
- if (error) {
143
- return Promise.reject(new FDKClientValidationError(error));
144
- }
145
-
146
- // Showing warrnings if extra unknown parameters are found
147
- const {
148
- error: warrning,
149
- } = ContentPublicValidator.getAnalyticsTags().validate(
150
- {},
151
- { abortEarly: false, allowUnknown: false }
152
- );
153
- if (warrning) {
154
- Logger({
155
- level: "WARN",
156
- message: `Parameter Validation warrnings for public > Content > getAnalyticsTags \n ${warrning}`,
157
- });
158
- }
159
-
160
- const query_params = {};
161
-
162
- const xHeaders = {};
163
-
164
- const response = await PublicAPIClient.execute(
165
- this._conf,
166
- "get",
167
- constructUrl({
168
- url: this._urls["getAnalyticsTags"],
169
- params: {},
170
- }),
171
- query_params,
172
- undefined,
173
- { ...xHeaders, ...requestHeaders },
174
- { responseHeaders }
175
- );
176
-
177
- let responseData = response;
178
- if (responseHeaders) {
179
- responseData = response[0];
180
- }
181
-
182
- const {
183
- error: res_error,
184
- } = ContentPublicModel.AnalyticsTagsSchema().validate(responseData, {
185
- abortEarly: false,
186
- allowUnknown: true,
187
- });
188
-
189
- if (res_error) {
190
- if (this._conf.options.strictResponseCheck === true) {
191
- return Promise.reject(new FDKResponseValidationError(res_error));
192
- } else {
193
- Logger({
194
- level: "WARN",
195
- message: `Response Validation Warnings for public > Content > getAnalyticsTags \n ${res_error}`,
196
- });
197
- }
198
- }
199
-
200
- return response;
201
- }
202
-
203
- /**
204
- * @param {ContentPublicValidator.GetBasicDetailsParam} arg - Arg object.
205
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
206
- * @param {import("../PublicAPIClient").Options} - Options
207
- * @returns {Promise<ContentPublicModel.BasicDetailsPayloadSchema>} - Success response
208
- * @name getBasicDetails
209
- * @summary: get basic platform information
210
- * @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://partners.fynd.com/help/docs/sdk/public/content/getBasicDetails/).
211
- */
212
- async getBasicDetails(
213
- { requestHeaders } = { requestHeaders: {} },
214
- { responseHeaders } = { responseHeaders: false }
215
- ) {
216
- const { error } = ContentPublicValidator.getBasicDetails().validate(
217
- {},
218
- { abortEarly: false, allowUnknown: true }
219
- );
220
- if (error) {
221
- return Promise.reject(new FDKClientValidationError(error));
222
- }
223
-
224
- // Showing warrnings if extra unknown parameters are found
225
- const {
226
- error: warrning,
227
- } = ContentPublicValidator.getBasicDetails().validate(
228
- {},
229
- { abortEarly: false, allowUnknown: false }
230
- );
231
- if (warrning) {
232
- Logger({
233
- level: "WARN",
234
- message: `Parameter Validation warrnings for public > Content > getBasicDetails \n ${warrning}`,
235
- });
236
- }
237
-
238
- const query_params = {};
239
-
240
- const xHeaders = {};
241
-
242
- const response = await PublicAPIClient.execute(
243
- this._conf,
244
- "get",
245
- constructUrl({
246
- url: this._urls["getBasicDetails"],
247
- params: {},
248
- }),
249
- query_params,
250
- undefined,
251
- { ...xHeaders, ...requestHeaders },
252
- { responseHeaders }
253
- );
254
-
255
- let responseData = response;
256
- if (responseHeaders) {
257
- responseData = response[0];
258
- }
259
-
260
- const {
261
- error: res_error,
262
- } = ContentPublicModel.BasicDetailsPayloadSchema().validate(responseData, {
263
- abortEarly: false,
264
- allowUnknown: true,
265
- });
266
-
267
- if (res_error) {
268
- if (this._conf.options.strictResponseCheck === true) {
269
- return Promise.reject(new FDKResponseValidationError(res_error));
270
- } else {
271
- Logger({
272
- level: "WARN",
273
- message: `Response Validation Warnings for public > Content > getBasicDetails \n ${res_error}`,
274
- });
275
- }
276
- }
277
-
278
- return response;
279
- }
280
-
281
38
  /**
282
39
  * @param {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object.
283
40
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -288,10 +45,10 @@ class Content {
288
45
  * @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/).
289
46
  */
290
47
  async getCredentialsByEntity(
291
- { entityType, requestHeaders } = { requestHeaders: {} },
48
+ { entity, requestHeaders } = { requestHeaders: {} },
292
49
  { responseHeaders } = { responseHeaders: false }
293
50
  ) {
294
- const errors = validateRequiredParams(arguments[0], ["entityType"]);
51
+ const errors = validateRequiredParams(arguments[0], ["entity"]);
295
52
  if (errors.length > 0) {
296
53
  const error = new FDKClientValidationError({
297
54
  message: "Missing required field",
@@ -301,7 +58,7 @@ class Content {
301
58
  }
302
59
 
303
60
  const { error } = ContentPublicValidator.getCredentialsByEntity().validate(
304
- { entityType },
61
+ { entity },
305
62
  { abortEarly: false, allowUnknown: true }
306
63
  );
307
64
  if (error) {
@@ -312,7 +69,7 @@ class Content {
312
69
  const {
313
70
  error: warrning,
314
71
  } = ContentPublicValidator.getCredentialsByEntity().validate(
315
- { entityType },
72
+ { entity },
316
73
  { abortEarly: false, allowUnknown: false }
317
74
  );
318
75
  if (warrning) {
@@ -331,7 +88,7 @@ class Content {
331
88
  "get",
332
89
  constructUrl({
333
90
  url: this._urls["getCredentialsByEntity"],
334
- params: { entityType },
91
+ params: { entity },
335
92
  }),
336
93
  query_params,
337
94
  undefined,
@@ -364,567 +121,6 @@ class Content {
364
121
 
365
122
  return response;
366
123
  }
367
-
368
- /**
369
- * @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object.
370
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
371
- * @param {import("../PublicAPIClient").Options} - Options
372
- * @returns {Promise<ContentPublicModel.CustomPageBySlugSchema>} - Success response
373
- * @name getCustomPage
374
- * @summary: Retrieve info for custom page.
375
- * @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCustomPage/).
376
- */
377
- async getCustomPage(
378
- { slug, requestHeaders } = { requestHeaders: {} },
379
- { responseHeaders } = { responseHeaders: false }
380
- ) {
381
- const errors = validateRequiredParams(arguments[0], ["slug"]);
382
- if (errors.length > 0) {
383
- const error = new FDKClientValidationError({
384
- message: "Missing required field",
385
- details: errors,
386
- });
387
- return Promise.reject(new FDKClientValidationError(error));
388
- }
389
-
390
- const { error } = ContentPublicValidator.getCustomPage().validate(
391
- { slug },
392
- { abortEarly: false, allowUnknown: true }
393
- );
394
- if (error) {
395
- return Promise.reject(new FDKClientValidationError(error));
396
- }
397
-
398
- // Showing warrnings if extra unknown parameters are found
399
- const { error: warrning } = ContentPublicValidator.getCustomPage().validate(
400
- { slug },
401
- { abortEarly: false, allowUnknown: false }
402
- );
403
- if (warrning) {
404
- Logger({
405
- level: "WARN",
406
- message: `Parameter Validation warrnings for public > Content > getCustomPage \n ${warrning}`,
407
- });
408
- }
409
-
410
- const query_params = {};
411
-
412
- const xHeaders = {};
413
-
414
- const response = await PublicAPIClient.execute(
415
- this._conf,
416
- "get",
417
- constructUrl({
418
- url: this._urls["getCustomPage"],
419
- params: { slug },
420
- }),
421
- query_params,
422
- undefined,
423
- { ...xHeaders, ...requestHeaders },
424
- { responseHeaders }
425
- );
426
-
427
- let responseData = response;
428
- if (responseHeaders) {
429
- responseData = response[0];
430
- }
431
-
432
- const {
433
- error: res_error,
434
- } = ContentPublicModel.CustomPageBySlugSchema().validate(responseData, {
435
- abortEarly: false,
436
- allowUnknown: true,
437
- });
438
-
439
- if (res_error) {
440
- if (this._conf.options.strictResponseCheck === true) {
441
- return Promise.reject(new FDKResponseValidationError(res_error));
442
- } else {
443
- Logger({
444
- level: "WARN",
445
- message: `Response Validation Warnings for public > Content > getCustomPage \n ${res_error}`,
446
- });
447
- }
448
- }
449
-
450
- return response;
451
- }
452
-
453
- /**
454
- * @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object.
455
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
456
- * @param {import("../PublicAPIClient").Options} - Options
457
- * @returns {Promise<ContentPublicModel.FooterSchema>} - Success response
458
- * @name getFooterContent
459
- * @summary: Get Footer Content
460
- * @description: Retrieve footer content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getFooterContent/).
461
- */
462
- async getFooterContent(
463
- { requestHeaders } = { requestHeaders: {} },
464
- { responseHeaders } = { responseHeaders: false }
465
- ) {
466
- const { error } = ContentPublicValidator.getFooterContent().validate(
467
- {},
468
- { abortEarly: false, allowUnknown: true }
469
- );
470
- if (error) {
471
- return Promise.reject(new FDKClientValidationError(error));
472
- }
473
-
474
- // Showing warrnings if extra unknown parameters are found
475
- const {
476
- error: warrning,
477
- } = ContentPublicValidator.getFooterContent().validate(
478
- {},
479
- { abortEarly: false, allowUnknown: false }
480
- );
481
- if (warrning) {
482
- Logger({
483
- level: "WARN",
484
- message: `Parameter Validation warrnings for public > Content > getFooterContent \n ${warrning}`,
485
- });
486
- }
487
-
488
- const query_params = {};
489
-
490
- const xHeaders = {};
491
-
492
- const response = await PublicAPIClient.execute(
493
- this._conf,
494
- "get",
495
- constructUrl({
496
- url: this._urls["getFooterContent"],
497
- params: {},
498
- }),
499
- query_params,
500
- undefined,
501
- { ...xHeaders, ...requestHeaders },
502
- { responseHeaders }
503
- );
504
-
505
- let responseData = response;
506
- if (responseHeaders) {
507
- responseData = response[0];
508
- }
509
-
510
- const {
511
- error: res_error,
512
- } = ContentPublicModel.FooterSchema().validate(responseData, {
513
- abortEarly: false,
514
- allowUnknown: true,
515
- });
516
-
517
- if (res_error) {
518
- if (this._conf.options.strictResponseCheck === true) {
519
- return Promise.reject(new FDKResponseValidationError(res_error));
520
- } else {
521
- Logger({
522
- level: "WARN",
523
- message: `Response Validation Warnings for public > Content > getFooterContent \n ${res_error}`,
524
- });
525
- }
526
- }
527
-
528
- return response;
529
- }
530
-
531
- /**
532
- * @param {ContentPublicValidator.GetHomePageContentParam} arg - Arg object.
533
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
534
- * @param {import("../PublicAPIClient").Options} - Options
535
- * @returns {Promise<ContentPublicModel.HomePageContentSchema>} - Success response
536
- * @name getHomePageContent
537
- * @summary: Get Home Page Content
538
- * @description: Retrieve home page content for a specific page type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getHomePageContent/).
539
- */
540
- async getHomePageContent(
541
- { pageType, requestHeaders } = { requestHeaders: {} },
542
- { responseHeaders } = { responseHeaders: false }
543
- ) {
544
- const { error } = ContentPublicValidator.getHomePageContent().validate(
545
- { pageType },
546
- { abortEarly: false, allowUnknown: true }
547
- );
548
- if (error) {
549
- return Promise.reject(new FDKClientValidationError(error));
550
- }
551
-
552
- // Showing warrnings if extra unknown parameters are found
553
- const {
554
- error: warrning,
555
- } = ContentPublicValidator.getHomePageContent().validate(
556
- { pageType },
557
- { abortEarly: false, allowUnknown: false }
558
- );
559
- if (warrning) {
560
- Logger({
561
- level: "WARN",
562
- message: `Parameter Validation warrnings for public > Content > getHomePageContent \n ${warrning}`,
563
- });
564
- }
565
-
566
- const query_params = {};
567
- query_params["page_type"] = pageType;
568
-
569
- const xHeaders = {};
570
-
571
- const response = await PublicAPIClient.execute(
572
- this._conf,
573
- "get",
574
- constructUrl({
575
- url: this._urls["getHomePageContent"],
576
- params: {},
577
- }),
578
- query_params,
579
- undefined,
580
- { ...xHeaders, ...requestHeaders },
581
- { responseHeaders }
582
- );
583
-
584
- let responseData = response;
585
- if (responseHeaders) {
586
- responseData = response[0];
587
- }
588
-
589
- const {
590
- error: res_error,
591
- } = ContentPublicModel.HomePageContentSchema().validate(responseData, {
592
- abortEarly: false,
593
- allowUnknown: true,
594
- });
595
-
596
- if (res_error) {
597
- if (this._conf.options.strictResponseCheck === true) {
598
- return Promise.reject(new FDKResponseValidationError(res_error));
599
- } else {
600
- Logger({
601
- level: "WARN",
602
- message: `Response Validation Warnings for public > Content > getHomePageContent \n ${res_error}`,
603
- });
604
- }
605
- }
606
-
607
- return response;
608
- }
609
-
610
- /**
611
- * @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object.
612
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
613
- * @param {import("../PublicAPIClient").Options} - Options
614
- * @returns {Promise<ContentPublicModel.MenusSchema>} - Success response
615
- * @name getMenuContent
616
- * @summary: Get desktop menu content
617
- * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContent/).
618
- */
619
- async getMenuContent(
620
- { requestHeaders } = { requestHeaders: {} },
621
- { responseHeaders } = { responseHeaders: false }
622
- ) {
623
- const { error } = ContentPublicValidator.getMenuContent().validate(
624
- {},
625
- { abortEarly: false, allowUnknown: true }
626
- );
627
- if (error) {
628
- return Promise.reject(new FDKClientValidationError(error));
629
- }
630
-
631
- // Showing warrnings if extra unknown parameters are found
632
- const {
633
- error: warrning,
634
- } = ContentPublicValidator.getMenuContent().validate(
635
- {},
636
- { abortEarly: false, allowUnknown: false }
637
- );
638
- if (warrning) {
639
- Logger({
640
- level: "WARN",
641
- message: `Parameter Validation warrnings for public > Content > getMenuContent \n ${warrning}`,
642
- });
643
- }
644
-
645
- const query_params = {};
646
-
647
- const xHeaders = {};
648
-
649
- const response = await PublicAPIClient.execute(
650
- this._conf,
651
- "get",
652
- constructUrl({
653
- url: this._urls["getMenuContent"],
654
- params: {},
655
- }),
656
- query_params,
657
- undefined,
658
- { ...xHeaders, ...requestHeaders },
659
- { responseHeaders }
660
- );
661
-
662
- let responseData = response;
663
- if (responseHeaders) {
664
- responseData = response[0];
665
- }
666
-
667
- const {
668
- error: res_error,
669
- } = ContentPublicModel.MenusSchema().validate(responseData, {
670
- abortEarly: false,
671
- allowUnknown: true,
672
- });
673
-
674
- if (res_error) {
675
- if (this._conf.options.strictResponseCheck === true) {
676
- return Promise.reject(new FDKResponseValidationError(res_error));
677
- } else {
678
- Logger({
679
- level: "WARN",
680
- message: `Response Validation Warnings for public > Content > getMenuContent \n ${res_error}`,
681
- });
682
- }
683
- }
684
-
685
- return response;
686
- }
687
-
688
- /**
689
- * @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object.
690
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
691
- * @param {import("../PublicAPIClient").Options} - Options
692
- * @returns {Promise<ContentPublicModel.MenuTypeSchema>} - Success response
693
- * @name getMenuContentByType
694
- * @summary: Get desktop menu content
695
- * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/).
696
- */
697
- async getMenuContentByType(
698
- { type, requestHeaders } = { requestHeaders: {} },
699
- { responseHeaders } = { responseHeaders: false }
700
- ) {
701
- const errors = validateRequiredParams(arguments[0], ["type"]);
702
- if (errors.length > 0) {
703
- const error = new FDKClientValidationError({
704
- message: "Missing required field",
705
- details: errors,
706
- });
707
- return Promise.reject(new FDKClientValidationError(error));
708
- }
709
-
710
- const { error } = ContentPublicValidator.getMenuContentByType().validate(
711
- { type },
712
- { abortEarly: false, allowUnknown: true }
713
- );
714
- if (error) {
715
- return Promise.reject(new FDKClientValidationError(error));
716
- }
717
-
718
- // Showing warrnings if extra unknown parameters are found
719
- const {
720
- error: warrning,
721
- } = ContentPublicValidator.getMenuContentByType().validate(
722
- { type },
723
- { abortEarly: false, allowUnknown: false }
724
- );
725
- if (warrning) {
726
- Logger({
727
- level: "WARN",
728
- message: `Parameter Validation warrnings for public > Content > getMenuContentByType \n ${warrning}`,
729
- });
730
- }
731
-
732
- const query_params = {};
733
-
734
- const xHeaders = {};
735
-
736
- const response = await PublicAPIClient.execute(
737
- this._conf,
738
- "get",
739
- constructUrl({
740
- url: this._urls["getMenuContentByType"],
741
- params: { type },
742
- }),
743
- query_params,
744
- undefined,
745
- { ...xHeaders, ...requestHeaders },
746
- { responseHeaders }
747
- );
748
-
749
- let responseData = response;
750
- if (responseHeaders) {
751
- responseData = response[0];
752
- }
753
-
754
- const {
755
- error: res_error,
756
- } = ContentPublicModel.MenuTypeSchema().validate(responseData, {
757
- abortEarly: false,
758
- allowUnknown: true,
759
- });
760
-
761
- if (res_error) {
762
- if (this._conf.options.strictResponseCheck === true) {
763
- return Promise.reject(new FDKResponseValidationError(res_error));
764
- } else {
765
- Logger({
766
- level: "WARN",
767
- message: `Response Validation Warnings for public > Content > getMenuContentByType \n ${res_error}`,
768
- });
769
- }
770
- }
771
-
772
- return response;
773
- }
774
-
775
- /**
776
- * @param {ContentPublicValidator.GetNavbarParam} arg - Arg object.
777
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
778
- * @param {import("../PublicAPIClient").Options} - Options
779
- * @returns {Promise<ContentPublicModel.NavbarSchema>} - Success response
780
- * @name getNavbar
781
- * @summary: Get Navbar
782
- * @description: Retrieve navbar information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getNavbar/).
783
- */
784
- async getNavbar(
785
- { requestHeaders } = { requestHeaders: {} },
786
- { responseHeaders } = { responseHeaders: false }
787
- ) {
788
- const { error } = ContentPublicValidator.getNavbar().validate(
789
- {},
790
- { abortEarly: false, allowUnknown: true }
791
- );
792
- if (error) {
793
- return Promise.reject(new FDKClientValidationError(error));
794
- }
795
-
796
- // Showing warrnings if extra unknown parameters are found
797
- const { error: warrning } = ContentPublicValidator.getNavbar().validate(
798
- {},
799
- { abortEarly: false, allowUnknown: false }
800
- );
801
- if (warrning) {
802
- Logger({
803
- level: "WARN",
804
- message: `Parameter Validation warrnings for public > Content > getNavbar \n ${warrning}`,
805
- });
806
- }
807
-
808
- const query_params = {};
809
-
810
- const xHeaders = {};
811
-
812
- const response = await PublicAPIClient.execute(
813
- this._conf,
814
- "get",
815
- constructUrl({
816
- url: this._urls["getNavbar"],
817
- params: {},
818
- }),
819
- query_params,
820
- undefined,
821
- { ...xHeaders, ...requestHeaders },
822
- { responseHeaders }
823
- );
824
-
825
- let responseData = response;
826
- if (responseHeaders) {
827
- responseData = response[0];
828
- }
829
-
830
- const {
831
- error: res_error,
832
- } = ContentPublicModel.NavbarSchema().validate(responseData, {
833
- abortEarly: false,
834
- allowUnknown: true,
835
- });
836
-
837
- if (res_error) {
838
- if (this._conf.options.strictResponseCheck === true) {
839
- return Promise.reject(new FDKResponseValidationError(res_error));
840
- } else {
841
- Logger({
842
- level: "WARN",
843
- message: `Response Validation Warnings for public > Content > getNavbar \n ${res_error}`,
844
- });
845
- }
846
- }
847
-
848
- return response;
849
- }
850
-
851
- /**
852
- * @param {ContentPublicValidator.GetPricingBannerParam} arg - Arg object.
853
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
854
- * @param {import("../PublicAPIClient").Options} - Options
855
- * @returns {Promise<ContentPublicModel.PricingBannerSchema>} - Success response
856
- * @name getPricingBanner
857
- * @summary: Get Pricing Banner
858
- * @description: Retrieve pricing banner information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getPricingBanner/).
859
- */
860
- async getPricingBanner(
861
- { requestHeaders } = { requestHeaders: {} },
862
- { responseHeaders } = { responseHeaders: false }
863
- ) {
864
- const { error } = ContentPublicValidator.getPricingBanner().validate(
865
- {},
866
- { abortEarly: false, allowUnknown: true }
867
- );
868
- if (error) {
869
- return Promise.reject(new FDKClientValidationError(error));
870
- }
871
-
872
- // Showing warrnings if extra unknown parameters are found
873
- const {
874
- error: warrning,
875
- } = ContentPublicValidator.getPricingBanner().validate(
876
- {},
877
- { abortEarly: false, allowUnknown: false }
878
- );
879
- if (warrning) {
880
- Logger({
881
- level: "WARN",
882
- message: `Parameter Validation warrnings for public > Content > getPricingBanner \n ${warrning}`,
883
- });
884
- }
885
-
886
- const query_params = {};
887
-
888
- const xHeaders = {};
889
-
890
- const response = await PublicAPIClient.execute(
891
- this._conf,
892
- "get",
893
- constructUrl({
894
- url: this._urls["getPricingBanner"],
895
- params: {},
896
- }),
897
- query_params,
898
- undefined,
899
- { ...xHeaders, ...requestHeaders },
900
- { responseHeaders }
901
- );
902
-
903
- let responseData = response;
904
- if (responseHeaders) {
905
- responseData = response[0];
906
- }
907
-
908
- const {
909
- error: res_error,
910
- } = ContentPublicModel.PricingBannerSchema().validate(responseData, {
911
- abortEarly: false,
912
- allowUnknown: true,
913
- });
914
-
915
- if (res_error) {
916
- if (this._conf.options.strictResponseCheck === true) {
917
- return Promise.reject(new FDKResponseValidationError(res_error));
918
- } else {
919
- Logger({
920
- level: "WARN",
921
- message: `Response Validation Warnings for public > Content > getPricingBanner \n ${res_error}`,
922
- });
923
- }
924
- }
925
-
926
- return response;
927
- }
928
124
  }
929
125
 
930
126
  module.exports = Content;