@gofynd/fdk-client-javascript 2.0.2 → 3.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 (37) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +4 -1
  4. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1 -1
  5. package/sdk/partner/Theme/ThemePartnerClient.js +4 -4
  6. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +2 -2
  7. package/sdk/partner/Webhook/WebhookPartnerModel.js +1 -1
  8. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  9. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -4
  10. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +227 -35
  11. package/sdk/platform/Catalog/CatalogPlatformModel.js +110 -23
  12. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -8
  13. package/sdk/platform/Catalog/CatalogPlatformValidator.js +5 -7
  14. package/sdk/platform/Common/CommonPlatformModel.d.ts +10 -16
  15. package/sdk/platform/Common/CommonPlatformModel.js +5 -8
  16. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +2 -2
  17. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
  18. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +62 -99
  19. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +30 -50
  20. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +4 -4
  21. package/sdk/platform/Content/ContentPlatformApplicationClient.js +9 -6
  22. package/sdk/platform/Content/ContentPlatformClient.d.ts +5 -5
  23. package/sdk/platform/Content/ContentPlatformClient.js +14 -9
  24. package/sdk/platform/Content/ContentPlatformModel.d.ts +22 -17
  25. package/sdk/platform/Content/ContentPlatformModel.js +19 -17
  26. package/sdk/platform/Content/ContentPlatformValidator.d.ts +2 -0
  27. package/sdk/platform/Content/ContentPlatformValidator.js +2 -0
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1 -1
  30. package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
  31. package/sdk/platform/User/UserPlatformModel.js +1 -1
  32. package/sdk/public/Catalog/CatalogPublicModel.d.ts +4 -1
  33. package/sdk/public/Catalog/CatalogPublicModel.js +1 -1
  34. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +6 -12
  35. package/sdk/public/Configuration/ConfigurationPublicModel.js +3 -6
  36. package/sdk/public/Content/ContentPublicModel.d.ts +4 -8
  37. package/sdk/public/Content/ContentPublicModel.js +2 -4
@@ -43,8 +43,7 @@ const Joi = require("joi");
43
43
  * or not for sales channel inventory
44
44
  * @property {CommunicationConfig} [communication]
45
45
  * @property {string[]} [platforms]
46
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
47
- * of the sales channel inventory
46
+ * @property {string} [_id] - The unique identifier of the sales channel inventory
48
47
  * @property {LoyaltyPointsConfig} [loyalty_points]
49
48
  * @property {string} [app] - Current sales channel ID
50
49
  * @property {string} [created_at] - ISO 8601 timestamp of sales channel
@@ -414,8 +413,7 @@ const Joi = require("joi");
414
413
  /**
415
414
  * @typedef MobileAppConfiguration
416
415
  * @property {boolean} [is_active] - Indicates the availability of the mobile build
417
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
418
- * for mobile application configuration
416
+ * @property {string} [_id] - The unique identifier for mobile application configuration
419
417
  * @property {string} [app_name] - Name of the mobile app
420
418
  * @property {LandingImage} [landing_image]
421
419
  * @property {SplashImage} [splash_image]
@@ -460,7 +458,7 @@ const Joi = require("joi");
460
458
 
461
459
  /**
462
460
  * @typedef BuildVersion
463
- * @property {string} [_id] - 24-digit Mongo Object ID
461
+ * @property {string} [_id] - Primary Identifier of the build version.
464
462
  * @property {string} [application] - Application ID of the sales channel
465
463
  * @property {string} [platform_type] - Device platform for which the mobile app
466
464
  * was built, e.g. android, ios.
@@ -479,8 +477,8 @@ const Joi = require("joi");
479
477
 
480
478
  /**
481
479
  * @typedef AppSupportedCurrency
482
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
483
- * of the currency configuration supported by the application
480
+ * @property {string} [_id] - The unique identifier of the currency
481
+ * configuration supported by the application
484
482
  * @property {string[]} [supported_currency]
485
483
  * @property {string} [application] - Alphanumeric ID allotted to an application
486
484
  * (sales channel website) created within a business account.
@@ -493,8 +491,7 @@ const Joi = require("joi");
493
491
 
494
492
  /**
495
493
  * @typedef DefaultCurrency
496
- * @property {string} [ref] - The unique identifier (24-digit Mongo Object ID)
497
- * of the default currency
494
+ * @property {string} [ref] - The unique identifier of the default currency
498
495
  * @property {string} [code] - 3-character code of the default currency, e.g.
499
496
  * INR, EUR, USD
500
497
  */
@@ -502,8 +499,7 @@ const Joi = require("joi");
502
499
  /**
503
500
  * @typedef DomainAdd
504
501
  * @property {string} [name] - Full domain name, e.g. uniket.hostx0.de
505
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
506
- * of the domain
502
+ * @property {string} [_id] - The unique identifier of the domain
507
503
  * @property {boolean} [verified] - Domain is verified or not (indicates if A
508
504
  * records and TXT records are correct)
509
505
  * @property {boolean} [is_primary] - Domain is primary or not (indicates if the
@@ -523,8 +519,7 @@ const Joi = require("joi");
523
519
  /**
524
520
  * @typedef Domain
525
521
  * @property {string} [name] - Full domain name, e.g. newton.com
526
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
527
- * of the sales channel domain
522
+ * @property {string} [_id] - The unique identifier of the sales channel domain
528
523
  * @property {boolean} [verified] - Domain is verified or not. TXT and A records
529
524
  * should propagate correctly.
530
525
  * @property {boolean} [is_primary] - Domain is primary or not. Primary domain
@@ -542,8 +537,7 @@ const Joi = require("joi");
542
537
  /**
543
538
  * @typedef UpdateDomain
544
539
  * @property {string} [name] - Full domain name, e.g. zenz.com
545
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
546
- * of the domain
540
+ * @property {string} [_id] - The unique identifier of the domain
547
541
  * @property {boolean} [verified] - Domain is verified or not (indicates if A
548
542
  * records and TXT records are correct)
549
543
  * @property {boolean} [is_primary] - Domain is primary or not (indicates if the
@@ -645,8 +639,8 @@ const Joi = require("joi");
645
639
 
646
640
  /**
647
641
  * @typedef AppInventoryStores
648
- * @property {string} [_id] - The unique identifier of the store (24-digit Mongo
649
- * Object ID) in the sales channel inventory
642
+ * @property {string} [_id] - The unique identifier of the store in the sales
643
+ * channel inventory
650
644
  * @property {string} [modified_on] - ISO 8601 timestamp of last known updation
651
645
  * to the stores in sales channel inventory
652
646
  * @property {number} [uid] - Sales channel inventory store UID
@@ -679,8 +673,7 @@ const Joi = require("joi");
679
673
  * @property {string} [type] - Permitted values are 'hard' and 'soft'. For hard
680
674
  * type delivery, store selection is compulsory. For soft type, delivery store
681
675
  * selection is optional.
682
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
683
- * of the ordering stores
676
+ * @property {string} [_id] - The unique identifier of the ordering stores
684
677
  * @property {string} [app] - Alphanumeric ID allotted to an application (sales
685
678
  * channel website) created within a business account
686
679
  * @property {number} [__v]
@@ -711,8 +704,7 @@ const Joi = require("joi");
711
704
  * @typedef OtherSellerApplication
712
705
  * @property {string} [name] - Name of the other seller's sales channel
713
706
  * @property {string} [description] - Basic details about the other seller's sales channel
714
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
715
- * of the other seller's sales channel
707
+ * @property {string} [_id] - The unique identifier of the other seller's sales channel
716
708
  * @property {string} [domain] - Domain URL of the other seller's sales channel
717
709
  * @property {OtherSellerCompany} [company]
718
710
  * @property {string} [opt_type] - Inventory opted by the other seller's sales
@@ -729,8 +721,7 @@ const Joi = require("joi");
729
721
  * @typedef OptedApplicationResponseSchema
730
722
  * @property {string} [name] - Name of the other seller's sales channel
731
723
  * @property {string} [description] - Basic details about the other seller's sales channel
732
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
733
- * of the other seller's sales channel
724
+ * @property {string} [_id] - The unique identifier of the other seller's sales channel
734
725
  * @property {string} [domain] - Domain URL of the other seller's sales channel
735
726
  * @property {OptedCompany} [company]
736
727
  * @property {OptedInventory} [opted_inventory]
@@ -785,8 +776,7 @@ const Joi = require("joi");
785
776
  /**
786
777
  * @typedef TokenResponseSchema
787
778
  * @property {Tokens} [tokens]
788
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
789
- * of the token
779
+ * @property {string} [_id] - The unique identifier of the token
790
780
  * @property {string} [application] - Alphanumeric ID allotted to the current
791
781
  * application created within the current business account
792
782
  * @property {string} [created_at] - ISO 8601 timestamp of token creation
@@ -1024,8 +1014,7 @@ const Joi = require("joi");
1024
1014
  * @property {OrderFeature} [order]
1025
1015
  * @property {BuyboxFeature} [buybox]
1026
1016
  * @property {DeliveryStrategy} [delivery_strategy]
1027
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1028
- * for the sales channel features
1017
+ * @property {string} [_id] - The unique identifier for the sales channel features
1029
1018
  * @property {string} [app] - Application ID of the sales channel
1030
1019
  * @property {string} [created_at] - ISO 8601 timestamp showing the date when
1031
1020
  * the features were configured
@@ -1154,8 +1143,8 @@ const Joi = require("joi");
1154
1143
 
1155
1144
  /**
1156
1145
  * @typedef Currency
1157
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1158
- * of the current sales channel supported currency
1146
+ * @property {string} [_id] - The unique identifier of the current sales channel
1147
+ * supported currency
1159
1148
  * @property {boolean} [is_active] - Shows currency is enabled or not in current
1160
1149
  * sales channel
1161
1150
  * @property {string} [name] - Name of the currency, e.g Indian Rupee
@@ -1224,11 +1213,9 @@ const Joi = require("joi");
1224
1213
  * @property {boolean} [is_internal] - Indicates whether a sales channel is
1225
1214
  * internal or not
1226
1215
  * @property {boolean} [is_active] - Indicates sales channel is active or not active
1227
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1228
- * of the sales channel
1216
+ * @property {string} [_id] - The unique identifier of the sales channel
1229
1217
  * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
1230
- * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
1231
- * of owner who owns the application
1218
+ * @property {string} [owner] - The unique identifier of owner who owns the application
1232
1219
  * @property {number} [company_id] - Numeric ID allotted to a business account
1233
1220
  * where the sales channel exists
1234
1221
  * @property {string} [token] - Random generated fix length string for sales
@@ -1266,11 +1253,9 @@ const Joi = require("joi");
1266
1253
  * @property {boolean} [is_internal] - Indicates whether a sales channel is
1267
1254
  * internal or not
1268
1255
  * @property {boolean} [is_active] - Indicates sales channel is active or not active
1269
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1270
- * of the sales channel
1256
+ * @property {string} [_id] - The unique identifier of the sales channel
1271
1257
  * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
1272
- * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
1273
- * of owner who owns the application
1258
+ * @property {string} [owner] - The unique identifier of owner who owns the application
1274
1259
  * @property {number} [company_id] - Numeric ID allotted to a business account
1275
1260
  * where the sales channel exists
1276
1261
  * @property {string} [token] - Random generated fix length string for sales
@@ -1334,8 +1319,7 @@ const Joi = require("joi");
1334
1319
  * @property {Links[]} [links]
1335
1320
  * @property {string} [copyright_text] - Copyright statement usually seen at the
1336
1321
  * site's footer
1337
- * @property {string} [_id] - Unique identifier (24-digit Mongo Object ID) of
1338
- * the application information
1322
+ * @property {string} [_id] - Unique identifier of the application information
1339
1323
  * @property {BusinessHighlights[]} [business_highlights]
1340
1324
  * @property {string} [application] - Alphanumeric ID allotted to a sales
1341
1325
  * channel application created within a business account
@@ -1472,8 +1456,7 @@ const Joi = require("joi");
1472
1456
 
1473
1457
  /**
1474
1458
  * @typedef BusinessHighlights
1475
- * @property {string} [_id] - Unique identifier (24-digit Mongo Object ID) of
1476
- * the related business
1459
+ * @property {string} [_id] - Unique identifier of the related business
1477
1460
  * @property {string} [title] - Title of the business highlight, e.g. Superfast Delivery
1478
1461
  * @property {string} [icon] - Hosted URL of icon image representing the
1479
1462
  * business highlight
@@ -1491,8 +1474,7 @@ const Joi = require("joi");
1491
1474
  * @property {SecureUrl} [banner]
1492
1475
  * @property {Domain} [domain]
1493
1476
  * @property {Domain[]} [domains]
1494
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1495
- * for the sales channel details
1477
+ * @property {string} [_id] - The unique identifier for the sales channel details
1496
1478
  * @property {string} [slug]
1497
1479
  * @property {number} [company_id]
1498
1480
  */
@@ -1504,8 +1486,8 @@ const Joi = require("joi");
1504
1486
 
1505
1487
  /**
1506
1488
  * @typedef AppCurrencyResponseSchema
1507
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1508
- * of the currency configuration supported by the application
1489
+ * @property {string} [_id] - The unique identifier of the currency
1490
+ * configuration supported by the application
1509
1491
  * @property {string} [application] - Alphanumeric ID allotted to an application
1510
1492
  * (sales channel website) created within a business account
1511
1493
  * @property {DefaultCurrency} [default_currency]
@@ -1539,8 +1521,7 @@ const Joi = require("joi");
1539
1521
  /**
1540
1522
  * @typedef OrderingStore
1541
1523
  * @property {OptedStoreAddress} [address]
1542
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1543
- * of the ordering store
1524
+ * @property {string} [_id] - The unique identifier of the ordering store
1544
1525
  * @property {number} [uid] - Ordering store UID
1545
1526
  * @property {string} [name] - Store name of the ordering store
1546
1527
  * @property {string} [display_name] - Display name of the ordering store
@@ -1560,8 +1541,7 @@ const Joi = require("joi");
1560
1541
  * @property {boolean} [enabled] - Allow ordering stores for current sales channel
1561
1542
  * @property {string} [type] - For hard type delivery, store selection is
1562
1543
  * compulsory. For soft type, delivery store selection is optional.
1563
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
1564
- * of the ordering store
1544
+ * @property {string} [_id] - The unique identifier of the ordering store
1565
1545
  * @property {string} [app] - Alphanumeric ID allotted to an application (sales
1566
1546
  * channel website) created within a business account
1567
1547
  * @property {number} [__v] - Version key for tracking ordering stores. Default
@@ -1576,7 +1556,7 @@ const Joi = require("joi");
1576
1556
 
1577
1557
  /**
1578
1558
  * @typedef ValidationErrors
1579
- * @property {ValidationError[]} errors
1559
+ * @property {ValidationError[]} errors - A list of validation errors in the request.
1580
1560
  */
1581
1561
 
1582
1562
  /**
@@ -270,24 +270,24 @@ declare class Content {
270
270
  *
271
271
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
272
272
  * @param {import("../PlatformAPIClient").Options} - Options
273
- * @returns {Promise<any>} - Success response
273
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
274
274
  * @name deleteApplicationLanguage
275
275
  * @summary: Remove app language
276
276
  * @description: Remove a language from application's supported languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationLanguage/).
277
277
  */
278
- deleteApplicationLanguage({ locale, requestHeaders }?: ContentPlatformApplicationValidator.DeleteApplicationLanguageParam, { responseHeaders }?: object): Promise<any>;
278
+ deleteApplicationLanguage({ locale, requestHeaders }?: ContentPlatformApplicationValidator.DeleteApplicationLanguageParam, { responseHeaders }?: object): Promise<ContentPlatformModel.OperationResponseSchema>;
279
279
  /**
280
280
  * @param {ContentPlatformApplicationValidator.DeleteApplicationResourceTranslationParam} arg
281
281
  * - Arg object
282
282
  *
283
283
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
284
284
  * @param {import("../PlatformAPIClient").Options} - Options
285
- * @returns {Promise<ContentPlatformModel.DeletedResource>} - Success response
285
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
286
286
  * @name deleteApplicationResourceTranslation
287
287
  * @summary: Remove app translation
288
288
  * @description: Remove translations for application resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationResourceTranslation/).
289
289
  */
290
- deleteApplicationResourceTranslation({ id, requestHeaders }?: ContentPlatformApplicationValidator.DeleteApplicationResourceTranslationParam, { responseHeaders }?: object): Promise<ContentPlatformModel.DeletedResource>;
290
+ deleteApplicationResourceTranslation({ id, requestHeaders }?: ContentPlatformApplicationValidator.DeleteApplicationResourceTranslationParam, { responseHeaders }?: object): Promise<ContentPlatformModel.OperationResponseSchema>;
291
291
  /**
292
292
  * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object
293
293
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1802,7 +1802,7 @@ class Content {
1802
1802
  *
1803
1803
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1804
1804
  * @param {import("../PlatformAPIClient").Options} - Options
1805
- * @returns {Promise<any>} - Success response
1805
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
1806
1806
  * @name deleteApplicationLanguage
1807
1807
  * @summary: Remove app language
1808
1808
  * @description: Remove a language from application's supported languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationLanguage/).
@@ -1856,9 +1856,12 @@ class Content {
1856
1856
  responseData = response[0];
1857
1857
  }
1858
1858
 
1859
- const { error: res_error } = Joi.string()
1860
- .allow("")
1861
- .validate(responseData, { abortEarly: false, allowUnknown: true });
1859
+ const {
1860
+ error: res_error,
1861
+ } = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
1862
+ abortEarly: false,
1863
+ allowUnknown: true,
1864
+ });
1862
1865
 
1863
1866
  if (res_error) {
1864
1867
  if (this.config.options.strictResponseCheck === true) {
@@ -1880,7 +1883,7 @@ class Content {
1880
1883
  *
1881
1884
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1882
1885
  * @param {import("../PlatformAPIClient").Options} - Options
1883
- * @returns {Promise<ContentPlatformModel.DeletedResource>} - Success response
1886
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
1884
1887
  * @name deleteApplicationResourceTranslation
1885
1888
  * @summary: Remove app translation
1886
1889
  * @description: Remove translations for application resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteApplicationResourceTranslation/).
@@ -1936,7 +1939,7 @@ class Content {
1936
1939
 
1937
1940
  const {
1938
1941
  error: res_error,
1939
- } = ContentPlatformModel.DeletedResource().validate(responseData, {
1942
+ } = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
1940
1943
  abortEarly: false,
1941
1944
  allowUnknown: true,
1942
1945
  });
@@ -64,24 +64,24 @@ declare class Content {
64
64
  * @param {ContentPlatformValidator.DeleteCompanyLanguageParam} arg - Arg object
65
65
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
66
66
  * @param {import("../PlatformAPIClient").Options} - Options
67
- * @returns {Promise<any>} - Success response
67
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
68
68
  * @name deleteCompanyLanguage
69
69
  * @summary: Remove company language
70
70
  * @description: Remove a language from company's supported languages list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCompanyLanguage/).
71
71
  */
72
- deleteCompanyLanguage({ locale, requestHeaders }?: ContentPlatformValidator.DeleteCompanyLanguageParam, { responseHeaders }?: object): Promise<any>;
72
+ deleteCompanyLanguage({ locale, requestHeaders }?: ContentPlatformValidator.DeleteCompanyLanguageParam, { responseHeaders }?: object): Promise<ContentPlatformModel.OperationResponseSchema>;
73
73
  /**
74
74
  * @param {ContentPlatformValidator.DeleteCompanyResourceTranslationParam} arg
75
75
  * - Arg object
76
76
  *
77
77
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
78
78
  * @param {import("../PlatformAPIClient").Options} - Options
79
- * @returns {Promise<ContentPlatformModel.DeletedResource>} - Success response
79
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
80
80
  * @name deleteCompanyResourceTranslation
81
81
  * @summary: Remove company translation
82
82
  * @description: Remove translations for company resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCompanyResourceTranslation/).
83
83
  */
84
- deleteCompanyResourceTranslation({ id, requestHeaders }?: ContentPlatformValidator.DeleteCompanyResourceTranslationParam, { responseHeaders }?: object): Promise<ContentPlatformModel.DeletedResource>;
84
+ deleteCompanyResourceTranslation({ id, requestHeaders }?: ContentPlatformValidator.DeleteCompanyResourceTranslationParam, { responseHeaders }?: object): Promise<ContentPlatformModel.OperationResponseSchema>;
85
85
  /**
86
86
  * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam} arg
87
87
  * - Arg object
@@ -404,7 +404,7 @@ declare class Content {
404
404
  * @summary: Set default language
405
405
  * @description: Update default language settings for the company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCompanyLanguageDefault/).
406
406
  */
407
- updateCompanyLanguageDefault({ body, requestHeaders }?: ContentPlatformValidator.UpdateCompanyLanguageDefaultParam, { responseHeaders }?: object): Promise<ContentPlatformModel.CompanyLanguage>;
407
+ updateCompanyLanguageDefault({ locale, body, requestHeaders }?: ContentPlatformValidator.UpdateCompanyLanguageDefaultParam, { responseHeaders }?: object): Promise<ContentPlatformModel.CompanyLanguage>;
408
408
  /**
409
409
  * @param {ContentPlatformValidator.UpdateCompanyResourceTranslationParam} arg
410
410
  * - Arg object
@@ -431,7 +431,7 @@ class Content {
431
431
  * @param {ContentPlatformValidator.DeleteCompanyLanguageParam} arg - Arg object
432
432
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
433
433
  * @param {import("../PlatformAPIClient").Options} - Options
434
- * @returns {Promise<any>} - Success response
434
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
435
435
  * @name deleteCompanyLanguage
436
436
  * @summary: Remove company language
437
437
  * @description: Remove a language from company's supported languages list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCompanyLanguage/).
@@ -485,9 +485,12 @@ class Content {
485
485
  responseData = response[0];
486
486
  }
487
487
 
488
- const { error: res_error } = Joi.string()
489
- .allow("")
490
- .validate(responseData, { abortEarly: false, allowUnknown: true });
488
+ const {
489
+ error: res_error,
490
+ } = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
491
+ abortEarly: false,
492
+ allowUnknown: true,
493
+ });
491
494
 
492
495
  if (res_error) {
493
496
  if (this.config.options.strictResponseCheck === true) {
@@ -509,7 +512,7 @@ class Content {
509
512
  *
510
513
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
511
514
  * @param {import("../PlatformAPIClient").Options} - Options
512
- * @returns {Promise<ContentPlatformModel.DeletedResource>} - Success response
515
+ * @returns {Promise<ContentPlatformModel.OperationResponseSchema>} - Success response
513
516
  * @name deleteCompanyResourceTranslation
514
517
  * @summary: Remove company translation
515
518
  * @description: Remove translations for company resources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCompanyResourceTranslation/).
@@ -567,7 +570,7 @@ class Content {
567
570
 
568
571
  const {
569
572
  error: res_error,
570
- } = ContentPlatformModel.DeletedResource().validate(responseData, {
573
+ } = ContentPlatformModel.OperationResponseSchema().validate(responseData, {
571
574
  abortEarly: false,
572
575
  allowUnknown: true,
573
576
  });
@@ -2509,7 +2512,7 @@ class Content {
2509
2512
  const response = await PlatformAPIClient.execute(
2510
2513
  this.config,
2511
2514
  "get",
2512
- `/service/platform/content/v1.0/company/${this.config.companyId}/translatable/sections/${id}`,
2515
+ `/service/platform/content/v1.0/company/${this.config.companyId}/translatable/section/${id}`,
2513
2516
  query_params,
2514
2517
  undefined,
2515
2518
  { ...xHeaders, ...requestHeaders },
@@ -2883,13 +2886,14 @@ class Content {
2883
2886
  * @description: Update default language settings for the company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCompanyLanguageDefault/).
2884
2887
  */
2885
2888
  async updateCompanyLanguageDefault(
2886
- { body, requestHeaders } = { requestHeaders: {} },
2889
+ { locale, body, requestHeaders } = { requestHeaders: {} },
2887
2890
  { responseHeaders } = { responseHeaders: false }
2888
2891
  ) {
2889
2892
  const {
2890
2893
  error,
2891
2894
  } = ContentPlatformValidator.updateCompanyLanguageDefault().validate(
2892
2895
  {
2896
+ locale,
2893
2897
  body,
2894
2898
  },
2895
2899
  { abortEarly: false, allowUnknown: true }
@@ -2903,6 +2907,7 @@ class Content {
2903
2907
  error: warrning,
2904
2908
  } = ContentPlatformValidator.updateCompanyLanguageDefault().validate(
2905
2909
  {
2910
+ locale,
2906
2911
  body,
2907
2912
  },
2908
2913
  { abortEarly: false, allowUnknown: false }
@@ -2921,7 +2926,7 @@ class Content {
2921
2926
  const response = await PlatformAPIClient.execute(
2922
2927
  this.config,
2923
2928
  "put",
2924
- `/service/platform/content/v1.0/company/${this.config.companyId}/languages`,
2929
+ `/service/platform/content/v1.0/company/${this.config.companyId}/languages/${locale}`,
2925
2930
  query_params,
2926
2931
  body,
2927
2932
  { ...xHeaders, ...requestHeaders },
@@ -1257,8 +1257,7 @@ export = ContentPlatformModel;
1257
1257
  */
1258
1258
  /**
1259
1259
  * @typedef TranslateUiLabels
1260
- * @property {string} [_id] - Unique MongoDB identifier assigned to the
1261
- * Translate Ui Labels entry
1260
+ * @property {string} [_id] - Unique identifier assigned to the Translate Ui Labels entry
1262
1261
  * @property {string} [company_id] - Identifier linking the resource to a
1263
1262
  * specific company within the platform
1264
1263
  * @property {string} [application_id] - Reference to the application where this
@@ -1454,10 +1453,6 @@ export = ContentPlatformModel;
1454
1453
  * @property {string} [canonical_url] - Translated canonical URL
1455
1454
  * @property {string} [description] - Translated SEO description
1456
1455
  */
1457
- /**
1458
- * @typedef DeletedResource
1459
- * @property {string} [message] - Confirmation message for successful deletion
1460
- */
1461
1456
  /**
1462
1457
  * @typedef ResourceTranslationList
1463
1458
  * @property {ResourceTranslationCreate[]} [items]
@@ -1507,6 +1502,12 @@ export = ContentPlatformModel;
1507
1502
  * @typedef StandardError
1508
1503
  * @property {string} message - A brief description of the error.
1509
1504
  */
1505
+ /**
1506
+ * @typedef OperationResponseSchema
1507
+ * @property {boolean} success - Indicates if the operation was successful
1508
+ * @property {string} [message] - Optional message providing additional
1509
+ * information about the operation
1510
+ */
1510
1511
  /** @typedef {"title" | "description"} GenerationEntityType */
1511
1512
  /**
1512
1513
  * @typedef {| "about-us"
@@ -1561,7 +1562,7 @@ export = ContentPlatformModel;
1561
1562
  declare class ContentPlatformModel {
1562
1563
  }
1563
1564
  declare namespace ContentPlatformModel {
1564
- export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, CreateTagRequestSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, Seo, MetaTag, MetaTagItem, ResourceTranslation, TranslationValue, TranslationSeo, DeletedResource, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, GenerationEntityType, PageType };
1565
+ export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, CreateTagRequestSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, TranslateUiLabels, TranslateUiLabelsCreate, StaticResourceUpdate, TranslateUiLabelsPage, Error, Meta, CompanyLanguage, CompanyLanguageCreate, CompanyLanguageUpdate, ApplicationLanguage, unPublishApplicationLanguage, ApplicationLanguageCreate, ApplicationLanguageUpdate, TranslatableResource, ResourceDefinition, ResourceJsonSchema, ResourceJsonSchemaType, ResourceUISchema, ResourceBulkDetails, Title, FeatureImage, Seo, MetaTag, MetaTagItem, ResourceTranslation, TranslationValue, TranslationSeo, ResourceTranslationList, ResourceTranslationCreate, ResourceTranslationUpdate, TranslatableSection, Metrics, ResourceTranslationUpsertItem, ResourceTranslationBulkUpsert, StandardError, OperationResponseSchema, GenerationEntityType, PageType };
1565
1566
  }
1566
1567
  /** @returns {ValidationError} */
1567
1568
  declare function ValidationError(): ValidationError;
@@ -3851,8 +3852,7 @@ type ActionPage = {
3851
3852
  declare function TranslateUiLabels(): TranslateUiLabels;
3852
3853
  type TranslateUiLabels = {
3853
3854
  /**
3854
- * - Unique MongoDB identifier assigned to the
3855
- * Translate Ui Labels entry
3855
+ * - Unique identifier assigned to the Translate Ui Labels entry
3856
3856
  */
3857
3857
  _id?: string;
3858
3858
  /**
@@ -4280,14 +4280,6 @@ type TranslationSeo = {
4280
4280
  */
4281
4281
  description?: string;
4282
4282
  };
4283
- /** @returns {DeletedResource} */
4284
- declare function DeletedResource(): DeletedResource;
4285
- type DeletedResource = {
4286
- /**
4287
- * - Confirmation message for successful deletion
4288
- */
4289
- message?: string;
4290
- };
4291
4283
  /** @returns {ResourceTranslationList} */
4292
4284
  declare function ResourceTranslationList(): ResourceTranslationList;
4293
4285
  type ResourceTranslationList = {
@@ -4396,6 +4388,19 @@ type StandardError = {
4396
4388
  */
4397
4389
  message: string;
4398
4390
  };
4391
+ /** @returns {OperationResponseSchema} */
4392
+ declare function OperationResponseSchema(): OperationResponseSchema;
4393
+ type OperationResponseSchema = {
4394
+ /**
4395
+ * - Indicates if the operation was successful
4396
+ */
4397
+ success: boolean;
4398
+ /**
4399
+ * - Optional message providing additional
4400
+ * information about the operation
4401
+ */
4402
+ message?: string;
4403
+ };
4399
4404
  /**
4400
4405
  * Enum: GenerationEntityType Used By: Content
4401
4406
  *
@@ -1416,8 +1416,7 @@ const Joi = require("joi");
1416
1416
 
1417
1417
  /**
1418
1418
  * @typedef TranslateUiLabels
1419
- * @property {string} [_id] - Unique MongoDB identifier assigned to the
1420
- * Translate Ui Labels entry
1419
+ * @property {string} [_id] - Unique identifier assigned to the Translate Ui Labels entry
1421
1420
  * @property {string} [company_id] - Identifier linking the resource to a
1422
1421
  * specific company within the platform
1423
1422
  * @property {string} [application_id] - Reference to the application where this
@@ -1640,11 +1639,6 @@ const Joi = require("joi");
1640
1639
  * @property {string} [description] - Translated SEO description
1641
1640
  */
1642
1641
 
1643
- /**
1644
- * @typedef DeletedResource
1645
- * @property {string} [message] - Confirmation message for successful deletion
1646
- */
1647
-
1648
1642
  /**
1649
1643
  * @typedef ResourceTranslationList
1650
1644
  * @property {ResourceTranslationCreate[]} [items]
@@ -1702,6 +1696,13 @@ const Joi = require("joi");
1702
1696
  * @property {string} message - A brief description of the error.
1703
1697
  */
1704
1698
 
1699
+ /**
1700
+ * @typedef OperationResponseSchema
1701
+ * @property {boolean} success - Indicates if the operation was successful
1702
+ * @property {string} [message] - Optional message providing additional
1703
+ * information about the operation
1704
+ */
1705
+
1705
1706
  /** @typedef {"title" | "description"} GenerationEntityType */
1706
1707
 
1707
1708
  /**
@@ -3614,7 +3615,7 @@ class ContentPlatformModel {
3614
3615
  return Joi.object({
3615
3616
  schema: Joi.string().allow(""),
3616
3617
  type: ContentPlatformModel.ResourceJsonSchemaType(),
3617
- });
3618
+ }).allow(null);
3618
3619
  }
3619
3620
 
3620
3621
  /** @returns {ResourceJsonSchemaType} */
@@ -3633,14 +3634,14 @@ class ContentPlatformModel {
3633
3634
  title: ContentPlatformModel.Title(),
3634
3635
  feature_image: ContentPlatformModel.FeatureImage(),
3635
3636
  seo: ContentPlatformModel.Seo(),
3636
- });
3637
+ }).allow(null);
3637
3638
  }
3638
3639
 
3639
3640
  /** @returns {ResourceBulkDetails} */
3640
3641
  static ResourceBulkDetails() {
3641
3642
  return Joi.object({
3642
3643
  fields: Joi.array().items(Joi.string().allow("")),
3643
- });
3644
+ }).allow(null);
3644
3645
  }
3645
3646
 
3646
3647
  /** @returns {Title} */
@@ -3712,13 +3713,6 @@ class ContentPlatformModel {
3712
3713
  });
3713
3714
  }
3714
3715
 
3715
- /** @returns {DeletedResource} */
3716
- static DeletedResource() {
3717
- return Joi.object({
3718
- message: Joi.string().allow(""),
3719
- });
3720
- }
3721
-
3722
3716
  /** @returns {ResourceTranslationList} */
3723
3717
  static ResourceTranslationList() {
3724
3718
  return Joi.object({
@@ -3795,6 +3789,14 @@ class ContentPlatformModel {
3795
3789
  });
3796
3790
  }
3797
3791
 
3792
+ /** @returns {OperationResponseSchema} */
3793
+ static OperationResponseSchema() {
3794
+ return Joi.object({
3795
+ success: Joi.boolean().required(),
3796
+ message: Joi.string().allow(""),
3797
+ });
3798
+ }
3799
+
3798
3800
  /**
3799
3801
  * Enum: GenerationEntityType Used By: Content
3800
3802
  *
@@ -154,6 +154,7 @@ export = ContentPlatformValidator;
154
154
  */
155
155
  /**
156
156
  * @typedef UpdateCompanyLanguageDefaultParam
157
+ * @property {string} locale
157
158
  * @property {ContentPlatformModel.CompanyLanguageUpdate} body
158
159
  */
159
160
  /**
@@ -390,6 +391,7 @@ type SampleCustomObjectBulkEntryBySlugParam = {
390
391
  slug: string;
391
392
  };
392
393
  type UpdateCompanyLanguageDefaultParam = {
394
+ locale: string;
393
395
  body: ContentPlatformModel.CompanyLanguageUpdate;
394
396
  };
395
397
  type UpdateCompanyResourceTranslationParam = {