@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- 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 +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- 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 +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- 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 +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- 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 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- 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 +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -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 +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- 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 +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- 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 +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
- package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
- 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 +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- 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 +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- 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 +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- 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/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -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 +2 -2
- package/sdk/public/PublicClient.js +2 -2
- 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 +1 -1
- package/sdk/public/index.js +1 -1
- 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
|
@@ -21,7 +21,7 @@ class WebhookValidator {
|
|
|
21
21
|
static getDeliveryDetailInsights() {
|
|
22
22
|
return Joi.object({
|
|
23
23
|
extensionId: Joi.string().allow("").required(),
|
|
24
|
-
body: WebhookModel.
|
|
24
|
+
body: WebhookModel.DeliveryDetailsRequest().required(),
|
|
25
25
|
}).required();
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -60,7 +60,7 @@ class WebhookValidator {
|
|
|
60
60
|
static getInvalidEventList() {
|
|
61
61
|
return Joi.object({
|
|
62
62
|
extensionId: Joi.string().allow("").required(),
|
|
63
|
-
body: WebhookModel.
|
|
63
|
+
body: WebhookModel.InvalidEventsRequest().required(),
|
|
64
64
|
}).required();
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ class WebhookValidator {
|
|
|
74
74
|
return Joi.object({
|
|
75
75
|
extensionId: Joi.string().allow("").required(),
|
|
76
76
|
subscriberId: Joi.number().required(),
|
|
77
|
-
body: WebhookModel.
|
|
77
|
+
body: WebhookModel.UpdateSubscriberRequest().required(),
|
|
78
78
|
}).required();
|
|
79
79
|
}
|
|
80
80
|
}
|
package/sdk/partner/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export const PartnerConfig: typeof import("./PartnerConfig");
|
|
2
2
|
export const PartnerClient: typeof import("./PartnerClient");
|
|
3
3
|
export namespace PartnerModel {
|
|
4
|
+
const AuthorizationPartnerModel: typeof import("./Authorization/AuthorizationPartnerModel");
|
|
5
|
+
const CatalogPartnerModel: typeof import("./Catalog/CatalogPartnerModel");
|
|
4
6
|
const FileStoragePartnerModel: typeof import("./FileStorage/FileStoragePartnerModel");
|
|
5
7
|
const LeadPartnerModel: typeof import("./Lead/LeadPartnerModel");
|
|
6
8
|
const LogisticsPartnerModel: typeof import("./Logistics/LogisticsPartnerModel");
|
|
9
|
+
const PaymentPartnerModel: typeof import("./Payment/PaymentPartnerModel");
|
|
7
10
|
const ThemePartnerModel: typeof import("./Theme/ThemePartnerModel");
|
|
8
11
|
const WebhookPartnerModel: typeof import("./Webhook/WebhookPartnerModel");
|
|
9
12
|
}
|
package/sdk/partner/index.js
CHANGED
|
@@ -2,12 +2,18 @@ module.exports = {
|
|
|
2
2
|
PartnerConfig: require("./PartnerConfig"),
|
|
3
3
|
PartnerClient: require("./PartnerClient"),
|
|
4
4
|
PartnerModel: {
|
|
5
|
+
AuthorizationPartnerModel: require("./Authorization/AuthorizationPartnerModel"),
|
|
6
|
+
|
|
7
|
+
CatalogPartnerModel: require("./Catalog/CatalogPartnerModel"),
|
|
8
|
+
|
|
5
9
|
FileStoragePartnerModel: require("./FileStorage/FileStoragePartnerModel"),
|
|
6
10
|
|
|
7
11
|
LeadPartnerModel: require("./Lead/LeadPartnerModel"),
|
|
8
12
|
|
|
9
13
|
LogisticsPartnerModel: require("./Logistics/LogisticsPartnerModel"),
|
|
10
14
|
|
|
15
|
+
PaymentPartnerModel: require("./Payment/PaymentPartnerModel"),
|
|
16
|
+
|
|
11
17
|
ThemePartnerModel: require("./Theme/ThemePartnerModel"),
|
|
12
18
|
|
|
13
19
|
WebhookPartnerModel: require("./Webhook/WebhookPartnerModel"),
|
|
@@ -9,7 +9,7 @@ export = AnalyticsPlatformApplicationValidator;
|
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* @typedef StartDownloadForQueryV2Param
|
|
12
|
-
* @property {string} exportType
|
|
12
|
+
* @property {string} exportType
|
|
13
13
|
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
14
14
|
*/
|
|
15
15
|
declare class AnalyticsPlatformApplicationValidator {
|
|
@@ -33,9 +33,6 @@ type ExecuteJobForProvidedParametersV2Param = {
|
|
|
33
33
|
body: AnalyticsPlatformModel.JobExecute;
|
|
34
34
|
};
|
|
35
35
|
type StartDownloadForQueryV2Param = {
|
|
36
|
-
/**
|
|
37
|
-
* - Format in which to be exported(eg. CSV or excel).
|
|
38
|
-
*/
|
|
39
36
|
exportType: string;
|
|
40
37
|
body: AnalyticsPlatformModel.FileDownloadRequestBody;
|
|
41
38
|
};
|
|
@@ -14,7 +14,7 @@ const AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @typedef StartDownloadForQueryV2Param
|
|
17
|
-
* @property {string} exportType
|
|
17
|
+
* @property {string} exportType
|
|
18
18
|
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
19
19
|
*/
|
|
20
20
|
|
|
@@ -8,6 +8,7 @@ export = AnalyticsPlatformModel;
|
|
|
8
8
|
* @property {number} [current] - The current page number.
|
|
9
9
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
10
10
|
* @property {number} [size] - The number of items per page.
|
|
11
|
+
* @property {number} [total] - Total number of items.
|
|
11
12
|
*/
|
|
12
13
|
/**
|
|
13
14
|
* @typedef FileDownloadRequestBody
|
|
@@ -71,6 +72,10 @@ type Page = {
|
|
|
71
72
|
* - The number of items per page.
|
|
72
73
|
*/
|
|
73
74
|
size?: number;
|
|
75
|
+
/**
|
|
76
|
+
* - Total number of items.
|
|
77
|
+
*/
|
|
78
|
+
total?: number;
|
|
74
79
|
};
|
|
75
80
|
/** @returns {FileDownloadRequestBody} */
|
|
76
81
|
declare function FileDownloadRequestBody(): FileDownloadRequestBody;
|
|
@@ -9,6 +9,7 @@ const Joi = require("joi");
|
|
|
9
9
|
* @property {number} [current] - The current page number.
|
|
10
10
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
11
11
|
* @property {number} [size] - The number of items per page.
|
|
12
|
+
* @property {number} [total] - Total number of items.
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -52,6 +53,7 @@ class AnalyticsPlatformModel {
|
|
|
52
53
|
current: Joi.number(),
|
|
53
54
|
type: Joi.string().allow("").required(),
|
|
54
55
|
size: Joi.number(),
|
|
56
|
+
total: Joi.number(),
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -83,7 +85,7 @@ class AnalyticsPlatformModel {
|
|
|
83
85
|
static JobStatus() {
|
|
84
86
|
return Joi.object({
|
|
85
87
|
start_date: Joi.string().allow(""),
|
|
86
|
-
end_date: Joi.string().allow("")
|
|
88
|
+
end_date: Joi.string().allow(""),
|
|
87
89
|
status: Joi.string().allow(""),
|
|
88
90
|
message: Joi.string().allow(""),
|
|
89
91
|
file_metadata: Joi.array().items(Joi.any()).allow(null, ""),
|
|
@@ -6,12 +6,42 @@ declare class AuditTrail {
|
|
|
6
6
|
* @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
|
|
7
7
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8
8
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
9
|
-
* @returns {Promise<AuditTrailPlatformModel.
|
|
9
|
+
* @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
|
|
10
10
|
* @name createAuditLog
|
|
11
11
|
* @summary: Create an audit log
|
|
12
12
|
* @description: Generate and record an audit log entry for a specific event or action. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
|
|
13
13
|
*/
|
|
14
|
-
createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.
|
|
14
|
+
createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.CreateLogResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object
|
|
17
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
18
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
19
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
20
|
+
* @name getAuditLog
|
|
21
|
+
* @summary: Get an audit log
|
|
22
|
+
* @description: Retrieve a specific audit log entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
|
|
23
|
+
*/
|
|
24
|
+
getAuditLog({ id, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object
|
|
27
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
28
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
29
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
30
|
+
* @name getAuditLogs
|
|
31
|
+
* @summary: Get audit logs
|
|
32
|
+
* @description: Retrieve audit logs for system events and actions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
|
|
33
|
+
*/
|
|
34
|
+
getAuditLogs({ qs, limit, sort, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogsParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object
|
|
37
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
38
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
39
|
+
* @returns {Promise<AuditTrailPlatformModel.EntityTypesResponse>} - Success response
|
|
40
|
+
* @name getEntityTypes
|
|
41
|
+
* @summary: List entity types
|
|
42
|
+
* @description: List of entity types that can be audited within the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
|
|
43
|
+
*/
|
|
44
|
+
getEntityTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.EntityTypesResponse>;
|
|
15
45
|
}
|
|
16
46
|
import AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator");
|
|
17
47
|
import AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
|
|
@@ -18,7 +18,7 @@ class AuditTrail {
|
|
|
18
18
|
* @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
|
|
19
19
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
20
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
21
|
-
* @returns {Promise<AuditTrailPlatformModel.
|
|
21
|
+
* @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
|
|
22
22
|
* @name createAuditLog
|
|
23
23
|
* @summary: Create an audit log
|
|
24
24
|
* @description: Generate and record an audit log entry for a specific event or action. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
|
|
@@ -60,7 +60,7 @@ class AuditTrail {
|
|
|
60
60
|
const response = await PlatformAPIClient.execute(
|
|
61
61
|
this.config,
|
|
62
62
|
"post",
|
|
63
|
-
`/service/platform/
|
|
63
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`,
|
|
64
64
|
query_params,
|
|
65
65
|
body,
|
|
66
66
|
{ ...xHeaders, ...requestHeaders },
|
|
@@ -74,7 +74,7 @@ class AuditTrail {
|
|
|
74
74
|
|
|
75
75
|
const {
|
|
76
76
|
error: res_error,
|
|
77
|
-
} = AuditTrailPlatformModel.
|
|
77
|
+
} = AuditTrailPlatformModel.CreateLogResponse().validate(responseData, {
|
|
78
78
|
abortEarly: false,
|
|
79
79
|
allowUnknown: true,
|
|
80
80
|
});
|
|
@@ -92,6 +92,246 @@ class AuditTrail {
|
|
|
92
92
|
|
|
93
93
|
return response;
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object
|
|
98
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
99
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
100
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
101
|
+
* @name getAuditLog
|
|
102
|
+
* @summary: Get an audit log
|
|
103
|
+
* @description: Retrieve a specific audit log entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
|
|
104
|
+
*/
|
|
105
|
+
async getAuditLog(
|
|
106
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
107
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
108
|
+
) {
|
|
109
|
+
const { error } = AuditTrailPlatformValidator.getAuditLog().validate(
|
|
110
|
+
{
|
|
111
|
+
id,
|
|
112
|
+
},
|
|
113
|
+
{ abortEarly: false, allowUnknown: true }
|
|
114
|
+
);
|
|
115
|
+
if (error) {
|
|
116
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Showing warrnings if extra unknown parameters are found
|
|
120
|
+
const {
|
|
121
|
+
error: warrning,
|
|
122
|
+
} = AuditTrailPlatformValidator.getAuditLog().validate(
|
|
123
|
+
{
|
|
124
|
+
id,
|
|
125
|
+
},
|
|
126
|
+
{ abortEarly: false, allowUnknown: false }
|
|
127
|
+
);
|
|
128
|
+
if (warrning) {
|
|
129
|
+
Logger({
|
|
130
|
+
level: "WARN",
|
|
131
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLog \n ${warrning}`,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const query_params = {};
|
|
136
|
+
|
|
137
|
+
const xHeaders = {};
|
|
138
|
+
|
|
139
|
+
const response = await PlatformAPIClient.execute(
|
|
140
|
+
this.config,
|
|
141
|
+
"get",
|
|
142
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/${id}`,
|
|
143
|
+
query_params,
|
|
144
|
+
undefined,
|
|
145
|
+
{ ...xHeaders, ...requestHeaders },
|
|
146
|
+
{ responseHeaders }
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
let responseData = response;
|
|
150
|
+
if (responseHeaders) {
|
|
151
|
+
responseData = response[0];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const {
|
|
155
|
+
error: res_error,
|
|
156
|
+
} = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, {
|
|
157
|
+
abortEarly: false,
|
|
158
|
+
allowUnknown: true,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (res_error) {
|
|
162
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
163
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
164
|
+
} else {
|
|
165
|
+
Logger({
|
|
166
|
+
level: "WARN",
|
|
167
|
+
message: `Response Validation Warnings for platform > AuditTrail > getAuditLog \n ${res_error}`,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return response;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object
|
|
177
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
178
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
179
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
180
|
+
* @name getAuditLogs
|
|
181
|
+
* @summary: Get audit logs
|
|
182
|
+
* @description: Retrieve audit logs for system events and actions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
|
|
183
|
+
*/
|
|
184
|
+
async getAuditLogs(
|
|
185
|
+
{ qs, limit, sort, requestHeaders } = { requestHeaders: {} },
|
|
186
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
187
|
+
) {
|
|
188
|
+
const { error } = AuditTrailPlatformValidator.getAuditLogs().validate(
|
|
189
|
+
{
|
|
190
|
+
qs,
|
|
191
|
+
limit,
|
|
192
|
+
sort,
|
|
193
|
+
},
|
|
194
|
+
{ abortEarly: false, allowUnknown: true }
|
|
195
|
+
);
|
|
196
|
+
if (error) {
|
|
197
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Showing warrnings if extra unknown parameters are found
|
|
201
|
+
const {
|
|
202
|
+
error: warrning,
|
|
203
|
+
} = AuditTrailPlatformValidator.getAuditLogs().validate(
|
|
204
|
+
{
|
|
205
|
+
qs,
|
|
206
|
+
limit,
|
|
207
|
+
sort,
|
|
208
|
+
},
|
|
209
|
+
{ abortEarly: false, allowUnknown: false }
|
|
210
|
+
);
|
|
211
|
+
if (warrning) {
|
|
212
|
+
Logger({
|
|
213
|
+
level: "WARN",
|
|
214
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLogs \n ${warrning}`,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const query_params = {};
|
|
219
|
+
query_params["qs"] = qs;
|
|
220
|
+
query_params["limit"] = limit;
|
|
221
|
+
query_params["sort"] = sort;
|
|
222
|
+
|
|
223
|
+
const xHeaders = {};
|
|
224
|
+
|
|
225
|
+
const response = await PlatformAPIClient.execute(
|
|
226
|
+
this.config,
|
|
227
|
+
"get",
|
|
228
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`,
|
|
229
|
+
query_params,
|
|
230
|
+
undefined,
|
|
231
|
+
{ ...xHeaders, ...requestHeaders },
|
|
232
|
+
{ responseHeaders }
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
let responseData = response;
|
|
236
|
+
if (responseHeaders) {
|
|
237
|
+
responseData = response[0];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const {
|
|
241
|
+
error: res_error,
|
|
242
|
+
} = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, {
|
|
243
|
+
abortEarly: false,
|
|
244
|
+
allowUnknown: true,
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
if (res_error) {
|
|
248
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
249
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
250
|
+
} else {
|
|
251
|
+
Logger({
|
|
252
|
+
level: "WARN",
|
|
253
|
+
message: `Response Validation Warnings for platform > AuditTrail > getAuditLogs \n ${res_error}`,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return response;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object
|
|
263
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
264
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
265
|
+
* @returns {Promise<AuditTrailPlatformModel.EntityTypesResponse>} - Success response
|
|
266
|
+
* @name getEntityTypes
|
|
267
|
+
* @summary: List entity types
|
|
268
|
+
* @description: List of entity types that can be audited within the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
|
|
269
|
+
*/
|
|
270
|
+
async getEntityTypes(
|
|
271
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
272
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
273
|
+
) {
|
|
274
|
+
const { error } = AuditTrailPlatformValidator.getEntityTypes().validate(
|
|
275
|
+
{},
|
|
276
|
+
{ abortEarly: false, allowUnknown: true }
|
|
277
|
+
);
|
|
278
|
+
if (error) {
|
|
279
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Showing warrnings if extra unknown parameters are found
|
|
283
|
+
const {
|
|
284
|
+
error: warrning,
|
|
285
|
+
} = AuditTrailPlatformValidator.getEntityTypes().validate(
|
|
286
|
+
{},
|
|
287
|
+
{ abortEarly: false, allowUnknown: false }
|
|
288
|
+
);
|
|
289
|
+
if (warrning) {
|
|
290
|
+
Logger({
|
|
291
|
+
level: "WARN",
|
|
292
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getEntityTypes \n ${warrning}`,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const query_params = {};
|
|
297
|
+
|
|
298
|
+
const xHeaders = {};
|
|
299
|
+
|
|
300
|
+
const response = await PlatformAPIClient.execute(
|
|
301
|
+
this.config,
|
|
302
|
+
"get",
|
|
303
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/entity-types`,
|
|
304
|
+
query_params,
|
|
305
|
+
undefined,
|
|
306
|
+
{ ...xHeaders, ...requestHeaders },
|
|
307
|
+
{ responseHeaders }
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
let responseData = response;
|
|
311
|
+
if (responseHeaders) {
|
|
312
|
+
responseData = response[0];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const {
|
|
316
|
+
error: res_error,
|
|
317
|
+
} = AuditTrailPlatformModel.EntityTypesResponse().validate(responseData, {
|
|
318
|
+
abortEarly: false,
|
|
319
|
+
allowUnknown: true,
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
if (res_error) {
|
|
323
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
324
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
325
|
+
} else {
|
|
326
|
+
Logger({
|
|
327
|
+
level: "WARN",
|
|
328
|
+
message: `Response Validation Warnings for platform > AuditTrail > getEntityTypes \n ${res_error}`,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
return response;
|
|
334
|
+
}
|
|
95
335
|
}
|
|
96
336
|
|
|
97
337
|
module.exports = AuditTrail;
|
|
@@ -2,94 +2,190 @@ export = AuditTrailPlatformModel;
|
|
|
2
2
|
/**
|
|
3
3
|
* @typedef RequestBodyAuditLog
|
|
4
4
|
* @property {LogMetaObj} log_meta
|
|
5
|
-
* @property {Object} log_payload
|
|
5
|
+
* @property {Object} log_payload
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
* @typedef
|
|
9
|
-
* @property {string} [message]
|
|
10
|
-
* @property {string} [internal_message]
|
|
8
|
+
* @typedef CreateLogResponse
|
|
9
|
+
* @property {string} [message]
|
|
10
|
+
* @property {string} [internal_message]
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* @typedef LogMetaObj
|
|
14
|
-
* @property {Object} [modifier]
|
|
15
|
-
* @property {string} [application]
|
|
14
|
+
* @property {Object} [modifier]
|
|
15
|
+
* @property {string} [application]
|
|
16
16
|
* @property {EntityObject} [entity]
|
|
17
|
-
* @property {Object} [device_info]
|
|
18
|
-
*
|
|
19
|
-
* @property {Object} [location] - Holds location-related data for the event context.
|
|
20
|
-
* @property {string} [sessions] - Identifies the session associated with the log event.
|
|
17
|
+
* @property {Object} [device_info]
|
|
18
|
+
* @property {Object} [location]
|
|
21
19
|
*/
|
|
22
20
|
/**
|
|
23
21
|
* @typedef EntityObject
|
|
24
|
-
* @property {string} [id]
|
|
25
|
-
* @property {string} [type]
|
|
26
|
-
* @property {string} [action]
|
|
22
|
+
* @property {string} [id]
|
|
23
|
+
* @property {string} [type]
|
|
24
|
+
* @property {string} [action]
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* @typedef LogSchemaResponse
|
|
28
|
+
* @property {LogDocs[]} [docs]
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* @typedef LogDocs
|
|
32
|
+
* @property {EntityObj} [entity]
|
|
33
|
+
* @property {Modifier} [modifier]
|
|
34
|
+
* @property {DeviceInfo} [device_info]
|
|
35
|
+
* @property {Location} [location]
|
|
36
|
+
* @property {string} [_id]
|
|
37
|
+
* @property {string} [company]
|
|
38
|
+
* @property {string} [application]
|
|
39
|
+
* @property {string} [sessions]
|
|
40
|
+
* @property {string} [date]
|
|
41
|
+
* @property {Object} [logs]
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* @typedef EntityObj
|
|
45
|
+
* @property {string} [id]
|
|
46
|
+
* @property {string} [type]
|
|
47
|
+
* @property {string} [action]
|
|
48
|
+
* @property {Object} [entity_details]
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* @typedef Modifier
|
|
52
|
+
* @property {string} [user_id]
|
|
53
|
+
* @property {boolean} [as_administrator]
|
|
54
|
+
* @property {Object} [user_details]
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* @typedef DeviceInfo
|
|
58
|
+
* @property {string} [user_agent]
|
|
59
|
+
* @property {Object} [extra_meta]
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* @typedef Location
|
|
63
|
+
* @property {Object} [extra_meta]
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* @typedef BadRequest
|
|
67
|
+
* @property {string} [message] - Failure message.
|
|
68
|
+
*/
|
|
69
|
+
/**
|
|
70
|
+
* @typedef InternalServerError
|
|
71
|
+
* @property {string} [message] - Internal server Server error
|
|
72
|
+
* @property {string} [code] - Error code
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* @typedef EntityTypesResponse
|
|
76
|
+
* @property {EntityTypeObj[]} [items]
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* @typedef EntityTypeObj
|
|
80
|
+
* @property {string} [entity_value]
|
|
81
|
+
* @property {string} [display_name]
|
|
27
82
|
*/
|
|
28
83
|
declare class AuditTrailPlatformModel {
|
|
29
84
|
}
|
|
30
85
|
declare namespace AuditTrailPlatformModel {
|
|
31
|
-
export { RequestBodyAuditLog,
|
|
86
|
+
export { RequestBodyAuditLog, CreateLogResponse, LogMetaObj, EntityObject, LogSchemaResponse, LogDocs, EntityObj, Modifier, DeviceInfo, Location, BadRequest, InternalServerError, EntityTypesResponse, EntityTypeObj };
|
|
32
87
|
}
|
|
33
88
|
/** @returns {RequestBodyAuditLog} */
|
|
34
89
|
declare function RequestBodyAuditLog(): RequestBodyAuditLog;
|
|
35
90
|
type RequestBodyAuditLog = {
|
|
36
91
|
log_meta: LogMetaObj;
|
|
37
|
-
/**
|
|
38
|
-
* - Detailed information about payload.
|
|
39
|
-
*/
|
|
40
92
|
log_payload: any;
|
|
41
93
|
};
|
|
42
|
-
/** @returns {
|
|
43
|
-
declare function
|
|
44
|
-
type
|
|
45
|
-
/**
|
|
46
|
-
* - Acknowledgement about success or failure of audit log.
|
|
47
|
-
*/
|
|
94
|
+
/** @returns {CreateLogResponse} */
|
|
95
|
+
declare function CreateLogResponse(): CreateLogResponse;
|
|
96
|
+
type CreateLogResponse = {
|
|
48
97
|
message?: string;
|
|
49
|
-
/**
|
|
50
|
-
* - Status of audit log in internal system.
|
|
51
|
-
*/
|
|
52
98
|
internal_message?: string;
|
|
53
99
|
};
|
|
54
100
|
/** @returns {LogMetaObj} */
|
|
55
101
|
declare function LogMetaObj(): LogMetaObj;
|
|
56
102
|
type LogMetaObj = {
|
|
57
|
-
/**
|
|
58
|
-
* - Details about user responsible for modifying events.
|
|
59
|
-
*/
|
|
60
103
|
modifier?: any;
|
|
61
|
-
/**
|
|
62
|
-
* - The application id generating the log event.
|
|
63
|
-
*/
|
|
64
104
|
application?: string;
|
|
65
105
|
entity?: EntityObject;
|
|
66
|
-
/**
|
|
67
|
-
* - Contains device-specific information for
|
|
68
|
-
* the log event.
|
|
69
|
-
*/
|
|
70
106
|
device_info?: any;
|
|
71
|
-
/**
|
|
72
|
-
* - Holds location-related data for the event context.
|
|
73
|
-
*/
|
|
74
107
|
location?: any;
|
|
75
|
-
/**
|
|
76
|
-
* - Identifies the session associated with the log event.
|
|
77
|
-
*/
|
|
78
|
-
sessions?: string;
|
|
79
108
|
};
|
|
80
109
|
/** @returns {EntityObject} */
|
|
81
110
|
declare function EntityObject(): EntityObject;
|
|
82
111
|
type EntityObject = {
|
|
112
|
+
id?: string;
|
|
113
|
+
type?: string;
|
|
114
|
+
action?: string;
|
|
115
|
+
};
|
|
116
|
+
/** @returns {LogSchemaResponse} */
|
|
117
|
+
declare function LogSchemaResponse(): LogSchemaResponse;
|
|
118
|
+
type LogSchemaResponse = {
|
|
119
|
+
docs?: LogDocs[];
|
|
120
|
+
};
|
|
121
|
+
/** @returns {LogDocs} */
|
|
122
|
+
declare function LogDocs(): LogDocs;
|
|
123
|
+
type LogDocs = {
|
|
124
|
+
entity?: EntityObj;
|
|
125
|
+
modifier?: Modifier;
|
|
126
|
+
device_info?: DeviceInfo;
|
|
127
|
+
location?: Location;
|
|
128
|
+
_id?: string;
|
|
129
|
+
company?: string;
|
|
130
|
+
application?: string;
|
|
131
|
+
sessions?: string;
|
|
132
|
+
date?: string;
|
|
133
|
+
logs?: any;
|
|
134
|
+
};
|
|
135
|
+
/** @returns {EntityObj} */
|
|
136
|
+
declare function EntityObj(): EntityObj;
|
|
137
|
+
type EntityObj = {
|
|
138
|
+
id?: string;
|
|
139
|
+
type?: string;
|
|
140
|
+
action?: string;
|
|
141
|
+
entity_details?: any;
|
|
142
|
+
};
|
|
143
|
+
/** @returns {Modifier} */
|
|
144
|
+
declare function Modifier(): Modifier;
|
|
145
|
+
type Modifier = {
|
|
146
|
+
user_id?: string;
|
|
147
|
+
as_administrator?: boolean;
|
|
148
|
+
user_details?: any;
|
|
149
|
+
};
|
|
150
|
+
/** @returns {DeviceInfo} */
|
|
151
|
+
declare function DeviceInfo(): DeviceInfo;
|
|
152
|
+
type DeviceInfo = {
|
|
153
|
+
user_agent?: string;
|
|
154
|
+
extra_meta?: any;
|
|
155
|
+
};
|
|
156
|
+
/** @returns {Location} */
|
|
157
|
+
declare function Location(): Location;
|
|
158
|
+
type Location = {
|
|
159
|
+
extra_meta?: any;
|
|
160
|
+
};
|
|
161
|
+
/** @returns {BadRequest} */
|
|
162
|
+
declare function BadRequest(): BadRequest;
|
|
163
|
+
type BadRequest = {
|
|
83
164
|
/**
|
|
84
|
-
* -
|
|
165
|
+
* - Failure message.
|
|
85
166
|
*/
|
|
86
|
-
|
|
167
|
+
message?: string;
|
|
168
|
+
};
|
|
169
|
+
/** @returns {InternalServerError} */
|
|
170
|
+
declare function InternalServerError(): InternalServerError;
|
|
171
|
+
type InternalServerError = {
|
|
87
172
|
/**
|
|
88
|
-
* -
|
|
173
|
+
* - Internal server Server error
|
|
89
174
|
*/
|
|
90
|
-
|
|
175
|
+
message?: string;
|
|
91
176
|
/**
|
|
92
|
-
* -
|
|
177
|
+
* - Error code
|
|
93
178
|
*/
|
|
94
|
-
|
|
179
|
+
code?: string;
|
|
180
|
+
};
|
|
181
|
+
/** @returns {EntityTypesResponse} */
|
|
182
|
+
declare function EntityTypesResponse(): EntityTypesResponse;
|
|
183
|
+
type EntityTypesResponse = {
|
|
184
|
+
items?: EntityTypeObj[];
|
|
185
|
+
};
|
|
186
|
+
/** @returns {EntityTypeObj} */
|
|
187
|
+
declare function EntityTypeObj(): EntityTypeObj;
|
|
188
|
+
type EntityTypeObj = {
|
|
189
|
+
entity_value?: string;
|
|
190
|
+
display_name?: string;
|
|
95
191
|
};
|