@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) 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 +93 -113
  6. package/sdk/application/Cart/CartApplicationClient.js +157 -530
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -19
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +65 -55
  16. package/sdk/application/Content/ContentApplicationClient.js +211 -341
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -33
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
  22. package/sdk/application/Lead/LeadApplicationClient.js +24 -55
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +32 -87
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +126 -383
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
  26. package/sdk/application/Order/OrderApplicationClient.js +89 -293
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
  28. package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
  29. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
  31. package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
  32. package/sdk/application/Share/ShareApplicationClient.js +35 -89
  33. package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
  34. package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
  35. package/sdk/application/User/UserApplicationClient.d.ts +23 -13
  36. package/sdk/application/User/UserApplicationClient.js +49 -407
  37. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  38. package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
  39. package/sdk/common/Utility.d.ts +1 -1
  40. package/sdk/common/Utility.js +10 -7
  41. package/sdk/common/Validator.d.ts +1 -0
  42. package/sdk/common/Validator.js +20 -0
  43. package/sdk/common/utils.d.ts +0 -1
  44. package/sdk/common/utils.js +0 -14
  45. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +18 -62
  46. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +40 -372
  47. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +99 -33
  48. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +84 -25
  49. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
  50. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +7 -38
  51. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  52. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  53. package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
  54. package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
  55. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  56. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
  57. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
  58. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
  59. package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
  60. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
  61. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
  62. package/sdk/partner/PartnerClient.d.ts +0 -6
  63. package/sdk/partner/PartnerClient.js +0 -9
  64. package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
  65. package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
  66. package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
  67. package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
  68. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
  69. package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
  70. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  71. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  72. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
  73. package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
  74. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  75. package/sdk/partner/index.d.ts +0 -3
  76. package/sdk/partner/index.js +0 -6
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  79. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
  80. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
  81. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  82. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  83. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  87. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -406
  88. package/sdk/platform/Billing/BillingPlatformClient.js +76 -3214
  89. package/sdk/platform/Billing/BillingPlatformModel.d.ts +459 -3798
  90. package/sdk/platform/Billing/BillingPlatformModel.js +338 -2573
  91. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +24 -465
  92. package/sdk/platform/Billing/BillingPlatformValidator.js +14 -490
  93. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +205 -284
  94. package/sdk/platform/Cart/CartPlatformApplicationClient.js +554 -672
  95. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  96. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +132 -108
  97. package/sdk/platform/Cart/CartPlatformModel.d.ts +4865 -3148
  98. package/sdk/platform/Cart/CartPlatformModel.js +2071 -2854
  99. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +419 -1015
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6444
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +226 -1117
  102. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +127 -919
  103. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +574 -372
  104. package/sdk/platform/Catalog/CatalogPlatformClient.js +1315 -1238
  105. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9334 -7634
  106. package/sdk/platform/Catalog/CatalogPlatformModel.js +6980 -9652
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +239 -294
  108. package/sdk/platform/Catalog/CatalogPlatformValidator.js +186 -246
  109. package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
  110. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  111. package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
  112. package/sdk/platform/Common/CommonPlatformModel.js +11 -14
  113. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +236 -376
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +579 -868
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
  117. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
  118. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
  119. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +314 -422
  120. package/sdk/platform/Communication/CommunicationPlatformModel.js +382 -538
  121. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
  122. package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -68
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -84
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
  128. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +118 -333
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
  132. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
  134. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +565 -1282
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +369 -1034
  137. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
  138. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
  139. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -246
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1297 -776
  141. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
  142. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
  143. package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
  144. package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
  145. package/sdk/platform/Content/ContentPlatformModel.d.ts +2374 -877
  146. package/sdk/platform/Content/ContentPlatformModel.js +1304 -930
  147. package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
  148. package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
  149. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
  150. package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
  151. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
  152. package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
  153. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  154. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  155. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
  156. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
  157. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
  158. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
  159. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  160. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  161. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
  162. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
  163. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  164. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  165. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  166. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  167. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  168. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  169. package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
  170. package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
  171. package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
  172. package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
  173. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
  174. package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
  175. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
  176. package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
  177. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
  178. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
  179. package/sdk/platform/Order/OrderPlatformClient.d.ts +421 -418
  180. package/sdk/platform/Order/OrderPlatformClient.js +1194 -1350
  181. package/sdk/platform/Order/OrderPlatformModel.d.ts +9145 -4107
  182. package/sdk/platform/Order/OrderPlatformModel.js +4257 -3197
  183. package/sdk/platform/Order/OrderPlatformValidator.d.ts +641 -442
  184. package/sdk/platform/Order/OrderPlatformValidator.js +341 -311
  185. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  186. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  187. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
  188. package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
  189. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
  190. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +934 -2452
  191. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -306
  192. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -305
  193. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
  194. package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
  195. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1327 -3529
  196. package/sdk/platform/Payment/PaymentPlatformModel.js +1397 -3693
  197. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
  198. package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
  199. package/sdk/platform/PlatformClient.d.ts +0 -2
  200. package/sdk/platform/PlatformClient.js +0 -4
  201. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  202. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  203. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  204. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  205. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
  206. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -513
  209. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -103
  210. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -99
  211. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +162 -127
  212. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +775 -435
  213. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6250 -3861
  214. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3178 -3798
  215. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +295 -199
  216. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -133
  217. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
  218. package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
  219. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
  220. package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
  221. package/sdk/platform/Share/SharePlatformModel.d.ts +53 -4
  222. package/sdk/platform/Share/SharePlatformModel.js +45 -3
  223. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +4 -26
  224. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +10 -157
  225. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -21
  226. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +6 -23
  227. package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
  228. package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
  229. package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
  230. package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
  231. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
  232. package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
  233. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
  234. package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
  235. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
  236. package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
  237. package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
  238. package/sdk/platform/User/UserPlatformModel.js +253 -210
  239. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  240. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  241. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
  242. package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
  243. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  244. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  245. package/sdk/platform/index.d.ts +0 -1
  246. package/sdk/platform/index.js +0 -2
  247. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  248. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  249. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  250. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  251. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  252. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  253. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
  254. package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
  255. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
  256. package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
  257. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
  258. package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
  259. package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
  260. package/sdk/public/Content/ContentPublicClient.js +254 -280
  261. package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
  262. package/sdk/public/Content/ContentPublicModel.js +98 -44
  263. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
  264. package/sdk/public/Content/ContentPublicValidator.js +26 -19
  265. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  266. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  267. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  268. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  269. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  270. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  271. package/sdk/public/PublicClient.d.ts +2 -2
  272. package/sdk/public/PublicClient.js +2 -2
  273. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  274. package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
  275. package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
  276. package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
  277. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  278. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  279. package/sdk/public/index.d.ts +1 -1
  280. package/sdk/public/index.js +1 -1
  281. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
  282. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
  283. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
  284. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
  285. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
  286. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
  287. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
  288. package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
  289. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
  290. package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
  291. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
  292. package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
  293. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
  294. package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
  295. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
  296. package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
  297. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
  298. package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
  299. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  300. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  301. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
  302. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
  303. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  304. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  305. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
  306. package/sdk/public/Billing/BillingPublicClient.js +0 -397
  307. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
  308. package/sdk/public/Billing/BillingPublicModel.js +0 -560
  309. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
  310. package/sdk/public/Billing/BillingPublicValidator.js +0 -50
@@ -16,23 +16,23 @@ class Communication {
16
16
  }
17
17
 
18
18
  /**
19
- * @param {CommunicationPlatformApplicationValidator.CreateAppPushtokenParam} arg
19
+ * @param {CommunicationPlatformApplicationValidator.CreateAudienceParam} arg
20
20
  * - Arg object
21
21
  *
22
22
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
23
23
  * @param {import("../PlatformAPIClient").Options} - Options
24
- * @returns {Promise<CommunicationPlatformModel.PushtokenRes>} - Success response
25
- * @name createAppPushtoken
26
- * @summary: Create app push token.
27
- * @description: Create the push token of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createAppPushtoken/).
24
+ * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
25
+ * @name createAudience
26
+ * @summary: Create an audience
27
+ * @description: Creates a new email audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createAudience/).
28
28
  */
29
- async createAppPushtoken(
29
+ async createAudience(
30
30
  { body, requestHeaders } = { requestHeaders: {} },
31
31
  { responseHeaders } = { responseHeaders: false }
32
32
  ) {
33
33
  const {
34
34
  error,
35
- } = CommunicationPlatformApplicationValidator.createAppPushtoken().validate(
35
+ } = CommunicationPlatformApplicationValidator.createAudience().validate(
36
36
  {
37
37
  body,
38
38
  },
@@ -45,7 +45,7 @@ class Communication {
45
45
  // Showing warrnings if extra unknown parameters are found
46
46
  const {
47
47
  error: warrning,
48
- } = CommunicationPlatformApplicationValidator.createAppPushtoken().validate(
48
+ } = CommunicationPlatformApplicationValidator.createAudience().validate(
49
49
  {
50
50
  body,
51
51
  },
@@ -54,7 +54,7 @@ class Communication {
54
54
  if (warrning) {
55
55
  Logger({
56
56
  level: "WARN",
57
- message: `Parameter Validation warrnings for platform > Communication > createAppPushtoken \n ${warrning}`,
57
+ message: `Parameter Validation warrnings for platform > Communication > createAudience \n ${warrning}`,
58
58
  });
59
59
  }
60
60
 
@@ -63,7 +63,7 @@ class Communication {
63
63
  const response = await PlatformAPIClient.execute(
64
64
  this.config,
65
65
  "post",
66
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pn/tokens`,
66
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources`,
67
67
  query_params,
68
68
  body,
69
69
  requestHeaders,
@@ -77,7 +77,7 @@ class Communication {
77
77
 
78
78
  const {
79
79
  error: res_error,
80
- } = CommunicationPlatformModel.PushtokenRes().validate(responseData, {
80
+ } = CommunicationPlatformModel.Audience().validate(responseData, {
81
81
  abortEarly: false,
82
82
  allowUnknown: true,
83
83
  });
@@ -88,7 +88,7 @@ class Communication {
88
88
  } else {
89
89
  Logger({
90
90
  level: "WARN",
91
- message: `Response Validation Warnings for platform > Communication > createAppPushtoken \n ${res_error}`,
91
+ message: `Response Validation Warnings for platform > Communication > createAudience \n ${res_error}`,
92
92
  });
93
93
  }
94
94
  }
@@ -97,26 +97,24 @@ class Communication {
97
97
  }
98
98
 
99
99
  /**
100
- * @param {CommunicationPlatformApplicationValidator.CreateAudienceParam} arg
100
+ * @param {CommunicationPlatformApplicationValidator.CreateBigQueryHeadersParam} arg
101
101
  * - Arg object
102
102
  *
103
103
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
104
104
  * @param {import("../PlatformAPIClient").Options} - Options
105
- * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
106
- * @name createAudience
107
- * @summary: Create audience.
108
- * @description: Add audience which is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createAudience/).
105
+ * @returns {Promise<Object>} - Success response
106
+ * @name createBigQueryHeaders
107
+ * @summary: Create BigQuery headers
108
+ * @description: Create BigQuery headers - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createBigQueryHeaders/).
109
109
  */
110
- async createAudience(
111
- { body, requestHeaders } = { requestHeaders: {} },
110
+ async createBigQueryHeaders(
111
+ { requestHeaders } = { requestHeaders: {} },
112
112
  { responseHeaders } = { responseHeaders: false }
113
113
  ) {
114
114
  const {
115
115
  error,
116
- } = CommunicationPlatformApplicationValidator.createAudience().validate(
117
- {
118
- body,
119
- },
116
+ } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
117
+ {},
120
118
  { abortEarly: false, allowUnknown: true }
121
119
  );
122
120
  if (error) {
@@ -126,16 +124,14 @@ class Communication {
126
124
  // Showing warrnings if extra unknown parameters are found
127
125
  const {
128
126
  error: warrning,
129
- } = CommunicationPlatformApplicationValidator.createAudience().validate(
130
- {
131
- body,
132
- },
127
+ } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
128
+ {},
133
129
  { abortEarly: false, allowUnknown: false }
134
130
  );
135
131
  if (warrning) {
136
132
  Logger({
137
133
  level: "WARN",
138
- message: `Parameter Validation warrnings for platform > Communication > createAudience \n ${warrning}`,
134
+ message: `Parameter Validation warrnings for platform > Communication > createBigQueryHeaders \n ${warrning}`,
139
135
  });
140
136
  }
141
137
 
@@ -144,9 +140,9 @@ class Communication {
144
140
  const response = await PlatformAPIClient.execute(
145
141
  this.config,
146
142
  "post",
147
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources`,
143
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers`,
148
144
  query_params,
149
- body,
145
+ undefined,
150
146
  requestHeaders,
151
147
  { responseHeaders }
152
148
  );
@@ -156,9 +152,82 @@ class Communication {
156
152
  responseData = response[0];
157
153
  }
158
154
 
155
+ const { error: res_error } = Joi.any().validate(responseData, {
156
+ abortEarly: false,
157
+ allowUnknown: true,
158
+ });
159
+
160
+ if (res_error) {
161
+ if (this.config.options.strictResponseCheck === true) {
162
+ return Promise.reject(new FDKResponseValidationError(res_error));
163
+ } else {
164
+ Logger({
165
+ level: "WARN",
166
+ message: `Response Validation Warnings for platform > Communication > createBigQueryHeaders \n ${res_error}`,
167
+ });
168
+ }
169
+ }
170
+
171
+ return response;
172
+ }
173
+
174
+ /**
175
+ * @param {CommunicationPlatformApplicationValidator.CreateBigQueryNCountParam} arg
176
+ * - Arg object
177
+ *
178
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
179
+ * @param {import("../PlatformAPIClient").Options} - Options
180
+ * @returns {Promise<Object>} - Success response
181
+ * @name createBigQueryNCount
182
+ * @summary: Create BigQuery N-count
183
+ * @description: Creates big query n count - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createBigQueryNCount/).
184
+ */
185
+ async createBigQueryNCount(
186
+ { requestHeaders } = { requestHeaders: {} },
187
+ { responseHeaders } = { responseHeaders: false }
188
+ ) {
159
189
  const {
160
- error: res_error,
161
- } = CommunicationPlatformModel.Audience().validate(responseData, {
190
+ error,
191
+ } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
192
+ {},
193
+ { abortEarly: false, allowUnknown: true }
194
+ );
195
+ if (error) {
196
+ return Promise.reject(new FDKClientValidationError(error));
197
+ }
198
+
199
+ // Showing warrnings if extra unknown parameters are found
200
+ const {
201
+ error: warrning,
202
+ } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
203
+ {},
204
+ { abortEarly: false, allowUnknown: false }
205
+ );
206
+ if (warrning) {
207
+ Logger({
208
+ level: "WARN",
209
+ message: `Parameter Validation warrnings for platform > Communication > createBigQueryNCount \n ${warrning}`,
210
+ });
211
+ }
212
+
213
+ const query_params = {};
214
+
215
+ const response = await PlatformAPIClient.execute(
216
+ this.config,
217
+ "post",
218
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-n-records`,
219
+ query_params,
220
+ undefined,
221
+ requestHeaders,
222
+ { responseHeaders }
223
+ );
224
+
225
+ let responseData = response;
226
+ if (responseHeaders) {
227
+ responseData = response[0];
228
+ }
229
+
230
+ const { error: res_error } = Joi.any().validate(responseData, {
162
231
  abortEarly: false,
163
232
  allowUnknown: true,
164
233
  });
@@ -169,7 +238,82 @@ class Communication {
169
238
  } else {
170
239
  Logger({
171
240
  level: "WARN",
172
- message: `Response Validation Warnings for platform > Communication > createAudience \n ${res_error}`,
241
+ message: `Response Validation Warnings for platform > Communication > createBigQueryNCount \n ${res_error}`,
242
+ });
243
+ }
244
+ }
245
+
246
+ return response;
247
+ }
248
+
249
+ /**
250
+ * @param {CommunicationPlatformApplicationValidator.CreateBigQueryRowCountParam} arg
251
+ * - Arg object
252
+ *
253
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
254
+ * @param {import("../PlatformAPIClient").Options} - Options
255
+ * @returns {Promise<Object>} - Success response
256
+ * @name createBigQueryRowCount
257
+ * @summary: Create a BigQuery row count
258
+ * @description: Creates big query row count - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createBigQueryRowCount/).
259
+ */
260
+ async createBigQueryRowCount(
261
+ { requestHeaders } = { requestHeaders: {} },
262
+ { responseHeaders } = { responseHeaders: false }
263
+ ) {
264
+ const {
265
+ error,
266
+ } = CommunicationPlatformApplicationValidator.createBigQueryRowCount().validate(
267
+ {},
268
+ { abortEarly: false, allowUnknown: true }
269
+ );
270
+ if (error) {
271
+ return Promise.reject(new FDKClientValidationError(error));
272
+ }
273
+
274
+ // Showing warrnings if extra unknown parameters are found
275
+ const {
276
+ error: warrning,
277
+ } = CommunicationPlatformApplicationValidator.createBigQueryRowCount().validate(
278
+ {},
279
+ { abortEarly: false, allowUnknown: false }
280
+ );
281
+ if (warrning) {
282
+ Logger({
283
+ level: "WARN",
284
+ message: `Parameter Validation warrnings for platform > Communication > createBigQueryRowCount \n ${warrning}`,
285
+ });
286
+ }
287
+
288
+ const query_params = {};
289
+
290
+ const response = await PlatformAPIClient.execute(
291
+ this.config,
292
+ "post",
293
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-row-count`,
294
+ query_params,
295
+ undefined,
296
+ requestHeaders,
297
+ { responseHeaders }
298
+ );
299
+
300
+ let responseData = response;
301
+ if (responseHeaders) {
302
+ responseData = response[0];
303
+ }
304
+
305
+ const { error: res_error } = Joi.any().validate(responseData, {
306
+ abortEarly: false,
307
+ allowUnknown: true,
308
+ });
309
+
310
+ if (res_error) {
311
+ if (this.config.options.strictResponseCheck === true) {
312
+ return Promise.reject(new FDKResponseValidationError(res_error));
313
+ } else {
314
+ Logger({
315
+ level: "WARN",
316
+ message: `Response Validation Warnings for platform > Communication > createBigQueryRowCount \n ${res_error}`,
173
317
  });
174
318
  }
175
319
  }
@@ -185,8 +329,8 @@ class Communication {
185
329
  * @param {import("../PlatformAPIClient").Options} - Options
186
330
  * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
187
331
  * @name createCampaign
188
- * @summary: Create campaign.
189
- * @description: Add a new communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createCampaign/).
332
+ * @summary: Create a campaign
333
+ * @description: Creates a new communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createCampaign/).
190
334
  */
191
335
  async createCampaign(
192
336
  { body, requestHeaders } = { requestHeaders: {} },
@@ -266,8 +410,8 @@ class Communication {
266
410
  * @param {import("../PlatformAPIClient").Options} - Options
267
411
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
268
412
  * @name createEmailProvider
269
- * @summary: Create email provider.
270
- * @description: Generate and add a new email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEmailProvider/).
413
+ * @summary: Create an email provider
414
+ * @description: Creates a new email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEmailProvider/).
271
415
  */
272
416
  async createEmailProvider(
273
417
  { body, requestHeaders } = { requestHeaders: {} },
@@ -347,8 +491,8 @@ class Communication {
347
491
  * @param {import("../PlatformAPIClient").Options} - Options
348
492
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
349
493
  * @name createEmailTemplate
350
- * @summary: Create email template.
351
- * @description: Generate and add a new email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEmailTemplate/).
494
+ * @summary: Creat an email template
495
+ * @description: Creates a new email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEmailTemplate/).
352
496
  */
353
497
  async createEmailTemplate(
354
498
  { body, requestHeaders } = { requestHeaders: {} },
@@ -426,12 +570,12 @@ class Communication {
426
570
  *
427
571
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
428
572
  * @param {import("../PlatformAPIClient").Options} - Options
429
- * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse>}
573
+ * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult>}
430
574
  * - Success response
431
575
  *
432
576
  * @name createEventSubscriptions
433
- * @summary: Create event subscriptions
434
- * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/).
577
+ * @summary: Create an event subscription
578
+ * @description: Creates a new event subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/).
435
579
  */
436
580
  async createEventSubscriptions(
437
581
  { body, requestHeaders } = { requestHeaders: {} },
@@ -484,7 +628,7 @@ class Communication {
484
628
 
485
629
  const {
486
630
  error: res_error,
487
- } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate(
631
+ } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate(
488
632
  responseData,
489
633
  { abortEarly: false, allowUnknown: true }
490
634
  );
@@ -510,13 +654,13 @@ class Communication {
510
654
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
511
655
  * @param {import("../PlatformAPIClient").Options} - Options
512
656
  * @returns {Promise<
513
- * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[]
657
+ * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult[]
514
658
  * >}
515
659
  * - Success response
516
660
  *
517
661
  * @name createEventSubscriptionsByBulk
518
- * @summary: Create event subscriptions by bulk
519
- * @description: Create event subscriptions by bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptionsByBulk/).
662
+ * @summary: Create event subscriptions in bulk
663
+ * @description: Creates a new event subscription in bulk. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptionsByBulk/).
520
664
  */
521
665
  async createEventSubscriptionsByBulk(
522
666
  { body, requestHeaders } = { requestHeaders: {} },
@@ -568,7 +712,7 @@ class Communication {
568
712
  }
569
713
 
570
714
  const { error: res_error } = Joi.array()
571
- .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse())
715
+ .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult())
572
716
  .validate(responseData, { abortEarly: false, allowUnknown: true });
573
717
 
574
718
  if (res_error) {
@@ -591,8 +735,8 @@ class Communication {
591
735
  * @param {import("../PlatformAPIClient").Options} - Options
592
736
  * @returns {Promise<CommunicationPlatformModel.CreateJobsRes>} - Success response
593
737
  * @name createJobs
594
- * @summary: Create jobs
595
- * @description: Create jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createJobs/).
738
+ * @summary: Create a campaign jobs
739
+ * @description: Creates a new campaign job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createJobs/).
596
740
  */
597
741
  async createJobs(
598
742
  { body, requestHeaders } = { requestHeaders: {} },
@@ -670,10 +814,10 @@ class Communication {
670
814
  *
671
815
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
672
816
  * @param {import("../PlatformAPIClient").Options} - Options
673
- * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
817
+ * @returns {Promise<Object>} - Success response
674
818
  * @name createSmsProvider
675
- * @summary: Create SMS provider.
676
- * @description: Add a new SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createSmsProvider/).
819
+ * @summary: Create SMS provider
820
+ * @description: Creates a new SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createSmsProvider/).
677
821
  */
678
822
  async createSmsProvider(
679
823
  { body, requestHeaders } = { requestHeaders: {} },
@@ -724,9 +868,7 @@ class Communication {
724
868
  responseData = response[0];
725
869
  }
726
870
 
727
- const {
728
- error: res_error,
729
- } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
871
+ const { error: res_error } = Joi.any().validate(responseData, {
730
872
  abortEarly: false,
731
873
  allowUnknown: true,
732
874
  });
@@ -753,8 +895,8 @@ class Communication {
753
895
  * @param {import("../PlatformAPIClient").Options} - Options
754
896
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
755
897
  * @name createSmsTemplate
756
- * @summary: Create SMS template.
757
- * @description: Add a new SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createSmsTemplate/).
898
+ * @summary: Create a SMS template
899
+ * @description: Creates a new SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createSmsTemplate/).
758
900
  */
759
901
  async createSmsTemplate(
760
902
  { body, requestHeaders } = { requestHeaders: {} },
@@ -832,10 +974,10 @@ class Communication {
832
974
  *
833
975
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
834
976
  * @param {import("../PlatformAPIClient").Options} - Options
835
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
977
+ * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
836
978
  * @name deleteAudienceById
837
- * @summary: Delete audience by ID.
838
- * @description: Remove a specific custom communication audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteAudienceById/).
979
+ * @summary: Delete an audience
980
+ * @description: Remove a specific audience permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteAudienceById/).
839
981
  */
840
982
  async deleteAudienceById(
841
983
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -890,7 +1032,7 @@ class Communication {
890
1032
 
891
1033
  const {
892
1034
  error: res_error,
893
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1035
+ } = CommunicationPlatformModel.Audience().validate(responseData, {
894
1036
  abortEarly: false,
895
1037
  allowUnknown: true,
896
1038
  });
@@ -909,97 +1051,16 @@ class Communication {
909
1051
  return response;
910
1052
  }
911
1053
 
912
- /**
913
- * @param {CommunicationPlatformApplicationValidator.DeleteCampaignByIdParam} arg
914
- * - Arg object
915
- *
916
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
917
- * @param {import("../PlatformAPIClient").Options} - Options
918
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
919
- * @name deleteCampaignById
920
- * @summary: Update campaign by ID.
921
- * @description: Modify the settings of a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteCampaignById/).
922
- */
923
- async deleteCampaignById(
924
- { id, requestHeaders } = { requestHeaders: {} },
925
- { responseHeaders } = { responseHeaders: false }
926
- ) {
927
- const {
928
- error,
929
- } = CommunicationPlatformApplicationValidator.deleteCampaignById().validate(
930
- {
931
- id,
932
- },
933
- { abortEarly: false, allowUnknown: true }
934
- );
935
- if (error) {
936
- return Promise.reject(new FDKClientValidationError(error));
937
- }
938
-
939
- // Showing warrnings if extra unknown parameters are found
940
- const {
941
- error: warrning,
942
- } = CommunicationPlatformApplicationValidator.deleteCampaignById().validate(
943
- {
944
- id,
945
- },
946
- { abortEarly: false, allowUnknown: false }
947
- );
948
- if (warrning) {
949
- Logger({
950
- level: "WARN",
951
- message: `Parameter Validation warrnings for platform > Communication > deleteCampaignById \n ${warrning}`,
952
- });
953
- }
954
-
955
- const query_params = {};
956
-
957
- const response = await PlatformAPIClient.execute(
958
- this.config,
959
- "delete",
960
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns/${id}`,
961
- query_params,
962
- undefined,
963
- requestHeaders,
964
- { responseHeaders }
965
- );
966
-
967
- let responseData = response;
968
- if (responseHeaders) {
969
- responseData = response[0];
970
- }
971
-
972
- const {
973
- error: res_error,
974
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
975
- abortEarly: false,
976
- allowUnknown: true,
977
- });
978
-
979
- if (res_error) {
980
- if (this.config.options.strictResponseCheck === true) {
981
- return Promise.reject(new FDKResponseValidationError(res_error));
982
- } else {
983
- Logger({
984
- level: "WARN",
985
- message: `Response Validation Warnings for platform > Communication > deleteCampaignById \n ${res_error}`,
986
- });
987
- }
988
- }
989
-
990
- return response;
991
- }
992
-
993
1054
  /**
994
1055
  * @param {CommunicationPlatformApplicationValidator.DeleteEmailProviderByIdParam} arg
995
1056
  * - Arg object
996
1057
  *
997
1058
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
998
1059
  * @param {import("../PlatformAPIClient").Options} - Options
999
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1060
+ * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1000
1061
  * @name deleteEmailProviderById
1001
- * @summary: Delete email provider by ID.
1002
- * @description: Remove a specific email communication provider from the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEmailProviderById/).
1062
+ * @summary: Delete an email provider
1063
+ * @description: Removes a specific email communication provider from the platform permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEmailProviderById/).
1003
1064
  */
1004
1065
  async deleteEmailProviderById(
1005
1066
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1052,7 +1113,7 @@ class Communication {
1052
1113
 
1053
1114
  const {
1054
1115
  error: res_error,
1055
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1116
+ } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1056
1117
  abortEarly: false,
1057
1118
  allowUnknown: true,
1058
1119
  });
@@ -1077,10 +1138,10 @@ class Communication {
1077
1138
  *
1078
1139
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1079
1140
  * @param {import("../PlatformAPIClient").Options} - Options
1080
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1141
+ * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1081
1142
  * @name deleteEmailTemplateById
1082
- * @summary: Delete email template by ID.
1083
- * @description: Email templates are predefined formats linked to various events for delivering messages to users. Remove a specific email communication template by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEmailTemplateById/).
1143
+ * @summary: Delete an email template
1144
+ * @description: Removes a specific email communication template from the platform permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEmailTemplateById/).
1084
1145
  */
1085
1146
  async deleteEmailTemplateById(
1086
1147
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1133,7 +1194,7 @@ class Communication {
1133
1194
 
1134
1195
  const {
1135
1196
  error: res_error,
1136
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1197
+ } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1137
1198
  abortEarly: false,
1138
1199
  allowUnknown: true,
1139
1200
  });
@@ -1158,10 +1219,10 @@ class Communication {
1158
1219
  *
1159
1220
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1160
1221
  * @param {import("../PlatformAPIClient").Options} - Options
1161
- * @returns {Promise<CommunicationPlatformModel.EventSubscription>} - Success response
1222
+ * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1162
1223
  * @name deleteEventSubscriptionsById
1163
- * @summary: Create event subscriptions
1164
- * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEventSubscriptionsById/).
1224
+ * @summary: Delete an event subscriptions
1225
+ * @description: Removes a specific event subscription from the platform permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEventSubscriptionsById/).
1165
1226
  */
1166
1227
  async deleteEventSubscriptionsById(
1167
1228
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1214,7 +1275,7 @@ class Communication {
1214
1275
 
1215
1276
  const {
1216
1277
  error: res_error,
1217
- } = CommunicationPlatformModel.EventSubscription().validate(responseData, {
1278
+ } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1218
1279
  abortEarly: false,
1219
1280
  allowUnknown: true,
1220
1281
  });
@@ -1239,10 +1300,10 @@ class Communication {
1239
1300
  *
1240
1301
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1241
1302
  * @param {import("../PlatformAPIClient").Options} - Options
1242
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1303
+ * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1243
1304
  * @name deleteSmsProviderById
1244
- * @summary: Delete SMS provider by ID.
1245
- * @description: Remove a specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteSmsProviderById/).
1305
+ * @summary: Delete an SMS provider
1306
+ * @description: Removes a specific SMS communication provider from the platform permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteSmsProviderById/).
1246
1307
  */
1247
1308
  async deleteSmsProviderById(
1248
1309
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1295,7 +1356,7 @@ class Communication {
1295
1356
 
1296
1357
  const {
1297
1358
  error: res_error,
1298
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1359
+ } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1299
1360
  abortEarly: false,
1300
1361
  allowUnknown: true,
1301
1362
  });
@@ -1320,10 +1381,10 @@ class Communication {
1320
1381
  *
1321
1382
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1322
1383
  * @param {import("../PlatformAPIClient").Options} - Options
1323
- * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1384
+ * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1324
1385
  * @name deleteSmsTemplateById
1325
- * @summary: Delete SMS template by ID.
1326
- * @description: Remove a specific SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteSmsTemplateById/).
1386
+ * @summary: Delete an SMS template
1387
+ * @description: Removes a specific SMS communication template from the platform permenantly. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteSmsTemplateById/).
1327
1388
  */
1328
1389
  async deleteSmsTemplateById(
1329
1390
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1376,7 +1437,7 @@ class Communication {
1376
1437
 
1377
1438
  const {
1378
1439
  error: res_error,
1379
- } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1440
+ } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1380
1441
  abortEarly: false,
1381
1442
  allowUnknown: true,
1382
1443
  });
@@ -1401,12 +1462,12 @@ class Communication {
1401
1462
  *
1402
1463
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1403
1464
  * @param {import("../PlatformAPIClient").Options} - Options
1404
- * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse>}
1465
+ * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult>}
1405
1466
  * - Success response
1406
1467
  *
1407
1468
  * @name editEventSubscriptions
1408
- * @summary: Create event subscriptions
1409
- * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/).
1469
+ * @summary: Update an event subscriptions
1470
+ * @description: Modifys the configuration and settings of a specific event subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/).
1410
1471
  */
1411
1472
  async editEventSubscriptions(
1412
1473
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -1461,7 +1522,7 @@ class Communication {
1461
1522
 
1462
1523
  const {
1463
1524
  error: res_error,
1464
- } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate(
1525
+ } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate(
1465
1526
  responseData,
1466
1527
  { abortEarly: false, allowUnknown: true }
1467
1528
  );
@@ -1488,8 +1549,8 @@ class Communication {
1488
1549
  * @param {import("../PlatformAPIClient").Options} - Options
1489
1550
  * @returns {Promise<CommunicationPlatformModel.AppProvider>} - Success response
1490
1551
  * @name getAppProviders
1491
- * @summary: Get application providers.
1492
- * @description: Retrieve a list of providers associated with the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAppProviders/).
1552
+ * @summary: Get application providers
1553
+ * @description: Retrieve a list of providers associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAppProviders/).
1493
1554
  */
1494
1555
  async getAppProviders(
1495
1556
  { requestHeaders } = { requestHeaders: {} },
@@ -1565,8 +1626,8 @@ class Communication {
1565
1626
  * @param {import("../PlatformAPIClient").Options} - Options
1566
1627
  * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
1567
1628
  * @name getAudienceById
1568
- * @summary: Get audience by ID.
1569
- * @description: Retrieve detailed information about a specific custom communication audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudienceById/).
1629
+ * @summary: Get an audience
1630
+ * @description: Retrieves detailed information about an specific audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudienceById/).
1570
1631
  */
1571
1632
  async getAudienceById(
1572
1633
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1646,8 +1707,8 @@ class Communication {
1646
1707
  * @param {import("../PlatformAPIClient").Options} - Options
1647
1708
  * @returns {Promise<CommunicationPlatformModel.Audiences>} - Success response
1648
1709
  * @name getAudiences
1649
- * @summary: Get audiences.
1650
- * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudiences/).
1710
+ * @summary: Get all the audiences
1711
+ * @description: Retrieves a list of all the audiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudiences/).
1651
1712
  */
1652
1713
  async getAudiences(
1653
1714
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -1730,64 +1791,102 @@ class Communication {
1730
1791
  }
1731
1792
 
1732
1793
  /**
1733
- * @param {Object} arg - Arg object.
1734
- * @param {string} arg.companyId - Company id
1735
- * @param {string} arg.applicationId - Application id
1736
- * @param {number} [arg.pageSize] - Current request items count
1737
- * @param {string} [arg.sort] - To sort based on created_at
1738
- * @param {string} [arg.query] - To search based on plain text
1739
- * @returns {Paginator<CommunicationPlatformModel.Audiences>}
1740
- * @summary: Get audiences.
1741
- * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign.
1794
+ * @param {CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam} arg
1795
+ * - Arg object
1796
+ *
1797
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1798
+ * @param {import("../PlatformAPIClient").Options} - Options
1799
+ * @returns {Promise<Object>} - Success response
1800
+ * @name getBigQueryHeadersById
1801
+ * @summary: Get BigQuery headers
1802
+ * @description: Retrieves header information from BigQuery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getBigQueryHeadersById/).
1742
1803
  */
1743
- getAudiencesPaginator({
1744
- companyId,
1745
- applicationId,
1746
- pageSize,
1747
- sort,
1748
- query,
1749
- } = {}) {
1750
- const paginator = new Paginator();
1751
- const callback = async () => {
1752
- const pageId = paginator.nextId;
1753
- const pageNo = paginator.pageNo;
1754
- const pageType = "number";
1755
- const data = await this.getAudiences({
1756
- companyId: companyId,
1757
- applicationId: applicationId,
1758
- pageNo: pageNo,
1759
- pageSize: pageSize,
1760
- sort: sort,
1761
- query: query,
1762
- });
1763
- paginator.setPaginator({
1764
- hasNext: data.page.has_next ? true : false,
1765
- nextId: data.page.next_id,
1804
+ async getBigQueryHeadersById(
1805
+ { id, requestHeaders } = { requestHeaders: {} },
1806
+ { responseHeaders } = { responseHeaders: false }
1807
+ ) {
1808
+ const {
1809
+ error,
1810
+ } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1811
+ {
1812
+ id,
1813
+ },
1814
+ { abortEarly: false, allowUnknown: true }
1815
+ );
1816
+ if (error) {
1817
+ return Promise.reject(new FDKClientValidationError(error));
1818
+ }
1819
+
1820
+ // Showing warrnings if extra unknown parameters are found
1821
+ const {
1822
+ error: warrning,
1823
+ } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1824
+ {
1825
+ id,
1826
+ },
1827
+ { abortEarly: false, allowUnknown: false }
1828
+ );
1829
+ if (warrning) {
1830
+ Logger({
1831
+ level: "WARN",
1832
+ message: `Parameter Validation warrnings for platform > Communication > getBigQueryHeadersById \n ${warrning}`,
1766
1833
  });
1767
- return data;
1768
- };
1769
- paginator.setCallback(callback.bind(this));
1770
- return paginator;
1834
+ }
1835
+
1836
+ const query_params = {};
1837
+
1838
+ const response = await PlatformAPIClient.execute(
1839
+ this.config,
1840
+ "get",
1841
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers/${id}`,
1842
+ query_params,
1843
+ undefined,
1844
+ requestHeaders,
1845
+ { responseHeaders }
1846
+ );
1847
+
1848
+ let responseData = response;
1849
+ if (responseHeaders) {
1850
+ responseData = response[0];
1851
+ }
1852
+
1853
+ const { error: res_error } = Joi.any().validate(responseData, {
1854
+ abortEarly: false,
1855
+ allowUnknown: true,
1856
+ });
1857
+
1858
+ if (res_error) {
1859
+ if (this.config.options.strictResponseCheck === true) {
1860
+ return Promise.reject(new FDKResponseValidationError(res_error));
1861
+ } else {
1862
+ Logger({
1863
+ level: "WARN",
1864
+ message: `Response Validation Warnings for platform > Communication > getBigQueryHeadersById \n ${res_error}`,
1865
+ });
1866
+ }
1867
+ }
1868
+
1869
+ return response;
1771
1870
  }
1772
1871
 
1773
1872
  /**
1774
- * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
1873
+ * @param {CommunicationPlatformApplicationValidator.GetBigQueryRowCountByIdParam} arg
1775
1874
  * - Arg object
1776
1875
  *
1777
1876
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1778
1877
  * @param {import("../PlatformAPIClient").Options} - Options
1779
- * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
1780
- * @name getCampaignById
1781
- * @summary: Get campaign by ID.
1782
- * @description: Retrieve detailed information about a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaignById/).
1878
+ * @returns {Promise<Object>} - Success response
1879
+ * @name getBigQueryRowCountById
1880
+ * @summary: Get BigQuery row count
1881
+ * @description: Retrieves big query row count by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getBigQueryRowCountById/).
1783
1882
  */
1784
- async getCampaignById(
1883
+ async getBigQueryRowCountById(
1785
1884
  { id, requestHeaders } = { requestHeaders: {} },
1786
1885
  { responseHeaders } = { responseHeaders: false }
1787
1886
  ) {
1788
1887
  const {
1789
1888
  error,
1790
- } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1889
+ } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1791
1890
  {
1792
1891
  id,
1793
1892
  },
@@ -1800,7 +1899,7 @@ class Communication {
1800
1899
  // Showing warrnings if extra unknown parameters are found
1801
1900
  const {
1802
1901
  error: warrning,
1803
- } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1902
+ } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1804
1903
  {
1805
1904
  id,
1806
1905
  },
@@ -1809,7 +1908,7 @@ class Communication {
1809
1908
  if (warrning) {
1810
1909
  Logger({
1811
1910
  level: "WARN",
1812
- message: `Parameter Validation warrnings for platform > Communication > getCampaignById \n ${warrning}`,
1911
+ message: `Parameter Validation warrnings for platform > Communication > getBigQueryRowCountById \n ${warrning}`,
1813
1912
  });
1814
1913
  }
1815
1914
 
@@ -1818,7 +1917,7 @@ class Communication {
1818
1917
  const response = await PlatformAPIClient.execute(
1819
1918
  this.config,
1820
1919
  "get",
1821
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns/${id}`,
1920
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-row-count/${id}`,
1822
1921
  query_params,
1823
1922
  undefined,
1824
1923
  requestHeaders,
@@ -1830,9 +1929,7 @@ class Communication {
1830
1929
  responseData = response[0];
1831
1930
  }
1832
1931
 
1833
- const {
1834
- error: res_error,
1835
- } = CommunicationPlatformModel.Campaign().validate(responseData, {
1932
+ const { error: res_error } = Joi.any().validate(responseData, {
1836
1933
  abortEarly: false,
1837
1934
  allowUnknown: true,
1838
1935
  });
@@ -1843,7 +1940,7 @@ class Communication {
1843
1940
  } else {
1844
1941
  Logger({
1845
1942
  level: "WARN",
1846
- message: `Response Validation Warnings for platform > Communication > getCampaignById \n ${res_error}`,
1943
+ message: `Response Validation Warnings for platform > Communication > getBigQueryRowCountById \n ${res_error}`,
1847
1944
  });
1848
1945
  }
1849
1946
  }
@@ -1852,28 +1949,25 @@ class Communication {
1852
1949
  }
1853
1950
 
1854
1951
  /**
1855
- * @param {CommunicationPlatformApplicationValidator.GetCampaignsParam} arg
1952
+ * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
1856
1953
  * - Arg object
1857
1954
  *
1858
1955
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1859
1956
  * @param {import("../PlatformAPIClient").Options} - Options
1860
- * @returns {Promise<CommunicationPlatformModel.Campaigns>} - Success response
1861
- * @name getCampaigns
1862
- * @summary: Get campaigns.
1863
- * @description: Retrieve a list of communication campaigns. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaigns/).
1957
+ * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
1958
+ * @name getCampaignById
1959
+ * @summary: Get a campaign
1960
+ * @description: Retrieves detailed information about a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaignById/).
1864
1961
  */
1865
- async getCampaigns(
1866
- { query, pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} },
1962
+ async getCampaignById(
1963
+ { id, requestHeaders } = { requestHeaders: {} },
1867
1964
  { responseHeaders } = { responseHeaders: false }
1868
1965
  ) {
1869
1966
  const {
1870
1967
  error,
1871
- } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1968
+ } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1872
1969
  {
1873
- query,
1874
- pageNo,
1875
- pageSize,
1876
- sort,
1970
+ id,
1877
1971
  },
1878
1972
  { abortEarly: false, allowUnknown: true }
1879
1973
  );
@@ -1884,32 +1978,25 @@ class Communication {
1884
1978
  // Showing warrnings if extra unknown parameters are found
1885
1979
  const {
1886
1980
  error: warrning,
1887
- } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1981
+ } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1888
1982
  {
1889
- query,
1890
- pageNo,
1891
- pageSize,
1892
- sort,
1983
+ id,
1893
1984
  },
1894
1985
  { abortEarly: false, allowUnknown: false }
1895
1986
  );
1896
1987
  if (warrning) {
1897
1988
  Logger({
1898
1989
  level: "WARN",
1899
- message: `Parameter Validation warrnings for platform > Communication > getCampaigns \n ${warrning}`,
1990
+ message: `Parameter Validation warrnings for platform > Communication > getCampaignById \n ${warrning}`,
1900
1991
  });
1901
1992
  }
1902
1993
 
1903
1994
  const query_params = {};
1904
- query_params["query"] = query;
1905
- query_params["page_no"] = pageNo;
1906
- query_params["page_size"] = pageSize;
1907
- query_params["sort"] = sort;
1908
1995
 
1909
1996
  const response = await PlatformAPIClient.execute(
1910
1997
  this.config,
1911
1998
  "get",
1912
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns`,
1999
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns/${id}`,
1913
2000
  query_params,
1914
2001
  undefined,
1915
2002
  requestHeaders,
@@ -1923,7 +2010,7 @@ class Communication {
1923
2010
 
1924
2011
  const {
1925
2012
  error: res_error,
1926
- } = CommunicationPlatformModel.Campaigns().validate(responseData, {
2013
+ } = CommunicationPlatformModel.Campaign().validate(responseData, {
1927
2014
  abortEarly: false,
1928
2015
  allowUnknown: true,
1929
2016
  });
@@ -1934,7 +2021,7 @@ class Communication {
1934
2021
  } else {
1935
2022
  Logger({
1936
2023
  level: "WARN",
1937
- message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`,
2024
+ message: `Response Validation Warnings for platform > Communication > getCampaignById \n ${res_error}`,
1938
2025
  });
1939
2026
  }
1940
2027
  }
@@ -1943,28 +2030,28 @@ class Communication {
1943
2030
  }
1944
2031
 
1945
2032
  /**
1946
- * @param {CommunicationPlatformApplicationValidator.GetCommunicationLogsParam} arg
2033
+ * @param {CommunicationPlatformApplicationValidator.GetCampaignsParam} arg
1947
2034
  * - Arg object
1948
2035
  *
1949
2036
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1950
2037
  * @param {import("../PlatformAPIClient").Options} - Options
1951
- * @returns {Promise<CommunicationPlatformModel.Logs>} - Success response
1952
- * @name getCommunicationLogs
1953
- * @summary: Get communication logs.
1954
- * @description: Retrieve logs and records of communication activities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCommunicationLogs/).
2038
+ * @returns {Promise<CommunicationPlatformModel.Campaigns>} - Success response
2039
+ * @name getCampaigns
2040
+ * @summary: Get all campaigns
2041
+ * @description: Retrieves a list of communication campaigns. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaigns/).
1955
2042
  */
1956
- async getCommunicationLogs(
1957
- { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
2043
+ async getCampaigns(
2044
+ { query, pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} },
1958
2045
  { responseHeaders } = { responseHeaders: false }
1959
2046
  ) {
1960
2047
  const {
1961
2048
  error,
1962
- } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2049
+ } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1963
2050
  {
2051
+ query,
1964
2052
  pageNo,
1965
2053
  pageSize,
1966
2054
  sort,
1967
- query,
1968
2055
  },
1969
2056
  { abortEarly: false, allowUnknown: true }
1970
2057
  );
@@ -1975,32 +2062,32 @@ class Communication {
1975
2062
  // Showing warrnings if extra unknown parameters are found
1976
2063
  const {
1977
2064
  error: warrning,
1978
- } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2065
+ } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1979
2066
  {
2067
+ query,
1980
2068
  pageNo,
1981
2069
  pageSize,
1982
2070
  sort,
1983
- query,
1984
2071
  },
1985
2072
  { abortEarly: false, allowUnknown: false }
1986
2073
  );
1987
2074
  if (warrning) {
1988
2075
  Logger({
1989
2076
  level: "WARN",
1990
- message: `Parameter Validation warrnings for platform > Communication > getCommunicationLogs \n ${warrning}`,
2077
+ message: `Parameter Validation warrnings for platform > Communication > getCampaigns \n ${warrning}`,
1991
2078
  });
1992
2079
  }
1993
2080
 
1994
2081
  const query_params = {};
2082
+ query_params["query"] = query;
1995
2083
  query_params["page_no"] = pageNo;
1996
2084
  query_params["page_size"] = pageSize;
1997
2085
  query_params["sort"] = sort;
1998
- query_params["query"] = query;
1999
2086
 
2000
2087
  const response = await PlatformAPIClient.execute(
2001
2088
  this.config,
2002
2089
  "get",
2003
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/log`,
2090
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns`,
2004
2091
  query_params,
2005
2092
  undefined,
2006
2093
  requestHeaders,
@@ -2014,7 +2101,7 @@ class Communication {
2014
2101
 
2015
2102
  const {
2016
2103
  error: res_error,
2017
- } = CommunicationPlatformModel.Logs().validate(responseData, {
2104
+ } = CommunicationPlatformModel.Campaigns().validate(responseData, {
2018
2105
  abortEarly: false,
2019
2106
  allowUnknown: true,
2020
2107
  });
@@ -2025,7 +2112,7 @@ class Communication {
2025
2112
  } else {
2026
2113
  Logger({
2027
2114
  level: "WARN",
2028
- message: `Response Validation Warnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
2115
+ message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`,
2029
2116
  });
2030
2117
  }
2031
2118
  }
@@ -2034,66 +2121,29 @@ class Communication {
2034
2121
  }
2035
2122
 
2036
2123
  /**
2037
- * @param {Object} arg - Arg object.
2038
- * @param {string} arg.companyId - Company id
2039
- * @param {string} arg.applicationId - Application id
2040
- * @param {number} [arg.pageSize] - Current request items count
2041
- * @param {string} [arg.sort] - To sort based on created_at
2042
- * @param {Object} [arg.query] -
2043
- * @returns {Paginator<CommunicationPlatformModel.Logs>}
2044
- * @summary: Get communication logs.
2045
- * @description: Retrieve logs and records of communication activities.
2046
- */
2047
- getCommunicationLogsPaginator({
2048
- companyId,
2049
- applicationId,
2050
- pageSize,
2051
- sort,
2052
- query,
2053
- } = {}) {
2054
- const paginator = new Paginator();
2055
- const callback = async () => {
2056
- const pageId = paginator.nextId;
2057
- const pageNo = paginator.pageNo;
2058
- const pageType = "number";
2059
- const data = await this.getCommunicationLogs({
2060
- companyId: companyId,
2061
- applicationId: applicationId,
2062
- pageNo: pageNo,
2063
- pageSize: pageSize,
2064
- sort: sort,
2065
- query: query,
2066
- });
2067
- paginator.setPaginator({
2068
- hasNext: data.page.has_next ? true : false,
2069
- nextId: data.page.next_id,
2070
- });
2071
- return data;
2072
- };
2073
- paginator.setCallback(callback.bind(this));
2074
- return paginator;
2075
- }
2076
-
2077
- /**
2078
- * @param {CommunicationPlatformApplicationValidator.GetDefaultEmailProvidersParam} arg
2124
+ * @param {CommunicationPlatformApplicationValidator.GetCommunicationLogsParam} arg
2079
2125
  * - Arg object
2080
2126
  *
2081
2127
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2082
2128
  * @param {import("../PlatformAPIClient").Options} - Options
2083
- * @returns {Promise<CommunicationPlatformModel.DefaultEmailProviders[]>} -
2084
- * Success response
2085
- * @name getDefaultEmailProviders
2086
- * @summary: Get app providers.
2087
- * @description: Retrieve a list of app providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDefaultEmailProviders/).
2129
+ * @returns {Promise<CommunicationPlatformModel.Logs>} - Success response
2130
+ * @name getCommunicationLogs
2131
+ * @summary: Get communication reports
2132
+ * @description: Retrieve a lsit of logs and records of communication activities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCommunicationLogs/).
2088
2133
  */
2089
- async getDefaultEmailProviders(
2090
- { requestHeaders } = { requestHeaders: {} },
2134
+ async getCommunicationLogs(
2135
+ { pageId, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
2091
2136
  { responseHeaders } = { responseHeaders: false }
2092
2137
  ) {
2093
2138
  const {
2094
2139
  error,
2095
- } = CommunicationPlatformApplicationValidator.getDefaultEmailProviders().validate(
2096
- {},
2140
+ } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2141
+ {
2142
+ pageId,
2143
+ pageSize,
2144
+ sort,
2145
+ query,
2146
+ },
2097
2147
  { abortEarly: false, allowUnknown: true }
2098
2148
  );
2099
2149
  if (error) {
@@ -2103,23 +2153,32 @@ class Communication {
2103
2153
  // Showing warrnings if extra unknown parameters are found
2104
2154
  const {
2105
2155
  error: warrning,
2106
- } = CommunicationPlatformApplicationValidator.getDefaultEmailProviders().validate(
2107
- {},
2156
+ } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2157
+ {
2158
+ pageId,
2159
+ pageSize,
2160
+ sort,
2161
+ query,
2162
+ },
2108
2163
  { abortEarly: false, allowUnknown: false }
2109
2164
  );
2110
2165
  if (warrning) {
2111
2166
  Logger({
2112
2167
  level: "WARN",
2113
- message: `Parameter Validation warrnings for platform > Communication > getDefaultEmailProviders \n ${warrning}`,
2168
+ message: `Parameter Validation warrnings for platform > Communication > getCommunicationLogs \n ${warrning}`,
2114
2169
  });
2115
2170
  }
2116
2171
 
2117
2172
  const query_params = {};
2173
+ query_params["page_id"] = pageId;
2174
+ query_params["page_size"] = pageSize;
2175
+ query_params["sort"] = sort;
2176
+ query_params["query"] = query;
2118
2177
 
2119
2178
  const response = await PlatformAPIClient.execute(
2120
2179
  this.config,
2121
2180
  "get",
2122
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/default-providers`,
2181
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/log`,
2123
2182
  query_params,
2124
2183
  undefined,
2125
2184
  requestHeaders,
@@ -2131,9 +2190,12 @@ class Communication {
2131
2190
  responseData = response[0];
2132
2191
  }
2133
2192
 
2134
- const { error: res_error } = Joi.array()
2135
- .items(CommunicationPlatformModel.DefaultEmailProviders())
2136
- .validate(responseData, { abortEarly: false, allowUnknown: true });
2193
+ const {
2194
+ error: res_error,
2195
+ } = CommunicationPlatformModel.Logs().validate(responseData, {
2196
+ abortEarly: false,
2197
+ allowUnknown: true,
2198
+ });
2137
2199
 
2138
2200
  if (res_error) {
2139
2201
  if (this.config.options.strictResponseCheck === true) {
@@ -2141,7 +2203,7 @@ class Communication {
2141
2203
  } else {
2142
2204
  Logger({
2143
2205
  level: "WARN",
2144
- message: `Response Validation Warnings for platform > Communication > getDefaultEmailProviders \n ${res_error}`,
2206
+ message: `Response Validation Warnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
2145
2207
  });
2146
2208
  }
2147
2209
  }
@@ -2158,8 +2220,8 @@ class Communication {
2158
2220
  * @returns {Promise<CommunicationPlatformModel.DefaultSmsProviders[]>} -
2159
2221
  * Success response
2160
2222
  * @name getDefaultSmsProviders
2161
- * @summary: Get default SMS providers.
2162
- * @description: Retrieve the default SMS communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDefaultSmsProviders/).
2223
+ * @summary: Get all default SMS providers
2224
+ * @description: Retrieve all the default SMS communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDefaultSmsProviders/).
2163
2225
  */
2164
2226
  async getDefaultSmsProviders(
2165
2227
  { requestHeaders } = { requestHeaders: {} },
@@ -2233,8 +2295,8 @@ class Communication {
2233
2295
  * @returns {Promise<CommunicationPlatformModel.DummyDatasources[]>} -
2234
2296
  * Success response
2235
2297
  * @name getDummyDatasources
2236
- * @summary: Get dummy data sources.
2237
- * @description: Retrieve a list of dummy data sources for testing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDummyDatasources/).
2298
+ * @summary: Get dummy data sources
2299
+ * @description: Retrieve a list of dummy data sources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDummyDatasources/).
2238
2300
  */
2239
2301
  async getDummyDatasources(
2240
2302
  { requestHeaders } = { requestHeaders: {} },
@@ -2269,7 +2331,7 @@ class Communication {
2269
2331
  const response = await PlatformAPIClient.execute(
2270
2332
  this.config,
2271
2333
  "get",
2272
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasource/dummy-data-sources`,
2334
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources/dummy-data-sources`,
2273
2335
  query_params,
2274
2336
  undefined,
2275
2337
  requestHeaders,
@@ -2308,7 +2370,7 @@ class Communication {
2308
2370
  * @returns {Promise<CommunicationPlatformModel.DummyDatasourcesMeta>} -
2309
2371
  * Success response
2310
2372
  * @name getDummyDatasourcesMeta
2311
- * @summary: Get dummy data sources metadata.
2373
+ * @summary: Get dummy data sources metadata
2312
2374
  * @description: Retrieve metadata information about dummy data sources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDummyDatasourcesMeta/).
2313
2375
  */
2314
2376
  async getDummyDatasourcesMeta(
@@ -2344,12 +2406,11 @@ class Communication {
2344
2406
  }
2345
2407
 
2346
2408
  const query_params = {};
2347
- query_params["id"] = id;
2348
2409
 
2349
2410
  const response = await PlatformAPIClient.execute(
2350
2411
  this.config,
2351
2412
  "get",
2352
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasource/dummy-data-source-meta`,
2413
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources/dummy-data-sources-meta/${id}`,
2353
2414
  query_params,
2354
2415
  undefined,
2355
2416
  requestHeaders,
@@ -2390,8 +2451,8 @@ class Communication {
2390
2451
  * @param {import("../PlatformAPIClient").Options} - Options
2391
2452
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
2392
2453
  * @name getEmailProviderById
2393
- * @summary: Get email provider by ID.
2394
- * @description: Retrieve detailed information about a specific email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviderById/).
2454
+ * @summary: Get a email provider
2455
+ * @description: Retrieves detailed information about a specific email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviderById/).
2395
2456
  */
2396
2457
  async getEmailProviderById(
2397
2458
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2471,8 +2532,8 @@ class Communication {
2471
2532
  * @param {import("../PlatformAPIClient").Options} - Options
2472
2533
  * @returns {Promise<CommunicationPlatformModel.EmailProviders>} - Success response
2473
2534
  * @name getEmailProviders
2474
- * @summary: Get email providers.
2475
- * @description: Retrieve a list of email communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviders/).
2535
+ * @summary: Get all email providers
2536
+ * @description: Retrieves a list of all email communication providers associated with the sales channel.. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviders/).
2476
2537
  */
2477
2538
  async getEmailProviders(
2478
2539
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -2554,47 +2615,6 @@ class Communication {
2554
2615
  return response;
2555
2616
  }
2556
2617
 
2557
- /**
2558
- * @param {Object} arg - Arg object.
2559
- * @param {string} arg.companyId - Company id
2560
- * @param {string} arg.applicationId - Application id
2561
- * @param {number} [arg.pageSize] - Current request items count
2562
- * @param {string} [arg.sort] - To sort based on created_at
2563
- * @param {string} [arg.query] - To search based on plain text
2564
- * @returns {Paginator<CommunicationPlatformModel.EmailProviders>}
2565
- * @summary: Get email providers.
2566
- * @description: Retrieve a list of email communication providers.
2567
- */
2568
- getEmailProvidersPaginator({
2569
- companyId,
2570
- applicationId,
2571
- pageSize,
2572
- sort,
2573
- query,
2574
- } = {}) {
2575
- const paginator = new Paginator();
2576
- const callback = async () => {
2577
- const pageId = paginator.nextId;
2578
- const pageNo = paginator.pageNo;
2579
- const pageType = "number";
2580
- const data = await this.getEmailProviders({
2581
- companyId: companyId,
2582
- applicationId: applicationId,
2583
- pageNo: pageNo,
2584
- pageSize: pageSize,
2585
- sort: sort,
2586
- query: query,
2587
- });
2588
- paginator.setPaginator({
2589
- hasNext: data.page.has_next ? true : false,
2590
- nextId: data.page.next_id,
2591
- });
2592
- return data;
2593
- };
2594
- paginator.setCallback(callback.bind(this));
2595
- return paginator;
2596
- }
2597
-
2598
2618
  /**
2599
2619
  * @param {CommunicationPlatformApplicationValidator.GetEmailTemplateByIdParam} arg
2600
2620
  * - Arg object
@@ -2603,8 +2623,8 @@ class Communication {
2603
2623
  * @param {import("../PlatformAPIClient").Options} - Options
2604
2624
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
2605
2625
  * @name getEmailTemplateById
2606
- * @summary: Get email template by ID.
2607
- * @description: Retrieve detailed information about a specific email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplateById/).
2626
+ * @summary: Get an email template
2627
+ * @description: Retrieves detailed information about a specific email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplateById/).
2608
2628
  */
2609
2629
  async getEmailTemplateById(
2610
2630
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2684,8 +2704,8 @@ class Communication {
2684
2704
  * @param {import("../PlatformAPIClient").Options} - Options
2685
2705
  * @returns {Promise<CommunicationPlatformModel.EmailTemplates>} - Success response
2686
2706
  * @name getEmailTemplates
2687
- * @summary: Get email templates.
2688
- * @description: Retrieve a list of available email communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplates/).
2707
+ * @summary: Get all email templates
2708
+ * @description: Retrieves a list of available email communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplates/).
2689
2709
  */
2690
2710
  async getEmailTemplates(
2691
2711
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -2767,47 +2787,6 @@ class Communication {
2767
2787
  return response;
2768
2788
  }
2769
2789
 
2770
- /**
2771
- * @param {Object} arg - Arg object.
2772
- * @param {string} arg.companyId - Company id
2773
- * @param {string} arg.applicationId - Application id
2774
- * @param {number} [arg.pageSize] - Current request items count
2775
- * @param {string} [arg.sort] - To sort based on created_at
2776
- * @param {string} [arg.query] - To search based on plain text
2777
- * @returns {Paginator<CommunicationPlatformModel.EmailTemplates>}
2778
- * @summary: Get email templates.
2779
- * @description: Retrieve a list of available email communication templates.
2780
- */
2781
- getEmailTemplatesPaginator({
2782
- companyId,
2783
- applicationId,
2784
- pageSize,
2785
- sort,
2786
- query,
2787
- } = {}) {
2788
- const paginator = new Paginator();
2789
- const callback = async () => {
2790
- const pageId = paginator.nextId;
2791
- const pageNo = paginator.pageNo;
2792
- const pageType = "number";
2793
- const data = await this.getEmailTemplates({
2794
- companyId: companyId,
2795
- applicationId: applicationId,
2796
- pageNo: pageNo,
2797
- pageSize: pageSize,
2798
- sort: sort,
2799
- query: query,
2800
- });
2801
- paginator.setPaginator({
2802
- hasNext: data.page.has_next ? true : false,
2803
- nextId: data.page.next_id,
2804
- });
2805
- return data;
2806
- };
2807
- paginator.setCallback(callback.bind(this));
2808
- return paginator;
2809
- }
2810
-
2811
2790
  /**
2812
2791
  * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsParam} arg
2813
2792
  * - Arg object
@@ -2817,8 +2796,8 @@ class Communication {
2817
2796
  * @returns {Promise<CommunicationPlatformModel.EventSubscriptions>} -
2818
2797
  * Success response
2819
2798
  * @name getEventSubscriptions
2820
- * @summary: Get event subscriptions.
2821
- * @description: Retrieve a list of event subscriptions related to communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptions/).
2799
+ * @summary: Get all event subscriptions
2800
+ * @description: Retrieves a list of all event subscriptions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptions/).
2822
2801
  */
2823
2802
  async getEventSubscriptions(
2824
2803
  { pageNo, pageSize, populate, requestHeaders } = { requestHeaders: {} },
@@ -2897,44 +2876,6 @@ class Communication {
2897
2876
  return response;
2898
2877
  }
2899
2878
 
2900
- /**
2901
- * @param {Object} arg - Arg object.
2902
- * @param {string} arg.companyId - Company id
2903
- * @param {string} arg.applicationId - Application id
2904
- * @param {number} [arg.pageSize] - Current request items count
2905
- * @param {string} [arg.populate] - Populate Fields
2906
- * @returns {Paginator<CommunicationPlatformModel.EventSubscriptions>}
2907
- * @summary: Get event subscriptions.
2908
- * @description: Retrieve a list of event subscriptions related to communication.
2909
- */
2910
- getEventSubscriptionsPaginator({
2911
- companyId,
2912
- applicationId,
2913
- pageSize,
2914
- populate,
2915
- } = {}) {
2916
- const paginator = new Paginator();
2917
- const callback = async () => {
2918
- const pageId = paginator.nextId;
2919
- const pageNo = paginator.pageNo;
2920
- const pageType = "number";
2921
- const data = await this.getEventSubscriptions({
2922
- companyId: companyId,
2923
- applicationId: applicationId,
2924
- pageNo: pageNo,
2925
- pageSize: pageSize,
2926
- populate: populate,
2927
- });
2928
- paginator.setPaginator({
2929
- hasNext: data.page.has_next ? true : false,
2930
- nextId: data.page.next_id,
2931
- });
2932
- return data;
2933
- };
2934
- paginator.setCallback(callback.bind(this));
2935
- return paginator;
2936
- }
2937
-
2938
2879
  /**
2939
2880
  * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam} arg
2940
2881
  * - Arg object
@@ -2943,8 +2884,8 @@ class Communication {
2943
2884
  * @param {import("../PlatformAPIClient").Options} - Options
2944
2885
  * @returns {Promise<CommunicationPlatformModel.EventSubscription>} - Success response
2945
2886
  * @name getEventSubscriptionsById
2946
- * @summary: Get event subscriptions by id
2947
- * @description: Get event subscriptions by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptionsById/).
2887
+ * @summary: Get an event subscription
2888
+ * @description: Retrieves detailed information about a specific event subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptionsById/).
2948
2889
  */
2949
2890
  async getEventSubscriptionsById(
2950
2891
  { id, populate, requestHeaders } = { requestHeaders: {} },
@@ -3027,8 +2968,8 @@ class Communication {
3027
2968
  * @param {import("../PlatformAPIClient").Options} - Options
3028
2969
  * @returns {Promise<CommunicationPlatformModel.GlobalProviders>} - Success response
3029
2970
  * @name getGlobalProviders
3030
- * @summary: Get global providers.
3031
- * @description: Retrieve a list of global communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getGlobalProviders/).
2971
+ * @summary: Get global providers
2972
+ * @description: Retrieve a list of global communication providers associated with the sales channel.. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getGlobalProviders/).
3032
2973
  */
3033
2974
  async getGlobalProviders(
3034
2975
  { requestHeaders } = { requestHeaders: {} },
@@ -3102,12 +3043,12 @@ class Communication {
3102
3043
  *
3103
3044
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3104
3045
  * @param {import("../PlatformAPIClient").Options} - Options
3105
- * @returns {Promise<CommunicationPlatformModel.GlobalVariablesGetResponse>}
3046
+ * @returns {Promise<CommunicationPlatformModel.GetGlobalVariablesResult>}
3106
3047
  * - Success response
3107
3048
  *
3108
3049
  * @name getGlobalVariables
3109
- * @summary: Get global variables.
3110
- * @description: Retrieve global variables used in communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getGlobalVariables/).
3050
+ * @summary: Get all global variables
3051
+ * @description: Retrieves a list of communication global variables. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getGlobalVariables/).
3111
3052
  */
3112
3053
  async getGlobalVariables(
3113
3054
  { requestHeaders } = { requestHeaders: {} },
@@ -3156,7 +3097,7 @@ class Communication {
3156
3097
 
3157
3098
  const {
3158
3099
  error: res_error,
3159
- } = CommunicationPlatformModel.GlobalVariablesGetResponse().validate(
3100
+ } = CommunicationPlatformModel.GetGlobalVariablesResult().validate(
3160
3101
  responseData,
3161
3102
  { abortEarly: false, allowUnknown: true }
3162
3103
  );
@@ -3181,8 +3122,8 @@ class Communication {
3181
3122
  * @param {import("../PlatformAPIClient").Options} - Options
3182
3123
  * @returns {Promise<CommunicationPlatformModel.JobLogs>} - Success response
3183
3124
  * @name getJobLogs
3184
- * @summary: Get job logs.
3185
- * @description: Retrieve logs and details related to communication jobs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobLogs/).
3125
+ * @summary: Get logs of all campaign job
3126
+ * @description: Retrieve logs and details related to campaign jobs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobLogs/).
3186
3127
  */
3187
3128
  async getJobLogs(
3188
3129
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3264,55 +3205,14 @@ class Communication {
3264
3205
  return response;
3265
3206
  }
3266
3207
 
3267
- /**
3268
- * @param {Object} arg - Arg object.
3269
- * @param {string} arg.companyId - Company id
3270
- * @param {string} arg.applicationId - Application id
3271
- * @param {number} [arg.pageSize] - Current request items count
3272
- * @param {string} [arg.sort] - To sort based on created_at
3273
- * @param {string} [arg.query] - To search based on plain text
3274
- * @returns {Paginator<CommunicationPlatformModel.JobLogs>}
3275
- * @summary: Get job logs.
3276
- * @description: Retrieve logs and details related to communication jobs.
3277
- */
3278
- getJobLogsPaginator({
3279
- companyId,
3280
- applicationId,
3281
- pageSize,
3282
- sort,
3283
- query,
3284
- } = {}) {
3285
- const paginator = new Paginator();
3286
- const callback = async () => {
3287
- const pageId = paginator.nextId;
3288
- const pageNo = paginator.pageNo;
3289
- const pageType = "number";
3290
- const data = await this.getJobLogs({
3291
- companyId: companyId,
3292
- applicationId: applicationId,
3293
- pageNo: pageNo,
3294
- pageSize: pageSize,
3295
- sort: sort,
3296
- query: query,
3297
- });
3298
- paginator.setPaginator({
3299
- hasNext: data.page.has_next ? true : false,
3300
- nextId: data.page.next_id,
3301
- });
3302
- return data;
3303
- };
3304
- paginator.setCallback(callback.bind(this));
3305
- return paginator;
3306
- }
3307
-
3308
3208
  /**
3309
3209
  * @param {CommunicationPlatformApplicationValidator.GetJobsParam} arg - Arg object
3310
3210
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3311
3211
  * @param {import("../PlatformAPIClient").Options} - Options
3312
3212
  * @returns {Promise<CommunicationPlatformModel.Jobs>} - Success response
3313
3213
  * @name getJobs
3314
- * @summary: Get jobs.
3315
- * @description: Retrieve a list of communication jobs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobs/).
3214
+ * @summary: Get all campaign jobs
3215
+ * @description: Retrieves a list of campaign jobs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobs/).
3316
3216
  */
3317
3217
  async getJobs(
3318
3218
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3394,41 +3294,6 @@ class Communication {
3394
3294
  return response;
3395
3295
  }
3396
3296
 
3397
- /**
3398
- * @param {Object} arg - Arg object.
3399
- * @param {string} arg.companyId - Company id
3400
- * @param {string} arg.applicationId - Application id
3401
- * @param {number} [arg.pageSize] - Current request items count
3402
- * @param {string} [arg.sort] - To sort based on created_at
3403
- * @param {string} [arg.query] - To search based on plain text
3404
- * @returns {Paginator<CommunicationPlatformModel.Jobs>}
3405
- * @summary: Get jobs.
3406
- * @description: Retrieve a list of communication jobs.
3407
- */
3408
- getJobsPaginator({ companyId, applicationId, pageSize, sort, query } = {}) {
3409
- const paginator = new Paginator();
3410
- const callback = async () => {
3411
- const pageId = paginator.nextId;
3412
- const pageNo = paginator.pageNo;
3413
- const pageType = "number";
3414
- const data = await this.getJobs({
3415
- companyId: companyId,
3416
- applicationId: applicationId,
3417
- pageNo: pageNo,
3418
- pageSize: pageSize,
3419
- sort: sort,
3420
- query: query,
3421
- });
3422
- paginator.setPaginator({
3423
- hasNext: data.page.has_next ? true : false,
3424
- nextId: data.page.next_id,
3425
- });
3426
- return data;
3427
- };
3428
- paginator.setCallback(callback.bind(this));
3429
- return paginator;
3430
- }
3431
-
3432
3297
  /**
3433
3298
  * @param {CommunicationPlatformApplicationValidator.GetNSampleRecordsFromCsvParam} arg
3434
3299
  * - Arg object
@@ -3437,7 +3302,7 @@ class Communication {
3437
3302
  * @param {import("../PlatformAPIClient").Options} - Options
3438
3303
  * @returns {Promise<CommunicationPlatformModel.GetNRecordsCsvRes>} - Success response
3439
3304
  * @name getNSampleRecordsFromCsv
3440
- * @summary: Get N sample records from CSV.
3305
+ * @summary: Get N sample records of a CSV
3441
3306
  * @description: Retrieve a specified number of sample records from a CSV data source. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getNSampleRecordsFromCsv/).
3442
3307
  */
3443
3308
  async getNSampleRecordsFromCsv(
@@ -3518,21 +3383,17 @@ class Communication {
3518
3383
  * @param {import("../PlatformAPIClient").Options} - Options
3519
3384
  * @returns {Promise<CommunicationPlatformModel.GetNRecordsCsvRes>} - Success response
3520
3385
  * @name getNSampleRecordsFromCsvByGet
3521
- * @summary: Get N sample records in CSV
3522
- * @description: Retrieve a specified number of sample records from a CSV data source using a GET request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getNSampleRecordsFromCsvByGet/).
3386
+ * @summary: Get N sample records of a CSV
3387
+ * @description: Retrieve a specified number of sample records from a CSV data source. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getNSampleRecordsFromCsvByGet/).
3523
3388
  */
3524
3389
  async getNSampleRecordsFromCsvByGet(
3525
- { count, header, url, requestHeaders } = { requestHeaders: {} },
3390
+ { requestHeaders } = { requestHeaders: {} },
3526
3391
  { responseHeaders } = { responseHeaders: false }
3527
3392
  ) {
3528
3393
  const {
3529
3394
  error,
3530
3395
  } = CommunicationPlatformApplicationValidator.getNSampleRecordsFromCsvByGet().validate(
3531
- {
3532
- count,
3533
- header,
3534
- url,
3535
- },
3396
+ {},
3536
3397
  { abortEarly: false, allowUnknown: true }
3537
3398
  );
3538
3399
  if (error) {
@@ -3543,11 +3404,7 @@ class Communication {
3543
3404
  const {
3544
3405
  error: warrning,
3545
3406
  } = CommunicationPlatformApplicationValidator.getNSampleRecordsFromCsvByGet().validate(
3546
- {
3547
- count,
3548
- header,
3549
- url,
3550
- },
3407
+ {},
3551
3408
  { abortEarly: false, allowUnknown: false }
3552
3409
  );
3553
3410
  if (warrning) {
@@ -3558,9 +3415,6 @@ class Communication {
3558
3415
  }
3559
3416
 
3560
3417
  const query_params = {};
3561
- query_params["count"] = count;
3562
- query_params["header"] = header;
3563
- query_params["url"] = url;
3564
3418
 
3565
3419
  const response = await PlatformAPIClient.execute(
3566
3420
  this.config,
@@ -3606,8 +3460,8 @@ class Communication {
3606
3460
  * @param {import("../PlatformAPIClient").Options} - Options
3607
3461
  * @returns {Promise<CommunicationPlatformModel.OtpConfiguration>} - Success response
3608
3462
  * @name getOtpConfiguration
3609
- * @summary: Get otp-configuration, if not present in db then return default settings
3610
- * @description: Get otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getOtpConfiguration/).
3463
+ * @summary: Get configuration of otp
3464
+ * @description: Retrieves all configurations related to OTP. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getOtpConfiguration/).
3611
3465
  */
3612
3466
  async getOtpConfiguration(
3613
3467
  { requestHeaders } = { requestHeaders: {} },
@@ -3681,9 +3535,9 @@ class Communication {
3681
3535
  *
3682
3536
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3683
3537
  * @param {import("../PlatformAPIClient").Options} - Options
3684
- * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
3538
+ * @returns {Promise<Object>} - Success response
3685
3539
  * @name getSmsProviderById
3686
- * @summary: Get SMS provider by ID.
3540
+ * @summary: Get a SMS provider
3687
3541
  * @description: Retrieve detailed information about a specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsProviderById/).
3688
3542
  */
3689
3543
  async getSmsProviderById(
@@ -3735,9 +3589,7 @@ class Communication {
3735
3589
  responseData = response[0];
3736
3590
  }
3737
3591
 
3738
- const {
3739
- error: res_error,
3740
- } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
3592
+ const { error: res_error } = Joi.any().validate(responseData, {
3741
3593
  abortEarly: false,
3742
3594
  allowUnknown: true,
3743
3595
  });
@@ -3762,10 +3614,10 @@ class Communication {
3762
3614
  *
3763
3615
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3764
3616
  * @param {import("../PlatformAPIClient").Options} - Options
3765
- * @returns {Promise<CommunicationPlatformModel.SmsProviders>} - Success response
3617
+ * @returns {Promise<Object>} - Success response
3766
3618
  * @name getSmsProviders
3767
- * @summary: Get SMS providers.
3768
- * @description: Retrieve a list of SMS communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsProviders/).
3619
+ * @summary: Get all SMS providers
3620
+ * @description: Retrieves a list of SMS communication providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsProviders/).
3769
3621
  */
3770
3622
  async getSmsProviders(
3771
3623
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3826,9 +3678,7 @@ class Communication {
3826
3678
  responseData = response[0];
3827
3679
  }
3828
3680
 
3829
- const {
3830
- error: res_error,
3831
- } = CommunicationPlatformModel.SmsProviders().validate(responseData, {
3681
+ const { error: res_error } = Joi.any().validate(responseData, {
3832
3682
  abortEarly: false,
3833
3683
  allowUnknown: true,
3834
3684
  });
@@ -3855,8 +3705,8 @@ class Communication {
3855
3705
  * @param {import("../PlatformAPIClient").Options} - Options
3856
3706
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
3857
3707
  * @name getSmsTemplateById
3858
- * @summary: Get SMS template by ID.
3859
- * @description: Retrieve detailed information about a specific SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplateById/).
3708
+ * @summary: Get a SMS template
3709
+ * @description: Retrieves detailed information about a specific SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplateById/).
3860
3710
  */
3861
3711
  async getSmsTemplateById(
3862
3712
  { id, requestHeaders } = { requestHeaders: {} },
@@ -3936,8 +3786,8 @@ class Communication {
3936
3786
  * @param {import("../PlatformAPIClient").Options} - Options
3937
3787
  * @returns {Promise<CommunicationPlatformModel.SmsTemplates>} - Success response
3938
3788
  * @name getSmsTemplates
3939
- * @summary: Get SMS templates.
3940
- * @description: Retrieve a list of available SMS communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplates/).
3789
+ * @summary: Get all SMS templates
3790
+ * @description: Retrieve a list of all SMS communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplates/).
3941
3791
  */
3942
3792
  async getSmsTemplates(
3943
3793
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -4019,47 +3869,6 @@ class Communication {
4019
3869
  return response;
4020
3870
  }
4021
3871
 
4022
- /**
4023
- * @param {Object} arg - Arg object.
4024
- * @param {string} arg.companyId - Company id
4025
- * @param {string} arg.applicationId - Application id
4026
- * @param {number} [arg.pageSize] - Current request items count
4027
- * @param {string} [arg.sort] - To sort based on created_at
4028
- * @param {string} [arg.query] - To search based on plain text
4029
- * @returns {Paginator<CommunicationPlatformModel.SmsTemplates>}
4030
- * @summary: Get SMS templates.
4031
- * @description: Retrieve a list of available SMS communication templates.
4032
- */
4033
- getSmsTemplatesPaginator({
4034
- companyId,
4035
- applicationId,
4036
- pageSize,
4037
- sort,
4038
- query,
4039
- } = {}) {
4040
- const paginator = new Paginator();
4041
- const callback = async () => {
4042
- const pageId = paginator.nextId;
4043
- const pageNo = paginator.pageNo;
4044
- const pageType = "number";
4045
- const data = await this.getSmsTemplates({
4046
- companyId: companyId,
4047
- applicationId: applicationId,
4048
- pageNo: pageNo,
4049
- pageSize: pageSize,
4050
- sort: sort,
4051
- query: query,
4052
- });
4053
- paginator.setPaginator({
4054
- hasNext: data.page.has_next ? true : false,
4055
- nextId: data.page.next_id,
4056
- });
4057
- return data;
4058
- };
4059
- paginator.setCallback(callback.bind(this));
4060
- return paginator;
4061
- }
4062
-
4063
3872
  /**
4064
3873
  * @param {CommunicationPlatformApplicationValidator.GetStatsOfCampaignByIdParam} arg
4065
3874
  * - Arg object
@@ -4068,8 +3877,8 @@ class Communication {
4068
3877
  * @param {import("../PlatformAPIClient").Options} - Options
4069
3878
  * @returns {Promise<CommunicationPlatformModel.GetStats>} - Success response
4070
3879
  * @name getStatsOfCampaignById
4071
- * @summary: Get campaign statistics by ID.
4072
- * @description: Retrieve statistical data for a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getStatsOfCampaignById/).
3880
+ * @summary: Get campaign statistics
3881
+ * @description: Retrieves statistical data for a specific a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getStatsOfCampaignById/).
4073
3882
  */
4074
3883
  async getStatsOfCampaignById(
4075
3884
  { id, requestHeaders } = { requestHeaders: {} },
@@ -4147,12 +3956,10 @@ class Communication {
4147
3956
  *
4148
3957
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4149
3958
  * @param {import("../PlatformAPIClient").Options} - Options
4150
- * @returns {Promise<CommunicationPlatformModel.SubscribedEmailTemplates>}
4151
- * - Success response
4152
- *
3959
+ * @returns {Promise<CommunicationPlatformModel.EmailTemplates>} - Success response
4153
3960
  * @name getSubscribedEmailTemplates
4154
- * @summary: Get subscribed email templates.
4155
- * @description: Retrieve email communication templates that are subscribed to. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedEmailTemplates/).
3961
+ * @summary: Get all subscribed email templates
3962
+ * @description: Retrieves a list of email communication templates that are subscribed to an event. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedEmailTemplates/).
4156
3963
  */
4157
3964
  async getSubscribedEmailTemplates(
4158
3965
  { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} },
@@ -4212,10 +4019,10 @@ class Communication {
4212
4019
 
4213
4020
  const {
4214
4021
  error: res_error,
4215
- } = CommunicationPlatformModel.SubscribedEmailTemplates().validate(
4216
- responseData,
4217
- { abortEarly: false, allowUnknown: true }
4218
- );
4022
+ } = CommunicationPlatformModel.EmailTemplates().validate(responseData, {
4023
+ abortEarly: false,
4024
+ allowUnknown: true,
4025
+ });
4219
4026
 
4220
4027
  if (res_error) {
4221
4028
  if (this.config.options.strictResponseCheck === true) {
@@ -4237,11 +4044,10 @@ class Communication {
4237
4044
  *
4238
4045
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4239
4046
  * @param {import("../PlatformAPIClient").Options} - Options
4240
- * @returns {Promise<CommunicationPlatformModel.SubscribedSmsTemplates>} -
4241
- * Success response
4047
+ * @returns {Promise<CommunicationPlatformModel.SmsTemplates>} - Success response
4242
4048
  * @name getSubscribedSmsTemplates
4243
- * @summary: Get subscribed SMS templates.
4244
- * @description: Retrieve SMS communication templates that are subscribed to. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedSmsTemplates/).
4049
+ * @summary: Get all subscribed SMS templates
4050
+ * @description: Retrieve a list of SMS communication templates that are subscribed to an event. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedSmsTemplates/).
4245
4051
  */
4246
4052
  async getSubscribedSmsTemplates(
4247
4053
  { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} },
@@ -4301,10 +4107,10 @@ class Communication {
4301
4107
 
4302
4108
  const {
4303
4109
  error: res_error,
4304
- } = CommunicationPlatformModel.SubscribedSmsTemplates().validate(
4305
- responseData,
4306
- { abortEarly: false, allowUnknown: true }
4307
- );
4110
+ } = CommunicationPlatformModel.SmsTemplates().validate(responseData, {
4111
+ abortEarly: false,
4112
+ allowUnknown: true,
4113
+ });
4308
4114
 
4309
4115
  if (res_error) {
4310
4116
  if (this.config.options.strictResponseCheck === true) {
@@ -4321,24 +4127,23 @@ class Communication {
4321
4127
  }
4322
4128
 
4323
4129
  /**
4324
- * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
4130
+ * @param {CommunicationPlatformApplicationValidator.GetSystemAudiencesParam} arg
4325
4131
  * - Arg object
4326
4132
  *
4327
4133
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4328
4134
  * @param {import("../PlatformAPIClient").Options} - Options
4329
- * @returns {Promise<CommunicationPlatformModel.SystemEmailTemplate[]>} -
4330
- * Success response
4331
- * @name getSystemEmailTemplates
4332
- * @summary: Get system email templates.
4333
- * @description: Retrieve system-defined email communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSystemEmailTemplates/).
4135
+ * @returns {Promise<Object>} - Success response
4136
+ * @name getSystemAudiences
4137
+ * @summary: Get system audiences
4138
+ * @description: Retrieves a list of system-defined audiences for communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSystemAudiences/).
4334
4139
  */
4335
- async getSystemEmailTemplates(
4140
+ async getSystemAudiences(
4336
4141
  { requestHeaders } = { requestHeaders: {} },
4337
4142
  { responseHeaders } = { responseHeaders: false }
4338
4143
  ) {
4339
4144
  const {
4340
4145
  error,
4341
- } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4146
+ } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4342
4147
  {},
4343
4148
  { abortEarly: false, allowUnknown: true }
4344
4149
  );
@@ -4349,14 +4154,14 @@ class Communication {
4349
4154
  // Showing warrnings if extra unknown parameters are found
4350
4155
  const {
4351
4156
  error: warrning,
4352
- } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4157
+ } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4353
4158
  {},
4354
4159
  { abortEarly: false, allowUnknown: false }
4355
4160
  );
4356
4161
  if (warrning) {
4357
4162
  Logger({
4358
4163
  level: "WARN",
4359
- message: `Parameter Validation warrnings for platform > Communication > getSystemEmailTemplates \n ${warrning}`,
4164
+ message: `Parameter Validation warrnings for platform > Communication > getSystemAudiences \n ${warrning}`,
4360
4165
  });
4361
4166
  }
4362
4167
 
@@ -4365,7 +4170,7 @@ class Communication {
4365
4170
  const response = await PlatformAPIClient.execute(
4366
4171
  this.config,
4367
4172
  "get",
4368
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/system-templates`,
4173
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/system-datasources`,
4369
4174
  query_params,
4370
4175
  undefined,
4371
4176
  requestHeaders,
@@ -4377,9 +4182,10 @@ class Communication {
4377
4182
  responseData = response[0];
4378
4183
  }
4379
4184
 
4380
- const { error: res_error } = Joi.array()
4381
- .items(CommunicationPlatformModel.SystemEmailTemplate())
4382
- .validate(responseData, { abortEarly: false, allowUnknown: true });
4185
+ const { error: res_error } = Joi.any().validate(responseData, {
4186
+ abortEarly: false,
4187
+ allowUnknown: true,
4188
+ });
4383
4189
 
4384
4190
  if (res_error) {
4385
4191
  if (this.config.options.strictResponseCheck === true) {
@@ -4387,7 +4193,7 @@ class Communication {
4387
4193
  } else {
4388
4194
  Logger({
4389
4195
  level: "WARN",
4390
- message: `Response Validation Warnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
4196
+ message: `Response Validation Warnings for platform > Communication > getSystemAudiences \n ${res_error}`,
4391
4197
  });
4392
4198
  }
4393
4199
  }
@@ -4396,24 +4202,24 @@ class Communication {
4396
4202
  }
4397
4203
 
4398
4204
  /**
4399
- * @param {CommunicationPlatformApplicationValidator.GetSystemSmsTemplatesParam} arg
4205
+ * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
4400
4206
  * - Arg object
4401
4207
  *
4402
4208
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4403
4209
  * @param {import("../PlatformAPIClient").Options} - Options
4404
- * @returns {Promise<CommunicationPlatformModel.SystemSmsTemplates[]>} -
4210
+ * @returns {Promise<CommunicationPlatformModel.SystemEmailTemplates>} -
4405
4211
  * Success response
4406
- * @name getSystemSmsTemplates
4407
- * @summary: Get system SMS templates.
4408
- * @description: Retrieve system-defined SMS communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSystemSmsTemplates/).
4212
+ * @name getSystemEmailTemplates
4213
+ * @summary: Get all system email templates
4214
+ * @description: Retrieves system-defined email communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSystemEmailTemplates/).
4409
4215
  */
4410
- async getSystemSmsTemplates(
4216
+ async getSystemEmailTemplates(
4411
4217
  { requestHeaders } = { requestHeaders: {} },
4412
4218
  { responseHeaders } = { responseHeaders: false }
4413
4219
  ) {
4414
4220
  const {
4415
4221
  error,
4416
- } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4222
+ } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4417
4223
  {},
4418
4224
  { abortEarly: false, allowUnknown: true }
4419
4225
  );
@@ -4424,14 +4230,14 @@ class Communication {
4424
4230
  // Showing warrnings if extra unknown parameters are found
4425
4231
  const {
4426
4232
  error: warrning,
4427
- } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4233
+ } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4428
4234
  {},
4429
4235
  { abortEarly: false, allowUnknown: false }
4430
4236
  );
4431
4237
  if (warrning) {
4432
4238
  Logger({
4433
4239
  level: "WARN",
4434
- message: `Parameter Validation warrnings for platform > Communication > getSystemSmsTemplates \n ${warrning}`,
4240
+ message: `Parameter Validation warrnings for platform > Communication > getSystemEmailTemplates \n ${warrning}`,
4435
4241
  });
4436
4242
  }
4437
4243
 
@@ -4440,7 +4246,7 @@ class Communication {
4440
4246
  const response = await PlatformAPIClient.execute(
4441
4247
  this.config,
4442
4248
  "get",
4443
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sms/system-templates`,
4249
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/system-templates`,
4444
4250
  query_params,
4445
4251
  undefined,
4446
4252
  requestHeaders,
@@ -4452,9 +4258,12 @@ class Communication {
4452
4258
  responseData = response[0];
4453
4259
  }
4454
4260
 
4455
- const { error: res_error } = Joi.array()
4456
- .items(CommunicationPlatformModel.SystemSmsTemplates())
4457
- .validate(responseData, { abortEarly: false, allowUnknown: true });
4261
+ const {
4262
+ error: res_error,
4263
+ } = CommunicationPlatformModel.SystemEmailTemplates().validate(
4264
+ responseData,
4265
+ { abortEarly: false, allowUnknown: true }
4266
+ );
4458
4267
 
4459
4268
  if (res_error) {
4460
4269
  if (this.config.options.strictResponseCheck === true) {
@@ -4462,7 +4271,7 @@ class Communication {
4462
4271
  } else {
4463
4272
  Logger({
4464
4273
  level: "WARN",
4465
- message: `Response Validation Warnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
4274
+ message: `Response Validation Warnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
4466
4275
  });
4467
4276
  }
4468
4277
  }
@@ -4471,28 +4280,25 @@ class Communication {
4471
4280
  }
4472
4281
 
4473
4282
  /**
4474
- * @param {CommunicationPlatformApplicationValidator.PostGlobalVariablesParam} arg
4283
+ * @param {CommunicationPlatformApplicationValidator.GetSystemSmsTemplatesParam} arg
4475
4284
  * - Arg object
4476
4285
  *
4477
4286
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4478
4287
  * @param {import("../PlatformAPIClient").Options} - Options
4479
- * @returns {Promise<CommunicationPlatformModel.GlobalVariablesPostResponse>}
4480
- * - Success response
4481
- *
4482
- * @name postGlobalVariables
4483
- * @summary: Post global variables.
4484
- * @description: Update and post global variables for communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/postGlobalVariables/).
4288
+ * @returns {Promise<CommunicationPlatformModel.SystemSmsTemplates>} -
4289
+ * Success response
4290
+ * @name getSystemSmsTemplates
4291
+ * @summary: Gets all system SMS templates
4292
+ * @description: Retrieves system-defined SMS communication templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSystemSmsTemplates/).
4485
4293
  */
4486
- async postGlobalVariables(
4487
- { body, requestHeaders } = { requestHeaders: {} },
4294
+ async getSystemSmsTemplates(
4295
+ { requestHeaders } = { requestHeaders: {} },
4488
4296
  { responseHeaders } = { responseHeaders: false }
4489
4297
  ) {
4490
4298
  const {
4491
4299
  error,
4492
- } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4493
- {
4494
- body,
4495
- },
4300
+ } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4301
+ {},
4496
4302
  { abortEarly: false, allowUnknown: true }
4497
4303
  );
4498
4304
  if (error) {
@@ -4502,16 +4308,14 @@ class Communication {
4502
4308
  // Showing warrnings if extra unknown parameters are found
4503
4309
  const {
4504
4310
  error: warrning,
4505
- } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4506
- {
4507
- body,
4508
- },
4311
+ } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4312
+ {},
4509
4313
  { abortEarly: false, allowUnknown: false }
4510
4314
  );
4511
4315
  if (warrning) {
4512
4316
  Logger({
4513
4317
  level: "WARN",
4514
- message: `Parameter Validation warrnings for platform > Communication > postGlobalVariables \n ${warrning}`,
4318
+ message: `Parameter Validation warrnings for platform > Communication > getSystemSmsTemplates \n ${warrning}`,
4515
4319
  });
4516
4320
  }
4517
4321
 
@@ -4519,10 +4323,10 @@ class Communication {
4519
4323
 
4520
4324
  const response = await PlatformAPIClient.execute(
4521
4325
  this.config,
4522
- "post",
4523
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/global-variables`,
4326
+ "get",
4327
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sms/system-templates`,
4524
4328
  query_params,
4525
- body,
4329
+ undefined,
4526
4330
  requestHeaders,
4527
4331
  { responseHeaders }
4528
4332
  );
@@ -4534,10 +4338,10 @@ class Communication {
4534
4338
 
4535
4339
  const {
4536
4340
  error: res_error,
4537
- } = CommunicationPlatformModel.GlobalVariablesPostResponse().validate(
4538
- responseData,
4539
- { abortEarly: false, allowUnknown: true }
4540
- );
4341
+ } = CommunicationPlatformModel.SystemSmsTemplates().validate(responseData, {
4342
+ abortEarly: false,
4343
+ allowUnknown: true,
4344
+ });
4541
4345
 
4542
4346
  if (res_error) {
4543
4347
  if (this.config.options.strictResponseCheck === true) {
@@ -4545,7 +4349,7 @@ class Communication {
4545
4349
  } else {
4546
4350
  Logger({
4547
4351
  level: "WARN",
4548
- message: `Response Validation Warnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4352
+ message: `Response Validation Warnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
4549
4353
  });
4550
4354
  }
4551
4355
  }
@@ -4554,23 +4358,25 @@ class Communication {
4554
4358
  }
4555
4359
 
4556
4360
  /**
4557
- * @param {CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam} arg
4361
+ * @param {CommunicationPlatformApplicationValidator.PostGlobalVariablesParam} arg
4558
4362
  * - Arg object
4559
4363
  *
4560
4364
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4561
4365
  * @param {import("../PlatformAPIClient").Options} - Options
4562
- * @returns {Promise<CommunicationPlatformModel.EngineResponse>} - Success response
4563
- * @name sendCommunicationAsynchronously
4564
- * @summary: Send communication asynchronously.
4565
- * @description: Initiate and send communication with the option for asynchronous processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationAsynchronously/).
4366
+ * @returns {Promise<CommunicationPlatformModel.CreateGlobalVariablesResult>}
4367
+ * - Success response
4368
+ *
4369
+ * @name postGlobalVariables
4370
+ * @summary: Create global variables
4371
+ * @description: Updates and creates communication global variables. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/postGlobalVariables/).
4566
4372
  */
4567
- async sendCommunicationAsynchronously(
4373
+ async postGlobalVariables(
4568
4374
  { body, requestHeaders } = { requestHeaders: {} },
4569
4375
  { responseHeaders } = { responseHeaders: false }
4570
4376
  ) {
4571
4377
  const {
4572
4378
  error,
4573
- } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4379
+ } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4574
4380
  {
4575
4381
  body,
4576
4382
  },
@@ -4583,7 +4389,7 @@ class Communication {
4583
4389
  // Showing warrnings if extra unknown parameters are found
4584
4390
  const {
4585
4391
  error: warrning,
4586
- } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4392
+ } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4587
4393
  {
4588
4394
  body,
4589
4395
  },
@@ -4592,7 +4398,7 @@ class Communication {
4592
4398
  if (warrning) {
4593
4399
  Logger({
4594
4400
  level: "WARN",
4595
- message: `Parameter Validation warrnings for platform > Communication > sendCommunicationAsynchronously \n ${warrning}`,
4401
+ message: `Parameter Validation warrnings for platform > Communication > postGlobalVariables \n ${warrning}`,
4596
4402
  });
4597
4403
  }
4598
4404
 
@@ -4601,7 +4407,7 @@ class Communication {
4601
4407
  const response = await PlatformAPIClient.execute(
4602
4408
  this.config,
4603
4409
  "post",
4604
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-async`,
4410
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/global-variables`,
4605
4411
  query_params,
4606
4412
  body,
4607
4413
  requestHeaders,
@@ -4615,10 +4421,10 @@ class Communication {
4615
4421
 
4616
4422
  const {
4617
4423
  error: res_error,
4618
- } = CommunicationPlatformModel.EngineResponse().validate(responseData, {
4619
- abortEarly: false,
4620
- allowUnknown: true,
4621
- });
4424
+ } = CommunicationPlatformModel.CreateGlobalVariablesResult().validate(
4425
+ responseData,
4426
+ { abortEarly: false, allowUnknown: true }
4427
+ );
4622
4428
 
4623
4429
  if (res_error) {
4624
4430
  if (this.config.options.strictResponseCheck === true) {
@@ -4626,7 +4432,7 @@ class Communication {
4626
4432
  } else {
4627
4433
  Logger({
4628
4434
  level: "WARN",
4629
- message: `Response Validation Warnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4435
+ message: `Response Validation Warnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4630
4436
  });
4631
4437
  }
4632
4438
  }
@@ -4635,24 +4441,23 @@ class Communication {
4635
4441
  }
4636
4442
 
4637
4443
  /**
4638
- * @param {CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam} arg
4444
+ * @param {CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam} arg
4639
4445
  * - Arg object
4640
4446
  *
4641
4447
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4642
4448
  * @param {import("../PlatformAPIClient").Options} - Options
4643
- * @returns {Promise<CommunicationPlatformModel.SendInstantResponse>} -
4644
- * Success response
4645
- * @name sendCommunicationSynchronously
4646
- * @summary: Send communication synchronously.
4647
- * @description: Initiate and send communication in real-time. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationSynchronously/).
4449
+ * @returns {Promise<CommunicationPlatformModel.EngineResult>} - Success response
4450
+ * @name sendCommunicationAsynchronously
4451
+ * @summary: Send communication asynchronously
4452
+ * @description: Sends communications to sellers with deffered delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationAsynchronously/).
4648
4453
  */
4649
- async sendCommunicationSynchronously(
4454
+ async sendCommunicationAsynchronously(
4650
4455
  { body, requestHeaders } = { requestHeaders: {} },
4651
4456
  { responseHeaders } = { responseHeaders: false }
4652
4457
  ) {
4653
4458
  const {
4654
4459
  error,
4655
- } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4460
+ } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4656
4461
  {
4657
4462
  body,
4658
4463
  },
@@ -4665,7 +4470,7 @@ class Communication {
4665
4470
  // Showing warrnings if extra unknown parameters are found
4666
4471
  const {
4667
4472
  error: warrning,
4668
- } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4473
+ } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4669
4474
  {
4670
4475
  body,
4671
4476
  },
@@ -4674,7 +4479,7 @@ class Communication {
4674
4479
  if (warrning) {
4675
4480
  Logger({
4676
4481
  level: "WARN",
4677
- message: `Parameter Validation warrnings for platform > Communication > sendCommunicationSynchronously \n ${warrning}`,
4482
+ message: `Parameter Validation warrnings for platform > Communication > sendCommunicationAsynchronously \n ${warrning}`,
4678
4483
  });
4679
4484
  }
4680
4485
 
@@ -4683,7 +4488,7 @@ class Communication {
4683
4488
  const response = await PlatformAPIClient.execute(
4684
4489
  this.config,
4685
4490
  "post",
4686
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-instant`,
4491
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-async`,
4687
4492
  query_params,
4688
4493
  body,
4689
4494
  requestHeaders,
@@ -4697,10 +4502,10 @@ class Communication {
4697
4502
 
4698
4503
  const {
4699
4504
  error: res_error,
4700
- } = CommunicationPlatformModel.SendInstantResponse().validate(
4701
- responseData,
4702
- { abortEarly: false, allowUnknown: true }
4703
- );
4505
+ } = CommunicationPlatformModel.EngineResult().validate(responseData, {
4506
+ abortEarly: false,
4507
+ allowUnknown: true,
4508
+ });
4704
4509
 
4705
4510
  if (res_error) {
4706
4511
  if (this.config.options.strictResponseCheck === true) {
@@ -4708,7 +4513,7 @@ class Communication {
4708
4513
  } else {
4709
4514
  Logger({
4710
4515
  level: "WARN",
4711
- message: `Response Validation Warnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4516
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4712
4517
  });
4713
4518
  }
4714
4519
  }
@@ -4717,24 +4522,23 @@ class Communication {
4717
4522
  }
4718
4523
 
4719
4524
  /**
4720
- * @param {CommunicationPlatformApplicationValidator.SendEngineCommunicationSynchronouslyParam} arg
4525
+ * @param {CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam} arg
4721
4526
  * - Arg object
4722
4527
  *
4723
4528
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4724
4529
  * @param {import("../PlatformAPIClient").Options} - Options
4725
- * @returns {Promise<CommunicationPlatformModel.SendInstantResponse>} -
4726
- * Success response
4727
- * @name sendEngineCommunicationSynchronously
4728
- * @summary: Send communication asynchronously.
4729
- * @description: Initiate and send communication with the option for asynchronous processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendEngineCommunicationSynchronously/).
4530
+ * @returns {Promise<CommunicationPlatformModel.EngineResult>} - Success response
4531
+ * @name sendCommunicationSynchronously
4532
+ * @summary: Send communication synchronously
4533
+ * @description: Sends real-time communications to sellers with immediate delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationSynchronously/).
4730
4534
  */
4731
- async sendEngineCommunicationSynchronously(
4535
+ async sendCommunicationSynchronously(
4732
4536
  { body, requestHeaders } = { requestHeaders: {} },
4733
4537
  { responseHeaders } = { responseHeaders: false }
4734
4538
  ) {
4735
4539
  const {
4736
4540
  error,
4737
- } = CommunicationPlatformApplicationValidator.sendEngineCommunicationSynchronously().validate(
4541
+ } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4738
4542
  {
4739
4543
  body,
4740
4544
  },
@@ -4747,7 +4551,7 @@ class Communication {
4747
4551
  // Showing warrnings if extra unknown parameters are found
4748
4552
  const {
4749
4553
  error: warrning,
4750
- } = CommunicationPlatformApplicationValidator.sendEngineCommunicationSynchronously().validate(
4554
+ } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4751
4555
  {
4752
4556
  body,
4753
4557
  },
@@ -4756,7 +4560,7 @@ class Communication {
4756
4560
  if (warrning) {
4757
4561
  Logger({
4758
4562
  level: "WARN",
4759
- message: `Parameter Validation warrnings for platform > Communication > sendEngineCommunicationSynchronously \n ${warrning}`,
4563
+ message: `Parameter Validation warrnings for platform > Communication > sendCommunicationSynchronously \n ${warrning}`,
4760
4564
  });
4761
4565
  }
4762
4566
 
@@ -4765,7 +4569,7 @@ class Communication {
4765
4569
  const response = await PlatformAPIClient.execute(
4766
4570
  this.config,
4767
4571
  "post",
4768
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-sync`,
4572
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-instant`,
4769
4573
  query_params,
4770
4574
  body,
4771
4575
  requestHeaders,
@@ -4779,10 +4583,10 @@ class Communication {
4779
4583
 
4780
4584
  const {
4781
4585
  error: res_error,
4782
- } = CommunicationPlatformModel.SendInstantResponse().validate(
4783
- responseData,
4784
- { abortEarly: false, allowUnknown: true }
4785
- );
4586
+ } = CommunicationPlatformModel.EngineResult().validate(responseData, {
4587
+ abortEarly: false,
4588
+ allowUnknown: true,
4589
+ });
4786
4590
 
4787
4591
  if (res_error) {
4788
4592
  if (this.config.options.strictResponseCheck === true) {
@@ -4790,7 +4594,7 @@ class Communication {
4790
4594
  } else {
4791
4595
  Logger({
4792
4596
  level: "WARN",
4793
- message: `Response Validation Warnings for platform > Communication > sendEngineCommunicationSynchronously \n ${res_error}`,
4597
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4794
4598
  });
4795
4599
  }
4796
4600
  }
@@ -4804,11 +4608,11 @@ class Communication {
4804
4608
  * @param {import("../PlatformAPIClient").Options} - Options
4805
4609
  * @returns {Promise<CommunicationPlatformModel.SendOtpCommsRes>} - Success response
4806
4610
  * @name sendOtp
4807
- * @summary: Send OTP.
4808
- * @description: Send a one-time password (OTP) for authentication or verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendOtp/).
4611
+ * @summary: Send OTP
4612
+ * @description: Sends a one-time password (OTP) for authentication or verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendOtp/).
4809
4613
  */
4810
4614
  async sendOtp(
4811
- { body, ci, requestHeaders } = { requestHeaders: {} },
4615
+ { body, requestHeaders } = { requestHeaders: {} },
4812
4616
  { responseHeaders } = { responseHeaders: false }
4813
4617
  ) {
4814
4618
  const {
@@ -4816,7 +4620,6 @@ class Communication {
4816
4620
  } = CommunicationPlatformApplicationValidator.sendOtp().validate(
4817
4621
  {
4818
4622
  body,
4819
- ci,
4820
4623
  },
4821
4624
  { abortEarly: false, allowUnknown: true }
4822
4625
  );
@@ -4830,7 +4633,6 @@ class Communication {
4830
4633
  } = CommunicationPlatformApplicationValidator.sendOtp().validate(
4831
4634
  {
4832
4635
  body,
4833
- ci,
4834
4636
  },
4835
4637
  { abortEarly: false, allowUnknown: false }
4836
4638
  );
@@ -4842,7 +4644,6 @@ class Communication {
4842
4644
  }
4843
4645
 
4844
4646
  const query_params = {};
4845
- query_params["ci"] = ci;
4846
4647
 
4847
4648
  const response = await PlatformAPIClient.execute(
4848
4649
  this.config,
@@ -4886,11 +4687,10 @@ class Communication {
4886
4687
  *
4887
4688
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4888
4689
  * @param {import("../PlatformAPIClient").Options} - Options
4889
- * @returns {Promise<CommunicationPlatformModel.TriggerJobResponse>} -
4890
- * Success response
4690
+ * @returns {Promise<CommunicationPlatformModel.TriggerJobResult>} - Success response
4891
4691
  * @name triggerCampaignJob
4892
- * @summary: Trigger campaign job.
4893
- * @description: Initiate a job to execute a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/triggerCampaignJob/).
4692
+ * @summary: Trigger a campaign job
4693
+ * @description: Initiates a job to execute a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/triggerCampaignJob/).
4894
4694
  */
4895
4695
  async triggerCampaignJob(
4896
4696
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4943,7 +4743,7 @@ class Communication {
4943
4743
 
4944
4744
  const {
4945
4745
  error: res_error,
4946
- } = CommunicationPlatformModel.TriggerJobResponse().validate(responseData, {
4746
+ } = CommunicationPlatformModel.TriggerJobResult().validate(responseData, {
4947
4747
  abortEarly: false,
4948
4748
  allowUnknown: true,
4949
4749
  });
@@ -4970,8 +4770,8 @@ class Communication {
4970
4770
  * @param {import("../PlatformAPIClient").Options} - Options
4971
4771
  * @returns {Promise<CommunicationPlatformModel.AppProvider>} - Success response
4972
4772
  * @name updateAppProviders
4973
- * @summary: Update application providers.
4974
- * @description: Modify provider information for the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateAppProviders/).
4773
+ * @summary: Update application providers
4774
+ * @description: Modify provider configuration using provider object id . - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateAppProviders/).
4975
4775
  */
4976
4776
  async updateAppProviders(
4977
4777
  { body, requestHeaders } = { requestHeaders: {} },
@@ -5043,89 +4843,6 @@ class Communication {
5043
4843
  return response;
5044
4844
  }
5045
4845
 
5046
- /**
5047
- * @param {CommunicationPlatformApplicationValidator.UpdateAppProvidersGlobalProviderParam} arg
5048
- * - Arg object
5049
- *
5050
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5051
- * @param {import("../PlatformAPIClient").Options} - Options
5052
- * @returns {Promise<CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponse>}
5053
- * - Success response
5054
- *
5055
- * @name updateAppProvidersGlobalProvider
5056
- * @summary: Get global app providers.
5057
- * @description: Retrieve a list of global app providers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateAppProvidersGlobalProvider/).
5058
- */
5059
- async updateAppProvidersGlobalProvider(
5060
- { body, requestHeaders } = { requestHeaders: {} },
5061
- { responseHeaders } = { responseHeaders: false }
5062
- ) {
5063
- const {
5064
- error,
5065
- } = CommunicationPlatformApplicationValidator.updateAppProvidersGlobalProvider().validate(
5066
- {
5067
- body,
5068
- },
5069
- { abortEarly: false, allowUnknown: true }
5070
- );
5071
- if (error) {
5072
- return Promise.reject(new FDKClientValidationError(error));
5073
- }
5074
-
5075
- // Showing warrnings if extra unknown parameters are found
5076
- const {
5077
- error: warrning,
5078
- } = CommunicationPlatformApplicationValidator.updateAppProvidersGlobalProvider().validate(
5079
- {
5080
- body,
5081
- },
5082
- { abortEarly: false, allowUnknown: false }
5083
- );
5084
- if (warrning) {
5085
- Logger({
5086
- level: "WARN",
5087
- message: `Parameter Validation warrnings for platform > Communication > updateAppProvidersGlobalProvider \n ${warrning}`,
5088
- });
5089
- }
5090
-
5091
- const query_params = {};
5092
-
5093
- const response = await PlatformAPIClient.execute(
5094
- this.config,
5095
- "put",
5096
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/app-provider/global-providers`,
5097
- query_params,
5098
- body,
5099
- requestHeaders,
5100
- { responseHeaders }
5101
- );
5102
-
5103
- let responseData = response;
5104
- if (responseHeaders) {
5105
- responseData = response[0];
5106
- }
5107
-
5108
- const {
5109
- error: res_error,
5110
- } = CommunicationPlatformModel.UpdateAppProvidersGlobalProviderResponse().validate(
5111
- responseData,
5112
- { abortEarly: false, allowUnknown: true }
5113
- );
5114
-
5115
- if (res_error) {
5116
- if (this.config.options.strictResponseCheck === true) {
5117
- return Promise.reject(new FDKResponseValidationError(res_error));
5118
- } else {
5119
- Logger({
5120
- level: "WARN",
5121
- message: `Response Validation Warnings for platform > Communication > updateAppProvidersGlobalProvider \n ${res_error}`,
5122
- });
5123
- }
5124
- }
5125
-
5126
- return response;
5127
- }
5128
-
5129
4846
  /**
5130
4847
  * @param {CommunicationPlatformApplicationValidator.UpdateAudienceByIdParam} arg
5131
4848
  * - Arg object
@@ -5134,8 +4851,8 @@ class Communication {
5134
4851
  * @param {import("../PlatformAPIClient").Options} - Options
5135
4852
  * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
5136
4853
  * @name updateAudienceById
5137
- * @summary: Update audience by ID.
5138
- * @description: Modify the settings of a specific custom communication audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateAudienceById/).
4854
+ * @summary: Update an audience
4855
+ * @description: Modify the configuration of a specific audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateAudienceById/).
5139
4856
  */
5140
4857
  async updateAudienceById(
5141
4858
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5217,8 +4934,8 @@ class Communication {
5217
4934
  * @param {import("../PlatformAPIClient").Options} - Options
5218
4935
  * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
5219
4936
  * @name updateCampaignById
5220
- * @summary: Update campaign by ID.
5221
- * @description: Modify the settings of a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateCampaignById/).
4937
+ * @summary: Update a campaign
4938
+ * @description: Modify the configuration of a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateCampaignById/).
5222
4939
  */
5223
4940
  async updateCampaignById(
5224
4941
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5300,8 +5017,8 @@ class Communication {
5300
5017
  * @param {import("../PlatformAPIClient").Options} - Options
5301
5018
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
5302
5019
  * @name updateEmailProviderById
5303
- * @summary: Update email provider by ID.
5304
- * @description: Modify the settings of a specific email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateEmailProviderById/).
5020
+ * @summary: Update email provider
5021
+ * @description: Modifys the configurations of a specific email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateEmailProviderById/).
5305
5022
  */
5306
5023
  async updateEmailProviderById(
5307
5024
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5383,8 +5100,8 @@ class Communication {
5383
5100
  * @param {import("../PlatformAPIClient").Options} - Options
5384
5101
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
5385
5102
  * @name updateEmailTemplateById
5386
- * @summary: Update email template by ID.
5387
- * @description: Modify the content and settings of a specific email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateEmailTemplateById/).
5103
+ * @summary: Update an email template
5104
+ * @description: Modifys the content and settings of a specific email communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateEmailTemplateById/).
5388
5105
  */
5389
5106
  async updateEmailTemplateById(
5390
5107
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5466,19 +5183,17 @@ class Communication {
5466
5183
  * @param {import("../PlatformAPIClient").Options} - Options
5467
5184
  * @returns {Promise<CommunicationPlatformModel.OtpConfiguration>} - Success response
5468
5185
  * @name updateOtpConfiguration
5469
- * @summary: Update/insert otp configurations
5470
- * @description: Update otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateOtpConfiguration/).
5186
+ * @summary: Update configuration of otp
5187
+ * @description: Updates all configurations related to OTP. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateOtpConfiguration/).
5471
5188
  */
5472
5189
  async updateOtpConfiguration(
5473
- { body, requestHeaders } = { requestHeaders: {} },
5190
+ { requestHeaders } = { requestHeaders: {} },
5474
5191
  { responseHeaders } = { responseHeaders: false }
5475
5192
  ) {
5476
5193
  const {
5477
5194
  error,
5478
5195
  } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate(
5479
- {
5480
- body,
5481
- },
5196
+ {},
5482
5197
  { abortEarly: false, allowUnknown: true }
5483
5198
  );
5484
5199
  if (error) {
@@ -5489,9 +5204,7 @@ class Communication {
5489
5204
  const {
5490
5205
  error: warrning,
5491
5206
  } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate(
5492
- {
5493
- body,
5494
- },
5207
+ {},
5495
5208
  { abortEarly: false, allowUnknown: false }
5496
5209
  );
5497
5210
  if (warrning) {
@@ -5508,7 +5221,7 @@ class Communication {
5508
5221
  "put",
5509
5222
  `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/otp/otp-configuration`,
5510
5223
  query_params,
5511
- body,
5224
+ undefined,
5512
5225
  requestHeaders,
5513
5226
  { responseHeaders }
5514
5227
  );
@@ -5545,10 +5258,10 @@ class Communication {
5545
5258
  *
5546
5259
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5547
5260
  * @param {import("../PlatformAPIClient").Options} - Options
5548
- * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
5261
+ * @returns {Promise<Object>} - Success response
5549
5262
  * @name updateSmsProviderById
5550
- * @summary: Update SMS provider by ID.
5551
- * @description: Modify specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateSmsProviderById/).
5263
+ * @summary: Update SMS provider
5264
+ * @description: Modifys the configurations of a specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateSmsProviderById/).
5552
5265
  */
5553
5266
  async updateSmsProviderById(
5554
5267
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5601,9 +5314,7 @@ class Communication {
5601
5314
  responseData = response[0];
5602
5315
  }
5603
5316
 
5604
- const {
5605
- error: res_error,
5606
- } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
5317
+ const { error: res_error } = Joi.any().validate(responseData, {
5607
5318
  abortEarly: false,
5608
5319
  allowUnknown: true,
5609
5320
  });
@@ -5630,8 +5341,8 @@ class Communication {
5630
5341
  * @param {import("../PlatformAPIClient").Options} - Options
5631
5342
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
5632
5343
  * @name updateSmsTemplateById
5633
- * @summary: Update SMS template by ID.
5634
- * @description: Modify the content and settings of a specific SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateSmsTemplateById/).
5344
+ * @summary: Update a SMS template
5345
+ * @description: Modifys the content and settings of a specific SMS communication template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateSmsTemplateById/).
5635
5346
  */
5636
5347
  async updateSmsTemplateById(
5637
5348
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5713,8 +5424,8 @@ class Communication {
5713
5424
  * - Success response
5714
5425
  *
5715
5426
  * @name verfiyOtp
5716
- * @summary: Verify OTP.
5717
- * @description: Verify the one-time password (OTP) for authentication or verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/verfiyOtp/).
5427
+ * @summary: Verify OTP
5428
+ * @description: Verifies the one-time password (OTP) for authentication or verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/verfiyOtp/).
5718
5429
  */
5719
5430
  async verfiyOtp(
5720
5431
  { body, requestHeaders } = { requestHeaders: {} },