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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
  6. package/sdk/application/Cart/CartApplicationClient.js +270 -139
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +3 -3
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
  16. package/sdk/application/Content/ContentApplicationClient.js +197 -36
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
  20. package/sdk/application/Lead/LeadApplicationClient.js +3 -3
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
  24. package/sdk/application/Order/OrderApplicationClient.js +140 -21
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
  26. package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +14 -14
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
  32. package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
  33. package/sdk/application/User/UserApplicationClient.d.ts +13 -23
  34. package/sdk/application/User/UserApplicationClient.js +9 -57
  35. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  36. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  37. package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
  38. package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
  39. package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
  40. package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
  41. package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
  42. package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
  43. package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
  44. package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
  45. package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
  46. package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
  47. package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
  48. package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
  49. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
  50. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
  51. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
  52. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
  53. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
  54. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
  55. package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
  56. package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
  57. package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
  58. package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
  59. package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
  60. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
  61. package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
  62. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
  63. package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
  64. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
  65. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
  66. package/sdk/partner/PartnerClient.d.ts +6 -0
  67. package/sdk/partner/PartnerClient.js +9 -0
  68. package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
  69. package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
  70. package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
  71. package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
  72. package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
  73. package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
  74. package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
  75. package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
  76. package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
  77. package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
  78. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
  79. package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
  80. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
  81. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
  82. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
  83. package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
  84. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
  85. package/sdk/partner/index.d.ts +3 -0
  86. package/sdk/partner/index.js +6 -0
  87. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
  88. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  89. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  90. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
  91. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  92. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  93. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
  94. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
  95. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  96. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  97. package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
  98. package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
  99. package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
  100. package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
  101. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
  102. package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
  103. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
  104. package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
  105. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
  106. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
  107. package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
  108. package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
  109. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
  110. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
  111. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
  112. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
  113. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
  114. package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
  115. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
  116. package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
  117. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
  118. package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
  119. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
  120. package/sdk/platform/Common/CommonPlatformClient.js +5 -6
  121. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  122. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  123. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
  124. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
  125. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
  126. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
  127. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
  128. package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
  129. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
  130. package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
  131. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
  132. package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
  133. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
  134. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
  135. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
  136. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
  137. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
  138. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
  139. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
  140. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
  141. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
  142. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
  143. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
  144. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
  145. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
  146. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
  147. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
  148. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
  149. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
  150. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
  151. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
  152. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
  153. package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
  154. package/sdk/platform/Content/ContentPlatformClient.js +459 -379
  155. package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
  156. package/sdk/platform/Content/ContentPlatformModel.js +893 -582
  157. package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
  158. package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
  159. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
  160. package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
  161. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
  162. package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
  163. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  164. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  165. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
  166. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
  167. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
  168. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
  169. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
  170. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
  171. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
  172. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
  173. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  174. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  175. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  176. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  177. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
  178. package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
  179. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  180. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  181. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
  182. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
  183. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
  184. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
  185. package/sdk/platform/Lead/LeadPlatformClient.d.ts +4 -24
  186. package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
  187. package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
  188. package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
  189. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
  190. package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
  191. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
  192. package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
  193. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
  194. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
  195. package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
  196. package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
  197. package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
  198. package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
  199. package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
  200. package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
  201. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  202. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  203. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  204. package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
  205. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
  206. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
  207. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
  208. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
  209. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
  210. package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
  211. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
  212. package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
  213. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
  214. package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
  215. package/sdk/platform/PlatformClient.d.ts +2 -0
  216. package/sdk/platform/PlatformClient.js +4 -0
  217. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  218. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  219. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  220. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  221. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
  222. package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
  223. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
  224. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
  225. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
  226. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
  227. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
  228. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
  229. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
  230. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
  231. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
  232. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
  233. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
  234. package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
  235. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
  236. package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
  237. package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
  238. package/sdk/platform/Share/SharePlatformModel.js +3 -43
  239. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
  240. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
  241. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
  242. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
  243. package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
  244. package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
  245. package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
  246. package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
  247. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
  248. package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
  249. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
  250. package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
  251. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
  252. package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
  253. package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
  254. package/sdk/platform/User/UserPlatformModel.js +209 -216
  255. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  256. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  257. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
  258. package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
  259. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  260. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  261. package/sdk/platform/index.d.ts +1 -0
  262. package/sdk/platform/index.js +2 -0
  263. package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
  264. package/sdk/public/Billing/BillingPublicClient.js +397 -0
  265. package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
  266. package/sdk/public/Billing/BillingPublicModel.js +560 -0
  267. package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
  268. package/sdk/public/Billing/BillingPublicValidator.js +50 -0
  269. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
  270. package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
  271. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
  272. package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
  273. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
  274. package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
  275. package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
  276. package/sdk/public/Content/ContentPublicClient.js +183 -0
  277. package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
  278. package/sdk/public/Content/ContentPublicModel.js +47 -1
  279. package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
  280. package/sdk/public/Content/ContentPublicValidator.js +19 -0
  281. package/sdk/public/PublicClient.d.ts +2 -2
  282. package/sdk/public/PublicClient.js +2 -2
  283. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  284. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  285. package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
  286. package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
  287. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  288. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  289. package/sdk/public/index.d.ts +1 -1
  290. package/sdk/public/index.js +1 -1
  291. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  292. package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
  293. package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
  294. package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
  295. package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
  296. package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
  297. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
  298. package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
@@ -16,23 +16,23 @@ class Communication {
16
16
  }
17
17
 
18
18
  /**
19
- * @param {CommunicationPlatformApplicationValidator.CreateAudienceParam} arg
19
+ * @param {CommunicationPlatformApplicationValidator.CreateAppPushtokenParam} 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.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/).
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/).
28
28
  */
29
- async createAudience(
29
+ async createAppPushtoken(
30
30
  { body, requestHeaders } = { requestHeaders: {} },
31
31
  { responseHeaders } = { responseHeaders: false }
32
32
  ) {
33
33
  const {
34
34
  error,
35
- } = CommunicationPlatformApplicationValidator.createAudience().validate(
35
+ } = CommunicationPlatformApplicationValidator.createAppPushtoken().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.createAudience().validate(
48
+ } = CommunicationPlatformApplicationValidator.createAppPushtoken().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 > createAudience \n ${warrning}`,
57
+ message: `Parameter Validation warrnings for platform > Communication > createAppPushtoken \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}/sources/datasources`,
66
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pn/tokens`,
67
67
  query_params,
68
68
  body,
69
69
  requestHeaders,
@@ -77,82 +77,7 @@ class Communication {
77
77
 
78
78
  const {
79
79
  error: res_error,
80
- } = CommunicationPlatformModel.Audience().validate(responseData, {
81
- abortEarly: false,
82
- allowUnknown: true,
83
- });
84
-
85
- if (res_error) {
86
- if (this.config.options.strictResponseCheck === true) {
87
- return Promise.reject(new FDKResponseValidationError(res_error));
88
- } else {
89
- Logger({
90
- level: "WARN",
91
- message: `Response Validation Warnings for platform > Communication > createAudience \n ${res_error}`,
92
- });
93
- }
94
- }
95
-
96
- return response;
97
- }
98
-
99
- /**
100
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryHeadersParam} arg
101
- * - Arg object
102
- *
103
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
104
- * @param {import("../PlatformAPIClient").Options} - Options
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
- */
110
- async createBigQueryHeaders(
111
- { requestHeaders } = { requestHeaders: {} },
112
- { responseHeaders } = { responseHeaders: false }
113
- ) {
114
- const {
115
- error,
116
- } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
117
- {},
118
- { abortEarly: false, allowUnknown: true }
119
- );
120
- if (error) {
121
- return Promise.reject(new FDKClientValidationError(error));
122
- }
123
-
124
- // Showing warrnings if extra unknown parameters are found
125
- const {
126
- error: warrning,
127
- } = CommunicationPlatformApplicationValidator.createBigQueryHeaders().validate(
128
- {},
129
- { abortEarly: false, allowUnknown: false }
130
- );
131
- if (warrning) {
132
- Logger({
133
- level: "WARN",
134
- message: `Parameter Validation warrnings for platform > Communication > createBigQueryHeaders \n ${warrning}`,
135
- });
136
- }
137
-
138
- const query_params = {};
139
-
140
- const response = await PlatformAPIClient.execute(
141
- this.config,
142
- "post",
143
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers`,
144
- query_params,
145
- undefined,
146
- requestHeaders,
147
- { responseHeaders }
148
- );
149
-
150
- let responseData = response;
151
- if (responseHeaders) {
152
- responseData = response[0];
153
- }
154
-
155
- const { error: res_error } = Joi.any().validate(responseData, {
80
+ } = CommunicationPlatformModel.PushtokenRes().validate(responseData, {
156
81
  abortEarly: false,
157
82
  allowUnknown: true,
158
83
  });
@@ -163,7 +88,7 @@ class Communication {
163
88
  } else {
164
89
  Logger({
165
90
  level: "WARN",
166
- message: `Response Validation Warnings for platform > Communication > createBigQueryHeaders \n ${res_error}`,
91
+ message: `Response Validation Warnings for platform > Communication > createAppPushtoken \n ${res_error}`,
167
92
  });
168
93
  }
169
94
  }
@@ -172,24 +97,26 @@ class Communication {
172
97
  }
173
98
 
174
99
  /**
175
- * @param {CommunicationPlatformApplicationValidator.CreateBigQueryNCountParam} arg
100
+ * @param {CommunicationPlatformApplicationValidator.CreateAudienceParam} arg
176
101
  * - Arg object
177
102
  *
178
103
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
179
104
  * @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/).
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/).
184
109
  */
185
- async createBigQueryNCount(
186
- { requestHeaders } = { requestHeaders: {} },
110
+ async createAudience(
111
+ { body, requestHeaders } = { requestHeaders: {} },
187
112
  { responseHeaders } = { responseHeaders: false }
188
113
  ) {
189
114
  const {
190
115
  error,
191
- } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
192
- {},
116
+ } = CommunicationPlatformApplicationValidator.createAudience().validate(
117
+ {
118
+ body,
119
+ },
193
120
  { abortEarly: false, allowUnknown: true }
194
121
  );
195
122
  if (error) {
@@ -199,14 +126,16 @@ class Communication {
199
126
  // Showing warrnings if extra unknown parameters are found
200
127
  const {
201
128
  error: warrning,
202
- } = CommunicationPlatformApplicationValidator.createBigQueryNCount().validate(
203
- {},
129
+ } = CommunicationPlatformApplicationValidator.createAudience().validate(
130
+ {
131
+ body,
132
+ },
204
133
  { abortEarly: false, allowUnknown: false }
205
134
  );
206
135
  if (warrning) {
207
136
  Logger({
208
137
  level: "WARN",
209
- message: `Parameter Validation warrnings for platform > Communication > createBigQueryNCount \n ${warrning}`,
138
+ message: `Parameter Validation warrnings for platform > Communication > createAudience \n ${warrning}`,
210
139
  });
211
140
  }
212
141
 
@@ -215,9 +144,9 @@ class Communication {
215
144
  const response = await PlatformAPIClient.execute(
216
145
  this.config,
217
146
  "post",
218
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-n-records`,
147
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources`,
219
148
  query_params,
220
- undefined,
149
+ body,
221
150
  requestHeaders,
222
151
  { responseHeaders }
223
152
  );
@@ -227,82 +156,9 @@ class Communication {
227
156
  responseData = response[0];
228
157
  }
229
158
 
230
- const { error: res_error } = Joi.any().validate(responseData, {
231
- abortEarly: false,
232
- allowUnknown: true,
233
- });
234
-
235
- if (res_error) {
236
- if (this.config.options.strictResponseCheck === true) {
237
- return Promise.reject(new FDKResponseValidationError(res_error));
238
- } else {
239
- Logger({
240
- level: "WARN",
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
159
  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, {
160
+ error: res_error,
161
+ } = CommunicationPlatformModel.Audience().validate(responseData, {
306
162
  abortEarly: false,
307
163
  allowUnknown: true,
308
164
  });
@@ -313,7 +169,7 @@ class Communication {
313
169
  } else {
314
170
  Logger({
315
171
  level: "WARN",
316
- message: `Response Validation Warnings for platform > Communication > createBigQueryRowCount \n ${res_error}`,
172
+ message: `Response Validation Warnings for platform > Communication > createAudience \n ${res_error}`,
317
173
  });
318
174
  }
319
175
  }
@@ -329,8 +185,8 @@ class Communication {
329
185
  * @param {import("../PlatformAPIClient").Options} - Options
330
186
  * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
331
187
  * @name 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/).
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/).
334
190
  */
335
191
  async createCampaign(
336
192
  { body, requestHeaders } = { requestHeaders: {} },
@@ -410,8 +266,8 @@ class Communication {
410
266
  * @param {import("../PlatformAPIClient").Options} - Options
411
267
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
412
268
  * @name 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/).
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/).
415
271
  */
416
272
  async createEmailProvider(
417
273
  { body, requestHeaders } = { requestHeaders: {} },
@@ -491,8 +347,8 @@ class Communication {
491
347
  * @param {import("../PlatformAPIClient").Options} - Options
492
348
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
493
349
  * @name 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/).
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/).
496
352
  */
497
353
  async createEmailTemplate(
498
354
  { body, requestHeaders } = { requestHeaders: {} },
@@ -570,12 +426,12 @@ class Communication {
570
426
  *
571
427
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
572
428
  * @param {import("../PlatformAPIClient").Options} - Options
573
- * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult>}
429
+ * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse>}
574
430
  * - Success response
575
431
  *
576
432
  * @name 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/).
433
+ * @summary: Create event subscriptions
434
+ * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/).
579
435
  */
580
436
  async createEventSubscriptions(
581
437
  { body, requestHeaders } = { requestHeaders: {} },
@@ -628,7 +484,7 @@ class Communication {
628
484
 
629
485
  const {
630
486
  error: res_error,
631
- } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate(
487
+ } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate(
632
488
  responseData,
633
489
  { abortEarly: false, allowUnknown: true }
634
490
  );
@@ -654,13 +510,13 @@ class Communication {
654
510
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
655
511
  * @param {import("../PlatformAPIClient").Options} - Options
656
512
  * @returns {Promise<
657
- * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult[]
513
+ * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[]
658
514
  * >}
659
515
  * - Success response
660
516
  *
661
517
  * @name 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/).
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/).
664
520
  */
665
521
  async createEventSubscriptionsByBulk(
666
522
  { body, requestHeaders } = { requestHeaders: {} },
@@ -712,7 +568,7 @@ class Communication {
712
568
  }
713
569
 
714
570
  const { error: res_error } = Joi.array()
715
- .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult())
571
+ .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse())
716
572
  .validate(responseData, { abortEarly: false, allowUnknown: true });
717
573
 
718
574
  if (res_error) {
@@ -735,8 +591,8 @@ class Communication {
735
591
  * @param {import("../PlatformAPIClient").Options} - Options
736
592
  * @returns {Promise<CommunicationPlatformModel.CreateJobsRes>} - Success response
737
593
  * @name 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/).
594
+ * @summary: Create jobs
595
+ * @description: Create jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createJobs/).
740
596
  */
741
597
  async createJobs(
742
598
  { body, requestHeaders } = { requestHeaders: {} },
@@ -814,10 +670,10 @@ class Communication {
814
670
  *
815
671
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
816
672
  * @param {import("../PlatformAPIClient").Options} - Options
817
- * @returns {Promise<Object>} - Success response
673
+ * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
818
674
  * @name 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/).
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/).
821
677
  */
822
678
  async createSmsProvider(
823
679
  { body, requestHeaders } = { requestHeaders: {} },
@@ -868,7 +724,9 @@ class Communication {
868
724
  responseData = response[0];
869
725
  }
870
726
 
871
- const { error: res_error } = Joi.any().validate(responseData, {
727
+ const {
728
+ error: res_error,
729
+ } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
872
730
  abortEarly: false,
873
731
  allowUnknown: true,
874
732
  });
@@ -895,8 +753,8 @@ class Communication {
895
753
  * @param {import("../PlatformAPIClient").Options} - Options
896
754
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
897
755
  * @name 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/).
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/).
900
758
  */
901
759
  async createSmsTemplate(
902
760
  { body, requestHeaders } = { requestHeaders: {} },
@@ -974,10 +832,10 @@ class Communication {
974
832
  *
975
833
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
976
834
  * @param {import("../PlatformAPIClient").Options} - Options
977
- * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
835
+ * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
978
836
  * @name 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/).
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/).
981
839
  */
982
840
  async deleteAudienceById(
983
841
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -1032,7 +890,7 @@ class Communication {
1032
890
 
1033
891
  const {
1034
892
  error: res_error,
1035
- } = CommunicationPlatformModel.Audience().validate(responseData, {
893
+ } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1036
894
  abortEarly: false,
1037
895
  allowUnknown: true,
1038
896
  });
@@ -1051,16 +909,97 @@ class Communication {
1051
909
  return response;
1052
910
  }
1053
911
 
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
+
1054
993
  /**
1055
994
  * @param {CommunicationPlatformApplicationValidator.DeleteEmailProviderByIdParam} arg
1056
995
  * - Arg object
1057
996
  *
1058
997
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1059
998
  * @param {import("../PlatformAPIClient").Options} - Options
1060
- * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
999
+ * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1061
1000
  * @name 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/).
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/).
1064
1003
  */
1065
1004
  async deleteEmailProviderById(
1066
1005
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1113,7 +1052,7 @@ class Communication {
1113
1052
 
1114
1053
  const {
1115
1054
  error: res_error,
1116
- } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1055
+ } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1117
1056
  abortEarly: false,
1118
1057
  allowUnknown: true,
1119
1058
  });
@@ -1138,10 +1077,10 @@ class Communication {
1138
1077
  *
1139
1078
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1140
1079
  * @param {import("../PlatformAPIClient").Options} - Options
1141
- * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1080
+ * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1142
1081
  * @name 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/).
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/).
1145
1084
  */
1146
1085
  async deleteEmailTemplateById(
1147
1086
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1194,7 +1133,7 @@ class Communication {
1194
1133
 
1195
1134
  const {
1196
1135
  error: res_error,
1197
- } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1136
+ } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1198
1137
  abortEarly: false,
1199
1138
  allowUnknown: true,
1200
1139
  });
@@ -1219,10 +1158,10 @@ class Communication {
1219
1158
  *
1220
1159
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1221
1160
  * @param {import("../PlatformAPIClient").Options} - Options
1222
- * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1161
+ * @returns {Promise<CommunicationPlatformModel.EventSubscription>} - Success response
1223
1162
  * @name 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/).
1163
+ * @summary: Create event subscriptions
1164
+ * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEventSubscriptionsById/).
1226
1165
  */
1227
1166
  async deleteEventSubscriptionsById(
1228
1167
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1275,7 +1214,7 @@ class Communication {
1275
1214
 
1276
1215
  const {
1277
1216
  error: res_error,
1278
- } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1217
+ } = CommunicationPlatformModel.EventSubscription().validate(responseData, {
1279
1218
  abortEarly: false,
1280
1219
  allowUnknown: true,
1281
1220
  });
@@ -1300,10 +1239,10 @@ class Communication {
1300
1239
  *
1301
1240
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1302
1241
  * @param {import("../PlatformAPIClient").Options} - Options
1303
- * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1242
+ * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1304
1243
  * @name 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/).
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/).
1307
1246
  */
1308
1247
  async deleteSmsProviderById(
1309
1248
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1356,7 +1295,7 @@ class Communication {
1356
1295
 
1357
1296
  const {
1358
1297
  error: res_error,
1359
- } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1298
+ } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1360
1299
  abortEarly: false,
1361
1300
  allowUnknown: true,
1362
1301
  });
@@ -1381,10 +1320,10 @@ class Communication {
1381
1320
  *
1382
1321
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1383
1322
  * @param {import("../PlatformAPIClient").Options} - Options
1384
- * @returns {Promise<CommunicationPlatformModel.GenericDelete>} - Success response
1323
+ * @returns {Promise<CommunicationPlatformModel.BasicDelete>} - Success response
1385
1324
  * @name 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/).
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/).
1388
1327
  */
1389
1328
  async deleteSmsTemplateById(
1390
1329
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1437,7 +1376,7 @@ class Communication {
1437
1376
 
1438
1377
  const {
1439
1378
  error: res_error,
1440
- } = CommunicationPlatformModel.GenericDelete().validate(responseData, {
1379
+ } = CommunicationPlatformModel.BasicDelete().validate(responseData, {
1441
1380
  abortEarly: false,
1442
1381
  allowUnknown: true,
1443
1382
  });
@@ -1462,12 +1401,12 @@ class Communication {
1462
1401
  *
1463
1402
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1464
1403
  * @param {import("../PlatformAPIClient").Options} - Options
1465
- * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult>}
1404
+ * @returns {Promise<CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse>}
1466
1405
  * - Success response
1467
1406
  *
1468
1407
  * @name 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/).
1408
+ * @summary: Create event subscriptions
1409
+ * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/).
1471
1410
  */
1472
1411
  async editEventSubscriptions(
1473
1412
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -1522,7 +1461,7 @@ class Communication {
1522
1461
 
1523
1462
  const {
1524
1463
  error: res_error,
1525
- } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate(
1464
+ } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate(
1526
1465
  responseData,
1527
1466
  { abortEarly: false, allowUnknown: true }
1528
1467
  );
@@ -1549,8 +1488,8 @@ class Communication {
1549
1488
  * @param {import("../PlatformAPIClient").Options} - Options
1550
1489
  * @returns {Promise<CommunicationPlatformModel.AppProvider>} - Success response
1551
1490
  * @name 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/).
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/).
1554
1493
  */
1555
1494
  async getAppProviders(
1556
1495
  { requestHeaders } = { requestHeaders: {} },
@@ -1626,8 +1565,8 @@ class Communication {
1626
1565
  * @param {import("../PlatformAPIClient").Options} - Options
1627
1566
  * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
1628
1567
  * @name 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/).
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/).
1631
1570
  */
1632
1571
  async getAudienceById(
1633
1572
  { id, requestHeaders } = { requestHeaders: {} },
@@ -1707,8 +1646,8 @@ class Communication {
1707
1646
  * @param {import("../PlatformAPIClient").Options} - Options
1708
1647
  * @returns {Promise<CommunicationPlatformModel.Audiences>} - Success response
1709
1648
  * @name 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/).
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/).
1712
1651
  */
1713
1652
  async getAudiences(
1714
1653
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -1791,23 +1730,64 @@ class Communication {
1791
1730
  }
1792
1731
 
1793
1732
  /**
1794
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam} arg
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.
1742
+ */
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,
1766
+ });
1767
+ return data;
1768
+ };
1769
+ paginator.setCallback(callback.bind(this));
1770
+ return paginator;
1771
+ }
1772
+
1773
+ /**
1774
+ * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
1795
1775
  * - Arg object
1796
1776
  *
1797
1777
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1798
1778
  * @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/).
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/).
1803
1783
  */
1804
- async getBigQueryHeadersById(
1784
+ async getCampaignById(
1805
1785
  { id, requestHeaders } = { requestHeaders: {} },
1806
1786
  { responseHeaders } = { responseHeaders: false }
1807
1787
  ) {
1808
1788
  const {
1809
1789
  error,
1810
- } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1790
+ } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1811
1791
  {
1812
1792
  id,
1813
1793
  },
@@ -1820,7 +1800,7 @@ class Communication {
1820
1800
  // Showing warrnings if extra unknown parameters are found
1821
1801
  const {
1822
1802
  error: warrning,
1823
- } = CommunicationPlatformApplicationValidator.getBigQueryHeadersById().validate(
1803
+ } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1824
1804
  {
1825
1805
  id,
1826
1806
  },
@@ -1829,7 +1809,7 @@ class Communication {
1829
1809
  if (warrning) {
1830
1810
  Logger({
1831
1811
  level: "WARN",
1832
- message: `Parameter Validation warrnings for platform > Communication > getBigQueryHeadersById \n ${warrning}`,
1812
+ message: `Parameter Validation warrnings for platform > Communication > getCampaignById \n ${warrning}`,
1833
1813
  });
1834
1814
  }
1835
1815
 
@@ -1838,7 +1818,7 @@ class Communication {
1838
1818
  const response = await PlatformAPIClient.execute(
1839
1819
  this.config,
1840
1820
  "get",
1841
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-headers/${id}`,
1821
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns/${id}`,
1842
1822
  query_params,
1843
1823
  undefined,
1844
1824
  requestHeaders,
@@ -1850,7 +1830,9 @@ class Communication {
1850
1830
  responseData = response[0];
1851
1831
  }
1852
1832
 
1853
- const { error: res_error } = Joi.any().validate(responseData, {
1833
+ const {
1834
+ error: res_error,
1835
+ } = CommunicationPlatformModel.Campaign().validate(responseData, {
1854
1836
  abortEarly: false,
1855
1837
  allowUnknown: true,
1856
1838
  });
@@ -1861,7 +1843,7 @@ class Communication {
1861
1843
  } else {
1862
1844
  Logger({
1863
1845
  level: "WARN",
1864
- message: `Response Validation Warnings for platform > Communication > getBigQueryHeadersById \n ${res_error}`,
1846
+ message: `Response Validation Warnings for platform > Communication > getCampaignById \n ${res_error}`,
1865
1847
  });
1866
1848
  }
1867
1849
  }
@@ -1870,104 +1852,28 @@ class Communication {
1870
1852
  }
1871
1853
 
1872
1854
  /**
1873
- * @param {CommunicationPlatformApplicationValidator.GetBigQueryRowCountByIdParam} arg
1855
+ * @param {CommunicationPlatformApplicationValidator.GetCampaignsParam} arg
1874
1856
  * - Arg object
1875
1857
  *
1876
1858
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1877
1859
  * @param {import("../PlatformAPIClient").Options} - Options
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/).
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/).
1882
1864
  */
1883
- async getBigQueryRowCountById(
1884
- { id, requestHeaders } = { requestHeaders: {} },
1885
- { responseHeaders } = { responseHeaders: false }
1886
- ) {
1887
- const {
1888
- error,
1889
- } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1890
- {
1891
- id,
1892
- },
1893
- { abortEarly: false, allowUnknown: true }
1894
- );
1895
- if (error) {
1896
- return Promise.reject(new FDKClientValidationError(error));
1897
- }
1898
-
1899
- // Showing warrnings if extra unknown parameters are found
1900
- const {
1901
- error: warrning,
1902
- } = CommunicationPlatformApplicationValidator.getBigQueryRowCountById().validate(
1903
- {
1904
- id,
1905
- },
1906
- { abortEarly: false, allowUnknown: false }
1907
- );
1908
- if (warrning) {
1909
- Logger({
1910
- level: "WARN",
1911
- message: `Parameter Validation warrnings for platform > Communication > getBigQueryRowCountById \n ${warrning}`,
1912
- });
1913
- }
1914
-
1915
- const query_params = {};
1916
-
1917
- const response = await PlatformAPIClient.execute(
1918
- this.config,
1919
- "get",
1920
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/bigquery-row-count/${id}`,
1921
- query_params,
1922
- undefined,
1923
- requestHeaders,
1924
- { responseHeaders }
1925
- );
1926
-
1927
- let responseData = response;
1928
- if (responseHeaders) {
1929
- responseData = response[0];
1930
- }
1931
-
1932
- const { error: res_error } = Joi.any().validate(responseData, {
1933
- abortEarly: false,
1934
- allowUnknown: true,
1935
- });
1936
-
1937
- if (res_error) {
1938
- if (this.config.options.strictResponseCheck === true) {
1939
- return Promise.reject(new FDKResponseValidationError(res_error));
1940
- } else {
1941
- Logger({
1942
- level: "WARN",
1943
- message: `Response Validation Warnings for platform > Communication > getBigQueryRowCountById \n ${res_error}`,
1944
- });
1945
- }
1946
- }
1947
-
1948
- return response;
1949
- }
1950
-
1951
- /**
1952
- * @param {CommunicationPlatformApplicationValidator.GetCampaignByIdParam} arg
1953
- * - Arg object
1954
- *
1955
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1956
- * @param {import("../PlatformAPIClient").Options} - Options
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/).
1961
- */
1962
- async getCampaignById(
1963
- { id, requestHeaders } = { requestHeaders: {} },
1865
+ async getCampaigns(
1866
+ { query, pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} },
1964
1867
  { responseHeaders } = { responseHeaders: false }
1965
1868
  ) {
1966
1869
  const {
1967
1870
  error,
1968
- } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1871
+ } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1969
1872
  {
1970
- id,
1873
+ query,
1874
+ pageNo,
1875
+ pageSize,
1876
+ sort,
1971
1877
  },
1972
1878
  { abortEarly: false, allowUnknown: true }
1973
1879
  );
@@ -1978,25 +1884,32 @@ class Communication {
1978
1884
  // Showing warrnings if extra unknown parameters are found
1979
1885
  const {
1980
1886
  error: warrning,
1981
- } = CommunicationPlatformApplicationValidator.getCampaignById().validate(
1887
+ } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1982
1888
  {
1983
- id,
1889
+ query,
1890
+ pageNo,
1891
+ pageSize,
1892
+ sort,
1984
1893
  },
1985
1894
  { abortEarly: false, allowUnknown: false }
1986
1895
  );
1987
1896
  if (warrning) {
1988
1897
  Logger({
1989
1898
  level: "WARN",
1990
- message: `Parameter Validation warrnings for platform > Communication > getCampaignById \n ${warrning}`,
1899
+ message: `Parameter Validation warrnings for platform > Communication > getCampaigns \n ${warrning}`,
1991
1900
  });
1992
1901
  }
1993
1902
 
1994
1903
  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;
1995
1908
 
1996
1909
  const response = await PlatformAPIClient.execute(
1997
1910
  this.config,
1998
1911
  "get",
1999
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns/${id}`,
1912
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns`,
2000
1913
  query_params,
2001
1914
  undefined,
2002
1915
  requestHeaders,
@@ -2010,7 +1923,7 @@ class Communication {
2010
1923
 
2011
1924
  const {
2012
1925
  error: res_error,
2013
- } = CommunicationPlatformModel.Campaign().validate(responseData, {
1926
+ } = CommunicationPlatformModel.Campaigns().validate(responseData, {
2014
1927
  abortEarly: false,
2015
1928
  allowUnknown: true,
2016
1929
  });
@@ -2021,7 +1934,7 @@ class Communication {
2021
1934
  } else {
2022
1935
  Logger({
2023
1936
  level: "WARN",
2024
- message: `Response Validation Warnings for platform > Communication > getCampaignById \n ${res_error}`,
1937
+ message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`,
2025
1938
  });
2026
1939
  }
2027
1940
  }
@@ -2030,28 +1943,28 @@ class Communication {
2030
1943
  }
2031
1944
 
2032
1945
  /**
2033
- * @param {CommunicationPlatformApplicationValidator.GetCampaignsParam} arg
1946
+ * @param {CommunicationPlatformApplicationValidator.GetCommunicationLogsParam} arg
2034
1947
  * - Arg object
2035
1948
  *
2036
1949
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2037
1950
  * @param {import("../PlatformAPIClient").Options} - Options
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/).
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/).
2042
1955
  */
2043
- async getCampaigns(
2044
- { query, pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} },
1956
+ async getCommunicationLogs(
1957
+ { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
2045
1958
  { responseHeaders } = { responseHeaders: false }
2046
1959
  ) {
2047
1960
  const {
2048
1961
  error,
2049
- } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1962
+ } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2050
1963
  {
2051
- query,
2052
1964
  pageNo,
2053
1965
  pageSize,
2054
1966
  sort,
1967
+ query,
2055
1968
  },
2056
1969
  { abortEarly: false, allowUnknown: true }
2057
1970
  );
@@ -2062,32 +1975,32 @@ class Communication {
2062
1975
  // Showing warrnings if extra unknown parameters are found
2063
1976
  const {
2064
1977
  error: warrning,
2065
- } = CommunicationPlatformApplicationValidator.getCampaigns().validate(
1978
+ } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2066
1979
  {
2067
- query,
2068
1980
  pageNo,
2069
1981
  pageSize,
2070
1982
  sort,
1983
+ query,
2071
1984
  },
2072
1985
  { abortEarly: false, allowUnknown: false }
2073
1986
  );
2074
1987
  if (warrning) {
2075
1988
  Logger({
2076
1989
  level: "WARN",
2077
- message: `Parameter Validation warrnings for platform > Communication > getCampaigns \n ${warrning}`,
1990
+ message: `Parameter Validation warrnings for platform > Communication > getCommunicationLogs \n ${warrning}`,
2078
1991
  });
2079
1992
  }
2080
1993
 
2081
1994
  const query_params = {};
2082
- query_params["query"] = query;
2083
1995
  query_params["page_no"] = pageNo;
2084
1996
  query_params["page_size"] = pageSize;
2085
1997
  query_params["sort"] = sort;
1998
+ query_params["query"] = query;
2086
1999
 
2087
2000
  const response = await PlatformAPIClient.execute(
2088
2001
  this.config,
2089
2002
  "get",
2090
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/campaigns/campaigns`,
2003
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/log`,
2091
2004
  query_params,
2092
2005
  undefined,
2093
2006
  requestHeaders,
@@ -2101,7 +2014,7 @@ class Communication {
2101
2014
 
2102
2015
  const {
2103
2016
  error: res_error,
2104
- } = CommunicationPlatformModel.Campaigns().validate(responseData, {
2017
+ } = CommunicationPlatformModel.Logs().validate(responseData, {
2105
2018
  abortEarly: false,
2106
2019
  allowUnknown: true,
2107
2020
  });
@@ -2112,7 +2025,7 @@ class Communication {
2112
2025
  } else {
2113
2026
  Logger({
2114
2027
  level: "WARN",
2115
- message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`,
2028
+ message: `Response Validation Warnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
2116
2029
  });
2117
2030
  }
2118
2031
  }
@@ -2121,29 +2034,66 @@ class Communication {
2121
2034
  }
2122
2035
 
2123
2036
  /**
2124
- * @param {CommunicationPlatformApplicationValidator.GetCommunicationLogsParam} arg
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
2125
2079
  * - Arg object
2126
2080
  *
2127
2081
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2128
2082
  * @param {import("../PlatformAPIClient").Options} - Options
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/).
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/).
2133
2088
  */
2134
- async getCommunicationLogs(
2135
- { pageId, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
2089
+ async getDefaultEmailProviders(
2090
+ { requestHeaders } = { requestHeaders: {} },
2136
2091
  { responseHeaders } = { responseHeaders: false }
2137
2092
  ) {
2138
2093
  const {
2139
2094
  error,
2140
- } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2141
- {
2142
- pageId,
2143
- pageSize,
2144
- sort,
2145
- query,
2146
- },
2095
+ } = CommunicationPlatformApplicationValidator.getDefaultEmailProviders().validate(
2096
+ {},
2147
2097
  { abortEarly: false, allowUnknown: true }
2148
2098
  );
2149
2099
  if (error) {
@@ -2153,32 +2103,23 @@ class Communication {
2153
2103
  // Showing warrnings if extra unknown parameters are found
2154
2104
  const {
2155
2105
  error: warrning,
2156
- } = CommunicationPlatformApplicationValidator.getCommunicationLogs().validate(
2157
- {
2158
- pageId,
2159
- pageSize,
2160
- sort,
2161
- query,
2162
- },
2106
+ } = CommunicationPlatformApplicationValidator.getDefaultEmailProviders().validate(
2107
+ {},
2163
2108
  { abortEarly: false, allowUnknown: false }
2164
2109
  );
2165
2110
  if (warrning) {
2166
2111
  Logger({
2167
2112
  level: "WARN",
2168
- message: `Parameter Validation warrnings for platform > Communication > getCommunicationLogs \n ${warrning}`,
2113
+ message: `Parameter Validation warrnings for platform > Communication > getDefaultEmailProviders \n ${warrning}`,
2169
2114
  });
2170
2115
  }
2171
2116
 
2172
2117
  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;
2177
2118
 
2178
2119
  const response = await PlatformAPIClient.execute(
2179
2120
  this.config,
2180
2121
  "get",
2181
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/log`,
2122
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/default-providers`,
2182
2123
  query_params,
2183
2124
  undefined,
2184
2125
  requestHeaders,
@@ -2190,12 +2131,9 @@ class Communication {
2190
2131
  responseData = response[0];
2191
2132
  }
2192
2133
 
2193
- const {
2194
- error: res_error,
2195
- } = CommunicationPlatformModel.Logs().validate(responseData, {
2196
- abortEarly: false,
2197
- allowUnknown: true,
2198
- });
2134
+ const { error: res_error } = Joi.array()
2135
+ .items(CommunicationPlatformModel.DefaultEmailProviders())
2136
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
2199
2137
 
2200
2138
  if (res_error) {
2201
2139
  if (this.config.options.strictResponseCheck === true) {
@@ -2203,7 +2141,7 @@ class Communication {
2203
2141
  } else {
2204
2142
  Logger({
2205
2143
  level: "WARN",
2206
- message: `Response Validation Warnings for platform > Communication > getCommunicationLogs \n ${res_error}`,
2144
+ message: `Response Validation Warnings for platform > Communication > getDefaultEmailProviders \n ${res_error}`,
2207
2145
  });
2208
2146
  }
2209
2147
  }
@@ -2220,8 +2158,8 @@ class Communication {
2220
2158
  * @returns {Promise<CommunicationPlatformModel.DefaultSmsProviders[]>} -
2221
2159
  * Success response
2222
2160
  * @name 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/).
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/).
2225
2163
  */
2226
2164
  async getDefaultSmsProviders(
2227
2165
  { requestHeaders } = { requestHeaders: {} },
@@ -2295,8 +2233,8 @@ class Communication {
2295
2233
  * @returns {Promise<CommunicationPlatformModel.DummyDatasources[]>} -
2296
2234
  * Success response
2297
2235
  * @name 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/).
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/).
2300
2238
  */
2301
2239
  async getDummyDatasources(
2302
2240
  { requestHeaders } = { requestHeaders: {} },
@@ -2331,7 +2269,7 @@ class Communication {
2331
2269
  const response = await PlatformAPIClient.execute(
2332
2270
  this.config,
2333
2271
  "get",
2334
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources/dummy-data-sources`,
2272
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasource/dummy-data-sources`,
2335
2273
  query_params,
2336
2274
  undefined,
2337
2275
  requestHeaders,
@@ -2370,7 +2308,7 @@ class Communication {
2370
2308
  * @returns {Promise<CommunicationPlatformModel.DummyDatasourcesMeta>} -
2371
2309
  * Success response
2372
2310
  * @name getDummyDatasourcesMeta
2373
- * @summary: Get dummy data sources metadata
2311
+ * @summary: Get dummy data sources metadata.
2374
2312
  * @description: Retrieve metadata information about dummy data sources. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getDummyDatasourcesMeta/).
2375
2313
  */
2376
2314
  async getDummyDatasourcesMeta(
@@ -2406,11 +2344,12 @@ class Communication {
2406
2344
  }
2407
2345
 
2408
2346
  const query_params = {};
2347
+ query_params["id"] = id;
2409
2348
 
2410
2349
  const response = await PlatformAPIClient.execute(
2411
2350
  this.config,
2412
2351
  "get",
2413
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources/dummy-data-sources-meta/${id}`,
2352
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasource/dummy-data-source-meta`,
2414
2353
  query_params,
2415
2354
  undefined,
2416
2355
  requestHeaders,
@@ -2451,8 +2390,8 @@ class Communication {
2451
2390
  * @param {import("../PlatformAPIClient").Options} - Options
2452
2391
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
2453
2392
  * @name 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/).
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/).
2456
2395
  */
2457
2396
  async getEmailProviderById(
2458
2397
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2532,8 +2471,8 @@ class Communication {
2532
2471
  * @param {import("../PlatformAPIClient").Options} - Options
2533
2472
  * @returns {Promise<CommunicationPlatformModel.EmailProviders>} - Success response
2534
2473
  * @name 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/).
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/).
2537
2476
  */
2538
2477
  async getEmailProviders(
2539
2478
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -2615,6 +2554,47 @@ class Communication {
2615
2554
  return response;
2616
2555
  }
2617
2556
 
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
+
2618
2598
  /**
2619
2599
  * @param {CommunicationPlatformApplicationValidator.GetEmailTemplateByIdParam} arg
2620
2600
  * - Arg object
@@ -2623,8 +2603,8 @@ class Communication {
2623
2603
  * @param {import("../PlatformAPIClient").Options} - Options
2624
2604
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
2625
2605
  * @name 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/).
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/).
2628
2608
  */
2629
2609
  async getEmailTemplateById(
2630
2610
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2704,8 +2684,8 @@ class Communication {
2704
2684
  * @param {import("../PlatformAPIClient").Options} - Options
2705
2685
  * @returns {Promise<CommunicationPlatformModel.EmailTemplates>} - Success response
2706
2686
  * @name 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/).
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/).
2709
2689
  */
2710
2690
  async getEmailTemplates(
2711
2691
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -2787,6 +2767,47 @@ class Communication {
2787
2767
  return response;
2788
2768
  }
2789
2769
 
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
+
2790
2811
  /**
2791
2812
  * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsParam} arg
2792
2813
  * - Arg object
@@ -2796,8 +2817,8 @@ class Communication {
2796
2817
  * @returns {Promise<CommunicationPlatformModel.EventSubscriptions>} -
2797
2818
  * Success response
2798
2819
  * @name 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/).
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/).
2801
2822
  */
2802
2823
  async getEventSubscriptions(
2803
2824
  { pageNo, pageSize, populate, requestHeaders } = { requestHeaders: {} },
@@ -2876,6 +2897,44 @@ class Communication {
2876
2897
  return response;
2877
2898
  }
2878
2899
 
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
+
2879
2938
  /**
2880
2939
  * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam} arg
2881
2940
  * - Arg object
@@ -2884,8 +2943,8 @@ class Communication {
2884
2943
  * @param {import("../PlatformAPIClient").Options} - Options
2885
2944
  * @returns {Promise<CommunicationPlatformModel.EventSubscription>} - Success response
2886
2945
  * @name 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/).
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/).
2889
2948
  */
2890
2949
  async getEventSubscriptionsById(
2891
2950
  { id, populate, requestHeaders } = { requestHeaders: {} },
@@ -2968,8 +3027,8 @@ class Communication {
2968
3027
  * @param {import("../PlatformAPIClient").Options} - Options
2969
3028
  * @returns {Promise<CommunicationPlatformModel.GlobalProviders>} - Success response
2970
3029
  * @name 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/).
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/).
2973
3032
  */
2974
3033
  async getGlobalProviders(
2975
3034
  { requestHeaders } = { requestHeaders: {} },
@@ -3043,12 +3102,12 @@ class Communication {
3043
3102
  *
3044
3103
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3045
3104
  * @param {import("../PlatformAPIClient").Options} - Options
3046
- * @returns {Promise<CommunicationPlatformModel.GetGlobalVariablesResult>}
3105
+ * @returns {Promise<CommunicationPlatformModel.GlobalVariablesGetResponse>}
3047
3106
  * - Success response
3048
3107
  *
3049
3108
  * @name 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/).
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/).
3052
3111
  */
3053
3112
  async getGlobalVariables(
3054
3113
  { requestHeaders } = { requestHeaders: {} },
@@ -3097,7 +3156,7 @@ class Communication {
3097
3156
 
3098
3157
  const {
3099
3158
  error: res_error,
3100
- } = CommunicationPlatformModel.GetGlobalVariablesResult().validate(
3159
+ } = CommunicationPlatformModel.GlobalVariablesGetResponse().validate(
3101
3160
  responseData,
3102
3161
  { abortEarly: false, allowUnknown: true }
3103
3162
  );
@@ -3122,8 +3181,8 @@ class Communication {
3122
3181
  * @param {import("../PlatformAPIClient").Options} - Options
3123
3182
  * @returns {Promise<CommunicationPlatformModel.JobLogs>} - Success response
3124
3183
  * @name 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/).
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/).
3127
3186
  */
3128
3187
  async getJobLogs(
3129
3188
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3205,14 +3264,55 @@ class Communication {
3205
3264
  return response;
3206
3265
  }
3207
3266
 
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
+
3208
3308
  /**
3209
3309
  * @param {CommunicationPlatformApplicationValidator.GetJobsParam} arg - Arg object
3210
3310
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3211
3311
  * @param {import("../PlatformAPIClient").Options} - Options
3212
3312
  * @returns {Promise<CommunicationPlatformModel.Jobs>} - Success response
3213
3313
  * @name 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/).
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/).
3216
3316
  */
3217
3317
  async getJobs(
3218
3318
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3294,6 +3394,41 @@ class Communication {
3294
3394
  return response;
3295
3395
  }
3296
3396
 
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
+
3297
3432
  /**
3298
3433
  * @param {CommunicationPlatformApplicationValidator.GetNSampleRecordsFromCsvParam} arg
3299
3434
  * - Arg object
@@ -3302,7 +3437,7 @@ class Communication {
3302
3437
  * @param {import("../PlatformAPIClient").Options} - Options
3303
3438
  * @returns {Promise<CommunicationPlatformModel.GetNRecordsCsvRes>} - Success response
3304
3439
  * @name getNSampleRecordsFromCsv
3305
- * @summary: Get N sample records of a CSV
3440
+ * @summary: Get N sample records from CSV.
3306
3441
  * @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/).
3307
3442
  */
3308
3443
  async getNSampleRecordsFromCsv(
@@ -3383,17 +3518,21 @@ class Communication {
3383
3518
  * @param {import("../PlatformAPIClient").Options} - Options
3384
3519
  * @returns {Promise<CommunicationPlatformModel.GetNRecordsCsvRes>} - Success response
3385
3520
  * @name 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/).
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/).
3388
3523
  */
3389
3524
  async getNSampleRecordsFromCsvByGet(
3390
- { requestHeaders } = { requestHeaders: {} },
3525
+ { count, header, url, requestHeaders } = { requestHeaders: {} },
3391
3526
  { responseHeaders } = { responseHeaders: false }
3392
3527
  ) {
3393
3528
  const {
3394
3529
  error,
3395
3530
  } = CommunicationPlatformApplicationValidator.getNSampleRecordsFromCsvByGet().validate(
3396
- {},
3531
+ {
3532
+ count,
3533
+ header,
3534
+ url,
3535
+ },
3397
3536
  { abortEarly: false, allowUnknown: true }
3398
3537
  );
3399
3538
  if (error) {
@@ -3404,7 +3543,11 @@ class Communication {
3404
3543
  const {
3405
3544
  error: warrning,
3406
3545
  } = CommunicationPlatformApplicationValidator.getNSampleRecordsFromCsvByGet().validate(
3407
- {},
3546
+ {
3547
+ count,
3548
+ header,
3549
+ url,
3550
+ },
3408
3551
  { abortEarly: false, allowUnknown: false }
3409
3552
  );
3410
3553
  if (warrning) {
@@ -3415,6 +3558,9 @@ class Communication {
3415
3558
  }
3416
3559
 
3417
3560
  const query_params = {};
3561
+ query_params["count"] = count;
3562
+ query_params["header"] = header;
3563
+ query_params["url"] = url;
3418
3564
 
3419
3565
  const response = await PlatformAPIClient.execute(
3420
3566
  this.config,
@@ -3460,8 +3606,8 @@ class Communication {
3460
3606
  * @param {import("../PlatformAPIClient").Options} - Options
3461
3607
  * @returns {Promise<CommunicationPlatformModel.OtpConfiguration>} - Success response
3462
3608
  * @name 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/).
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/).
3465
3611
  */
3466
3612
  async getOtpConfiguration(
3467
3613
  { requestHeaders } = { requestHeaders: {} },
@@ -3535,9 +3681,9 @@ class Communication {
3535
3681
  *
3536
3682
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3537
3683
  * @param {import("../PlatformAPIClient").Options} - Options
3538
- * @returns {Promise<Object>} - Success response
3684
+ * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
3539
3685
  * @name getSmsProviderById
3540
- * @summary: Get a SMS provider
3686
+ * @summary: Get SMS provider by ID.
3541
3687
  * @description: Retrieve detailed information about a specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsProviderById/).
3542
3688
  */
3543
3689
  async getSmsProviderById(
@@ -3589,7 +3735,9 @@ class Communication {
3589
3735
  responseData = response[0];
3590
3736
  }
3591
3737
 
3592
- const { error: res_error } = Joi.any().validate(responseData, {
3738
+ const {
3739
+ error: res_error,
3740
+ } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
3593
3741
  abortEarly: false,
3594
3742
  allowUnknown: true,
3595
3743
  });
@@ -3614,10 +3762,10 @@ class Communication {
3614
3762
  *
3615
3763
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3616
3764
  * @param {import("../PlatformAPIClient").Options} - Options
3617
- * @returns {Promise<Object>} - Success response
3765
+ * @returns {Promise<CommunicationPlatformModel.SmsProviders>} - Success response
3618
3766
  * @name 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/).
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/).
3621
3769
  */
3622
3770
  async getSmsProviders(
3623
3771
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3678,7 +3826,9 @@ class Communication {
3678
3826
  responseData = response[0];
3679
3827
  }
3680
3828
 
3681
- const { error: res_error } = Joi.any().validate(responseData, {
3829
+ const {
3830
+ error: res_error,
3831
+ } = CommunicationPlatformModel.SmsProviders().validate(responseData, {
3682
3832
  abortEarly: false,
3683
3833
  allowUnknown: true,
3684
3834
  });
@@ -3705,8 +3855,8 @@ class Communication {
3705
3855
  * @param {import("../PlatformAPIClient").Options} - Options
3706
3856
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
3707
3857
  * @name 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/).
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/).
3710
3860
  */
3711
3861
  async getSmsTemplateById(
3712
3862
  { id, requestHeaders } = { requestHeaders: {} },
@@ -3786,8 +3936,8 @@ class Communication {
3786
3936
  * @param {import("../PlatformAPIClient").Options} - Options
3787
3937
  * @returns {Promise<CommunicationPlatformModel.SmsTemplates>} - Success response
3788
3938
  * @name 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/).
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/).
3791
3941
  */
3792
3942
  async getSmsTemplates(
3793
3943
  { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} },
@@ -3869,6 +4019,47 @@ class Communication {
3869
4019
  return response;
3870
4020
  }
3871
4021
 
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
+
3872
4063
  /**
3873
4064
  * @param {CommunicationPlatformApplicationValidator.GetStatsOfCampaignByIdParam} arg
3874
4065
  * - Arg object
@@ -3877,8 +4068,8 @@ class Communication {
3877
4068
  * @param {import("../PlatformAPIClient").Options} - Options
3878
4069
  * @returns {Promise<CommunicationPlatformModel.GetStats>} - Success response
3879
4070
  * @name 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/).
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/).
3882
4073
  */
3883
4074
  async getStatsOfCampaignById(
3884
4075
  { id, requestHeaders } = { requestHeaders: {} },
@@ -3956,10 +4147,12 @@ class Communication {
3956
4147
  *
3957
4148
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3958
4149
  * @param {import("../PlatformAPIClient").Options} - Options
3959
- * @returns {Promise<CommunicationPlatformModel.EmailTemplates>} - Success response
4150
+ * @returns {Promise<CommunicationPlatformModel.SubscribedEmailTemplates>}
4151
+ * - Success response
4152
+ *
3960
4153
  * @name 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/).
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/).
3963
4156
  */
3964
4157
  async getSubscribedEmailTemplates(
3965
4158
  { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} },
@@ -4019,10 +4212,10 @@ class Communication {
4019
4212
 
4020
4213
  const {
4021
4214
  error: res_error,
4022
- } = CommunicationPlatformModel.EmailTemplates().validate(responseData, {
4023
- abortEarly: false,
4024
- allowUnknown: true,
4025
- });
4215
+ } = CommunicationPlatformModel.SubscribedEmailTemplates().validate(
4216
+ responseData,
4217
+ { abortEarly: false, allowUnknown: true }
4218
+ );
4026
4219
 
4027
4220
  if (res_error) {
4028
4221
  if (this.config.options.strictResponseCheck === true) {
@@ -4044,10 +4237,11 @@ class Communication {
4044
4237
  *
4045
4238
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4046
4239
  * @param {import("../PlatformAPIClient").Options} - Options
4047
- * @returns {Promise<CommunicationPlatformModel.SmsTemplates>} - Success response
4240
+ * @returns {Promise<CommunicationPlatformModel.SubscribedSmsTemplates>} -
4241
+ * Success response
4048
4242
  * @name 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/).
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/).
4051
4245
  */
4052
4246
  async getSubscribedSmsTemplates(
4053
4247
  { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} },
@@ -4107,10 +4301,10 @@ class Communication {
4107
4301
 
4108
4302
  const {
4109
4303
  error: res_error,
4110
- } = CommunicationPlatformModel.SmsTemplates().validate(responseData, {
4111
- abortEarly: false,
4112
- allowUnknown: true,
4113
- });
4304
+ } = CommunicationPlatformModel.SubscribedSmsTemplates().validate(
4305
+ responseData,
4306
+ { abortEarly: false, allowUnknown: true }
4307
+ );
4114
4308
 
4115
4309
  if (res_error) {
4116
4310
  if (this.config.options.strictResponseCheck === true) {
@@ -4127,23 +4321,24 @@ class Communication {
4127
4321
  }
4128
4322
 
4129
4323
  /**
4130
- * @param {CommunicationPlatformApplicationValidator.GetSystemAudiencesParam} arg
4324
+ * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
4131
4325
  * - Arg object
4132
4326
  *
4133
4327
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4134
4328
  * @param {import("../PlatformAPIClient").Options} - Options
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/).
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/).
4139
4334
  */
4140
- async getSystemAudiences(
4335
+ async getSystemEmailTemplates(
4141
4336
  { requestHeaders } = { requestHeaders: {} },
4142
4337
  { responseHeaders } = { responseHeaders: false }
4143
4338
  ) {
4144
4339
  const {
4145
4340
  error,
4146
- } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4341
+ } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4147
4342
  {},
4148
4343
  { abortEarly: false, allowUnknown: true }
4149
4344
  );
@@ -4154,14 +4349,14 @@ class Communication {
4154
4349
  // Showing warrnings if extra unknown parameters are found
4155
4350
  const {
4156
4351
  error: warrning,
4157
- } = CommunicationPlatformApplicationValidator.getSystemAudiences().validate(
4352
+ } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4158
4353
  {},
4159
4354
  { abortEarly: false, allowUnknown: false }
4160
4355
  );
4161
4356
  if (warrning) {
4162
4357
  Logger({
4163
4358
  level: "WARN",
4164
- message: `Parameter Validation warrnings for platform > Communication > getSystemAudiences \n ${warrning}`,
4359
+ message: `Parameter Validation warrnings for platform > Communication > getSystemEmailTemplates \n ${warrning}`,
4165
4360
  });
4166
4361
  }
4167
4362
 
@@ -4170,7 +4365,7 @@ class Communication {
4170
4365
  const response = await PlatformAPIClient.execute(
4171
4366
  this.config,
4172
4367
  "get",
4173
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/system-datasources`,
4368
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/system-templates`,
4174
4369
  query_params,
4175
4370
  undefined,
4176
4371
  requestHeaders,
@@ -4182,10 +4377,9 @@ class Communication {
4182
4377
  responseData = response[0];
4183
4378
  }
4184
4379
 
4185
- const { error: res_error } = Joi.any().validate(responseData, {
4186
- abortEarly: false,
4187
- allowUnknown: true,
4188
- });
4380
+ const { error: res_error } = Joi.array()
4381
+ .items(CommunicationPlatformModel.SystemEmailTemplate())
4382
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
4189
4383
 
4190
4384
  if (res_error) {
4191
4385
  if (this.config.options.strictResponseCheck === true) {
@@ -4193,7 +4387,7 @@ class Communication {
4193
4387
  } else {
4194
4388
  Logger({
4195
4389
  level: "WARN",
4196
- message: `Response Validation Warnings for platform > Communication > getSystemAudiences \n ${res_error}`,
4390
+ message: `Response Validation Warnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
4197
4391
  });
4198
4392
  }
4199
4393
  }
@@ -4202,24 +4396,24 @@ class Communication {
4202
4396
  }
4203
4397
 
4204
4398
  /**
4205
- * @param {CommunicationPlatformApplicationValidator.GetSystemEmailTemplatesParam} arg
4399
+ * @param {CommunicationPlatformApplicationValidator.GetSystemSmsTemplatesParam} arg
4206
4400
  * - Arg object
4207
4401
  *
4208
4402
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4209
4403
  * @param {import("../PlatformAPIClient").Options} - Options
4210
- * @returns {Promise<CommunicationPlatformModel.SystemEmailTemplates>} -
4404
+ * @returns {Promise<CommunicationPlatformModel.SystemSmsTemplates[]>} -
4211
4405
  * Success response
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/).
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/).
4215
4409
  */
4216
- async getSystemEmailTemplates(
4410
+ async getSystemSmsTemplates(
4217
4411
  { requestHeaders } = { requestHeaders: {} },
4218
4412
  { responseHeaders } = { responseHeaders: false }
4219
4413
  ) {
4220
4414
  const {
4221
4415
  error,
4222
- } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4416
+ } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4223
4417
  {},
4224
4418
  { abortEarly: false, allowUnknown: true }
4225
4419
  );
@@ -4230,14 +4424,14 @@ class Communication {
4230
4424
  // Showing warrnings if extra unknown parameters are found
4231
4425
  const {
4232
4426
  error: warrning,
4233
- } = CommunicationPlatformApplicationValidator.getSystemEmailTemplates().validate(
4427
+ } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4234
4428
  {},
4235
4429
  { abortEarly: false, allowUnknown: false }
4236
4430
  );
4237
4431
  if (warrning) {
4238
4432
  Logger({
4239
4433
  level: "WARN",
4240
- message: `Parameter Validation warrnings for platform > Communication > getSystemEmailTemplates \n ${warrning}`,
4434
+ message: `Parameter Validation warrnings for platform > Communication > getSystemSmsTemplates \n ${warrning}`,
4241
4435
  });
4242
4436
  }
4243
4437
 
@@ -4246,7 +4440,7 @@ class Communication {
4246
4440
  const response = await PlatformAPIClient.execute(
4247
4441
  this.config,
4248
4442
  "get",
4249
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/email/system-templates`,
4443
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sms/system-templates`,
4250
4444
  query_params,
4251
4445
  undefined,
4252
4446
  requestHeaders,
@@ -4258,12 +4452,9 @@ class Communication {
4258
4452
  responseData = response[0];
4259
4453
  }
4260
4454
 
4261
- const {
4262
- error: res_error,
4263
- } = CommunicationPlatformModel.SystemEmailTemplates().validate(
4264
- responseData,
4265
- { abortEarly: false, allowUnknown: true }
4266
- );
4455
+ const { error: res_error } = Joi.array()
4456
+ .items(CommunicationPlatformModel.SystemSmsTemplates())
4457
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
4267
4458
 
4268
4459
  if (res_error) {
4269
4460
  if (this.config.options.strictResponseCheck === true) {
@@ -4271,7 +4462,7 @@ class Communication {
4271
4462
  } else {
4272
4463
  Logger({
4273
4464
  level: "WARN",
4274
- message: `Response Validation Warnings for platform > Communication > getSystemEmailTemplates \n ${res_error}`,
4465
+ message: `Response Validation Warnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
4275
4466
  });
4276
4467
  }
4277
4468
  }
@@ -4280,25 +4471,28 @@ class Communication {
4280
4471
  }
4281
4472
 
4282
4473
  /**
4283
- * @param {CommunicationPlatformApplicationValidator.GetSystemSmsTemplatesParam} arg
4474
+ * @param {CommunicationPlatformApplicationValidator.PostGlobalVariablesParam} arg
4284
4475
  * - Arg object
4285
4476
  *
4286
4477
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4287
4478
  * @param {import("../PlatformAPIClient").Options} - Options
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/).
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/).
4293
4485
  */
4294
- async getSystemSmsTemplates(
4295
- { requestHeaders } = { requestHeaders: {} },
4486
+ async postGlobalVariables(
4487
+ { body, requestHeaders } = { requestHeaders: {} },
4296
4488
  { responseHeaders } = { responseHeaders: false }
4297
4489
  ) {
4298
4490
  const {
4299
4491
  error,
4300
- } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4301
- {},
4492
+ } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4493
+ {
4494
+ body,
4495
+ },
4302
4496
  { abortEarly: false, allowUnknown: true }
4303
4497
  );
4304
4498
  if (error) {
@@ -4308,14 +4502,16 @@ class Communication {
4308
4502
  // Showing warrnings if extra unknown parameters are found
4309
4503
  const {
4310
4504
  error: warrning,
4311
- } = CommunicationPlatformApplicationValidator.getSystemSmsTemplates().validate(
4312
- {},
4505
+ } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4506
+ {
4507
+ body,
4508
+ },
4313
4509
  { abortEarly: false, allowUnknown: false }
4314
4510
  );
4315
4511
  if (warrning) {
4316
4512
  Logger({
4317
4513
  level: "WARN",
4318
- message: `Parameter Validation warrnings for platform > Communication > getSystemSmsTemplates \n ${warrning}`,
4514
+ message: `Parameter Validation warrnings for platform > Communication > postGlobalVariables \n ${warrning}`,
4319
4515
  });
4320
4516
  }
4321
4517
 
@@ -4323,10 +4519,10 @@ class Communication {
4323
4519
 
4324
4520
  const response = await PlatformAPIClient.execute(
4325
4521
  this.config,
4326
- "get",
4327
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sms/system-templates`,
4522
+ "post",
4523
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/global-variables`,
4328
4524
  query_params,
4329
- undefined,
4525
+ body,
4330
4526
  requestHeaders,
4331
4527
  { responseHeaders }
4332
4528
  );
@@ -4336,9 +4532,12 @@ class Communication {
4336
4532
  responseData = response[0];
4337
4533
  }
4338
4534
 
4339
- const { error: res_error } = Joi.array()
4340
- .items(CommunicationPlatformModel.SystemSmsTemplates())
4341
- .validate(responseData, { abortEarly: false, allowUnknown: true });
4535
+ const {
4536
+ error: res_error,
4537
+ } = CommunicationPlatformModel.GlobalVariablesPostResponse().validate(
4538
+ responseData,
4539
+ { abortEarly: false, allowUnknown: true }
4540
+ );
4342
4541
 
4343
4542
  if (res_error) {
4344
4543
  if (this.config.options.strictResponseCheck === true) {
@@ -4346,7 +4545,7 @@ class Communication {
4346
4545
  } else {
4347
4546
  Logger({
4348
4547
  level: "WARN",
4349
- message: `Response Validation Warnings for platform > Communication > getSystemSmsTemplates \n ${res_error}`,
4548
+ message: `Response Validation Warnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4350
4549
  });
4351
4550
  }
4352
4551
  }
@@ -4355,25 +4554,23 @@ class Communication {
4355
4554
  }
4356
4555
 
4357
4556
  /**
4358
- * @param {CommunicationPlatformApplicationValidator.PostGlobalVariablesParam} arg
4557
+ * @param {CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam} arg
4359
4558
  * - Arg object
4360
4559
  *
4361
4560
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4362
4561
  * @param {import("../PlatformAPIClient").Options} - Options
4363
- * @returns {Promise<CommunicationPlatformModel.CreateGlobalVariablesResult>}
4364
- * - Success response
4365
- *
4366
- * @name postGlobalVariables
4367
- * @summary: Create global variables
4368
- * @description: Updates and creates communication global variables. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/postGlobalVariables/).
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/).
4369
4566
  */
4370
- async postGlobalVariables(
4567
+ async sendCommunicationAsynchronously(
4371
4568
  { body, requestHeaders } = { requestHeaders: {} },
4372
4569
  { responseHeaders } = { responseHeaders: false }
4373
4570
  ) {
4374
4571
  const {
4375
4572
  error,
4376
- } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4573
+ } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4377
4574
  {
4378
4575
  body,
4379
4576
  },
@@ -4386,7 +4583,7 @@ class Communication {
4386
4583
  // Showing warrnings if extra unknown parameters are found
4387
4584
  const {
4388
4585
  error: warrning,
4389
- } = CommunicationPlatformApplicationValidator.postGlobalVariables().validate(
4586
+ } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4390
4587
  {
4391
4588
  body,
4392
4589
  },
@@ -4395,7 +4592,7 @@ class Communication {
4395
4592
  if (warrning) {
4396
4593
  Logger({
4397
4594
  level: "WARN",
4398
- message: `Parameter Validation warrnings for platform > Communication > postGlobalVariables \n ${warrning}`,
4595
+ message: `Parameter Validation warrnings for platform > Communication > sendCommunicationAsynchronously \n ${warrning}`,
4399
4596
  });
4400
4597
  }
4401
4598
 
@@ -4404,7 +4601,7 @@ class Communication {
4404
4601
  const response = await PlatformAPIClient.execute(
4405
4602
  this.config,
4406
4603
  "post",
4407
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/global-variables`,
4604
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-async`,
4408
4605
  query_params,
4409
4606
  body,
4410
4607
  requestHeaders,
@@ -4418,10 +4615,10 @@ class Communication {
4418
4615
 
4419
4616
  const {
4420
4617
  error: res_error,
4421
- } = CommunicationPlatformModel.CreateGlobalVariablesResult().validate(
4422
- responseData,
4423
- { abortEarly: false, allowUnknown: true }
4424
- );
4618
+ } = CommunicationPlatformModel.EngineResponse().validate(responseData, {
4619
+ abortEarly: false,
4620
+ allowUnknown: true,
4621
+ });
4425
4622
 
4426
4623
  if (res_error) {
4427
4624
  if (this.config.options.strictResponseCheck === true) {
@@ -4429,7 +4626,7 @@ class Communication {
4429
4626
  } else {
4430
4627
  Logger({
4431
4628
  level: "WARN",
4432
- message: `Response Validation Warnings for platform > Communication > postGlobalVariables \n ${res_error}`,
4629
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4433
4630
  });
4434
4631
  }
4435
4632
  }
@@ -4438,23 +4635,24 @@ class Communication {
4438
4635
  }
4439
4636
 
4440
4637
  /**
4441
- * @param {CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam} arg
4638
+ * @param {CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam} arg
4442
4639
  * - Arg object
4443
4640
  *
4444
4641
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4445
4642
  * @param {import("../PlatformAPIClient").Options} - Options
4446
- * @returns {Promise<CommunicationPlatformModel.EngineResult>} - Success response
4447
- * @name sendCommunicationAsynchronously
4448
- * @summary: Send communication asynchronously
4449
- * @description: Sends communications to sellers with deffered delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationAsynchronously/).
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/).
4450
4648
  */
4451
- async sendCommunicationAsynchronously(
4649
+ async sendCommunicationSynchronously(
4452
4650
  { body, requestHeaders } = { requestHeaders: {} },
4453
4651
  { responseHeaders } = { responseHeaders: false }
4454
4652
  ) {
4455
4653
  const {
4456
4654
  error,
4457
- } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4655
+ } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4458
4656
  {
4459
4657
  body,
4460
4658
  },
@@ -4467,7 +4665,7 @@ class Communication {
4467
4665
  // Showing warrnings if extra unknown parameters are found
4468
4666
  const {
4469
4667
  error: warrning,
4470
- } = CommunicationPlatformApplicationValidator.sendCommunicationAsynchronously().validate(
4668
+ } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4471
4669
  {
4472
4670
  body,
4473
4671
  },
@@ -4476,7 +4674,7 @@ class Communication {
4476
4674
  if (warrning) {
4477
4675
  Logger({
4478
4676
  level: "WARN",
4479
- message: `Parameter Validation warrnings for platform > Communication > sendCommunicationAsynchronously \n ${warrning}`,
4677
+ message: `Parameter Validation warrnings for platform > Communication > sendCommunicationSynchronously \n ${warrning}`,
4480
4678
  });
4481
4679
  }
4482
4680
 
@@ -4485,7 +4683,7 @@ class Communication {
4485
4683
  const response = await PlatformAPIClient.execute(
4486
4684
  this.config,
4487
4685
  "post",
4488
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-async`,
4686
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-instant`,
4489
4687
  query_params,
4490
4688
  body,
4491
4689
  requestHeaders,
@@ -4499,10 +4697,10 @@ class Communication {
4499
4697
 
4500
4698
  const {
4501
4699
  error: res_error,
4502
- } = CommunicationPlatformModel.EngineResult().validate(responseData, {
4503
- abortEarly: false,
4504
- allowUnknown: true,
4505
- });
4700
+ } = CommunicationPlatformModel.SendInstantResponse().validate(
4701
+ responseData,
4702
+ { abortEarly: false, allowUnknown: true }
4703
+ );
4506
4704
 
4507
4705
  if (res_error) {
4508
4706
  if (this.config.options.strictResponseCheck === true) {
@@ -4510,7 +4708,7 @@ class Communication {
4510
4708
  } else {
4511
4709
  Logger({
4512
4710
  level: "WARN",
4513
- message: `Response Validation Warnings for platform > Communication > sendCommunicationAsynchronously \n ${res_error}`,
4711
+ message: `Response Validation Warnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4514
4712
  });
4515
4713
  }
4516
4714
  }
@@ -4519,23 +4717,24 @@ class Communication {
4519
4717
  }
4520
4718
 
4521
4719
  /**
4522
- * @param {CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam} arg
4720
+ * @param {CommunicationPlatformApplicationValidator.SendEngineCommunicationSynchronouslyParam} arg
4523
4721
  * - Arg object
4524
4722
  *
4525
4723
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4526
4724
  * @param {import("../PlatformAPIClient").Options} - Options
4527
- * @returns {Promise<CommunicationPlatformModel.EngineResult>} - Success response
4528
- * @name sendCommunicationSynchronously
4529
- * @summary: Send communication synchronously
4530
- * @description: Sends real-time communications to sellers with immediate delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationSynchronously/).
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/).
4531
4730
  */
4532
- async sendCommunicationSynchronously(
4731
+ async sendEngineCommunicationSynchronously(
4533
4732
  { body, requestHeaders } = { requestHeaders: {} },
4534
4733
  { responseHeaders } = { responseHeaders: false }
4535
4734
  ) {
4536
4735
  const {
4537
4736
  error,
4538
- } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4737
+ } = CommunicationPlatformApplicationValidator.sendEngineCommunicationSynchronously().validate(
4539
4738
  {
4540
4739
  body,
4541
4740
  },
@@ -4548,7 +4747,7 @@ class Communication {
4548
4747
  // Showing warrnings if extra unknown parameters are found
4549
4748
  const {
4550
4749
  error: warrning,
4551
- } = CommunicationPlatformApplicationValidator.sendCommunicationSynchronously().validate(
4750
+ } = CommunicationPlatformApplicationValidator.sendEngineCommunicationSynchronously().validate(
4552
4751
  {
4553
4752
  body,
4554
4753
  },
@@ -4557,7 +4756,7 @@ class Communication {
4557
4756
  if (warrning) {
4558
4757
  Logger({
4559
4758
  level: "WARN",
4560
- message: `Parameter Validation warrnings for platform > Communication > sendCommunicationSynchronously \n ${warrning}`,
4759
+ message: `Parameter Validation warrnings for platform > Communication > sendEngineCommunicationSynchronously \n ${warrning}`,
4561
4760
  });
4562
4761
  }
4563
4762
 
@@ -4566,7 +4765,7 @@ class Communication {
4566
4765
  const response = await PlatformAPIClient.execute(
4567
4766
  this.config,
4568
4767
  "post",
4569
- `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-instant`,
4768
+ `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/engine/send-sync`,
4570
4769
  query_params,
4571
4770
  body,
4572
4771
  requestHeaders,
@@ -4580,10 +4779,10 @@ class Communication {
4580
4779
 
4581
4780
  const {
4582
4781
  error: res_error,
4583
- } = CommunicationPlatformModel.EngineResult().validate(responseData, {
4584
- abortEarly: false,
4585
- allowUnknown: true,
4586
- });
4782
+ } = CommunicationPlatformModel.SendInstantResponse().validate(
4783
+ responseData,
4784
+ { abortEarly: false, allowUnknown: true }
4785
+ );
4587
4786
 
4588
4787
  if (res_error) {
4589
4788
  if (this.config.options.strictResponseCheck === true) {
@@ -4591,7 +4790,7 @@ class Communication {
4591
4790
  } else {
4592
4791
  Logger({
4593
4792
  level: "WARN",
4594
- message: `Response Validation Warnings for platform > Communication > sendCommunicationSynchronously \n ${res_error}`,
4793
+ message: `Response Validation Warnings for platform > Communication > sendEngineCommunicationSynchronously \n ${res_error}`,
4595
4794
  });
4596
4795
  }
4597
4796
  }
@@ -4605,11 +4804,11 @@ class Communication {
4605
4804
  * @param {import("../PlatformAPIClient").Options} - Options
4606
4805
  * @returns {Promise<CommunicationPlatformModel.SendOtpCommsRes>} - Success response
4607
4806
  * @name sendOtp
4608
- * @summary: Send OTP
4609
- * @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/).
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/).
4610
4809
  */
4611
4810
  async sendOtp(
4612
- { body, requestHeaders } = { requestHeaders: {} },
4811
+ { body, ci, requestHeaders } = { requestHeaders: {} },
4613
4812
  { responseHeaders } = { responseHeaders: false }
4614
4813
  ) {
4615
4814
  const {
@@ -4617,6 +4816,7 @@ class Communication {
4617
4816
  } = CommunicationPlatformApplicationValidator.sendOtp().validate(
4618
4817
  {
4619
4818
  body,
4819
+ ci,
4620
4820
  },
4621
4821
  { abortEarly: false, allowUnknown: true }
4622
4822
  );
@@ -4630,6 +4830,7 @@ class Communication {
4630
4830
  } = CommunicationPlatformApplicationValidator.sendOtp().validate(
4631
4831
  {
4632
4832
  body,
4833
+ ci,
4633
4834
  },
4634
4835
  { abortEarly: false, allowUnknown: false }
4635
4836
  );
@@ -4641,6 +4842,7 @@ class Communication {
4641
4842
  }
4642
4843
 
4643
4844
  const query_params = {};
4845
+ query_params["ci"] = ci;
4644
4846
 
4645
4847
  const response = await PlatformAPIClient.execute(
4646
4848
  this.config,
@@ -4684,10 +4886,11 @@ class Communication {
4684
4886
  *
4685
4887
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4686
4888
  * @param {import("../PlatformAPIClient").Options} - Options
4687
- * @returns {Promise<CommunicationPlatformModel.TriggerJobResult>} - Success response
4889
+ * @returns {Promise<CommunicationPlatformModel.TriggerJobResponse>} -
4890
+ * Success response
4688
4891
  * @name triggerCampaignJob
4689
- * @summary: Trigger a campaign job
4690
- * @description: Initiates a job to execute a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
4691
4894
  */
4692
4895
  async triggerCampaignJob(
4693
4896
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4740,7 +4943,7 @@ class Communication {
4740
4943
 
4741
4944
  const {
4742
4945
  error: res_error,
4743
- } = CommunicationPlatformModel.TriggerJobResult().validate(responseData, {
4946
+ } = CommunicationPlatformModel.TriggerJobResponse().validate(responseData, {
4744
4947
  abortEarly: false,
4745
4948
  allowUnknown: true,
4746
4949
  });
@@ -4767,8 +4970,8 @@ class Communication {
4767
4970
  * @param {import("../PlatformAPIClient").Options} - Options
4768
4971
  * @returns {Promise<CommunicationPlatformModel.AppProvider>} - Success response
4769
4972
  * @name updateAppProviders
4770
- * @summary: Update application providers
4771
- * @description: Modify provider configuration using provider object id . - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
4772
4975
  */
4773
4976
  async updateAppProviders(
4774
4977
  { body, requestHeaders } = { requestHeaders: {} },
@@ -4840,6 +5043,89 @@ class Communication {
4840
5043
  return response;
4841
5044
  }
4842
5045
 
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
+
4843
5129
  /**
4844
5130
  * @param {CommunicationPlatformApplicationValidator.UpdateAudienceByIdParam} arg
4845
5131
  * - Arg object
@@ -4848,8 +5134,8 @@ class Communication {
4848
5134
  * @param {import("../PlatformAPIClient").Options} - Options
4849
5135
  * @returns {Promise<CommunicationPlatformModel.Audience>} - Success response
4850
5136
  * @name updateAudienceById
4851
- * @summary: Update an audience
4852
- * @description: Modify the configuration of a specific audience. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
4853
5139
  */
4854
5140
  async updateAudienceById(
4855
5141
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -4931,8 +5217,8 @@ class Communication {
4931
5217
  * @param {import("../PlatformAPIClient").Options} - Options
4932
5218
  * @returns {Promise<CommunicationPlatformModel.Campaign>} - Success response
4933
5219
  * @name updateCampaignById
4934
- * @summary: Update a campaign
4935
- * @description: Modify the configuration of a specific communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
4936
5222
  */
4937
5223
  async updateCampaignById(
4938
5224
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5014,8 +5300,8 @@ class Communication {
5014
5300
  * @param {import("../PlatformAPIClient").Options} - Options
5015
5301
  * @returns {Promise<CommunicationPlatformModel.EmailProvider>} - Success response
5016
5302
  * @name updateEmailProviderById
5017
- * @summary: Update email provider
5018
- * @description: Modifys the configurations of a specific email communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
5019
5305
  */
5020
5306
  async updateEmailProviderById(
5021
5307
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5097,8 +5383,8 @@ class Communication {
5097
5383
  * @param {import("../PlatformAPIClient").Options} - Options
5098
5384
  * @returns {Promise<CommunicationPlatformModel.EmailTemplate>} - Success response
5099
5385
  * @name updateEmailTemplateById
5100
- * @summary: Update an email template
5101
- * @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/).
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/).
5102
5388
  */
5103
5389
  async updateEmailTemplateById(
5104
5390
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5180,17 +5466,19 @@ class Communication {
5180
5466
  * @param {import("../PlatformAPIClient").Options} - Options
5181
5467
  * @returns {Promise<CommunicationPlatformModel.OtpConfiguration>} - Success response
5182
5468
  * @name updateOtpConfiguration
5183
- * @summary: Update configuration of otp
5184
- * @description: Updates all configurations related to OTP. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
5185
5471
  */
5186
5472
  async updateOtpConfiguration(
5187
- { requestHeaders } = { requestHeaders: {} },
5473
+ { body, requestHeaders } = { requestHeaders: {} },
5188
5474
  { responseHeaders } = { responseHeaders: false }
5189
5475
  ) {
5190
5476
  const {
5191
5477
  error,
5192
5478
  } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate(
5193
- {},
5479
+ {
5480
+ body,
5481
+ },
5194
5482
  { abortEarly: false, allowUnknown: true }
5195
5483
  );
5196
5484
  if (error) {
@@ -5201,7 +5489,9 @@ class Communication {
5201
5489
  const {
5202
5490
  error: warrning,
5203
5491
  } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate(
5204
- {},
5492
+ {
5493
+ body,
5494
+ },
5205
5495
  { abortEarly: false, allowUnknown: false }
5206
5496
  );
5207
5497
  if (warrning) {
@@ -5218,7 +5508,7 @@ class Communication {
5218
5508
  "put",
5219
5509
  `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/otp/otp-configuration`,
5220
5510
  query_params,
5221
- undefined,
5511
+ body,
5222
5512
  requestHeaders,
5223
5513
  { responseHeaders }
5224
5514
  );
@@ -5255,10 +5545,10 @@ class Communication {
5255
5545
  *
5256
5546
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5257
5547
  * @param {import("../PlatformAPIClient").Options} - Options
5258
- * @returns {Promise<Object>} - Success response
5548
+ * @returns {Promise<CommunicationPlatformModel.SmsProvider>} - Success response
5259
5549
  * @name updateSmsProviderById
5260
- * @summary: Update SMS provider
5261
- * @description: Modifys the configurations of a specific SMS communication provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/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/).
5262
5552
  */
5263
5553
  async updateSmsProviderById(
5264
5554
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5311,7 +5601,9 @@ class Communication {
5311
5601
  responseData = response[0];
5312
5602
  }
5313
5603
 
5314
- const { error: res_error } = Joi.any().validate(responseData, {
5604
+ const {
5605
+ error: res_error,
5606
+ } = CommunicationPlatformModel.SmsProvider().validate(responseData, {
5315
5607
  abortEarly: false,
5316
5608
  allowUnknown: true,
5317
5609
  });
@@ -5338,8 +5630,8 @@ class Communication {
5338
5630
  * @param {import("../PlatformAPIClient").Options} - Options
5339
5631
  * @returns {Promise<CommunicationPlatformModel.SmsTemplate>} - Success response
5340
5632
  * @name updateSmsTemplateById
5341
- * @summary: Update a SMS template
5342
- * @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/).
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/).
5343
5635
  */
5344
5636
  async updateSmsTemplateById(
5345
5637
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5421,8 +5713,8 @@ class Communication {
5421
5713
  * - Success response
5422
5714
  *
5423
5715
  * @name verfiyOtp
5424
- * @summary: Verify OTP
5425
- * @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/).
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/).
5426
5718
  */
5427
5719
  async verfiyOtp(
5428
5720
  { body, requestHeaders } = { requestHeaders: {} },