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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +27 -114
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +29 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -51
  14. package/sdk/application/Content/ContentApplicationClient.js +56 -161
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -9
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -7
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  18. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  19. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  20. package/sdk/application/Logistic/LogisticApplicationClient.js +8 -101
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  22. package/sdk/application/Order/OrderApplicationClient.js +8 -56
  23. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  24. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  25. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  27. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  28. package/sdk/application/Theme/ThemeApplicationClient.js +2 -4
  29. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  30. package/sdk/application/User/UserApplicationClient.js +6 -6
  31. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  32. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  33. package/sdk/common/Utility.js +6 -3
  34. package/sdk/common/utils.d.ts +0 -1
  35. package/sdk/common/utils.js +0 -14
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
  39. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  41. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  42. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  43. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  44. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  45. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  47. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  49. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  51. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  52. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  53. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  54. package/sdk/partner/Theme/ThemePartnerModel.d.ts +37 -96
  55. package/sdk/partner/Theme/ThemePartnerModel.js +36 -90
  56. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  57. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  58. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  59. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  60. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  62. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  64. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  66. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  72. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  73. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  74. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  75. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  76. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  77. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  78. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -121
  82. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  83. package/sdk/platform/Cart/CartPlatformModel.d.ts +1294 -5068
  84. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1992
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  88. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  89. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  90. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  91. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6389
  92. package/sdk/platform/Catalog/CatalogPlatformModel.js +1681 -3222
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  94. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  95. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  96. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  97. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  98. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  103. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  104. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  110. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  116. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  118. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  120. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -204
  122. package/sdk/platform/Content/ContentPlatformApplicationClient.js +475 -1073
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -253
  124. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -256
  125. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  126. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  127. package/sdk/platform/Content/ContentPlatformModel.d.ts +403 -1375
  128. package/sdk/platform/Content/ContentPlatformModel.js +394 -631
  129. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  130. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  131. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  132. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  133. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  134. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  135. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
  142. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  146. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  147. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  148. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  149. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  150. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  151. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  152. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  153. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  154. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  155. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  156. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  161. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  162. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  163. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  164. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  165. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  166. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  167. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  168. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  169. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  170. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  172. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  174. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  175. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  176. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  177. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  178. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  179. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  180. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  181. package/sdk/platform/PlatformClient.d.ts +2 -0
  182. package/sdk/platform/PlatformClient.js +4 -0
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  188. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +49 -45
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -28
  199. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  200. package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
  201. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -3
  202. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  203. package/sdk/platform/Share/SharePlatformModel.d.ts +7 -46
  204. package/sdk/platform/Share/SharePlatformModel.js +6 -31
  205. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  206. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  207. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  208. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  209. package/sdk/platform/Theme/ThemePlatformModel.d.ts +11 -37
  210. package/sdk/platform/Theme/ThemePlatformModel.js +15 -33
  211. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  212. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  213. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  214. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  215. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  216. package/sdk/platform/User/UserPlatformModel.js +23 -23
  217. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  218. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  219. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  220. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  221. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  222. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  223. package/sdk/platform/index.d.ts +1 -0
  224. package/sdk/platform/index.js +2 -0
  225. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  226. package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -6
  227. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  228. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  229. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  230. package/sdk/public/Content/ContentPublicClient.js +6 -810
  231. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  232. package/sdk/public/Content/ContentPublicModel.js +3 -649
  233. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  234. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  235. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  236. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  237. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  238. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  239. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  240. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  241. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  242. package/sdk/application/Finance/FinanceApplicationClient.js +0 -111
@@ -15,25 +15,28 @@ class Content {
15
15
  }
16
16
 
17
17
  /**
18
- * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object
18
+ * @param {ContentPlatformValidator.CreateCustomFieldByResourceIdParam} arg
19
+ * - Arg object
20
+ *
19
21
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
20
22
  * @param {import("../PlatformAPIClient").Options} - Options
21
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
23
+ * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
22
24
  * - Success response
23
25
  *
24
- * @name createCustomFieldDefinition
25
- * @summary: Create custom field definition for a given resource type
26
- * @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/).
26
+ * @name createCustomFieldByResourceId
27
+ * @summary: Create custom field entries for gives resource and resource_id
28
+ * @description: You can add 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/createCustomFieldByResourceId/).
27
29
  */
28
- async createCustomFieldDefinition(
29
- { resource, body, requestHeaders } = { requestHeaders: {} },
30
+ async createCustomFieldByResourceId(
31
+ { resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
30
32
  { responseHeaders } = { responseHeaders: false }
31
33
  ) {
32
34
  const {
33
35
  error,
34
- } = ContentPlatformValidator.createCustomFieldDefinition().validate(
36
+ } = ContentPlatformValidator.createCustomFieldByResourceId().validate(
35
37
  {
36
38
  resource,
39
+ resourceId,
37
40
  body,
38
41
  },
39
42
  { abortEarly: false, allowUnknown: true }
@@ -45,9 +48,10 @@ class Content {
45
48
  // Showing warrnings if extra unknown parameters are found
46
49
  const {
47
50
  error: warrning,
48
- } = ContentPlatformValidator.createCustomFieldDefinition().validate(
51
+ } = ContentPlatformValidator.createCustomFieldByResourceId().validate(
49
52
  {
50
53
  resource,
54
+ resourceId,
51
55
  body,
52
56
  },
53
57
  { abortEarly: false, allowUnknown: false }
@@ -55,7 +59,7 @@ class Content {
55
59
  if (warrning) {
56
60
  Logger({
57
61
  level: "WARN",
58
- message: `Parameter Validation warrnings for platform > Content > createCustomFieldDefinition \n ${warrning}`,
62
+ message: `Parameter Validation warrnings for platform > Content > createCustomFieldByResourceId \n ${warrning}`,
59
63
  });
60
64
  }
61
65
 
@@ -65,8 +69,8 @@ class Content {
65
69
 
66
70
  const response = await PlatformAPIClient.execute(
67
71
  this.config,
68
- "post",
69
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`,
72
+ "put",
73
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
70
74
  query_params,
71
75
  body,
72
76
  { ...xHeaders, ...requestHeaders },
@@ -80,7 +84,7 @@ class Content {
80
84
 
81
85
  const {
82
86
  error: res_error,
83
- } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
87
+ } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
84
88
  responseData,
85
89
  { abortEarly: false, allowUnknown: true }
86
90
  );
@@ -91,7 +95,7 @@ class Content {
91
95
  } else {
92
96
  Logger({
93
97
  level: "WARN",
94
- message: `Response Validation Warnings for platform > Content > createCustomFieldDefinition \n ${res_error}`,
98
+ message: `Response Validation Warnings for platform > Content > createCustomFieldByResourceId \n ${res_error}`,
95
99
  });
96
100
  }
97
101
  }
@@ -100,23 +104,24 @@ class Content {
100
104
  }
101
105
 
102
106
  /**
103
- * @param {ContentPlatformValidator.CreateCustomObjectBySlugParam} arg - Arg object
107
+ * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object
104
108
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
105
109
  * @param {import("../PlatformAPIClient").Options} - Options
106
- * @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
107
- * @name createCustomObjectBySlug
108
- * @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/).
110
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
111
+ * - Success response
112
+ *
113
+ * @name createCustomFieldDefinition
114
+ * @summary: Create custom field definition
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/).
110
116
  */
111
- async createCustomObjectBySlug(
112
- { definitionSlug, body, requestHeaders } = { requestHeaders: {} },
117
+ async createCustomFieldDefinition(
118
+ { body, requestHeaders } = { requestHeaders: {} },
113
119
  { responseHeaders } = { responseHeaders: false }
114
120
  ) {
115
121
  const {
116
122
  error,
117
- } = ContentPlatformValidator.createCustomObjectBySlug().validate(
123
+ } = ContentPlatformValidator.createCustomFieldDefinition().validate(
118
124
  {
119
- definitionSlug,
120
125
  body,
121
126
  },
122
127
  { abortEarly: false, allowUnknown: true }
@@ -128,9 +133,8 @@ class Content {
128
133
  // Showing warrnings if extra unknown parameters are found
129
134
  const {
130
135
  error: warrning,
131
- } = ContentPlatformValidator.createCustomObjectBySlug().validate(
136
+ } = ContentPlatformValidator.createCustomFieldDefinition().validate(
132
137
  {
133
- definitionSlug,
134
138
  body,
135
139
  },
136
140
  { abortEarly: false, allowUnknown: false }
@@ -138,7 +142,7 @@ class Content {
138
142
  if (warrning) {
139
143
  Logger({
140
144
  level: "WARN",
141
- message: `Parameter Validation warrnings for platform > Content > createCustomObjectBySlug \n ${warrning}`,
145
+ message: `Parameter Validation warrnings for platform > Content > createCustomFieldDefinition \n ${warrning}`,
142
146
  });
143
147
  }
144
148
 
@@ -149,7 +153,7 @@ class Content {
149
153
  const response = await PlatformAPIClient.execute(
150
154
  this.config,
151
155
  "post",
152
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`,
156
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`,
153
157
  query_params,
154
158
  body,
155
159
  { ...xHeaders, ...requestHeaders },
@@ -163,10 +167,10 @@ class Content {
163
167
 
164
168
  const {
165
169
  error: res_error,
166
- } = ContentPlatformModel.CustomObjectSchema().validate(responseData, {
167
- abortEarly: false,
168
- allowUnknown: true,
169
- });
170
+ } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
171
+ responseData,
172
+ { abortEarly: false, allowUnknown: true }
173
+ );
170
174
 
171
175
  if (res_error) {
172
176
  if (this.config.options.strictResponseCheck === true) {
@@ -174,7 +178,7 @@ class Content {
174
178
  } else {
175
179
  Logger({
176
180
  level: "WARN",
177
- message: `Response Validation Warnings for platform > Content > createCustomObjectBySlug \n ${res_error}`,
181
+ message: `Response Validation Warnings for platform > Content > createCustomFieldDefinition \n ${res_error}`,
178
182
  });
179
183
  }
180
184
  }
@@ -183,25 +187,19 @@ class Content {
183
187
  }
184
188
 
185
189
  /**
186
- * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} arg
187
- * - Arg object
188
- *
190
+ * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object
189
191
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
190
192
  * @param {import("../PlatformAPIClient").Options} - Options
191
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
192
- * - Success response
193
- *
194
- * @name createCustomObjectDefinition
195
- * @summary: Create custom object definition
196
- * @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/).
193
+ * @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
194
+ * @name createCustomObject
195
+ * @summary: Create custom object entries
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/).
197
197
  */
198
- async createCustomObjectDefinition(
198
+ async createCustomObject(
199
199
  { body, requestHeaders } = { requestHeaders: {} },
200
200
  { responseHeaders } = { responseHeaders: false }
201
201
  ) {
202
- const {
203
- error,
204
- } = ContentPlatformValidator.createCustomObjectDefinition().validate(
202
+ const { error } = ContentPlatformValidator.createCustomObject().validate(
205
203
  {
206
204
  body,
207
205
  },
@@ -214,7 +212,7 @@ class Content {
214
212
  // Showing warrnings if extra unknown parameters are found
215
213
  const {
216
214
  error: warrning,
217
- } = ContentPlatformValidator.createCustomObjectDefinition().validate(
215
+ } = ContentPlatformValidator.createCustomObject().validate(
218
216
  {
219
217
  body,
220
218
  },
@@ -223,7 +221,7 @@ class Content {
223
221
  if (warrning) {
224
222
  Logger({
225
223
  level: "WARN",
226
- message: `Parameter Validation warrnings for platform > Content > createCustomObjectDefinition \n ${warrning}`,
224
+ message: `Parameter Validation warrnings for platform > Content > createCustomObject \n ${warrning}`,
227
225
  });
228
226
  }
229
227
 
@@ -234,7 +232,7 @@ class Content {
234
232
  const response = await PlatformAPIClient.execute(
235
233
  this.config,
236
234
  "post",
237
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`,
235
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`,
238
236
  query_params,
239
237
  body,
240
238
  { ...xHeaders, ...requestHeaders },
@@ -248,10 +246,10 @@ class Content {
248
246
 
249
247
  const {
250
248
  error: res_error,
251
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
252
- responseData,
253
- { abortEarly: false, allowUnknown: true }
254
- );
249
+ } = ContentPlatformModel.CustomObjectSchema().validate(responseData, {
250
+ abortEarly: false,
251
+ allowUnknown: true,
252
+ });
255
253
 
256
254
  if (res_error) {
257
255
  if (this.config.options.strictResponseCheck === true) {
@@ -259,7 +257,7 @@ class Content {
259
257
  } else {
260
258
  Logger({
261
259
  level: "WARN",
262
- message: `Response Validation Warnings for platform > Content > createCustomObjectDefinition \n ${res_error}`,
260
+ message: `Response Validation Warnings for platform > Content > createCustomObject \n ${res_error}`,
263
261
  });
264
262
  }
265
263
  }
@@ -268,27 +266,26 @@ class Content {
268
266
  }
269
267
 
270
268
  /**
271
- * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam} arg
269
+ * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} arg
272
270
  * - Arg object
273
271
  *
274
272
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
275
273
  * @param {import("../PlatformAPIClient").Options} - Options
276
- * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
277
- * @name deleteCustomFieldDefinitionBySlug
278
- * @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/).
274
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
275
+ * Success response
276
+ * @name createCustomObjectDefinition
277
+ * @summary: Create custom object definition
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/).
280
279
  */
281
- async deleteCustomFieldDefinitionBySlug(
282
- { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
280
+ async createCustomObjectDefinition(
281
+ { body, requestHeaders } = { requestHeaders: {} },
283
282
  { responseHeaders } = { responseHeaders: false }
284
283
  ) {
285
284
  const {
286
285
  error,
287
- } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate(
286
+ } = ContentPlatformValidator.createCustomObjectDefinition().validate(
288
287
  {
289
- slug,
290
- resource,
291
- namespace,
288
+ body,
292
289
  },
293
290
  { abortEarly: false, allowUnknown: true }
294
291
  );
@@ -299,18 +296,16 @@ class Content {
299
296
  // Showing warrnings if extra unknown parameters are found
300
297
  const {
301
298
  error: warrning,
302
- } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate(
299
+ } = ContentPlatformValidator.createCustomObjectDefinition().validate(
303
300
  {
304
- slug,
305
- resource,
306
- namespace,
301
+ body,
307
302
  },
308
303
  { abortEarly: false, allowUnknown: false }
309
304
  );
310
305
  if (warrning) {
311
306
  Logger({
312
307
  level: "WARN",
313
- message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${warrning}`,
308
+ message: `Parameter Validation warrnings for platform > Content > createCustomObjectDefinition \n ${warrning}`,
314
309
  });
315
310
  }
316
311
 
@@ -320,10 +315,10 @@ class Content {
320
315
 
321
316
  const response = await PlatformAPIClient.execute(
322
317
  this.config,
323
- "delete",
324
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
318
+ "post",
319
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`,
325
320
  query_params,
326
- undefined,
321
+ body,
327
322
  { ...xHeaders, ...requestHeaders },
328
323
  { responseHeaders }
329
324
  );
@@ -335,10 +330,10 @@ class Content {
335
330
 
336
331
  const {
337
332
  error: res_error,
338
- } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, {
339
- abortEarly: false,
340
- allowUnknown: true,
341
- });
333
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
334
+ responseData,
335
+ { abortEarly: false, allowUnknown: true }
336
+ );
342
337
 
343
338
  if (res_error) {
344
339
  if (this.config.options.strictResponseCheck === true) {
@@ -346,7 +341,7 @@ class Content {
346
341
  } else {
347
342
  Logger({
348
343
  level: "WARN",
349
- message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${res_error}`,
344
+ message: `Response Validation Warnings for platform > Content > createCustomObjectDefinition \n ${res_error}`,
350
345
  });
351
346
  }
352
347
  }
@@ -355,28 +350,23 @@ class Content {
355
350
  }
356
351
 
357
352
  /**
358
- * @param {ContentPlatformValidator.DeleteCustomFieldsByResourceSlugParam} arg
359
- * - Arg object
360
- *
353
+ * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object
361
354
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
362
355
  * @param {import("../PlatformAPIClient").Options} - Options
363
- * @returns {Promise<ContentPlatformModel.CustomFieldsDeleteSchema>} -
364
- * 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/).
356
+ * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
357
+ * @name deleteCustomFieldDefinition
358
+ * @summary: Delete custom fields definition
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/).
368
360
  */
369
- async deleteCustomFieldsByResourceSlug(
370
- { resource, resourceSlug, ids, requestHeaders } = { requestHeaders: {} },
361
+ async deleteCustomFieldDefinition(
362
+ { definitionId, requestHeaders } = { requestHeaders: {} },
371
363
  { responseHeaders } = { responseHeaders: false }
372
364
  ) {
373
365
  const {
374
366
  error,
375
- } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate(
367
+ } = ContentPlatformValidator.deleteCustomFieldDefinition().validate(
376
368
  {
377
- resource,
378
- resourceSlug,
379
- ids,
369
+ definitionId,
380
370
  },
381
371
  { abortEarly: false, allowUnknown: true }
382
372
  );
@@ -387,30 +377,27 @@ class Content {
387
377
  // Showing warrnings if extra unknown parameters are found
388
378
  const {
389
379
  error: warrning,
390
- } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate(
380
+ } = ContentPlatformValidator.deleteCustomFieldDefinition().validate(
391
381
  {
392
- resource,
393
- resourceSlug,
394
- ids,
382
+ definitionId,
395
383
  },
396
384
  { abortEarly: false, allowUnknown: false }
397
385
  );
398
386
  if (warrning) {
399
387
  Logger({
400
388
  level: "WARN",
401
- message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${warrning}`,
389
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinition \n ${warrning}`,
402
390
  });
403
391
  }
404
392
 
405
393
  const query_params = {};
406
- query_params["ids"] = ids;
407
394
 
408
395
  const xHeaders = {};
409
396
 
410
397
  const response = await PlatformAPIClient.execute(
411
398
  this.config,
412
399
  "delete",
413
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
400
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`,
414
401
  query_params,
415
402
  undefined,
416
403
  { ...xHeaders, ...requestHeaders },
@@ -424,7 +411,7 @@ class Content {
424
411
 
425
412
  const {
426
413
  error: res_error,
427
- } = ContentPlatformModel.CustomFieldsDeleteSchema().validate(responseData, {
414
+ } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, {
428
415
  abortEarly: false,
429
416
  allowUnknown: true,
430
417
  });
@@ -435,7 +422,7 @@ class Content {
435
422
  } else {
436
423
  Logger({
437
424
  level: "WARN",
438
- message: `Response Validation Warnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${res_error}`,
425
+ message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinition \n ${res_error}`,
439
426
  });
440
427
  }
441
428
  }
@@ -444,24 +431,21 @@ class Content {
444
431
  }
445
432
 
446
433
  /**
447
- * @param {ContentPlatformValidator.DeleteCustomObjectBySlugParam} arg - Arg object
434
+ * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object
448
435
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
449
436
  * @param {import("../PlatformAPIClient").Options} - Options
450
437
  * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
451
- * @name deleteCustomObjectBySlug
438
+ * @name deleteCustomObject
452
439
  * @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/).
440
+ * @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
441
  */
455
- async deleteCustomObjectBySlug(
456
- { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
442
+ async deleteCustomObject(
443
+ { metaobjectId, requestHeaders } = { requestHeaders: {} },
457
444
  { responseHeaders } = { responseHeaders: false }
458
445
  ) {
459
- const {
460
- error,
461
- } = ContentPlatformValidator.deleteCustomObjectBySlug().validate(
446
+ const { error } = ContentPlatformValidator.deleteCustomObject().validate(
462
447
  {
463
- definitionSlug,
464
- slug,
448
+ metaobjectId,
465
449
  },
466
450
  { abortEarly: false, allowUnknown: true }
467
451
  );
@@ -472,17 +456,16 @@ class Content {
472
456
  // Showing warrnings if extra unknown parameters are found
473
457
  const {
474
458
  error: warrning,
475
- } = ContentPlatformValidator.deleteCustomObjectBySlug().validate(
459
+ } = ContentPlatformValidator.deleteCustomObject().validate(
476
460
  {
477
- definitionSlug,
478
- slug,
461
+ metaobjectId,
479
462
  },
480
463
  { abortEarly: false, allowUnknown: false }
481
464
  );
482
465
  if (warrning) {
483
466
  Logger({
484
467
  level: "WARN",
485
- message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectBySlug \n ${warrning}`,
468
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomObject \n ${warrning}`,
486
469
  });
487
470
  }
488
471
 
@@ -493,7 +476,7 @@ class Content {
493
476
  const response = await PlatformAPIClient.execute(
494
477
  this.config,
495
478
  "delete",
496
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
479
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`,
497
480
  query_params,
498
481
  undefined,
499
482
  { ...xHeaders, ...requestHeaders },
@@ -518,7 +501,7 @@ class Content {
518
501
  } else {
519
502
  Logger({
520
503
  level: "WARN",
521
- message: `Response Validation Warnings for platform > Content > deleteCustomObjectBySlug \n ${res_error}`,
504
+ message: `Response Validation Warnings for platform > Content > deleteCustomObject \n ${res_error}`,
522
505
  });
523
506
  }
524
507
  }
@@ -527,7 +510,7 @@ class Content {
527
510
  }
528
511
 
529
512
  /**
530
- * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionBySlugParam} arg
513
+ * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg
531
514
  * - Arg object
532
515
  *
533
516
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -535,19 +518,19 @@ class Content {
535
518
  * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema>}
536
519
  * - Success response
537
520
  *
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/).
521
+ * @name deleteCustomObjectDefinition
522
+ * @summary: delete custom object definition
523
+ * @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
524
  */
542
- async deleteCustomObjectDefinitionBySlug(
543
- { slug, requestHeaders } = { requestHeaders: {} },
525
+ async deleteCustomObjectDefinition(
526
+ { definitionId, requestHeaders } = { requestHeaders: {} },
544
527
  { responseHeaders } = { responseHeaders: false }
545
528
  ) {
546
529
  const {
547
530
  error,
548
- } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate(
531
+ } = ContentPlatformValidator.deleteCustomObjectDefinition().validate(
549
532
  {
550
- slug,
533
+ definitionId,
551
534
  },
552
535
  { abortEarly: false, allowUnknown: true }
553
536
  );
@@ -558,16 +541,16 @@ class Content {
558
541
  // Showing warrnings if extra unknown parameters are found
559
542
  const {
560
543
  error: warrning,
561
- } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate(
544
+ } = ContentPlatformValidator.deleteCustomObjectDefinition().validate(
562
545
  {
563
- slug,
546
+ definitionId,
564
547
  },
565
548
  { abortEarly: false, allowUnknown: false }
566
549
  );
567
550
  if (warrning) {
568
551
  Logger({
569
552
  level: "WARN",
570
- message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${warrning}`,
553
+ message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinition \n ${warrning}`,
571
554
  });
572
555
  }
573
556
 
@@ -578,7 +561,7 @@ class Content {
578
561
  const response = await PlatformAPIClient.execute(
579
562
  this.config,
580
563
  "delete",
581
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
564
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`,
582
565
  query_params,
583
566
  undefined,
584
567
  { ...xHeaders, ...requestHeaders },
@@ -603,7 +586,7 @@ class Content {
603
586
  } else {
604
587
  Logger({
605
588
  level: "WARN",
606
- message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${res_error}`,
589
+ message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinition \n ${res_error}`,
607
590
  });
608
591
  }
609
592
  }
@@ -612,27 +595,25 @@ class Content {
612
595
  }
613
596
 
614
597
  /**
615
- * @param {ContentPlatformValidator.ExportCustomObjectEntriesBySlugParam} arg
616
- * - Arg object
617
- *
598
+ * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object
618
599
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
619
600
  * @param {import("../PlatformAPIClient").Options} - Options
620
601
  * @returns {Promise<ContentPlatformModel.CustomObjectBulkEntryInitiateDownload>}
621
602
  * - Success response
622
603
  *
623
- * @name exportCustomObjectEntriesBySlug
604
+ * @name exportCustomObjectEntries
624
605
  * @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/).
606
+ * @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
607
  */
627
- async exportCustomObjectEntriesBySlug(
628
- { slug, requestHeaders } = { requestHeaders: {} },
608
+ async exportCustomObjectEntries(
609
+ { definitionId, requestHeaders } = { requestHeaders: {} },
629
610
  { responseHeaders } = { responseHeaders: false }
630
611
  ) {
631
612
  const {
632
613
  error,
633
- } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate(
614
+ } = ContentPlatformValidator.exportCustomObjectEntries().validate(
634
615
  {
635
- slug,
616
+ definitionId,
636
617
  },
637
618
  { abortEarly: false, allowUnknown: true }
638
619
  );
@@ -643,16 +624,16 @@ class Content {
643
624
  // Showing warrnings if extra unknown parameters are found
644
625
  const {
645
626
  error: warrning,
646
- } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate(
627
+ } = ContentPlatformValidator.exportCustomObjectEntries().validate(
647
628
  {
648
- slug,
629
+ definitionId,
649
630
  },
650
631
  { abortEarly: false, allowUnknown: false }
651
632
  );
652
633
  if (warrning) {
653
634
  Logger({
654
635
  level: "WARN",
655
- message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntriesBySlug \n ${warrning}`,
636
+ message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntries \n ${warrning}`,
656
637
  });
657
638
  }
658
639
 
@@ -663,7 +644,7 @@ class Content {
663
644
  const response = await PlatformAPIClient.execute(
664
645
  this.config,
665
646
  "get",
666
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/download`,
647
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/download`,
667
648
  query_params,
668
649
  undefined,
669
650
  { ...xHeaders, ...requestHeaders },
@@ -688,7 +669,7 @@ class Content {
688
669
  } else {
689
670
  Logger({
690
671
  level: "WARN",
691
- message: `Response Validation Warnings for platform > Content > exportCustomObjectEntriesBySlug \n ${res_error}`,
672
+ message: `Response Validation Warnings for platform > Content > exportCustomObjectEntries \n ${res_error}`,
692
673
  });
693
674
  }
694
675
  }
@@ -697,41 +678,25 @@ class Content {
697
678
  }
698
679
 
699
680
  /**
700
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionByResourceParam} arg
701
- * - Arg object
702
- *
681
+ * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object
703
682
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
704
683
  * @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/).
684
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
685
+ * - Success response
686
+ *
687
+ * @name getCustomFieldDefinition
688
+ * @summary: Get custom fields definition
689
+ * @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
690
  */
711
- async getCustomFieldDefinitionByResource(
712
- {
713
- pageNo,
714
- pageSize,
715
- resource,
716
- types,
717
- search,
718
- slugs,
719
- namespaces,
720
- requestHeaders,
721
- } = { requestHeaders: {} },
691
+ async getCustomFieldDefinition(
692
+ { definitionId, requestHeaders } = { requestHeaders: {} },
722
693
  { responseHeaders } = { responseHeaders: false }
723
694
  ) {
724
695
  const {
725
696
  error,
726
- } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate(
697
+ } = ContentPlatformValidator.getCustomFieldDefinition().validate(
727
698
  {
728
- pageNo,
729
- pageSize,
730
- resource,
731
- types,
732
- search,
733
- slugs,
734
- namespaces,
699
+ definitionId,
735
700
  },
736
701
  { abortEarly: false, allowUnknown: true }
737
702
  );
@@ -742,39 +707,27 @@ class Content {
742
707
  // Showing warrnings if extra unknown parameters are found
743
708
  const {
744
709
  error: warrning,
745
- } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate(
710
+ } = ContentPlatformValidator.getCustomFieldDefinition().validate(
746
711
  {
747
- pageNo,
748
- pageSize,
749
- resource,
750
- types,
751
- search,
752
- slugs,
753
- namespaces,
712
+ definitionId,
754
713
  },
755
714
  { abortEarly: false, allowUnknown: false }
756
715
  );
757
716
  if (warrning) {
758
717
  Logger({
759
718
  level: "WARN",
760
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionByResource \n ${warrning}`,
719
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinition \n ${warrning}`,
761
720
  });
762
721
  }
763
722
 
764
723
  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
724
 
772
725
  const xHeaders = {};
773
726
 
774
727
  const response = await PlatformAPIClient.execute(
775
728
  this.config,
776
729
  "get",
777
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`,
730
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`,
778
731
  query_params,
779
732
  undefined,
780
733
  { ...xHeaders, ...requestHeaders },
@@ -788,7 +741,7 @@ class Content {
788
741
 
789
742
  const {
790
743
  error: res_error,
791
- } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
744
+ } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
792
745
  responseData,
793
746
  { abortEarly: false, allowUnknown: true }
794
747
  );
@@ -799,7 +752,7 @@ class Content {
799
752
  } else {
800
753
  Logger({
801
754
  level: "WARN",
802
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionByResource \n ${res_error}`,
755
+ message: `Response Validation Warnings for platform > Content > getCustomFieldDefinition \n ${res_error}`,
803
756
  });
804
757
  }
805
758
  }
@@ -808,29 +761,30 @@ class Content {
808
761
  }
809
762
 
810
763
  /**
811
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionBySlugParam} arg
812
- * - Arg object
813
- *
764
+ * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object
814
765
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
815
766
  * @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/).
767
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
768
+ * Success response
769
+ * @name getCustomFieldDefinitions
770
+ * @summary: Get custom fields definitions
771
+ * @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
772
  */
823
- async getCustomFieldDefinitionBySlug(
824
- { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
773
+ async getCustomFieldDefinitions(
774
+ { pageNo, pageSize, resource, type, search, requestHeaders } = {
775
+ requestHeaders: {},
776
+ },
825
777
  { responseHeaders } = { responseHeaders: false }
826
778
  ) {
827
779
  const {
828
780
  error,
829
- } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate(
781
+ } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
830
782
  {
831
- slug,
783
+ pageNo,
784
+ pageSize,
832
785
  resource,
833
- namespace,
786
+ type,
787
+ search,
834
788
  },
835
789
  { abortEarly: false, allowUnknown: true }
836
790
  );
@@ -841,29 +795,36 @@ class Content {
841
795
  // Showing warrnings if extra unknown parameters are found
842
796
  const {
843
797
  error: warrning,
844
- } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate(
798
+ } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
845
799
  {
846
- slug,
800
+ pageNo,
801
+ pageSize,
847
802
  resource,
848
- namespace,
803
+ type,
804
+ search,
849
805
  },
850
806
  { abortEarly: false, allowUnknown: false }
851
807
  );
852
808
  if (warrning) {
853
809
  Logger({
854
810
  level: "WARN",
855
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionBySlug \n ${warrning}`,
811
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`,
856
812
  });
857
813
  }
858
814
 
859
815
  const query_params = {};
816
+ query_params["page_no"] = pageNo;
817
+ query_params["page_size"] = pageSize;
818
+ query_params["resource"] = resource;
819
+ query_params["type"] = type;
820
+ query_params["search"] = search;
860
821
 
861
822
  const xHeaders = {};
862
823
 
863
824
  const response = await PlatformAPIClient.execute(
864
825
  this.config,
865
826
  "get",
866
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
827
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`,
867
828
  query_params,
868
829
  undefined,
869
830
  { ...xHeaders, ...requestHeaders },
@@ -877,7 +838,7 @@ class Content {
877
838
 
878
839
  const {
879
840
  error: res_error,
880
- } = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate(
841
+ } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
881
842
  responseData,
882
843
  { abortEarly: false, allowUnknown: true }
883
844
  );
@@ -888,7 +849,7 @@ class Content {
888
849
  } else {
889
850
  Logger({
890
851
  level: "WARN",
891
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionBySlug \n ${res_error}`,
852
+ message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`,
892
853
  });
893
854
  }
894
855
  }
@@ -897,40 +858,20 @@ class Content {
897
858
  }
898
859
 
899
860
  /**
900
- * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object
861
+ * @param {ContentPlatformValidator.GetCustomFieldTypesParam} arg - Arg object
901
862
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
902
863
  * @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/).
864
+ * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
865
+ * @name getCustomFieldTypes
866
+ * @summary: Get custom field types
867
+ * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/).
908
868
  */
909
- async getCustomFieldDefinitions(
910
- {
911
- pageNo,
912
- pageSize,
913
- resources,
914
- types,
915
- search,
916
- slugs,
917
- namespaces,
918
- requestHeaders,
919
- } = { requestHeaders: {} },
869
+ async getCustomFieldTypes(
870
+ { requestHeaders } = { requestHeaders: {} },
920
871
  { responseHeaders } = { responseHeaders: false }
921
872
  ) {
922
- const {
923
- error,
924
- } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
925
- {
926
- pageNo,
927
- pageSize,
928
- resources,
929
- types,
930
- search,
931
- slugs,
932
- namespaces,
933
- },
873
+ const { error } = ContentPlatformValidator.getCustomFieldTypes().validate(
874
+ {},
934
875
  { abortEarly: false, allowUnknown: true }
935
876
  );
936
877
  if (error) {
@@ -940,40 +881,25 @@ class Content {
940
881
  // Showing warrnings if extra unknown parameters are found
941
882
  const {
942
883
  error: warrning,
943
- } = ContentPlatformValidator.getCustomFieldDefinitions().validate(
944
- {
945
- pageNo,
946
- pageSize,
947
- resources,
948
- types,
949
- search,
950
- slugs,
951
- namespaces,
952
- },
884
+ } = ContentPlatformValidator.getCustomFieldTypes().validate(
885
+ {},
953
886
  { abortEarly: false, allowUnknown: false }
954
887
  );
955
888
  if (warrning) {
956
889
  Logger({
957
890
  level: "WARN",
958
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`,
891
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldTypes \n ${warrning}`,
959
892
  });
960
893
  }
961
894
 
962
895
  const query_params = {};
963
- query_params["page_no"] = pageNo;
964
- 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;
970
896
 
971
897
  const xHeaders = {};
972
898
 
973
899
  const response = await PlatformAPIClient.execute(
974
900
  this.config,
975
901
  "get",
976
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/definition`,
902
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/types`,
977
903
  query_params,
978
904
  undefined,
979
905
  { ...xHeaders, ...requestHeaders },
@@ -987,10 +913,10 @@ class Content {
987
913
 
988
914
  const {
989
915
  error: res_error,
990
- } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
991
- responseData,
992
- { abortEarly: false, allowUnknown: true }
993
- );
916
+ } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
917
+ abortEarly: false,
918
+ allowUnknown: true,
919
+ });
994
920
 
995
921
  if (res_error) {
996
922
  if (this.config.options.strictResponseCheck === true) {
@@ -998,7 +924,7 @@ class Content {
998
924
  } else {
999
925
  Logger({
1000
926
  level: "WARN",
1001
- message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`,
927
+ message: `Response Validation Warnings for platform > Content > getCustomFieldTypes \n ${res_error}`,
1002
928
  });
1003
929
  }
1004
930
  }
@@ -1007,20 +933,23 @@ class Content {
1007
933
  }
1008
934
 
1009
935
  /**
1010
- * @param {ContentPlatformValidator.GetCustomFieldTypesParam} arg - Arg object
936
+ * @param {ContentPlatformValidator.GetCustomFieldsParam} arg - Arg object
1011
937
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1012
938
  * @param {import("../PlatformAPIClient").Options} - Options
1013
- * @returns {Promise<ContentPlatformModel.MetafieldTypesSchema>} - Success response
1014
- * @name getCustomFieldTypes
1015
- * @summary: Get custom field types
1016
- * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/).
939
+ * @returns {Promise<ContentPlatformModel.CustomFieldsResponseSchema>} -
940
+ * Success response
941
+ * @name getCustomFields
942
+ * @summary: Get list of custom fields of given resource
943
+ * @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/).
1017
944
  */
1018
- async getCustomFieldTypes(
1019
- { requestHeaders } = { requestHeaders: {} },
945
+ async getCustomFields(
946
+ { resource, requestHeaders } = { requestHeaders: {} },
1020
947
  { responseHeaders } = { responseHeaders: false }
1021
948
  ) {
1022
- const { error } = ContentPlatformValidator.getCustomFieldTypes().validate(
1023
- {},
949
+ const { error } = ContentPlatformValidator.getCustomFields().validate(
950
+ {
951
+ resource,
952
+ },
1024
953
  { abortEarly: false, allowUnknown: true }
1025
954
  );
1026
955
  if (error) {
@@ -1030,14 +959,16 @@ class Content {
1030
959
  // Showing warrnings if extra unknown parameters are found
1031
960
  const {
1032
961
  error: warrning,
1033
- } = ContentPlatformValidator.getCustomFieldTypes().validate(
1034
- {},
962
+ } = ContentPlatformValidator.getCustomFields().validate(
963
+ {
964
+ resource,
965
+ },
1035
966
  { abortEarly: false, allowUnknown: false }
1036
967
  );
1037
968
  if (warrning) {
1038
969
  Logger({
1039
970
  level: "WARN",
1040
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldTypes \n ${warrning}`,
971
+ message: `Parameter Validation warrnings for platform > Content > getCustomFields \n ${warrning}`,
1041
972
  });
1042
973
  }
1043
974
 
@@ -1048,7 +979,7 @@ class Content {
1048
979
  const response = await PlatformAPIClient.execute(
1049
980
  this.config,
1050
981
  "get",
1051
- `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/types`,
982
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}`,
1052
983
  query_params,
1053
984
  undefined,
1054
985
  { ...xHeaders, ...requestHeaders },
@@ -1062,10 +993,10 @@ class Content {
1062
993
 
1063
994
  const {
1064
995
  error: res_error,
1065
- } = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, {
1066
- abortEarly: false,
1067
- allowUnknown: true,
1068
- });
996
+ } = ContentPlatformModel.CustomFieldsResponseSchema().validate(
997
+ responseData,
998
+ { abortEarly: false, allowUnknown: true }
999
+ );
1069
1000
 
1070
1001
  if (res_error) {
1071
1002
  if (this.config.options.strictResponseCheck === true) {
@@ -1073,7 +1004,7 @@ class Content {
1073
1004
  } else {
1074
1005
  Logger({
1075
1006
  level: "WARN",
1076
- message: `Response Validation Warnings for platform > Content > getCustomFieldTypes \n ${res_error}`,
1007
+ message: `Response Validation Warnings for platform > Content > getCustomFields \n ${res_error}`,
1077
1008
  });
1078
1009
  }
1079
1010
  }
@@ -1082,28 +1013,26 @@ class Content {
1082
1013
  }
1083
1014
 
1084
1015
  /**
1085
- * @param {ContentPlatformValidator.GetCustomFieldsByResourceSlugParam} arg
1086
- * - Arg object
1087
- *
1016
+ * @param {ContentPlatformValidator.GetCustomFieldsByResourceIdParam} arg - Arg object
1088
1017
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1089
1018
  * @param {import("../PlatformAPIClient").Options} - Options
1090
1019
  * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
1091
1020
  * - Success response
1092
1021
  *
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/).
1022
+ * @name getCustomFieldsByResourceId
1023
+ * @summary: Get list of custom fields of given resource and resource id
1024
+ * @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
1025
  */
1097
- async getCustomFieldsByResourceSlug(
1098
- { resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
1026
+ async getCustomFieldsByResourceId(
1027
+ { resource, resourceId, requestHeaders } = { requestHeaders: {} },
1099
1028
  { responseHeaders } = { responseHeaders: false }
1100
1029
  ) {
1101
1030
  const {
1102
1031
  error,
1103
- } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate(
1032
+ } = ContentPlatformValidator.getCustomFieldsByResourceId().validate(
1104
1033
  {
1105
1034
  resource,
1106
- resourceSlug,
1035
+ resourceId,
1107
1036
  },
1108
1037
  { abortEarly: false, allowUnknown: true }
1109
1038
  );
@@ -1114,17 +1043,17 @@ class Content {
1114
1043
  // Showing warrnings if extra unknown parameters are found
1115
1044
  const {
1116
1045
  error: warrning,
1117
- } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate(
1046
+ } = ContentPlatformValidator.getCustomFieldsByResourceId().validate(
1118
1047
  {
1119
1048
  resource,
1120
- resourceSlug,
1049
+ resourceId,
1121
1050
  },
1122
1051
  { abortEarly: false, allowUnknown: false }
1123
1052
  );
1124
1053
  if (warrning) {
1125
1054
  Logger({
1126
1055
  level: "WARN",
1127
- message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceSlug \n ${warrning}`,
1056
+ message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceId \n ${warrning}`,
1128
1057
  });
1129
1058
  }
1130
1059
 
@@ -1135,7 +1064,7 @@ class Content {
1135
1064
  const response = await PlatformAPIClient.execute(
1136
1065
  this.config,
1137
1066
  "get",
1138
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
1067
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`,
1139
1068
  query_params,
1140
1069
  undefined,
1141
1070
  { ...xHeaders, ...requestHeaders },
@@ -1160,7 +1089,7 @@ class Content {
1160
1089
  } else {
1161
1090
  Logger({
1162
1091
  level: "WARN",
1163
- message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceSlug \n ${res_error}`,
1092
+ message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceId \n ${res_error}`,
1164
1093
  });
1165
1094
  }
1166
1095
  }
@@ -1169,23 +1098,21 @@ class Content {
1169
1098
  }
1170
1099
 
1171
1100
  /**
1172
- * @param {ContentPlatformValidator.GetCustomObjectBySlugParam} arg - Arg object
1101
+ * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object
1173
1102
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1174
1103
  * @param {import("../PlatformAPIClient").Options} - Options
1175
- * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
1176
- * Success response
1177
- * @name getCustomObjectBySlug
1104
+ * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
1105
+ * @name getCustomObject
1178
1106
  * @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/).
1107
+ * @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
1108
  */
1181
- async getCustomObjectBySlug(
1182
- { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
1109
+ async getCustomObject(
1110
+ { metaobjectId, requestHeaders } = { requestHeaders: {} },
1183
1111
  { responseHeaders } = { responseHeaders: false }
1184
1112
  ) {
1185
- const { error } = ContentPlatformValidator.getCustomObjectBySlug().validate(
1113
+ const { error } = ContentPlatformValidator.getCustomObject().validate(
1186
1114
  {
1187
- definitionSlug,
1188
- slug,
1115
+ metaobjectId,
1189
1116
  },
1190
1117
  { abortEarly: false, allowUnknown: true }
1191
1118
  );
@@ -1196,17 +1123,16 @@ class Content {
1196
1123
  // Showing warrnings if extra unknown parameters are found
1197
1124
  const {
1198
1125
  error: warrning,
1199
- } = ContentPlatformValidator.getCustomObjectBySlug().validate(
1126
+ } = ContentPlatformValidator.getCustomObject().validate(
1200
1127
  {
1201
- definitionSlug,
1202
- slug,
1128
+ metaobjectId,
1203
1129
  },
1204
1130
  { abortEarly: false, allowUnknown: false }
1205
1131
  );
1206
1132
  if (warrning) {
1207
1133
  Logger({
1208
1134
  level: "WARN",
1209
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectBySlug \n ${warrning}`,
1135
+ message: `Parameter Validation warrnings for platform > Content > getCustomObject \n ${warrning}`,
1210
1136
  });
1211
1137
  }
1212
1138
 
@@ -1217,7 +1143,7 @@ class Content {
1217
1143
  const response = await PlatformAPIClient.execute(
1218
1144
  this.config,
1219
1145
  "get",
1220
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
1146
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`,
1221
1147
  query_params,
1222
1148
  undefined,
1223
1149
  { ...xHeaders, ...requestHeaders },
@@ -1231,7 +1157,7 @@ class Content {
1231
1157
 
1232
1158
  const {
1233
1159
  error: res_error,
1234
- } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
1160
+ } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
1235
1161
  abortEarly: false,
1236
1162
  allowUnknown: true,
1237
1163
  });
@@ -1242,7 +1168,7 @@ class Content {
1242
1168
  } else {
1243
1169
  Logger({
1244
1170
  level: "WARN",
1245
- message: `Response Validation Warnings for platform > Content > getCustomObjectBySlug \n ${res_error}`,
1171
+ message: `Response Validation Warnings for platform > Content > getCustomObject \n ${res_error}`,
1246
1172
  });
1247
1173
  }
1248
1174
  }
@@ -1251,27 +1177,24 @@ class Content {
1251
1177
  }
1252
1178
 
1253
1179
  /**
1254
- * @param {ContentPlatformValidator.GetCustomObjectDefinitionBySlugParam} arg
1255
- * - Arg object
1256
- *
1180
+ * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object
1257
1181
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1258
1182
  * @param {import("../PlatformAPIClient").Options} - Options
1259
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
1260
- * - Success response
1261
- *
1262
- * @name getCustomObjectDefinitionBySlug
1183
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
1184
+ * Success response
1185
+ * @name getCustomObjectDefinition
1263
1186
  * @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/).
1187
+ * @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
1188
  */
1266
- async getCustomObjectDefinitionBySlug(
1267
- { slug, requestHeaders } = { requestHeaders: {} },
1189
+ async getCustomObjectDefinition(
1190
+ { definitionId, requestHeaders } = { requestHeaders: {} },
1268
1191
  { responseHeaders } = { responseHeaders: false }
1269
1192
  ) {
1270
1193
  const {
1271
1194
  error,
1272
- } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate(
1195
+ } = ContentPlatformValidator.getCustomObjectDefinition().validate(
1273
1196
  {
1274
- slug,
1197
+ definitionId,
1275
1198
  },
1276
1199
  { abortEarly: false, allowUnknown: true }
1277
1200
  );
@@ -1282,16 +1205,16 @@ class Content {
1282
1205
  // Showing warrnings if extra unknown parameters are found
1283
1206
  const {
1284
1207
  error: warrning,
1285
- } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate(
1208
+ } = ContentPlatformValidator.getCustomObjectDefinition().validate(
1286
1209
  {
1287
- slug,
1210
+ definitionId,
1288
1211
  },
1289
1212
  { abortEarly: false, allowUnknown: false }
1290
1213
  );
1291
1214
  if (warrning) {
1292
1215
  Logger({
1293
1216
  level: "WARN",
1294
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinitionBySlug \n ${warrning}`,
1217
+ message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinition \n ${warrning}`,
1295
1218
  });
1296
1219
  }
1297
1220
 
@@ -1302,7 +1225,7 @@ class Content {
1302
1225
  const response = await PlatformAPIClient.execute(
1303
1226
  this.config,
1304
1227
  "get",
1305
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
1228
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`,
1306
1229
  query_params,
1307
1230
  undefined,
1308
1231
  { ...xHeaders, ...requestHeaders },
@@ -1316,7 +1239,7 @@ class Content {
1316
1239
 
1317
1240
  const {
1318
1241
  error: res_error,
1319
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
1242
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
1320
1243
  responseData,
1321
1244
  { abortEarly: false, allowUnknown: true }
1322
1245
  );
@@ -1327,7 +1250,7 @@ class Content {
1327
1250
  } else {
1328
1251
  Logger({
1329
1252
  level: "WARN",
1330
- message: `Response Validation Warnings for platform > Content > getCustomObjectDefinitionBySlug \n ${res_error}`,
1253
+ message: `Response Validation Warnings for platform > Content > getCustomObjectDefinition \n ${res_error}`,
1331
1254
  });
1332
1255
  }
1333
1256
  }
@@ -1391,7 +1314,7 @@ class Content {
1391
1314
  const response = await PlatformAPIClient.execute(
1392
1315
  this.config,
1393
1316
  "get",
1394
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`,
1317
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`,
1395
1318
  query_params,
1396
1319
  undefined,
1397
1320
  { ...xHeaders, ...requestHeaders },
@@ -1425,27 +1348,23 @@ class Content {
1425
1348
  }
1426
1349
 
1427
1350
  /**
1428
- * @param {ContentPlatformValidator.GetCustomObjectsBySlugParam} arg - Arg object
1351
+ * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object
1429
1352
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1430
1353
  * @param {import("../PlatformAPIClient").Options} - Options
1431
1354
  * @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/).
1355
+ * @name getCustomObjects
1356
+ * @summary: Get list of custom objects
1357
+ * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/).
1435
1358
  */
1436
- async getCustomObjectsBySlug(
1437
- { pageNo, pageSize, definitionSlug, requestHeaders } = {
1438
- requestHeaders: {},
1439
- },
1359
+ async getCustomObjects(
1360
+ { pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} },
1440
1361
  { responseHeaders } = { responseHeaders: false }
1441
1362
  ) {
1442
- const {
1443
- error,
1444
- } = ContentPlatformValidator.getCustomObjectsBySlug().validate(
1363
+ const { error } = ContentPlatformValidator.getCustomObjects().validate(
1445
1364
  {
1446
1365
  pageNo,
1447
1366
  pageSize,
1448
- definitionSlug,
1367
+ definitionId,
1449
1368
  },
1450
1369
  { abortEarly: false, allowUnknown: true }
1451
1370
  );
@@ -1456,22 +1375,23 @@ class Content {
1456
1375
  // Showing warrnings if extra unknown parameters are found
1457
1376
  const {
1458
1377
  error: warrning,
1459
- } = ContentPlatformValidator.getCustomObjectsBySlug().validate(
1378
+ } = ContentPlatformValidator.getCustomObjects().validate(
1460
1379
  {
1461
1380
  pageNo,
1462
1381
  pageSize,
1463
- definitionSlug,
1382
+ definitionId,
1464
1383
  },
1465
1384
  { abortEarly: false, allowUnknown: false }
1466
1385
  );
1467
1386
  if (warrning) {
1468
1387
  Logger({
1469
1388
  level: "WARN",
1470
- message: `Parameter Validation warrnings for platform > Content > getCustomObjectsBySlug \n ${warrning}`,
1389
+ message: `Parameter Validation warrnings for platform > Content > getCustomObjects \n ${warrning}`,
1471
1390
  });
1472
1391
  }
1473
1392
 
1474
1393
  const query_params = {};
1394
+ query_params["definition_id"] = definitionId;
1475
1395
  query_params["page_no"] = pageNo;
1476
1396
  query_params["page_size"] = pageSize;
1477
1397
 
@@ -1480,7 +1400,7 @@ class Content {
1480
1400
  const response = await PlatformAPIClient.execute(
1481
1401
  this.config,
1482
1402
  "get",
1483
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`,
1403
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`,
1484
1404
  query_params,
1485
1405
  undefined,
1486
1406
  { ...xHeaders, ...requestHeaders },
@@ -1505,7 +1425,7 @@ class Content {
1505
1425
  } else {
1506
1426
  Logger({
1507
1427
  level: "WARN",
1508
- message: `Response Validation Warnings for platform > Content > getCustomObjectsBySlug \n ${res_error}`,
1428
+ message: `Response Validation Warnings for platform > Content > getCustomObjects \n ${res_error}`,
1509
1429
  });
1510
1430
  }
1511
1431
  }
@@ -1604,7 +1524,7 @@ class Content {
1604
1524
  * @returns {Promise<ContentPlatformModel.ResourcesSchema>} - Success response
1605
1525
  * @name getResources
1606
1526
  * @summary: Get resources
1607
- * @description: Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/).
1527
+ * @description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/).
1608
1528
  */
1609
1529
  async getResources(
1610
1530
  { requestHeaders } = { requestHeaders: {} },
@@ -1673,27 +1593,25 @@ class Content {
1673
1593
  }
1674
1594
 
1675
1595
  /**
1676
- * @param {ContentPlatformValidator.ImportCustomObjectEntriesBySlugParam} arg
1677
- * - Arg object
1678
- *
1596
+ * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object
1679
1597
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1680
1598
  * @param {import("../PlatformAPIClient").Options} - Options
1681
- * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadDetails>}
1599
+ * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadResponse>}
1682
1600
  * - Success response
1683
1601
  *
1684
- * @name importCustomObjectEntriesBySlug
1602
+ * @name importCustomObjectEntries
1685
1603
  * @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/).
1604
+ * @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
1605
  */
1688
- async importCustomObjectEntriesBySlug(
1689
- { slug, body, requestHeaders } = { requestHeaders: {} },
1606
+ async importCustomObjectEntries(
1607
+ { definitionId, body, requestHeaders } = { requestHeaders: {} },
1690
1608
  { responseHeaders } = { responseHeaders: false }
1691
1609
  ) {
1692
1610
  const {
1693
1611
  error,
1694
- } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate(
1612
+ } = ContentPlatformValidator.importCustomObjectEntries().validate(
1695
1613
  {
1696
- slug,
1614
+ definitionId,
1697
1615
  body,
1698
1616
  },
1699
1617
  { abortEarly: false, allowUnknown: true }
@@ -1705,9 +1623,9 @@ class Content {
1705
1623
  // Showing warrnings if extra unknown parameters are found
1706
1624
  const {
1707
1625
  error: warrning,
1708
- } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate(
1626
+ } = ContentPlatformValidator.importCustomObjectEntries().validate(
1709
1627
  {
1710
- slug,
1628
+ definitionId,
1711
1629
  body,
1712
1630
  },
1713
1631
  { abortEarly: false, allowUnknown: false }
@@ -1715,7 +1633,7 @@ class Content {
1715
1633
  if (warrning) {
1716
1634
  Logger({
1717
1635
  level: "WARN",
1718
- message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntriesBySlug \n ${warrning}`,
1636
+ message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntries \n ${warrning}`,
1719
1637
  });
1720
1638
  }
1721
1639
 
@@ -1726,7 +1644,7 @@ class Content {
1726
1644
  const response = await PlatformAPIClient.execute(
1727
1645
  this.config,
1728
1646
  "post",
1729
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/upload`,
1647
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/upload`,
1730
1648
  query_params,
1731
1649
  body,
1732
1650
  { ...xHeaders, ...requestHeaders },
@@ -1740,7 +1658,7 @@ class Content {
1740
1658
 
1741
1659
  const {
1742
1660
  error: res_error,
1743
- } = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate(
1661
+ } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate(
1744
1662
  responseData,
1745
1663
  { abortEarly: false, allowUnknown: true }
1746
1664
  );
@@ -1751,7 +1669,7 @@ class Content {
1751
1669
  } else {
1752
1670
  Logger({
1753
1671
  level: "WARN",
1754
- message: `Response Validation Warnings for platform > Content > importCustomObjectEntriesBySlug \n ${res_error}`,
1672
+ message: `Response Validation Warnings for platform > Content > importCustomObjectEntries \n ${res_error}`,
1755
1673
  });
1756
1674
  }
1757
1675
  }
@@ -1760,25 +1678,23 @@ class Content {
1760
1678
  }
1761
1679
 
1762
1680
  /**
1763
- * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryBySlugParam} arg
1764
- * - Arg object
1765
- *
1681
+ * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object
1766
1682
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1767
1683
  * @param {import("../PlatformAPIClient").Options} - Options
1768
1684
  * @returns {Promise<string>} - Success response
1769
- * @name sampleCustomObjectBulkEntryBySlug
1685
+ * @name sampleCustomObjectBulkEntry
1770
1686
  * @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/).
1687
+ * @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
1688
  */
1773
- async sampleCustomObjectBulkEntryBySlug(
1774
- { slug, requestHeaders } = { requestHeaders: {} },
1689
+ async sampleCustomObjectBulkEntry(
1690
+ { definitionId, requestHeaders } = { requestHeaders: {} },
1775
1691
  { responseHeaders } = { responseHeaders: false }
1776
1692
  ) {
1777
1693
  const {
1778
1694
  error,
1779
- } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate(
1695
+ } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate(
1780
1696
  {
1781
- slug,
1697
+ definitionId,
1782
1698
  },
1783
1699
  { abortEarly: false, allowUnknown: true }
1784
1700
  );
@@ -1789,16 +1705,16 @@ class Content {
1789
1705
  // Showing warrnings if extra unknown parameters are found
1790
1706
  const {
1791
1707
  error: warrning,
1792
- } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate(
1708
+ } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate(
1793
1709
  {
1794
- slug,
1710
+ definitionId,
1795
1711
  },
1796
1712
  { abortEarly: false, allowUnknown: false }
1797
1713
  );
1798
1714
  if (warrning) {
1799
1715
  Logger({
1800
1716
  level: "WARN",
1801
- message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${warrning}`,
1717
+ message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntry \n ${warrning}`,
1802
1718
  });
1803
1719
  }
1804
1720
 
@@ -1809,7 +1725,7 @@ class Content {
1809
1725
  const response = await PlatformAPIClient.execute(
1810
1726
  this.config,
1811
1727
  "get",
1812
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/sample`,
1728
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/sample`,
1813
1729
  query_params,
1814
1730
  undefined,
1815
1731
  { ...xHeaders, ...requestHeaders },
@@ -1831,96 +1747,7 @@ class Content {
1831
1747
  } else {
1832
1748
  Logger({
1833
1749
  level: "WARN",
1834
- message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${res_error}`,
1835
- });
1836
- }
1837
- }
1838
-
1839
- return response;
1840
- }
1841
-
1842
- /**
1843
- * @param {ContentPlatformValidator.UpdateCustomFieldByResourceSlugParam} arg
1844
- * - Arg object
1845
- *
1846
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1847
- * @param {import("../PlatformAPIClient").Options} - Options
1848
- * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
1849
- * - Success response
1850
- *
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/).
1854
- */
1855
- async updateCustomFieldByResourceSlug(
1856
- { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
1857
- { responseHeaders } = { responseHeaders: false }
1858
- ) {
1859
- const {
1860
- error,
1861
- } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate(
1862
- {
1863
- resource,
1864
- resourceSlug,
1865
- body,
1866
- },
1867
- { abortEarly: false, allowUnknown: true }
1868
- );
1869
- if (error) {
1870
- return Promise.reject(new FDKClientValidationError(error));
1871
- }
1872
-
1873
- // Showing warrnings if extra unknown parameters are found
1874
- const {
1875
- error: warrning,
1876
- } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate(
1877
- {
1878
- resource,
1879
- resourceSlug,
1880
- body,
1881
- },
1882
- { abortEarly: false, allowUnknown: false }
1883
- );
1884
- if (warrning) {
1885
- Logger({
1886
- level: "WARN",
1887
- message: `Parameter Validation warrnings for platform > Content > updateCustomFieldByResourceSlug \n ${warrning}`,
1888
- });
1889
- }
1890
-
1891
- const query_params = {};
1892
-
1893
- const xHeaders = {};
1894
-
1895
- const response = await PlatformAPIClient.execute(
1896
- this.config,
1897
- "put",
1898
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`,
1899
- query_params,
1900
- body,
1901
- { ...xHeaders, ...requestHeaders },
1902
- { responseHeaders }
1903
- );
1904
-
1905
- let responseData = response;
1906
- if (responseHeaders) {
1907
- responseData = response[0];
1908
- }
1909
-
1910
- const {
1911
- error: res_error,
1912
- } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
1913
- responseData,
1914
- { abortEarly: false, allowUnknown: true }
1915
- );
1916
-
1917
- if (res_error) {
1918
- if (this.config.options.strictResponseCheck === true) {
1919
- return Promise.reject(new FDKResponseValidationError(res_error));
1920
- } else {
1921
- Logger({
1922
- level: "WARN",
1923
- message: `Response Validation Warnings for platform > Content > updateCustomFieldByResourceSlug \n ${res_error}`,
1750
+ message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntry \n ${res_error}`,
1924
1751
  });
1925
1752
  }
1926
1753
  }
@@ -1929,31 +1756,25 @@ class Content {
1929
1756
  }
1930
1757
 
1931
1758
  /**
1932
- * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionBySlugParam} arg
1933
- * - Arg object
1934
- *
1759
+ * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object
1935
1760
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1936
1761
  * @param {import("../PlatformAPIClient").Options} - Options
1937
1762
  * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
1938
1763
  * - Success response
1939
1764
  *
1940
- * @name updateCustomFieldDefinitionBySlug
1765
+ * @name updateCustomFieldDefinition
1941
1766
  * @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/).
1767
+ * @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
1768
  */
1944
- async updateCustomFieldDefinitionBySlug(
1945
- { slug, resource, namespace, body, requestHeaders } = {
1946
- requestHeaders: {},
1947
- },
1769
+ async updateCustomFieldDefinition(
1770
+ { definitionId, body, requestHeaders } = { requestHeaders: {} },
1948
1771
  { responseHeaders } = { responseHeaders: false }
1949
1772
  ) {
1950
1773
  const {
1951
1774
  error,
1952
- } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate(
1775
+ } = ContentPlatformValidator.updateCustomFieldDefinition().validate(
1953
1776
  {
1954
- slug,
1955
- resource,
1956
- namespace,
1777
+ definitionId,
1957
1778
  body,
1958
1779
  },
1959
1780
  { abortEarly: false, allowUnknown: true }
@@ -1965,11 +1786,9 @@ class Content {
1965
1786
  // Showing warrnings if extra unknown parameters are found
1966
1787
  const {
1967
1788
  error: warrning,
1968
- } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate(
1789
+ } = ContentPlatformValidator.updateCustomFieldDefinition().validate(
1969
1790
  {
1970
- slug,
1971
- resource,
1972
- namespace,
1791
+ definitionId,
1973
1792
  body,
1974
1793
  },
1975
1794
  { abortEarly: false, allowUnknown: false }
@@ -1977,7 +1796,7 @@ class Content {
1977
1796
  if (warrning) {
1978
1797
  Logger({
1979
1798
  level: "WARN",
1980
- message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${warrning}`,
1799
+ message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinition \n ${warrning}`,
1981
1800
  });
1982
1801
  }
1983
1802
 
@@ -1988,7 +1807,7 @@ class Content {
1988
1807
  const response = await PlatformAPIClient.execute(
1989
1808
  this.config,
1990
1809
  "put",
1991
- `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
1810
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`,
1992
1811
  query_params,
1993
1812
  body,
1994
1813
  { ...xHeaders, ...requestHeaders },
@@ -2013,7 +1832,7 @@ class Content {
2013
1832
  } else {
2014
1833
  Logger({
2015
1834
  level: "WARN",
2016
- message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${res_error}`,
1835
+ message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinition \n ${res_error}`,
2017
1836
  });
2018
1837
  }
2019
1838
  }
@@ -2022,25 +1841,21 @@ class Content {
2022
1841
  }
2023
1842
 
2024
1843
  /**
2025
- * @param {ContentPlatformValidator.UpdateCustomObjectBySlugParam} arg - Arg object
1844
+ * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object
2026
1845
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2027
1846
  * @param {import("../PlatformAPIClient").Options} - Options
2028
- * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
2029
- * Success response
2030
- * @name updateCustomObjectBySlug
1847
+ * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
1848
+ * @name updateCustomObject
2031
1849
  * @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/).
1850
+ * @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
1851
  */
2034
- async updateCustomObjectBySlug(
2035
- { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
1852
+ async updateCustomObject(
1853
+ { metaobjectId, body, requestHeaders } = { requestHeaders: {} },
2036
1854
  { responseHeaders } = { responseHeaders: false }
2037
1855
  ) {
2038
- const {
2039
- error,
2040
- } = ContentPlatformValidator.updateCustomObjectBySlug().validate(
1856
+ const { error } = ContentPlatformValidator.updateCustomObject().validate(
2041
1857
  {
2042
- definitionSlug,
2043
- slug,
1858
+ metaobjectId,
2044
1859
  body,
2045
1860
  },
2046
1861
  { abortEarly: false, allowUnknown: true }
@@ -2052,10 +1867,9 @@ class Content {
2052
1867
  // Showing warrnings if extra unknown parameters are found
2053
1868
  const {
2054
1869
  error: warrning,
2055
- } = ContentPlatformValidator.updateCustomObjectBySlug().validate(
1870
+ } = ContentPlatformValidator.updateCustomObject().validate(
2056
1871
  {
2057
- definitionSlug,
2058
- slug,
1872
+ metaobjectId,
2059
1873
  body,
2060
1874
  },
2061
1875
  { abortEarly: false, allowUnknown: false }
@@ -2063,7 +1877,7 @@ class Content {
2063
1877
  if (warrning) {
2064
1878
  Logger({
2065
1879
  level: "WARN",
2066
- message: `Parameter Validation warrnings for platform > Content > updateCustomObjectBySlug \n ${warrning}`,
1880
+ message: `Parameter Validation warrnings for platform > Content > updateCustomObject \n ${warrning}`,
2067
1881
  });
2068
1882
  }
2069
1883
 
@@ -2074,7 +1888,7 @@ class Content {
2074
1888
  const response = await PlatformAPIClient.execute(
2075
1889
  this.config,
2076
1890
  "put",
2077
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
1891
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`,
2078
1892
  query_params,
2079
1893
  body,
2080
1894
  { ...xHeaders, ...requestHeaders },
@@ -2088,7 +1902,7 @@ class Content {
2088
1902
 
2089
1903
  const {
2090
1904
  error: res_error,
2091
- } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
1905
+ } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
2092
1906
  abortEarly: false,
2093
1907
  allowUnknown: true,
2094
1908
  });
@@ -2099,7 +1913,7 @@ class Content {
2099
1913
  } else {
2100
1914
  Logger({
2101
1915
  level: "WARN",
2102
- message: `Response Validation Warnings for platform > Content > updateCustomObjectBySlug \n ${res_error}`,
1916
+ message: `Response Validation Warnings for platform > Content > updateCustomObject \n ${res_error}`,
2103
1917
  });
2104
1918
  }
2105
1919
  }
@@ -2108,27 +1922,26 @@ class Content {
2108
1922
  }
2109
1923
 
2110
1924
  /**
2111
- * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionBySlugParam} arg
1925
+ * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg
2112
1926
  * - Arg object
2113
1927
  *
2114
1928
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2115
1929
  * @param {import("../PlatformAPIClient").Options} - Options
2116
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
2117
- * - Success response
2118
- *
2119
- * @name updateCustomObjectDefinitionBySlug
1930
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
1931
+ * Success response
1932
+ * @name updateCustomObjectDefinition
2120
1933
  * @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/).
1934
+ * @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
1935
  */
2123
- async updateCustomObjectDefinitionBySlug(
2124
- { slug, body, requestHeaders } = { requestHeaders: {} },
1936
+ async updateCustomObjectDefinition(
1937
+ { definitionId, body, requestHeaders } = { requestHeaders: {} },
2125
1938
  { responseHeaders } = { responseHeaders: false }
2126
1939
  ) {
2127
1940
  const {
2128
1941
  error,
2129
- } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate(
1942
+ } = ContentPlatformValidator.updateCustomObjectDefinition().validate(
2130
1943
  {
2131
- slug,
1944
+ definitionId,
2132
1945
  body,
2133
1946
  },
2134
1947
  { abortEarly: false, allowUnknown: true }
@@ -2140,9 +1953,9 @@ class Content {
2140
1953
  // Showing warrnings if extra unknown parameters are found
2141
1954
  const {
2142
1955
  error: warrning,
2143
- } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate(
1956
+ } = ContentPlatformValidator.updateCustomObjectDefinition().validate(
2144
1957
  {
2145
- slug,
1958
+ definitionId,
2146
1959
  body,
2147
1960
  },
2148
1961
  { abortEarly: false, allowUnknown: false }
@@ -2150,7 +1963,7 @@ class Content {
2150
1963
  if (warrning) {
2151
1964
  Logger({
2152
1965
  level: "WARN",
2153
- message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${warrning}`,
1966
+ message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinition \n ${warrning}`,
2154
1967
  });
2155
1968
  }
2156
1969
 
@@ -2161,7 +1974,7 @@ class Content {
2161
1974
  const response = await PlatformAPIClient.execute(
2162
1975
  this.config,
2163
1976
  "put",
2164
- `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`,
1977
+ `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`,
2165
1978
  query_params,
2166
1979
  body,
2167
1980
  { ...xHeaders, ...requestHeaders },
@@ -2175,7 +1988,7 @@ class Content {
2175
1988
 
2176
1989
  const {
2177
1990
  error: res_error,
2178
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
1991
+ } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
2179
1992
  responseData,
2180
1993
  { abortEarly: false, allowUnknown: true }
2181
1994
  );
@@ -2186,7 +1999,7 @@ class Content {
2186
1999
  } else {
2187
2000
  Logger({
2188
2001
  level: "WARN",
2189
- message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${res_error}`,
2002
+ message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinition \n ${res_error}`,
2190
2003
  });
2191
2004
  }
2192
2005
  }