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