@gofynd/fdk-client-javascript 1.4.15-beta.6 → 1.4.16-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +68 -48
  6. package/sdk/application/Cart/CartApplicationClient.js +130 -27
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +19 -30
  14. package/sdk/application/Content/ContentApplicationClient.js +40 -60
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -8
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -7
  17. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  18. package/sdk/application/Finance/FinanceApplicationClient.js +126 -0
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  20. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +118 -8
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
  24. package/sdk/application/Order/OrderApplicationClient.js +62 -8
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  26. package/sdk/application/Payment/PaymentApplicationClient.js +65 -46
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  30. package/sdk/application/Theme/ThemeApplicationClient.js +4 -2
  31. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  32. package/sdk/application/User/UserApplicationClient.js +6 -6
  33. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  34. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  35. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  37. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  41. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  42. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  44. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  45. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  47. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
  49. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
  51. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  52. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  53. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  54. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  55. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  56. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  57. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  58. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  59. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  60. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  66. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  72. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  73. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  74. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  75. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  76. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  77. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  78. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
  80. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
  82. package/sdk/platform/Cart/CartPlatformModel.d.ts +5039 -1300
  83. package/sdk/platform/Cart/CartPlatformModel.js +1976 -1217
  84. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
  88. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
  89. package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
  90. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6941 -2203
  91. package/sdk/platform/Catalog/CatalogPlatformModel.js +3224 -1687
  92. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
  94. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  95. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  96. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  97. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  98. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  103. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  104. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  110. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  116. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  118. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  120. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
  122. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
  124. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  125. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  126. package/sdk/platform/Content/ContentPlatformModel.d.ts +1241 -395
  127. package/sdk/platform/Content/ContentPlatformModel.js +521 -390
  128. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  129. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  130. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  131. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  132. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  133. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  134. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  136. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  140. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
  144. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  146. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  147. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  148. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  149. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  150. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
  151. package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
  152. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
  153. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
  154. package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
  155. package/sdk/platform/Order/OrderPlatformClient.js +416 -198
  156. package/sdk/platform/Order/OrderPlatformModel.d.ts +7602 -1269
  157. package/sdk/platform/Order/OrderPlatformModel.js +3926 -1269
  158. package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
  159. package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
  160. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  161. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  162. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  163. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  164. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  165. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  166. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  167. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  168. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  169. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  170. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
  171. package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
  172. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  173. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  174. package/sdk/platform/PlatformClient.d.ts +0 -2
  175. package/sdk/platform/PlatformClient.js +0 -4
  176. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  177. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  178. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  179. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  180. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  181. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  182. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +48 -38
  183. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +134 -43
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +38 -44
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +56 -62
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
  192. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  193. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
  195. package/sdk/platform/Share/SharePlatformModel.js +27 -4
  196. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  197. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  198. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  199. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  200. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  201. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  206. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  207. package/sdk/platform/User/UserPlatformModel.js +23 -23
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  214. package/sdk/platform/index.d.ts +0 -1
  215. package/sdk/platform/index.js +0 -2
  216. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  217. package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
  218. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  219. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  220. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  221. package/sdk/public/Content/ContentPublicClient.js +895 -8
  222. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  223. package/sdk/public/Content/ContentPublicModel.js +649 -3
  224. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  225. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  226. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  227. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  228. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  229. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  230. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  231. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  232. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  233. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  234. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  235. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  236. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  237. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -1,5 +1,11 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef ValidationError
5
+ * @property {string} message - A brief description of the error encountered.
6
+ * @property {string} field - The field in the request that caused the error.
7
+ */
8
+
3
9
  /**
4
10
  * @typedef GenerateSEOContent
5
11
  * @property {string} [text]
@@ -178,7 +184,7 @@ const Joi = require("joi");
178
184
  */
179
185
 
180
186
  /**
181
- * @typedef BlogGetResponse
187
+ * @typedef BlogGetDetails
182
188
  * @property {BlogSchema[]} [items]
183
189
  * @property {Page} [page]
184
190
  * @property {BlogFilters} [filters]
@@ -276,7 +282,7 @@ const Joi = require("joi");
276
282
  */
277
283
 
278
284
  /**
279
- * @typedef BlogRequest
285
+ * @typedef BlogPayload
280
286
  * @property {string} [application]
281
287
  * @property {Object} [_custom_json]
282
288
  * @property {Author} [author]
@@ -445,7 +451,7 @@ const Joi = require("joi");
445
451
  */
446
452
 
447
453
  /**
448
- * @typedef TagDeleteSuccessResponse
454
+ * @typedef TagDeleteSuccessDetails
449
455
  * @property {boolean} [success]
450
456
  */
451
457
 
@@ -576,7 +582,7 @@ const Joi = require("joi");
576
582
  */
577
583
 
578
584
  /**
579
- * @typedef LandingPageGetResponse
585
+ * @typedef LandingPageGetDetails
580
586
  * @property {LandingPageSchema[]} [items]
581
587
  * @property {Page} [page]
582
588
  */
@@ -595,12 +601,12 @@ const Joi = require("joi");
595
601
  */
596
602
 
597
603
  /**
598
- * @typedef DefaultNavigationResponse
604
+ * @typedef DefaultNavigationDetails
599
605
  * @property {NavigationSchema[]} [items]
600
606
  */
601
607
 
602
608
  /**
603
- * @typedef NavigationGetResponse
609
+ * @typedef NavigationGetDetails
604
610
  * @property {NavigationSchema[]} [items]
605
611
  * @property {Page} [page]
606
612
  */
@@ -627,7 +633,7 @@ const Joi = require("joi");
627
633
  */
628
634
 
629
635
  /**
630
- * @typedef NavigationRequest
636
+ * @typedef NavigationPayload
631
637
  * @property {string} [name]
632
638
  * @property {string} [slug]
633
639
  * @property {string[]} [platform]
@@ -636,7 +642,7 @@ const Joi = require("joi");
636
642
  */
637
643
 
638
644
  /**
639
- * @typedef PageGetResponse
645
+ * @typedef PageGetDetails
640
646
  * @property {PageSchema[]} [items]
641
647
  * @property {Page} [page]
642
648
  */
@@ -693,7 +699,7 @@ const Joi = require("joi");
693
699
  */
694
700
 
695
701
  /**
696
- * @typedef PageRequest
702
+ * @typedef PagePayload
697
703
  * @property {CronSchedule} [_schedule]
698
704
  * @property {string} [application]
699
705
  * @property {Author} [author]
@@ -718,7 +724,7 @@ const Joi = require("joi");
718
724
  */
719
725
 
720
726
  /**
721
- * @typedef PagePublishRequest
727
+ * @typedef PagePublishPayload
722
728
  * @property {boolean} [publish]
723
729
  */
724
730
 
@@ -730,7 +736,7 @@ const Joi = require("joi");
730
736
  */
731
737
 
732
738
  /**
733
- * @typedef SlideshowGetResponse
739
+ * @typedef SlideshowGetDetails
734
740
  * @property {SlideshowSchema[]} [items]
735
741
  * @property {Page} [page]
736
742
  */
@@ -750,7 +756,7 @@ const Joi = require("joi");
750
756
  */
751
757
 
752
758
  /**
753
- * @typedef SlideshowRequest
759
+ * @typedef SlideshowPayload
754
760
  * @property {string} [slug]
755
761
  * @property {string} [platform]
756
762
  * @property {ConfigurationSchema} [configuration]
@@ -841,100 +847,116 @@ const Joi = require("joi");
841
847
 
842
848
  /**
843
849
  * @typedef FieldValidations
844
- * @property {string} [name]
845
- * @property {string} [type]
850
+ * @property {string} [name] - Name of validation
851
+ * @property {string} [type] - Type of validation
846
852
  * @property {Object} [value]
847
853
  */
848
854
 
849
855
  /**
850
856
  * @typedef FieldDefinitionSchema
851
- * @property {string} [_id]
852
- * @property {string} [creator]
853
- * @property {string} [resource]
854
- * @property {string} [name]
855
- * @property {string} [namespace]
856
- * @property {string} [key]
857
- * @property {string} [description]
858
- * @property {string} [type]
859
- * @property {boolean} [multi_value]
860
- * @property {FieldValidations[]} [validations]
861
- * @property {string} [company_id]
862
- * @property {string} [created_by]
863
- * @property {string} [updated_by]
864
- * @property {boolean} [required]
865
- * @property {boolean} [is_deleted]
866
- * @property {string} [created_at]
867
- * @property {string} [updated_at]
868
- * @property {string} [type_name]
869
- * @property {number} [invalid_fields_count]
857
+ * @property {string} [id] - Unique system generated id
858
+ * @property {string} [resource] - Resource type to which custom field belongs
859
+ * @property {string} [name] - Name of custom field
860
+ * @property {string} [namespace] - Namespace of custom field
861
+ * @property {string} [slug] - Slug of custom field
862
+ * @property {string} [description] - Description of custom field definition
863
+ * @property {string} [type] - Data type of custom field
864
+ * @property {boolean} [multi_value] - Flag to denote whether custom field is
865
+ * multivalued or not
866
+ * @property {FieldValidations[]} [validations] - List of validations applied
867
+ * @property {string} [company_id] - Id of company
868
+ * @property {boolean} [required] - Whether the custom field is required or not
869
+ * @property {boolean} [is_deleted] - Whether the custom field is deleted or not
870
+ * @property {string} [type_name] - Type of type field
871
+ * @property {number} [invalid_fields_count] - Count of invalid fields after validation
870
872
  */
871
873
 
872
874
  /**
873
875
  * @typedef CustomFieldDefinitionsSchema
874
- * @property {FieldDefinitionSchema[]} [items]
876
+ * @property {FieldDefinitionSchema[]} [items] - List of custom field definitions
875
877
  * @property {Page} [page]
876
878
  */
877
879
 
878
880
  /**
879
881
  * @typedef CustomFieldDefinitionRequestSchema
880
- * @property {string} [resource]
881
- * @property {string} [type]
882
- * @property {string} [key]
883
- * @property {string} [namespace]
884
- * @property {boolean} [multi_value]
885
- * @property {string} [name]
886
- * @property {string} [description]
887
- * @property {FieldValidations[]} [validations]
882
+ * @property {string} [type] - Data type of custom field
883
+ * @property {string} [slug] - Slug of custom field definition
884
+ * @property {string} [namespace] - Namespace of custom field definition
885
+ * @property {boolean} [multi_value] - Flag to denote whether custom field is
886
+ * multi valued or not
887
+ * @property {string} [name] - Name of custom field definition
888
+ * @property {string} [description] - Description of a custom field definition
889
+ * @property {FieldValidations[]} [validations] - Validations for a custom field
888
890
  */
889
891
 
890
892
  /**
891
893
  * @typedef CustomObjectCustomFieldDefinitions
892
- * @property {string} [id]
893
- * @property {string} [type]
894
- * @property {string} [description]
895
- * @property {string} [name]
896
- * @property {boolean} [multi_value]
897
- * @property {boolean} [required]
898
- * @property {string} [key]
899
- * @property {FieldValidations[]} [validations]
894
+ * @property {string} [id] - Unique identifer for a custom field
895
+ * @property {string} [type] - Data type of custom field
896
+ * @property {string} [description] - Description of custom field
897
+ * @property {string} [name] - Name of custom field
898
+ * @property {boolean} [multi_value] - Flag to denote if cusom field is multi
899
+ * valued or not
900
+ * @property {boolean} [required] - Whether the field is required or not
901
+ * @property {string} [slug] - Slug of custom field definition
902
+ * @property {FieldValidations[]} [validations] - Validations added against the
903
+ * custom field
900
904
  * @property {string} [action]
901
905
  */
902
906
 
903
907
  /**
904
908
  * @typedef CustomObjectDefinitionUpdateRequestSchema
905
- * @property {string} [type]
906
- * @property {string} [description]
907
- * @property {string} [name]
908
- * @property {string} [display_name_key]
909
+ * @property {string} [description] - Description of custom object definiton
910
+ * @property {string} [name] - Name of custom object definition
911
+ * @property {string} [display_name_key] - Custom field slug which is used as a
912
+ * display key in
909
913
  * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions]
910
914
  */
911
915
 
912
916
  /**
913
917
  * @typedef CustomFieldDefinitionDetailResSchema
914
- * @property {string} [creator]
915
- * @property {string} [resource]
916
- * @property {string} [name]
917
- * @property {string} [namespace]
918
- * @property {string} [key]
919
- * @property {string} [description]
920
- * @property {string} [type]
921
- * @property {boolean} [multi_value]
922
- * @property {string} [company_id]
923
- * @property {string} [application_id]
924
- * @property {string} [created_by]
925
- * @property {string} [updated_by]
926
- * @property {boolean} [required]
927
- * @property {boolean} [is_deleted]
928
- * @property {string} [_id]
918
+ * @property {string} [resource] - Resource to which custom field is associated
919
+ * @property {string} [name] - Name of custom field
920
+ * @property {string} [namespace] - Namespace of custom field
921
+ * @property {string} [slug] - Slug of custom field
922
+ * @property {string} [description] - Description regarding custom field
923
+ * @property {string} [type] - Data type of custom field
924
+ * @property {boolean} [multi_value] - Flag to denote whether custom field is
925
+ * multi valued or not
926
+ * @property {string} [company_id] - Company Identifer
927
+ * @property {string} [application_id] - Sales channel identifier
928
+ * @property {boolean} [required] - Whether the customfield is required or not
929
+ * @property {boolean} [is_deleted] - Is custom field deleted
930
+ * @property {string} [id] - Unique system generated id
929
931
  * @property {Object[]} [validations]
930
- * @property {string} [created_at]
931
- * @property {string} [updated_at]
932
+ * @property {string} [created_at] - Date time at which field was created
933
+ * @property {string} [updated_at] - Date time at for a field's last modification
934
+ */
935
+
936
+ /**
937
+ * @typedef MetaFieldDefinitionDetailResSchema
938
+ * @property {string} [resource] - Resource to which meta field is associated
939
+ * @property {string} [name] - Name of meta field
940
+ * @property {string} [namespace] - Namespace of meta field
941
+ * @property {string} [slug] - Slug of meta field
942
+ * @property {string} [description] - Description regarding meta field
943
+ * @property {string} [type] - Data type of meta field
944
+ * @property {boolean} [multi_value] - Flag to denote whether meta field is
945
+ * multi valued or not
946
+ * @property {string} [company_id] - Company Identifer
947
+ * @property {string} [application_id] - Sales channel identifier
948
+ * @property {boolean} [required] - Whether the field is required or not
949
+ * @property {boolean} [is_deleted] - Is meta field deleted
950
+ * @property {string} [id] - Unique system generated id
951
+ * @property {Object[]} [validations]
952
+ * @property {string} [created_at] - Date time at which field was created
953
+ * @property {string} [updated_at] - Date time at for a field's last modification
932
954
  */
933
955
 
934
956
  /**
935
957
  * @typedef CustomDataDeleteSchema
936
- * @property {boolean} [success]
937
- * @property {string} [message]
958
+ * @property {boolean} [success] - Denotes the success of the delete operation
959
+ * @property {string} [message] - Denotes the message of delete operation
938
960
  */
939
961
 
940
962
  /**
@@ -944,23 +966,20 @@ const Joi = require("joi");
944
966
 
945
967
  /**
946
968
  * @typedef CustomFieldSchema
947
- * @property {string} [_id]
948
- * @property {string} [namespace]
949
- * @property {string} [key]
950
- * @property {string} [resource]
951
- * @property {string} [creator]
969
+ * @property {string} [id] - Unique system generated id
970
+ * @property {string} [namespace] - Namespace of custom field definition
971
+ * @property {string} [slug] - Slug of custom field definition
972
+ * @property {string} [resource] - The resource for which custom field is being created
952
973
  * @property {CustomFieldValue[]} [value]
953
- * @property {string} [resource_id]
954
- * @property {string} [type]
955
- * @property {boolean} [multi_value]
956
- * @property {string} [company_id]
957
- * @property {string} [definition_id]
974
+ * @property {string} [resource_slug] - Unique identifier of the resource
975
+ * @property {string} [type] - Data type of custom field
976
+ * @property {boolean} [multi_value] - Whether custom field is multi valued
977
+ * @property {string} [company_id] - Identifer for a company
958
978
  * @property {boolean} [has_invalid_values]
959
979
  * @property {Object[]} [invalid_value_errors]
960
- * @property {string} [created_by]
961
- * @property {boolean} [is_deleted]
962
- * @property {string} [created_at]
963
- * @property {string} [updated_at]
980
+ * @property {boolean} [is_deleted] - Indicates whether custom field is deleted
981
+ * @property {string} [created_at] - Time at which customer field was created
982
+ * @property {string} [updated_at] - Time at which custom field was updated
964
983
  */
965
984
 
966
985
  /**
@@ -969,6 +988,12 @@ const Joi = require("joi");
969
988
  * @property {Page} [page]
970
989
  */
971
990
 
991
+ /**
992
+ * @typedef CustomFieldsDeleteSchema
993
+ * @property {boolean} [success]
994
+ * @property {string} [message]
995
+ */
996
+
972
997
  /**
973
998
  * @typedef CustomFieldsResponseByResourceIdSchema
974
999
  * @property {CustomFieldSchema[]} [items]
@@ -977,7 +1002,9 @@ const Joi = require("joi");
977
1002
  /**
978
1003
  * @typedef CustomField
979
1004
  * @property {Object[]} [value]
980
- * @property {string} [definition_id]
1005
+ * @property {string} [namespace] - This is the namespace to which custom field belongs
1006
+ * @property {string} [slug] - This is the slug of custom field used while
1007
+ * creating a custom field definition
981
1008
  */
982
1009
 
983
1010
  /**
@@ -987,161 +1014,156 @@ const Joi = require("joi");
987
1014
 
988
1015
  /**
989
1016
  * @typedef CustomObjectSchema
990
- * @property {string} [_id]
991
- * @property {string} [creator]
992
- * @property {string} [company_id]
993
- * @property {string} [application_id]
994
- * @property {string} [created_by]
995
- * @property {string} [updated_by]
996
- * @property {string} [status]
997
- * @property {string} [type]
998
- * @property {string} [display_name]
999
- * @property {string} [definition_id]
1000
- * @property {CustomFieldSchema[]} [fields]
1017
+ * @property {string} [id] - Unique system generated id
1018
+ * @property {string} [company_id] - Identifer for a company
1019
+ * @property {string} [application_id] - Identifer for a sales channel
1020
+ * @property {string} [status] - Status of custom object
1021
+ * @property {string} [type] - Slug of custom object definition
1022
+ * @property {string} [definition_slug] - Slug for custom object definition
1023
+ * @property {string} [display_name] - Value of custom field used for displaying
1024
+ * custom object
1025
+ * @property {CustomFieldSchema[]} [fields] - Fields associated to the custom object
1001
1026
  */
1002
1027
 
1003
1028
  /**
1004
1029
  * @typedef CustomObjectDefinitionRequestSchema
1005
- * @property {string} [type]
1006
- * @property {string} [description]
1007
- * @property {string} [name]
1008
- * @property {string} [display_name_key]
1009
- * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions]
1030
+ * @property {string} [type] - Namespace/Slug of Custom object definition
1031
+ * @property {string} [definition_slug] - Unique slug for a custom object definition
1032
+ * @property {string} [description] - Description of custom object definition
1033
+ * @property {string} [name] - Name of custom object
1034
+ * @property {string} [display_name_key] - Denotes which custom field to be used
1035
+ * for displaying custom object
1036
+ * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] - List
1037
+ * of custom field definitions belonging to this custom object definition
1010
1038
  */
1011
1039
 
1012
1040
  /**
1013
- * @typedef CustomObjectCustomFieldDefinitionResSchema
1014
- * @property {string} [creator]
1015
- * @property {string} [resource]
1016
- * @property {string} [name]
1017
- * @property {string} [namespace]
1018
- * @property {string} [key]
1019
- * @property {string} [description]
1020
- * @property {string} [type]
1021
- * @property {boolean} [multi_value]
1022
- * @property {FieldValidations[]} [validations]
1023
- * @property {string} [company_id]
1024
- * @property {string} [created_by]
1025
- * @property {string} [metaobject_definition_id]
1026
- * @property {boolean} [required]
1027
- * @property {boolean} [is_deleted]
1028
- * @property {string} [_id]
1029
- * @property {string} [created_at]
1030
- * @property {string} [updated_at]
1031
- */
1032
-
1033
- /**
1034
- * @typedef CustomObjectDefinitionSchema
1035
- * @property {string} [_id]
1036
- * @property {string} [name]
1037
- * @property {string} [type]
1038
- * @property {string} [display_name_key]
1039
- * @property {string} [description]
1040
- * @property {string} [creator]
1041
- * @property {string} [created_by]
1042
- * @property {string} [updated_by]
1043
- * @property {CustomObjectCustomFieldDefinitionResSchema[]} [field_definitions]
1041
+ * @typedef CustomObjectDefinitionSlugSchema
1042
+ * @property {string} [id] - Unique system generated custom object definition id
1043
+ * @property {string} [name] - Display name of custom object definition
1044
+ * @property {string} [type] - Type of custom object definiton
1045
+ * @property {string} [definition_slug] - Slug of custom object definiton
1046
+ * @property {string} [display_name_key] - Display name of custom object definition
1047
+ * @property {string} [description] - Description of custom object definition
1048
+ * @property {CustomFieldDefinitionDetailResSchema[]} [field_definitions] -
1049
+ * Custom fields inside custom objects
1044
1050
  */
1045
1051
 
1046
1052
  /**
1047
1053
  * @typedef CustomObjectDefinitionDeleteResponseSchema
1048
- * @property {boolean} [success]
1049
- * @property {string} [message]
1054
+ * @property {boolean} [success] - Success status of delete custom object definition.
1055
+ * @property {string} [message] - Response message when custom object definition
1056
+ * is deleted.
1050
1057
  */
1051
1058
 
1052
1059
  /**
1053
- * @typedef CustomObjectEntryBulkUploadResponse
1054
- * @property {string} [url]
1055
- * @property {number} [total_records]
1060
+ * @typedef CustomObjectEntryBulkUploadDetails
1061
+ * @property {string} [url] - Signed url of csv
1062
+ * @property {number} [total_records] - Total no of records in csv file
1056
1063
  */
1057
1064
 
1058
1065
  /**
1059
- * @typedef CustomObjectListItemDefinationSchema
1060
- * @property {string} [_id]
1061
- * @property {string} [name]
1062
- * @property {string} [type]
1066
+ * @typedef CustomObjectListItemDefinitionModel
1067
+ * @property {string} [id] - Unique system generated id
1068
+ * @property {string} [name] - Name of custom object
1069
+ * @property {string} [type] - Type of custom object entry
1063
1070
  */
1064
1071
 
1065
1072
  /**
1066
1073
  * @typedef CustomObjectListItemSchema
1067
- * @property {string} [_id]
1068
- * @property {string} [definition_id]
1069
- * @property {string} [status]
1070
- * @property {string} [updated_at]
1071
- * @property {string} [display_name]
1072
- * @property {CustomObjectListItemDefinationSchema} [definition]
1073
- * @property {number} [references]
1074
+ * @property {string} [id] - Unique system generated id
1075
+ * @property {string} [status] - Status of custom object
1076
+ * @property {string} [created_at] - Creation time of custom object document
1077
+ * @property {string} [updated_at] - Updation time of custom object document
1078
+ * @property {string} [display_name] - Display name of custom object
1079
+ * @property {CustomObjectListItemDefinitionModel} [definition]
1080
+ * @property {number} [references] - References of the custom object entry
1074
1081
  */
1075
1082
 
1076
1083
  /**
1077
1084
  * @typedef CustomObjectsSchema
1078
- * @property {CustomObjectListItemSchema[]} [items]
1085
+ * @property {CustomObjectListItemSchema[]} [items] - List of paginated custom
1086
+ * object entries
1079
1087
  * @property {Page} [page]
1080
1088
  */
1081
1089
 
1082
1090
  /**
1083
- * @typedef CustomObjectFieldSchema
1084
- * @property {string} [_id]
1085
- * @property {string} [key]
1086
- * @property {Object[]} [value]
1087
- * @property {string} [type]
1088
- * @property {string} [definition_id]
1091
+ * @typedef CustomObjectFieldDefinition
1092
+ * @property {string} [id] - Unique system generate id
1093
+ * @property {string} [slug] - Slug of custom field definition
1094
+ * @property {string} [namespace] - Namespace of custom field definition
1095
+ * @property {Object[]} [value] - Value of custom field
1096
+ * @property {string} [type] - Data type of the custom field
1089
1097
  */
1090
1098
 
1091
1099
  /**
1092
- * @typedef CustomObjectByIdSchema
1093
- * @property {string} [_id]
1094
- * @property {string} [status]
1095
- * @property {string} [display_name]
1096
- * @property {CustomObjectListItemDefinationSchema} [definition]
1097
- * @property {Object[]} [references]
1098
- * @property {CustomObjectFieldSchema[]} [fields]
1100
+ * @typedef CustomObjectBySlugSchema
1101
+ * @property {string} [id] - Unique system generated identifer for a Custom Object
1102
+ * @property {string} [status] - Status of Custom Object
1103
+ * @property {string} [display_name] - Display name for the Custom Object
1104
+ * @property {CustomObjectListItemDefinitionModel} [definition]
1105
+ * @property {Object[]} [references] - Places where the custom object has been
1106
+ * used as a custom field
1107
+ * @property {string} [slug] - Slug of custom object entry
1108
+ * @property {string} [definition_slug] - Slug of custom object definition
1109
+ * @property {CustomObjectFieldDefinition[]} [fields] - List of custom fields
1110
+ * inside the custom object
1099
1111
  */
1100
1112
 
1101
1113
  /**
1102
1114
  * @typedef CustomObjectBulkEntryInitiateDownload
1103
- * @property {string} [message]
1104
- * @property {string} [task_id]
1115
+ * @property {string} [message] - Message for the user
1116
+ * @property {string} [task_id] - Identifer for a task
1105
1117
  */
1106
1118
 
1107
1119
  /**
1108
1120
  * @typedef CustomObjectMetaSchema
1109
- * @property {number} [mo_total_count]
1110
- * @property {number} [mo_success_count]
1111
- * @property {number} [mo_error_count]
1112
- * @property {string} [mo_defintion_type]
1121
+ * @property {number} [mo_total_count] - Total number of entries in the bulk entry
1122
+ * @property {number} [mo_success_count] - Number of entries which were successful
1123
+ * @property {number} [mo_error_count] - Number of entries which were failed
1124
+ * @property {string} [mo_defintion_type] - Type of object
1125
+ */
1126
+
1127
+ /**
1128
+ * @typedef JobSchema
1129
+ * @property {string} [id] - Unique system generated id
1130
+ * @property {string[]} [jobs] - List of total jobs
1131
+ * @property {string[]} [finished_jobs] - List of finished jobs
1132
+ * @property {string[]} [error_jobs] - List of jobs which resulted in an error
1133
+ * @property {string[]} [errors_occured] - List of errors occurred in the job
1134
+ * @property {string} [company_id] - Company Identifer
1135
+ * @property {string} [status] - Status of job
1136
+ * @property {string} [action_type] - Type of job
1137
+ * @property {string} [entity] - Entity against which job is running
1138
+ * @property {string} [error_url] - URL which contains the file with errors
1139
+ * @property {number} [finished_count] - Number of items successfully finished
1140
+ * @property {number} [error_count] - Number of items in error
1141
+ * @property {number} [success_count] - Number of successful items
1142
+ * @property {number} [total_jobs] - Total number of jobs
1143
+ * @property {CustomObjectMetaSchema} [meta]
1144
+ * @property {string} [created_by] - Source from where the bulk job is created
1145
+ * @property {string} [created_at] - Date/Time when the job was created
1146
+ * @property {string} [updated_at] - Date/Time when the job was updated
1147
+ * @property {string} [application_id] - Sales Channel Identifier
1113
1148
  */
1114
1149
 
1115
1150
  /**
1116
- * @typedef CustomObjectJobSchema
1117
- * @property {string} [_id]
1118
- * @property {string[]} [jobs]
1119
- * @property {string[]} [finished_jobs]
1120
- * @property {string[]} [error_jobs]
1121
- * @property {string[]} [errors_occured]
1122
- * @property {string} [company_id]
1123
- * @property {string} [creator]
1124
- * @property {string} [url]
1125
- * @property {string} [status]
1126
- * @property {string} [action_type]
1127
- * @property {string} [entity]
1128
- * @property {string} [error_url]
1129
- * @property {number} [finished_count]
1130
- * @property {number} [error_count]
1131
- * @property {number} [success_count]
1132
- * @property {number} [total_jobs]
1133
- * @property {CustomObjectMetaSchema} [meta]
1134
- * @property {string} [created_by]
1135
- * @property {string} [created_at]
1136
- * @property {string} [updated_at]
1151
+ * @typedef CustomFieldBulkEntry
1152
+ * @property {JobSchema[]} [items]
1153
+ * @property {Page} [page]
1137
1154
  */
1138
1155
 
1139
1156
  /**
1140
1157
  * @typedef CustomObjectBulkEntry
1141
- * @property {CustomObjectJobSchema[]} [items]
1158
+ * @property {JobSchema[]} [items]
1142
1159
  * @property {Page} [page]
1143
1160
  */
1144
1161
 
1162
+ /**
1163
+ * @typedef MetafieldTypesSchema
1164
+ * @property {CustomFieldTypeSchema} [metafield_types]
1165
+ */
1166
+
1145
1167
  /**
1146
1168
  * @typedef CustomFieldTypeSchema
1147
1169
  * @property {StringSingleLine} [string_single_line]
@@ -1157,6 +1179,8 @@ const Joi = require("joi");
1157
1179
  * @property {Url} [url]
1158
1180
  * @property {Metaobject} [metaobject]
1159
1181
  * @property {Product} [product]
1182
+ * @property {HTML} [html]
1183
+ * @property {Duration} [duration]
1160
1184
  */
1161
1185
 
1162
1186
  /**
@@ -1179,130 +1203,164 @@ const Joi = require("joi");
1179
1203
  * @property {SupportedValidationsMetaSchema} [meta]
1180
1204
  */
1181
1205
 
1206
+ /**
1207
+ * @typedef Duration
1208
+ * @property {string} [name] - Name data type of custom field
1209
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1210
+ * @property {string} [type] - Type of custom field
1211
+ * @property {string} [category] - Category of custom field
1212
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1213
+ * validations available for the field
1214
+ */
1215
+
1216
+ /**
1217
+ * @typedef HTML
1218
+ * @property {string} [name] - Name data type of custom field
1219
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1220
+ * @property {string} [type] - Type of custom field
1221
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1222
+ * validations available for the field
1223
+ */
1224
+
1182
1225
  /**
1183
1226
  * @typedef StringSingleLine
1184
- * @property {string} [name]
1185
- * @property {boolean} [list_enabled]
1186
- * @property {string} [category]
1187
- * @property {string} [type]
1188
- * @property {SupportedValidationsSchema[]} [supported_validations]
1227
+ * @property {string} [name] - Name data type of custom field
1228
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1229
+ * @property {string} [category] - Category of custom field
1230
+ * @property {string} [type] - Type of custom field
1231
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1232
+ * validations available for the field
1189
1233
  */
1190
1234
 
1191
1235
  /**
1192
1236
  * @typedef StringMultiLine
1193
- * @property {string} [name]
1194
- * @property {boolean} [list_enabled]
1195
- * @property {string} [category]
1196
- * @property {string} [type]
1197
- * @property {SupportedValidationsSchema[]} [supported_validations]
1237
+ * @property {string} [name] - Name data type of custom field
1238
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1239
+ * @property {string} [category] - Category of custom field
1240
+ * @property {string} [type] - Type of custom field
1241
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1242
+ * validations available for the field
1198
1243
  */
1199
1244
 
1200
1245
  /**
1201
1246
  * @typedef Dropdown
1202
- * @property {string} [name]
1203
- * @property {boolean} [list_enabled]
1204
- * @property {string} [category]
1205
- * @property {string} [type]
1206
- * @property {SupportedValidationsSchema[]} [supported_validations]
1247
+ * @property {string} [name] - Name data type of custom field
1248
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1249
+ * @property {string} [category] - Category of custom field
1250
+ * @property {string} [type] - Category of custom field
1251
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1252
+ * validations available for the field
1207
1253
  */
1208
1254
 
1209
1255
  /**
1210
1256
  * @typedef Integer
1211
- * @property {string} [name]
1212
- * @property {boolean} [list_enabled]
1213
- * @property {string} [type]
1214
- * @property {string} [category]
1215
- * @property {SupportedValidationsSchema[]} [supported_validations]
1257
+ * @property {string} [name] - Name data type of custom field
1258
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1259
+ * @property {string} [type] - Type of custom field
1260
+ * @property {string} [category] - Category of custom field
1261
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1262
+ * validations available for the field
1216
1263
  */
1217
1264
 
1218
1265
  /**
1219
1266
  * @typedef FloatType
1220
- * @property {string} [name]
1221
- * @property {boolean} [list_enabled]
1222
- * @property {string} [type]
1223
- * @property {string} [category]
1224
- * @property {SupportedValidationsSchema[]} [supported_validations]
1267
+ * @property {string} [name] - Name data type of custom field
1268
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1269
+ * @property {string} [type] - Type of custom field
1270
+ * @property {string} [category] - Category of custom field
1271
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1272
+ * validations available for the field
1225
1273
  */
1226
1274
 
1227
1275
  /**
1228
1276
  * @typedef BooleanType
1229
- * @property {string} [name]
1230
- * @property {string} [category]
1231
- * @property {boolean} [list_enabled]
1232
- * @property {string} [type]
1233
- * @property {SupportedValidationsSchema[]} [supported_validations]
1277
+ * @property {string} [name] - Name data type of custom field
1278
+ * @property {string} [category] - Category of custom field
1279
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1280
+ * @property {string} [type] - Category of custom field
1281
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1282
+ * validations available for the field
1234
1283
  */
1235
1284
 
1236
1285
  /**
1237
1286
  * @typedef Date
1238
- * @property {string} [name]
1239
- * @property {boolean} [list_enabled]
1240
- * @property {string} [category]
1241
- * @property {string} [type]
1242
- * @property {SupportedValidationsSchema[]} [supported_validations]
1287
+ * @property {string} [name] - Name data type of custom field
1288
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1289
+ * @property {string} [category] - Category of custom field
1290
+ * @property {string} [type] - Type of custom field
1291
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1292
+ * validations available for the field
1243
1293
  */
1244
1294
 
1245
1295
  /**
1246
1296
  * @typedef Datetime
1247
- * @property {string} [name]
1248
- * @property {string} [category]
1249
- * @property {boolean} [list_enabled]
1250
- * @property {string} [type]
1251
- * @property {SupportedValidationsSchema[]} [supported_validations]
1297
+ * @property {string} [name] - Name data type of custom field
1298
+ * @property {string} [category] - Category of custom field
1299
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1300
+ * @property {string} [type] - Type of custom field
1301
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1302
+ * validations available for the field
1252
1303
  */
1253
1304
 
1254
1305
  /**
1255
1306
  * @typedef Json
1256
- * @property {string} [name]
1257
- * @property {boolean} [list_enabled]
1258
- * @property {string} [category]
1259
- * @property {string} [type]
1260
- * @property {SupportedValidationsSchema[]} [supported_validations]
1307
+ * @property {string} [name] - Name data type of custom field
1308
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1309
+ * @property {string} [category] - Category of custom field
1310
+ * @property {string} [type] - Type of custom field
1311
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1312
+ * validations available for the field
1261
1313
  */
1262
1314
 
1263
1315
  /**
1264
1316
  * @typedef File
1265
- * @property {string} [name]
1266
- * @property {string} [category]
1267
- * @property {boolean} [list_enabled]
1268
- * @property {string} [type]
1317
+ * @property {string} [name] - Name data type of custom field
1318
+ * @property {string} [category] - Category of custom field
1319
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1320
+ * @property {string} [type] - Type of custom field
1269
1321
  * @property {SupportedValidationsSchema[]} [supported_validations]
1270
1322
  */
1271
1323
 
1272
1324
  /**
1273
1325
  * @typedef Url
1274
- * @property {string} [name]
1275
- * @property {boolean} [list_enabled]
1276
- * @property {string} [type]
1277
- * @property {SupportedValidationsSchema[]} [supported_validations]
1326
+ * @property {string} [name] - Name data type of custom field
1327
+ * @property {boolean} [list_enabled] - Flag for listing enabled or not
1328
+ * @property {string} [type] - Type of custom field
1329
+ * @property {SupportedValidationsSchema[]} [supported_validations] - List of
1330
+ * validations available for the field
1278
1331
  */
1279
1332
 
1280
1333
  /**
1281
1334
  * @typedef Metaobject
1282
- * @property {string} [name]
1283
- * @property {boolean} [list_enabled]
1284
- * @property {string} [category]
1285
- * @property {string} [type]
1335
+ * @property {string} [name] - Name of Custom Object
1336
+ * @property {boolean} [list_enabled] - Whether the field is allowed to have
1337
+ * multiple list items
1338
+ * @property {string} [category] - Category of Custom Object Definition that
1339
+ * Custom Object belongs to
1340
+ * @property {string} [type] - Type of Custom Object Definition
1286
1341
  * @property {SupportedValidationsSchema[]} [supported_validations]
1287
1342
  */
1288
1343
 
1289
1344
  /**
1290
1345
  * @typedef Product
1291
- * @property {string} [name]
1292
- * @property {boolean} [list_enabled]
1293
- * @property {string} [category]
1294
- * @property {string} [type]
1346
+ * @property {string} [name] - Name of Product
1347
+ * @property {boolean} [list_enabled] - Whether the field is allowed to have
1348
+ * multiple list items
1349
+ * @property {string} [category] - Category of Custom Object Definition that
1350
+ * Product is associated with
1351
+ * @property {string} [type] - Custom Object Definition that Product is associated with
1295
1352
  * @property {SupportedValidationsSchema[]} [supported_validations]
1296
1353
  */
1297
1354
 
1298
1355
  /**
1299
1356
  * @typedef CustomObjectEntry
1300
- * @property {string} [_id]
1301
- * @property {string} [name]
1302
- * @property {string} [type]
1303
- * @property {string} [updated_at]
1304
- * @property {number} [entries_count]
1305
- * @property {number} [fields_count]
1357
+ * @property {string} [id] - Unique system generated id
1358
+ * @property {string} [name] - Name of Custom Object definition
1359
+ * @property {string} [type] - Type of Custom Object Definition
1360
+ * @property {string} [updated_at] - Updation time of a Custom Object
1361
+ * @property {number} [entries_count] - Number of entries against the Custom
1362
+ * Object definition
1363
+ * @property {number} [fields_count] - Number of fields against a Custom Object definition
1306
1364
  */
1307
1365
 
1308
1366
  /**
@@ -1313,21 +1371,33 @@ const Joi = require("joi");
1313
1371
 
1314
1372
  /**
1315
1373
  * @typedef CustomObjectEntryFieldSchema
1316
- * @property {string} [definition_id]
1317
- * @property {Object[]} [value]
1374
+ * @property {string} [namespace] - This is namespace for a custom field definition
1375
+ * @property {string} [slug] - This is slug for a custom field definition
1376
+ */
1377
+
1378
+ /**
1379
+ * @typedef CustomObjectEntryFieldSchemaWithoutID
1380
+ * @property {string} [slug] - Custom fields belonging to a custom object
1381
+ * @property {Object} [value] - Value of custom field inside a custom object
1318
1382
  */
1319
1383
 
1320
1384
  /**
1321
1385
  * @typedef CustomObjectRequestSchema
1322
- * @property {string} [status]
1323
- * @property {string} [definition_id]
1324
- * @property {CustomObjectEntryFieldSchema[]} [fields]
1386
+ * @property {string} [status] - Flag to denote status of Custom Object
1387
+ * @property {string} [slug] - This is slug for a custom field definition
1388
+ * @property {CustomObjectEntryFieldSchema[]} [fields] - List of custom fields
1389
+ */
1390
+
1391
+ /**
1392
+ * @typedef CustomObjectRequestSchemaWithoutId
1393
+ * @property {string} [status] - Status of the custom object entry.
1394
+ * @property {CustomObjectEntryFieldSchemaWithoutID[]} [fields] - List of custom fields
1325
1395
  */
1326
1396
 
1327
1397
  /**
1328
1398
  * @typedef CustomObjectBulkSchema
1329
- * @property {string} [url]
1330
- * @property {number} [total_records]
1399
+ * @property {string} [url] - Full URL for the bulk operations data
1400
+ * @property {number} [total_records] - Total records in the upload.
1331
1401
  */
1332
1402
 
1333
1403
  /**
@@ -1392,6 +1462,14 @@ const Joi = require("joi");
1392
1462
  */
1393
1463
 
1394
1464
  class ContentPlatformModel {
1465
+ /** @returns {ValidationError} */
1466
+ static ValidationError() {
1467
+ return Joi.object({
1468
+ message: Joi.string().allow("").required(),
1469
+ field: Joi.string().allow("").required(),
1470
+ });
1471
+ }
1472
+
1395
1473
  /** @returns {GenerateSEOContent} */
1396
1474
  static GenerateSEOContent() {
1397
1475
  return Joi.object({
@@ -1613,8 +1691,8 @@ class ContentPlatformModel {
1613
1691
  });
1614
1692
  }
1615
1693
 
1616
- /** @returns {BlogGetResponse} */
1617
- static BlogGetResponse() {
1694
+ /** @returns {BlogGetDetails} */
1695
+ static BlogGetDetails() {
1618
1696
  return Joi.object({
1619
1697
  items: Joi.array().items(ContentPlatformModel.BlogSchema()),
1620
1698
  page: ContentPlatformModel.Page(),
@@ -1659,7 +1737,7 @@ class ContentPlatformModel {
1659
1737
  static BlogSchema() {
1660
1738
  return Joi.object({
1661
1739
  _id: Joi.string().allow(""),
1662
- _custom_json: Joi.any(),
1740
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
1663
1741
  application: Joi.string().allow(""),
1664
1742
  archived: Joi.boolean(),
1665
1743
  author: ContentPlatformModel.Author(),
@@ -1737,11 +1815,11 @@ class ContentPlatformModel {
1737
1815
  });
1738
1816
  }
1739
1817
 
1740
- /** @returns {BlogRequest} */
1741
- static BlogRequest() {
1818
+ /** @returns {BlogPayload} */
1819
+ static BlogPayload() {
1742
1820
  return Joi.object({
1743
1821
  application: Joi.string().allow(""),
1744
- _custom_json: Joi.any(),
1822
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
1745
1823
  author: ContentPlatformModel.Author(),
1746
1824
  content: Joi.array().items(ContentPlatformModel.ResourceContent()),
1747
1825
  feature_image: ContentPlatformModel.Asset(),
@@ -1879,7 +1957,7 @@ class ContentPlatformModel {
1879
1957
  static HandpickedTagSchema() {
1880
1958
  return Joi.object({
1881
1959
  position: Joi.string().allow(""),
1882
- attributes: Joi.any(),
1960
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
1883
1961
  name: Joi.string().allow(""),
1884
1962
  url: Joi.string().allow(""),
1885
1963
  type: Joi.string().allow(""),
@@ -1904,7 +1982,7 @@ class ContentPlatformModel {
1904
1982
  type: Joi.string().allow(""),
1905
1983
  url: Joi.string().allow(""),
1906
1984
  position: Joi.string().allow(""),
1907
- attributes: Joi.any(),
1985
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
1908
1986
  pages: Joi.array().items(Joi.any()),
1909
1987
  content: Joi.string().allow(""),
1910
1988
  });
@@ -1946,8 +2024,8 @@ class ContentPlatformModel {
1946
2024
  });
1947
2025
  }
1948
2026
 
1949
- /** @returns {TagDeleteSuccessResponse} */
1950
- static TagDeleteSuccessResponse() {
2027
+ /** @returns {TagDeleteSuccessDetails} */
2028
+ static TagDeleteSuccessDetails() {
1951
2029
  return Joi.object({
1952
2030
  success: Joi.boolean(),
1953
2031
  });
@@ -1963,7 +2041,7 @@ class ContentPlatformModel {
1963
2041
  info: Joi.string().allow(""),
1964
2042
  request_id: Joi.string().allow(""),
1965
2043
  stack_trace: Joi.string().allow(""),
1966
- meta: Joi.any(),
2044
+ meta: Joi.object().pattern(/\S/, Joi.any()),
1967
2045
  });
1968
2046
  }
1969
2047
 
@@ -1985,7 +2063,7 @@ class ContentPlatformModel {
1985
2063
  slug: Joi.string().allow(""),
1986
2064
  application: Joi.string().allow(""),
1987
2065
  icon_url: Joi.string().allow(""),
1988
- _custom_json: Joi.any(),
2066
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
1989
2067
  });
1990
2068
  }
1991
2069
 
@@ -2019,7 +2097,7 @@ class ContentPlatformModel {
2019
2097
  slug: Joi.string().allow(""),
2020
2098
  application: Joi.string().allow(""),
2021
2099
  icon_url: Joi.string().allow(""),
2022
- _custom_json: Joi.any(),
2100
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2023
2101
  });
2024
2102
  }
2025
2103
 
@@ -2113,8 +2191,8 @@ class ContentPlatformModel {
2113
2191
  });
2114
2192
  }
2115
2193
 
2116
- /** @returns {LandingPageGetResponse} */
2117
- static LandingPageGetResponse() {
2194
+ /** @returns {LandingPageGetDetails} */
2195
+ static LandingPageGetDetails() {
2118
2196
  return Joi.object({
2119
2197
  items: Joi.array().items(ContentPlatformModel.LandingPageSchema()),
2120
2198
  page: ContentPlatformModel.Page(),
@@ -2132,19 +2210,19 @@ class ContentPlatformModel {
2132
2210
  _id: Joi.string().allow(""),
2133
2211
  application: Joi.string().allow(""),
2134
2212
  archived: Joi.boolean(),
2135
- _custom_json: Joi.any(),
2213
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2136
2214
  });
2137
2215
  }
2138
2216
 
2139
- /** @returns {DefaultNavigationResponse} */
2140
- static DefaultNavigationResponse() {
2217
+ /** @returns {DefaultNavigationDetails} */
2218
+ static DefaultNavigationDetails() {
2141
2219
  return Joi.object({
2142
2220
  items: Joi.array().items(ContentPlatformModel.NavigationSchema()),
2143
2221
  });
2144
2222
  }
2145
2223
 
2146
- /** @returns {NavigationGetResponse} */
2147
- static NavigationGetResponse() {
2224
+ /** @returns {NavigationGetDetails} */
2225
+ static NavigationGetDetails() {
2148
2226
  return Joi.object({
2149
2227
  items: Joi.array().items(ContentPlatformModel.NavigationSchema()),
2150
2228
  page: ContentPlatformModel.Page(),
@@ -2176,8 +2254,8 @@ class ContentPlatformModel {
2176
2254
  });
2177
2255
  }
2178
2256
 
2179
- /** @returns {NavigationRequest} */
2180
- static NavigationRequest() {
2257
+ /** @returns {NavigationPayload} */
2258
+ static NavigationPayload() {
2181
2259
  return Joi.object({
2182
2260
  name: Joi.string().allow(""),
2183
2261
  slug: Joi.string().allow(""),
@@ -2187,8 +2265,8 @@ class ContentPlatformModel {
2187
2265
  });
2188
2266
  }
2189
2267
 
2190
- /** @returns {PageGetResponse} */
2191
- static PageGetResponse() {
2268
+ /** @returns {PageGetDetails} */
2269
+ static PageGetDetails() {
2192
2270
  return Joi.object({
2193
2271
  items: Joi.array().items(ContentPlatformModel.PageSchema()),
2194
2272
  page: ContentPlatformModel.Page(),
@@ -2234,7 +2312,7 @@ class ContentPlatformModel {
2234
2312
  feature_image: ContentPlatformModel.Asset(),
2235
2313
  page_meta: Joi.array().items(Joi.any()),
2236
2314
  _schedule: ContentPlatformModel.ScheduleSchema(),
2237
- _custom_json: Joi.any(),
2315
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2238
2316
  orientation: Joi.string().allow(""),
2239
2317
  platform: Joi.string().allow(""),
2240
2318
  published: Joi.boolean(),
@@ -2243,7 +2321,7 @@ class ContentPlatformModel {
2243
2321
  title: Joi.string().allow(""),
2244
2322
  type: Joi.string().allow(""),
2245
2323
  seo: ContentPlatformModel.SEO(),
2246
- visibility: Joi.any(),
2324
+ visibility: Joi.object().pattern(/\S/, Joi.any()),
2247
2325
  archived: Joi.boolean(),
2248
2326
  });
2249
2327
  }
@@ -2255,13 +2333,13 @@ class ContentPlatformModel {
2255
2333
  });
2256
2334
  }
2257
2335
 
2258
- /** @returns {PageRequest} */
2259
- static PageRequest() {
2336
+ /** @returns {PagePayload} */
2337
+ static PagePayload() {
2260
2338
  return Joi.object({
2261
2339
  _schedule: ContentPlatformModel.CronSchedule(),
2262
2340
  application: Joi.string().allow(""),
2263
2341
  author: ContentPlatformModel.Author(),
2264
- _custom_json: Joi.any(),
2342
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2265
2343
  orientation: Joi.string().allow(""),
2266
2344
  content: Joi.array().items(Joi.any()),
2267
2345
  feature_image: ContentPlatformModel.Asset(),
@@ -2284,8 +2362,8 @@ class ContentPlatformModel {
2284
2362
  });
2285
2363
  }
2286
2364
 
2287
- /** @returns {PagePublishRequest} */
2288
- static PagePublishRequest() {
2365
+ /** @returns {PagePublishPayload} */
2366
+ static PagePublishPayload() {
2289
2367
  return Joi.object({
2290
2368
  publish: Joi.boolean(),
2291
2369
  });
@@ -2300,8 +2378,8 @@ class ContentPlatformModel {
2300
2378
  });
2301
2379
  }
2302
2380
 
2303
- /** @returns {SlideshowGetResponse} */
2304
- static SlideshowGetResponse() {
2381
+ /** @returns {SlideshowGetDetails} */
2382
+ static SlideshowGetDetails() {
2305
2383
  return Joi.object({
2306
2384
  items: Joi.array().items(ContentPlatformModel.SlideshowSchema()),
2307
2385
  page: ContentPlatformModel.Page(),
@@ -2320,12 +2398,12 @@ class ContentPlatformModel {
2320
2398
  media: Joi.array().items(ContentPlatformModel.SlideshowMedia()),
2321
2399
  active: Joi.boolean(),
2322
2400
  archived: Joi.boolean(),
2323
- _custom_json: Joi.any(),
2401
+ _custom_json: Joi.object().pattern(/\S/, Joi.any()),
2324
2402
  });
2325
2403
  }
2326
2404
 
2327
- /** @returns {SlideshowRequest} */
2328
- static SlideshowRequest() {
2405
+ /** @returns {SlideshowPayload} */
2406
+ static SlideshowPayload() {
2329
2407
  return Joi.object({
2330
2408
  slug: Joi.string().allow(""),
2331
2409
  platform: Joi.string().allow(""),
@@ -2407,7 +2485,7 @@ class ContentPlatformModel {
2407
2485
  sub_type: Joi.string().allow(""),
2408
2486
  _id: Joi.string().allow(""),
2409
2487
  position: Joi.string().allow(""),
2410
- attributes: Joi.any(),
2488
+ attributes: Joi.object().pattern(/\S/, Joi.any()),
2411
2489
  content: Joi.string().allow(""),
2412
2490
  pages: Joi.array().items(Joi.any()),
2413
2491
  __source: ContentPlatformModel.TagSourceSchema(),
@@ -2450,23 +2528,18 @@ class ContentPlatformModel {
2450
2528
  /** @returns {FieldDefinitionSchema} */
2451
2529
  static FieldDefinitionSchema() {
2452
2530
  return Joi.object({
2453
- _id: Joi.string().allow(""),
2454
- creator: Joi.string().allow(""),
2531
+ id: Joi.string().allow(""),
2455
2532
  resource: Joi.string().allow(""),
2456
2533
  name: Joi.string().allow(""),
2457
2534
  namespace: Joi.string().allow(""),
2458
- key: Joi.string().allow(""),
2535
+ slug: Joi.string().allow(""),
2459
2536
  description: Joi.string().allow(""),
2460
2537
  type: Joi.string().allow(""),
2461
2538
  multi_value: Joi.boolean(),
2462
2539
  validations: Joi.array().items(ContentPlatformModel.FieldValidations()),
2463
2540
  company_id: Joi.string().allow(""),
2464
- created_by: Joi.string().allow(""),
2465
- updated_by: Joi.string().allow(""),
2466
2541
  required: Joi.boolean(),
2467
2542
  is_deleted: Joi.boolean(),
2468
- created_at: Joi.string().allow(""),
2469
- updated_at: Joi.string().allow(""),
2470
2543
  type_name: Joi.string().allow(""),
2471
2544
  invalid_fields_count: Joi.number(),
2472
2545
  });
@@ -2483,9 +2556,8 @@ class ContentPlatformModel {
2483
2556
  /** @returns {CustomFieldDefinitionRequestSchema} */
2484
2557
  static CustomFieldDefinitionRequestSchema() {
2485
2558
  return Joi.object({
2486
- resource: Joi.string().allow(""),
2487
2559
  type: Joi.string().allow(""),
2488
- key: Joi.string().allow(""),
2560
+ slug: Joi.string().allow(""),
2489
2561
  namespace: Joi.string().allow(""),
2490
2562
  multi_value: Joi.boolean(),
2491
2563
  name: Joi.string().allow(""),
@@ -2503,7 +2575,7 @@ class ContentPlatformModel {
2503
2575
  name: Joi.string().allow(""),
2504
2576
  multi_value: Joi.boolean(),
2505
2577
  required: Joi.boolean(),
2506
- key: Joi.string().allow(""),
2578
+ slug: Joi.string().allow(""),
2507
2579
  validations: Joi.array().items(ContentPlatformModel.FieldValidations()),
2508
2580
  action: Joi.string().allow(""),
2509
2581
  });
@@ -2512,7 +2584,6 @@ class ContentPlatformModel {
2512
2584
  /** @returns {CustomObjectDefinitionUpdateRequestSchema} */
2513
2585
  static CustomObjectDefinitionUpdateRequestSchema() {
2514
2586
  return Joi.object({
2515
- type: Joi.string().allow(""),
2516
2587
  description: Joi.string().allow(""),
2517
2588
  name: Joi.string().allow(""),
2518
2589
  display_name_key: Joi.string().allow(""),
@@ -2525,21 +2596,39 @@ class ContentPlatformModel {
2525
2596
  /** @returns {CustomFieldDefinitionDetailResSchema} */
2526
2597
  static CustomFieldDefinitionDetailResSchema() {
2527
2598
  return Joi.object({
2528
- creator: Joi.string().allow(""),
2529
2599
  resource: Joi.string().allow(""),
2530
2600
  name: Joi.string().allow(""),
2531
2601
  namespace: Joi.string().allow(""),
2532
- key: Joi.string().allow(""),
2602
+ slug: Joi.string().allow(""),
2533
2603
  description: Joi.string().allow(""),
2534
2604
  type: Joi.string().allow(""),
2535
2605
  multi_value: Joi.boolean(),
2536
2606
  company_id: Joi.string().allow(""),
2537
2607
  application_id: Joi.string().allow(""),
2538
- created_by: Joi.string().allow(""),
2539
- updated_by: Joi.string().allow(""),
2540
2608
  required: Joi.boolean(),
2541
2609
  is_deleted: Joi.boolean(),
2542
- _id: Joi.string().allow(""),
2610
+ id: Joi.string().allow(""),
2611
+ validations: Joi.array().items(Joi.any()),
2612
+ created_at: Joi.string().allow(""),
2613
+ updated_at: Joi.string().allow(""),
2614
+ });
2615
+ }
2616
+
2617
+ /** @returns {MetaFieldDefinitionDetailResSchema} */
2618
+ static MetaFieldDefinitionDetailResSchema() {
2619
+ return Joi.object({
2620
+ resource: Joi.string().allow(""),
2621
+ name: Joi.string().allow(""),
2622
+ namespace: Joi.string().allow(""),
2623
+ slug: Joi.string().allow(""),
2624
+ description: Joi.string().allow(""),
2625
+ type: Joi.string().allow(""),
2626
+ multi_value: Joi.boolean(),
2627
+ company_id: Joi.string().allow(""),
2628
+ application_id: Joi.string().allow(""),
2629
+ required: Joi.boolean(),
2630
+ is_deleted: Joi.boolean(),
2631
+ id: Joi.string().allow(""),
2543
2632
  validations: Joi.array().items(Joi.any()),
2544
2633
  created_at: Joi.string().allow(""),
2545
2634
  updated_at: Joi.string().allow(""),
@@ -2564,20 +2653,17 @@ class ContentPlatformModel {
2564
2653
  /** @returns {CustomFieldSchema} */
2565
2654
  static CustomFieldSchema() {
2566
2655
  return Joi.object({
2567
- _id: Joi.string().allow(""),
2656
+ id: Joi.string().allow(""),
2568
2657
  namespace: Joi.string().allow(""),
2569
- key: Joi.string().allow(""),
2658
+ slug: Joi.string().allow(""),
2570
2659
  resource: Joi.string().allow(""),
2571
- creator: Joi.string().allow(""),
2572
2660
  value: Joi.array().items(ContentPlatformModel.CustomFieldValue()),
2573
- resource_id: Joi.string().allow(""),
2661
+ resource_slug: Joi.string().allow(""),
2574
2662
  type: Joi.string().allow(""),
2575
2663
  multi_value: Joi.boolean(),
2576
2664
  company_id: Joi.string().allow(""),
2577
- definition_id: Joi.string().allow(""),
2578
2665
  has_invalid_values: Joi.boolean(),
2579
2666
  invalid_value_errors: Joi.array().items(Joi.any()),
2580
- created_by: Joi.string().allow(""),
2581
2667
  is_deleted: Joi.boolean(),
2582
2668
  created_at: Joi.string().allow(""),
2583
2669
  updated_at: Joi.string().allow(""),
@@ -2592,6 +2678,14 @@ class ContentPlatformModel {
2592
2678
  });
2593
2679
  }
2594
2680
 
2681
+ /** @returns {CustomFieldsDeleteSchema} */
2682
+ static CustomFieldsDeleteSchema() {
2683
+ return Joi.object({
2684
+ success: Joi.boolean(),
2685
+ message: Joi.string().allow(""),
2686
+ });
2687
+ }
2688
+
2595
2689
  /** @returns {CustomFieldsResponseByResourceIdSchema} */
2596
2690
  static CustomFieldsResponseByResourceIdSchema() {
2597
2691
  return Joi.object({
@@ -2603,7 +2697,8 @@ class ContentPlatformModel {
2603
2697
  static CustomField() {
2604
2698
  return Joi.object({
2605
2699
  value: Joi.array().items(Joi.any()),
2606
- definition_id: Joi.string().allow(""),
2700
+ namespace: Joi.string().allow(""),
2701
+ slug: Joi.string().allow(""),
2607
2702
  });
2608
2703
  }
2609
2704
 
@@ -2617,16 +2712,13 @@ class ContentPlatformModel {
2617
2712
  /** @returns {CustomObjectSchema} */
2618
2713
  static CustomObjectSchema() {
2619
2714
  return Joi.object({
2620
- _id: Joi.string().allow(""),
2621
- creator: Joi.string().allow(""),
2715
+ id: Joi.string().allow(""),
2622
2716
  company_id: Joi.string().allow(""),
2623
2717
  application_id: Joi.string().allow(""),
2624
- created_by: Joi.string().allow(""),
2625
- updated_by: Joi.string().allow(""),
2626
2718
  status: Joi.string().allow(""),
2627
2719
  type: Joi.string().allow(""),
2720
+ definition_slug: Joi.string().allow(""),
2628
2721
  display_name: Joi.string().allow(""),
2629
- definition_id: Joi.string().allow(""),
2630
2722
  fields: Joi.array().items(ContentPlatformModel.CustomFieldSchema()),
2631
2723
  });
2632
2724
  }
@@ -2635,6 +2727,7 @@ class ContentPlatformModel {
2635
2727
  static CustomObjectDefinitionRequestSchema() {
2636
2728
  return Joi.object({
2637
2729
  type: Joi.string().allow(""),
2730
+ definition_slug: Joi.string().allow(""),
2638
2731
  description: Joi.string().allow(""),
2639
2732
  name: Joi.string().allow(""),
2640
2733
  display_name_key: Joi.string().allow(""),
@@ -2644,42 +2737,17 @@ class ContentPlatformModel {
2644
2737
  });
2645
2738
  }
2646
2739
 
2647
- /** @returns {CustomObjectCustomFieldDefinitionResSchema} */
2648
- static CustomObjectCustomFieldDefinitionResSchema() {
2649
- return Joi.object({
2650
- creator: Joi.string().allow(""),
2651
- resource: Joi.string().allow(""),
2652
- name: Joi.string().allow(""),
2653
- namespace: Joi.string().allow(""),
2654
- key: Joi.string().allow(""),
2655
- description: Joi.string().allow(""),
2656
- type: Joi.string().allow(""),
2657
- multi_value: Joi.boolean(),
2658
- validations: Joi.array().items(ContentPlatformModel.FieldValidations()),
2659
- company_id: Joi.string().allow(""),
2660
- created_by: Joi.string().allow(""),
2661
- metaobject_definition_id: Joi.string().allow(""),
2662
- required: Joi.boolean(),
2663
- is_deleted: Joi.boolean(),
2664
- _id: Joi.string().allow(""),
2665
- created_at: Joi.string().allow(""),
2666
- updated_at: Joi.string().allow(""),
2667
- });
2668
- }
2669
-
2670
- /** @returns {CustomObjectDefinitionSchema} */
2671
- static CustomObjectDefinitionSchema() {
2740
+ /** @returns {CustomObjectDefinitionSlugSchema} */
2741
+ static CustomObjectDefinitionSlugSchema() {
2672
2742
  return Joi.object({
2673
- _id: Joi.string().allow(""),
2743
+ id: Joi.string().allow(""),
2674
2744
  name: Joi.string().allow(""),
2675
2745
  type: Joi.string().allow(""),
2746
+ definition_slug: Joi.string().allow(""),
2676
2747
  display_name_key: Joi.string().allow(""),
2677
2748
  description: Joi.string().allow(""),
2678
- creator: Joi.string().allow(""),
2679
- created_by: Joi.string().allow(""),
2680
- updated_by: Joi.string().allow(""),
2681
2749
  field_definitions: Joi.array().items(
2682
- ContentPlatformModel.CustomObjectCustomFieldDefinitionResSchema()
2750
+ ContentPlatformModel.CustomFieldDefinitionDetailResSchema()
2683
2751
  ),
2684
2752
  });
2685
2753
  }
@@ -2692,18 +2760,18 @@ class ContentPlatformModel {
2692
2760
  });
2693
2761
  }
2694
2762
 
2695
- /** @returns {CustomObjectEntryBulkUploadResponse} */
2696
- static CustomObjectEntryBulkUploadResponse() {
2763
+ /** @returns {CustomObjectEntryBulkUploadDetails} */
2764
+ static CustomObjectEntryBulkUploadDetails() {
2697
2765
  return Joi.object({
2698
2766
  url: Joi.string().allow(""),
2699
2767
  total_records: Joi.number(),
2700
2768
  });
2701
2769
  }
2702
2770
 
2703
- /** @returns {CustomObjectListItemDefinationSchema} */
2704
- static CustomObjectListItemDefinationSchema() {
2771
+ /** @returns {CustomObjectListItemDefinitionModel} */
2772
+ static CustomObjectListItemDefinitionModel() {
2705
2773
  return Joi.object({
2706
- _id: Joi.string().allow(""),
2774
+ id: Joi.string().allow(""),
2707
2775
  name: Joi.string().allow(""),
2708
2776
  type: Joi.string().allow(""),
2709
2777
  });
@@ -2712,12 +2780,12 @@ class ContentPlatformModel {
2712
2780
  /** @returns {CustomObjectListItemSchema} */
2713
2781
  static CustomObjectListItemSchema() {
2714
2782
  return Joi.object({
2715
- _id: Joi.string().allow(""),
2716
- definition_id: Joi.string().allow(""),
2783
+ id: Joi.string().allow(""),
2717
2784
  status: Joi.string().allow(""),
2785
+ created_at: Joi.string().allow(""),
2718
2786
  updated_at: Joi.string().allow(""),
2719
2787
  display_name: Joi.string().allow(""),
2720
- definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(),
2788
+ definition: ContentPlatformModel.CustomObjectListItemDefinitionModel(),
2721
2789
  references: Joi.number(),
2722
2790
  });
2723
2791
  }
@@ -2732,26 +2800,30 @@ class ContentPlatformModel {
2732
2800
  });
2733
2801
  }
2734
2802
 
2735
- /** @returns {CustomObjectFieldSchema} */
2736
- static CustomObjectFieldSchema() {
2803
+ /** @returns {CustomObjectFieldDefinition} */
2804
+ static CustomObjectFieldDefinition() {
2737
2805
  return Joi.object({
2738
- _id: Joi.string().allow(""),
2739
- key: Joi.string().allow(""),
2806
+ id: Joi.string().allow(""),
2807
+ slug: Joi.string().allow(""),
2808
+ namespace: Joi.string().allow(""),
2740
2809
  value: Joi.array().items(Joi.any()),
2741
2810
  type: Joi.string().allow(""),
2742
- definition_id: Joi.string().allow(""),
2743
2811
  });
2744
2812
  }
2745
2813
 
2746
- /** @returns {CustomObjectByIdSchema} */
2747
- static CustomObjectByIdSchema() {
2814
+ /** @returns {CustomObjectBySlugSchema} */
2815
+ static CustomObjectBySlugSchema() {
2748
2816
  return Joi.object({
2749
- _id: Joi.string().allow(""),
2817
+ id: Joi.string().allow(""),
2750
2818
  status: Joi.string().allow(""),
2751
2819
  display_name: Joi.string().allow(""),
2752
- definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(),
2820
+ definition: ContentPlatformModel.CustomObjectListItemDefinitionModel(),
2753
2821
  references: Joi.array().items(Joi.any()),
2754
- fields: Joi.array().items(ContentPlatformModel.CustomObjectFieldSchema()),
2822
+ slug: Joi.string().allow(""),
2823
+ definition_slug: Joi.string().allow(""),
2824
+ fields: Joi.array().items(
2825
+ ContentPlatformModel.CustomObjectFieldDefinition()
2826
+ ),
2755
2827
  });
2756
2828
  }
2757
2829
 
@@ -2773,17 +2845,15 @@ class ContentPlatformModel {
2773
2845
  });
2774
2846
  }
2775
2847
 
2776
- /** @returns {CustomObjectJobSchema} */
2777
- static CustomObjectJobSchema() {
2848
+ /** @returns {JobSchema} */
2849
+ static JobSchema() {
2778
2850
  return Joi.object({
2779
- _id: Joi.string().allow(""),
2851
+ id: Joi.string().allow(""),
2780
2852
  jobs: Joi.array().items(Joi.string().allow("")),
2781
2853
  finished_jobs: Joi.array().items(Joi.string().allow("")),
2782
2854
  error_jobs: Joi.array().items(Joi.string().allow("")),
2783
2855
  errors_occured: Joi.array().items(Joi.string().allow("")),
2784
2856
  company_id: Joi.string().allow(""),
2785
- creator: Joi.string().allow(""),
2786
- url: Joi.string().allow(""),
2787
2857
  status: Joi.string().allow(""),
2788
2858
  action_type: Joi.string().allow(""),
2789
2859
  entity: Joi.string().allow(""),
@@ -2796,17 +2866,33 @@ class ContentPlatformModel {
2796
2866
  created_by: Joi.string().allow(""),
2797
2867
  created_at: Joi.string().allow(""),
2798
2868
  updated_at: Joi.string().allow(""),
2869
+ application_id: Joi.string().allow(""),
2870
+ });
2871
+ }
2872
+
2873
+ /** @returns {CustomFieldBulkEntry} */
2874
+ static CustomFieldBulkEntry() {
2875
+ return Joi.object({
2876
+ items: Joi.array().items(ContentPlatformModel.JobSchema()),
2877
+ page: ContentPlatformModel.Page(),
2799
2878
  });
2800
2879
  }
2801
2880
 
2802
2881
  /** @returns {CustomObjectBulkEntry} */
2803
2882
  static CustomObjectBulkEntry() {
2804
2883
  return Joi.object({
2805
- items: Joi.array().items(ContentPlatformModel.CustomObjectJobSchema()),
2884
+ items: Joi.array().items(ContentPlatformModel.JobSchema()),
2806
2885
  page: ContentPlatformModel.Page(),
2807
2886
  });
2808
2887
  }
2809
2888
 
2889
+ /** @returns {MetafieldTypesSchema} */
2890
+ static MetafieldTypesSchema() {
2891
+ return Joi.object({
2892
+ metafield_types: ContentPlatformModel.CustomFieldTypeSchema(),
2893
+ });
2894
+ }
2895
+
2810
2896
  /** @returns {CustomFieldTypeSchema} */
2811
2897
  static CustomFieldTypeSchema() {
2812
2898
  return Joi.object({
@@ -2823,6 +2909,8 @@ class ContentPlatformModel {
2823
2909
  url: ContentPlatformModel.Url(),
2824
2910
  metaobject: ContentPlatformModel.Metaobject(),
2825
2911
  product: ContentPlatformModel.Product(),
2912
+ html: ContentPlatformModel.HTML(),
2913
+ duration: ContentPlatformModel.Duration(),
2826
2914
  });
2827
2915
  }
2828
2916
 
@@ -2854,6 +2942,31 @@ class ContentPlatformModel {
2854
2942
  });
2855
2943
  }
2856
2944
 
2945
+ /** @returns {Duration} */
2946
+ static Duration() {
2947
+ return Joi.object({
2948
+ name: Joi.string().allow(""),
2949
+ list_enabled: Joi.boolean(),
2950
+ type: Joi.string().allow(""),
2951
+ category: Joi.string().allow(""),
2952
+ supported_validations: Joi.array().items(
2953
+ ContentPlatformModel.SupportedValidationsSchema()
2954
+ ),
2955
+ });
2956
+ }
2957
+
2958
+ /** @returns {HTML} */
2959
+ static HTML() {
2960
+ return Joi.object({
2961
+ name: Joi.string().allow(""),
2962
+ list_enabled: Joi.boolean(),
2963
+ type: Joi.string().allow(""),
2964
+ supported_validations: Joi.array().items(
2965
+ ContentPlatformModel.SupportedValidationsSchema()
2966
+ ),
2967
+ });
2968
+ }
2969
+
2857
2970
  /** @returns {StringSingleLine} */
2858
2971
  static StringSingleLine() {
2859
2972
  return Joi.object({
@@ -3025,7 +3138,7 @@ class ContentPlatformModel {
3025
3138
  /** @returns {CustomObjectEntry} */
3026
3139
  static CustomObjectEntry() {
3027
3140
  return Joi.object({
3028
- _id: Joi.string().allow(""),
3141
+ id: Joi.string().allow(""),
3029
3142
  name: Joi.string().allow(""),
3030
3143
  type: Joi.string().allow(""),
3031
3144
  updated_at: Joi.string().allow(""),
@@ -3045,8 +3158,16 @@ class ContentPlatformModel {
3045
3158
  /** @returns {CustomObjectEntryFieldSchema} */
3046
3159
  static CustomObjectEntryFieldSchema() {
3047
3160
  return Joi.object({
3048
- definition_id: Joi.string().allow(""),
3049
- value: Joi.array().items(Joi.any()),
3161
+ namespace: Joi.string().allow(""),
3162
+ slug: Joi.string().allow(""),
3163
+ });
3164
+ }
3165
+
3166
+ /** @returns {CustomObjectEntryFieldSchemaWithoutID} */
3167
+ static CustomObjectEntryFieldSchemaWithoutID() {
3168
+ return Joi.object({
3169
+ slug: Joi.string().allow(""),
3170
+ value: Joi.any(),
3050
3171
  });
3051
3172
  }
3052
3173
 
@@ -3054,13 +3175,23 @@ class ContentPlatformModel {
3054
3175
  static CustomObjectRequestSchema() {
3055
3176
  return Joi.object({
3056
3177
  status: Joi.string().allow(""),
3057
- definition_id: Joi.string().allow(""),
3178
+ slug: Joi.string().allow(""),
3058
3179
  fields: Joi.array().items(
3059
3180
  ContentPlatformModel.CustomObjectEntryFieldSchema()
3060
3181
  ),
3061
3182
  });
3062
3183
  }
3063
3184
 
3185
+ /** @returns {CustomObjectRequestSchemaWithoutId} */
3186
+ static CustomObjectRequestSchemaWithoutId() {
3187
+ return Joi.object({
3188
+ status: Joi.string().allow(""),
3189
+ fields: Joi.array().items(
3190
+ ContentPlatformModel.CustomObjectEntryFieldSchemaWithoutID()
3191
+ ),
3192
+ });
3193
+ }
3194
+
3064
3195
  /** @returns {CustomObjectBulkSchema} */
3065
3196
  static CustomObjectBulkSchema() {
3066
3197
  return Joi.object({