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