@gofynd/fdk-client-javascript 1.6.3 → 2.0.0

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 (146) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
  4. package/sdk/application/Cart/CartApplicationClient.js +26 -268
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
  7. package/sdk/application/Common/CommonApplicationClient.js +1 -16
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
  10. package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
  12. package/sdk/application/Content/ContentApplicationClient.js +222 -191
  13. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  15. package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
  16. package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
  17. package/sdk/application/Lead/LeadApplicationClient.js +21 -52
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
  20. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
  21. package/sdk/application/Order/OrderApplicationClient.js +68 -153
  22. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
  23. package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
  24. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
  25. package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
  26. package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
  27. package/sdk/application/Share/ShareApplicationClient.js +21 -75
  28. package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
  29. package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
  30. package/sdk/application/User/UserApplicationClient.js +1 -407
  31. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
  32. package/sdk/common/Utility.d.ts +1 -1
  33. package/sdk/common/Utility.js +4 -4
  34. package/sdk/common/Validator.d.ts +1 -0
  35. package/sdk/common/Validator.js +20 -0
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
  38. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
  40. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
  41. package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
  42. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
  43. package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
  46. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +64 -1
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +36 -0
  49. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
  51. package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
  52. package/sdk/platform/Cart/CartPlatformModel.js +38 -5
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
  57. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
  58. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
  63. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
  65. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
  67. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
  74. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
  75. package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
  76. package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
  77. package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
  78. package/sdk/platform/Content/ContentPlatformModel.js +717 -34
  79. package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
  80. package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
  81. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
  82. package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
  83. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
  84. package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
  85. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
  86. package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
  87. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
  88. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
  89. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
  90. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
  91. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
  92. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
  93. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
  94. package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
  95. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  98. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  99. package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
  100. package/sdk/platform/Order/OrderPlatformClient.js +397 -0
  101. package/sdk/platform/Order/OrderPlatformModel.d.ts +66 -10
  102. package/sdk/platform/Order/OrderPlatformModel.js +39 -7
  103. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  104. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
  107. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
  108. package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
  109. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
  110. package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
  114. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
  115. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
  117. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
  118. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
  119. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
  120. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
  121. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
  122. package/sdk/platform/Share/SharePlatformModel.js +2 -0
  123. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +73 -0
  124. package/sdk/platform/User/UserPlatformApplicationClient.js +543 -0
  125. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +129 -1
  126. package/sdk/platform/User/UserPlatformApplicationValidator.js +97 -0
  127. package/sdk/platform/User/UserPlatformModel.d.ts +269 -6
  128. package/sdk/platform/User/UserPlatformModel.js +187 -5
  129. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +64 -1
  130. package/sdk/platform/Webhook/WebhookPlatformModel.js +36 -0
  131. package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
  132. package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
  133. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
  134. package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
  135. package/sdk/public/Content/ContentPublicClient.js +261 -104
  136. package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
  137. package/sdk/public/Content/ContentPublicModel.js +102 -0
  138. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
  139. package/sdk/public/Content/ContentPublicValidator.js +26 -0
  140. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  141. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  142. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  143. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  144. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  145. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  146. package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
@@ -15,6 +15,85 @@ class Content {
15
15
  this.applicationId = applicationId;
16
16
  }
17
17
 
18
+ /**
19
+ * @param {ContentPlatformApplicationValidator.AddApplicationLanguageParam} arg
20
+ * - Arg object
21
+ *
22
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
23
+ * @param {import("../PlatformAPIClient").Options} - Options
24
+ * @returns {Promise<Object>} - Success response
25
+ * @name addApplicationLanguage
26
+ * @summary: Add app language
27
+ * @description: Add new languages to application's supported language list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/addApplicationLanguage/).
28
+ */
29
+ async addApplicationLanguage(
30
+ { body, requestHeaders } = { requestHeaders: {} },
31
+ { responseHeaders } = { responseHeaders: false }
32
+ ) {
33
+ const {
34
+ error,
35
+ } = ContentPlatformApplicationValidator.addApplicationLanguage().validate(
36
+ {
37
+ body,
38
+ },
39
+ { abortEarly: false, allowUnknown: true }
40
+ );
41
+ if (error) {
42
+ return Promise.reject(new FDKClientValidationError(error));
43
+ }
44
+
45
+ // Showing warrnings if extra unknown parameters are found
46
+ const {
47
+ error: warrning,
48
+ } = ContentPlatformApplicationValidator.addApplicationLanguage().validate(
49
+ {
50
+ body,
51
+ },
52
+ { abortEarly: false, allowUnknown: false }
53
+ );
54
+ if (warrning) {
55
+ Logger({
56
+ level: "WARN",
57
+ message: `Parameter Validation warrnings for platform > Content > addApplicationLanguage \n ${warrning}`,
58
+ });
59
+ }
60
+
61
+ const query_params = {};
62
+
63
+ const response = await PlatformAPIClient.execute(
64
+ this.config,
65
+ "post",
66
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
67
+ query_params,
68
+ body,
69
+ requestHeaders,
70
+ { responseHeaders }
71
+ );
72
+
73
+ let responseData = response;
74
+ if (responseHeaders) {
75
+ responseData = response[0];
76
+ }
77
+
78
+ const { error: res_error } = Joi.any().validate(responseData, {
79
+ abortEarly: false,
80
+ allowUnknown: true,
81
+ });
82
+
83
+ if (res_error) {
84
+ if (this.config.options.strictResponseCheck === true) {
85
+ return Promise.reject(new FDKResponseValidationError(res_error));
86
+ } else {
87
+ Logger({
88
+ level: "WARN",
89
+ message: `Response Validation Warnings for platform > Content > addApplicationLanguage \n ${res_error}`,
90
+ });
91
+ }
92
+ }
93
+
94
+ return response;
95
+ }
96
+
18
97
  /**
19
98
  * @param {ContentPlatformApplicationValidator.AddDataLoaderParam} arg - Arg object
20
99
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -334,6 +413,85 @@ class Content {
334
413
  return response;
335
414
  }
336
415
 
416
+ /**
417
+ * @param {ContentPlatformApplicationValidator.BulkUnPublishApplicationLanguageParam} arg
418
+ * - Arg object
419
+ *
420
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
421
+ * @param {import("../PlatformAPIClient").Options} - Options
422
+ * @returns {Promise<Object>} - Success response
423
+ * @name bulkUnPublishApplicationLanguage
424
+ * @summary: Unpublish all languages of sales channel.
425
+ * @description: Unpublish all application's published languages of specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/bulkUnPublishApplicationLanguage/).
426
+ */
427
+ async bulkUnPublishApplicationLanguage(
428
+ { body, requestHeaders } = { requestHeaders: {} },
429
+ { responseHeaders } = { responseHeaders: false }
430
+ ) {
431
+ const {
432
+ error,
433
+ } = ContentPlatformApplicationValidator.bulkUnPublishApplicationLanguage().validate(
434
+ {
435
+ body,
436
+ },
437
+ { abortEarly: false, allowUnknown: true }
438
+ );
439
+ if (error) {
440
+ return Promise.reject(new FDKClientValidationError(error));
441
+ }
442
+
443
+ // Showing warrnings if extra unknown parameters are found
444
+ const {
445
+ error: warrning,
446
+ } = ContentPlatformApplicationValidator.bulkUnPublishApplicationLanguage().validate(
447
+ {
448
+ body,
449
+ },
450
+ { abortEarly: false, allowUnknown: false }
451
+ );
452
+ if (warrning) {
453
+ Logger({
454
+ level: "WARN",
455
+ message: `Parameter Validation warrnings for platform > Content > bulkUnPublishApplicationLanguage \n ${warrning}`,
456
+ });
457
+ }
458
+
459
+ const query_params = {};
460
+
461
+ const response = await PlatformAPIClient.execute(
462
+ this.config,
463
+ "patch",
464
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
465
+ query_params,
466
+ body,
467
+ requestHeaders,
468
+ { responseHeaders }
469
+ );
470
+
471
+ let responseData = response;
472
+ if (responseHeaders) {
473
+ responseData = response[0];
474
+ }
475
+
476
+ const { error: res_error } = Joi.any().validate(responseData, {
477
+ abortEarly: false,
478
+ allowUnknown: true,
479
+ });
480
+
481
+ if (res_error) {
482
+ if (this.config.options.strictResponseCheck === true) {
483
+ return Promise.reject(new FDKResponseValidationError(res_error));
484
+ } else {
485
+ Logger({
486
+ level: "WARN",
487
+ message: `Response Validation Warnings for platform > Content > bulkUnPublishApplicationLanguage \n ${res_error}`,
488
+ });
489
+ }
490
+ }
491
+
492
+ return response;
493
+ }
494
+
337
495
  /**
338
496
  * @param {ContentPlatformApplicationValidator.CreateAnnouncementParam} arg
339
497
  * - Arg object
@@ -667,6 +825,87 @@ class Content {
667
825
  return response;
668
826
  }
669
827
 
828
+ /**
829
+ * @param {ContentPlatformApplicationValidator.CreateApplicationResourceTranslationParam} arg
830
+ * - Arg object
831
+ *
832
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
833
+ * @param {import("../PlatformAPIClient").Options} - Options
834
+ * @returns {Promise<ContentPlatformModel.ResourceTranslation>} - Success response
835
+ * @name createApplicationResourceTranslation
836
+ * @summary: Add app translation
837
+ * @description: Create new translations for application resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createApplicationResourceTranslation/).
838
+ */
839
+ async createApplicationResourceTranslation(
840
+ { body, requestHeaders } = { requestHeaders: {} },
841
+ { responseHeaders } = { responseHeaders: false }
842
+ ) {
843
+ const {
844
+ error,
845
+ } = ContentPlatformApplicationValidator.createApplicationResourceTranslation().validate(
846
+ {
847
+ body,
848
+ },
849
+ { abortEarly: false, allowUnknown: true }
850
+ );
851
+ if (error) {
852
+ return Promise.reject(new FDKClientValidationError(error));
853
+ }
854
+
855
+ // Showing warrnings if extra unknown parameters are found
856
+ const {
857
+ error: warrning,
858
+ } = ContentPlatformApplicationValidator.createApplicationResourceTranslation().validate(
859
+ {
860
+ body,
861
+ },
862
+ { abortEarly: false, allowUnknown: false }
863
+ );
864
+ if (warrning) {
865
+ Logger({
866
+ level: "WARN",
867
+ message: `Parameter Validation warrnings for platform > Content > createApplicationResourceTranslation \n ${warrning}`,
868
+ });
869
+ }
870
+
871
+ const query_params = {};
872
+
873
+ const response = await PlatformAPIClient.execute(
874
+ this.config,
875
+ "post",
876
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations`,
877
+ query_params,
878
+ body,
879
+ requestHeaders,
880
+ { responseHeaders }
881
+ );
882
+
883
+ let responseData = response;
884
+ if (responseHeaders) {
885
+ responseData = response[0];
886
+ }
887
+
888
+ const {
889
+ error: res_error,
890
+ } = ContentPlatformModel.ResourceTranslation().validate(responseData, {
891
+ abortEarly: false,
892
+ allowUnknown: true,
893
+ });
894
+
895
+ if (res_error) {
896
+ if (this.config.options.strictResponseCheck === true) {
897
+ return Promise.reject(new FDKResponseValidationError(res_error));
898
+ } else {
899
+ Logger({
900
+ level: "WARN",
901
+ message: `Response Validation Warnings for platform > Content > createApplicationResourceTranslation \n ${res_error}`,
902
+ });
903
+ }
904
+ }
905
+
906
+ return response;
907
+ }
908
+
670
909
  /**
671
910
  * @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object
672
911
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1144,26 +1383,25 @@ class Content {
1144
1383
  }
1145
1384
 
1146
1385
  /**
1147
- * @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
1386
+ * @param {ContentPlatformApplicationValidator.CreateTranslateUILabelsParam} arg
1148
1387
  * - Arg object
1149
1388
  *
1150
1389
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1151
1390
  * @param {import("../PlatformAPIClient").Options} - Options
1152
- * @returns {Promise<ContentPlatformModel.CreateAnnouncementSchema>} -
1153
- * Success response
1154
- * @name deleteAnnouncement
1155
- * @summary: Delete an announcement
1156
- * @description: Remove a specific announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/).
1391
+ * @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
1392
+ * @name createTranslateUILabels
1393
+ * @summary: Add Translate Ui Labels
1394
+ * @description: Creates a new Translate Ui Labels entry with specified configuration and locale settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createTranslateUILabels/).
1157
1395
  */
1158
- async deleteAnnouncement(
1159
- { announcementId, requestHeaders } = { requestHeaders: {} },
1396
+ async createTranslateUILabels(
1397
+ { body, requestHeaders } = { requestHeaders: {} },
1160
1398
  { responseHeaders } = { responseHeaders: false }
1161
1399
  ) {
1162
1400
  const {
1163
1401
  error,
1164
- } = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
1402
+ } = ContentPlatformApplicationValidator.createTranslateUILabels().validate(
1165
1403
  {
1166
- announcementId,
1404
+ body,
1167
1405
  },
1168
1406
  { abortEarly: false, allowUnknown: true }
1169
1407
  );
@@ -1174,16 +1412,16 @@ class Content {
1174
1412
  // Showing warrnings if extra unknown parameters are found
1175
1413
  const {
1176
1414
  error: warrning,
1177
- } = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
1415
+ } = ContentPlatformApplicationValidator.createTranslateUILabels().validate(
1178
1416
  {
1179
- announcementId,
1417
+ body,
1180
1418
  },
1181
1419
  { abortEarly: false, allowUnknown: false }
1182
1420
  );
1183
1421
  if (warrning) {
1184
1422
  Logger({
1185
1423
  level: "WARN",
1186
- message: `Parameter Validation warrnings for platform > Content > deleteAnnouncement \n ${warrning}`,
1424
+ message: `Parameter Validation warrnings for platform > Content > createTranslateUILabels \n ${warrning}`,
1187
1425
  });
1188
1426
  }
1189
1427
 
@@ -1191,10 +1429,10 @@ class Content {
1191
1429
 
1192
1430
  const response = await PlatformAPIClient.execute(
1193
1431
  this.config,
1194
- "delete",
1195
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`,
1432
+ "post",
1433
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels`,
1196
1434
  query_params,
1197
- undefined,
1435
+ body,
1198
1436
  requestHeaders,
1199
1437
  { responseHeaders }
1200
1438
  );
@@ -1206,7 +1444,7 @@ class Content {
1206
1444
 
1207
1445
  const {
1208
1446
  error: res_error,
1209
- } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, {
1447
+ } = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
1210
1448
  abortEarly: false,
1211
1449
  allowUnknown: true,
1212
1450
  });
@@ -1217,7 +1455,7 @@ class Content {
1217
1455
  } else {
1218
1456
  Logger({
1219
1457
  level: "WARN",
1220
- message: `Response Validation Warnings for platform > Content > deleteAnnouncement \n ${res_error}`,
1458
+ message: `Response Validation Warnings for platform > Content > createTranslateUILabels \n ${res_error}`,
1221
1459
  });
1222
1460
  }
1223
1461
  }
@@ -1226,27 +1464,26 @@ class Content {
1226
1464
  }
1227
1465
 
1228
1466
  /**
1229
- * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg
1467
+ * @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
1230
1468
  * - Arg object
1231
1469
  *
1232
1470
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1233
1471
  * @param {import("../PlatformAPIClient").Options} - Options
1234
- * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
1235
- * @name deleteAppCustomFieldDefinitionBySlug
1236
- * @summary: Delete custom fields definition
1237
- * @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/).
1472
+ * @returns {Promise<ContentPlatformModel.CreateAnnouncementSchema>} -
1473
+ * Success response
1474
+ * @name deleteAnnouncement
1475
+ * @summary: Delete an announcement
1476
+ * @description: Remove a specific announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/).
1238
1477
  */
1239
- async deleteAppCustomFieldDefinitionBySlug(
1240
- { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
1478
+ async deleteAnnouncement(
1479
+ { announcementId, requestHeaders } = { requestHeaders: {} },
1241
1480
  { responseHeaders } = { responseHeaders: false }
1242
1481
  ) {
1243
1482
  const {
1244
1483
  error,
1245
- } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1484
+ } = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
1246
1485
  {
1247
- slug,
1248
- resource,
1249
- namespace,
1486
+ announcementId,
1250
1487
  },
1251
1488
  { abortEarly: false, allowUnknown: true }
1252
1489
  );
@@ -1257,11 +1494,94 @@ class Content {
1257
1494
  // Showing warrnings if extra unknown parameters are found
1258
1495
  const {
1259
1496
  error: warrning,
1260
- } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1497
+ } = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
1261
1498
  {
1262
- slug,
1263
- resource,
1264
- namespace,
1499
+ announcementId,
1500
+ },
1501
+ { abortEarly: false, allowUnknown: false }
1502
+ );
1503
+ if (warrning) {
1504
+ Logger({
1505
+ level: "WARN",
1506
+ message: `Parameter Validation warrnings for platform > Content > deleteAnnouncement \n ${warrning}`,
1507
+ });
1508
+ }
1509
+
1510
+ const query_params = {};
1511
+
1512
+ const response = await PlatformAPIClient.execute(
1513
+ this.config,
1514
+ "delete",
1515
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`,
1516
+ query_params,
1517
+ undefined,
1518
+ requestHeaders,
1519
+ { responseHeaders }
1520
+ );
1521
+
1522
+ let responseData = response;
1523
+ if (responseHeaders) {
1524
+ responseData = response[0];
1525
+ }
1526
+
1527
+ const {
1528
+ error: res_error,
1529
+ } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, {
1530
+ abortEarly: false,
1531
+ allowUnknown: true,
1532
+ });
1533
+
1534
+ if (res_error) {
1535
+ if (this.config.options.strictResponseCheck === true) {
1536
+ return Promise.reject(new FDKResponseValidationError(res_error));
1537
+ } else {
1538
+ Logger({
1539
+ level: "WARN",
1540
+ message: `Response Validation Warnings for platform > Content > deleteAnnouncement \n ${res_error}`,
1541
+ });
1542
+ }
1543
+ }
1544
+
1545
+ return response;
1546
+ }
1547
+
1548
+ /**
1549
+ * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg
1550
+ * - Arg object
1551
+ *
1552
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1553
+ * @param {import("../PlatformAPIClient").Options} - Options
1554
+ * @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
1555
+ * @name deleteAppCustomFieldDefinitionBySlug
1556
+ * @summary: Delete custom fields definition
1557
+ * @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/).
1558
+ */
1559
+ async deleteAppCustomFieldDefinitionBySlug(
1560
+ { slug, resource, namespace, requestHeaders } = { requestHeaders: {} },
1561
+ { responseHeaders } = { responseHeaders: false }
1562
+ ) {
1563
+ const {
1564
+ error,
1565
+ } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1566
+ {
1567
+ slug,
1568
+ resource,
1569
+ namespace,
1570
+ },
1571
+ { abortEarly: false, allowUnknown: true }
1572
+ );
1573
+ if (error) {
1574
+ return Promise.reject(new FDKClientValidationError(error));
1575
+ }
1576
+
1577
+ // Showing warrnings if extra unknown parameters are found
1578
+ const {
1579
+ error: warrning,
1580
+ } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate(
1581
+ {
1582
+ slug,
1583
+ resource,
1584
+ namespace,
1265
1585
  },
1266
1586
  { abortEarly: false, allowUnknown: false }
1267
1587
  );
@@ -1476,6 +1796,165 @@ class Content {
1476
1796
  return response;
1477
1797
  }
1478
1798
 
1799
+ /**
1800
+ * @param {ContentPlatformApplicationValidator.DeleteApplicationLanguageParam} arg
1801
+ * - Arg object
1802
+ *
1803
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1804
+ * @param {import("../PlatformAPIClient").Options} - Options
1805
+ * @returns {Promise<any>} - Success response
1806
+ * @name deleteApplicationLanguage
1807
+ * @summary: Remove app language
1808
+ * @description: Remove a language from application's supported languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationLanguage/).
1809
+ */
1810
+ async deleteApplicationLanguage(
1811
+ { locale, requestHeaders } = { requestHeaders: {} },
1812
+ { responseHeaders } = { responseHeaders: false }
1813
+ ) {
1814
+ const {
1815
+ error,
1816
+ } = ContentPlatformApplicationValidator.deleteApplicationLanguage().validate(
1817
+ {
1818
+ locale,
1819
+ },
1820
+ { abortEarly: false, allowUnknown: true }
1821
+ );
1822
+ if (error) {
1823
+ return Promise.reject(new FDKClientValidationError(error));
1824
+ }
1825
+
1826
+ // Showing warrnings if extra unknown parameters are found
1827
+ const {
1828
+ error: warrning,
1829
+ } = ContentPlatformApplicationValidator.deleteApplicationLanguage().validate(
1830
+ {
1831
+ locale,
1832
+ },
1833
+ { abortEarly: false, allowUnknown: false }
1834
+ );
1835
+ if (warrning) {
1836
+ Logger({
1837
+ level: "WARN",
1838
+ message: `Parameter Validation warrnings for platform > Content > deleteApplicationLanguage \n ${warrning}`,
1839
+ });
1840
+ }
1841
+
1842
+ const query_params = {};
1843
+
1844
+ const response = await PlatformAPIClient.execute(
1845
+ this.config,
1846
+ "delete",
1847
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages/${locale}`,
1848
+ query_params,
1849
+ undefined,
1850
+ requestHeaders,
1851
+ { responseHeaders }
1852
+ );
1853
+
1854
+ let responseData = response;
1855
+ if (responseHeaders) {
1856
+ responseData = response[0];
1857
+ }
1858
+
1859
+ const { error: res_error } = Joi.string()
1860
+ .allow("")
1861
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
1862
+
1863
+ if (res_error) {
1864
+ if (this.config.options.strictResponseCheck === true) {
1865
+ return Promise.reject(new FDKResponseValidationError(res_error));
1866
+ } else {
1867
+ Logger({
1868
+ level: "WARN",
1869
+ message: `Response Validation Warnings for platform > Content > deleteApplicationLanguage \n ${res_error}`,
1870
+ });
1871
+ }
1872
+ }
1873
+
1874
+ return response;
1875
+ }
1876
+
1877
+ /**
1878
+ * @param {ContentPlatformApplicationValidator.DeleteApplicationResourceTranslationParam} arg
1879
+ * - Arg object
1880
+ *
1881
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1882
+ * @param {import("../PlatformAPIClient").Options} - Options
1883
+ * @returns {Promise<ContentPlatformModel.DeletedResource>} - Success response
1884
+ * @name deleteApplicationResourceTranslation
1885
+ * @summary: Remove app translation
1886
+ * @description: Remove translations for application resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationResourceTranslation/).
1887
+ */
1888
+ async deleteApplicationResourceTranslation(
1889
+ { id, requestHeaders } = { requestHeaders: {} },
1890
+ { responseHeaders } = { responseHeaders: false }
1891
+ ) {
1892
+ const {
1893
+ error,
1894
+ } = ContentPlatformApplicationValidator.deleteApplicationResourceTranslation().validate(
1895
+ {
1896
+ id,
1897
+ },
1898
+ { abortEarly: false, allowUnknown: true }
1899
+ );
1900
+ if (error) {
1901
+ return Promise.reject(new FDKClientValidationError(error));
1902
+ }
1903
+
1904
+ // Showing warrnings if extra unknown parameters are found
1905
+ const {
1906
+ error: warrning,
1907
+ } = ContentPlatformApplicationValidator.deleteApplicationResourceTranslation().validate(
1908
+ {
1909
+ id,
1910
+ },
1911
+ { abortEarly: false, allowUnknown: false }
1912
+ );
1913
+ if (warrning) {
1914
+ Logger({
1915
+ level: "WARN",
1916
+ message: `Parameter Validation warrnings for platform > Content > deleteApplicationResourceTranslation \n ${warrning}`,
1917
+ });
1918
+ }
1919
+
1920
+ const query_params = {};
1921
+
1922
+ const response = await PlatformAPIClient.execute(
1923
+ this.config,
1924
+ "delete",
1925
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/${id}`,
1926
+ query_params,
1927
+ undefined,
1928
+ requestHeaders,
1929
+ { responseHeaders }
1930
+ );
1931
+
1932
+ let responseData = response;
1933
+ if (responseHeaders) {
1934
+ responseData = response[0];
1935
+ }
1936
+
1937
+ const {
1938
+ error: res_error,
1939
+ } = ContentPlatformModel.DeletedResource().validate(responseData, {
1940
+ abortEarly: false,
1941
+ allowUnknown: true,
1942
+ });
1943
+
1944
+ if (res_error) {
1945
+ if (this.config.options.strictResponseCheck === true) {
1946
+ return Promise.reject(new FDKResponseValidationError(res_error));
1947
+ } else {
1948
+ Logger({
1949
+ level: "WARN",
1950
+ message: `Response Validation Warnings for platform > Content > deleteApplicationResourceTranslation \n ${res_error}`,
1951
+ });
1952
+ }
1953
+ }
1954
+
1955
+ return response;
1956
+ }
1957
+
1479
1958
  /**
1480
1959
  * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object
1481
1960
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -3742,24 +4221,24 @@ class Content {
3742
4221
  }
3743
4222
 
3744
4223
  /**
3745
- * @param {ContentPlatformApplicationValidator.GetBlogBySlugParam} arg - Arg object
4224
+ * @param {ContentPlatformApplicationValidator.GetApplicationLanguagesParam} arg
4225
+ * - Arg object
4226
+ *
3746
4227
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3747
4228
  * @param {import("../PlatformAPIClient").Options} - Options
3748
- * @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
3749
- * @name getBlogBySlug
3750
- * @summary: Get blog by slug
3751
- * @description: Retrieve detailed information about a specific blog using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogBySlug/).
4229
+ * @returns {Promise<Object>} - Success response
4230
+ * @name getApplicationLanguages
4231
+ * @summary: Get app languages
4232
+ * @description: Fetch all languages configured for the specified application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getApplicationLanguages/).
3752
4233
  */
3753
- async getBlogBySlug(
3754
- { slug, requestHeaders } = { requestHeaders: {} },
4234
+ async getApplicationLanguages(
4235
+ { requestHeaders } = { requestHeaders: {} },
3755
4236
  { responseHeaders } = { responseHeaders: false }
3756
4237
  ) {
3757
4238
  const {
3758
4239
  error,
3759
- } = ContentPlatformApplicationValidator.getBlogBySlug().validate(
3760
- {
3761
- slug,
3762
- },
4240
+ } = ContentPlatformApplicationValidator.getApplicationLanguages().validate(
4241
+ {},
3763
4242
  { abortEarly: false, allowUnknown: true }
3764
4243
  );
3765
4244
  if (error) {
@@ -3769,16 +4248,14 @@ class Content {
3769
4248
  // Showing warrnings if extra unknown parameters are found
3770
4249
  const {
3771
4250
  error: warrning,
3772
- } = ContentPlatformApplicationValidator.getBlogBySlug().validate(
3773
- {
3774
- slug,
3775
- },
4251
+ } = ContentPlatformApplicationValidator.getApplicationLanguages().validate(
4252
+ {},
3776
4253
  { abortEarly: false, allowUnknown: false }
3777
4254
  );
3778
4255
  if (warrning) {
3779
4256
  Logger({
3780
4257
  level: "WARN",
3781
- message: `Parameter Validation warrnings for platform > Content > getBlogBySlug \n ${warrning}`,
4258
+ message: `Parameter Validation warrnings for platform > Content > getApplicationLanguages \n ${warrning}`,
3782
4259
  });
3783
4260
  }
3784
4261
 
@@ -3787,7 +4264,7 @@ class Content {
3787
4264
  const response = await PlatformAPIClient.execute(
3788
4265
  this.config,
3789
4266
  "get",
3790
- `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`,
4267
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages`,
3791
4268
  query_params,
3792
4269
  undefined,
3793
4270
  requestHeaders,
@@ -3799,9 +4276,7 @@ class Content {
3799
4276
  responseData = response[0];
3800
4277
  }
3801
4278
 
3802
- const {
3803
- error: res_error,
3804
- } = ContentPlatformModel.BlogSchema().validate(responseData, {
4279
+ const { error: res_error } = Joi.any().validate(responseData, {
3805
4280
  abortEarly: false,
3806
4281
  allowUnknown: true,
3807
4282
  });
@@ -3812,7 +4287,7 @@ class Content {
3812
4287
  } else {
3813
4288
  Logger({
3814
4289
  level: "WARN",
3815
- message: `Response Validation Warnings for platform > Content > getBlogBySlug \n ${res_error}`,
4290
+ message: `Response Validation Warnings for platform > Content > getApplicationLanguages \n ${res_error}`,
3816
4291
  });
3817
4292
  }
3818
4293
  }
@@ -3821,15 +4296,180 @@ class Content {
3821
4296
  }
3822
4297
 
3823
4298
  /**
3824
- * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object
4299
+ * @param {ContentPlatformApplicationValidator.GetApplicationResourceTranslationsParam} arg
4300
+ * - Arg object
4301
+ *
3825
4302
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3826
4303
  * @param {import("../PlatformAPIClient").Options} - Options
3827
- * @returns {Promise<ContentPlatformModel.BlogGetDetails>} - Success response
3828
- * @name getBlogs
3829
- * @summary: List blogs
3830
- * @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/).
4304
+ * @returns {Promise<Object>} - Success response
4305
+ * @name getApplicationResourceTranslations
4306
+ * @summary: Get app translations
4307
+ * @description: Fetch translations for application-level resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getApplicationResourceTranslations/).
3831
4308
  */
3832
- async getBlogs(
4309
+ async getApplicationResourceTranslations(
4310
+ { locale, type, resourceId, requestHeaders } = { requestHeaders: {} },
4311
+ { responseHeaders } = { responseHeaders: false }
4312
+ ) {
4313
+ const {
4314
+ error,
4315
+ } = ContentPlatformApplicationValidator.getApplicationResourceTranslations().validate(
4316
+ {
4317
+ locale,
4318
+ type,
4319
+ resourceId,
4320
+ },
4321
+ { abortEarly: false, allowUnknown: true }
4322
+ );
4323
+ if (error) {
4324
+ return Promise.reject(new FDKClientValidationError(error));
4325
+ }
4326
+
4327
+ // Showing warrnings if extra unknown parameters are found
4328
+ const {
4329
+ error: warrning,
4330
+ } = ContentPlatformApplicationValidator.getApplicationResourceTranslations().validate(
4331
+ {
4332
+ locale,
4333
+ type,
4334
+ resourceId,
4335
+ },
4336
+ { abortEarly: false, allowUnknown: false }
4337
+ );
4338
+ if (warrning) {
4339
+ Logger({
4340
+ level: "WARN",
4341
+ message: `Parameter Validation warrnings for platform > Content > getApplicationResourceTranslations \n ${warrning}`,
4342
+ });
4343
+ }
4344
+
4345
+ const query_params = {};
4346
+ query_params["locale"] = locale;
4347
+ query_params["type"] = type;
4348
+ query_params["resource_id"] = resourceId;
4349
+
4350
+ const response = await PlatformAPIClient.execute(
4351
+ this.config,
4352
+ "get",
4353
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations`,
4354
+ query_params,
4355
+ undefined,
4356
+ requestHeaders,
4357
+ { responseHeaders }
4358
+ );
4359
+
4360
+ let responseData = response;
4361
+ if (responseHeaders) {
4362
+ responseData = response[0];
4363
+ }
4364
+
4365
+ const { error: res_error } = Joi.any().validate(responseData, {
4366
+ abortEarly: false,
4367
+ allowUnknown: true,
4368
+ });
4369
+
4370
+ if (res_error) {
4371
+ if (this.config.options.strictResponseCheck === true) {
4372
+ return Promise.reject(new FDKResponseValidationError(res_error));
4373
+ } else {
4374
+ Logger({
4375
+ level: "WARN",
4376
+ message: `Response Validation Warnings for platform > Content > getApplicationResourceTranslations \n ${res_error}`,
4377
+ });
4378
+ }
4379
+ }
4380
+
4381
+ return response;
4382
+ }
4383
+
4384
+ /**
4385
+ * @param {ContentPlatformApplicationValidator.GetBlogBySlugParam} arg - Arg object
4386
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4387
+ * @param {import("../PlatformAPIClient").Options} - Options
4388
+ * @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
4389
+ * @name getBlogBySlug
4390
+ * @summary: Get blog by slug
4391
+ * @description: Retrieve detailed information about a specific blog using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogBySlug/).
4392
+ */
4393
+ async getBlogBySlug(
4394
+ { slug, requestHeaders } = { requestHeaders: {} },
4395
+ { responseHeaders } = { responseHeaders: false }
4396
+ ) {
4397
+ const {
4398
+ error,
4399
+ } = ContentPlatformApplicationValidator.getBlogBySlug().validate(
4400
+ {
4401
+ slug,
4402
+ },
4403
+ { abortEarly: false, allowUnknown: true }
4404
+ );
4405
+ if (error) {
4406
+ return Promise.reject(new FDKClientValidationError(error));
4407
+ }
4408
+
4409
+ // Showing warrnings if extra unknown parameters are found
4410
+ const {
4411
+ error: warrning,
4412
+ } = ContentPlatformApplicationValidator.getBlogBySlug().validate(
4413
+ {
4414
+ slug,
4415
+ },
4416
+ { abortEarly: false, allowUnknown: false }
4417
+ );
4418
+ if (warrning) {
4419
+ Logger({
4420
+ level: "WARN",
4421
+ message: `Parameter Validation warrnings for platform > Content > getBlogBySlug \n ${warrning}`,
4422
+ });
4423
+ }
4424
+
4425
+ const query_params = {};
4426
+
4427
+ const response = await PlatformAPIClient.execute(
4428
+ this.config,
4429
+ "get",
4430
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`,
4431
+ query_params,
4432
+ undefined,
4433
+ requestHeaders,
4434
+ { responseHeaders }
4435
+ );
4436
+
4437
+ let responseData = response;
4438
+ if (responseHeaders) {
4439
+ responseData = response[0];
4440
+ }
4441
+
4442
+ const {
4443
+ error: res_error,
4444
+ } = ContentPlatformModel.BlogSchema().validate(responseData, {
4445
+ abortEarly: false,
4446
+ allowUnknown: true,
4447
+ });
4448
+
4449
+ if (res_error) {
4450
+ if (this.config.options.strictResponseCheck === true) {
4451
+ return Promise.reject(new FDKResponseValidationError(res_error));
4452
+ } else {
4453
+ Logger({
4454
+ level: "WARN",
4455
+ message: `Response Validation Warnings for platform > Content > getBlogBySlug \n ${res_error}`,
4456
+ });
4457
+ }
4458
+ }
4459
+
4460
+ return response;
4461
+ }
4462
+
4463
+ /**
4464
+ * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object
4465
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4466
+ * @param {import("../PlatformAPIClient").Options} - Options
4467
+ * @returns {Promise<ContentPlatformModel.BlogGetDetails>} - Success response
4468
+ * @name getBlogs
4469
+ * @summary: List blogs
4470
+ * @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/).
4471
+ */
4472
+ async getBlogs(
3833
4473
  { pageNo, pageSize, tags, q, slug, title, status, requestHeaders } = {
3834
4474
  requestHeaders: {},
3835
4475
  },
@@ -5770,6 +6410,180 @@ class Content {
5770
6410
  return response;
5771
6411
  }
5772
6412
 
6413
+ /**
6414
+ * @param {ContentPlatformApplicationValidator.GetTranslateUILabelsParam} arg
6415
+ * - Arg object
6416
+ *
6417
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6418
+ * @param {import("../PlatformAPIClient").Options} - Options
6419
+ * @returns {Promise<ContentPlatformModel.TranslateUiLabelsPage>} - Success response
6420
+ * @name getTranslateUILabels
6421
+ * @summary: Get Translate Ui Labels
6422
+ * @description: Retrieves Translate Ui Labels with optional filtering by type, application, and company identifiers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getTranslateUILabels/).
6423
+ */
6424
+ async getTranslateUILabels(
6425
+ { templateThemeId, themeId, locale, type, requestHeaders } = {
6426
+ requestHeaders: {},
6427
+ },
6428
+ { responseHeaders } = { responseHeaders: false }
6429
+ ) {
6430
+ const {
6431
+ error,
6432
+ } = ContentPlatformApplicationValidator.getTranslateUILabels().validate(
6433
+ {
6434
+ templateThemeId,
6435
+ themeId,
6436
+ locale,
6437
+ type,
6438
+ },
6439
+ { abortEarly: false, allowUnknown: true }
6440
+ );
6441
+ if (error) {
6442
+ return Promise.reject(new FDKClientValidationError(error));
6443
+ }
6444
+
6445
+ // Showing warrnings if extra unknown parameters are found
6446
+ const {
6447
+ error: warrning,
6448
+ } = ContentPlatformApplicationValidator.getTranslateUILabels().validate(
6449
+ {
6450
+ templateThemeId,
6451
+ themeId,
6452
+ locale,
6453
+ type,
6454
+ },
6455
+ { abortEarly: false, allowUnknown: false }
6456
+ );
6457
+ if (warrning) {
6458
+ Logger({
6459
+ level: "WARN",
6460
+ message: `Parameter Validation warrnings for platform > Content > getTranslateUILabels \n ${warrning}`,
6461
+ });
6462
+ }
6463
+
6464
+ const query_params = {};
6465
+ query_params["template_theme_id"] = templateThemeId;
6466
+ query_params["theme_id"] = themeId;
6467
+ query_params["locale"] = locale;
6468
+ query_params["type"] = type;
6469
+
6470
+ const response = await PlatformAPIClient.execute(
6471
+ this.config,
6472
+ "get",
6473
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels`,
6474
+ query_params,
6475
+ undefined,
6476
+ requestHeaders,
6477
+ { responseHeaders }
6478
+ );
6479
+
6480
+ let responseData = response;
6481
+ if (responseHeaders) {
6482
+ responseData = response[0];
6483
+ }
6484
+
6485
+ const {
6486
+ error: res_error,
6487
+ } = ContentPlatformModel.TranslateUiLabelsPage().validate(responseData, {
6488
+ abortEarly: false,
6489
+ allowUnknown: true,
6490
+ });
6491
+
6492
+ if (res_error) {
6493
+ if (this.config.options.strictResponseCheck === true) {
6494
+ return Promise.reject(new FDKResponseValidationError(res_error));
6495
+ } else {
6496
+ Logger({
6497
+ level: "WARN",
6498
+ message: `Response Validation Warnings for platform > Content > getTranslateUILabels \n ${res_error}`,
6499
+ });
6500
+ }
6501
+ }
6502
+
6503
+ return response;
6504
+ }
6505
+
6506
+ /**
6507
+ * @param {ContentPlatformApplicationValidator.GetTranslateUILabelsByIdParam} arg
6508
+ * - Arg object
6509
+ *
6510
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6511
+ * @param {import("../PlatformAPIClient").Options} - Options
6512
+ * @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
6513
+ * @name getTranslateUILabelsById
6514
+ * @summary: Get Resource Detail
6515
+ * @description: Fetches detailed information for a specific Translate Ui Labels using its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getTranslateUILabelsById/).
6516
+ */
6517
+ async getTranslateUILabelsById(
6518
+ { id, requestHeaders } = { requestHeaders: {} },
6519
+ { responseHeaders } = { responseHeaders: false }
6520
+ ) {
6521
+ const {
6522
+ error,
6523
+ } = ContentPlatformApplicationValidator.getTranslateUILabelsById().validate(
6524
+ {
6525
+ id,
6526
+ },
6527
+ { abortEarly: false, allowUnknown: true }
6528
+ );
6529
+ if (error) {
6530
+ return Promise.reject(new FDKClientValidationError(error));
6531
+ }
6532
+
6533
+ // Showing warrnings if extra unknown parameters are found
6534
+ const {
6535
+ error: warrning,
6536
+ } = ContentPlatformApplicationValidator.getTranslateUILabelsById().validate(
6537
+ {
6538
+ id,
6539
+ },
6540
+ { abortEarly: false, allowUnknown: false }
6541
+ );
6542
+ if (warrning) {
6543
+ Logger({
6544
+ level: "WARN",
6545
+ message: `Parameter Validation warrnings for platform > Content > getTranslateUILabelsById \n ${warrning}`,
6546
+ });
6547
+ }
6548
+
6549
+ const query_params = {};
6550
+
6551
+ const response = await PlatformAPIClient.execute(
6552
+ this.config,
6553
+ "get",
6554
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels/${id}`,
6555
+ query_params,
6556
+ undefined,
6557
+ requestHeaders,
6558
+ { responseHeaders }
6559
+ );
6560
+
6561
+ let responseData = response;
6562
+ if (responseHeaders) {
6563
+ responseData = response[0];
6564
+ }
6565
+
6566
+ const {
6567
+ error: res_error,
6568
+ } = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
6569
+ abortEarly: false,
6570
+ allowUnknown: true,
6571
+ });
6572
+
6573
+ if (res_error) {
6574
+ if (this.config.options.strictResponseCheck === true) {
6575
+ return Promise.reject(new FDKResponseValidationError(res_error));
6576
+ } else {
6577
+ Logger({
6578
+ level: "WARN",
6579
+ message: `Response Validation Warnings for platform > Content > getTranslateUILabelsById \n ${res_error}`,
6580
+ });
6581
+ }
6582
+ }
6583
+
6584
+ return response;
6585
+ }
6586
+
5773
6587
  /**
5774
6588
  * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam} arg
5775
6589
  * - Arg object
@@ -6357,16 +7171,193 @@ class Content {
6357
7171
  * @summary: Create custom field entries for gives resource and resource slug
6358
7172
  * @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/).
6359
7173
  */
6360
- async updateAppCustomFieldByResourceSlug(
6361
- { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
7174
+ async updateAppCustomFieldByResourceSlug(
7175
+ { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} },
7176
+ { responseHeaders } = { responseHeaders: false }
7177
+ ) {
7178
+ const {
7179
+ error,
7180
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7181
+ {
7182
+ resource,
7183
+ resourceSlug,
7184
+ body,
7185
+ },
7186
+ { abortEarly: false, allowUnknown: true }
7187
+ );
7188
+ if (error) {
7189
+ return Promise.reject(new FDKClientValidationError(error));
7190
+ }
7191
+
7192
+ // Showing warrnings if extra unknown parameters are found
7193
+ const {
7194
+ error: warrning,
7195
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7196
+ {
7197
+ resource,
7198
+ resourceSlug,
7199
+ body,
7200
+ },
7201
+ { abortEarly: false, allowUnknown: false }
7202
+ );
7203
+ if (warrning) {
7204
+ Logger({
7205
+ level: "WARN",
7206
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${warrning}`,
7207
+ });
7208
+ }
7209
+
7210
+ const query_params = {};
7211
+
7212
+ const response = await PlatformAPIClient.execute(
7213
+ this.config,
7214
+ "put",
7215
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
7216
+ query_params,
7217
+ body,
7218
+ requestHeaders,
7219
+ { responseHeaders }
7220
+ );
7221
+
7222
+ let responseData = response;
7223
+ if (responseHeaders) {
7224
+ responseData = response[0];
7225
+ }
7226
+
7227
+ const {
7228
+ error: res_error,
7229
+ } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
7230
+ responseData,
7231
+ { abortEarly: false, allowUnknown: true }
7232
+ );
7233
+
7234
+ if (res_error) {
7235
+ if (this.config.options.strictResponseCheck === true) {
7236
+ return Promise.reject(new FDKResponseValidationError(res_error));
7237
+ } else {
7238
+ Logger({
7239
+ level: "WARN",
7240
+ message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${res_error}`,
7241
+ });
7242
+ }
7243
+ }
7244
+
7245
+ return response;
7246
+ }
7247
+
7248
+ /**
7249
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg
7250
+ * - Arg object
7251
+ *
7252
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7253
+ * @param {import("../PlatformAPIClient").Options} - Options
7254
+ * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
7255
+ * - Success response
7256
+ *
7257
+ * @name updateAppCustomFieldDefinitionBySlug
7258
+ * @summary: Update custom field definition
7259
+ * @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/).
7260
+ */
7261
+ async updateAppCustomFieldDefinitionBySlug(
7262
+ { slug, resource, namespace, body, requestHeaders } = {
7263
+ requestHeaders: {},
7264
+ },
7265
+ { responseHeaders } = { responseHeaders: false }
7266
+ ) {
7267
+ const {
7268
+ error,
7269
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
7270
+ {
7271
+ slug,
7272
+ resource,
7273
+ namespace,
7274
+ body,
7275
+ },
7276
+ { abortEarly: false, allowUnknown: true }
7277
+ );
7278
+ if (error) {
7279
+ return Promise.reject(new FDKClientValidationError(error));
7280
+ }
7281
+
7282
+ // Showing warrnings if extra unknown parameters are found
7283
+ const {
7284
+ error: warrning,
7285
+ } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
7286
+ {
7287
+ slug,
7288
+ resource,
7289
+ namespace,
7290
+ body,
7291
+ },
7292
+ { abortEarly: false, allowUnknown: false }
7293
+ );
7294
+ if (warrning) {
7295
+ Logger({
7296
+ level: "WARN",
7297
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${warrning}`,
7298
+ });
7299
+ }
7300
+
7301
+ const query_params = {};
7302
+
7303
+ const response = await PlatformAPIClient.execute(
7304
+ this.config,
7305
+ "put",
7306
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
7307
+ query_params,
7308
+ body,
7309
+ requestHeaders,
7310
+ { responseHeaders }
7311
+ );
7312
+
7313
+ let responseData = response;
7314
+ if (responseHeaders) {
7315
+ responseData = response[0];
7316
+ }
7317
+
7318
+ const {
7319
+ error: res_error,
7320
+ } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
7321
+ responseData,
7322
+ { abortEarly: false, allowUnknown: true }
7323
+ );
7324
+
7325
+ if (res_error) {
7326
+ if (this.config.options.strictResponseCheck === true) {
7327
+ return Promise.reject(new FDKResponseValidationError(res_error));
7328
+ } else {
7329
+ Logger({
7330
+ level: "WARN",
7331
+ message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${res_error}`,
7332
+ });
7333
+ }
7334
+ }
7335
+
7336
+ return response;
7337
+ }
7338
+
7339
+ /**
7340
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg
7341
+ * - Arg object
7342
+ *
7343
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7344
+ * @param {import("../PlatformAPIClient").Options} - Options
7345
+ * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
7346
+ * Success response
7347
+ * @name updateAppCustomObjectBySlug
7348
+ * @summary: Update custom object details
7349
+ * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectBySlug/).
7350
+ */
7351
+ async updateAppCustomObjectBySlug(
7352
+ { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
6362
7353
  { responseHeaders } = { responseHeaders: false }
6363
7354
  ) {
6364
7355
  const {
6365
7356
  error,
6366
- } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7357
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
6367
7358
  {
6368
- resource,
6369
- resourceSlug,
7359
+ definitionSlug,
7360
+ slug,
6370
7361
  body,
6371
7362
  },
6372
7363
  { abortEarly: false, allowUnknown: true }
@@ -6378,10 +7369,10 @@ class Content {
6378
7369
  // Showing warrnings if extra unknown parameters are found
6379
7370
  const {
6380
7371
  error: warrning,
6381
- } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate(
7372
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
6382
7373
  {
6383
- resource,
6384
- resourceSlug,
7374
+ definitionSlug,
7375
+ slug,
6385
7376
  body,
6386
7377
  },
6387
7378
  { abortEarly: false, allowUnknown: false }
@@ -6389,7 +7380,7 @@ class Content {
6389
7380
  if (warrning) {
6390
7381
  Logger({
6391
7382
  level: "WARN",
6392
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${warrning}`,
7383
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectBySlug \n ${warrning}`,
6393
7384
  });
6394
7385
  }
6395
7386
 
@@ -6398,7 +7389,7 @@ class Content {
6398
7389
  const response = await PlatformAPIClient.execute(
6399
7390
  this.config,
6400
7391
  "put",
6401
- `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`,
7392
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
6402
7393
  query_params,
6403
7394
  body,
6404
7395
  requestHeaders,
@@ -6412,10 +7403,10 @@ class Content {
6412
7403
 
6413
7404
  const {
6414
7405
  error: res_error,
6415
- } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
6416
- responseData,
6417
- { abortEarly: false, allowUnknown: true }
6418
- );
7406
+ } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
7407
+ abortEarly: false,
7408
+ allowUnknown: true,
7409
+ });
6419
7410
 
6420
7411
  if (res_error) {
6421
7412
  if (this.config.options.strictResponseCheck === true) {
@@ -6423,7 +7414,7 @@ class Content {
6423
7414
  } else {
6424
7415
  Logger({
6425
7416
  level: "WARN",
6426
- message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${res_error}`,
7417
+ message: `Response Validation Warnings for platform > Content > updateAppCustomObjectBySlug \n ${res_error}`,
6427
7418
  });
6428
7419
  }
6429
7420
  }
@@ -6432,31 +7423,27 @@ class Content {
6432
7423
  }
6433
7424
 
6434
7425
  /**
6435
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg
7426
+ * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg
6436
7427
  * - Arg object
6437
7428
  *
6438
7429
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6439
7430
  * @param {import("../PlatformAPIClient").Options} - Options
6440
- * @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
7431
+ * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
6441
7432
  * - Success response
6442
7433
  *
6443
- * @name updateAppCustomFieldDefinitionBySlug
6444
- * @summary: Update custom field definition
6445
- * @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/).
7434
+ * @name updateAppCustomObjectDefinitionBySlug
7435
+ * @summary: Update custom object definition
7436
+ * @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/).
6446
7437
  */
6447
- async updateAppCustomFieldDefinitionBySlug(
6448
- { slug, resource, namespace, body, requestHeaders } = {
6449
- requestHeaders: {},
6450
- },
7438
+ async updateAppCustomObjectDefinitionBySlug(
7439
+ { slug, body, requestHeaders } = { requestHeaders: {} },
6451
7440
  { responseHeaders } = { responseHeaders: false }
6452
7441
  ) {
6453
7442
  const {
6454
7443
  error,
6455
- } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
7444
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
6456
7445
  {
6457
7446
  slug,
6458
- resource,
6459
- namespace,
6460
7447
  body,
6461
7448
  },
6462
7449
  { abortEarly: false, allowUnknown: true }
@@ -6468,11 +7455,9 @@ class Content {
6468
7455
  // Showing warrnings if extra unknown parameters are found
6469
7456
  const {
6470
7457
  error: warrning,
6471
- } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate(
7458
+ } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
6472
7459
  {
6473
7460
  slug,
6474
- resource,
6475
- namespace,
6476
7461
  body,
6477
7462
  },
6478
7463
  { abortEarly: false, allowUnknown: false }
@@ -6480,7 +7465,7 @@ class Content {
6480
7465
  if (warrning) {
6481
7466
  Logger({
6482
7467
  level: "WARN",
6483
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${warrning}`,
7468
+ message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${warrning}`,
6484
7469
  });
6485
7470
  }
6486
7471
 
@@ -6489,7 +7474,7 @@ class Content {
6489
7474
  const response = await PlatformAPIClient.execute(
6490
7475
  this.config,
6491
7476
  "put",
6492
- `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`,
7477
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
6493
7478
  query_params,
6494
7479
  body,
6495
7480
  requestHeaders,
@@ -6503,7 +7488,7 @@ class Content {
6503
7488
 
6504
7489
  const {
6505
7490
  error: res_error,
6506
- } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
7491
+ } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
6507
7492
  responseData,
6508
7493
  { abortEarly: false, allowUnknown: true }
6509
7494
  );
@@ -6514,7 +7499,7 @@ class Content {
6514
7499
  } else {
6515
7500
  Logger({
6516
7501
  level: "WARN",
6517
- message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${res_error}`,
7502
+ message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${res_error}`,
6518
7503
  });
6519
7504
  }
6520
7505
  }
@@ -6523,27 +7508,25 @@ class Content {
6523
7508
  }
6524
7509
 
6525
7510
  /**
6526
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg
7511
+ * @param {ContentPlatformApplicationValidator.UpdateApplicationLanguageStatusParam} arg
6527
7512
  * - Arg object
6528
7513
  *
6529
7514
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6530
7515
  * @param {import("../PlatformAPIClient").Options} - Options
6531
- * @returns {Promise<ContentPlatformModel.CustomObjectBySlugSchema>} -
6532
- * Success response
6533
- * @name updateAppCustomObjectBySlug
6534
- * @summary: Update custom object details
6535
- * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectBySlug/).
7516
+ * @returns {Promise<ContentPlatformModel.ApplicationLanguage>} - Success response
7517
+ * @name updateApplicationLanguageStatus
7518
+ * @summary: Set app language
7519
+ * @description: Update language status and settings for the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateApplicationLanguageStatus/).
6536
7520
  */
6537
- async updateAppCustomObjectBySlug(
6538
- { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} },
7521
+ async updateApplicationLanguageStatus(
7522
+ { locale, body, requestHeaders } = { requestHeaders: {} },
6539
7523
  { responseHeaders } = { responseHeaders: false }
6540
7524
  ) {
6541
7525
  const {
6542
7526
  error,
6543
- } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
7527
+ } = ContentPlatformApplicationValidator.updateApplicationLanguageStatus().validate(
6544
7528
  {
6545
- definitionSlug,
6546
- slug,
7529
+ locale,
6547
7530
  body,
6548
7531
  },
6549
7532
  { abortEarly: false, allowUnknown: true }
@@ -6555,10 +7538,9 @@ class Content {
6555
7538
  // Showing warrnings if extra unknown parameters are found
6556
7539
  const {
6557
7540
  error: warrning,
6558
- } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate(
7541
+ } = ContentPlatformApplicationValidator.updateApplicationLanguageStatus().validate(
6559
7542
  {
6560
- definitionSlug,
6561
- slug,
7543
+ locale,
6562
7544
  body,
6563
7545
  },
6564
7546
  { abortEarly: false, allowUnknown: false }
@@ -6566,7 +7548,7 @@ class Content {
6566
7548
  if (warrning) {
6567
7549
  Logger({
6568
7550
  level: "WARN",
6569
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectBySlug \n ${warrning}`,
7551
+ message: `Parameter Validation warrnings for platform > Content > updateApplicationLanguageStatus \n ${warrning}`,
6570
7552
  });
6571
7553
  }
6572
7554
 
@@ -6575,7 +7557,7 @@ class Content {
6575
7557
  const response = await PlatformAPIClient.execute(
6576
7558
  this.config,
6577
7559
  "put",
6578
- `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`,
7560
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/languages/${locale}`,
6579
7561
  query_params,
6580
7562
  body,
6581
7563
  requestHeaders,
@@ -6589,7 +7571,7 @@ class Content {
6589
7571
 
6590
7572
  const {
6591
7573
  error: res_error,
6592
- } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, {
7574
+ } = ContentPlatformModel.ApplicationLanguage().validate(responseData, {
6593
7575
  abortEarly: false,
6594
7576
  allowUnknown: true,
6595
7577
  });
@@ -6600,7 +7582,7 @@ class Content {
6600
7582
  } else {
6601
7583
  Logger({
6602
7584
  level: "WARN",
6603
- message: `Response Validation Warnings for platform > Content > updateAppCustomObjectBySlug \n ${res_error}`,
7585
+ message: `Response Validation Warnings for platform > Content > updateApplicationLanguageStatus \n ${res_error}`,
6604
7586
  });
6605
7587
  }
6606
7588
  }
@@ -6609,27 +7591,25 @@ class Content {
6609
7591
  }
6610
7592
 
6611
7593
  /**
6612
- * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg
7594
+ * @param {ContentPlatformApplicationValidator.UpdateApplicationResourceTranslationParam} arg
6613
7595
  * - Arg object
6614
7596
  *
6615
7597
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
6616
7598
  * @param {import("../PlatformAPIClient").Options} - Options
6617
- * @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSlugSchema>}
6618
- * - Success response
6619
- *
6620
- * @name updateAppCustomObjectDefinitionBySlug
6621
- * @summary: Update custom object definition
6622
- * @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/).
7599
+ * @returns {Promise<ContentPlatformModel.ResourceTranslation>} - Success response
7600
+ * @name updateApplicationResourceTranslation
7601
+ * @summary: Update app translation
7602
+ * @description: Update existing translations for application resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateApplicationResourceTranslation/).
6623
7603
  */
6624
- async updateAppCustomObjectDefinitionBySlug(
6625
- { slug, body, requestHeaders } = { requestHeaders: {} },
7604
+ async updateApplicationResourceTranslation(
7605
+ { id, body, requestHeaders } = { requestHeaders: {} },
6626
7606
  { responseHeaders } = { responseHeaders: false }
6627
7607
  ) {
6628
7608
  const {
6629
7609
  error,
6630
- } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
7610
+ } = ContentPlatformApplicationValidator.updateApplicationResourceTranslation().validate(
6631
7611
  {
6632
- slug,
7612
+ id,
6633
7613
  body,
6634
7614
  },
6635
7615
  { abortEarly: false, allowUnknown: true }
@@ -6641,9 +7621,9 @@ class Content {
6641
7621
  // Showing warrnings if extra unknown parameters are found
6642
7622
  const {
6643
7623
  error: warrning,
6644
- } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate(
7624
+ } = ContentPlatformApplicationValidator.updateApplicationResourceTranslation().validate(
6645
7625
  {
6646
- slug,
7626
+ id,
6647
7627
  body,
6648
7628
  },
6649
7629
  { abortEarly: false, allowUnknown: false }
@@ -6651,7 +7631,7 @@ class Content {
6651
7631
  if (warrning) {
6652
7632
  Logger({
6653
7633
  level: "WARN",
6654
- message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${warrning}`,
7634
+ message: `Parameter Validation warrnings for platform > Content > updateApplicationResourceTranslation \n ${warrning}`,
6655
7635
  });
6656
7636
  }
6657
7637
 
@@ -6660,7 +7640,7 @@ class Content {
6660
7640
  const response = await PlatformAPIClient.execute(
6661
7641
  this.config,
6662
7642
  "put",
6663
- `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`,
7643
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/${id}`,
6664
7644
  query_params,
6665
7645
  body,
6666
7646
  requestHeaders,
@@ -6674,10 +7654,10 @@ class Content {
6674
7654
 
6675
7655
  const {
6676
7656
  error: res_error,
6677
- } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate(
6678
- responseData,
6679
- { abortEarly: false, allowUnknown: true }
6680
- );
7657
+ } = ContentPlatformModel.ResourceTranslation().validate(responseData, {
7658
+ abortEarly: false,
7659
+ allowUnknown: true,
7660
+ });
6681
7661
 
6682
7662
  if (res_error) {
6683
7663
  if (this.config.options.strictResponseCheck === true) {
@@ -6685,7 +7665,7 @@ class Content {
6685
7665
  } else {
6686
7666
  Logger({
6687
7667
  level: "WARN",
6688
- message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${res_error}`,
7668
+ message: `Response Validation Warnings for platform > Content > updateApplicationResourceTranslation \n ${res_error}`,
6689
7669
  });
6690
7670
  }
6691
7671
  }
@@ -7668,6 +8648,173 @@ class Content {
7668
8648
 
7669
8649
  return response;
7670
8650
  }
8651
+
8652
+ /**
8653
+ * @param {ContentPlatformApplicationValidator.UpdateTranslateUILabelsParam} arg
8654
+ * - Arg object
8655
+ *
8656
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
8657
+ * @param {import("../PlatformAPIClient").Options} - Options
8658
+ * @returns {Promise<ContentPlatformModel.TranslateUiLabels>} - Success response
8659
+ * @name updateTranslateUILabels
8660
+ * @summary: Update Resource Detail
8661
+ * @description: Modifies existing Translate Ui Labels properties including locale, type, and associated configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateTranslateUILabels/).
8662
+ */
8663
+ async updateTranslateUILabels(
8664
+ { id, body, requestHeaders } = { requestHeaders: {} },
8665
+ { responseHeaders } = { responseHeaders: false }
8666
+ ) {
8667
+ const {
8668
+ error,
8669
+ } = ContentPlatformApplicationValidator.updateTranslateUILabels().validate(
8670
+ {
8671
+ id,
8672
+
8673
+ body,
8674
+ },
8675
+ { abortEarly: false, allowUnknown: true }
8676
+ );
8677
+ if (error) {
8678
+ return Promise.reject(new FDKClientValidationError(error));
8679
+ }
8680
+
8681
+ // Showing warrnings if extra unknown parameters are found
8682
+ const {
8683
+ error: warrning,
8684
+ } = ContentPlatformApplicationValidator.updateTranslateUILabels().validate(
8685
+ {
8686
+ id,
8687
+
8688
+ body,
8689
+ },
8690
+ { abortEarly: false, allowUnknown: false }
8691
+ );
8692
+ if (warrning) {
8693
+ Logger({
8694
+ level: "WARN",
8695
+ message: `Parameter Validation warrnings for platform > Content > updateTranslateUILabels \n ${warrning}`,
8696
+ });
8697
+ }
8698
+
8699
+ const query_params = {};
8700
+
8701
+ const response = await PlatformAPIClient.execute(
8702
+ this.config,
8703
+ "put",
8704
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/translate-ui-labels/${id}`,
8705
+ query_params,
8706
+ body,
8707
+ requestHeaders,
8708
+ { responseHeaders }
8709
+ );
8710
+
8711
+ let responseData = response;
8712
+ if (responseHeaders) {
8713
+ responseData = response[0];
8714
+ }
8715
+
8716
+ const {
8717
+ error: res_error,
8718
+ } = ContentPlatformModel.TranslateUiLabels().validate(responseData, {
8719
+ abortEarly: false,
8720
+ allowUnknown: true,
8721
+ });
8722
+
8723
+ if (res_error) {
8724
+ if (this.config.options.strictResponseCheck === true) {
8725
+ return Promise.reject(new FDKResponseValidationError(res_error));
8726
+ } else {
8727
+ Logger({
8728
+ level: "WARN",
8729
+ message: `Response Validation Warnings for platform > Content > updateTranslateUILabels \n ${res_error}`,
8730
+ });
8731
+ }
8732
+ }
8733
+
8734
+ return response;
8735
+ }
8736
+
8737
+ /**
8738
+ * @param {ContentPlatformApplicationValidator.UpsertApplicationResourceTranslationInBulkParam} arg
8739
+ * - Arg object
8740
+ *
8741
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
8742
+ * @param {import("../PlatformAPIClient").Options} - Options
8743
+ * @returns {Promise<ContentPlatformModel.ResourceTranslationBulkUpsert>} -
8744
+ * Success response
8745
+ * @name upsertApplicationResourceTranslationInBulk
8746
+ * @summary: Bulk update translations
8747
+ * @description: Create or update multiple translations in a single request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/upsertApplicationResourceTranslationInBulk/).
8748
+ */
8749
+ async upsertApplicationResourceTranslationInBulk(
8750
+ { body, requestHeaders } = { requestHeaders: {} },
8751
+ { responseHeaders } = { responseHeaders: false }
8752
+ ) {
8753
+ const {
8754
+ error,
8755
+ } = ContentPlatformApplicationValidator.upsertApplicationResourceTranslationInBulk().validate(
8756
+ {
8757
+ body,
8758
+ },
8759
+ { abortEarly: false, allowUnknown: true }
8760
+ );
8761
+ if (error) {
8762
+ return Promise.reject(new FDKClientValidationError(error));
8763
+ }
8764
+
8765
+ // Showing warrnings if extra unknown parameters are found
8766
+ const {
8767
+ error: warrning,
8768
+ } = ContentPlatformApplicationValidator.upsertApplicationResourceTranslationInBulk().validate(
8769
+ {
8770
+ body,
8771
+ },
8772
+ { abortEarly: false, allowUnknown: false }
8773
+ );
8774
+ if (warrning) {
8775
+ Logger({
8776
+ level: "WARN",
8777
+ message: `Parameter Validation warrnings for platform > Content > upsertApplicationResourceTranslationInBulk \n ${warrning}`,
8778
+ });
8779
+ }
8780
+
8781
+ const query_params = {};
8782
+
8783
+ const response = await PlatformAPIClient.execute(
8784
+ this.config,
8785
+ "patch",
8786
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resource/translations/bulk`,
8787
+ query_params,
8788
+ body,
8789
+ requestHeaders,
8790
+ { responseHeaders }
8791
+ );
8792
+
8793
+ let responseData = response;
8794
+ if (responseHeaders) {
8795
+ responseData = response[0];
8796
+ }
8797
+
8798
+ const {
8799
+ error: res_error,
8800
+ } = ContentPlatformModel.ResourceTranslationBulkUpsert().validate(
8801
+ responseData,
8802
+ { abortEarly: false, allowUnknown: true }
8803
+ );
8804
+
8805
+ if (res_error) {
8806
+ if (this.config.options.strictResponseCheck === true) {
8807
+ return Promise.reject(new FDKResponseValidationError(res_error));
8808
+ } else {
8809
+ Logger({
8810
+ level: "WARN",
8811
+ message: `Response Validation Warnings for platform > Content > upsertApplicationResourceTranslationInBulk \n ${res_error}`,
8812
+ });
8813
+ }
8814
+ }
8815
+
8816
+ return response;
8817
+ }
7671
8818
  }
7672
8819
 
7673
8820
  module.exports = Content;