@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1

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 (298) 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 +113 -93
  6. package/sdk/application/Cart/CartApplicationClient.js +270 -139
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +3 -3
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
  16. package/sdk/application/Content/ContentApplicationClient.js +197 -36
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
  20. package/sdk/application/Lead/LeadApplicationClient.js +3 -3
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
  24. package/sdk/application/Order/OrderApplicationClient.js +140 -21
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
  26. package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +14 -14
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
  32. package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
  33. package/sdk/application/User/UserApplicationClient.d.ts +13 -23
  34. package/sdk/application/User/UserApplicationClient.js +9 -57
  35. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  36. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  37. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
  38. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
  39. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
  40. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
  41. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
  42. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
  43. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
  44. package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
  45. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
  46. package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
  47. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
  48. package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  56. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
  58. package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
  59. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
  61. package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
  63. package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
  65. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
  66. package/sdk/partner/PartnerClient.d.ts +6 -0
  67. package/sdk/partner/PartnerClient.js +9 -0
  68. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
  69. package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
  70. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
  71. package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
  72. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
  73. package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
  74. package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
  75. package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
  76. package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
  77. package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
  78. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
  79. package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
  80. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  81. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  82. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
  83. package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
  84. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  85. package/sdk/partner/index.d.ts +3 -0
  86. package/sdk/partner/index.js +6 -0
  87. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
  88. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  89. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  90. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
  91. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  92. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  93. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
  94. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
  95. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  96. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  97. package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
  98. package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
  99. package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
  100. package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
  101. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
  102. package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
  103. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
  104. package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
  105. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  106. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
  107. package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
  108. package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
  109. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
  110. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
  111. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
  112. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
  113. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
  114. package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
  115. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
  116. package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
  117. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
  118. package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
  119. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
  120. package/sdk/platform/Common/CommonPlatformClient.js +5 -6
  121. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  122. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  123. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
  124. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
  125. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
  126. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
  127. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
  128. package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
  129. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
  130. package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
  131. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
  132. package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
  133. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
  134. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
  135. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
  136. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
  137. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
  138. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  139. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
  140. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
  141. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
  142. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
  143. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
  144. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
  145. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
  146. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
  147. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
  148. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
  149. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
  150. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
  151. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
  152. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
  153. package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
  154. package/sdk/platform/Content/ContentPlatformClient.js +459 -379
  155. package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
  156. package/sdk/platform/Content/ContentPlatformModel.js +893 -582
  157. package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
  158. package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
  159. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
  160. package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
  161. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
  162. package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
  163. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  164. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  165. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
  166. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
  167. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
  168. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
  169. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  170. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  171. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
  172. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
  173. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  174. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  175. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  176. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  177. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
  178. package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
  179. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  180. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  181. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  182. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  183. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  184. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  185. package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
  186. package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
  187. package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
  188. package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
  189. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
  190. package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
  191. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
  192. package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
  193. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
  194. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
  195. package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
  196. package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
  197. package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
  198. package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
  199. package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
  200. package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
  201. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  202. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  203. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  204. package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
  205. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
  206. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
  207. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
  208. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
  209. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
  210. package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
  211. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
  212. package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
  213. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
  214. package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
  215. package/sdk/platform/PlatformClient.d.ts +2 -0
  216. package/sdk/platform/PlatformClient.js +4 -0
  217. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  218. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  219. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  220. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  221. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
  222. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
  223. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
  224. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
  225. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
  226. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
  227. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
  228. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
  229. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
  230. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
  231. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
  232. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
  233. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
  234. package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
  235. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
  236. package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
  237. package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
  238. package/sdk/platform/Share/SharePlatformModel.js +3 -43
  239. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
  240. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
  241. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
  242. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
  243. package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
  244. package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
  246. package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
  247. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
  248. package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
  249. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
  250. package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
  251. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
  252. package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
  253. package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
  254. package/sdk/platform/User/UserPlatformModel.js +209 -216
  255. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  256. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  257. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
  258. package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
  259. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  260. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  261. package/sdk/platform/index.d.ts +1 -0
  262. package/sdk/platform/index.js +2 -0
  263. package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
  264. package/sdk/public/Billing/BillingPublicClient.js +397 -0
  265. package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
  266. package/sdk/public/Billing/BillingPublicModel.js +560 -0
  267. package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
  268. package/sdk/public/Billing/BillingPublicValidator.js +50 -0
  269. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
  270. package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
  271. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
  272. package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
  273. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
  274. package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
  275. package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
  276. package/sdk/public/Content/ContentPublicClient.js +183 -0
  277. package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
  278. package/sdk/public/Content/ContentPublicModel.js +47 -1
  279. package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
  280. package/sdk/public/Content/ContentPublicValidator.js +19 -0
  281. package/sdk/public/PublicClient.d.ts +2 -2
  282. package/sdk/public/PublicClient.js +2 -2
  283. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  284. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  285. package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
  286. package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
  287. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  288. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  289. package/sdk/public/index.d.ts +1 -1
  290. package/sdk/public/index.js +1 -1
  291. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  292. package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
  293. package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
  294. package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
  295. package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
  296. package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
  297. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
  298. package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
@@ -14,6 +14,95 @@ class Content {
14
14
  this.config = config;
15
15
  }
16
16
 
17
+ /**
18
+ * @param {ContentPlatformValidator.CreateCustomFieldByResourceIdParam} arg
19
+ * - Arg object
20
+ *
21
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
22
+ * @param {import("../PlatformAPIClient").Options} - Options
23
+ * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
24
+ * - Success response
25
+ *
26
+ * @name createCustomFieldByResourceId
27
+ * @summary: Create custom field entries for gives resource and resource_id
28
+ * @description: Use this API to create the custom field entry for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldByResourceId/).
29
+ */
30
+ async createCustomFieldByResourceId(
31
+ { resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
32
+ { responseHeaders } = { responseHeaders: false }
33
+ ) {
34
+ const {
35
+ error,
36
+ } = ContentPlatformValidator.createCustomFieldByResourceId().validate(
37
+ {
38
+ resource,
39
+ resourceId,
40
+ body,
41
+ },
42
+ { abortEarly: false, allowUnknown: true }
43
+ );
44
+ if (error) {
45
+ return Promise.reject(new FDKClientValidationError(error));
46
+ }
47
+
48
+ // Showing warrnings if extra unknown parameters are found
49
+ const {
50
+ error: warrning,
51
+ } = ContentPlatformValidator.createCustomFieldByResourceId().validate(
52
+ {
53
+ resource,
54
+ resourceId,
55
+ body,
56
+ },
57
+ { abortEarly: false, allowUnknown: false }
58
+ );
59
+ if (warrning) {
60
+ Logger({
61
+ level: "WARN",
62
+ message: `Parameter Validation warrnings for platform > Content > createCustomFieldByResourceId \n ${warrning}`,
63
+ });
64
+ }
65
+
66
+ const query_params = {};
67
+
68
+ const xHeaders = {};
69
+
70
+ const response = await PlatformAPIClient.execute(
71
+ this.config,
72
+ "post",
73
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
74
+ query_params,
75
+ body,
76
+ { ...xHeaders, ...requestHeaders },
77
+ { responseHeaders }
78
+ );
79
+
80
+ let responseData = response;
81
+ if (responseHeaders) {
82
+ responseData = response[0];
83
+ }
84
+
85
+ const {
86
+ error: res_error,
87
+ } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
88
+ responseData,
89
+ { abortEarly: false, allowUnknown: true }
90
+ );
91
+
92
+ if (res_error) {
93
+ if (this.config.options.strictResponseCheck === true) {
94
+ return Promise.reject(new FDKResponseValidationError(res_error));
95
+ } else {
96
+ Logger({
97
+ level: "WARN",
98
+ message: `Response Validation Warnings for platform > Content > createCustomFieldByResourceId \n ${res_error}`,
99
+ });
100
+ }
101
+ }
102
+
103
+ return response;
104
+ }
105
+
17
106
  /**
18
107
  * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object
19
108
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -22,18 +111,17 @@ class Content {
22
111
  * - Success response
23
112
  *
24
113
  * @name createCustomFieldDefinition
25
- * @summary: Create custom field definition for a given resource type
114
+ * @summary: Create custom field definition
26
115
  * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/).
27
116
  */
28
117
  async createCustomFieldDefinition(
29
- { resource, body, requestHeaders } = { requestHeaders: {} },
118
+ { body, requestHeaders } = { requestHeaders: {} },
30
119
  { responseHeaders } = { responseHeaders: false }
31
120
  ) {
32
121
  const {
33
122
  error,
34
123
  } = ContentPlatformValidator.createCustomFieldDefinition().validate(
35
124
  {
36
- resource,
37
125
  body,
38
126
  },
39
127
  { abortEarly: false, allowUnknown: true }
@@ -47,7 +135,6 @@ class Content {
47
135
  error: warrning,
48
136
  } = ContentPlatformValidator.createCustomFieldDefinition().validate(
49
137
  {
50
- resource,
51
138
  body,
52
139
  },
53
140
  { abortEarly: false, allowUnknown: false }
@@ -66,7 +153,7 @@ class Content {
66
153
  const response = await PlatformAPIClient.execute(
67
154
  this.config,
68
155
  "post",
69
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`,
156
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`,
70
157
  query_params,
71
158
  body,
72
159
  { ...xHeaders, ...requestHeaders },
@@ -100,23 +187,20 @@ class Content {
100
187
  }
101
188
 
102
189
  /**
103
- * @param {ContentPlatformValidator.CreateCustomObjectBySlugParam} arg - Arg object
190
+ * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object
104
191
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
105
192
  * @param {import("../PlatformAPIClient").Options} - Options
106
193
  * @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
107
- * @name createCustomObjectBySlug
194
+ * @name createCustomObject
108
195
  * @summary: Create custom object entries
109
- * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectBySlug/).
196
+ * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObject/).
110
197
  */
111
- async createCustomObjectBySlug(
112
- { definitionSlug, body, requestHeaders } = { requestHeaders: {} },
198
+ async createCustomObject(
199
+ { body, requestHeaders } = { requestHeaders: {} },
113
200
  { responseHeaders } = { responseHeaders: false }
114
201
  ) {
115
- const {
116
- error,
117
- } = ContentPlatformValidator.createCustomObjectBySlug().validate(
202
+ const { error } = ContentPlatformValidator.createCustomObject().validate(
118
203
  {
119
- definitionSlug,
120
204
  body,
121
205
  },
122
206
  { abortEarly: false, allowUnknown: true }
@@ -128,9 +212,8 @@ class Content {
128
212
  // Showing warrnings if extra unknown parameters are found
129
213
  const {
130
214
  error: warrning,
131
- } = ContentPlatformValidator.createCustomObjectBySlug().validate(
215
+ } = ContentPlatformValidator.createCustomObject().validate(
132
216
  {
133
- definitionSlug,
134
217
  body,
135
218
  },
136
219
  { abortEarly: false, allowUnknown: false }
@@ -138,7 +221,7 @@ class Content {
138
221
  if (warrning) {
139
222
  Logger({
140
223
  level: "WARN",
141
- message: `Parameter Validation warrnings for platform > Content > createCustomObjectBySlug \n ${warrning}`,
224
+ message: `Parameter Validation warrnings for platform > Content > createCustomObject \n ${warrning}`,
142
225
  });
143
226
  }
144
227
 
@@ -149,7 +232,7 @@ class Content {
149
232
  const response = await PlatformAPIClient.execute(
150
233
  this.config,
151
234
  "post",
152
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`,
235
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`,
153
236
  query_params,
154
237
  body,
155
238
  { ...xHeaders, ...requestHeaders },
@@ -174,7 +257,7 @@ class Content {
174
257
  } else {
175
258
  Logger({
176
259
  level: "WARN",
177
- message: `Response Validation Warnings for platform > Content > createCustomObjectBySlug \n ${res_error}`,
260
+ message: `Response Validation Warnings for platform > Content > createCustomObject \n ${res_error}`,
178
261
  });
179
262
  }
180
263
  }
@@ -188,9 +271,8 @@ class Content {
188
271
  *
189
272
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
190
273
  * @param {import("../PlatformAPIClient").Options} - Options
191
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
192
- * - Success response
193
- *
274
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
275
+ * Success response
194
276
  * @name createCustomObjectDefinition
195
277
  * @summary: Create custom object definition
196
278
  * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/).
@@ -234,7 +316,7 @@ class Content {
234
316
  const response = await PlatformAPIClient.execute(
235
317
  this.config,
236
318
  "post",
237
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`,
319
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`,
238
320
  query_params,
239
321
  body,
240
322
  { ...xHeaders, ...requestHeaders },
@@ -248,7 +330,7 @@ class Content {
248
330
 
249
331
  const {
250
332
  error: res_error,
251
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
333
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
252
334
  responseData,
253
335
  { abortEarly: false, allowUnknown: true }
254
336
  );
@@ -268,27 +350,23 @@ class Content {
268
350
  }
269
351
 
270
352
  /**
271
- * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam} arg
272
- * - Arg object
273
- *
353
+ * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object
274
354
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
275
355
  * @param {import("../PlatformAPIClient").Options} - Options
276
356
  * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
277
- * @name deleteCustomFieldDefinitionBySlug
357
+ * @name deleteCustomFieldDefinition
278
358
  * @summary: Delete custom fields definition
279
- * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinitionBySlug/).
359
+ * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinition/).
280
360
  */
281
- async deleteCustomFieldDefinitionBySlug(
282
- { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
361
+ async deleteCustomFieldDefinition(
362
+ { id, requestHeaders } = { requestHeaders: {} },
283
363
  { responseHeaders } = { responseHeaders: false }
284
364
  ) {
285
365
  const {
286
366
  error,
287
- } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate(
367
+ } = ContentPlatformValidator.deleteCustomFieldDefinition().validate(
288
368
  {
289
- slug,
290
- resource,
291
- namespace,
369
+ id,
292
370
  },
293
371
  { abortEarly: false, allowUnknown: true }
294
372
  );
@@ -299,18 +377,16 @@ class Content {
299
377
  // Showing warrnings if extra unknown parameters are found
300
378
  const {
301
379
  error: warrning,
302
- } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate(
380
+ } = ContentPlatformValidator.deleteCustomFieldDefinition().validate(
303
381
  {
304
- slug,
305
- resource,
306
- namespace,
382
+ id,
307
383
  },
308
384
  { abortEarly: false, allowUnknown: false }
309
385
  );
310
386
  if (warrning) {
311
387
  Logger({
312
388
  level: "WARN",
313
- message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${warrning}`,
389
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinition \n ${warrning}`,
314
390
  });
315
391
  }
316
392
 
@@ -321,7 +397,7 @@ class Content {
321
397
  const response = await PlatformAPIClient.execute(
322
398
  this.config,
323
399
  "delete",
324
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
400
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${id}`,
325
401
  query_params,
326
402
  undefined,
327
403
  { ...xHeaders, ...requestHeaders },
@@ -346,7 +422,7 @@ class Content {
346
422
  } else {
347
423
  Logger({
348
424
  level: "WARN",
349
- message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${res_error}`,
425
+ message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinition \n ${res_error}`,
350
426
  });
351
427
  }
352
428
  }
@@ -355,27 +431,27 @@ class Content {
355
431
  }
356
432
 
357
433
  /**
358
- * @param {ContentPlatformValidator.DeleteCustomFieldsByResourceSlugParam} arg
434
+ * @param {ContentPlatformValidator.DeleteCustomFieldsByResourceIdParam} arg
359
435
  * - Arg object
360
436
  *
361
437
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
362
438
  * @param {import("../PlatformAPIClient").Options} - Options
363
439
  * @returns {Promise<ContentPlatformModel.CustomFieldsDeleteSchema>} -
364
440
  * Success response
365
- * @name deleteCustomFieldsByResourceSlug
366
- * @summary: delete custom fields of given resource and resource slug
367
- * @description: Use this API to delete the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldsByResourceSlug/).
441
+ * @name deleteCustomFieldsByResourceId
442
+ * @summary: Delete custom fields of given resource and resource id
443
+ * @description: Use this API to delete the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldsByResourceId/).
368
444
  */
369
- async deleteCustomFieldsByResourceSlug(
370
- { resource, resourceSlug, ids, requestHeaders } = { requestHeaders: {} },
445
+ async deleteCustomFieldsByResourceId(
446
+ { resource, resourceId, ids, requestHeaders } = { requestHeaders: {} },
371
447
  { responseHeaders } = { responseHeaders: false }
372
448
  ) {
373
449
  const {
374
450
  error,
375
- } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate(
451
+ } = ContentPlatformValidator.deleteCustomFieldsByResourceId().validate(
376
452
  {
377
453
  resource,
378
- resourceSlug,
454
+ resourceId,
379
455
  ids,
380
456
  },
381
457
  { abortEarly: false, allowUnknown: true }
@@ -387,10 +463,10 @@ class Content {
387
463
  // Showing warrnings if extra unknown parameters are found
388
464
  const {
389
465
  error: warrning,
390
- } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate(
466
+ } = ContentPlatformValidator.deleteCustomFieldsByResourceId().validate(
391
467
  {
392
468
  resource,
393
- resourceSlug,
469
+ resourceId,
394
470
  ids,
395
471
  },
396
472
  { abortEarly: false, allowUnknown: false }
@@ -398,7 +474,7 @@ class Content {
398
474
  if (warrning) {
399
475
  Logger({
400
476
  level: "WARN",
401
- message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${warrning}`,
477
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldsByResourceId \n ${warrning}`,
402
478
  });
403
479
  }
404
480
 
@@ -410,7 +486,7 @@ class Content {
410
486
  const response = await PlatformAPIClient.execute(
411
487
  this.config,
412
488
  "delete",
413
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
489
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
414
490
  query_params,
415
491
  undefined,
416
492
  { ...xHeaders, ...requestHeaders },
@@ -435,7 +511,7 @@ class Content {
435
511
  } else {
436
512
  Logger({
437
513
  level: "WARN",
438
- message: `Response Validation Warnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${res_error}`,
514
+ message: `Response Validation Warnings for platform > Content > deleteCustomFieldsByResourceId \n ${res_error}`,
439
515
  });
440
516
  }
441
517
  }
@@ -444,24 +520,21 @@ class Content {
444
520
  }
445
521
 
446
522
  /**
447
- * @param {ContentPlatformValidator.DeleteCustomObjectBySlugParam} arg - Arg object
523
+ * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object
448
524
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
449
525
  * @param {import("../PlatformAPIClient").Options} - Options
450
526
  * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
451
- * @name deleteCustomObjectBySlug
527
+ * @name deleteCustomObject
452
528
  * @summary: Delete custom object
453
- * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectBySlug/).
529
+ * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObject/).
454
530
  */
455
- async deleteCustomObjectBySlug(
456
- { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
531
+ async deleteCustomObject(
532
+ { id, requestHeaders } = { requestHeaders: {} },
457
533
  { responseHeaders } = { responseHeaders: false }
458
534
  ) {
459
- const {
460
- error,
461
- } = ContentPlatformValidator.deleteCustomObjectBySlug().validate(
535
+ const { error } = ContentPlatformValidator.deleteCustomObject().validate(
462
536
  {
463
- definitionSlug,
464
- slug,
537
+ id,
465
538
  },
466
539
  { abortEarly: false, allowUnknown: true }
467
540
  );
@@ -472,17 +545,16 @@ class Content {
472
545
  // Showing warrnings if extra unknown parameters are found
473
546
  const {
474
547
  error: warrning,
475
- } = ContentPlatformValidator.deleteCustomObjectBySlug().validate(
548
+ } = ContentPlatformValidator.deleteCustomObject().validate(
476
549
  {
477
- definitionSlug,
478
- slug,
550
+ id,
479
551
  },
480
552
  { abortEarly: false, allowUnknown: false }
481
553
  );
482
554
  if (warrning) {
483
555
  Logger({
484
556
  level: "WARN",
485
- message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectBySlug \n ${warrning}`,
557
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomObject \n ${warrning}`,
486
558
  });
487
559
  }
488
560
 
@@ -493,7 +565,7 @@ class Content {
493
565
  const response = await PlatformAPIClient.execute(
494
566
  this.config,
495
567
  "delete",
496
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
568
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${id}`,
497
569
  query_params,
498
570
  undefined,
499
571
  { ...xHeaders, ...requestHeaders },
@@ -518,7 +590,7 @@ class Content {
518
590
  } else {
519
591
  Logger({
520
592
  level: "WARN",
521
- message: `Response Validation Warnings for platform > Content > deleteCustomObjectBySlug \n ${res_error}`,
593
+ message: `Response Validation Warnings for platform > Content > deleteCustomObject \n ${res_error}`,
522
594
  });
523
595
  }
524
596
  }
@@ -527,7 +599,7 @@ class Content {
527
599
  }
528
600
 
529
601
  /**
530
- * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionBySlugParam} arg
602
+ * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg
531
603
  * - Arg object
532
604
  *
533
605
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -535,19 +607,19 @@ class Content {
535
607
  * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema>}
536
608
  * - Success response
537
609
  *
538
- * @name deleteCustomObjectDefinitionBySlug
539
- * @summary: Delete custom object definition
540
- * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinitionBySlug/).
610
+ * @name deleteCustomObjectDefinition
611
+ * @summary: delete custom object definition
612
+ * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinition/).
541
613
  */
542
- async deleteCustomObjectDefinitionBySlug(
543
- { slug, requestHeaders } = { requestHeaders: {} },
614
+ async deleteCustomObjectDefinition(
615
+ { id, requestHeaders } = { requestHeaders: {} },
544
616
  { responseHeaders } = { responseHeaders: false }
545
617
  ) {
546
618
  const {
547
619
  error,
548
- } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate(
620
+ } = ContentPlatformValidator.deleteCustomObjectDefinition().validate(
549
621
  {
550
- slug,
622
+ id,
551
623
  },
552
624
  { abortEarly: false, allowUnknown: true }
553
625
  );
@@ -558,16 +630,16 @@ class Content {
558
630
  // Showing warrnings if extra unknown parameters are found
559
631
  const {
560
632
  error: warrning,
561
- } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate(
633
+ } = ContentPlatformValidator.deleteCustomObjectDefinition().validate(
562
634
  {
563
- slug,
635
+ id,
564
636
  },
565
637
  { abortEarly: false, allowUnknown: false }
566
638
  );
567
639
  if (warrning) {
568
640
  Logger({
569
641
  level: "WARN",
570
- message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${warrning}`,
642
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinition \n ${warrning}`,
571
643
  });
572
644
  }
573
645
 
@@ -578,7 +650,7 @@ class Content {
578
650
  const response = await PlatformAPIClient.execute(
579
651
  this.config,
580
652
  "delete",
581
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
653
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${id}`,
582
654
  query_params,
583
655
  undefined,
584
656
  { ...xHeaders, ...requestHeaders },
@@ -603,7 +675,7 @@ class Content {
603
675
  } else {
604
676
  Logger({
605
677
  level: "WARN",
606
- message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${res_error}`,
678
+ message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinition \n ${res_error}`,
607
679
  });
608
680
  }
609
681
  }
@@ -612,27 +684,25 @@ class Content {
612
684
  }
613
685
 
614
686
  /**
615
- * @param {ContentPlatformValidator.ExportCustomObjectEntriesBySlugParam} arg
616
- * - Arg object
617
- *
687
+ * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object
618
688
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
619
689
  * @param {import("../PlatformAPIClient").Options} - Options
620
690
  * @returns {Promise<ContentPlatformModel.CustomObjectBulkEntryInitiateDownload>}
621
691
  * - Success response
622
692
  *
623
- * @name exportCustomObjectEntriesBySlug
693
+ * @name exportCustomObjectEntries
624
694
  * @summary: Initiate download for bulk custom object entries
625
- * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntriesBySlug/).
695
+ * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntries/).
626
696
  */
627
- async exportCustomObjectEntriesBySlug(
628
- { slug, requestHeaders } = { requestHeaders: {} },
697
+ async exportCustomObjectEntries(
698
+ { definitionId, requestHeaders } = { requestHeaders: {} },
629
699
  { responseHeaders } = { responseHeaders: false }
630
700
  ) {
631
701
  const {
632
702
  error,
633
- } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate(
703
+ } = ContentPlatformValidator.exportCustomObjectEntries().validate(
634
704
  {
635
- slug,
705
+ definitionId,
636
706
  },
637
707
  { abortEarly: false, allowUnknown: true }
638
708
  );
@@ -643,16 +713,16 @@ class Content {
643
713
  // Showing warrnings if extra unknown parameters are found
644
714
  const {
645
715
  error: warrning,
646
- } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate(
716
+ } = ContentPlatformValidator.exportCustomObjectEntries().validate(
647
717
  {
648
- slug,
718
+ definitionId,
649
719
  },
650
720
  { abortEarly: false, allowUnknown: false }
651
721
  );
652
722
  if (warrning) {
653
723
  Logger({
654
724
  level: "WARN",
655
- message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntriesBySlug \n ${warrning}`,
725
+ message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntries \n ${warrning}`,
656
726
  });
657
727
  }
658
728
 
@@ -663,7 +733,7 @@ class Content {
663
733
  const response = await PlatformAPIClient.execute(
664
734
  this.config,
665
735
  "get",
666
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/download`,
736
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/download`,
667
737
  query_params,
668
738
  undefined,
669
739
  { ...xHeaders, ...requestHeaders },
@@ -688,7 +758,7 @@ class Content {
688
758
  } else {
689
759
  Logger({
690
760
  level: "WARN",
691
- message: `Response Validation Warnings for platform > Content > exportCustomObjectEntriesBySlug \n ${res_error}`,
761
+ message: `Response Validation Warnings for platform > Content > exportCustomObjectEntries \n ${res_error}`,
692
762
  });
693
763
  }
694
764
  }
@@ -697,41 +767,25 @@ class Content {
697
767
  }
698
768
 
699
769
  /**
700
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionByResourceParam} arg
701
- * - Arg object
702
- *
770
+ * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object
703
771
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
704
772
  * @param {import("../PlatformAPIClient").Options} - Options
705
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
706
- * Success response
707
- * @name getCustomFieldDefinitionByResource
708
- * @summary: Get custom fields definitions for a given resource type
709
- * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionByResource/).
773
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
774
+ * - Success response
775
+ *
776
+ * @name getCustomFieldDefinition
777
+ * @summary: Get custom fields definition
778
+ * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinition/).
710
779
  */
711
- async getCustomFieldDefinitionByResource(
712
- {
713
- pageNo,
714
- pageSize,
715
- resource,
716
- types,
717
- search,
718
- slugs,
719
- namespaces,
720
- requestHeaders,
721
- } = { requestHeaders: {} },
780
+ async getCustomFieldDefinition(
781
+ { id, requestHeaders } = { requestHeaders: {} },
722
782
  { responseHeaders } = { responseHeaders: false }
723
783
  ) {
724
784
  const {
725
785
  error,
726
- } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate(
786
+ } = ContentPlatformValidator.getCustomFieldDefinition().validate(
727
787
  {
728
- pageNo,
729
- pageSize,
730
- resource,
731
- types,
732
- search,
733
- slugs,
734
- namespaces,
788
+ id,
735
789
  },
736
790
  { abortEarly: false, allowUnknown: true }
737
791
  );
@@ -742,39 +796,27 @@ class Content {
742
796
  // Showing warrnings if extra unknown parameters are found
743
797
  const {
744
798
  error: warrning,
745
- } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate(
799
+ } = ContentPlatformValidator.getCustomFieldDefinition().validate(
746
800
  {
747
- pageNo,
748
- pageSize,
749
- resource,
750
- types,
751
- search,
752
- slugs,
753
- namespaces,
801
+ id,
754
802
  },
755
803
  { abortEarly: false, allowUnknown: false }
756
804
  );
757
805
  if (warrning) {
758
806
  Logger({
759
807
  level: "WARN",
760
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionByResource \n ${warrning}`,
808
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinition \n ${warrning}`,
761
809
  });
762
810
  }
763
811
 
764
812
  const query_params = {};
765
- query_params["page_no"] = pageNo;
766
- query_params["page_size"] = pageSize;
767
- query_params["types"] = types;
768
- query_params["search"] = search;
769
- query_params["slugs"] = slugs;
770
- query_params["namespaces"] = namespaces;
771
813
 
772
814
  const xHeaders = {};
773
815
 
774
816
  const response = await PlatformAPIClient.execute(
775
817
  this.config,
776
818
  "get",
777
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`,
819
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${id}`,
778
820
  query_params,
779
821
  undefined,
780
822
  { ...xHeaders, ...requestHeaders },
@@ -788,7 +830,7 @@ class Content {
788
830
 
789
831
  const {
790
832
  error: res_error,
791
- } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
833
+ } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
792
834
  responseData,
793
835
  { abortEarly: false, allowUnknown: true }
794
836
  );
@@ -799,7 +841,7 @@ class Content {
799
841
  } else {
800
842
  Logger({
801
843
  level: "WARN",
802
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionByResource \n ${res_error}`,
844
+ message: `Response Validation Warnings for platform > Content > getCustomFieldDefinition \n ${res_error}`,
803
845
  });
804
846
  }
805
847
  }
@@ -808,29 +850,31 @@ class Content {
808
850
  }
809
851
 
810
852
  /**
811
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionBySlugParam} arg
812
- * - Arg object
813
- *
853
+ * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object
814
854
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
815
855
  * @param {import("../PlatformAPIClient").Options} - Options
816
- * @returns {Promise<ContentPlatformModel.MetaFieldDefinitionDetailResSchema>}
817
- * - Success response
818
- *
819
- * @name getCustomFieldDefinitionBySlug
820
- * @summary: Get custom fields definition by resource, slug and namespace
821
- * @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionBySlug/).
856
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
857
+ * Success response
858
+ * @name getCustomFieldDefinitions
859
+ * @summary: Get custom fields definitions
860
+ * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/).
822
861
  */
823
- async getCustomFieldDefinitionBySlug(
824
- { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
862
+ async getCustomFieldDefinitions(
863
+ { pageNo, pageSize, resources, types, search, slugs, requestHeaders } = {
864
+ requestHeaders: {},
865
+ },
825
866
  { responseHeaders } = { responseHeaders: false }
826
867
  ) {
827
868
  const {
828
869
  error,
829
- } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate(
870
+ } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
830
871
  {
831
- slug,
832
- resource,
833
- namespace,
872
+ pageNo,
873
+ pageSize,
874
+ resources,
875
+ types,
876
+ search,
877
+ slugs,
834
878
  },
835
879
  { abortEarly: false, allowUnknown: true }
836
880
  );
@@ -841,29 +885,38 @@ class Content {
841
885
  // Showing warrnings if extra unknown parameters are found
842
886
  const {
843
887
  error: warrning,
844
- } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate(
888
+ } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
845
889
  {
846
- slug,
847
- resource,
848
- namespace,
890
+ pageNo,
891
+ pageSize,
892
+ resources,
893
+ types,
894
+ search,
895
+ slugs,
849
896
  },
850
897
  { abortEarly: false, allowUnknown: false }
851
898
  );
852
899
  if (warrning) {
853
900
  Logger({
854
901
  level: "WARN",
855
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionBySlug \n ${warrning}`,
902
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`,
856
903
  });
857
904
  }
858
905
 
859
906
  const query_params = {};
907
+ query_params["page_no"] = pageNo;
908
+ query_params["page_size"] = pageSize;
909
+ query_params["resources"] = resources;
910
+ query_params["types"] = types;
911
+ query_params["search"] = search;
912
+ query_params["slugs"] = slugs;
860
913
 
861
914
  const xHeaders = {};
862
915
 
863
916
  const response = await PlatformAPIClient.execute(
864
917
  this.config,
865
918
  "get",
866
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
919
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`,
867
920
  query_params,
868
921
  undefined,
869
922
  { ...xHeaders, ...requestHeaders },
@@ -877,7 +930,7 @@ class Content {
877
930
 
878
931
  const {
879
932
  error: res_error,
880
- } = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate(
933
+ } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
881
934
  responseData,
882
935
  { abortEarly: false, allowUnknown: true }
883
936
  );
@@ -888,7 +941,7 @@ class Content {
888
941
  } else {
889
942
  Logger({
890
943
  level: "WARN",
891
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionBySlug \n ${res_error}`,
944
+ message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`,
892
945
  });
893
946
  }
894
947
  }
@@ -897,39 +950,23 @@ class Content {
897
950
  }
898
951
 
899
952
  /**
900
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object
953
+ * @param {ContentPlatformValidator.GetCustomFieldJobsParam} arg - Arg object
901
954
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
902
955
  * @param {import("../PlatformAPIClient").Options} - Options
903
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
904
- * Success response
905
- * @name getCustomFieldDefinitions
906
- * @summary: Get custom fields definitions
907
- * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/).
956
+ * @returns {Promise<ContentPlatformModel.CustomFieldBulkEntry>} - Success response
957
+ * @name getCustomFieldJobs
958
+ * @summary: Fetch bulk import and export job list.
959
+ * @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldJobs/).
908
960
  */
909
- async getCustomFieldDefinitions(
910
- {
911
- pageNo,
912
- pageSize,
913
- resources,
914
- types,
915
- search,
916
- slugs,
917
- namespaces,
918
- requestHeaders,
919
- } = { requestHeaders: {} },
961
+ async getCustomFieldJobs(
962
+ { page, pageSize, actionType, requestHeaders } = { requestHeaders: {} },
920
963
  { responseHeaders } = { responseHeaders: false }
921
964
  ) {
922
- const {
923
- error,
924
- } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
965
+ const { error } = ContentPlatformValidator.getCustomFieldJobs().validate(
925
966
  {
926
- pageNo,
967
+ page,
927
968
  pageSize,
928
- resources,
929
- types,
930
- search,
931
- slugs,
932
- namespaces,
969
+ actionType,
933
970
  },
934
971
  { abortEarly: false, allowUnknown: true }
935
972
  );
@@ -940,40 +977,32 @@ class Content {
940
977
  // Showing warrnings if extra unknown parameters are found
941
978
  const {
942
979
  error: warrning,
943
- } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
980
+ } = ContentPlatformValidator.getCustomFieldJobs().validate(
944
981
  {
945
- pageNo,
982
+ page,
946
983
  pageSize,
947
- resources,
948
- types,
949
- search,
950
- slugs,
951
- namespaces,
984
+ actionType,
952
985
  },
953
986
  { abortEarly: false, allowUnknown: false }
954
987
  );
955
988
  if (warrning) {
956
989
  Logger({
957
990
  level: "WARN",
958
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`,
991
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldJobs \n ${warrning}`,
959
992
  });
960
993
  }
961
994
 
962
995
  const query_params = {};
963
- query_params["page_no"] = pageNo;
996
+ query_params["page"] = page;
964
997
  query_params["page_size"] = pageSize;
965
- query_params["resources"] = resources;
966
- query_params["types"] = types;
967
- query_params["search"] = search;
968
- query_params["slugs"] = slugs;
969
- query_params["namespaces"] = namespaces;
998
+ query_params["action_type"] = actionType;
970
999
 
971
1000
  const xHeaders = {};
972
1001
 
973
1002
  const response = await PlatformAPIClient.execute(
974
1003
  this.config,
975
1004
  "get",
976
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/definition`,
1005
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/jobs`,
977
1006
  query_params,
978
1007
  undefined,
979
1008
  { ...xHeaders, ...requestHeaders },
@@ -987,10 +1016,10 @@ class Content {
987
1016
 
988
1017
  const {
989
1018
  error: res_error,
990
- } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
991
- responseData,
992
- { abortEarly: false, allowUnknown: true }
993
- );
1019
+ } = ContentPlatformModel.CustomFieldBulkEntry().validate(responseData, {
1020
+ abortEarly: false,
1021
+ allowUnknown: true,
1022
+ });
994
1023
 
995
1024
  if (res_error) {
996
1025
  if (this.config.options.strictResponseCheck === true) {
@@ -998,7 +1027,7 @@ class Content {
998
1027
  } else {
999
1028
  Logger({
1000
1029
  level: "WARN",
1001
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`,
1030
+ message: `Response Validation Warnings for platform > Content > getCustomFieldJobs \n ${res_error}`,
1002
1031
  });
1003
1032
  }
1004
1033
  }
@@ -1082,28 +1111,106 @@ class Content {
1082
1111
  }
1083
1112
 
1084
1113
  /**
1085
- * @param {ContentPlatformValidator.GetCustomFieldsByResourceSlugParam} arg
1086
- * - Arg object
1087
- *
1114
+ * @param {ContentPlatformValidator.GetCustomFieldsParam} arg - Arg object
1115
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1116
+ * @param {import("../PlatformAPIClient").Options} - Options
1117
+ * @returns {Promise<ContentPlatformModel.CustomFieldsResponseSchema>} -
1118
+ * Success response
1119
+ * @name getCustomFields
1120
+ * @summary: Get list of custom fields of given resource
1121
+ * @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFields/).
1122
+ */
1123
+ async getCustomFields(
1124
+ { resource, requestHeaders } = { requestHeaders: {} },
1125
+ { responseHeaders } = { responseHeaders: false }
1126
+ ) {
1127
+ const { error } = ContentPlatformValidator.getCustomFields().validate(
1128
+ {
1129
+ resource,
1130
+ },
1131
+ { abortEarly: false, allowUnknown: true }
1132
+ );
1133
+ if (error) {
1134
+ return Promise.reject(new FDKClientValidationError(error));
1135
+ }
1136
+
1137
+ // Showing warrnings if extra unknown parameters are found
1138
+ const {
1139
+ error: warrning,
1140
+ } = ContentPlatformValidator.getCustomFields().validate(
1141
+ {
1142
+ resource,
1143
+ },
1144
+ { abortEarly: false, allowUnknown: false }
1145
+ );
1146
+ if (warrning) {
1147
+ Logger({
1148
+ level: "WARN",
1149
+ message: `Parameter Validation warrnings for platform > Content > getCustomFields \n ${warrning}`,
1150
+ });
1151
+ }
1152
+
1153
+ const query_params = {};
1154
+
1155
+ const xHeaders = {};
1156
+
1157
+ const response = await PlatformAPIClient.execute(
1158
+ this.config,
1159
+ "get",
1160
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}`,
1161
+ query_params,
1162
+ undefined,
1163
+ { ...xHeaders, ...requestHeaders },
1164
+ { responseHeaders }
1165
+ );
1166
+
1167
+ let responseData = response;
1168
+ if (responseHeaders) {
1169
+ responseData = response[0];
1170
+ }
1171
+
1172
+ const {
1173
+ error: res_error,
1174
+ } = ContentPlatformModel.CustomFieldsResponseSchema().validate(
1175
+ responseData,
1176
+ { abortEarly: false, allowUnknown: true }
1177
+ );
1178
+
1179
+ if (res_error) {
1180
+ if (this.config.options.strictResponseCheck === true) {
1181
+ return Promise.reject(new FDKResponseValidationError(res_error));
1182
+ } else {
1183
+ Logger({
1184
+ level: "WARN",
1185
+ message: `Response Validation Warnings for platform > Content > getCustomFields \n ${res_error}`,
1186
+ });
1187
+ }
1188
+ }
1189
+
1190
+ return response;
1191
+ }
1192
+
1193
+ /**
1194
+ * @param {ContentPlatformValidator.GetCustomFieldsByResourceIdParam} arg - Arg object
1088
1195
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1089
1196
  * @param {import("../PlatformAPIClient").Options} - Options
1090
1197
  * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
1091
1198
  * - Success response
1092
1199
  *
1093
- * @name getCustomFieldsByResourceSlug
1094
- * @summary: Get list of custom fields of given resource and resource slug
1095
- * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceSlug/).
1200
+ * @name getCustomFieldsByResourceId
1201
+ * @summary: Get list of custom fields of given resource and resource id
1202
+ * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceId/).
1096
1203
  */
1097
- async getCustomFieldsByResourceSlug(
1098
- { resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
1204
+ async getCustomFieldsByResourceId(
1205
+ { resource, resourceId, requestHeaders } = { requestHeaders: {} },
1099
1206
  { responseHeaders } = { responseHeaders: false }
1100
1207
  ) {
1101
1208
  const {
1102
1209
  error,
1103
- } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate(
1210
+ } = ContentPlatformValidator.getCustomFieldsByResourceId().validate(
1104
1211
  {
1105
1212
  resource,
1106
- resourceSlug,
1213
+ resourceId,
1107
1214
  },
1108
1215
  { abortEarly: false, allowUnknown: true }
1109
1216
  );
@@ -1114,17 +1221,17 @@ class Content {
1114
1221
  // Showing warrnings if extra unknown parameters are found
1115
1222
  const {
1116
1223
  error: warrning,
1117
- } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate(
1224
+ } = ContentPlatformValidator.getCustomFieldsByResourceId().validate(
1118
1225
  {
1119
1226
  resource,
1120
- resourceSlug,
1227
+ resourceId,
1121
1228
  },
1122
1229
  { abortEarly: false, allowUnknown: false }
1123
1230
  );
1124
1231
  if (warrning) {
1125
1232
  Logger({
1126
1233
  level: "WARN",
1127
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceSlug \n ${warrning}`,
1234
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceId \n ${warrning}`,
1128
1235
  });
1129
1236
  }
1130
1237
 
@@ -1135,7 +1242,7 @@ class Content {
1135
1242
  const response = await PlatformAPIClient.execute(
1136
1243
  this.config,
1137
1244
  "get",
1138
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
1245
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
1139
1246
  query_params,
1140
1247
  undefined,
1141
1248
  { ...xHeaders, ...requestHeaders },
@@ -1160,7 +1267,7 @@ class Content {
1160
1267
  } else {
1161
1268
  Logger({
1162
1269
  level: "WARN",
1163
- message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceSlug \n ${res_error}`,
1270
+ message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceId \n ${res_error}`,
1164
1271
  });
1165
1272
  }
1166
1273
  }
@@ -1169,23 +1276,21 @@ class Content {
1169
1276
  }
1170
1277
 
1171
1278
  /**
1172
- * @param {ContentPlatformValidator.GetCustomObjectBySlugParam} arg - Arg object
1279
+ * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object
1173
1280
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1174
1281
  * @param {import("../PlatformAPIClient").Options} - Options
1175
- * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
1176
- * Success response
1177
- * @name getCustomObjectBySlug
1282
+ * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
1283
+ * @name getCustomObject
1178
1284
  * @summary: Get custom object details
1179
- * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectBySlug/).
1285
+ * @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObject/).
1180
1286
  */
1181
- async getCustomObjectBySlug(
1182
- { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
1287
+ async getCustomObject(
1288
+ { id, requestHeaders } = { requestHeaders: {} },
1183
1289
  { responseHeaders } = { responseHeaders: false }
1184
1290
  ) {
1185
- const { error } = ContentPlatformValidator.getCustomObjectBySlug().validate(
1291
+ const { error } = ContentPlatformValidator.getCustomObject().validate(
1186
1292
  {
1187
- definitionSlug,
1188
- slug,
1293
+ id,
1189
1294
  },
1190
1295
  { abortEarly: false, allowUnknown: true }
1191
1296
  );
@@ -1196,17 +1301,16 @@ class Content {
1196
1301
  // Showing warrnings if extra unknown parameters are found
1197
1302
  const {
1198
1303
  error: warrning,
1199
- } = ContentPlatformValidator.getCustomObjectBySlug().validate(
1304
+ } = ContentPlatformValidator.getCustomObject().validate(
1200
1305
  {
1201
- definitionSlug,
1202
- slug,
1306
+ id,
1203
1307
  },
1204
1308
  { abortEarly: false, allowUnknown: false }
1205
1309
  );
1206
1310
  if (warrning) {
1207
1311
  Logger({
1208
1312
  level: "WARN",
1209
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectBySlug \n ${warrning}`,
1313
+ message: `Parameter Validation warrnings for platform > Content > getCustomObject \n ${warrning}`,
1210
1314
  });
1211
1315
  }
1212
1316
 
@@ -1217,7 +1321,7 @@ class Content {
1217
1321
  const response = await PlatformAPIClient.execute(
1218
1322
  this.config,
1219
1323
  "get",
1220
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
1324
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${id}`,
1221
1325
  query_params,
1222
1326
  undefined,
1223
1327
  { ...xHeaders, ...requestHeaders },
@@ -1231,7 +1335,7 @@ class Content {
1231
1335
 
1232
1336
  const {
1233
1337
  error: res_error,
1234
- } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
1338
+ } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
1235
1339
  abortEarly: false,
1236
1340
  allowUnknown: true,
1237
1341
  });
@@ -1242,7 +1346,7 @@ class Content {
1242
1346
  } else {
1243
1347
  Logger({
1244
1348
  level: "WARN",
1245
- message: `Response Validation Warnings for platform > Content > getCustomObjectBySlug \n ${res_error}`,
1349
+ message: `Response Validation Warnings for platform > Content > getCustomObject \n ${res_error}`,
1246
1350
  });
1247
1351
  }
1248
1352
  }
@@ -1251,27 +1355,24 @@ class Content {
1251
1355
  }
1252
1356
 
1253
1357
  /**
1254
- * @param {ContentPlatformValidator.GetCustomObjectDefinitionBySlugParam} arg
1255
- * - Arg object
1256
- *
1358
+ * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object
1257
1359
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1258
1360
  * @param {import("../PlatformAPIClient").Options} - Options
1259
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
1260
- * - Success response
1261
- *
1262
- * @name getCustomObjectDefinitionBySlug
1361
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
1362
+ * Success response
1363
+ * @name getCustomObjectDefinition
1263
1364
  * @summary: Get custom object definition
1264
- * @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitionBySlug/).
1365
+ * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinition/).
1265
1366
  */
1266
- async getCustomObjectDefinitionBySlug(
1267
- { slug, requestHeaders } = { requestHeaders: {} },
1367
+ async getCustomObjectDefinition(
1368
+ { id, requestHeaders } = { requestHeaders: {} },
1268
1369
  { responseHeaders } = { responseHeaders: false }
1269
1370
  ) {
1270
1371
  const {
1271
1372
  error,
1272
- } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate(
1373
+ } = ContentPlatformValidator.getCustomObjectDefinition().validate(
1273
1374
  {
1274
- slug,
1375
+ id,
1275
1376
  },
1276
1377
  { abortEarly: false, allowUnknown: true }
1277
1378
  );
@@ -1282,16 +1383,16 @@ class Content {
1282
1383
  // Showing warrnings if extra unknown parameters are found
1283
1384
  const {
1284
1385
  error: warrning,
1285
- } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate(
1386
+ } = ContentPlatformValidator.getCustomObjectDefinition().validate(
1286
1387
  {
1287
- slug,
1388
+ id,
1288
1389
  },
1289
1390
  { abortEarly: false, allowUnknown: false }
1290
1391
  );
1291
1392
  if (warrning) {
1292
1393
  Logger({
1293
1394
  level: "WARN",
1294
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinitionBySlug \n ${warrning}`,
1395
+ message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinition \n ${warrning}`,
1295
1396
  });
1296
1397
  }
1297
1398
 
@@ -1302,7 +1403,7 @@ class Content {
1302
1403
  const response = await PlatformAPIClient.execute(
1303
1404
  this.config,
1304
1405
  "get",
1305
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
1406
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${id}`,
1306
1407
  query_params,
1307
1408
  undefined,
1308
1409
  { ...xHeaders, ...requestHeaders },
@@ -1316,7 +1417,7 @@ class Content {
1316
1417
 
1317
1418
  const {
1318
1419
  error: res_error,
1319
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
1420
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
1320
1421
  responseData,
1321
1422
  { abortEarly: false, allowUnknown: true }
1322
1423
  );
@@ -1327,7 +1428,7 @@ class Content {
1327
1428
  } else {
1328
1429
  Logger({
1329
1430
  level: "WARN",
1330
- message: `Response Validation Warnings for platform > Content > getCustomObjectDefinitionBySlug \n ${res_error}`,
1431
+ message: `Response Validation Warnings for platform > Content > getCustomObjectDefinition \n ${res_error}`,
1331
1432
  });
1332
1433
  }
1333
1434
  }
@@ -1343,7 +1444,7 @@ class Content {
1343
1444
  * Success response
1344
1445
  * @name getCustomObjectDefinitions
1345
1446
  * @summary: Get custom object definitions
1346
- * @description: Custom object definition lists can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitions/).
1447
+ * @description: Custom object definition lists can be obtained using this endpoint - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitions/).
1347
1448
  */
1348
1449
  async getCustomObjectDefinitions(
1349
1450
  { pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} },
@@ -1391,7 +1492,7 @@ class Content {
1391
1492
  const response = await PlatformAPIClient.execute(
1392
1493
  this.config,
1393
1494
  "get",
1394
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`,
1495
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`,
1395
1496
  query_params,
1396
1497
  undefined,
1397
1498
  { ...xHeaders, ...requestHeaders },
@@ -1425,27 +1526,23 @@ class Content {
1425
1526
  }
1426
1527
 
1427
1528
  /**
1428
- * @param {ContentPlatformValidator.GetCustomObjectsBySlugParam} arg - Arg object
1529
+ * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object
1429
1530
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1430
1531
  * @param {import("../PlatformAPIClient").Options} - Options
1431
1532
  * @returns {Promise<ContentPlatformModel.CustomObjectsSchema>} - Success response
1432
- * @name getCustomObjectsBySlug
1433
- * @summary: Get list of custom objects under a certain custom object definition
1434
- * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectsBySlug/).
1533
+ * @name getCustomObjects
1534
+ * @summary: Get list of custom objects
1535
+ * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/).
1435
1536
  */
1436
- async getCustomObjectsBySlug(
1437
- { pageNo, pageSize, definitionSlug, requestHeaders } = {
1438
- requestHeaders: {},
1439
- },
1537
+ async getCustomObjects(
1538
+ { pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} },
1440
1539
  { responseHeaders } = { responseHeaders: false }
1441
1540
  ) {
1442
- const {
1443
- error,
1444
- } = ContentPlatformValidator.getCustomObjectsBySlug().validate(
1541
+ const { error } = ContentPlatformValidator.getCustomObjects().validate(
1445
1542
  {
1446
1543
  pageNo,
1447
1544
  pageSize,
1448
- definitionSlug,
1545
+ definitionId,
1449
1546
  },
1450
1547
  { abortEarly: false, allowUnknown: true }
1451
1548
  );
@@ -1456,22 +1553,23 @@ class Content {
1456
1553
  // Showing warrnings if extra unknown parameters are found
1457
1554
  const {
1458
1555
  error: warrning,
1459
- } = ContentPlatformValidator.getCustomObjectsBySlug().validate(
1556
+ } = ContentPlatformValidator.getCustomObjects().validate(
1460
1557
  {
1461
1558
  pageNo,
1462
1559
  pageSize,
1463
- definitionSlug,
1560
+ definitionId,
1464
1561
  },
1465
1562
  { abortEarly: false, allowUnknown: false }
1466
1563
  );
1467
1564
  if (warrning) {
1468
1565
  Logger({
1469
1566
  level: "WARN",
1470
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectsBySlug \n ${warrning}`,
1567
+ message: `Parameter Validation warrnings for platform > Content > getCustomObjects \n ${warrning}`,
1471
1568
  });
1472
1569
  }
1473
1570
 
1474
1571
  const query_params = {};
1572
+ query_params["definition_id"] = definitionId;
1475
1573
  query_params["page_no"] = pageNo;
1476
1574
  query_params["page_size"] = pageSize;
1477
1575
 
@@ -1480,7 +1578,7 @@ class Content {
1480
1578
  const response = await PlatformAPIClient.execute(
1481
1579
  this.config,
1482
1580
  "get",
1483
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`,
1581
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`,
1484
1582
  query_params,
1485
1583
  undefined,
1486
1584
  { ...xHeaders, ...requestHeaders },
@@ -1505,7 +1603,7 @@ class Content {
1505
1603
  } else {
1506
1604
  Logger({
1507
1605
  level: "WARN",
1508
- message: `Response Validation Warnings for platform > Content > getCustomObjectsBySlug \n ${res_error}`,
1606
+ message: `Response Validation Warnings for platform > Content > getCustomObjects \n ${res_error}`,
1509
1607
  });
1510
1608
  }
1511
1609
  }
@@ -1673,27 +1771,25 @@ class Content {
1673
1771
  }
1674
1772
 
1675
1773
  /**
1676
- * @param {ContentPlatformValidator.ImportCustomObjectEntriesBySlugParam} arg
1677
- * - Arg object
1678
- *
1774
+ * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object
1679
1775
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1680
1776
  * @param {import("../PlatformAPIClient").Options} - Options
1681
- * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadDetails>}
1777
+ * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadResponse>}
1682
1778
  * - Success response
1683
1779
  *
1684
- * @name importCustomObjectEntriesBySlug
1780
+ * @name importCustomObjectEntries
1685
1781
  * @summary: Bulk custom object entries upload
1686
- * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntriesBySlug/).
1782
+ * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntries/).
1687
1783
  */
1688
- async importCustomObjectEntriesBySlug(
1689
- { slug, body, requestHeaders } = { requestHeaders: {} },
1784
+ async importCustomObjectEntries(
1785
+ { definitionId, body, requestHeaders } = { requestHeaders: {} },
1690
1786
  { responseHeaders } = { responseHeaders: false }
1691
1787
  ) {
1692
1788
  const {
1693
1789
  error,
1694
- } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate(
1790
+ } = ContentPlatformValidator.importCustomObjectEntries().validate(
1695
1791
  {
1696
- slug,
1792
+ definitionId,
1697
1793
  body,
1698
1794
  },
1699
1795
  { abortEarly: false, allowUnknown: true }
@@ -1705,9 +1801,9 @@ class Content {
1705
1801
  // Showing warrnings if extra unknown parameters are found
1706
1802
  const {
1707
1803
  error: warrning,
1708
- } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate(
1804
+ } = ContentPlatformValidator.importCustomObjectEntries().validate(
1709
1805
  {
1710
- slug,
1806
+ definitionId,
1711
1807
  body,
1712
1808
  },
1713
1809
  { abortEarly: false, allowUnknown: false }
@@ -1715,7 +1811,7 @@ class Content {
1715
1811
  if (warrning) {
1716
1812
  Logger({
1717
1813
  level: "WARN",
1718
- message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntriesBySlug \n ${warrning}`,
1814
+ message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntries \n ${warrning}`,
1719
1815
  });
1720
1816
  }
1721
1817
 
@@ -1726,7 +1822,7 @@ class Content {
1726
1822
  const response = await PlatformAPIClient.execute(
1727
1823
  this.config,
1728
1824
  "post",
1729
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/upload`,
1825
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/upload`,
1730
1826
  query_params,
1731
1827
  body,
1732
1828
  { ...xHeaders, ...requestHeaders },
@@ -1740,7 +1836,7 @@ class Content {
1740
1836
 
1741
1837
  const {
1742
1838
  error: res_error,
1743
- } = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate(
1839
+ } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate(
1744
1840
  responseData,
1745
1841
  { abortEarly: false, allowUnknown: true }
1746
1842
  );
@@ -1751,7 +1847,7 @@ class Content {
1751
1847
  } else {
1752
1848
  Logger({
1753
1849
  level: "WARN",
1754
- message: `Response Validation Warnings for platform > Content > importCustomObjectEntriesBySlug \n ${res_error}`,
1850
+ message: `Response Validation Warnings for platform > Content > importCustomObjectEntries \n ${res_error}`,
1755
1851
  });
1756
1852
  }
1757
1853
  }
@@ -1760,25 +1856,23 @@ class Content {
1760
1856
  }
1761
1857
 
1762
1858
  /**
1763
- * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryBySlugParam} arg
1764
- * - Arg object
1765
- *
1859
+ * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object
1766
1860
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1767
1861
  * @param {import("../PlatformAPIClient").Options} - Options
1768
1862
  * @returns {Promise<string>} - Success response
1769
- * @name sampleCustomObjectBulkEntryBySlug
1863
+ * @name sampleCustomObjectBulkEntry
1770
1864
  * @summary: Download sample for custom object bulk entry
1771
- * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntryBySlug/).
1865
+ * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntry/).
1772
1866
  */
1773
- async sampleCustomObjectBulkEntryBySlug(
1774
- { slug, requestHeaders } = { requestHeaders: {} },
1867
+ async sampleCustomObjectBulkEntry(
1868
+ { definitionId, requestHeaders } = { requestHeaders: {} },
1775
1869
  { responseHeaders } = { responseHeaders: false }
1776
1870
  ) {
1777
1871
  const {
1778
1872
  error,
1779
- } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate(
1873
+ } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate(
1780
1874
  {
1781
- slug,
1875
+ definitionId,
1782
1876
  },
1783
1877
  { abortEarly: false, allowUnknown: true }
1784
1878
  );
@@ -1789,16 +1883,16 @@ class Content {
1789
1883
  // Showing warrnings if extra unknown parameters are found
1790
1884
  const {
1791
1885
  error: warrning,
1792
- } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate(
1886
+ } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate(
1793
1887
  {
1794
- slug,
1888
+ definitionId,
1795
1889
  },
1796
1890
  { abortEarly: false, allowUnknown: false }
1797
1891
  );
1798
1892
  if (warrning) {
1799
1893
  Logger({
1800
1894
  level: "WARN",
1801
- message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${warrning}`,
1895
+ message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntry \n ${warrning}`,
1802
1896
  });
1803
1897
  }
1804
1898
 
@@ -1809,7 +1903,7 @@ class Content {
1809
1903
  const response = await PlatformAPIClient.execute(
1810
1904
  this.config,
1811
1905
  "get",
1812
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/sample`,
1906
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/sample`,
1813
1907
  query_params,
1814
1908
  undefined,
1815
1909
  { ...xHeaders, ...requestHeaders },
@@ -1831,7 +1925,7 @@ class Content {
1831
1925
  } else {
1832
1926
  Logger({
1833
1927
  level: "WARN",
1834
- message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${res_error}`,
1928
+ message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntry \n ${res_error}`,
1835
1929
  });
1836
1930
  }
1837
1931
  }
@@ -1840,7 +1934,7 @@ class Content {
1840
1934
  }
1841
1935
 
1842
1936
  /**
1843
- * @param {ContentPlatformValidator.UpdateCustomFieldByResourceSlugParam} arg
1937
+ * @param {ContentPlatformValidator.UpdateCustomFieldByResourceIdParam} arg
1844
1938
  * - Arg object
1845
1939
  *
1846
1940
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1848,20 +1942,20 @@ class Content {
1848
1942
  * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
1849
1943
  * - Success response
1850
1944
  *
1851
- * @name updateCustomFieldByResourceSlug
1852
- * @summary: Update custom field entries for gives resource and resource slug
1853
- * @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldByResourceSlug/).
1945
+ * @name updateCustomFieldByResourceId
1946
+ * @summary: Update custom field entries for gives resource and resource_id
1947
+ * @description: You can edit a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldByResourceId/).
1854
1948
  */
1855
- async updateCustomFieldByResourceSlug(
1856
- { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
1949
+ async updateCustomFieldByResourceId(
1950
+ { resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
1857
1951
  { responseHeaders } = { responseHeaders: false }
1858
1952
  ) {
1859
1953
  const {
1860
1954
  error,
1861
- } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate(
1955
+ } = ContentPlatformValidator.updateCustomFieldByResourceId().validate(
1862
1956
  {
1863
1957
  resource,
1864
- resourceSlug,
1958
+ resourceId,
1865
1959
  body,
1866
1960
  },
1867
1961
  { abortEarly: false, allowUnknown: true }
@@ -1873,10 +1967,10 @@ class Content {
1873
1967
  // Showing warrnings if extra unknown parameters are found
1874
1968
  const {
1875
1969
  error: warrning,
1876
- } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate(
1970
+ } = ContentPlatformValidator.updateCustomFieldByResourceId().validate(
1877
1971
  {
1878
1972
  resource,
1879
- resourceSlug,
1973
+ resourceId,
1880
1974
  body,
1881
1975
  },
1882
1976
  { abortEarly: false, allowUnknown: false }
@@ -1884,7 +1978,7 @@ class Content {
1884
1978
  if (warrning) {
1885
1979
  Logger({
1886
1980
  level: "WARN",
1887
- message: `Parameter Validation warrnings for platform > Content > updateCustomFieldByResourceSlug \n ${warrning}`,
1981
+ message: `Parameter Validation warrnings for platform > Content > updateCustomFieldByResourceId \n ${warrning}`,
1888
1982
  });
1889
1983
  }
1890
1984
 
@@ -1895,7 +1989,7 @@ class Content {
1895
1989
  const response = await PlatformAPIClient.execute(
1896
1990
  this.config,
1897
1991
  "put",
1898
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
1992
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
1899
1993
  query_params,
1900
1994
  body,
1901
1995
  { ...xHeaders, ...requestHeaders },
@@ -1920,7 +2014,7 @@ class Content {
1920
2014
  } else {
1921
2015
  Logger({
1922
2016
  level: "WARN",
1923
- message: `Response Validation Warnings for platform > Content > updateCustomFieldByResourceSlug \n ${res_error}`,
2017
+ message: `Response Validation Warnings for platform > Content > updateCustomFieldByResourceId \n ${res_error}`,
1924
2018
  });
1925
2019
  }
1926
2020
  }
@@ -1929,31 +2023,25 @@ class Content {
1929
2023
  }
1930
2024
 
1931
2025
  /**
1932
- * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionBySlugParam} arg
1933
- * - Arg object
1934
- *
2026
+ * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object
1935
2027
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1936
2028
  * @param {import("../PlatformAPIClient").Options} - Options
1937
2029
  * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
1938
2030
  * - Success response
1939
2031
  *
1940
- * @name updateCustomFieldDefinitionBySlug
2032
+ * @name updateCustomFieldDefinition
1941
2033
  * @summary: Update custom field definition
1942
- * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinitionBySlug/).
2034
+ * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinition/).
1943
2035
  */
1944
- async updateCustomFieldDefinitionBySlug(
1945
- { slug, resource, namespace, body, requestHeaders } = {
1946
- requestHeaders: {},
1947
- },
2036
+ async updateCustomFieldDefinition(
2037
+ { id, body, requestHeaders } = { requestHeaders: {} },
1948
2038
  { responseHeaders } = { responseHeaders: false }
1949
2039
  ) {
1950
2040
  const {
1951
2041
  error,
1952
- } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate(
2042
+ } = ContentPlatformValidator.updateCustomFieldDefinition().validate(
1953
2043
  {
1954
- slug,
1955
- resource,
1956
- namespace,
2044
+ id,
1957
2045
  body,
1958
2046
  },
1959
2047
  { abortEarly: false, allowUnknown: true }
@@ -1965,11 +2053,9 @@ class Content {
1965
2053
  // Showing warrnings if extra unknown parameters are found
1966
2054
  const {
1967
2055
  error: warrning,
1968
- } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate(
2056
+ } = ContentPlatformValidator.updateCustomFieldDefinition().validate(
1969
2057
  {
1970
- slug,
1971
- resource,
1972
- namespace,
2058
+ id,
1973
2059
  body,
1974
2060
  },
1975
2061
  { abortEarly: false, allowUnknown: false }
@@ -1977,7 +2063,7 @@ class Content {
1977
2063
  if (warrning) {
1978
2064
  Logger({
1979
2065
  level: "WARN",
1980
- message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${warrning}`,
2066
+ message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinition \n ${warrning}`,
1981
2067
  });
1982
2068
  }
1983
2069
 
@@ -1988,7 +2074,7 @@ class Content {
1988
2074
  const response = await PlatformAPIClient.execute(
1989
2075
  this.config,
1990
2076
  "put",
1991
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
2077
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${id}`,
1992
2078
  query_params,
1993
2079
  body,
1994
2080
  { ...xHeaders, ...requestHeaders },
@@ -2013,7 +2099,7 @@ class Content {
2013
2099
  } else {
2014
2100
  Logger({
2015
2101
  level: "WARN",
2016
- message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${res_error}`,
2102
+ message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinition \n ${res_error}`,
2017
2103
  });
2018
2104
  }
2019
2105
  }
@@ -2022,25 +2108,21 @@ class Content {
2022
2108
  }
2023
2109
 
2024
2110
  /**
2025
- * @param {ContentPlatformValidator.UpdateCustomObjectBySlugParam} arg - Arg object
2111
+ * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object
2026
2112
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2027
2113
  * @param {import("../PlatformAPIClient").Options} - Options
2028
- * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
2029
- * Success response
2030
- * @name updateCustomObjectBySlug
2114
+ * @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
2115
+ * @name updateCustomObject
2031
2116
  * @summary: Update custom object details
2032
- * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectBySlug/).
2117
+ * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObject/).
2033
2118
  */
2034
- async updateCustomObjectBySlug(
2035
- { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
2119
+ async updateCustomObject(
2120
+ { id, body, requestHeaders } = { requestHeaders: {} },
2036
2121
  { responseHeaders } = { responseHeaders: false }
2037
2122
  ) {
2038
- const {
2039
- error,
2040
- } = ContentPlatformValidator.updateCustomObjectBySlug().validate(
2123
+ const { error } = ContentPlatformValidator.updateCustomObject().validate(
2041
2124
  {
2042
- definitionSlug,
2043
- slug,
2125
+ id,
2044
2126
  body,
2045
2127
  },
2046
2128
  { abortEarly: false, allowUnknown: true }
@@ -2052,10 +2134,9 @@ class Content {
2052
2134
  // Showing warrnings if extra unknown parameters are found
2053
2135
  const {
2054
2136
  error: warrning,
2055
- } = ContentPlatformValidator.updateCustomObjectBySlug().validate(
2137
+ } = ContentPlatformValidator.updateCustomObject().validate(
2056
2138
  {
2057
- definitionSlug,
2058
- slug,
2139
+ id,
2059
2140
  body,
2060
2141
  },
2061
2142
  { abortEarly: false, allowUnknown: false }
@@ -2063,7 +2144,7 @@ class Content {
2063
2144
  if (warrning) {
2064
2145
  Logger({
2065
2146
  level: "WARN",
2066
- message: `Parameter Validation warrnings for platform > Content > updateCustomObjectBySlug \n ${warrning}`,
2147
+ message: `Parameter Validation warrnings for platform > Content > updateCustomObject \n ${warrning}`,
2067
2148
  });
2068
2149
  }
2069
2150
 
@@ -2074,7 +2155,7 @@ class Content {
2074
2155
  const response = await PlatformAPIClient.execute(
2075
2156
  this.config,
2076
2157
  "put",
2077
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
2158
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${id}`,
2078
2159
  query_params,
2079
2160
  body,
2080
2161
  { ...xHeaders, ...requestHeaders },
@@ -2088,7 +2169,7 @@ class Content {
2088
2169
 
2089
2170
  const {
2090
2171
  error: res_error,
2091
- } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
2172
+ } = ContentPlatformModel.CustomObjectSchema().validate(responseData, {
2092
2173
  abortEarly: false,
2093
2174
  allowUnknown: true,
2094
2175
  });
@@ -2099,7 +2180,7 @@ class Content {
2099
2180
  } else {
2100
2181
  Logger({
2101
2182
  level: "WARN",
2102
- message: `Response Validation Warnings for platform > Content > updateCustomObjectBySlug \n ${res_error}`,
2183
+ message: `Response Validation Warnings for platform > Content > updateCustomObject \n ${res_error}`,
2103
2184
  });
2104
2185
  }
2105
2186
  }
@@ -2108,27 +2189,26 @@ class Content {
2108
2189
  }
2109
2190
 
2110
2191
  /**
2111
- * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionBySlugParam} arg
2192
+ * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg
2112
2193
  * - Arg object
2113
2194
  *
2114
2195
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2115
2196
  * @param {import("../PlatformAPIClient").Options} - Options
2116
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
2117
- * - Success response
2118
- *
2119
- * @name updateCustomObjectDefinitionBySlug
2197
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
2198
+ * Success response
2199
+ * @name updateCustomObjectDefinition
2120
2200
  * @summary: Update custom object definition
2121
- * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinitionBySlug/).
2201
+ * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinition/).
2122
2202
  */
2123
- async updateCustomObjectDefinitionBySlug(
2124
- { slug, body, requestHeaders } = { requestHeaders: {} },
2203
+ async updateCustomObjectDefinition(
2204
+ { id, body, requestHeaders } = { requestHeaders: {} },
2125
2205
  { responseHeaders } = { responseHeaders: false }
2126
2206
  ) {
2127
2207
  const {
2128
2208
  error,
2129
- } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate(
2209
+ } = ContentPlatformValidator.updateCustomObjectDefinition().validate(
2130
2210
  {
2131
- slug,
2211
+ id,
2132
2212
  body,
2133
2213
  },
2134
2214
  { abortEarly: false, allowUnknown: true }
@@ -2140,9 +2220,9 @@ class Content {
2140
2220
  // Showing warrnings if extra unknown parameters are found
2141
2221
  const {
2142
2222
  error: warrning,
2143
- } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate(
2223
+ } = ContentPlatformValidator.updateCustomObjectDefinition().validate(
2144
2224
  {
2145
- slug,
2225
+ id,
2146
2226
  body,
2147
2227
  },
2148
2228
  { abortEarly: false, allowUnknown: false }
@@ -2150,7 +2230,7 @@ class Content {
2150
2230
  if (warrning) {
2151
2231
  Logger({
2152
2232
  level: "WARN",
2153
- message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${warrning}`,
2233
+ message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinition \n ${warrning}`,
2154
2234
  });
2155
2235
  }
2156
2236
 
@@ -2161,7 +2241,7 @@ class Content {
2161
2241
  const response = await PlatformAPIClient.execute(
2162
2242
  this.config,
2163
2243
  "put",
2164
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
2244
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${id}`,
2165
2245
  query_params,
2166
2246
  body,
2167
2247
  { ...xHeaders, ...requestHeaders },
@@ -2175,7 +2255,7 @@ class Content {
2175
2255
 
2176
2256
  const {
2177
2257
  error: res_error,
2178
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
2258
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
2179
2259
  responseData,
2180
2260
  { abortEarly: false, allowUnknown: true }
2181
2261
  );
@@ -2186,7 +2266,7 @@ class Content {
2186
2266
  } else {
2187
2267
  Logger({
2188
2268
  level: "WARN",
2189
- message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${res_error}`,
2269
+ message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinition \n ${res_error}`,
2190
2270
  });
2191
2271
  }
2192
2272
  }