@gofynd/fdk-client-javascript 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +4 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -0,0 +1,22 @@
1
+ export = ThemeValidator;
2
+ declare class ThemeValidator {
3
+ static getAllPages(): any;
4
+ static createPage(): any;
5
+ static updateMultiplePages(): any;
6
+ static getPage(): any;
7
+ static updatePage(): any;
8
+ static deletePage(): any;
9
+ static getApplicationThemes(): any;
10
+ static getThemeById(): any;
11
+ static updateTheme(): any;
12
+ static deleteTheme(): any;
13
+ static getOrganizationThemes(): any;
14
+ static getOrganizationThemeDetails(): any;
15
+ static updateDraftTheme(): any;
16
+ static submitOrganizationTheme(): any;
17
+ static deleteOrganizationTheme(): any;
18
+ static getLatestVersionOfThemeBySlug(): any;
19
+ static createNewThemeInOrganization(): any;
20
+ static getThemeRejectionReasons(): any;
21
+ static getThemeVersions(): any;
22
+ }
@@ -0,0 +1,157 @@
1
+ const Joi = require("joi");
2
+
3
+ const ThemeModel = require("./ThemePartnerModel");
4
+ class ThemeValidator {
5
+ static getAllPages() {
6
+ return Joi.object({
7
+ companyId: Joi.number().required(),
8
+ applicationId: Joi.string().allow("").required(),
9
+ themeId: Joi.string().allow("").required(),
10
+ }).required();
11
+ }
12
+
13
+ static createPage() {
14
+ return Joi.object({
15
+ companyId: Joi.number().required(),
16
+ applicationId: Joi.string().allow("").required(),
17
+ themeId: Joi.string().allow("").required(),
18
+
19
+ body: ThemeModel.AvailablePageSchema().required(),
20
+ }).required();
21
+ }
22
+
23
+ static updateMultiplePages() {
24
+ return Joi.object({
25
+ companyId: Joi.number().required(),
26
+ applicationId: Joi.string().allow("").required(),
27
+ themeId: Joi.string().allow("").required(),
28
+
29
+ body: ThemeModel.AllAvailablePageSchema().required(),
30
+ }).required();
31
+ }
32
+
33
+ static getPage() {
34
+ return Joi.object({
35
+ companyId: Joi.number().required(),
36
+ applicationId: Joi.string().allow("").required(),
37
+ themeId: Joi.string().allow("").required(),
38
+ pageValue: Joi.string().allow("").required(),
39
+ }).required();
40
+ }
41
+
42
+ static updatePage() {
43
+ return Joi.object({
44
+ companyId: Joi.number().required(),
45
+ applicationId: Joi.string().allow("").required(),
46
+ themeId: Joi.string().allow("").required(),
47
+ pageValue: Joi.string().allow("").required(),
48
+
49
+ body: ThemeModel.AvailablePageSchema().required(),
50
+ }).required();
51
+ }
52
+
53
+ static deletePage() {
54
+ return Joi.object({
55
+ companyId: Joi.number().required(),
56
+ applicationId: Joi.string().allow("").required(),
57
+ themeId: Joi.string().allow("").required(),
58
+ pageValue: Joi.string().allow("").required(),
59
+ }).required();
60
+ }
61
+
62
+ static getApplicationThemes() {
63
+ return Joi.object({
64
+ companyId: Joi.number().required(),
65
+ applicationId: Joi.string().allow("").required(),
66
+ }).required();
67
+ }
68
+
69
+ static getThemeById() {
70
+ return Joi.object({
71
+ companyId: Joi.number().required(),
72
+ applicationId: Joi.string().allow("").required(),
73
+ themeId: Joi.string().allow("").required(),
74
+ }).required();
75
+ }
76
+
77
+ static updateTheme() {
78
+ return Joi.object({
79
+ companyId: Joi.number().required(),
80
+ applicationId: Joi.string().allow("").required(),
81
+ themeId: Joi.string().allow("").required(),
82
+
83
+ body: ThemeModel.UpdateThemeRequestBody().required(),
84
+ }).required();
85
+ }
86
+
87
+ static deleteTheme() {
88
+ return Joi.object({
89
+ companyId: Joi.number().required(),
90
+ applicationId: Joi.string().allow("").required(),
91
+ themeId: Joi.string().allow("").required(),
92
+ }).required();
93
+ }
94
+
95
+ static getOrganizationThemes() {
96
+ return Joi.object({
97
+ status: Joi.string().allow(""),
98
+ pageSize: Joi.number(),
99
+ pageNo: Joi.number(),
100
+ }).required();
101
+ }
102
+
103
+ static getOrganizationThemeDetails() {
104
+ return Joi.object({
105
+ themeId: Joi.string().allow("").required(),
106
+ }).required();
107
+ }
108
+
109
+ static updateDraftTheme() {
110
+ return Joi.object({
111
+ themeId: Joi.string().allow("").required(),
112
+ body: ThemeModel.MarketplaceTheme().required(),
113
+ }).required();
114
+ }
115
+
116
+ static submitOrganizationTheme() {
117
+ return Joi.object({
118
+ themeId: Joi.string().allow("").required(),
119
+ body: ThemeModel.MarketplaceTheme().required(),
120
+ }).required();
121
+ }
122
+
123
+ static deleteOrganizationTheme() {
124
+ return Joi.object({
125
+ themeId: Joi.string().allow("").required(),
126
+ }).required();
127
+ }
128
+
129
+ static getLatestVersionOfThemeBySlug() {
130
+ return Joi.object({
131
+ slugName: Joi.string().allow("").required(),
132
+ }).required();
133
+ }
134
+
135
+ static createNewThemeInOrganization() {
136
+ return Joi.object({
137
+ slug: Joi.string().allow(""),
138
+ body: ThemeModel.MarketplaceTheme().required(),
139
+ }).required();
140
+ }
141
+
142
+ static getThemeRejectionReasons() {
143
+ return Joi.object({
144
+ themeId: Joi.string().allow("").required(),
145
+ }).required();
146
+ }
147
+
148
+ static getThemeVersions() {
149
+ return Joi.object({
150
+ themeSlug: Joi.string().allow("").required(),
151
+ pageSize: Joi.number(),
152
+ pageNo: Joi.number(),
153
+ }).required();
154
+ }
155
+ }
156
+
157
+ module.exports = ThemeValidator;
@@ -1,3 +1,5 @@
1
1
  export const PartnerConfig: typeof import("./PartnerConfig");
2
2
  export const PartnerClient: typeof import("./PartnerClient");
3
- export const PartnerModel: {};
3
+ export namespace PartnerModel {
4
+ const ThemePartnerModel: typeof import("./Theme/ThemePartnerModel");
5
+ }
@@ -1,5 +1,7 @@
1
1
  module.exports = {
2
2
  PartnerConfig: require("./PartnerConfig"),
3
3
  PartnerClient: require("./PartnerClient"),
4
- PartnerModel: {},
4
+ PartnerModel: {
5
+ ThemePartnerModel: require("./Theme/ThemePartnerModel"),
6
+ },
5
7
  };
@@ -4,40 +4,44 @@ declare class AuditTrail {
4
4
  config: any;
5
5
  /**
6
6
  * @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
7
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
7
8
  * @param {import("../PlatformAPIClient").Options} - Options
8
9
  * @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
9
10
  * @name createAuditLog
10
11
  * @summary: Create logs for auditing later on
11
12
  * @description: Create a log instance that stores all the relevant info to be logged - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
12
13
  */
13
- createAuditLog({ body }?: AuditTrailPlatformValidator.CreateAuditLogParam, { headers }?: import("../PlatformAPIClient").Options): Promise<AuditTrailPlatformModel.CreateLogResponse>;
14
+ createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.CreateLogResponse>;
14
15
  /**
15
16
  * @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object
17
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
16
18
  * @param {import("../PlatformAPIClient").Options} - Options
17
19
  * @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
18
20
  * @name getAuditLog
19
21
  * @summary: Get audit log
20
22
  * @description: Get detailed log information by their id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
21
23
  */
22
- getAuditLog({ id }?: AuditTrailPlatformValidator.GetAuditLogParam, { headers }?: import("../PlatformAPIClient").Options): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
24
+ getAuditLog({ id, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
23
25
  /**
24
26
  * @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object
27
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
25
28
  * @param {import("../PlatformAPIClient").Options} - Options
26
29
  * @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
27
30
  * @name getAuditLogs
28
31
  * @summary: Get paginated audit logs
29
32
  * @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
30
33
  */
31
- getAuditLogs({ qs }?: AuditTrailPlatformValidator.GetAuditLogsParam, { headers }?: import("../PlatformAPIClient").Options): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
34
+ getAuditLogs({ qs, limit, sort, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogsParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
32
35
  /**
33
36
  * @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object
37
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
34
38
  * @param {import("../PlatformAPIClient").Options} - Options
35
39
  * @returns {Promise<AuditTrailPlatformModel.EntityTypesResponse>} - Success response
36
40
  * @name getEntityTypes
37
41
  * @summary: Get entity types
38
42
  * @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
39
43
  */
40
- getEntityTypes({ headers }?: any): Promise<AuditTrailPlatformModel.EntityTypesResponse>;
44
+ getEntityTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.EntityTypesResponse>;
41
45
  }
42
46
  import AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator");
43
47
  import AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
@@ -13,13 +13,17 @@ class AuditTrail {
13
13
 
14
14
  /**
15
15
  * @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
16
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
16
17
  * @param {import("../PlatformAPIClient").Options} - Options
17
18
  * @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
18
19
  * @name createAuditLog
19
20
  * @summary: Create logs for auditing later on
20
21
  * @description: Create a log instance that stores all the relevant info to be logged - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
21
22
  */
22
- async createAuditLog({ body } = {}, { headers } = { headers: false }) {
23
+ async createAuditLog(
24
+ { body, requestHeaders } = { requestHeaders: {} },
25
+ { responseHeaders } = { responseHeaders: false }
26
+ ) {
23
27
  const { error } = AuditTrailPlatformValidator.createAuditLog().validate(
24
28
  {
25
29
  body,
@@ -56,12 +60,12 @@ class AuditTrail {
56
60
  `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
57
61
  query_params,
58
62
  body,
59
- xHeaders,
60
- { headers }
63
+ { ...xHeaders, ...requestHeaders },
64
+ { responseHeaders }
61
65
  );
62
66
 
63
67
  let responseData = response;
64
- if (headers) {
68
+ if (responseHeaders) {
65
69
  responseData = response[0];
66
70
  }
67
71
 
@@ -84,13 +88,17 @@ class AuditTrail {
84
88
 
85
89
  /**
86
90
  * @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object
91
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
87
92
  * @param {import("../PlatformAPIClient").Options} - Options
88
93
  * @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
89
94
  * @name getAuditLog
90
95
  * @summary: Get audit log
91
96
  * @description: Get detailed log information by their id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
92
97
  */
93
- async getAuditLog({ id } = {}, { headers } = { headers: false }) {
98
+ async getAuditLog(
99
+ { id, requestHeaders } = { requestHeaders: {} },
100
+ { responseHeaders } = { responseHeaders: false }
101
+ ) {
94
102
  const { error } = AuditTrailPlatformValidator.getAuditLog().validate(
95
103
  {
96
104
  id,
@@ -127,12 +135,12 @@ class AuditTrail {
127
135
  `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/${id}`,
128
136
  query_params,
129
137
  undefined,
130
- xHeaders,
131
- { headers }
138
+ { ...xHeaders, ...requestHeaders },
139
+ { responseHeaders }
132
140
  );
133
141
 
134
142
  let responseData = response;
135
- if (headers) {
143
+ if (responseHeaders) {
136
144
  responseData = response[0];
137
145
  }
138
146
 
@@ -155,16 +163,22 @@ class AuditTrail {
155
163
 
156
164
  /**
157
165
  * @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object
166
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
158
167
  * @param {import("../PlatformAPIClient").Options} - Options
159
168
  * @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
160
169
  * @name getAuditLogs
161
170
  * @summary: Get paginated audit logs
162
171
  * @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
163
172
  */
164
- async getAuditLogs({ qs } = {}, { headers } = { headers: false }) {
173
+ async getAuditLogs(
174
+ { qs, limit, sort, requestHeaders } = { requestHeaders: {} },
175
+ { responseHeaders } = { responseHeaders: false }
176
+ ) {
165
177
  const { error } = AuditTrailPlatformValidator.getAuditLogs().validate(
166
178
  {
167
179
  qs,
180
+ limit,
181
+ sort,
168
182
  },
169
183
  { abortEarly: false, allowUnknown: true }
170
184
  );
@@ -178,6 +192,8 @@ class AuditTrail {
178
192
  } = AuditTrailPlatformValidator.getAuditLogs().validate(
179
193
  {
180
194
  qs,
195
+ limit,
196
+ sort,
181
197
  },
182
198
  { abortEarly: false, allowUnknown: false }
183
199
  );
@@ -190,6 +206,8 @@ class AuditTrail {
190
206
 
191
207
  const query_params = {};
192
208
  query_params["qs"] = qs;
209
+ query_params["limit"] = limit;
210
+ query_params["sort"] = sort;
193
211
 
194
212
  const xHeaders = {};
195
213
 
@@ -199,12 +217,12 @@ class AuditTrail {
199
217
  `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
200
218
  query_params,
201
219
  undefined,
202
- xHeaders,
203
- { headers }
220
+ { ...xHeaders, ...requestHeaders },
221
+ { responseHeaders }
204
222
  );
205
223
 
206
224
  let responseData = response;
207
- if (headers) {
225
+ if (responseHeaders) {
208
226
  responseData = response[0];
209
227
  }
210
228
 
@@ -227,13 +245,17 @@ class AuditTrail {
227
245
 
228
246
  /**
229
247
  * @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object
248
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
230
249
  * @param {import("../PlatformAPIClient").Options} - Options
231
250
  * @returns {Promise<AuditTrailPlatformModel.EntityTypesResponse>} - Success response
232
251
  * @name getEntityTypes
233
252
  * @summary: Get entity types
234
253
  * @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
235
254
  */
236
- async getEntityTypes({ headers } = { headers: false }) {
255
+ async getEntityTypes(
256
+ { requestHeaders } = { requestHeaders: {} },
257
+ { responseHeaders } = { responseHeaders: false }
258
+ ) {
237
259
  const { error } = AuditTrailPlatformValidator.getEntityTypes().validate(
238
260
  {},
239
261
  { abortEarly: false, allowUnknown: true }
@@ -266,12 +288,12 @@ class AuditTrail {
266
288
  `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/entity-types`,
267
289
  query_params,
268
290
  undefined,
269
- xHeaders,
270
- { headers }
291
+ { ...xHeaders, ...requestHeaders },
292
+ { responseHeaders }
271
293
  );
272
294
 
273
295
  let responseData = response;
274
- if (headers) {
296
+ if (responseHeaders) {
275
297
  responseData = response[0];
276
298
  }
277
299
 
@@ -80,14 +80,10 @@ export = AuditTrailPlatformModel;
80
80
  * @property {LogMetaObj} log_meta
81
81
  * @property {Object} log_payload
82
82
  */
83
- /**
84
- * @typedef ResourceNotFound
85
- * @property {string} [message] - Resource not found with {id}
86
- */
87
83
  declare class AuditTrailPlatformModel {
88
84
  }
89
85
  declare namespace AuditTrailPlatformModel {
90
- export { BadRequest, CreateLogResponse, DeviceInfo, EntityObj, EntityObject, EntityTypeObj, EntityTypesResponse, InternalServerError, Location, LogDocs, LogMetaObj, LogSchemaResponse, Modifier, RequestBodyAuditLog, ResourceNotFound };
86
+ export { BadRequest, CreateLogResponse, DeviceInfo, EntityObj, EntityObject, EntityTypeObj, EntityTypesResponse, InternalServerError, Location, LogDocs, LogMetaObj, LogSchemaResponse, Modifier, RequestBodyAuditLog };
91
87
  }
92
88
  /** @returns {BadRequest} */
93
89
  declare function BadRequest(): BadRequest;
@@ -193,11 +189,3 @@ type RequestBodyAuditLog = {
193
189
  log_meta: LogMetaObj;
194
190
  log_payload: any;
195
191
  };
196
- /** @returns {ResourceNotFound} */
197
- declare function ResourceNotFound(): ResourceNotFound;
198
- type ResourceNotFound = {
199
- /**
200
- * - Resource not found with {id}
201
- */
202
- message?: string;
203
- };
@@ -95,11 +95,6 @@ const Joi = require("joi");
95
95
  * @property {Object} log_payload
96
96
  */
97
97
 
98
- /**
99
- * @typedef ResourceNotFound
100
- * @property {string} [message] - Resource not found with {id}
101
- */
102
-
103
98
  class AuditTrailPlatformModel {
104
99
  /** @returns {BadRequest} */
105
100
  static BadRequest() {
@@ -223,12 +218,5 @@ class AuditTrailPlatformModel {
223
218
  log_payload: Joi.any().required(),
224
219
  });
225
220
  }
226
-
227
- /** @returns {ResourceNotFound} */
228
- static ResourceNotFound() {
229
- return Joi.object({
230
- message: Joi.string().allow(""),
231
- });
232
- }
233
221
  }
234
222
  module.exports = AuditTrailPlatformModel;
@@ -10,6 +10,8 @@ export = AuditTrailPlatformValidator;
10
10
  /**
11
11
  * @typedef GetAuditLogsParam
12
12
  * @property {string} qs - Logs Query
13
+ * @property {number} [limit] - Current request items count
14
+ * @property {Object} [sort] - To sort based on _id
13
15
  */
14
16
  /** @typedef GetEntityTypesParam */
15
17
  declare class AuditTrailPlatformValidator {
@@ -39,6 +41,14 @@ type GetAuditLogsParam = {
39
41
  * - Logs Query
40
42
  */
41
43
  qs: string;
44
+ /**
45
+ * - Current request items count
46
+ */
47
+ limit?: number;
48
+ /**
49
+ * - To sort based on _id
50
+ */
51
+ sort?: any;
42
52
  };
43
53
  type GetEntityTypesParam = any;
44
54
  import AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
@@ -15,6 +15,8 @@ const AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
15
15
  /**
16
16
  * @typedef GetAuditLogsParam
17
17
  * @property {string} qs - Logs Query
18
+ * @property {number} [limit] - Current request items count
19
+ * @property {Object} [sort] - To sort based on _id
18
20
  */
19
21
 
20
22
  /** @typedef GetEntityTypesParam */
@@ -38,6 +40,8 @@ class AuditTrailPlatformValidator {
38
40
  static getAuditLogs() {
39
41
  return Joi.object({
40
42
  qs: Joi.string().allow("").required(),
43
+ limit: Joi.number(),
44
+ sort: Joi.any(),
41
45
  }).required();
42
46
  }
43
47