@gofynd/fdk-client-javascript 1.0.2 → 1.0.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 (346) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
  12. package/sdk/application/Cart/CartApplicationClient.js +595 -594
  13. package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
  14. package/sdk/application/Cart/CartApplicationModel.js +490 -885
  15. package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
  16. package/sdk/application/Cart/CartApplicationValidator.js +98 -98
  17. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
  18. package/sdk/application/Catalog/CatalogApplicationClient.js +1079 -1078
  19. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
  20. package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
  21. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
  22. package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
  23. package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
  24. package/sdk/application/Common/CommonApplicationClient.js +43 -42
  25. package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
  26. package/sdk/application/Common/CommonApplicationModel.js +83 -160
  27. package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
  28. package/sdk/application/Common/CommonApplicationValidator.js +6 -6
  29. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
  30. package/sdk/application/Communication/CommunicationApplicationClient.js +32 -31
  31. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
  32. package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
  33. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
  34. package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
  36. package/sdk/application/Configuration/ConfigurationApplicationClient.js +350 -349
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
  38. package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
  40. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
  41. package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
  42. package/sdk/application/Content/ContentApplicationClient.js +216 -215
  43. package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
  44. package/sdk/application/Content/ContentApplicationModel.js +468 -884
  45. package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
  46. package/sdk/application/Content/ContentApplicationValidator.js +24 -24
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
  48. package/sdk/application/FileStorage/FileStorageApplicationClient.js +65 -64
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
  50. package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
  52. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
  53. package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
  54. package/sdk/application/Lead/LeadApplicationClient.js +109 -108
  55. package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
  56. package/sdk/application/Lead/LeadApplicationModel.js +267 -474
  57. package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
  58. package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
  59. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +31 -22
  60. package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
  61. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
  62. package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
  63. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
  64. package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -9
  65. package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
  66. package/sdk/application/Order/OrderApplicationClient.js +247 -246
  67. package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
  68. package/sdk/application/Order/OrderApplicationModel.js +361 -656
  69. package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
  70. package/sdk/application/Order/OrderApplicationValidator.js +28 -28
  71. package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
  72. package/sdk/application/Payment/PaymentApplicationClient.js +781 -780
  73. package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
  74. package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
  75. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
  76. package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
  77. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
  78. package/sdk/application/PosCart/PosCartApplicationClient.js +646 -645
  79. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
  80. package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
  81. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
  82. package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
  83. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
  84. package/sdk/application/Rewards/RewardsApplicationClient.js +122 -121
  85. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
  86. package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
  87. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
  88. package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
  89. package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
  90. package/sdk/application/Share/ShareApplicationClient.js +94 -93
  91. package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
  92. package/sdk/application/Share/ShareApplicationModel.js +63 -123
  93. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
  94. package/sdk/application/Share/ShareApplicationValidator.js +12 -12
  95. package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
  96. package/sdk/application/Theme/ThemeApplicationClient.js +38 -37
  97. package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
  98. package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
  99. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
  100. package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
  101. package/sdk/application/User/UserApplicationClient.d.ts +280 -280
  102. package/sdk/application/User/UserApplicationClient.js +619 -618
  103. package/sdk/application/User/UserApplicationModel.d.ts +79 -72
  104. package/sdk/application/User/UserApplicationModel.js +440 -689
  105. package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
  106. package/sdk/application/User/UserApplicationValidator.js +89 -89
  107. package/sdk/common/AxiosHelper.js +18 -7
  108. package/sdk/constructUrl.d.ts +5 -0
  109. package/sdk/constructUrl.js +13 -0
  110. package/sdk/index.d.ts +3 -0
  111. package/sdk/index.js +5 -0
  112. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
  113. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
  114. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
  115. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
  116. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  117. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
  118. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
  119. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  120. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
  121. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
  122. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
  123. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
  124. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
  125. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +7 -6
  126. package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
  127. package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
  128. package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
  129. package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
  130. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
  131. package/sdk/platform/Billing/BillingPlatformValidator.js +26 -25
  132. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
  133. package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
  134. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
  135. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
  136. package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
  137. package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
  138. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
  139. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
  140. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
  141. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
  142. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
  143. package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
  144. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
  145. package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
  146. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
  147. package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
  148. package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
  149. package/sdk/platform/Common/CommonPlatformClient.js +40 -51
  150. package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
  151. package/sdk/platform/Common/CommonPlatformModel.js +83 -160
  152. package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
  153. package/sdk/platform/Common/CommonPlatformValidator.js +7 -6
  154. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
  155. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
  156. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
  157. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
  158. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  159. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
  160. package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
  161. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  162. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
  163. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
  164. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
  165. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
  166. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
  167. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
  168. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
  169. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
  170. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
  171. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
  172. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
  173. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
  174. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
  175. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
  176. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
  177. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +39 -38
  178. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
  179. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
  180. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
  181. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
  182. package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
  183. package/sdk/platform/Content/ContentPlatformModel.js +485 -907
  184. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
  185. package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
  186. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
  187. package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
  188. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
  189. package/sdk/platform/Discount/DiscountPlatformValidator.js +30 -29
  190. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
  191. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
  192. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  193. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
  194. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
  195. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
  196. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
  197. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
  198. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
  199. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +12 -11
  200. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
  201. package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
  202. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
  203. package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
  204. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
  205. package/sdk/platform/Inventory/InventoryPlatformValidator.js +29 -28
  206. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
  207. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
  208. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
  209. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
  210. package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
  211. package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
  212. package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
  213. package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
  214. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
  215. package/sdk/platform/Lead/LeadPlatformValidator.js +25 -24
  216. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
  217. package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
  218. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
  219. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
  220. package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
  221. package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
  222. package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
  223. package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
  224. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
  225. package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
  226. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  227. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  228. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
  229. package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
  230. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
  231. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
  232. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
  233. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
  234. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
  235. package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
  236. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
  237. package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
  238. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
  239. package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
  240. package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
  241. package/sdk/platform/PlatformApplicationClient.js +1584 -13899
  242. package/sdk/platform/PlatformClient.d.ts +7972 -7888
  243. package/sdk/platform/PlatformClient.js +8678 -10107
  244. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
  245. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
  246. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
  247. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
  248. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
  249. package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
  250. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
  251. package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
  252. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
  253. package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
  254. package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
  255. package/sdk/platform/Share/SharePlatformModel.js +60 -118
  256. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
  257. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
  258. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
  259. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
  260. package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
  261. package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
  262. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
  263. package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
  264. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
  265. package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
  266. package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
  267. package/sdk/platform/User/UserPlatformModel.js +440 -689
  268. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
  269. package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
  270. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
  271. package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
  272. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
  273. package/sdk/platform/Webhook/WebhookPlatformValidator.js +15 -14
  274. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
  275. package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -38
  276. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
  277. package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
  278. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
  279. package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
  280. package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
  281. package/sdk/public/Inventory/InventoryPublicClient.js +115 -113
  282. package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
  283. package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
  284. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
  285. package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
  286. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  287. package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
  288. package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
  289. package/.github/workflows/on_create_release.yml +0 -23
  290. package/.github/workflows/on_merge_main.yml +0 -38
  291. package/.github/workflows/on_pull_request.yml +0 -35
  292. package/.prettierrc +0 -5
  293. package/documentation/application/CART.md +0 -7339
  294. package/documentation/application/CATALOG.md +0 -9597
  295. package/documentation/application/COMMON.md +0 -452
  296. package/documentation/application/COMMUNICATION.md +0 -467
  297. package/documentation/application/CONFIGURATION.md +0 -2906
  298. package/documentation/application/CONTENT.md +0 -3351
  299. package/documentation/application/FILESTORAGE.md +0 -578
  300. package/documentation/application/LEAD.md +0 -1895
  301. package/documentation/application/LOGISTIC.md +0 -765
  302. package/documentation/application/ORDER.md +0 -3432
  303. package/documentation/application/PAYMENT.md +0 -5221
  304. package/documentation/application/POSCART.md +0 -7938
  305. package/documentation/application/README.md +0 -21
  306. package/documentation/application/REWARDS.md +0 -708
  307. package/documentation/application/SHARE.md +0 -733
  308. package/documentation/application/THEME.md +0 -5800
  309. package/documentation/application/USER.md +0 -4335
  310. package/documentation/platform/ANALYTICS.md +0 -1154
  311. package/documentation/platform/AUDITTRAIL.md +0 -576
  312. package/documentation/platform/BILLING.md +0 -2400
  313. package/documentation/platform/CART.md +0 -5559
  314. package/documentation/platform/CATALOG.md +0 -23261
  315. package/documentation/platform/COMMON.md +0 -452
  316. package/documentation/platform/COMMUNICATION.md +0 -5718
  317. package/documentation/platform/COMPANYPROFILE.md +0 -2031
  318. package/documentation/platform/CONFIGURATION.md +0 -7339
  319. package/documentation/platform/CONTENT.md +0 -9098
  320. package/documentation/platform/DISCOUNT.md +0 -863
  321. package/documentation/platform/FILESTORAGE.md +0 -1081
  322. package/documentation/platform/INVENTORY.md +0 -1779
  323. package/documentation/platform/LEAD.md +0 -4740
  324. package/documentation/platform/ORDER.md +0 -8486
  325. package/documentation/platform/PARTNER.md +0 -220
  326. package/documentation/platform/PAYMENT.md +0 -3448
  327. package/documentation/platform/README.md +0 -27
  328. package/documentation/platform/REWARDS.md +0 -1083
  329. package/documentation/platform/SHARE.md +0 -606
  330. package/documentation/platform/THEME.md +0 -35729
  331. package/documentation/platform/USER.md +0 -2319
  332. package/documentation/platform/WEBHOOK.md +0 -591
  333. package/documentation/public/CONFIGURATION.md +0 -452
  334. package/documentation/public/INVENTORY.md +0 -690
  335. package/documentation/public/WEBHOOK.md +0 -352
  336. package/jest.config.d.ts +0 -4
  337. package/jest.config.js +0 -6
  338. package/tests/application/catalog.spec.js +0 -47
  339. package/tests/common/action-url.spec.js +0 -35
  340. package/tests/common/schema/action-url.json +0 -178
  341. package/tests/common/schema/url-action.json +0 -683
  342. package/tests/common/url-action.spec.js +0 -48
  343. package/tests/helpers/cookie.helper.js +0 -31
  344. package/tests/helpers/oauth.helper.js +0 -43
  345. package/tests/platform/catalog.spec.js +0 -49
  346. package/tests/public/location.spec.js +0 -39
@@ -1,9 +1,10 @@
1
- const Paginator = require("../../common/Paginator");
2
- const { FDKClientValidationError } = require("../../common/FDKError");
3
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
+ const { FDKClientValidationError } = require("../../common/FDKError");
3
+ const Paginator = require("../../common/Paginator");
4
4
  const CompanyProfileValidator = require("./CompanyProfilePlatformValidator");
5
5
  const CompanyProfileModel = require("./CompanyProfilePlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
+ const Joi = require("joi");
7
8
 
8
9
  class CompanyProfile {
9
10
  constructor(config) {
@@ -73,13 +74,79 @@ class CompanyProfile {
73
74
 
74
75
  /**
75
76
  * @param {Object} arg - Arg object.
76
- * @param {UpdateCompany} arg.body
77
+ * @param {CreateUpdateBrandRequestSerializer} arg.body
77
78
  * @returns {Promise<ProfileSuccessResponse>} - Success response
78
- * @summary: Edit company profile
79
- * @description: This API allows to edit the company profile of the seller account.
79
+ * @summary: Create a Brand.
80
+ * @description: This API allows to create a brand associated to a company.
80
81
  */
81
- async updateCompany({ body } = {}) {
82
- const { error } = CompanyProfileValidator.updateCompany().validate(
82
+ async createBrand({ body } = {}) {
83
+ const { error } = CompanyProfileValidator.createBrand().validate(
84
+ {
85
+ body,
86
+ },
87
+ { abortEarly: false, allowUnknown: true }
88
+ );
89
+ if (error) {
90
+ return Promise.reject(new FDKClientValidationError(error));
91
+ }
92
+
93
+ // Showing warrnings if extra unknown parameters are found
94
+ const { error: warrning } = CompanyProfileValidator.createBrand().validate(
95
+ {
96
+ body,
97
+ },
98
+ { abortEarly: false, allowUnknown: false }
99
+ );
100
+ if (warrning) {
101
+ Logger({
102
+ level: "WARN",
103
+ message: "Parameter Validation warrnings for createBrand",
104
+ });
105
+ Logger({ level: "WARN", message: warrning });
106
+ }
107
+
108
+ const query_params = {};
109
+
110
+ const xHeaders = {};
111
+
112
+ const response = await PlatformAPIClient.execute(
113
+ this.config,
114
+ "post",
115
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
116
+ query_params,
117
+ body,
118
+ xHeaders
119
+ );
120
+
121
+ const {
122
+ error: res_error,
123
+ } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
124
+ abortEarly: false,
125
+ allowUnknown: false,
126
+ });
127
+
128
+ if (res_error) {
129
+ Logger({
130
+ level: "WARN",
131
+ message: "Response Validation Warnnings for createBrand",
132
+ });
133
+ Logger({ level: "WARN", message: res_error });
134
+ }
135
+
136
+ return response;
137
+ }
138
+
139
+ /**
140
+ * @param {Object} arg - Arg object.
141
+ * @param {CompanyBrandPostRequestSerializer} arg.body
142
+ * @returns {Promise<ProfileSuccessResponse>} - Success response
143
+ * @summary: Create a company brand mapping.
144
+ * @description: This API allows to create a company brand mapping, for a already existing brand in the system.
145
+ */
146
+ async createCompanyBrandMapping({ body } = {}) {
147
+ const {
148
+ error,
149
+ } = CompanyProfileValidator.createCompanyBrandMapping().validate(
83
150
  {
84
151
  body,
85
152
  },
@@ -92,7 +159,7 @@ class CompanyProfile {
92
159
  // Showing warrnings if extra unknown parameters are found
93
160
  const {
94
161
  error: warrning,
95
- } = CompanyProfileValidator.updateCompany().validate(
162
+ } = CompanyProfileValidator.createCompanyBrandMapping().validate(
96
163
  {
97
164
  body,
98
165
  },
@@ -101,7 +168,7 @@ class CompanyProfile {
101
168
  if (warrning) {
102
169
  Logger({
103
170
  level: "WARN",
104
- message: "Parameter Validation warrnings for updateCompany",
171
+ message: "Parameter Validation warrnings for createCompanyBrandMapping",
105
172
  });
106
173
  Logger({ level: "WARN", message: warrning });
107
174
  }
@@ -112,8 +179,8 @@ class CompanyProfile {
112
179
 
113
180
  const response = await PlatformAPIClient.execute(
114
181
  this.config,
115
- "patch",
116
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
182
+ "post",
183
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
117
184
  query_params,
118
185
  body,
119
186
  xHeaders
@@ -129,7 +196,7 @@ class CompanyProfile {
129
196
  if (res_error) {
130
197
  Logger({
131
198
  level: "WARN",
132
- message: "Response Validation Warnnings for updateCompany",
199
+ message: "Response Validation Warnnings for createCompanyBrandMapping",
133
200
  });
134
201
  Logger({ level: "WARN", message: res_error });
135
202
  }
@@ -139,13 +206,16 @@ class CompanyProfile {
139
206
 
140
207
  /**
141
208
  * @param {Object} arg - Arg object.
142
- * @returns {Promise<MetricsSerializer>} - Success response
143
- * @summary: Get company metrics
144
- * @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
209
+ * @param {LocationSerializer} arg.body
210
+ * @returns {Promise<ProfileSuccessResponse>} - Success response
211
+ * @summary: Create a location associated to a company.
212
+ * @description: This API allows to edit a location associated to a company.
145
213
  */
146
- async getCompanyMetrics({} = {}) {
147
- const { error } = CompanyProfileValidator.getCompanyMetrics().validate(
148
- {},
214
+ async createLocation({ body } = {}) {
215
+ const { error } = CompanyProfileValidator.createLocation().validate(
216
+ {
217
+ body,
218
+ },
149
219
  { abortEarly: false, allowUnknown: true }
150
220
  );
151
221
  if (error) {
@@ -155,14 +225,16 @@ class CompanyProfile {
155
225
  // Showing warrnings if extra unknown parameters are found
156
226
  const {
157
227
  error: warrning,
158
- } = CompanyProfileValidator.getCompanyMetrics().validate(
159
- {},
228
+ } = CompanyProfileValidator.createLocation().validate(
229
+ {
230
+ body,
231
+ },
160
232
  { abortEarly: false, allowUnknown: false }
161
233
  );
162
234
  if (warrning) {
163
235
  Logger({
164
236
  level: "WARN",
165
- message: "Parameter Validation warrnings for getCompanyMetrics",
237
+ message: "Parameter Validation warrnings for createLocation",
166
238
  });
167
239
  Logger({ level: "WARN", message: warrning });
168
240
  }
@@ -173,16 +245,16 @@ class CompanyProfile {
173
245
 
174
246
  const response = await PlatformAPIClient.execute(
175
247
  this.config,
176
- "get",
177
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
248
+ "post",
249
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
178
250
  query_params,
179
- undefined,
251
+ body,
180
252
  xHeaders
181
253
  );
182
254
 
183
255
  const {
184
256
  error: res_error,
185
- } = CompanyProfileModel.MetricsSerializer().validate(response, {
257
+ } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
186
258
  abortEarly: false,
187
259
  allowUnknown: false,
188
260
  });
@@ -190,7 +262,7 @@ class CompanyProfile {
190
262
  if (res_error) {
191
263
  Logger({
192
264
  level: "WARN",
193
- message: "Response Validation Warnnings for getCompanyMetrics",
265
+ message: "Response Validation Warnnings for createLocation",
194
266
  });
195
267
  Logger({ level: "WARN", message: res_error });
196
268
  }
@@ -200,15 +272,15 @@ class CompanyProfile {
200
272
 
201
273
  /**
202
274
  * @param {Object} arg - Arg object.
203
- * @param {string} arg.brandId - Id of the brand to be viewed.
204
- * @returns {Promise<GetBrandResponseSerializer>} - Success response
205
- * @summary: Get a single brand.
206
- * @description: This API helps to get data associated to a particular brand.
275
+ * @param {BulkLocationSerializer} arg.body
276
+ * @returns {Promise<ProfileSuccessResponse>} - Success response
277
+ * @summary: Create a location asscoiated to a company in bulk.
278
+ * @description: This API allows to create a location associated to a company.
207
279
  */
208
- async getBrand({ brandId } = {}) {
209
- const { error } = CompanyProfileValidator.getBrand().validate(
280
+ async createLocationBulk({ body } = {}) {
281
+ const { error } = CompanyProfileValidator.createLocationBulk().validate(
210
282
  {
211
- brandId,
283
+ body,
212
284
  },
213
285
  { abortEarly: false, allowUnknown: true }
214
286
  );
@@ -217,16 +289,18 @@ class CompanyProfile {
217
289
  }
218
290
 
219
291
  // Showing warrnings if extra unknown parameters are found
220
- const { error: warrning } = CompanyProfileValidator.getBrand().validate(
292
+ const {
293
+ error: warrning,
294
+ } = CompanyProfileValidator.createLocationBulk().validate(
221
295
  {
222
- brandId,
296
+ body,
223
297
  },
224
298
  { abortEarly: false, allowUnknown: false }
225
299
  );
226
300
  if (warrning) {
227
301
  Logger({
228
302
  level: "WARN",
229
- message: "Parameter Validation warrnings for getBrand",
303
+ message: "Parameter Validation warrnings for createLocationBulk",
230
304
  });
231
305
  Logger({ level: "WARN", message: warrning });
232
306
  }
@@ -237,16 +311,16 @@ class CompanyProfile {
237
311
 
238
312
  const response = await PlatformAPIClient.execute(
239
313
  this.config,
240
- "get",
241
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
314
+ "post",
315
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
242
316
  query_params,
243
- undefined,
317
+ body,
244
318
  xHeaders
245
319
  );
246
320
 
247
321
  const {
248
322
  error: res_error,
249
- } = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
323
+ } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
250
324
  abortEarly: false,
251
325
  allowUnknown: false,
252
326
  });
@@ -254,7 +328,7 @@ class CompanyProfile {
254
328
  if (res_error) {
255
329
  Logger({
256
330
  level: "WARN",
257
- message: "Response Validation Warnnings for getBrand",
331
+ message: "Response Validation Warnnings for createLocationBulk",
258
332
  });
259
333
  Logger({ level: "WARN", message: res_error });
260
334
  }
@@ -331,15 +405,15 @@ class CompanyProfile {
331
405
 
332
406
  /**
333
407
  * @param {Object} arg - Arg object.
334
- * @param {CreateUpdateBrandRequestSerializer} arg.body
335
- * @returns {Promise<ProfileSuccessResponse>} - Success response
336
- * @summary: Create a Brand.
337
- * @description: This API allows to create a brand associated to a company.
408
+ * @param {string} arg.brandId - Id of the brand to be viewed.
409
+ * @returns {Promise<GetBrandResponseSerializer>} - Success response
410
+ * @summary: Get a single brand.
411
+ * @description: This API helps to get data associated to a particular brand.
338
412
  */
339
- async createBrand({ body } = {}) {
340
- const { error } = CompanyProfileValidator.createBrand().validate(
413
+ async getBrand({ brandId } = {}) {
414
+ const { error } = CompanyProfileValidator.getBrand().validate(
341
415
  {
342
- body,
416
+ brandId,
343
417
  },
344
418
  { abortEarly: false, allowUnknown: true }
345
419
  );
@@ -348,16 +422,16 @@ class CompanyProfile {
348
422
  }
349
423
 
350
424
  // Showing warrnings if extra unknown parameters are found
351
- const { error: warrning } = CompanyProfileValidator.createBrand().validate(
425
+ const { error: warrning } = CompanyProfileValidator.getBrand().validate(
352
426
  {
353
- body,
427
+ brandId,
354
428
  },
355
429
  { abortEarly: false, allowUnknown: false }
356
430
  );
357
431
  if (warrning) {
358
432
  Logger({
359
433
  level: "WARN",
360
- message: "Parameter Validation warrnings for createBrand",
434
+ message: "Parameter Validation warrnings for getBrand",
361
435
  });
362
436
  Logger({ level: "WARN", message: warrning });
363
437
  }
@@ -368,16 +442,16 @@ class CompanyProfile {
368
442
 
369
443
  const response = await PlatformAPIClient.execute(
370
444
  this.config,
371
- "post",
372
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/`,
445
+ "get",
446
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/brand/${brandId}`,
373
447
  query_params,
374
- body,
448
+ undefined,
375
449
  xHeaders
376
450
  );
377
451
 
378
452
  const {
379
453
  error: res_error,
380
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
454
+ } = CompanyProfileModel.GetBrandResponseSerializer().validate(response, {
381
455
  abortEarly: false,
382
456
  allowUnknown: false,
383
457
  });
@@ -385,7 +459,7 @@ class CompanyProfile {
385
459
  if (res_error) {
386
460
  Logger({
387
461
  level: "WARN",
388
- message: "Response Validation Warnnings for createBrand",
462
+ message: "Response Validation Warnnings for getBrand",
389
463
  });
390
464
  Logger({ level: "WARN", message: res_error });
391
465
  }
@@ -493,23 +567,82 @@ class CompanyProfile {
493
567
  });
494
568
  return data;
495
569
  };
496
- paginator.setCallback(callback);
570
+ paginator.setCallback(callback.bind(this));
497
571
  return paginator;
498
572
  }
499
573
 
500
574
  /**
501
575
  * @param {Object} arg - Arg object.
502
- * @param {CompanyBrandPostRequestSerializer} arg.body
503
- * @returns {Promise<ProfileSuccessResponse>} - Success response
504
- * @summary: Create a company brand mapping.
505
- * @description: This API allows to create a company brand mapping, for a already existing brand in the system.
576
+ * @returns {Promise<MetricsSerializer>} - Success response
577
+ * @summary: Get company metrics
578
+ * @description: This API allows to view the company metrics, i.e. the status of its brand and stores. Also its allows to view the number of products, company documents & store documents which are verified and unverified.
506
579
  */
507
- async createCompanyBrandMapping({ body } = {}) {
580
+ async getCompanyMetrics({} = {}) {
581
+ const { error } = CompanyProfileValidator.getCompanyMetrics().validate(
582
+ {},
583
+ { abortEarly: false, allowUnknown: true }
584
+ );
585
+ if (error) {
586
+ return Promise.reject(new FDKClientValidationError(error));
587
+ }
588
+
589
+ // Showing warrnings if extra unknown parameters are found
508
590
  const {
509
- error,
510
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
591
+ error: warrning,
592
+ } = CompanyProfileValidator.getCompanyMetrics().validate(
593
+ {},
594
+ { abortEarly: false, allowUnknown: false }
595
+ );
596
+ if (warrning) {
597
+ Logger({
598
+ level: "WARN",
599
+ message: "Parameter Validation warrnings for getCompanyMetrics",
600
+ });
601
+ Logger({ level: "WARN", message: warrning });
602
+ }
603
+
604
+ const query_params = {};
605
+
606
+ const xHeaders = {};
607
+
608
+ const response = await PlatformAPIClient.execute(
609
+ this.config,
610
+ "get",
611
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/metrics`,
612
+ query_params,
613
+ undefined,
614
+ xHeaders
615
+ );
616
+
617
+ const {
618
+ error: res_error,
619
+ } = CompanyProfileModel.MetricsSerializer().validate(response, {
620
+ abortEarly: false,
621
+ allowUnknown: false,
622
+ });
623
+
624
+ if (res_error) {
625
+ Logger({
626
+ level: "WARN",
627
+ message: "Response Validation Warnnings for getCompanyMetrics",
628
+ });
629
+ Logger({ level: "WARN", message: res_error });
630
+ }
631
+
632
+ return response;
633
+ }
634
+
635
+ /**
636
+ * @param {Object} arg - Arg object.
637
+ * @param {string} arg.locationId - Id of the location which you want to view.
638
+ * @returns {Promise<GetLocationSerializer>} - Success response
639
+ * @summary: Get details of a specific location.
640
+ * @description: This API helps to get data associated to a specific location.
641
+ */
642
+ async getLocationDetail({ locationId } = {}) {
643
+ const { error } = CompanyProfileValidator.getLocationDetail().validate(
511
644
  {
512
- body,
645
+ locationId,
513
646
  },
514
647
  { abortEarly: false, allowUnknown: true }
515
648
  );
@@ -520,16 +653,16 @@ class CompanyProfile {
520
653
  // Showing warrnings if extra unknown parameters are found
521
654
  const {
522
655
  error: warrning,
523
- } = CompanyProfileValidator.createCompanyBrandMapping().validate(
656
+ } = CompanyProfileValidator.getLocationDetail().validate(
524
657
  {
525
- body,
658
+ locationId,
526
659
  },
527
660
  { abortEarly: false, allowUnknown: false }
528
661
  );
529
662
  if (warrning) {
530
663
  Logger({
531
664
  level: "WARN",
532
- message: "Parameter Validation warrnings for createCompanyBrandMapping",
665
+ message: "Parameter Validation warrnings for getLocationDetail",
533
666
  });
534
667
  Logger({ level: "WARN", message: warrning });
535
668
  }
@@ -540,16 +673,16 @@ class CompanyProfile {
540
673
 
541
674
  const response = await PlatformAPIClient.execute(
542
675
  this.config,
543
- "post",
544
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/company-brand`,
676
+ "get",
677
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
545
678
  query_params,
546
- body,
679
+ undefined,
547
680
  xHeaders
548
681
  );
549
682
 
550
683
  const {
551
684
  error: res_error,
552
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
685
+ } = CompanyProfileModel.GetLocationSerializer().validate(response, {
553
686
  abortEarly: false,
554
687
  allowUnknown: false,
555
688
  });
@@ -557,7 +690,7 @@ class CompanyProfile {
557
690
  if (res_error) {
558
691
  Logger({
559
692
  level: "WARN",
560
- message: "Response Validation Warnnings for createCompanyBrandMapping",
693
+ message: "Response Validation Warnnings for getLocationDetail",
561
694
  });
562
695
  Logger({ level: "WARN", message: res_error });
563
696
  }
@@ -694,19 +827,19 @@ class CompanyProfile {
694
827
  });
695
828
  return data;
696
829
  };
697
- paginator.setCallback(callback);
830
+ paginator.setCallback(callback.bind(this));
698
831
  return paginator;
699
832
  }
700
833
 
701
834
  /**
702
835
  * @param {Object} arg - Arg object.
703
- * @param {LocationSerializer} arg.body
836
+ * @param {UpdateCompany} arg.body
704
837
  * @returns {Promise<ProfileSuccessResponse>} - Success response
705
- * @summary: Create a location associated to a company.
706
- * @description: This API allows to edit a location associated to a company.
838
+ * @summary: Edit company profile
839
+ * @description: This API allows to edit the company profile of the seller account.
707
840
  */
708
- async createLocation({ body } = {}) {
709
- const { error } = CompanyProfileValidator.createLocation().validate(
841
+ async updateCompany({ body } = {}) {
842
+ const { error } = CompanyProfileValidator.updateCompany().validate(
710
843
  {
711
844
  body,
712
845
  },
@@ -719,7 +852,7 @@ class CompanyProfile {
719
852
  // Showing warrnings if extra unknown parameters are found
720
853
  const {
721
854
  error: warrning,
722
- } = CompanyProfileValidator.createLocation().validate(
855
+ } = CompanyProfileValidator.updateCompany().validate(
723
856
  {
724
857
  body,
725
858
  },
@@ -728,7 +861,7 @@ class CompanyProfile {
728
861
  if (warrning) {
729
862
  Logger({
730
863
  level: "WARN",
731
- message: "Parameter Validation warrnings for createLocation",
864
+ message: "Parameter Validation warrnings for updateCompany",
732
865
  });
733
866
  Logger({ level: "WARN", message: warrning });
734
867
  }
@@ -739,8 +872,8 @@ class CompanyProfile {
739
872
 
740
873
  const response = await PlatformAPIClient.execute(
741
874
  this.config,
742
- "post",
743
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location`,
875
+ "patch",
876
+ `/service/platform/company-profile/v1.0/company/${this.config.companyId}`,
744
877
  query_params,
745
878
  body,
746
879
  xHeaders
@@ -756,73 +889,7 @@ class CompanyProfile {
756
889
  if (res_error) {
757
890
  Logger({
758
891
  level: "WARN",
759
- message: "Response Validation Warnnings for createLocation",
760
- });
761
- Logger({ level: "WARN", message: res_error });
762
- }
763
-
764
- return response;
765
- }
766
-
767
- /**
768
- * @param {Object} arg - Arg object.
769
- * @param {string} arg.locationId - Id of the location which you want to view.
770
- * @returns {Promise<GetLocationSerializer>} - Success response
771
- * @summary: Get details of a specific location.
772
- * @description: This API helps to get data associated to a specific location.
773
- */
774
- async getLocationDetail({ locationId } = {}) {
775
- const { error } = CompanyProfileValidator.getLocationDetail().validate(
776
- {
777
- locationId,
778
- },
779
- { abortEarly: false, allowUnknown: true }
780
- );
781
- if (error) {
782
- return Promise.reject(new FDKClientValidationError(error));
783
- }
784
-
785
- // Showing warrnings if extra unknown parameters are found
786
- const {
787
- error: warrning,
788
- } = CompanyProfileValidator.getLocationDetail().validate(
789
- {
790
- locationId,
791
- },
792
- { abortEarly: false, allowUnknown: false }
793
- );
794
- if (warrning) {
795
- Logger({
796
- level: "WARN",
797
- message: "Parameter Validation warrnings for getLocationDetail",
798
- });
799
- Logger({ level: "WARN", message: warrning });
800
- }
801
-
802
- const query_params = {};
803
-
804
- const xHeaders = {};
805
-
806
- const response = await PlatformAPIClient.execute(
807
- this.config,
808
- "get",
809
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/${locationId}`,
810
- query_params,
811
- undefined,
812
- xHeaders
813
- );
814
-
815
- const {
816
- error: res_error,
817
- } = CompanyProfileModel.GetLocationSerializer().validate(response, {
818
- abortEarly: false,
819
- allowUnknown: false,
820
- });
821
-
822
- if (res_error) {
823
- Logger({
824
- level: "WARN",
825
- message: "Response Validation Warnnings for getLocationDetail",
892
+ message: "Response Validation Warnnings for updateCompany",
826
893
  });
827
894
  Logger({ level: "WARN", message: res_error });
828
895
  }
@@ -898,72 +965,6 @@ class CompanyProfile {
898
965
 
899
966
  return response;
900
967
  }
901
-
902
- /**
903
- * @param {Object} arg - Arg object.
904
- * @param {BulkLocationSerializer} arg.body
905
- * @returns {Promise<ProfileSuccessResponse>} - Success response
906
- * @summary: Create a location asscoiated to a company in bulk.
907
- * @description: This API allows to create a location associated to a company.
908
- */
909
- async createLocationBulk({ body } = {}) {
910
- const { error } = CompanyProfileValidator.createLocationBulk().validate(
911
- {
912
- body,
913
- },
914
- { abortEarly: false, allowUnknown: true }
915
- );
916
- if (error) {
917
- return Promise.reject(new FDKClientValidationError(error));
918
- }
919
-
920
- // Showing warrnings if extra unknown parameters are found
921
- const {
922
- error: warrning,
923
- } = CompanyProfileValidator.createLocationBulk().validate(
924
- {
925
- body,
926
- },
927
- { abortEarly: false, allowUnknown: false }
928
- );
929
- if (warrning) {
930
- Logger({
931
- level: "WARN",
932
- message: "Parameter Validation warrnings for createLocationBulk",
933
- });
934
- Logger({ level: "WARN", message: warrning });
935
- }
936
-
937
- const query_params = {};
938
-
939
- const xHeaders = {};
940
-
941
- const response = await PlatformAPIClient.execute(
942
- this.config,
943
- "post",
944
- `/service/platform/company-profile/v1.0/company/${this.config.companyId}/location/bulk`,
945
- query_params,
946
- body,
947
- xHeaders
948
- );
949
-
950
- const {
951
- error: res_error,
952
- } = CompanyProfileModel.ProfileSuccessResponse().validate(response, {
953
- abortEarly: false,
954
- allowUnknown: false,
955
- });
956
-
957
- if (res_error) {
958
- Logger({
959
- level: "WARN",
960
- message: "Response Validation Warnnings for createLocationBulk",
961
- });
962
- Logger({ level: "WARN", message: res_error });
963
- }
964
-
965
- return response;
966
- }
967
968
  }
968
969
 
969
970
  module.exports = CompanyProfile;