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

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 (239) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +68 -48
  6. package/sdk/application/Cart/CartApplicationClient.js +118 -27
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
  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 +51 -30
  14. package/sdk/application/Content/ContentApplicationClient.js +161 -56
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -11
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -10
  17. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  18. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  20. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +101 -8
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
  24. package/sdk/application/Order/OrderApplicationClient.js +56 -8
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  26. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  30. package/sdk/application/Theme/ThemeApplicationClient.js +4 -2
  31. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  32. package/sdk/application/User/UserApplicationClient.js +6 -6
  33. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  34. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  35. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  37. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -21
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -16
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  41. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  42. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  44. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  45. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  47. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
  49. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
  51. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  52. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  53. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  54. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  55. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  56. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  57. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  58. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  59. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  60. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  66. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  72. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  73. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  74. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  75. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  76. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  77. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  78. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
  80. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
  82. package/sdk/platform/Cart/CartPlatformModel.d.ts +5070 -1296
  83. package/sdk/platform/Cart/CartPlatformModel.js +1992 -1217
  84. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
  88. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
  89. package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
  90. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6512 -1770
  91. package/sdk/platform/Catalog/CatalogPlatformModel.js +3228 -1687
  92. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
  94. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  95. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  96. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  97. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  98. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  103. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  104. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  110. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  116. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  118. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  120. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +204 -141
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1076 -478
  122. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +253 -141
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +256 -130
  124. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  125. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  126. package/sdk/platform/Content/ContentPlatformModel.d.ts +1372 -400
  127. package/sdk/platform/Content/ContentPlatformModel.js +631 -394
  128. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  129. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  130. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  131. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  132. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  133. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  134. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  136. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +95 -39
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -63
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  140. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -22
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -24
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -116
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -104
  144. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  146. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  147. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  148. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  149. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  150. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
  151. package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
  152. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
  153. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
  154. package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
  155. package/sdk/platform/Order/OrderPlatformClient.js +416 -198
  156. package/sdk/platform/Order/OrderPlatformModel.d.ts +7607 -1267
  157. package/sdk/platform/Order/OrderPlatformModel.js +3929 -1269
  158. package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
  159. package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
  160. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  161. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  162. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  163. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  164. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  165. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  166. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  167. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  168. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  169. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  170. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
  171. package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
  172. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  173. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  174. package/sdk/platform/PlatformClient.d.ts +0 -2
  175. package/sdk/platform/PlatformClient.js +0 -4
  176. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  177. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  178. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  179. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  180. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  181. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  182. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
  183. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
  192. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  193. package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
  194. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
  195. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  196. package/sdk/platform/Share/SharePlatformModel.d.ts +46 -7
  197. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  198. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  199. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  200. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  201. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  202. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  203. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  204. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  205. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  206. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  207. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  208. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  209. package/sdk/platform/User/UserPlatformModel.js +23 -23
  210. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  211. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  212. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  213. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  214. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  215. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  216. package/sdk/platform/index.d.ts +0 -1
  217. package/sdk/platform/index.js +0 -2
  218. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  219. package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
  220. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  221. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  222. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  223. package/sdk/public/Content/ContentPublicClient.js +810 -6
  224. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  225. package/sdk/public/Content/ContentPublicModel.js +649 -3
  226. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  227. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  228. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  229. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  230. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  231. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  232. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  233. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  234. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  235. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  236. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  237. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  238. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  239. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -416,93 +416,6 @@ class Content {
416
416
  return response;
417
417
  }
418
418
 
419
- /**
420
- * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam} arg
421
- * - Arg object
422
- *
423
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
424
- * @param {import("../PlatformAPIClient").Options} - Options
425
- * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
426
- * - Success response
427
- *
428
- * @name createAppCustomFieldByResourceId
429
- * @summary: Create custom field entries for gives resource and resource_id
430
- * @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/createAppCustomFieldByResourceId/).
431
- */
432
- async createAppCustomFieldByResourceId(
433
- { resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
434
- { responseHeaders } = { responseHeaders: false }
435
- ) {
436
- const {
437
- error,
438
- } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate(
439
- {
440
- resource,
441
- resourceId,
442
- body,
443
- },
444
- { abortEarly: false, allowUnknown: true }
445
- );
446
- if (error) {
447
- return Promise.reject(new FDKClientValidationError(error));
448
- }
449
-
450
- // Showing warrnings if extra unknown parameters are found
451
- const {
452
- error: warrning,
453
- } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate(
454
- {
455
- resource,
456
- resourceId,
457
- body,
458
- },
459
- { abortEarly: false, allowUnknown: false }
460
- );
461
- if (warrning) {
462
- Logger({
463
- level: "WARN",
464
- message: `Parameter Validation warrnings for platform > Content > createAppCustomFieldByResourceId \n ${warrning}`,
465
- });
466
- }
467
-
468
- const query_params = {};
469
-
470
- const response = await PlatformAPIClient.execute(
471
- this.config,
472
- "put",
473
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
474
- query_params,
475
- body,
476
- requestHeaders,
477
- { responseHeaders }
478
- );
479
-
480
- let responseData = response;
481
- if (responseHeaders) {
482
- responseData = response[0];
483
- }
484
-
485
- const {
486
- error: res_error,
487
- } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
488
- responseData,
489
- { abortEarly: false, allowUnknown: true }
490
- );
491
-
492
- if (res_error) {
493
- if (this.config.options.strictResponseCheck === true) {
494
- return Promise.reject(new FDKResponseValidationError(res_error));
495
- } else {
496
- Logger({
497
- level: "WARN",
498
- message: `Response Validation Warnings for platform > Content > createAppCustomFieldByResourceId \n ${res_error}`,
499
- });
500
- }
501
- }
502
-
503
- return response;
504
- }
505
-
506
419
  /**
507
420
  * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam} arg
508
421
  * - Arg object
@@ -513,17 +426,18 @@ class Content {
513
426
  * - Success response
514
427
  *
515
428
  * @name createAppCustomFieldDefinition
516
- * @summary: Create custom field definition
429
+ * @summary: Create custom field definition for a given resource type
517
430
  * @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/createAppCustomFieldDefinition/).
518
431
  */
519
432
  async createAppCustomFieldDefinition(
520
- { body, requestHeaders } = { requestHeaders: {} },
433
+ { resource, body, requestHeaders } = { requestHeaders: {} },
521
434
  { responseHeaders } = { responseHeaders: false }
522
435
  ) {
523
436
  const {
524
437
  error,
525
438
  } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
526
439
  {
440
+ resource,
527
441
  body,
528
442
  },
529
443
  { abortEarly: false, allowUnknown: true }
@@ -537,6 +451,7 @@ class Content {
537
451
  error: warrning,
538
452
  } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
539
453
  {
454
+ resource,
540
455
  body,
541
456
  },
542
457
  { abortEarly: false, allowUnknown: false }
@@ -553,7 +468,7 @@ class Content {
553
468
  const response = await PlatformAPIClient.execute(
554
469
  this.config,
555
470
  "post",
556
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`,
471
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`,
557
472
  query_params,
558
473
  body,
559
474
  requestHeaders,
@@ -587,24 +502,25 @@ class Content {
587
502
  }
588
503
 
589
504
  /**
590
- * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectParam} arg
505
+ * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectBySlugParam} arg
591
506
  * - Arg object
592
507
  *
593
508
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
594
509
  * @param {import("../PlatformAPIClient").Options} - Options
595
510
  * @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
596
- * @name createAppCustomObject
511
+ * @name createAppCustomObjectBySlug
597
512
  * @summary: Create custom object entries
598
- * @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/createAppCustomObject/).
513
+ * @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/createAppCustomObjectBySlug/).
599
514
  */
600
- async createAppCustomObject(
601
- { body, requestHeaders } = { requestHeaders: {} },
515
+ async createAppCustomObjectBySlug(
516
+ { definitionSlug, body, requestHeaders } = { requestHeaders: {} },
602
517
  { responseHeaders } = { responseHeaders: false }
603
518
  ) {
604
519
  const {
605
520
  error,
606
- } = ContentPlatformApplicationValidator.createAppCustomObject().validate(
521
+ } = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate(
607
522
  {
523
+ definitionSlug,
608
524
  body,
609
525
  },
610
526
  { abortEarly: false, allowUnknown: true }
@@ -616,8 +532,9 @@ class Content {
616
532
  // Showing warrnings if extra unknown parameters are found
617
533
  const {
618
534
  error: warrning,
619
- } = ContentPlatformApplicationValidator.createAppCustomObject().validate(
535
+ } = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate(
620
536
  {
537
+ definitionSlug,
621
538
  body,
622
539
  },
623
540
  { abortEarly: false, allowUnknown: false }
@@ -625,7 +542,7 @@ class Content {
625
542
  if (warrning) {
626
543
  Logger({
627
544
  level: "WARN",
628
- message: `Parameter Validation warrnings for platform > Content > createAppCustomObject \n ${warrning}`,
545
+ message: `Parameter Validation warrnings for platform > Content > createAppCustomObjectBySlug \n ${warrning}`,
629
546
  });
630
547
  }
631
548
 
@@ -634,7 +551,7 @@ class Content {
634
551
  const response = await PlatformAPIClient.execute(
635
552
  this.config,
636
553
  "post",
637
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`,
554
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`,
638
555
  query_params,
639
556
  body,
640
557
  requestHeaders,
@@ -659,7 +576,7 @@ class Content {
659
576
  } else {
660
577
  Logger({
661
578
  level: "WARN",
662
- message: `Response Validation Warnings for platform > Content > createAppCustomObject \n ${res_error}`,
579
+ message: `Response Validation Warnings for platform > Content > createAppCustomObjectBySlug \n ${res_error}`,
663
580
  });
664
581
  }
665
582
  }
@@ -673,8 +590,9 @@ class Content {
673
590
  *
674
591
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
675
592
  * @param {import("../PlatformAPIClient").Options} - Options
676
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
677
- * Success response
593
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
594
+ * - Success response
595
+ *
678
596
  * @name createAppCustomObjectDefinition
679
597
  * @summary: Create custom object definition
680
598
  * @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/createAppCustomObjectDefinition/).
@@ -716,7 +634,7 @@ class Content {
716
634
  const response = await PlatformAPIClient.execute(
717
635
  this.config,
718
636
  "post",
719
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`,
637
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`,
720
638
  query_params,
721
639
  body,
722
640
  requestHeaders,
@@ -730,7 +648,7 @@ class Content {
730
648
 
731
649
  const {
732
650
  error: res_error,
733
- } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
651
+ } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
734
652
  responseData,
735
653
  { abortEarly: false, allowUnknown: true }
736
654
  );
@@ -1306,6 +1224,86 @@ class Content {
1306
1224
  return response;
1307
1225
  }
1308
1226
 
1227
+ /**
1228
+ * @param {ContentPlatformApplicationValidator.CreateSitemapParam} arg - Arg object
1229
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1230
+ * @param {import("../PlatformAPIClient").Options} - Options
1231
+ * @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
1232
+ * @name createSitemap
1233
+ * @summary: Create a new sitemap configuration
1234
+ * @description: Create a new sitemap configuration for a specific company and application. The name must be unique within the scope of the application. The sitemap XML data must be valid XML following the sitemap protocol specification. Once created, the configuration can be activated or deactivated using the is_active flag.
1235
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSitemap/).
1236
+ */
1237
+ async createSitemap(
1238
+ { body, requestHeaders } = { requestHeaders: {} },
1239
+ { responseHeaders } = { responseHeaders: false }
1240
+ ) {
1241
+ const {
1242
+ error,
1243
+ } = ContentPlatformApplicationValidator.createSitemap().validate(
1244
+ {
1245
+ body,
1246
+ },
1247
+ { abortEarly: false, allowUnknown: true }
1248
+ );
1249
+ if (error) {
1250
+ return Promise.reject(new FDKClientValidationError(error));
1251
+ }
1252
+
1253
+ // Showing warrnings if extra unknown parameters are found
1254
+ const {
1255
+ error: warrning,
1256
+ } = ContentPlatformApplicationValidator.createSitemap().validate(
1257
+ {
1258
+ body,
1259
+ },
1260
+ { abortEarly: false, allowUnknown: false }
1261
+ );
1262
+ if (warrning) {
1263
+ Logger({
1264
+ level: "WARN",
1265
+ message: `Parameter Validation warrnings for platform > Content > createSitemap \n ${warrning}`,
1266
+ });
1267
+ }
1268
+
1269
+ const query_params = {};
1270
+
1271
+ const response = await PlatformAPIClient.execute(
1272
+ this.config,
1273
+ "post",
1274
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps`,
1275
+ query_params,
1276
+ body,
1277
+ requestHeaders,
1278
+ { responseHeaders }
1279
+ );
1280
+
1281
+ let responseData = response;
1282
+ if (responseHeaders) {
1283
+ responseData = response[0];
1284
+ }
1285
+
1286
+ const {
1287
+ error: res_error,
1288
+ } = ContentPlatformModel.SitemapConfig().validate(responseData, {
1289
+ abortEarly: false,
1290
+ allowUnknown: true,
1291
+ });
1292
+
1293
+ if (res_error) {
1294
+ if (this.config.options.strictResponseCheck === true) {
1295
+ return Promise.reject(new FDKResponseValidationError(res_error));
1296
+ } else {
1297
+ Logger({
1298
+ level: "WARN",
1299
+ message: `Response Validation Warnings for platform > Content > createSitemap \n ${res_error}`,
1300
+ });
1301
+ }
1302
+ }
1303
+
1304
+ return response;
1305
+ }
1306
+
1309
1307
  /**
1310
1308
  * @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object
1311
1309
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1468,25 +1466,27 @@ class Content {
1468
1466
  }
1469
1467
 
1470
1468
  /**
1471
- * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg
1469
+ * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg
1472
1470
  * - Arg object
1473
1471
  *
1474
1472
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1475
1473
  * @param {import("../PlatformAPIClient").Options} - Options
1476
1474
  * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
1477
- * @name deleteAppCustomFieldDefinition
1475
+ * @name deleteAppCustomFieldDefinitionBySlug
1478
1476
  * @summary: Delete custom fields definition
1479
- * @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/deleteAppCustomFieldDefinition/).
1477
+ * @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/deleteAppCustomFieldDefinitionBySlug/).
1480
1478
  */
1481
- async deleteAppCustomFieldDefinition(
1482
- { definitionId, requestHeaders } = { requestHeaders: {} },
1479
+ async deleteAppCustomFieldDefinitionBySlug(
1480
+ { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
1483
1481
  { responseHeaders } = { responseHeaders: false }
1484
1482
  ) {
1485
1483
  const {
1486
1484
  error,
1487
- } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate(
1485
+ } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1488
1486
  {
1489
- definitionId,
1487
+ slug,
1488
+ resource,
1489
+ namespace,
1490
1490
  },
1491
1491
  { abortEarly: false, allowUnknown: true }
1492
1492
  );
@@ -1497,16 +1497,18 @@ class Content {
1497
1497
  // Showing warrnings if extra unknown parameters are found
1498
1498
  const {
1499
1499
  error: warrning,
1500
- } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate(
1500
+ } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1501
1501
  {
1502
- definitionId,
1502
+ slug,
1503
+ resource,
1504
+ namespace,
1503
1505
  },
1504
1506
  { abortEarly: false, allowUnknown: false }
1505
1507
  );
1506
1508
  if (warrning) {
1507
1509
  Logger({
1508
1510
  level: "WARN",
1509
- message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinition \n ${warrning}`,
1511
+ message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${warrning}`,
1510
1512
  });
1511
1513
  }
1512
1514
 
@@ -1515,7 +1517,7 @@ class Content {
1515
1517
  const response = await PlatformAPIClient.execute(
1516
1518
  this.config,
1517
1519
  "delete",
1518
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`,
1520
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
1519
1521
  query_params,
1520
1522
  undefined,
1521
1523
  requestHeaders,
@@ -1540,7 +1542,7 @@ class Content {
1540
1542
  } else {
1541
1543
  Logger({
1542
1544
  level: "WARN",
1543
- message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinition \n ${res_error}`,
1545
+ message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${res_error}`,
1544
1546
  });
1545
1547
  }
1546
1548
  }
@@ -1549,25 +1551,26 @@ class Content {
1549
1551
  }
1550
1552
 
1551
1553
  /**
1552
- * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg
1554
+ * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectBySlugParam} arg
1553
1555
  * - Arg object
1554
1556
  *
1555
1557
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1556
1558
  * @param {import("../PlatformAPIClient").Options} - Options
1557
1559
  * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
1558
- * @name deleteAppCustomObject
1560
+ * @name deleteAppCustomObjectBySlug
1559
1561
  * @summary: Delete custom object
1560
- * @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/deleteAppCustomObject/).
1562
+ * @description: A Custom object entry can be deleted by providing the custom object definition slug and custom object entry slug using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectBySlug/).
1561
1563
  */
1562
- async deleteAppCustomObject(
1563
- { metaobjectId, requestHeaders } = { requestHeaders: {} },
1564
+ async deleteAppCustomObjectBySlug(
1565
+ { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
1564
1566
  { responseHeaders } = { responseHeaders: false }
1565
1567
  ) {
1566
1568
  const {
1567
1569
  error,
1568
- } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate(
1570
+ } = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate(
1569
1571
  {
1570
- metaobjectId,
1572
+ definitionSlug,
1573
+ slug,
1571
1574
  },
1572
1575
  { abortEarly: false, allowUnknown: true }
1573
1576
  );
@@ -1578,16 +1581,17 @@ class Content {
1578
1581
  // Showing warrnings if extra unknown parameters are found
1579
1582
  const {
1580
1583
  error: warrning,
1581
- } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate(
1584
+ } = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate(
1582
1585
  {
1583
- metaobjectId,
1586
+ definitionSlug,
1587
+ slug,
1584
1588
  },
1585
1589
  { abortEarly: false, allowUnknown: false }
1586
1590
  );
1587
1591
  if (warrning) {
1588
1592
  Logger({
1589
1593
  level: "WARN",
1590
- message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObject \n ${warrning}`,
1594
+ message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectBySlug \n ${warrning}`,
1591
1595
  });
1592
1596
  }
1593
1597
 
@@ -1596,7 +1600,7 @@ class Content {
1596
1600
  const response = await PlatformAPIClient.execute(
1597
1601
  this.config,
1598
1602
  "delete",
1599
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`,
1603
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
1600
1604
  query_params,
1601
1605
  undefined,
1602
1606
  requestHeaders,
@@ -1621,7 +1625,7 @@ class Content {
1621
1625
  } else {
1622
1626
  Logger({
1623
1627
  level: "WARN",
1624
- message: `Response Validation Warnings for platform > Content > deleteAppCustomObject \n ${res_error}`,
1628
+ message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectBySlug \n ${res_error}`,
1625
1629
  });
1626
1630
  }
1627
1631
  }
@@ -1630,7 +1634,7 @@ class Content {
1630
1634
  }
1631
1635
 
1632
1636
  /**
1633
- * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg
1637
+ * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionBySlugParam} arg
1634
1638
  * - Arg object
1635
1639
  *
1636
1640
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1638,19 +1642,19 @@ class Content {
1638
1642
  * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema>}
1639
1643
  * - Success response
1640
1644
  *
1641
- * @name deleteAppCustomObjectDefinition
1645
+ * @name deleteAppCustomObjectDefinitionBySlug
1642
1646
  * @summary: Delete custom object definition
1643
- * @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/deleteAppCustomObjectDefinition/).
1647
+ * @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/deleteAppCustomObjectDefinitionBySlug/).
1644
1648
  */
1645
- async deleteAppCustomObjectDefinition(
1646
- { definitionId, requestHeaders } = { requestHeaders: {} },
1649
+ async deleteAppCustomObjectDefinitionBySlug(
1650
+ { slug, requestHeaders } = { requestHeaders: {} },
1647
1651
  { responseHeaders } = { responseHeaders: false }
1648
1652
  ) {
1649
1653
  const {
1650
1654
  error,
1651
- } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate(
1655
+ } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate(
1652
1656
  {
1653
- definitionId,
1657
+ slug,
1654
1658
  },
1655
1659
  { abortEarly: false, allowUnknown: true }
1656
1660
  );
@@ -1661,16 +1665,16 @@ class Content {
1661
1665
  // Showing warrnings if extra unknown parameters are found
1662
1666
  const {
1663
1667
  error: warrning,
1664
- } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate(
1668
+ } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate(
1665
1669
  {
1666
- definitionId,
1670
+ slug,
1667
1671
  },
1668
1672
  { abortEarly: false, allowUnknown: false }
1669
1673
  );
1670
1674
  if (warrning) {
1671
1675
  Logger({
1672
1676
  level: "WARN",
1673
- message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinition \n ${warrning}`,
1677
+ message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${warrning}`,
1674
1678
  });
1675
1679
  }
1676
1680
 
@@ -1679,7 +1683,7 @@ class Content {
1679
1683
  const response = await PlatformAPIClient.execute(
1680
1684
  this.config,
1681
1685
  "delete",
1682
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`,
1686
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
1683
1687
  query_params,
1684
1688
  undefined,
1685
1689
  requestHeaders,
@@ -1704,7 +1708,7 @@ class Content {
1704
1708
  } else {
1705
1709
  Logger({
1706
1710
  level: "WARN",
1707
- message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinition \n ${res_error}`,
1711
+ message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${res_error}`,
1708
1712
  });
1709
1713
  }
1710
1714
  }
@@ -2426,6 +2430,86 @@ class Content {
2426
2430
  return response;
2427
2431
  }
2428
2432
 
2433
+ /**
2434
+ * @param {ContentPlatformApplicationValidator.DeleteSitemapParam} arg - Arg object
2435
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2436
+ * @param {import("../PlatformAPIClient").Options} - Options
2437
+ * @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
2438
+ * @name deleteSitemap
2439
+ * @summary: Delete a specific sitemap configuration
2440
+ * @description: Permanently delete a sitemap configuration identified by its name. This action cannot be undone. All associated data including the sitemap XML data will be removed.
2441
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSitemap/).
2442
+ */
2443
+ async deleteSitemap(
2444
+ { name, requestHeaders } = { requestHeaders: {} },
2445
+ { responseHeaders } = { responseHeaders: false }
2446
+ ) {
2447
+ const {
2448
+ error,
2449
+ } = ContentPlatformApplicationValidator.deleteSitemap().validate(
2450
+ {
2451
+ name,
2452
+ },
2453
+ { abortEarly: false, allowUnknown: true }
2454
+ );
2455
+ if (error) {
2456
+ return Promise.reject(new FDKClientValidationError(error));
2457
+ }
2458
+
2459
+ // Showing warrnings if extra unknown parameters are found
2460
+ const {
2461
+ error: warrning,
2462
+ } = ContentPlatformApplicationValidator.deleteSitemap().validate(
2463
+ {
2464
+ name,
2465
+ },
2466
+ { abortEarly: false, allowUnknown: false }
2467
+ );
2468
+ if (warrning) {
2469
+ Logger({
2470
+ level: "WARN",
2471
+ message: `Parameter Validation warrnings for platform > Content > deleteSitemap \n ${warrning}`,
2472
+ });
2473
+ }
2474
+
2475
+ const query_params = {};
2476
+
2477
+ const response = await PlatformAPIClient.execute(
2478
+ this.config,
2479
+ "delete",
2480
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
2481
+ query_params,
2482
+ undefined,
2483
+ requestHeaders,
2484
+ { responseHeaders }
2485
+ );
2486
+
2487
+ let responseData = response;
2488
+ if (responseHeaders) {
2489
+ responseData = response[0];
2490
+ }
2491
+
2492
+ const {
2493
+ error: res_error,
2494
+ } = ContentPlatformModel.SitemapConfig().validate(responseData, {
2495
+ abortEarly: false,
2496
+ allowUnknown: true,
2497
+ });
2498
+
2499
+ if (res_error) {
2500
+ if (this.config.options.strictResponseCheck === true) {
2501
+ return Promise.reject(new FDKResponseValidationError(res_error));
2502
+ } else {
2503
+ Logger({
2504
+ level: "WARN",
2505
+ message: `Response Validation Warnings for platform > Content > deleteSitemap \n ${res_error}`,
2506
+ });
2507
+ }
2508
+ }
2509
+
2510
+ return response;
2511
+ }
2512
+
2429
2513
  /**
2430
2514
  * @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object
2431
2515
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2754,7 +2838,7 @@ class Content {
2754
2838
  }
2755
2839
 
2756
2840
  /**
2757
- * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg
2841
+ * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesBySlugParam} arg
2758
2842
  * - Arg object
2759
2843
  *
2760
2844
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -2762,19 +2846,19 @@ class Content {
2762
2846
  * @returns {Promise<ContentPlatformModel.CustomObjectBulkEntryInitiateDownload>}
2763
2847
  * - Success response
2764
2848
  *
2765
- * @name exportAppCustomObjectEntries
2849
+ * @name exportAppCustomObjectEntriesBySlug
2766
2850
  * @summary: Initiate download for bulk custom object entries
2767
- * @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/exportAppCustomObjectEntries/).
2851
+ * @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/exportAppCustomObjectEntriesBySlug/).
2768
2852
  */
2769
- async exportAppCustomObjectEntries(
2770
- { definitionId, requestHeaders } = { requestHeaders: {} },
2853
+ async exportAppCustomObjectEntriesBySlug(
2854
+ { slug, requestHeaders } = { requestHeaders: {} },
2771
2855
  { responseHeaders } = { responseHeaders: false }
2772
2856
  ) {
2773
2857
  const {
2774
2858
  error,
2775
- } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate(
2859
+ } = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate(
2776
2860
  {
2777
- definitionId,
2861
+ slug,
2778
2862
  },
2779
2863
  { abortEarly: false, allowUnknown: true }
2780
2864
  );
@@ -2785,16 +2869,16 @@ class Content {
2785
2869
  // Showing warrnings if extra unknown parameters are found
2786
2870
  const {
2787
2871
  error: warrning,
2788
- } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate(
2872
+ } = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate(
2789
2873
  {
2790
- definitionId,
2874
+ slug,
2791
2875
  },
2792
2876
  { abortEarly: false, allowUnknown: false }
2793
2877
  );
2794
2878
  if (warrning) {
2795
2879
  Logger({
2796
2880
  level: "WARN",
2797
- message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntries \n ${warrning}`,
2881
+ message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${warrning}`,
2798
2882
  });
2799
2883
  }
2800
2884
 
@@ -2803,7 +2887,7 @@ class Content {
2803
2887
  const response = await PlatformAPIClient.execute(
2804
2888
  this.config,
2805
2889
  "get",
2806
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/download`,
2890
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/download`,
2807
2891
  query_params,
2808
2892
  undefined,
2809
2893
  requestHeaders,
@@ -2828,7 +2912,7 @@ class Content {
2828
2912
  } else {
2829
2913
  Logger({
2830
2914
  level: "WARN",
2831
- message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntries \n ${res_error}`,
2915
+ message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${res_error}`,
2832
2916
  });
2833
2917
  }
2834
2918
  }
@@ -3085,27 +3169,41 @@ class Content {
3085
3169
  }
3086
3170
 
3087
3171
  /**
3088
- * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam} arg
3172
+ * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionByResourceParam} arg
3089
3173
  * - Arg object
3090
3174
  *
3091
3175
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3092
3176
  * @param {import("../PlatformAPIClient").Options} - Options
3093
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
3094
- * - Success response
3095
- *
3096
- * @name getAppCustomFieldDefinition
3097
- * @summary: Get custom fields definition
3098
- * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/).
3177
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
3178
+ * Success response
3179
+ * @name getAppCustomFieldDefinitionByResource
3180
+ * @summary: Get custom fields definitions for a given resource type
3181
+ * @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/getAppCustomFieldDefinitionByResource/).
3099
3182
  */
3100
- async getAppCustomFieldDefinition(
3101
- { definitionId, requestHeaders } = { requestHeaders: {} },
3183
+ async getAppCustomFieldDefinitionByResource(
3184
+ {
3185
+ pageNo,
3186
+ pageSize,
3187
+ resource,
3188
+ types,
3189
+ search,
3190
+ slugs,
3191
+ namespaces,
3192
+ requestHeaders,
3193
+ } = { requestHeaders: {} },
3102
3194
  { responseHeaders } = { responseHeaders: false }
3103
3195
  ) {
3104
3196
  const {
3105
3197
  error,
3106
- } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate(
3198
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate(
3107
3199
  {
3108
- definitionId,
3200
+ pageNo,
3201
+ pageSize,
3202
+ resource,
3203
+ types,
3204
+ search,
3205
+ slugs,
3206
+ namespaces,
3109
3207
  },
3110
3208
  { abortEarly: false, allowUnknown: true }
3111
3209
  );
@@ -3116,25 +3214,37 @@ class Content {
3116
3214
  // Showing warrnings if extra unknown parameters are found
3117
3215
  const {
3118
3216
  error: warrning,
3119
- } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate(
3217
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate(
3120
3218
  {
3121
- definitionId,
3219
+ pageNo,
3220
+ pageSize,
3221
+ resource,
3222
+ types,
3223
+ search,
3224
+ slugs,
3225
+ namespaces,
3122
3226
  },
3123
3227
  { abortEarly: false, allowUnknown: false }
3124
3228
  );
3125
3229
  if (warrning) {
3126
3230
  Logger({
3127
3231
  level: "WARN",
3128
- message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinition \n ${warrning}`,
3232
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${warrning}`,
3129
3233
  });
3130
3234
  }
3131
3235
 
3132
3236
  const query_params = {};
3237
+ query_params["page_no"] = pageNo;
3238
+ query_params["page_size"] = pageSize;
3239
+ query_params["types"] = types;
3240
+ query_params["search"] = search;
3241
+ query_params["slugs"] = slugs;
3242
+ query_params["namespaces"] = namespaces;
3133
3243
 
3134
3244
  const response = await PlatformAPIClient.execute(
3135
3245
  this.config,
3136
3246
  "get",
3137
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`,
3247
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`,
3138
3248
  query_params,
3139
3249
  undefined,
3140
3250
  requestHeaders,
@@ -3148,7 +3258,7 @@ class Content {
3148
3258
 
3149
3259
  const {
3150
3260
  error: res_error,
3151
- } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
3261
+ } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
3152
3262
  responseData,
3153
3263
  { abortEarly: false, allowUnknown: true }
3154
3264
  );
@@ -3159,7 +3269,7 @@ class Content {
3159
3269
  } else {
3160
3270
  Logger({
3161
3271
  level: "WARN",
3162
- message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinition \n ${res_error}`,
3272
+ message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${res_error}`,
3163
3273
  });
3164
3274
  }
3165
3275
  }
@@ -3168,32 +3278,29 @@ class Content {
3168
3278
  }
3169
3279
 
3170
3280
  /**
3171
- * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg
3281
+ * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionBySlugParam} arg
3172
3282
  * - Arg object
3173
3283
  *
3174
3284
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3175
3285
  * @param {import("../PlatformAPIClient").Options} - Options
3176
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
3177
- * Success response
3178
- * @name getAppCustomFieldDefinitions
3179
- * @summary: Get custom fields definitions
3180
- * @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/getAppCustomFieldDefinitions/).
3286
+ * @returns {Promise<ContentPlatformModel.MetaFieldDefinitionDetailResSchema>}
3287
+ * - Success response
3288
+ *
3289
+ * @name getAppCustomFieldDefinitionBySlug
3290
+ * @summary: Get custom fields definition by resource, slug and namespace
3291
+ * @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/getAppCustomFieldDefinitionBySlug/).
3181
3292
  */
3182
- async getAppCustomFieldDefinitions(
3183
- { pageNo, pageSize, resource, type, search, requestHeaders } = {
3184
- requestHeaders: {},
3185
- },
3293
+ async getAppCustomFieldDefinitionBySlug(
3294
+ { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
3186
3295
  { responseHeaders } = { responseHeaders: false }
3187
3296
  ) {
3188
3297
  const {
3189
3298
  error,
3190
- } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
3299
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate(
3191
3300
  {
3192
- pageNo,
3193
- pageSize,
3301
+ slug,
3194
3302
  resource,
3195
- type,
3196
- search,
3303
+ namespace,
3197
3304
  },
3198
3305
  { abortEarly: false, allowUnknown: true }
3199
3306
  );
@@ -3204,34 +3311,27 @@ class Content {
3204
3311
  // Showing warrnings if extra unknown parameters are found
3205
3312
  const {
3206
3313
  error: warrning,
3207
- } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
3314
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate(
3208
3315
  {
3209
- pageNo,
3210
- pageSize,
3316
+ slug,
3211
3317
  resource,
3212
- type,
3213
- search,
3318
+ namespace,
3214
3319
  },
3215
3320
  { abortEarly: false, allowUnknown: false }
3216
3321
  );
3217
3322
  if (warrning) {
3218
3323
  Logger({
3219
3324
  level: "WARN",
3220
- message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`,
3325
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${warrning}`,
3221
3326
  });
3222
3327
  }
3223
3328
 
3224
3329
  const query_params = {};
3225
- query_params["page_no"] = pageNo;
3226
- query_params["page_size"] = pageSize;
3227
- query_params["resource"] = resource;
3228
- query_params["type"] = type;
3229
- query_params["search"] = search;
3230
3330
 
3231
3331
  const response = await PlatformAPIClient.execute(
3232
3332
  this.config,
3233
3333
  "get",
3234
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`,
3334
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
3235
3335
  query_params,
3236
3336
  undefined,
3237
3337
  requestHeaders,
@@ -3245,7 +3345,7 @@ class Content {
3245
3345
 
3246
3346
  const {
3247
3347
  error: res_error,
3248
- } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
3348
+ } = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate(
3249
3349
  responseData,
3250
3350
  { abortEarly: false, allowUnknown: true }
3251
3351
  );
@@ -3256,7 +3356,7 @@ class Content {
3256
3356
  } else {
3257
3357
  Logger({
3258
3358
  level: "WARN",
3259
- message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`,
3359
+ message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${res_error}`,
3260
3360
  });
3261
3361
  }
3262
3362
  }
@@ -3265,24 +3365,42 @@ class Content {
3265
3365
  }
3266
3366
 
3267
3367
  /**
3268
- * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg
3368
+ * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg
3269
3369
  * - Arg object
3270
3370
  *
3271
3371
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3272
3372
  * @param {import("../PlatformAPIClient").Options} - Options
3273
- * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
3274
- * @name getAppCustomFieldTypes
3275
- * @summary: Get custom field types
3276
- * @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/getAppCustomFieldTypes/).
3373
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionsSchema>} -
3374
+ * Success response
3375
+ * @name getAppCustomFieldDefinitions
3376
+ * @summary: Get custom fields definitions
3377
+ * @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/getAppCustomFieldDefinitions/).
3277
3378
  */
3278
- async getAppCustomFieldTypes(
3279
- { requestHeaders } = { requestHeaders: {} },
3379
+ async getAppCustomFieldDefinitions(
3380
+ {
3381
+ pageNo,
3382
+ pageSize,
3383
+ resources,
3384
+ types,
3385
+ search,
3386
+ slugs,
3387
+ namespaces,
3388
+ requestHeaders,
3389
+ } = { requestHeaders: {} },
3280
3390
  { responseHeaders } = { responseHeaders: false }
3281
3391
  ) {
3282
3392
  const {
3283
3393
  error,
3284
- } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
3285
- {},
3394
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
3395
+ {
3396
+ pageNo,
3397
+ pageSize,
3398
+ resources,
3399
+ types,
3400
+ search,
3401
+ slugs,
3402
+ namespaces,
3403
+ },
3286
3404
  { abortEarly: false, allowUnknown: true }
3287
3405
  );
3288
3406
  if (error) {
@@ -3292,23 +3410,38 @@ class Content {
3292
3410
  // Showing warrnings if extra unknown parameters are found
3293
3411
  const {
3294
3412
  error: warrning,
3295
- } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
3296
- {},
3413
+ } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
3414
+ {
3415
+ pageNo,
3416
+ pageSize,
3417
+ resources,
3418
+ types,
3419
+ search,
3420
+ slugs,
3421
+ namespaces,
3422
+ },
3297
3423
  { abortEarly: false, allowUnknown: false }
3298
3424
  );
3299
3425
  if (warrning) {
3300
3426
  Logger({
3301
3427
  level: "WARN",
3302
- message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`,
3428
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`,
3303
3429
  });
3304
3430
  }
3305
3431
 
3306
3432
  const query_params = {};
3433
+ query_params["page_no"] = pageNo;
3434
+ query_params["page_size"] = pageSize;
3435
+ query_params["resources"] = resources;
3436
+ query_params["types"] = types;
3437
+ query_params["search"] = search;
3438
+ query_params["slugs"] = slugs;
3439
+ query_params["namespaces"] = namespaces;
3307
3440
 
3308
3441
  const response = await PlatformAPIClient.execute(
3309
3442
  this.config,
3310
3443
  "get",
3311
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`,
3444
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/definition`,
3312
3445
  query_params,
3313
3446
  undefined,
3314
3447
  requestHeaders,
@@ -3322,10 +3455,10 @@ class Content {
3322
3455
 
3323
3456
  const {
3324
3457
  error: res_error,
3325
- } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
3326
- abortEarly: false,
3327
- allowUnknown: true,
3328
- });
3458
+ } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate(
3459
+ responseData,
3460
+ { abortEarly: false, allowUnknown: true }
3461
+ );
3329
3462
 
3330
3463
  if (res_error) {
3331
3464
  if (this.config.options.strictResponseCheck === true) {
@@ -3333,7 +3466,7 @@ class Content {
3333
3466
  } else {
3334
3467
  Logger({
3335
3468
  level: "WARN",
3336
- message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`,
3469
+ message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`,
3337
3470
  });
3338
3471
  }
3339
3472
  }
@@ -3342,27 +3475,24 @@ class Content {
3342
3475
  }
3343
3476
 
3344
3477
  /**
3345
- * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsParam} arg
3478
+ * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg
3346
3479
  * - Arg object
3347
3480
  *
3348
3481
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3349
3482
  * @param {import("../PlatformAPIClient").Options} - Options
3350
- * @returns {Promise<ContentPlatformModel.CustomFieldsResponseSchema>} -
3351
- * Success response
3352
- * @name getAppCustomFields
3353
- * @summary: Get list of custom fields of gives resource
3354
- * @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/getAppCustomFields/).
3483
+ * @returns {Promise<ContentPlatformModel.MetafieldTypesSchema>} - Success response
3484
+ * @name getAppCustomFieldTypes
3485
+ * @summary: Get custom field types
3486
+ * @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/getAppCustomFieldTypes/).
3355
3487
  */
3356
- async getAppCustomFields(
3357
- { resource, requestHeaders } = { requestHeaders: {} },
3488
+ async getAppCustomFieldTypes(
3489
+ { requestHeaders } = { requestHeaders: {} },
3358
3490
  { responseHeaders } = { responseHeaders: false }
3359
3491
  ) {
3360
3492
  const {
3361
3493
  error,
3362
- } = ContentPlatformApplicationValidator.getAppCustomFields().validate(
3363
- {
3364
- resource,
3365
- },
3494
+ } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
3495
+ {},
3366
3496
  { abortEarly: false, allowUnknown: true }
3367
3497
  );
3368
3498
  if (error) {
@@ -3372,16 +3502,14 @@ class Content {
3372
3502
  // Showing warrnings if extra unknown parameters are found
3373
3503
  const {
3374
3504
  error: warrning,
3375
- } = ContentPlatformApplicationValidator.getAppCustomFields().validate(
3376
- {
3377
- resource,
3378
- },
3505
+ } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
3506
+ {},
3379
3507
  { abortEarly: false, allowUnknown: false }
3380
3508
  );
3381
3509
  if (warrning) {
3382
3510
  Logger({
3383
3511
  level: "WARN",
3384
- message: `Parameter Validation warrnings for platform > Content > getAppCustomFields \n ${warrning}`,
3512
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`,
3385
3513
  });
3386
3514
  }
3387
3515
 
@@ -3390,7 +3518,7 @@ class Content {
3390
3518
  const response = await PlatformAPIClient.execute(
3391
3519
  this.config,
3392
3520
  "get",
3393
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}`,
3521
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`,
3394
3522
  query_params,
3395
3523
  undefined,
3396
3524
  requestHeaders,
@@ -3404,10 +3532,10 @@ class Content {
3404
3532
 
3405
3533
  const {
3406
3534
  error: res_error,
3407
- } = ContentPlatformModel.CustomFieldsResponseSchema().validate(
3408
- responseData,
3409
- { abortEarly: false, allowUnknown: true }
3410
- );
3535
+ } = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, {
3536
+ abortEarly: false,
3537
+ allowUnknown: true,
3538
+ });
3411
3539
 
3412
3540
  if (res_error) {
3413
3541
  if (this.config.options.strictResponseCheck === true) {
@@ -3415,7 +3543,7 @@ class Content {
3415
3543
  } else {
3416
3544
  Logger({
3417
3545
  level: "WARN",
3418
- message: `Response Validation Warnings for platform > Content > getAppCustomFields \n ${res_error}`,
3546
+ message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`,
3419
3547
  });
3420
3548
  }
3421
3549
  }
@@ -3424,7 +3552,7 @@ class Content {
3424
3552
  }
3425
3553
 
3426
3554
  /**
3427
- * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg
3555
+ * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceSlugParam} arg
3428
3556
  * - Arg object
3429
3557
  *
3430
3558
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -3432,20 +3560,20 @@ class Content {
3432
3560
  * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
3433
3561
  * - Success response
3434
3562
  *
3435
- * @name getAppCustomFieldsByResourceId
3436
- * @summary: Get list of custom fields of given resource and resource id
3437
- * @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/getAppCustomFieldsByResourceId/).
3563
+ * @name getAppCustomFieldsByResourceSlug
3564
+ * @summary: Get list of custom fields of given resource and resource slug
3565
+ * @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/getAppCustomFieldsByResourceSlug/).
3438
3566
  */
3439
- async getAppCustomFieldsByResourceId(
3440
- { resource, resourceId, requestHeaders } = { requestHeaders: {} },
3567
+ async getAppCustomFieldsByResourceSlug(
3568
+ { resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
3441
3569
  { responseHeaders } = { responseHeaders: false }
3442
3570
  ) {
3443
3571
  const {
3444
3572
  error,
3445
- } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate(
3573
+ } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate(
3446
3574
  {
3447
3575
  resource,
3448
- resourceId,
3576
+ resourceSlug,
3449
3577
  },
3450
3578
  { abortEarly: false, allowUnknown: true }
3451
3579
  );
@@ -3456,17 +3584,17 @@ class Content {
3456
3584
  // Showing warrnings if extra unknown parameters are found
3457
3585
  const {
3458
3586
  error: warrning,
3459
- } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate(
3587
+ } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate(
3460
3588
  {
3461
3589
  resource,
3462
- resourceId,
3590
+ resourceSlug,
3463
3591
  },
3464
3592
  { abortEarly: false, allowUnknown: false }
3465
3593
  );
3466
3594
  if (warrning) {
3467
3595
  Logger({
3468
3596
  level: "WARN",
3469
- message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceId \n ${warrning}`,
3597
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${warrning}`,
3470
3598
  });
3471
3599
  }
3472
3600
 
@@ -3475,7 +3603,7 @@ class Content {
3475
3603
  const response = await PlatformAPIClient.execute(
3476
3604
  this.config,
3477
3605
  "get",
3478
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
3606
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
3479
3607
  query_params,
3480
3608
  undefined,
3481
3609
  requestHeaders,
@@ -3500,7 +3628,7 @@ class Content {
3500
3628
  } else {
3501
3629
  Logger({
3502
3630
  level: "WARN",
3503
- message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceId \n ${res_error}`,
3631
+ message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${res_error}`,
3504
3632
  });
3505
3633
  }
3506
3634
  }
@@ -3509,25 +3637,27 @@ class Content {
3509
3637
  }
3510
3638
 
3511
3639
  /**
3512
- * @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg
3640
+ * @param {ContentPlatformApplicationValidator.GetAppCustomObjectBySlugParam} arg
3513
3641
  * - Arg object
3514
3642
  *
3515
3643
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3516
3644
  * @param {import("../PlatformAPIClient").Options} - Options
3517
- * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
3518
- * @name getAppCustomObject
3645
+ * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
3646
+ * Success response
3647
+ * @name getAppCustomObjectBySlug
3519
3648
  * @summary: Get custom object details
3520
- * @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/getAppCustomObject/).
3649
+ * @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/getAppCustomObjectBySlug/).
3521
3650
  */
3522
- async getAppCustomObject(
3523
- { metaobjectId, requestHeaders } = { requestHeaders: {} },
3651
+ async getAppCustomObjectBySlug(
3652
+ { definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
3524
3653
  { responseHeaders } = { responseHeaders: false }
3525
3654
  ) {
3526
3655
  const {
3527
3656
  error,
3528
- } = ContentPlatformApplicationValidator.getAppCustomObject().validate(
3657
+ } = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate(
3529
3658
  {
3530
- metaobjectId,
3659
+ definitionSlug,
3660
+ slug,
3531
3661
  },
3532
3662
  { abortEarly: false, allowUnknown: true }
3533
3663
  );
@@ -3538,16 +3668,17 @@ class Content {
3538
3668
  // Showing warrnings if extra unknown parameters are found
3539
3669
  const {
3540
3670
  error: warrning,
3541
- } = ContentPlatformApplicationValidator.getAppCustomObject().validate(
3671
+ } = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate(
3542
3672
  {
3543
- metaobjectId,
3673
+ definitionSlug,
3674
+ slug,
3544
3675
  },
3545
3676
  { abortEarly: false, allowUnknown: false }
3546
3677
  );
3547
3678
  if (warrning) {
3548
3679
  Logger({
3549
3680
  level: "WARN",
3550
- message: `Parameter Validation warrnings for platform > Content > getAppCustomObject \n ${warrning}`,
3681
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectBySlug \n ${warrning}`,
3551
3682
  });
3552
3683
  }
3553
3684
 
@@ -3556,7 +3687,7 @@ class Content {
3556
3687
  const response = await PlatformAPIClient.execute(
3557
3688
  this.config,
3558
3689
  "get",
3559
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`,
3690
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
3560
3691
  query_params,
3561
3692
  undefined,
3562
3693
  requestHeaders,
@@ -3570,7 +3701,7 @@ class Content {
3570
3701
 
3571
3702
  const {
3572
3703
  error: res_error,
3573
- } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
3704
+ } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
3574
3705
  abortEarly: false,
3575
3706
  allowUnknown: true,
3576
3707
  });
@@ -3581,7 +3712,7 @@ class Content {
3581
3712
  } else {
3582
3713
  Logger({
3583
3714
  level: "WARN",
3584
- message: `Response Validation Warnings for platform > Content > getAppCustomObject \n ${res_error}`,
3715
+ message: `Response Validation Warnings for platform > Content > getAppCustomObjectBySlug \n ${res_error}`,
3585
3716
  });
3586
3717
  }
3587
3718
  }
@@ -3590,26 +3721,27 @@ class Content {
3590
3721
  }
3591
3722
 
3592
3723
  /**
3593
- * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg
3724
+ * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionBySlugParam} arg
3594
3725
  * - Arg object
3595
3726
  *
3596
3727
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3597
3728
  * @param {import("../PlatformAPIClient").Options} - Options
3598
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
3599
- * Success response
3600
- * @name getAppCustomObjectDefinition
3729
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
3730
+ * - Success response
3731
+ *
3732
+ * @name getAppCustomObjectDefinitionBySlug
3601
3733
  * @summary: Get custom object definition
3602
- * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/).
3734
+ * @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/getAppCustomObjectDefinitionBySlug/).
3603
3735
  */
3604
- async getAppCustomObjectDefinition(
3605
- { definitionId, requestHeaders } = { requestHeaders: {} },
3736
+ async getAppCustomObjectDefinitionBySlug(
3737
+ { slug, requestHeaders } = { requestHeaders: {} },
3606
3738
  { responseHeaders } = { responseHeaders: false }
3607
3739
  ) {
3608
3740
  const {
3609
3741
  error,
3610
- } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate(
3742
+ } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate(
3611
3743
  {
3612
- definitionId,
3744
+ slug,
3613
3745
  },
3614
3746
  { abortEarly: false, allowUnknown: true }
3615
3747
  );
@@ -3620,16 +3752,16 @@ class Content {
3620
3752
  // Showing warrnings if extra unknown parameters are found
3621
3753
  const {
3622
3754
  error: warrning,
3623
- } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate(
3755
+ } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate(
3624
3756
  {
3625
- definitionId,
3757
+ slug,
3626
3758
  },
3627
3759
  { abortEarly: false, allowUnknown: false }
3628
3760
  );
3629
3761
  if (warrning) {
3630
3762
  Logger({
3631
3763
  level: "WARN",
3632
- message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinition \n ${warrning}`,
3764
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${warrning}`,
3633
3765
  });
3634
3766
  }
3635
3767
 
@@ -3638,7 +3770,7 @@ class Content {
3638
3770
  const response = await PlatformAPIClient.execute(
3639
3771
  this.config,
3640
3772
  "get",
3641
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`,
3773
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
3642
3774
  query_params,
3643
3775
  undefined,
3644
3776
  requestHeaders,
@@ -3652,7 +3784,7 @@ class Content {
3652
3784
 
3653
3785
  const {
3654
3786
  error: res_error,
3655
- } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
3787
+ } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
3656
3788
  responseData,
3657
3789
  { abortEarly: false, allowUnknown: true }
3658
3790
  );
@@ -3663,7 +3795,7 @@ class Content {
3663
3795
  } else {
3664
3796
  Logger({
3665
3797
  level: "WARN",
3666
- message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinition \n ${res_error}`,
3798
+ message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${res_error}`,
3667
3799
  });
3668
3800
  }
3669
3801
  }
@@ -3727,7 +3859,7 @@ class Content {
3727
3859
  const response = await PlatformAPIClient.execute(
3728
3860
  this.config,
3729
3861
  "get",
3730
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`,
3862
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`,
3731
3863
  query_params,
3732
3864
  undefined,
3733
3865
  requestHeaders,
@@ -3761,27 +3893,29 @@ class Content {
3761
3893
  }
3762
3894
 
3763
3895
  /**
3764
- * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg
3896
+ * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsBySlugParam} arg
3765
3897
  * - Arg object
3766
3898
  *
3767
3899
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3768
3900
  * @param {import("../PlatformAPIClient").Options} - Options
3769
3901
  * @returns {Promise<ContentPlatformModel.CustomObjectsSchema>} - Success response
3770
- * @name getAppCustomObjects
3902
+ * @name getAppCustomObjectsBySlug
3771
3903
  * @summary: Get list of custom objects
3772
- * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/).
3904
+ * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectsBySlug/).
3773
3905
  */
3774
- async getAppCustomObjects(
3775
- { pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} },
3906
+ async getAppCustomObjectsBySlug(
3907
+ { pageNo, pageSize, definitionSlug, requestHeaders } = {
3908
+ requestHeaders: {},
3909
+ },
3776
3910
  { responseHeaders } = { responseHeaders: false }
3777
3911
  ) {
3778
3912
  const {
3779
3913
  error,
3780
- } = ContentPlatformApplicationValidator.getAppCustomObjects().validate(
3914
+ } = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate(
3781
3915
  {
3782
3916
  pageNo,
3783
3917
  pageSize,
3784
- definitionId,
3918
+ definitionSlug,
3785
3919
  },
3786
3920
  { abortEarly: false, allowUnknown: true }
3787
3921
  );
@@ -3792,30 +3926,29 @@ class Content {
3792
3926
  // Showing warrnings if extra unknown parameters are found
3793
3927
  const {
3794
3928
  error: warrning,
3795
- } = ContentPlatformApplicationValidator.getAppCustomObjects().validate(
3929
+ } = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate(
3796
3930
  {
3797
3931
  pageNo,
3798
3932
  pageSize,
3799
- definitionId,
3933
+ definitionSlug,
3800
3934
  },
3801
3935
  { abortEarly: false, allowUnknown: false }
3802
3936
  );
3803
3937
  if (warrning) {
3804
3938
  Logger({
3805
3939
  level: "WARN",
3806
- message: `Parameter Validation warrnings for platform > Content > getAppCustomObjects \n ${warrning}`,
3940
+ message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectsBySlug \n ${warrning}`,
3807
3941
  });
3808
3942
  }
3809
3943
 
3810
3944
  const query_params = {};
3811
- query_params["definition_id"] = definitionId;
3812
3945
  query_params["page_no"] = pageNo;
3813
3946
  query_params["page_size"] = pageSize;
3814
3947
 
3815
3948
  const response = await PlatformAPIClient.execute(
3816
3949
  this.config,
3817
3950
  "get",
3818
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`,
3951
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`,
3819
3952
  query_params,
3820
3953
  undefined,
3821
3954
  requestHeaders,
@@ -3840,7 +3973,7 @@ class Content {
3840
3973
  } else {
3841
3974
  Logger({
3842
3975
  level: "WARN",
3843
- message: `Response Validation Warnings for platform > Content > getAppCustomObjects \n ${res_error}`,
3976
+ message: `Response Validation Warnings for platform > Content > getAppCustomObjectsBySlug \n ${res_error}`,
3844
3977
  });
3845
3978
  }
3846
3979
  }
@@ -4090,7 +4223,7 @@ class Content {
4090
4223
  * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object
4091
4224
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4092
4225
  * @param {import("../PlatformAPIClient").Options} - Options
4093
- * @returns {Promise<ContentPlatformModel.BlogGetResponse>} - Success response
4226
+ * @returns {Promise<ContentPlatformModel.BlogGetDetails>} - Success response
4094
4227
  * @name getBlogs
4095
4228
  * @summary: List blogs
4096
4229
  * @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/).
@@ -4165,7 +4298,7 @@ class Content {
4165
4298
 
4166
4299
  const {
4167
4300
  error: res_error,
4168
- } = ContentPlatformModel.BlogGetResponse().validate(responseData, {
4301
+ } = ContentPlatformModel.BlogGetDetails().validate(responseData, {
4169
4302
  abortEarly: false,
4170
4303
  allowUnknown: true,
4171
4304
  });
@@ -4347,7 +4480,7 @@ class Content {
4347
4480
  *
4348
4481
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4349
4482
  * @param {import("../PlatformAPIClient").Options} - Options
4350
- * @returns {Promise<ContentPlatformModel.DefaultNavigationResponse>} -
4483
+ * @returns {Promise<ContentPlatformModel.DefaultNavigationDetails>} -
4351
4484
  * Success response
4352
4485
  * @name getDefaultNavigations
4353
4486
  * @summary: Get default navigations
@@ -4400,10 +4533,10 @@ class Content {
4400
4533
 
4401
4534
  const {
4402
4535
  error: res_error,
4403
- } = ContentPlatformModel.DefaultNavigationResponse().validate(
4404
- responseData,
4405
- { abortEarly: false, allowUnknown: true }
4406
- );
4536
+ } = ContentPlatformModel.DefaultNavigationDetails().validate(responseData, {
4537
+ abortEarly: false,
4538
+ allowUnknown: true,
4539
+ });
4407
4540
 
4408
4541
  if (res_error) {
4409
4542
  if (this.config.options.strictResponseCheck === true) {
@@ -4501,6 +4634,83 @@ class Content {
4501
4634
  return response;
4502
4635
  }
4503
4636
 
4637
+ /**
4638
+ * @param {ContentPlatformApplicationValidator.GetDefaultSitemapConfigParam} arg
4639
+ * - Arg object
4640
+ *
4641
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4642
+ * @param {import("../PlatformAPIClient").Options} - Options
4643
+ * @returns {Promise<ContentPlatformModel.DefaultSitemapConfig>} - Success response
4644
+ * @name getDefaultSitemapConfig
4645
+ * @summary: Get default sitemap configuration
4646
+ * @description: Retrieves the current default sitemap configuration settings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultSitemapConfig/).
4647
+ */
4648
+ async getDefaultSitemapConfig(
4649
+ { requestHeaders } = { requestHeaders: {} },
4650
+ { responseHeaders } = { responseHeaders: false }
4651
+ ) {
4652
+ const {
4653
+ error,
4654
+ } = ContentPlatformApplicationValidator.getDefaultSitemapConfig().validate(
4655
+ {},
4656
+ { abortEarly: false, allowUnknown: true }
4657
+ );
4658
+ if (error) {
4659
+ return Promise.reject(new FDKClientValidationError(error));
4660
+ }
4661
+
4662
+ // Showing warrnings if extra unknown parameters are found
4663
+ const {
4664
+ error: warrning,
4665
+ } = ContentPlatformApplicationValidator.getDefaultSitemapConfig().validate(
4666
+ {},
4667
+ { abortEarly: false, allowUnknown: false }
4668
+ );
4669
+ if (warrning) {
4670
+ Logger({
4671
+ level: "WARN",
4672
+ message: `Parameter Validation warrnings for platform > Content > getDefaultSitemapConfig \n ${warrning}`,
4673
+ });
4674
+ }
4675
+
4676
+ const query_params = {};
4677
+
4678
+ const response = await PlatformAPIClient.execute(
4679
+ this.config,
4680
+ "get",
4681
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemap/default`,
4682
+ query_params,
4683
+ undefined,
4684
+ requestHeaders,
4685
+ { responseHeaders }
4686
+ );
4687
+
4688
+ let responseData = response;
4689
+ if (responseHeaders) {
4690
+ responseData = response[0];
4691
+ }
4692
+
4693
+ const {
4694
+ error: res_error,
4695
+ } = ContentPlatformModel.DefaultSitemapConfig().validate(responseData, {
4696
+ abortEarly: false,
4697
+ allowUnknown: true,
4698
+ });
4699
+
4700
+ if (res_error) {
4701
+ if (this.config.options.strictResponseCheck === true) {
4702
+ return Promise.reject(new FDKResponseValidationError(res_error));
4703
+ } else {
4704
+ Logger({
4705
+ level: "WARN",
4706
+ message: `Response Validation Warnings for platform > Content > getDefaultSitemapConfig \n ${res_error}`,
4707
+ });
4708
+ }
4709
+ }
4710
+
4711
+ return response;
4712
+ }
4713
+
4504
4714
  /**
4505
4715
  * @param {ContentPlatformApplicationValidator.GetFaqByIdOrSlugParam} arg - Arg object
4506
4716
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -4904,7 +5114,7 @@ class Content {
4904
5114
  * @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
4905
5115
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4906
5116
  * @param {import("../PlatformAPIClient").Options} - Options
4907
- * @returns {Promise<ContentPlatformModel.LandingPageGetResponse>} - Success response
5117
+ * @returns {Promise<ContentPlatformModel.LandingPageGetDetails>} - Success response
4908
5118
  * @name getLandingPages
4909
5119
  * @summary: Get landing pages
4910
5120
  * @description: Lists a list landing pages as per device types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/).
@@ -4964,7 +5174,7 @@ class Content {
4964
5174
 
4965
5175
  const {
4966
5176
  error: res_error,
4967
- } = ContentPlatformModel.LandingPageGetResponse().validate(responseData, {
5177
+ } = ContentPlatformModel.LandingPageGetDetails().validate(responseData, {
4968
5178
  abortEarly: false,
4969
5179
  allowUnknown: true,
4970
5180
  });
@@ -5148,7 +5358,7 @@ class Content {
5148
5358
  * @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object
5149
5359
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5150
5360
  * @param {import("../PlatformAPIClient").Options} - Options
5151
- * @returns {Promise<ContentPlatformModel.NavigationGetResponse>} - Success response
5361
+ * @returns {Promise<ContentPlatformModel.NavigationGetDetails>} - Success response
5152
5362
  * @name getNavigations
5153
5363
  * @summary: Get navigation items
5154
5364
  * @description: Retrieve a list of navigational elements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/).
@@ -5213,7 +5423,7 @@ class Content {
5213
5423
 
5214
5424
  const {
5215
5425
  error: res_error,
5216
- } = ContentPlatformModel.NavigationGetResponse().validate(responseData, {
5426
+ } = ContentPlatformModel.NavigationGetDetails().validate(responseData, {
5217
5427
  abortEarly: false,
5218
5428
  allowUnknown: true,
5219
5429
  });
@@ -5465,7 +5675,7 @@ class Content {
5465
5675
  * @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object
5466
5676
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5467
5677
  * @param {import("../PlatformAPIClient").Options} - Options
5468
- * @returns {Promise<ContentPlatformModel.PageGetResponse>} - Success response
5678
+ * @returns {Promise<ContentPlatformModel.PageGetDetails>} - Success response
5469
5679
  * @name getPages
5470
5680
  * @summary: Get pages
5471
5681
  * @description: Retrieve a list of available pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/).
@@ -5523,7 +5733,7 @@ class Content {
5523
5733
 
5524
5734
  const {
5525
5735
  error: res_error,
5526
- } = ContentPlatformModel.PageGetResponse().validate(responseData, {
5736
+ } = ContentPlatformModel.PageGetDetails().validate(responseData, {
5527
5737
  abortEarly: false,
5528
5738
  allowUnknown: true,
5529
5739
  });
@@ -5960,26 +6170,22 @@ class Content {
5960
6170
  }
5961
6171
 
5962
6172
  /**
5963
- * @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg
5964
- * - Arg object
5965
- *
6173
+ * @param {ContentPlatformApplicationValidator.GetSitemapParam} arg - Arg object
5966
6174
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5967
6175
  * @param {import("../PlatformAPIClient").Options} - Options
5968
- * @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
5969
- * @name getSlideshowBySlug
5970
- * @summary: Get Slideshow
5971
- * @description: Use this API to get the details of a slideshow by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshowBySlug/).
6176
+ * @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
6177
+ * @name getSitemap
6178
+ * @summary: Get a specific sitemap configuration
6179
+ * @description: Retrieve a specific sitemap configuration by its name. Returns the complete configuration including the sitemap XML data, activation status, and timestamps.
6180
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSitemap/).
5972
6181
  */
5973
- async getSlideshowBySlug(
5974
- { slug, devicePlatform, requestHeaders } = { requestHeaders: {} },
6182
+ async getSitemap(
6183
+ { name, requestHeaders } = { requestHeaders: {} },
5975
6184
  { responseHeaders } = { responseHeaders: false }
5976
6185
  ) {
5977
- const {
5978
- error,
5979
- } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
6186
+ const { error } = ContentPlatformApplicationValidator.getSitemap().validate(
5980
6187
  {
5981
- slug,
5982
- devicePlatform,
6188
+ name,
5983
6189
  },
5984
6190
  { abortEarly: false, allowUnknown: true }
5985
6191
  );
@@ -5990,27 +6196,25 @@ class Content {
5990
6196
  // Showing warrnings if extra unknown parameters are found
5991
6197
  const {
5992
6198
  error: warrning,
5993
- } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
6199
+ } = ContentPlatformApplicationValidator.getSitemap().validate(
5994
6200
  {
5995
- slug,
5996
- devicePlatform,
6201
+ name,
5997
6202
  },
5998
6203
  { abortEarly: false, allowUnknown: false }
5999
6204
  );
6000
6205
  if (warrning) {
6001
6206
  Logger({
6002
6207
  level: "WARN",
6003
- message: `Parameter Validation warrnings for platform > Content > getSlideshowBySlug \n ${warrning}`,
6208
+ message: `Parameter Validation warrnings for platform > Content > getSitemap \n ${warrning}`,
6004
6209
  });
6005
6210
  }
6006
6211
 
6007
6212
  const query_params = {};
6008
- query_params["device_platform"] = devicePlatform;
6009
6213
 
6010
6214
  const response = await PlatformAPIClient.execute(
6011
6215
  this.config,
6012
6216
  "get",
6013
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${slug}`,
6217
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
6014
6218
  query_params,
6015
6219
  undefined,
6016
6220
  requestHeaders,
@@ -6024,7 +6228,7 @@ class Content {
6024
6228
 
6025
6229
  const {
6026
6230
  error: res_error,
6027
- } = ContentPlatformModel.SlideshowSchema().validate(responseData, {
6231
+ } = ContentPlatformModel.SitemapConfig().validate(responseData, {
6028
6232
  abortEarly: false,
6029
6233
  allowUnknown: true,
6030
6234
  });
@@ -6035,7 +6239,7 @@ class Content {
6035
6239
  } else {
6036
6240
  Logger({
6037
6241
  level: "WARN",
6038
- message: `Response Validation Warnings for platform > Content > getSlideshowBySlug \n ${res_error}`,
6242
+ message: `Response Validation Warnings for platform > Content > getSitemap \n ${res_error}`,
6039
6243
  });
6040
6244
  }
6041
6245
  }
@@ -6044,27 +6248,30 @@ class Content {
6044
6248
  }
6045
6249
 
6046
6250
  /**
6047
- * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object
6251
+ * @param {ContentPlatformApplicationValidator.GetSitemapsParam} arg - Arg object
6048
6252
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6049
6253
  * @param {import("../PlatformAPIClient").Options} - Options
6050
- * @returns {Promise<ContentPlatformModel.SlideshowGetResponse>} - Success response
6051
- * @name getSlideshows
6052
- * @summary: List Slideshows
6053
- * @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/).
6254
+ * @returns {Promise<ContentPlatformModel.SitemapConfigurationList>} -
6255
+ * Success response
6256
+ * @name getSitemaps
6257
+ * @summary: List sitemap configurations
6258
+ * @description: Retrieve a list of sitemap configurations for a specific company and application. Each configuration contains the sitemap XML data and its activation status.
6259
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSitemaps/).
6054
6260
  */
6055
- async getSlideshows(
6056
- { devicePlatform, pageNo, pageSize, requestHeaders } = {
6261
+ async getSitemaps(
6262
+ { pageNo, pageSize, isActive, name, requestHeaders } = {
6057
6263
  requestHeaders: {},
6058
6264
  },
6059
6265
  { responseHeaders } = { responseHeaders: false }
6060
6266
  ) {
6061
6267
  const {
6062
6268
  error,
6063
- } = ContentPlatformApplicationValidator.getSlideshows().validate(
6269
+ } = ContentPlatformApplicationValidator.getSitemaps().validate(
6064
6270
  {
6065
- devicePlatform,
6066
6271
  pageNo,
6067
6272
  pageSize,
6273
+ isActive,
6274
+ name,
6068
6275
  },
6069
6276
  { abortEarly: false, allowUnknown: true }
6070
6277
  );
@@ -6075,30 +6282,32 @@ class Content {
6075
6282
  // Showing warrnings if extra unknown parameters are found
6076
6283
  const {
6077
6284
  error: warrning,
6078
- } = ContentPlatformApplicationValidator.getSlideshows().validate(
6285
+ } = ContentPlatformApplicationValidator.getSitemaps().validate(
6079
6286
  {
6080
- devicePlatform,
6081
6287
  pageNo,
6082
6288
  pageSize,
6289
+ isActive,
6290
+ name,
6083
6291
  },
6084
6292
  { abortEarly: false, allowUnknown: false }
6085
6293
  );
6086
6294
  if (warrning) {
6087
6295
  Logger({
6088
6296
  level: "WARN",
6089
- message: `Parameter Validation warrnings for platform > Content > getSlideshows \n ${warrning}`,
6297
+ message: `Parameter Validation warrnings for platform > Content > getSitemaps \n ${warrning}`,
6090
6298
  });
6091
6299
  }
6092
6300
 
6093
6301
  const query_params = {};
6094
- query_params["device_platform"] = devicePlatform;
6095
6302
  query_params["page_no"] = pageNo;
6096
6303
  query_params["page_size"] = pageSize;
6304
+ query_params["is_active"] = isActive;
6305
+ query_params["name"] = name;
6097
6306
 
6098
6307
  const response = await PlatformAPIClient.execute(
6099
6308
  this.config,
6100
6309
  "get",
6101
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`,
6310
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps`,
6102
6311
  query_params,
6103
6312
  undefined,
6104
6313
  requestHeaders,
@@ -6112,7 +6321,7 @@ class Content {
6112
6321
 
6113
6322
  const {
6114
6323
  error: res_error,
6115
- } = ContentPlatformModel.SlideshowGetResponse().validate(responseData, {
6324
+ } = ContentPlatformModel.SitemapConfigurationList().validate(responseData, {
6116
6325
  abortEarly: false,
6117
6326
  allowUnknown: true,
6118
6327
  });
@@ -6123,7 +6332,7 @@ class Content {
6123
6332
  } else {
6124
6333
  Logger({
6125
6334
  level: "WARN",
6126
- message: `Response Validation Warnings for platform > Content > getSlideshows \n ${res_error}`,
6335
+ message: `Response Validation Warnings for platform > Content > getSitemaps \n ${res_error}`,
6127
6336
  });
6128
6337
  }
6129
6338
  }
@@ -6132,66 +6341,27 @@ class Content {
6132
6341
  }
6133
6342
 
6134
6343
  /**
6135
- * @param {Object} arg - Arg object.
6136
- * @param {string} arg.companyId - Numeric ID allotted to a business account
6137
- * on Fynd Platform
6138
- * @param {string} arg.applicationId - Numeric ID allotted to an application
6139
- * created within a business account.
6140
- * @param {string} arg.devicePlatform - Filter slideshows by platform.
6141
- * Acceptable values are: web, android, ios and all
6142
- * @param {number} [arg.pageSize] - The number of items to retrieve in each
6143
- * page. Default value is 10.
6144
- * @returns {Paginator<ContentPlatformModel.SlideshowGetResponse>}
6145
- * @summary: List Slideshows
6146
- * @description: Use this API to list all Slideshows
6147
- */
6148
- getSlideshowsPaginator({
6149
- companyId,
6150
- applicationId,
6151
- devicePlatform,
6152
- pageSize,
6153
- } = {}) {
6154
- const paginator = new Paginator();
6155
- const callback = async () => {
6156
- const pageId = paginator.nextId;
6157
- const pageNo = paginator.pageNo;
6158
- const pageType = "number";
6159
- const data = await this.getSlideshows({
6160
- companyId: companyId,
6161
- applicationId: applicationId,
6162
- devicePlatform: devicePlatform,
6163
- pageNo: pageNo,
6164
- pageSize: pageSize,
6165
- });
6166
- paginator.setPaginator({
6167
- hasNext: data.page.has_next ? true : false,
6168
- nextId: data.page.next_id,
6169
- });
6170
- return data;
6171
- };
6172
- paginator.setCallback(callback.bind(this));
6173
- return paginator;
6174
- }
6175
-
6176
- /**
6177
- * @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
6344
+ * @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg
6178
6345
  * - Arg object
6179
6346
  *
6180
6347
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6181
6348
  * @param {import("../PlatformAPIClient").Options} - Options
6182
- * @returns {Promise<ContentPlatformModel.Support>} - Success response
6183
- * @name getSupportInformation
6184
- * @summary: Get support information
6185
- * @description: Retrieve information related to customer support. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSupportInformation/).
6349
+ * @returns {Promise<ContentPlatformModel.SlideshowSchema>} - Success response
6350
+ * @name getSlideshowBySlug
6351
+ * @summary: Get Slideshow
6352
+ * @description: Use this API to get the details of a slideshow by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshowBySlug/).
6186
6353
  */
6187
- async getSupportInformation(
6188
- { requestHeaders } = { requestHeaders: {} },
6354
+ async getSlideshowBySlug(
6355
+ { slug, devicePlatform, requestHeaders } = { requestHeaders: {} },
6189
6356
  { responseHeaders } = { responseHeaders: false }
6190
6357
  ) {
6191
6358
  const {
6192
6359
  error,
6193
- } = ContentPlatformApplicationValidator.getSupportInformation().validate(
6194
- {},
6360
+ } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
6361
+ {
6362
+ slug,
6363
+ devicePlatform,
6364
+ },
6195
6365
  { abortEarly: false, allowUnknown: true }
6196
6366
  );
6197
6367
  if (error) {
@@ -6201,23 +6371,27 @@ class Content {
6201
6371
  // Showing warrnings if extra unknown parameters are found
6202
6372
  const {
6203
6373
  error: warrning,
6204
- } = ContentPlatformApplicationValidator.getSupportInformation().validate(
6205
- {},
6374
+ } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate(
6375
+ {
6376
+ slug,
6377
+ devicePlatform,
6378
+ },
6206
6379
  { abortEarly: false, allowUnknown: false }
6207
6380
  );
6208
6381
  if (warrning) {
6209
6382
  Logger({
6210
6383
  level: "WARN",
6211
- message: `Parameter Validation warrnings for platform > Content > getSupportInformation \n ${warrning}`,
6384
+ message: `Parameter Validation warrnings for platform > Content > getSlideshowBySlug \n ${warrning}`,
6212
6385
  });
6213
6386
  }
6214
6387
 
6215
6388
  const query_params = {};
6389
+ query_params["device_platform"] = devicePlatform;
6216
6390
 
6217
6391
  const response = await PlatformAPIClient.execute(
6218
6392
  this.config,
6219
6393
  "get",
6220
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`,
6394
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${slug}`,
6221
6395
  query_params,
6222
6396
  undefined,
6223
6397
  requestHeaders,
@@ -6231,7 +6405,7 @@ class Content {
6231
6405
 
6232
6406
  const {
6233
6407
  error: res_error,
6234
- } = ContentPlatformModel.Support().validate(responseData, {
6408
+ } = ContentPlatformModel.SlideshowSchema().validate(responseData, {
6235
6409
  abortEarly: false,
6236
6410
  allowUnknown: true,
6237
6411
  });
@@ -6242,7 +6416,7 @@ class Content {
6242
6416
  } else {
6243
6417
  Logger({
6244
6418
  level: "WARN",
6245
- message: `Response Validation Warnings for platform > Content > getSupportInformation \n ${res_error}`,
6419
+ message: `Response Validation Warnings for platform > Content > getSlideshowBySlug \n ${res_error}`,
6246
6420
  });
6247
6421
  }
6248
6422
  }
@@ -6251,27 +6425,192 @@ class Content {
6251
6425
  }
6252
6426
 
6253
6427
  /**
6254
- * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg
6255
- * - Arg object
6256
- *
6428
+ * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object
6257
6429
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6258
6430
  * @param {import("../PlatformAPIClient").Options} - Options
6259
- * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadResponse>}
6260
- * - Success response
6261
- *
6262
- * @name importAppCustomObjectEntries
6263
- * @summary: Bulk custom object entries upload
6264
- * @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/importAppCustomObjectEntries/).
6431
+ * @returns {Promise<ContentPlatformModel.SlideshowGetDetails>} - Success response
6432
+ * @name getSlideshows
6433
+ * @summary: List Slideshows
6434
+ * @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/).
6265
6435
  */
6266
- async importAppCustomObjectEntries(
6267
- { definitionId, body, requestHeaders } = { requestHeaders: {} },
6436
+ async getSlideshows(
6437
+ { devicePlatform, pageNo, pageSize, requestHeaders } = {
6438
+ requestHeaders: {},
6439
+ },
6268
6440
  { responseHeaders } = { responseHeaders: false }
6269
6441
  ) {
6270
6442
  const {
6271
6443
  error,
6272
- } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate(
6444
+ } = ContentPlatformApplicationValidator.getSlideshows().validate(
6273
6445
  {
6274
- definitionId,
6446
+ devicePlatform,
6447
+ pageNo,
6448
+ pageSize,
6449
+ },
6450
+ { abortEarly: false, allowUnknown: true }
6451
+ );
6452
+ if (error) {
6453
+ return Promise.reject(new FDKClientValidationError(error));
6454
+ }
6455
+
6456
+ // Showing warrnings if extra unknown parameters are found
6457
+ const {
6458
+ error: warrning,
6459
+ } = ContentPlatformApplicationValidator.getSlideshows().validate(
6460
+ {
6461
+ devicePlatform,
6462
+ pageNo,
6463
+ pageSize,
6464
+ },
6465
+ { abortEarly: false, allowUnknown: false }
6466
+ );
6467
+ if (warrning) {
6468
+ Logger({
6469
+ level: "WARN",
6470
+ message: `Parameter Validation warrnings for platform > Content > getSlideshows \n ${warrning}`,
6471
+ });
6472
+ }
6473
+
6474
+ const query_params = {};
6475
+ query_params["device_platform"] = devicePlatform;
6476
+ query_params["page_no"] = pageNo;
6477
+ query_params["page_size"] = pageSize;
6478
+
6479
+ const response = await PlatformAPIClient.execute(
6480
+ this.config,
6481
+ "get",
6482
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`,
6483
+ query_params,
6484
+ undefined,
6485
+ requestHeaders,
6486
+ { responseHeaders }
6487
+ );
6488
+
6489
+ let responseData = response;
6490
+ if (responseHeaders) {
6491
+ responseData = response[0];
6492
+ }
6493
+
6494
+ const {
6495
+ error: res_error,
6496
+ } = ContentPlatformModel.SlideshowGetDetails().validate(responseData, {
6497
+ abortEarly: false,
6498
+ allowUnknown: true,
6499
+ });
6500
+
6501
+ if (res_error) {
6502
+ if (this.config.options.strictResponseCheck === true) {
6503
+ return Promise.reject(new FDKResponseValidationError(res_error));
6504
+ } else {
6505
+ Logger({
6506
+ level: "WARN",
6507
+ message: `Response Validation Warnings for platform > Content > getSlideshows \n ${res_error}`,
6508
+ });
6509
+ }
6510
+ }
6511
+
6512
+ return response;
6513
+ }
6514
+
6515
+ /**
6516
+ * @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg
6517
+ * - Arg object
6518
+ *
6519
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6520
+ * @param {import("../PlatformAPIClient").Options} - Options
6521
+ * @returns {Promise<ContentPlatformModel.Support>} - Success response
6522
+ * @name getSupportInformation
6523
+ * @summary: Get support information
6524
+ * @description: Retrieve information related to customer support. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSupportInformation/).
6525
+ */
6526
+ async getSupportInformation(
6527
+ { requestHeaders } = { requestHeaders: {} },
6528
+ { responseHeaders } = { responseHeaders: false }
6529
+ ) {
6530
+ const {
6531
+ error,
6532
+ } = ContentPlatformApplicationValidator.getSupportInformation().validate(
6533
+ {},
6534
+ { abortEarly: false, allowUnknown: true }
6535
+ );
6536
+ if (error) {
6537
+ return Promise.reject(new FDKClientValidationError(error));
6538
+ }
6539
+
6540
+ // Showing warrnings if extra unknown parameters are found
6541
+ const {
6542
+ error: warrning,
6543
+ } = ContentPlatformApplicationValidator.getSupportInformation().validate(
6544
+ {},
6545
+ { abortEarly: false, allowUnknown: false }
6546
+ );
6547
+ if (warrning) {
6548
+ Logger({
6549
+ level: "WARN",
6550
+ message: `Parameter Validation warrnings for platform > Content > getSupportInformation \n ${warrning}`,
6551
+ });
6552
+ }
6553
+
6554
+ const query_params = {};
6555
+
6556
+ const response = await PlatformAPIClient.execute(
6557
+ this.config,
6558
+ "get",
6559
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`,
6560
+ query_params,
6561
+ undefined,
6562
+ requestHeaders,
6563
+ { responseHeaders }
6564
+ );
6565
+
6566
+ let responseData = response;
6567
+ if (responseHeaders) {
6568
+ responseData = response[0];
6569
+ }
6570
+
6571
+ const {
6572
+ error: res_error,
6573
+ } = ContentPlatformModel.Support().validate(responseData, {
6574
+ abortEarly: false,
6575
+ allowUnknown: true,
6576
+ });
6577
+
6578
+ if (res_error) {
6579
+ if (this.config.options.strictResponseCheck === true) {
6580
+ return Promise.reject(new FDKResponseValidationError(res_error));
6581
+ } else {
6582
+ Logger({
6583
+ level: "WARN",
6584
+ message: `Response Validation Warnings for platform > Content > getSupportInformation \n ${res_error}`,
6585
+ });
6586
+ }
6587
+ }
6588
+
6589
+ return response;
6590
+ }
6591
+
6592
+ /**
6593
+ * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam} arg
6594
+ * - Arg object
6595
+ *
6596
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6597
+ * @param {import("../PlatformAPIClient").Options} - Options
6598
+ * @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadDetails>}
6599
+ * - Success response
6600
+ *
6601
+ * @name importAppCustomObjectEntriesBySlug
6602
+ * @summary: Bulk custom object entries upload
6603
+ * @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/importAppCustomObjectEntriesBySlug/).
6604
+ */
6605
+ async importAppCustomObjectEntriesBySlug(
6606
+ { slug, body, requestHeaders } = { requestHeaders: {} },
6607
+ { responseHeaders } = { responseHeaders: false }
6608
+ ) {
6609
+ const {
6610
+ error,
6611
+ } = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate(
6612
+ {
6613
+ slug,
6275
6614
  body,
6276
6615
  },
6277
6616
  { abortEarly: false, allowUnknown: true }
@@ -6283,9 +6622,9 @@ class Content {
6283
6622
  // Showing warrnings if extra unknown parameters are found
6284
6623
  const {
6285
6624
  error: warrning,
6286
- } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate(
6625
+ } = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate(
6287
6626
  {
6288
- definitionId,
6627
+ slug,
6289
6628
  body,
6290
6629
  },
6291
6630
  { abortEarly: false, allowUnknown: false }
@@ -6293,7 +6632,7 @@ class Content {
6293
6632
  if (warrning) {
6294
6633
  Logger({
6295
6634
  level: "WARN",
6296
- message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntries \n ${warrning}`,
6635
+ message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${warrning}`,
6297
6636
  });
6298
6637
  }
6299
6638
 
@@ -6302,7 +6641,7 @@ class Content {
6302
6641
  const response = await PlatformAPIClient.execute(
6303
6642
  this.config,
6304
6643
  "post",
6305
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/upload`,
6644
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/upload`,
6306
6645
  query_params,
6307
6646
  body,
6308
6647
  requestHeaders,
@@ -6316,7 +6655,7 @@ class Content {
6316
6655
 
6317
6656
  const {
6318
6657
  error: res_error,
6319
- } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate(
6658
+ } = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate(
6320
6659
  responseData,
6321
6660
  { abortEarly: false, allowUnknown: true }
6322
6661
  );
@@ -6327,7 +6666,7 @@ class Content {
6327
6666
  } else {
6328
6667
  Logger({
6329
6668
  level: "WARN",
6330
- message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntries \n ${res_error}`,
6669
+ message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${res_error}`,
6331
6670
  });
6332
6671
  }
6333
6672
  }
@@ -6341,8 +6680,7 @@ class Content {
6341
6680
  *
6342
6681
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6343
6682
  * @param {import("../PlatformAPIClient").Options} - Options
6344
- * @returns {Promise<ContentPlatformModel.TagDeleteSuccessResponse>} -
6345
- * Success response
6683
+ * @returns {Promise<ContentPlatformModel.TagDeleteSuccessDetails>} - Success response
6346
6684
  * @name removeInjectableTag
6347
6685
  * @summary: Remove HTML tag
6348
6686
  * @description: Delete a specific injectable tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/).
@@ -6398,7 +6736,7 @@ class Content {
6398
6736
 
6399
6737
  const {
6400
6738
  error: res_error,
6401
- } = ContentPlatformModel.TagDeleteSuccessResponse().validate(responseData, {
6739
+ } = ContentPlatformModel.TagDeleteSuccessDetails().validate(responseData, {
6402
6740
  abortEarly: false,
6403
6741
  allowUnknown: true,
6404
6742
  });
@@ -6500,25 +6838,25 @@ class Content {
6500
6838
  }
6501
6839
 
6502
6840
  /**
6503
- * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg
6841
+ * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryBySlugParam} arg
6504
6842
  * - Arg object
6505
6843
  *
6506
6844
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6507
6845
  * @param {import("../PlatformAPIClient").Options} - Options
6508
6846
  * @returns {Promise<string>} - Success response
6509
- * @name sampleAppCustomObjectBulkEntry
6847
+ * @name sampleAppCustomObjectBulkEntryBySlug
6510
6848
  * @summary: Download sample for custom object bulk entry
6511
- * @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/sampleAppCustomObjectBulkEntry/).
6849
+ * @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/sampleAppCustomObjectBulkEntryBySlug/).
6512
6850
  */
6513
- async sampleAppCustomObjectBulkEntry(
6514
- { definitionId, requestHeaders } = { requestHeaders: {} },
6851
+ async sampleAppCustomObjectBulkEntryBySlug(
6852
+ { slug, requestHeaders } = { requestHeaders: {} },
6515
6853
  { responseHeaders } = { responseHeaders: false }
6516
6854
  ) {
6517
6855
  const {
6518
6856
  error,
6519
- } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate(
6857
+ } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate(
6520
6858
  {
6521
- definitionId,
6859
+ slug,
6522
6860
  },
6523
6861
  { abortEarly: false, allowUnknown: true }
6524
6862
  );
@@ -6529,16 +6867,16 @@ class Content {
6529
6867
  // Showing warrnings if extra unknown parameters are found
6530
6868
  const {
6531
6869
  error: warrning,
6532
- } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate(
6870
+ } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate(
6533
6871
  {
6534
- definitionId,
6872
+ slug,
6535
6873
  },
6536
6874
  { abortEarly: false, allowUnknown: false }
6537
6875
  );
6538
6876
  if (warrning) {
6539
6877
  Logger({
6540
6878
  level: "WARN",
6541
- message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${warrning}`,
6879
+ message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${warrning}`,
6542
6880
  });
6543
6881
  }
6544
6882
 
@@ -6547,7 +6885,7 @@ class Content {
6547
6885
  const response = await PlatformAPIClient.execute(
6548
6886
  this.config,
6549
6887
  "get",
6550
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/sample`,
6888
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/sample`,
6551
6889
  query_params,
6552
6890
  undefined,
6553
6891
  requestHeaders,
@@ -6569,7 +6907,7 @@ class Content {
6569
6907
  } else {
6570
6908
  Logger({
6571
6909
  level: "WARN",
6572
- message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${res_error}`,
6910
+ message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${res_error}`,
6573
6911
  });
6574
6912
  }
6575
6913
  }
@@ -6826,7 +7164,94 @@ class Content {
6826
7164
  }
6827
7165
 
6828
7166
  /**
6829
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg
7167
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceSlugParam} arg
7168
+ * - Arg object
7169
+ *
7170
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7171
+ * @param {import("../PlatformAPIClient").Options} - Options
7172
+ * @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
7173
+ * - Success response
7174
+ *
7175
+ * @name updateAppCustomFieldByResourceSlug
7176
+ * @summary: Create custom field entries for gives resource and resource slug
7177
+ * @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/updateAppCustomFieldByResourceSlug/).
7178
+ */
7179
+ async updateAppCustomFieldByResourceSlug(
7180
+ { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
7181
+ { responseHeaders } = { responseHeaders: false }
7182
+ ) {
7183
+ const {
7184
+ error,
7185
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7186
+ {
7187
+ resource,
7188
+ resourceSlug,
7189
+ body,
7190
+ },
7191
+ { abortEarly: false, allowUnknown: true }
7192
+ );
7193
+ if (error) {
7194
+ return Promise.reject(new FDKClientValidationError(error));
7195
+ }
7196
+
7197
+ // Showing warrnings if extra unknown parameters are found
7198
+ const {
7199
+ error: warrning,
7200
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7201
+ {
7202
+ resource,
7203
+ resourceSlug,
7204
+ body,
7205
+ },
7206
+ { abortEarly: false, allowUnknown: false }
7207
+ );
7208
+ if (warrning) {
7209
+ Logger({
7210
+ level: "WARN",
7211
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${warrning}`,
7212
+ });
7213
+ }
7214
+
7215
+ const query_params = {};
7216
+
7217
+ const response = await PlatformAPIClient.execute(
7218
+ this.config,
7219
+ "put",
7220
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
7221
+ query_params,
7222
+ body,
7223
+ requestHeaders,
7224
+ { responseHeaders }
7225
+ );
7226
+
7227
+ let responseData = response;
7228
+ if (responseHeaders) {
7229
+ responseData = response[0];
7230
+ }
7231
+
7232
+ const {
7233
+ error: res_error,
7234
+ } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
7235
+ responseData,
7236
+ { abortEarly: false, allowUnknown: true }
7237
+ );
7238
+
7239
+ if (res_error) {
7240
+ if (this.config.options.strictResponseCheck === true) {
7241
+ return Promise.reject(new FDKResponseValidationError(res_error));
7242
+ } else {
7243
+ Logger({
7244
+ level: "WARN",
7245
+ message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${res_error}`,
7246
+ });
7247
+ }
7248
+ }
7249
+
7250
+ return response;
7251
+ }
7252
+
7253
+ /**
7254
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg
6830
7255
  * - Arg object
6831
7256
  *
6832
7257
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -6834,19 +7259,23 @@ class Content {
6834
7259
  * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
6835
7260
  * - Success response
6836
7261
  *
6837
- * @name updateAppCustomFieldDefinition
7262
+ * @name updateAppCustomFieldDefinitionBySlug
6838
7263
  * @summary: Update custom field definition
6839
- * @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/updateAppCustomFieldDefinition/).
7264
+ * @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/updateAppCustomFieldDefinitionBySlug/).
6840
7265
  */
6841
- async updateAppCustomFieldDefinition(
6842
- { definitionId, body, requestHeaders } = { requestHeaders: {} },
7266
+ async updateAppCustomFieldDefinitionBySlug(
7267
+ { slug, resource, namespace, body, requestHeaders } = {
7268
+ requestHeaders: {},
7269
+ },
6843
7270
  { responseHeaders } = { responseHeaders: false }
6844
7271
  ) {
6845
7272
  const {
6846
7273
  error,
6847
- } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate(
7274
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
6848
7275
  {
6849
- definitionId,
7276
+ slug,
7277
+ resource,
7278
+ namespace,
6850
7279
  body,
6851
7280
  },
6852
7281
  { abortEarly: false, allowUnknown: true }
@@ -6858,9 +7287,11 @@ class Content {
6858
7287
  // Showing warrnings if extra unknown parameters are found
6859
7288
  const {
6860
7289
  error: warrning,
6861
- } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate(
7290
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
6862
7291
  {
6863
- definitionId,
7292
+ slug,
7293
+ resource,
7294
+ namespace,
6864
7295
  body,
6865
7296
  },
6866
7297
  { abortEarly: false, allowUnknown: false }
@@ -6868,7 +7299,7 @@ class Content {
6868
7299
  if (warrning) {
6869
7300
  Logger({
6870
7301
  level: "WARN",
6871
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinition \n ${warrning}`,
7302
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${warrning}`,
6872
7303
  });
6873
7304
  }
6874
7305
 
@@ -6877,7 +7308,7 @@ class Content {
6877
7308
  const response = await PlatformAPIClient.execute(
6878
7309
  this.config,
6879
7310
  "put",
6880
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`,
7311
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
6881
7312
  query_params,
6882
7313
  body,
6883
7314
  requestHeaders,
@@ -6902,7 +7333,7 @@ class Content {
6902
7333
  } else {
6903
7334
  Logger({
6904
7335
  level: "WARN",
6905
- message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinition \n ${res_error}`,
7336
+ message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${res_error}`,
6906
7337
  });
6907
7338
  }
6908
7339
  }
@@ -6911,25 +7342,27 @@ class Content {
6911
7342
  }
6912
7343
 
6913
7344
  /**
6914
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectParam} arg
7345
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg
6915
7346
  * - Arg object
6916
7347
  *
6917
7348
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6918
7349
  * @param {import("../PlatformAPIClient").Options} - Options
6919
- * @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
6920
- * @name updateAppCustomObject
7350
+ * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
7351
+ * Success response
7352
+ * @name updateAppCustomObjectBySlug
6921
7353
  * @summary: Update custom object details
6922
- * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/).
7354
+ * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectBySlug/).
6923
7355
  */
6924
- async updateAppCustomObject(
6925
- { metaobjectId, body, requestHeaders } = { requestHeaders: {} },
7356
+ async updateAppCustomObjectBySlug(
7357
+ { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
6926
7358
  { responseHeaders } = { responseHeaders: false }
6927
7359
  ) {
6928
7360
  const {
6929
7361
  error,
6930
- } = ContentPlatformApplicationValidator.updateAppCustomObject().validate(
7362
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
6931
7363
  {
6932
- metaobjectId,
7364
+ definitionSlug,
7365
+ slug,
6933
7366
  body,
6934
7367
  },
6935
7368
  { abortEarly: false, allowUnknown: true }
@@ -6941,9 +7374,10 @@ class Content {
6941
7374
  // Showing warrnings if extra unknown parameters are found
6942
7375
  const {
6943
7376
  error: warrning,
6944
- } = ContentPlatformApplicationValidator.updateAppCustomObject().validate(
7377
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
6945
7378
  {
6946
- metaobjectId,
7379
+ definitionSlug,
7380
+ slug,
6947
7381
  body,
6948
7382
  },
6949
7383
  { abortEarly: false, allowUnknown: false }
@@ -6951,7 +7385,7 @@ class Content {
6951
7385
  if (warrning) {
6952
7386
  Logger({
6953
7387
  level: "WARN",
6954
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomObject \n ${warrning}`,
7388
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectBySlug \n ${warrning}`,
6955
7389
  });
6956
7390
  }
6957
7391
 
@@ -6960,7 +7394,7 @@ class Content {
6960
7394
  const response = await PlatformAPIClient.execute(
6961
7395
  this.config,
6962
7396
  "put",
6963
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`,
7397
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
6964
7398
  query_params,
6965
7399
  body,
6966
7400
  requestHeaders,
@@ -6974,7 +7408,7 @@ class Content {
6974
7408
 
6975
7409
  const {
6976
7410
  error: res_error,
6977
- } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
7411
+ } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
6978
7412
  abortEarly: false,
6979
7413
  allowUnknown: true,
6980
7414
  });
@@ -6985,7 +7419,7 @@ class Content {
6985
7419
  } else {
6986
7420
  Logger({
6987
7421
  level: "WARN",
6988
- message: `Response Validation Warnings for platform > Content > updateAppCustomObject \n ${res_error}`,
7422
+ message: `Response Validation Warnings for platform > Content > updateAppCustomObjectBySlug \n ${res_error}`,
6989
7423
  });
6990
7424
  }
6991
7425
  }
@@ -6994,26 +7428,27 @@ class Content {
6994
7428
  }
6995
7429
 
6996
7430
  /**
6997
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg
7431
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg
6998
7432
  * - Arg object
6999
7433
  *
7000
7434
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7001
7435
  * @param {import("../PlatformAPIClient").Options} - Options
7002
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
7003
- * Success response
7004
- * @name updateAppCustomObjectDefinition
7436
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
7437
+ * - Success response
7438
+ *
7439
+ * @name updateAppCustomObjectDefinitionBySlug
7005
7440
  * @summary: Update custom object definition
7006
- * @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/updateAppCustomObjectDefinition/).
7441
+ * @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/updateAppCustomObjectDefinitionBySlug/).
7007
7442
  */
7008
- async updateAppCustomObjectDefinition(
7009
- { definitionId, body, requestHeaders } = { requestHeaders: {} },
7443
+ async updateAppCustomObjectDefinitionBySlug(
7444
+ { slug, body, requestHeaders } = { requestHeaders: {} },
7010
7445
  { responseHeaders } = { responseHeaders: false }
7011
7446
  ) {
7012
7447
  const {
7013
7448
  error,
7014
- } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate(
7449
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
7015
7450
  {
7016
- definitionId,
7451
+ slug,
7017
7452
  body,
7018
7453
  },
7019
7454
  { abortEarly: false, allowUnknown: true }
@@ -7025,9 +7460,9 @@ class Content {
7025
7460
  // Showing warrnings if extra unknown parameters are found
7026
7461
  const {
7027
7462
  error: warrning,
7028
- } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate(
7463
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
7029
7464
  {
7030
- definitionId,
7465
+ slug,
7031
7466
  body,
7032
7467
  },
7033
7468
  { abortEarly: false, allowUnknown: false }
@@ -7035,7 +7470,7 @@ class Content {
7035
7470
  if (warrning) {
7036
7471
  Logger({
7037
7472
  level: "WARN",
7038
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinition \n ${warrning}`,
7473
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${warrning}`,
7039
7474
  });
7040
7475
  }
7041
7476
 
@@ -7044,7 +7479,7 @@ class Content {
7044
7479
  const response = await PlatformAPIClient.execute(
7045
7480
  this.config,
7046
7481
  "put",
7047
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`,
7482
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
7048
7483
  query_params,
7049
7484
  body,
7050
7485
  requestHeaders,
@@ -7058,7 +7493,7 @@ class Content {
7058
7493
 
7059
7494
  const {
7060
7495
  error: res_error,
7061
- } = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
7496
+ } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
7062
7497
  responseData,
7063
7498
  { abortEarly: false, allowUnknown: true }
7064
7499
  );
@@ -7069,7 +7504,7 @@ class Content {
7069
7504
  } else {
7070
7505
  Logger({
7071
7506
  level: "WARN",
7072
- message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinition \n ${res_error}`,
7507
+ message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${res_error}`,
7073
7508
  });
7074
7509
  }
7075
7510
  }
@@ -7156,6 +7591,87 @@ class Content {
7156
7591
  return response;
7157
7592
  }
7158
7593
 
7594
+ /**
7595
+ * @param {ContentPlatformApplicationValidator.UpdateDefaultSitemapConfigParam} arg
7596
+ * - Arg object
7597
+ *
7598
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7599
+ * @param {import("../PlatformAPIClient").Options} - Options
7600
+ * @returns {Promise<ContentPlatformModel.DefaultSitemapConfig>} - Success response
7601
+ * @name updateDefaultSitemapConfig
7602
+ * @summary: Update default sitemap configuration
7603
+ * @description: Updates the default sitemap configuration settings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateDefaultSitemapConfig/).
7604
+ */
7605
+ async updateDefaultSitemapConfig(
7606
+ { body, requestHeaders } = { requestHeaders: {} },
7607
+ { responseHeaders } = { responseHeaders: false }
7608
+ ) {
7609
+ const {
7610
+ error,
7611
+ } = ContentPlatformApplicationValidator.updateDefaultSitemapConfig().validate(
7612
+ {
7613
+ body,
7614
+ },
7615
+ { abortEarly: false, allowUnknown: true }
7616
+ );
7617
+ if (error) {
7618
+ return Promise.reject(new FDKClientValidationError(error));
7619
+ }
7620
+
7621
+ // Showing warrnings if extra unknown parameters are found
7622
+ const {
7623
+ error: warrning,
7624
+ } = ContentPlatformApplicationValidator.updateDefaultSitemapConfig().validate(
7625
+ {
7626
+ body,
7627
+ },
7628
+ { abortEarly: false, allowUnknown: false }
7629
+ );
7630
+ if (warrning) {
7631
+ Logger({
7632
+ level: "WARN",
7633
+ message: `Parameter Validation warrnings for platform > Content > updateDefaultSitemapConfig \n ${warrning}`,
7634
+ });
7635
+ }
7636
+
7637
+ const query_params = {};
7638
+
7639
+ const response = await PlatformAPIClient.execute(
7640
+ this.config,
7641
+ "put",
7642
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemap/default`,
7643
+ query_params,
7644
+ body,
7645
+ requestHeaders,
7646
+ { responseHeaders }
7647
+ );
7648
+
7649
+ let responseData = response;
7650
+ if (responseHeaders) {
7651
+ responseData = response[0];
7652
+ }
7653
+
7654
+ const {
7655
+ error: res_error,
7656
+ } = ContentPlatformModel.DefaultSitemapConfig().validate(responseData, {
7657
+ abortEarly: false,
7658
+ allowUnknown: true,
7659
+ });
7660
+
7661
+ if (res_error) {
7662
+ if (this.config.options.strictResponseCheck === true) {
7663
+ return Promise.reject(new FDKResponseValidationError(res_error));
7664
+ } else {
7665
+ Logger({
7666
+ level: "WARN",
7667
+ message: `Response Validation Warnings for platform > Content > updateDefaultSitemapConfig \n ${res_error}`,
7668
+ });
7669
+ }
7670
+ }
7671
+
7672
+ return response;
7673
+ }
7674
+
7159
7675
  /**
7160
7676
  * @param {ContentPlatformApplicationValidator.UpdateFaqParam} arg - Arg object
7161
7677
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -7972,6 +8488,88 @@ class Content {
7972
8488
  return response;
7973
8489
  }
7974
8490
 
8491
+ /**
8492
+ * @param {ContentPlatformApplicationValidator.UpdateSitemapParam} arg - Arg object
8493
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
8494
+ * @param {import("../PlatformAPIClient").Options} - Options
8495
+ * @returns {Promise<ContentPlatformModel.SitemapConfig>} - Success response
8496
+ * @name updateSitemap
8497
+ * @summary: Update a specific sitemap configuration
8498
+ * @description: Update an existing sitemap configuration identified by its name. You can update the activation status and/or the sitemap XML data. The name cannot be modified once the configuration is created. The updated sitemap XML data must be valid XML following the sitemap protocol specification.
8499
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateSitemap/).
8500
+ */
8501
+ async updateSitemap(
8502
+ { name, body, requestHeaders } = { requestHeaders: {} },
8503
+ { responseHeaders } = { responseHeaders: false }
8504
+ ) {
8505
+ const {
8506
+ error,
8507
+ } = ContentPlatformApplicationValidator.updateSitemap().validate(
8508
+ {
8509
+ name,
8510
+ body,
8511
+ },
8512
+ { abortEarly: false, allowUnknown: true }
8513
+ );
8514
+ if (error) {
8515
+ return Promise.reject(new FDKClientValidationError(error));
8516
+ }
8517
+
8518
+ // Showing warrnings if extra unknown parameters are found
8519
+ const {
8520
+ error: warrning,
8521
+ } = ContentPlatformApplicationValidator.updateSitemap().validate(
8522
+ {
8523
+ name,
8524
+ body,
8525
+ },
8526
+ { abortEarly: false, allowUnknown: false }
8527
+ );
8528
+ if (warrning) {
8529
+ Logger({
8530
+ level: "WARN",
8531
+ message: `Parameter Validation warrnings for platform > Content > updateSitemap \n ${warrning}`,
8532
+ });
8533
+ }
8534
+
8535
+ const query_params = {};
8536
+
8537
+ const response = await PlatformAPIClient.execute(
8538
+ this.config,
8539
+ "put",
8540
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/sitemaps/${name}`,
8541
+ query_params,
8542
+ body,
8543
+ requestHeaders,
8544
+ { responseHeaders }
8545
+ );
8546
+
8547
+ let responseData = response;
8548
+ if (responseHeaders) {
8549
+ responseData = response[0];
8550
+ }
8551
+
8552
+ const {
8553
+ error: res_error,
8554
+ } = ContentPlatformModel.SitemapConfig().validate(responseData, {
8555
+ abortEarly: false,
8556
+ allowUnknown: true,
8557
+ });
8558
+
8559
+ if (res_error) {
8560
+ if (this.config.options.strictResponseCheck === true) {
8561
+ return Promise.reject(new FDKResponseValidationError(res_error));
8562
+ } else {
8563
+ Logger({
8564
+ level: "WARN",
8565
+ message: `Response Validation Warnings for platform > Content > updateSitemap \n ${res_error}`,
8566
+ });
8567
+ }
8568
+ }
8569
+
8570
+ return response;
8571
+ }
8572
+
7975
8573
  /**
7976
8574
  * @param {ContentPlatformApplicationValidator.UpdateSlideshowParam} arg - Arg object
7977
8575
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`