@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.10

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 (265) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/sdk/application/ApplicationClient.js +20 -0
  4. package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
  5. package/sdk/application/Cart/CartApplicationClient.js +3 -5
  6. package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
  7. package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
  8. package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
  9. package/sdk/application/Cart/CartApplicationValidator.js +0 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
  11. package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
  12. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
  13. package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
  14. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
  15. package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
  16. package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
  17. package/sdk/application/Common/CommonApplicationModel.js +172 -172
  18. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
  19. package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
  21. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
  22. package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
  23. package/sdk/application/Content/ContentApplicationClient.js +0 -246
  24. package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
  25. package/sdk/application/Content/ContentApplicationModel.js +565 -817
  26. package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
  27. package/sdk/application/Content/ContentApplicationValidator.js +0 -41
  28. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
  29. package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
  30. package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
  31. package/sdk/application/Lead/LeadApplicationModel.js +301 -301
  32. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
  33. package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
  34. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
  35. package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
  36. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
  37. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
  38. package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
  39. package/sdk/application/Order/OrderApplicationClient.js +8 -32
  40. package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
  41. package/sdk/application/Order/OrderApplicationModel.js +816 -824
  42. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
  43. package/sdk/application/Order/OrderApplicationValidator.js +0 -8
  44. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
  45. package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
  46. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
  47. package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
  48. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
  49. package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
  50. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
  51. package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
  52. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
  53. package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
  54. package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
  55. package/sdk/application/Share/ShareApplicationModel.js +121 -121
  56. package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
  57. package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
  58. package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
  59. package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
  60. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
  61. package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
  62. package/sdk/application/User/UserApplicationClient.d.ts +0 -33
  63. package/sdk/application/User/UserApplicationClient.js +0 -239
  64. package/sdk/application/User/UserApplicationModel.d.ts +753 -768
  65. package/sdk/application/User/UserApplicationModel.js +731 -755
  66. package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
  67. package/sdk/application/User/UserApplicationValidator.js +0 -36
  68. package/sdk/common/Clickstream.d.ts +1 -0
  69. package/sdk/common/Clickstream.js +254 -0
  70. package/sdk/common/Utility.js +1 -4
  71. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
  72. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
  73. package/sdk/partner/PartnerClient.d.ts +0 -6
  74. package/sdk/partner/PartnerClient.js +0 -9
  75. package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
  76. package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
  77. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
  78. package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
  79. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
  80. package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
  81. package/sdk/partner/index.d.ts +0 -3
  82. package/sdk/partner/index.js +0 -6
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
  86. package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
  87. package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
  88. package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
  89. package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
  90. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
  91. package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
  92. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
  94. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
  96. package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
  97. package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
  98. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
  108. package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
  109. package/sdk/platform/Common/CommonPlatformModel.js +187 -187
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
  111. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
  112. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
  114. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
  115. package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
  121. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
  124. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
  125. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
  126. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
  127. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
  128. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
  129. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
  130. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
  131. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
  132. package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
  133. package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
  134. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
  137. package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
  141. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
  145. package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
  147. package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
  148. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
  149. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
  150. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
  151. package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
  152. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
  153. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
  154. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
  155. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
  156. package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
  157. package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
  159. package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  161. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  162. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
  163. package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
  164. package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
  165. package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
  166. package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
  167. package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
  168. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
  169. package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
  170. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
  172. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
  174. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
  175. package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
  176. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
  177. package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
  178. package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
  179. package/sdk/platform/PlatformApplicationClient.js +4 -4
  180. package/sdk/platform/PlatformClient.d.ts +2 -4
  181. package/sdk/platform/PlatformClient.js +4 -8
  182. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
  183. package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
  194. package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
  195. package/sdk/platform/Share/SharePlatformModel.js +139 -139
  196. package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
  197. package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
  198. package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
  199. package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
  200. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
  201. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
  202. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
  203. package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
  204. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
  205. package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
  206. package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
  207. package/sdk/platform/User/UserPlatformModel.js +428 -679
  208. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
  209. package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
  210. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
  211. package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
  212. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
  213. package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
  214. package/sdk/platform/index.d.ts +1 -1
  215. package/sdk/platform/index.js +2 -2
  216. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
  217. package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
  218. package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
  219. package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
  220. package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
  221. package/sdk/public/Partner/PartnerPublicModel.js +113 -113
  222. package/sdk/public/PublicClient.d.ts +0 -4
  223. package/sdk/public/PublicClient.js +0 -8
  224. package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
  225. package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
  226. package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
  227. package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
  228. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
  229. package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
  230. package/sdk/public/index.d.ts +0 -2
  231. package/sdk/public/index.js +0 -4
  232. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
  233. package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
  234. package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
  235. package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
  236. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
  237. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
  238. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
  239. package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
  240. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
  241. package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
  242. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
  243. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
  244. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
  245. package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
  246. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
  247. package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
  248. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
  249. package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
  250. package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
  251. package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
  252. package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
  253. package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
  254. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
  255. package/sdk/public/Billing/BillingPublicClient.js +0 -116
  256. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
  257. package/sdk/public/Billing/BillingPublicModel.js +0 -96
  258. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
  259. package/sdk/public/Billing/BillingPublicValidator.js +0 -19
  260. package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
  261. package/sdk/public/Content/ContentPublicClient.js +0 -114
  262. package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
  263. package/sdk/public/Content/ContentPublicModel.js +0 -60
  264. package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
  265. package/sdk/public/Content/ContentPublicValidator.js +0 -19
@@ -1,47 +1,42 @@
1
1
  const Joi = require("joi");
2
2
 
3
3
  /**
4
- * @typedef Application
5
- * @property {number} [__v] - Version key for tracking revisions. Default value is zero.
4
+ * @typedef ApplicationResponse
5
+ * @property {Application} [application]
6
6
  * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
7
- * of the sales channel
8
- * @property {string} [app_type] - It shows whether application is live or in
9
- * development mode
10
- * @property {ApplicationAuth} [auth]
11
- * @property {SecureUrl} [banner]
12
- * @property {number} [cache_ttl] - An integer value that specifies the number
13
- * of seconds until the key expires
14
- * @property {string} [channel_type] - It indicates different channel types like
15
- * store, website-and-mobile-apps. Default value is store.
16
- * @property {number} [company_id] - Numeric ID allotted to a business account
17
- * where the sales channel exists
18
- * @property {ApplicationCors} [cors]
19
- * @property {string} [created_at] - ISO 8601 timestamp of sales channel creation
20
- * @property {string} [description] - It contains detailed information about the
7
+ * of the current sales channel supported currency
8
+ * @property {boolean} [is_active] - Shows currency is enabled or not in current
21
9
  * sales channel
22
- * @property {Domain} [domain]
23
- * @property {Domain[]} [domains]
24
- * @property {SecureUrl} [favicon]
25
- * @property {boolean} [is_active] - Indicates whether a sales channel is active
26
- * or not active
27
- * @property {boolean} [is_internal] - Indicates whether a sales channel is
28
- * internal or not
29
- * @property {SecureUrl} [logo]
30
- * @property {ApplicationMeta[]} [meta]
31
- * @property {SecureUrl} [mobile_logo]
32
- * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
33
- * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
34
- * of owner who owns the application
35
- * @property {ApplicationRedirections[]} [redirections]
36
- * @property {string} [token] - Randomly generated fixed-length string for sales
37
- * channel. It is required and auto-generated.
38
- * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation
39
- * @property {ApplicationWebsite} [website]
10
+ * @property {string} [name] - Name of the currency, e.g. Indian Rupee
11
+ * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR.
12
+ * @property {string} [created_at] - ISO 8601 timestamp of sales channel support
13
+ * currency creation
14
+ * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support
15
+ * currency updation
16
+ * @property {number} [decimal_digits] - Acceptable decimal limits for a given
17
+ * currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid
18
+ * value of a currency.
19
+ * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹
40
20
  */
41
21
 
42
22
  /**
43
- * @typedef ApplicationAuth
44
- * @property {boolean} [enabled] - Shows sales channel auth is enabled or not enabled.
23
+ * @typedef Domain
24
+ * @property {boolean} [verified] - Indicates domain is verified or not. TXT and
25
+ * A records should propagate correctly.
26
+ * @property {boolean} [is_primary] - Indicates domain is primary or not.
27
+ * Primary domain is the default/main domain.
28
+ * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain
29
+ * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
30
+ * of the domain
31
+ * @property {string} [name]
32
+ * @property {boolean} [is_predefined] - Domain is hosting domain or not
33
+ */
34
+
35
+ /**
36
+ * @typedef ApplicationWebsite
37
+ * @property {boolean} [enabled] - Shows whether sales channel website URL is
38
+ * enabled or not
39
+ * @property {string} [basepath] - Base path for the current sales channel website
45
40
  */
46
41
 
47
42
  /**
@@ -50,9 +45,8 @@ const Joi = require("joi");
50
45
  */
51
46
 
52
47
  /**
53
- * @typedef ApplicationMeta
54
- * @property {string} [name] - Indicates the name of application meta
55
- * @property {string} [value] - Value related to application meta name
48
+ * @typedef ApplicationAuth
49
+ * @property {boolean} [enabled] - Shows sales channel auth is enabled or not enabled.
56
50
  */
57
51
 
58
52
  /**
@@ -66,29 +60,58 @@ const Joi = require("joi");
66
60
  */
67
61
 
68
62
  /**
69
- * @typedef ApplicationResponse
70
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
71
- * of the current sales channel supported currency
72
- * @property {Application} [application]
73
- * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR.
74
- * @property {string} [created_at] - ISO 8601 timestamp of sales channel support
75
- * currency creation
76
- * @property {number} [decimal_digits] - Acceptable decimal limits for a given
77
- * currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid
78
- * value of a currency.
79
- * @property {boolean} [is_active] - Shows currency is enabled or not in current
63
+ * @typedef ApplicationMeta
64
+ * @property {string} [name] - Indicates the name of application meta
65
+ * @property {string} [value] - Value related to application meta name
66
+ */
67
+
68
+ /**
69
+ * @typedef SecureUrl
70
+ * @property {string} [secure_url] - Hosted URL of the image
71
+ */
72
+
73
+ /**
74
+ * @typedef Application
75
+ * @property {ApplicationWebsite} [website]
76
+ * @property {ApplicationCors} [cors]
77
+ * @property {ApplicationAuth} [auth]
78
+ * @property {string} [description] - It contains detailed information about the
80
79
  * sales channel
81
- * @property {string} [name] - Name of the currency, e.g. Indian Rupee
82
- * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹
83
- * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support
84
- * currency updation
80
+ * @property {string} [channel_type] - It indicates different channel types like
81
+ * store, website-and-mobile-apps. Default value is store.
82
+ * @property {number} [cache_ttl] - An integer value that specifies the number
83
+ * of seconds until the key expires
84
+ * @property {boolean} [is_internal] - Indicates whether a sales channel is
85
+ * internal or not
86
+ * @property {boolean} [is_active] - Indicates whether a sales channel is active
87
+ * or not active
88
+ * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
89
+ * of the sales channel
90
+ * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion
91
+ * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID)
92
+ * of owner who owns the application
93
+ * @property {number} [company_id] - Numeric ID allotted to a business account
94
+ * where the sales channel exists
95
+ * @property {string} [token] - Randomly generated fixed-length string for sales
96
+ * channel. It is required and auto-generated.
97
+ * @property {ApplicationRedirections[]} [redirections]
98
+ * @property {ApplicationMeta[]} [meta]
99
+ * @property {string} [created_at] - ISO 8601 timestamp of sales channel creation
100
+ * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation
101
+ * @property {number} [__v] - Version key for tracking revisions. Default value is zero.
102
+ * @property {SecureUrl} [banner]
103
+ * @property {SecureUrl} [logo]
104
+ * @property {SecureUrl} [favicon]
105
+ * @property {Domain[]} [domains]
106
+ * @property {string} [app_type] - It shows whether application is live or in
107
+ * development mode
108
+ * @property {SecureUrl} [mobile_logo]
109
+ * @property {Domain} [domain]
85
110
  */
86
111
 
87
112
  /**
88
- * @typedef ApplicationWebsite
89
- * @property {string} [basepath] - Base path for the current sales channel website
90
- * @property {boolean} [enabled] - Shows whether sales channel website URL is
91
- * enabled or not
113
+ * @typedef NotFound
114
+ * @property {string} [message] - Response message for not found
92
115
  */
93
116
 
94
117
  /**
@@ -97,50 +120,37 @@ const Joi = require("joi");
97
120
  */
98
121
 
99
122
  /**
100
- * @typedef Domain
101
- * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID)
102
- * of the domain
103
- * @property {boolean} [is_predefined] - Domain is hosting domain or not
104
- * @property {boolean} [is_primary] - Indicates domain is primary or not.
105
- * Primary domain is the default/main domain.
106
- * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain
123
+ * @typedef LocationDefaultLanguage
107
124
  * @property {string} [name]
108
- * @property {boolean} [verified] - Indicates domain is verified or not. TXT and
109
- * A records should propagate correctly.
125
+ * @property {string} [code]
126
+ */
127
+
128
+ /**
129
+ * @typedef LocationDefaultCurrency
130
+ * @property {string} [name]
131
+ * @property {string} [symbol]
132
+ * @property {string} [code]
110
133
  */
111
134
 
112
135
  /**
113
136
  * @typedef LocationCountry
114
- * @property {number} [__v]
115
- * @property {string} [_id]
116
137
  * @property {string} [capital]
117
- * @property {string} [country_code]
118
138
  * @property {string} [currency]
119
- * @property {LocationDefaultCurrency} [default_currency]
120
- * @property {LocationDefaultLanguage} [default_language]
121
139
  * @property {string} [iso2]
122
140
  * @property {string} [iso3]
123
- * @property {string} [latitude]
124
- * @property {string} [longitude]
125
141
  * @property {string} [name]
126
142
  * @property {string} [parent]
127
143
  * @property {string} [phone_code]
128
- * @property {string} [state_code]
129
144
  * @property {string} [type]
130
145
  * @property {number} [uid]
131
- */
132
-
133
- /**
134
- * @typedef LocationDefaultCurrency
135
- * @property {string} [code]
136
- * @property {string} [name]
137
- * @property {string} [symbol]
138
- */
139
-
140
- /**
141
- * @typedef LocationDefaultLanguage
142
- * @property {string} [code]
143
- * @property {string} [name]
146
+ * @property {number} [__v]
147
+ * @property {string} [_id]
148
+ * @property {LocationDefaultCurrency} [default_currency]
149
+ * @property {LocationDefaultLanguage} [default_language]
150
+ * @property {string} [state_code]
151
+ * @property {string} [country_code]
152
+ * @property {string} [latitude]
153
+ * @property {string} [longitude]
144
154
  */
145
155
 
146
156
  /**
@@ -148,54 +158,39 @@ const Joi = require("joi");
148
158
  * @property {LocationCountry[]} [items] - Object Containing Country Locations Details
149
159
  */
150
160
 
151
- /**
152
- * @typedef NotFound
153
- * @property {string} [message] - Response message for not found
154
- */
155
-
156
- /**
157
- * @typedef SecureUrl
158
- * @property {string} [secure_url] - Hosted URL of the image
159
- */
160
-
161
161
  class CommonPlatformModel {
162
- /** @returns {Application} */
163
- static Application() {
162
+ /** @returns {ApplicationResponse} */
163
+ static ApplicationResponse() {
164
164
  return Joi.object({
165
- __v: Joi.number(),
165
+ application: CommonPlatformModel.Application(),
166
166
  _id: Joi.string().allow(""),
167
- app_type: Joi.string().allow(""),
168
- auth: CommonPlatformModel.ApplicationAuth(),
169
- banner: CommonPlatformModel.SecureUrl(),
170
- cache_ttl: Joi.number(),
171
- channel_type: Joi.string().allow(""),
172
- company_id: Joi.number(),
173
- cors: CommonPlatformModel.ApplicationCors(),
174
- created_at: Joi.string().allow(""),
175
- description: Joi.string().allow(""),
176
- domain: CommonPlatformModel.Domain(),
177
- domains: Joi.array().items(CommonPlatformModel.Domain()),
178
- favicon: CommonPlatformModel.SecureUrl(),
179
167
  is_active: Joi.boolean(),
180
- is_internal: Joi.boolean(),
181
- logo: CommonPlatformModel.SecureUrl(),
182
- meta: Joi.array().items(CommonPlatformModel.ApplicationMeta()),
183
- mobile_logo: CommonPlatformModel.SecureUrl(),
184
168
  name: Joi.string().allow(""),
185
- owner: Joi.string().allow(""),
186
- redirections: Joi.array().items(
187
- CommonPlatformModel.ApplicationRedirections()
188
- ),
189
- token: Joi.string().allow(""),
169
+ code: Joi.string().allow(""),
170
+ created_at: Joi.string().allow(""),
190
171
  updated_at: Joi.string().allow(""),
191
- website: CommonPlatformModel.ApplicationWebsite(),
172
+ decimal_digits: Joi.number(),
173
+ symbol: Joi.string().allow(""),
192
174
  });
193
175
  }
194
176
 
195
- /** @returns {ApplicationAuth} */
196
- static ApplicationAuth() {
177
+ /** @returns {Domain} */
178
+ static Domain() {
179
+ return Joi.object({
180
+ verified: Joi.boolean(),
181
+ is_primary: Joi.boolean(),
182
+ is_shortlink: Joi.boolean(),
183
+ _id: Joi.string().allow(""),
184
+ name: Joi.string().allow(""),
185
+ is_predefined: Joi.boolean(),
186
+ });
187
+ }
188
+
189
+ /** @returns {ApplicationWebsite} */
190
+ static ApplicationWebsite() {
197
191
  return Joi.object({
198
192
  enabled: Joi.boolean(),
193
+ basepath: Joi.string().allow(""),
199
194
  });
200
195
  }
201
196
 
@@ -206,11 +201,10 @@ class CommonPlatformModel {
206
201
  });
207
202
  }
208
203
 
209
- /** @returns {ApplicationMeta} */
210
- static ApplicationMeta() {
204
+ /** @returns {ApplicationAuth} */
205
+ static ApplicationAuth() {
211
206
  return Joi.object({
212
- name: Joi.string().allow(""),
213
- value: Joi.string().allow(""),
207
+ enabled: Joi.boolean(),
214
208
  });
215
209
  }
216
210
 
@@ -223,26 +217,58 @@ class CommonPlatformModel {
223
217
  });
224
218
  }
225
219
 
226
- /** @returns {ApplicationResponse} */
227
- static ApplicationResponse() {
220
+ /** @returns {ApplicationMeta} */
221
+ static ApplicationMeta() {
228
222
  return Joi.object({
229
- _id: Joi.string().allow(""),
230
- application: CommonPlatformModel.Application(),
231
- code: Joi.string().allow(""),
232
- created_at: Joi.string().allow(""),
233
- decimal_digits: Joi.number(),
223
+ name: Joi.string().allow(""),
224
+ value: Joi.string().allow(""),
225
+ });
226
+ }
227
+
228
+ /** @returns {SecureUrl} */
229
+ static SecureUrl() {
230
+ return Joi.object({
231
+ secure_url: Joi.string().allow(""),
232
+ });
233
+ }
234
+
235
+ /** @returns {Application} */
236
+ static Application() {
237
+ return Joi.object({
238
+ website: CommonPlatformModel.ApplicationWebsite(),
239
+ cors: CommonPlatformModel.ApplicationCors(),
240
+ auth: CommonPlatformModel.ApplicationAuth(),
241
+ description: Joi.string().allow(""),
242
+ channel_type: Joi.string().allow(""),
243
+ cache_ttl: Joi.number(),
244
+ is_internal: Joi.boolean(),
234
245
  is_active: Joi.boolean(),
246
+ _id: Joi.string().allow(""),
235
247
  name: Joi.string().allow(""),
236
- symbol: Joi.string().allow(""),
248
+ owner: Joi.string().allow(""),
249
+ company_id: Joi.number(),
250
+ token: Joi.string().allow(""),
251
+ redirections: Joi.array().items(
252
+ CommonPlatformModel.ApplicationRedirections()
253
+ ),
254
+ meta: Joi.array().items(CommonPlatformModel.ApplicationMeta()),
255
+ created_at: Joi.string().allow(""),
237
256
  updated_at: Joi.string().allow(""),
257
+ __v: Joi.number(),
258
+ banner: CommonPlatformModel.SecureUrl(),
259
+ logo: CommonPlatformModel.SecureUrl(),
260
+ favicon: CommonPlatformModel.SecureUrl(),
261
+ domains: Joi.array().items(CommonPlatformModel.Domain()),
262
+ app_type: Joi.string().allow(""),
263
+ mobile_logo: CommonPlatformModel.SecureUrl(),
264
+ domain: CommonPlatformModel.Domain(),
238
265
  });
239
266
  }
240
267
 
241
- /** @returns {ApplicationWebsite} */
242
- static ApplicationWebsite() {
268
+ /** @returns {NotFound} */
269
+ static NotFound() {
243
270
  return Joi.object({
244
- basepath: Joi.string().allow(""),
245
- enabled: Joi.boolean(),
271
+ message: Joi.string().allow(""),
246
272
  });
247
273
  }
248
274
 
@@ -253,55 +279,43 @@ class CommonPlatformModel {
253
279
  });
254
280
  }
255
281
 
256
- /** @returns {Domain} */
257
- static Domain() {
282
+ /** @returns {LocationDefaultLanguage} */
283
+ static LocationDefaultLanguage() {
258
284
  return Joi.object({
259
- _id: Joi.string().allow(""),
260
- is_predefined: Joi.boolean(),
261
- is_primary: Joi.boolean(),
262
- is_shortlink: Joi.boolean(),
263
285
  name: Joi.string().allow(""),
264
- verified: Joi.boolean(),
286
+ code: Joi.string().allow(""),
287
+ });
288
+ }
289
+
290
+ /** @returns {LocationDefaultCurrency} */
291
+ static LocationDefaultCurrency() {
292
+ return Joi.object({
293
+ name: Joi.string().allow(""),
294
+ symbol: Joi.string().allow(""),
295
+ code: Joi.string().allow(""),
265
296
  });
266
297
  }
267
298
 
268
299
  /** @returns {LocationCountry} */
269
300
  static LocationCountry() {
270
301
  return Joi.object({
271
- __v: Joi.number(),
272
- _id: Joi.string().allow(""),
273
302
  capital: Joi.string().allow(""),
274
- country_code: Joi.string().allow(""),
275
303
  currency: Joi.string().allow(""),
276
- default_currency: CommonPlatformModel.LocationDefaultCurrency(),
277
- default_language: CommonPlatformModel.LocationDefaultLanguage(),
278
304
  iso2: Joi.string().allow(""),
279
305
  iso3: Joi.string().allow(""),
280
- latitude: Joi.string().allow(""),
281
- longitude: Joi.string().allow(""),
282
306
  name: Joi.string().allow(""),
283
307
  parent: Joi.string().allow(""),
284
308
  phone_code: Joi.string().allow(""),
285
- state_code: Joi.string().allow(""),
286
309
  type: Joi.string().allow(""),
287
310
  uid: Joi.number(),
288
- });
289
- }
290
-
291
- /** @returns {LocationDefaultCurrency} */
292
- static LocationDefaultCurrency() {
293
- return Joi.object({
294
- code: Joi.string().allow(""),
295
- name: Joi.string().allow(""),
296
- symbol: Joi.string().allow(""),
297
- });
298
- }
299
-
300
- /** @returns {LocationDefaultLanguage} */
301
- static LocationDefaultLanguage() {
302
- return Joi.object({
303
- code: Joi.string().allow(""),
304
- name: Joi.string().allow(""),
311
+ __v: Joi.number(),
312
+ _id: Joi.string().allow(""),
313
+ default_currency: CommonPlatformModel.LocationDefaultCurrency(),
314
+ default_language: CommonPlatformModel.LocationDefaultLanguage(),
315
+ state_code: Joi.string().allow(""),
316
+ country_code: Joi.string().allow(""),
317
+ latitude: Joi.string().allow(""),
318
+ longitude: Joi.string().allow(""),
305
319
  });
306
320
  }
307
321
 
@@ -311,19 +325,5 @@ class CommonPlatformModel {
311
325
  items: Joi.array().items(CommonPlatformModel.LocationCountry()),
312
326
  });
313
327
  }
314
-
315
- /** @returns {NotFound} */
316
- static NotFound() {
317
- return Joi.object({
318
- message: Joi.string().allow(""),
319
- });
320
- }
321
-
322
- /** @returns {SecureUrl} */
323
- static SecureUrl() {
324
- return Joi.object({
325
- secure_url: Joi.string().allow(""),
326
- });
327
- }
328
328
  }
329
329
  module.exports = CommonPlatformModel;