@gofynd/fdk-client-javascript 1.0.2 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +557 -1279
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +14453 -17192
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3438 -4172
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3400 -5361
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +38 -38
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +100 -100
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +84 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +581 -581
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -2,25 +2,25 @@ const Joi = require("joi");
|
|
|
2
2
|
const AnalyticsModel = require("./AnalyticsPlatformModel");
|
|
3
3
|
|
|
4
4
|
class AnalyticsValidator {
|
|
5
|
-
static
|
|
6
|
-
return Joi.object({}).required();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
static getStatiscticsGroupComponents() {
|
|
5
|
+
static getAbandonCartDetail() {
|
|
10
6
|
return Joi.object({
|
|
11
|
-
|
|
7
|
+
cartId: Joi.string().allow("").required(),
|
|
12
8
|
}).required();
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
static
|
|
11
|
+
static getAbandonCartList() {
|
|
16
12
|
return Joi.object({
|
|
17
|
-
|
|
13
|
+
fromDate: Joi.string().allow("").required(),
|
|
14
|
+
toDate: Joi.string().allow("").required(),
|
|
15
|
+
pageNo: Joi.number(),
|
|
16
|
+
pageSize: Joi.number(),
|
|
18
17
|
}).required();
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
static
|
|
20
|
+
static getAbandonCartsCSV() {
|
|
22
21
|
return Joi.object({
|
|
23
|
-
|
|
22
|
+
fromDate: Joi.string().allow("").required(),
|
|
23
|
+
toDate: Joi.string().allow("").required(),
|
|
24
24
|
}).required();
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -30,27 +30,27 @@ class AnalyticsValidator {
|
|
|
30
30
|
}).required();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
static
|
|
33
|
+
static getComponentStatsCSV() {
|
|
34
34
|
return Joi.object({
|
|
35
|
-
|
|
36
|
-
toDate: Joi.string().allow("").required(),
|
|
37
|
-
pageNo: Joi.number(),
|
|
38
|
-
pageSize: Joi.number(),
|
|
35
|
+
componentName: Joi.string().allow("").required(),
|
|
39
36
|
}).required();
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
static
|
|
39
|
+
static getComponentStatsPDF() {
|
|
43
40
|
return Joi.object({
|
|
44
|
-
|
|
45
|
-
toDate: Joi.string().allow("").required(),
|
|
41
|
+
componentName: Joi.string().allow("").required(),
|
|
46
42
|
}).required();
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
static
|
|
45
|
+
static getStatiscticsGroupComponents() {
|
|
50
46
|
return Joi.object({
|
|
51
|
-
|
|
47
|
+
groupName: Joi.string().allow("").required(),
|
|
52
48
|
}).required();
|
|
53
49
|
}
|
|
50
|
+
|
|
51
|
+
static getStatiscticsGroups() {
|
|
52
|
+
return Joi.object({}).required();
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
module.exports = AnalyticsValidator;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export = AnalyticsModel;
|
|
2
2
|
declare class AnalyticsModel {
|
|
3
|
-
static
|
|
4
|
-
static ErrorRes(): any;
|
|
5
|
-
static StatsGroups(): any;
|
|
6
|
-
static StatsGroupComponent(): any;
|
|
7
|
-
static StatsGroupComponents(): any;
|
|
8
|
-
static StatsRes(): any;
|
|
9
|
-
static ReceivedAt(): any;
|
|
3
|
+
static AbandonCartDetail(): any;
|
|
10
4
|
static AbandonCartsDetail(): any;
|
|
11
|
-
static Page(): any;
|
|
12
5
|
static AbandonCartsList(): any;
|
|
13
|
-
static
|
|
6
|
+
static ErrorRes(): any;
|
|
14
7
|
static ExportJobReq(): any;
|
|
15
8
|
static ExportJobRes(): any;
|
|
16
9
|
static ExportJobStatusRes(): any;
|
|
17
10
|
static GetLogsListReq(): any;
|
|
18
|
-
static MkpLogsResp(): any;
|
|
19
11
|
static GetLogsListRes(): any;
|
|
20
|
-
static SearchLogReq(): any;
|
|
21
12
|
static LogInfo(): any;
|
|
13
|
+
static MkpLogsResp(): any;
|
|
14
|
+
static Page(): any;
|
|
15
|
+
static ReceivedAt(): any;
|
|
16
|
+
static SearchLogReq(): any;
|
|
22
17
|
static SearchLogRes(): any;
|
|
18
|
+
static StatGroup(): any;
|
|
19
|
+
static StatsGroupComponent(): any;
|
|
20
|
+
static StatsGroupComponents(): any;
|
|
21
|
+
static StatsGroups(): any;
|
|
22
|
+
static StatsRes(): any;
|
|
23
23
|
}
|
|
@@ -1,252 +1,169 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class AnalyticsModel {
|
|
4
|
-
static
|
|
5
|
-
return Joi.object({
|
|
6
|
-
key: Joi.string().allow(""),
|
|
7
|
-
|
|
8
|
-
url: Joi.string().allow(""),
|
|
9
|
-
|
|
10
|
-
title: Joi.string().allow(""),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static ErrorRes() {
|
|
15
|
-
return Joi.object({
|
|
16
|
-
message: Joi.string().allow(""),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static StatsGroups() {
|
|
21
|
-
return Joi.object({
|
|
22
|
-
groups: Joi.array().items(AnalyticsModel.StatGroup()),
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static StatsGroupComponent() {
|
|
27
|
-
return Joi.object({
|
|
28
|
-
key: Joi.string().allow(""),
|
|
29
|
-
|
|
30
|
-
url: Joi.string().allow(""),
|
|
31
|
-
|
|
32
|
-
title: Joi.string().allow(""),
|
|
33
|
-
|
|
34
|
-
type: Joi.string().allow(""),
|
|
35
|
-
|
|
36
|
-
filters: Joi.any(),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
static StatsGroupComponents() {
|
|
41
|
-
return Joi.object({
|
|
42
|
-
title: Joi.string().allow(""),
|
|
43
|
-
|
|
44
|
-
components: Joi.array().items(AnalyticsModel.StatsGroupComponent()),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
static StatsRes() {
|
|
49
|
-
return Joi.object({
|
|
50
|
-
key: Joi.string().allow(""),
|
|
51
|
-
|
|
52
|
-
title: Joi.string().allow(""),
|
|
53
|
-
|
|
54
|
-
type: Joi.string().allow(""),
|
|
55
|
-
|
|
56
|
-
data: Joi.any(),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
static ReceivedAt() {
|
|
4
|
+
static AbandonCartDetail() {
|
|
61
5
|
return Joi.object({
|
|
62
|
-
|
|
6
|
+
_id: Joi.string().allow(""),
|
|
7
|
+
address: Joi.any(),
|
|
8
|
+
articles: Joi.array().items(Joi.any()),
|
|
9
|
+
breakup: Joi.any(),
|
|
10
|
+
cart_value: Joi.string().allow(""),
|
|
11
|
+
user_id: Joi.string().allow(""),
|
|
63
12
|
});
|
|
64
13
|
}
|
|
65
|
-
|
|
66
14
|
static AbandonCartsDetail() {
|
|
67
15
|
return Joi.object({
|
|
68
|
-
|
|
69
|
-
|
|
16
|
+
context_app_application_id: Joi.string().allow(""),
|
|
17
|
+
context_traits_email: Joi.string().allow(""),
|
|
70
18
|
context_traits_first_name: Joi.string().allow(""),
|
|
71
|
-
|
|
72
19
|
context_traits_last_name: Joi.string().allow(""),
|
|
73
|
-
|
|
74
20
|
context_traits_phone_number: Joi.string().allow(""),
|
|
75
|
-
|
|
76
|
-
context_traits_email: Joi.string().allow(""),
|
|
77
|
-
|
|
78
|
-
context_app_application_id: Joi.string().allow(""),
|
|
79
|
-
|
|
80
21
|
properties_breakup_values_raw_total: Joi.string().allow(""),
|
|
81
|
-
|
|
22
|
+
properties_cart_id: Joi.string().allow(""),
|
|
82
23
|
received_at: AnalyticsModel.ReceivedAt(),
|
|
83
24
|
});
|
|
84
25
|
}
|
|
85
|
-
|
|
86
|
-
static Page() {
|
|
87
|
-
return Joi.object({
|
|
88
|
-
item_total: Joi.number(),
|
|
89
|
-
|
|
90
|
-
next_id: Joi.string().allow(""),
|
|
91
|
-
|
|
92
|
-
has_previous: Joi.boolean(),
|
|
93
|
-
|
|
94
|
-
has_next: Joi.boolean(),
|
|
95
|
-
|
|
96
|
-
current: Joi.number(),
|
|
97
|
-
|
|
98
|
-
type: Joi.string().allow("").required(),
|
|
99
|
-
|
|
100
|
-
size: Joi.number(),
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
26
|
static AbandonCartsList() {
|
|
105
27
|
return Joi.object({
|
|
106
|
-
items: Joi.array().items(AnalyticsModel.AbandonCartsDetail()),
|
|
107
|
-
|
|
108
28
|
cart_total: Joi.string().allow(""),
|
|
109
|
-
|
|
29
|
+
items: Joi.array().items(AnalyticsModel.AbandonCartsDetail()),
|
|
110
30
|
page: AnalyticsModel.Page(),
|
|
111
31
|
});
|
|
112
32
|
}
|
|
113
|
-
|
|
114
|
-
static AbandonCartDetail() {
|
|
33
|
+
static ErrorRes() {
|
|
115
34
|
return Joi.object({
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
user_id: Joi.string().allow(""),
|
|
119
|
-
|
|
120
|
-
cart_value: Joi.string().allow(""),
|
|
121
|
-
|
|
122
|
-
articles: Joi.array().items(Joi.any()),
|
|
123
|
-
|
|
124
|
-
breakup: Joi.any(),
|
|
125
|
-
|
|
126
|
-
address: Joi.any(),
|
|
35
|
+
message: Joi.string().allow(""),
|
|
127
36
|
});
|
|
128
37
|
}
|
|
129
|
-
|
|
130
38
|
static ExportJobReq() {
|
|
131
39
|
return Joi.object({
|
|
132
|
-
marketplace_name: Joi.string().allow(""),
|
|
133
|
-
|
|
134
|
-
start_time: Joi.string().allow(""),
|
|
135
|
-
|
|
136
40
|
end_time: Joi.string().allow(""),
|
|
137
|
-
|
|
138
41
|
event_type: Joi.string().allow(""),
|
|
139
|
-
|
|
42
|
+
marketplace_name: Joi.string().allow(""),
|
|
43
|
+
start_time: Joi.string().allow(""),
|
|
140
44
|
trace_id: Joi.string().allow(""),
|
|
141
45
|
});
|
|
142
46
|
}
|
|
143
|
-
|
|
144
47
|
static ExportJobRes() {
|
|
145
48
|
return Joi.object({
|
|
146
|
-
status: Joi.string().allow(""),
|
|
147
|
-
|
|
148
49
|
job_id: Joi.string().allow(""),
|
|
50
|
+
status: Joi.string().allow(""),
|
|
149
51
|
});
|
|
150
52
|
}
|
|
151
|
-
|
|
152
53
|
static ExportJobStatusRes() {
|
|
153
54
|
return Joi.object({
|
|
154
|
-
status: Joi.string().allow(""),
|
|
155
|
-
|
|
156
|
-
job_id: Joi.string().allow(""),
|
|
157
|
-
|
|
158
55
|
download_url: Joi.string().allow(""),
|
|
56
|
+
job_id: Joi.string().allow(""),
|
|
57
|
+
status: Joi.string().allow(""),
|
|
159
58
|
});
|
|
160
59
|
}
|
|
161
|
-
|
|
162
60
|
static GetLogsListReq() {
|
|
163
61
|
return Joi.object({
|
|
164
|
-
marketplace_name: Joi.string().allow(""),
|
|
165
|
-
|
|
166
|
-
start_date: Joi.string().allow(""),
|
|
167
|
-
|
|
168
62
|
company_id: Joi.string().allow(""),
|
|
169
|
-
|
|
170
63
|
end_date: Joi.string().allow(""),
|
|
64
|
+
marketplace_name: Joi.string().allow(""),
|
|
65
|
+
start_date: Joi.string().allow(""),
|
|
171
66
|
});
|
|
172
67
|
}
|
|
173
|
-
|
|
174
|
-
static MkpLogsResp() {
|
|
68
|
+
static GetLogsListRes() {
|
|
175
69
|
return Joi.object({
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
70
|
+
items: Joi.array().items(AnalyticsModel.MkpLogsResp()),
|
|
71
|
+
page: AnalyticsModel.Page(),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
static LogInfo() {
|
|
75
|
+
return Joi.object({
|
|
76
|
+
_id: Joi.string().allow(""),
|
|
77
|
+
article_id: Joi.string().allow(""),
|
|
78
|
+
brand_id: Joi.number(),
|
|
79
|
+
company_id: Joi.number(),
|
|
80
|
+
event: Joi.string().allow(""),
|
|
180
81
|
event_type: Joi.string().allow(""),
|
|
181
|
-
|
|
82
|
+
item_id: Joi.number(),
|
|
83
|
+
marketplace_name: Joi.string().allow(""),
|
|
84
|
+
seller_identifier: Joi.string().allow(""),
|
|
85
|
+
status: Joi.string().allow(""),
|
|
86
|
+
store_code: Joi.string().allow(""),
|
|
87
|
+
store_id: Joi.number(),
|
|
182
88
|
trace_id: Joi.string().allow(""),
|
|
183
|
-
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
static MkpLogsResp() {
|
|
92
|
+
return Joi.object({
|
|
184
93
|
count: Joi.string().allow(""),
|
|
185
|
-
|
|
94
|
+
end_time_iso: Joi.string().allow(""),
|
|
95
|
+
event_type: Joi.string().allow(""),
|
|
96
|
+
start_time_iso: Joi.string().allow(""),
|
|
186
97
|
status: Joi.string().allow(""),
|
|
98
|
+
trace_id: Joi.string().allow(""),
|
|
187
99
|
});
|
|
188
100
|
}
|
|
189
|
-
|
|
190
|
-
static GetLogsListRes() {
|
|
101
|
+
static Page() {
|
|
191
102
|
return Joi.object({
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
103
|
+
current: Joi.number(),
|
|
104
|
+
has_next: Joi.boolean(),
|
|
105
|
+
has_previous: Joi.boolean(),
|
|
106
|
+
item_total: Joi.number(),
|
|
107
|
+
next_id: Joi.string().allow(""),
|
|
108
|
+
size: Joi.number(),
|
|
109
|
+
type: Joi.string().allow("").required(),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
static ReceivedAt() {
|
|
113
|
+
return Joi.object({
|
|
114
|
+
value: Joi.string().allow(""),
|
|
195
115
|
});
|
|
196
116
|
}
|
|
197
|
-
|
|
198
117
|
static SearchLogReq() {
|
|
199
118
|
return Joi.object({
|
|
200
|
-
marketplace_name: Joi.string().allow(""),
|
|
201
|
-
|
|
202
|
-
start_date: Joi.string().allow(""),
|
|
203
|
-
|
|
204
119
|
company_id: Joi.string().allow(""),
|
|
205
|
-
|
|
206
120
|
end_date: Joi.string().allow(""),
|
|
207
|
-
|
|
208
121
|
identifier: Joi.string().allow(""),
|
|
209
|
-
|
|
210
122
|
identifier_value: Joi.string().allow(""),
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
static LogInfo() {
|
|
215
|
-
return Joi.object({
|
|
216
|
-
_id: Joi.string().allow(""),
|
|
217
|
-
|
|
218
|
-
status: Joi.string().allow(""),
|
|
219
|
-
|
|
220
|
-
event_type: Joi.string().allow(""),
|
|
221
|
-
|
|
222
123
|
marketplace_name: Joi.string().allow(""),
|
|
223
|
-
|
|
224
|
-
event: Joi.string().allow(""),
|
|
225
|
-
|
|
226
|
-
trace_id: Joi.string().allow(""),
|
|
227
|
-
|
|
228
|
-
company_id: Joi.number(),
|
|
229
|
-
|
|
230
|
-
brand_id: Joi.number(),
|
|
231
|
-
|
|
232
|
-
store_code: Joi.string().allow(""),
|
|
233
|
-
|
|
234
|
-
store_id: Joi.number(),
|
|
235
|
-
|
|
236
|
-
item_id: Joi.number(),
|
|
237
|
-
|
|
238
|
-
article_id: Joi.string().allow(""),
|
|
239
|
-
|
|
240
|
-
seller_identifier: Joi.string().allow(""),
|
|
124
|
+
start_date: Joi.string().allow(""),
|
|
241
125
|
});
|
|
242
126
|
}
|
|
243
|
-
|
|
244
127
|
static SearchLogRes() {
|
|
245
128
|
return Joi.object({
|
|
246
129
|
items: Joi.array().items(AnalyticsModel.LogInfo()),
|
|
247
|
-
|
|
248
130
|
page: AnalyticsModel.Page(),
|
|
249
131
|
});
|
|
250
132
|
}
|
|
133
|
+
static StatGroup() {
|
|
134
|
+
return Joi.object({
|
|
135
|
+
key: Joi.string().allow(""),
|
|
136
|
+
title: Joi.string().allow(""),
|
|
137
|
+
url: Joi.string().allow(""),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
static StatsGroupComponent() {
|
|
141
|
+
return Joi.object({
|
|
142
|
+
filters: Joi.any(),
|
|
143
|
+
key: Joi.string().allow(""),
|
|
144
|
+
title: Joi.string().allow(""),
|
|
145
|
+
type: Joi.string().allow(""),
|
|
146
|
+
url: Joi.string().allow(""),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static StatsGroupComponents() {
|
|
150
|
+
return Joi.object({
|
|
151
|
+
components: Joi.array().items(AnalyticsModel.StatsGroupComponent()),
|
|
152
|
+
title: Joi.string().allow(""),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
static StatsGroups() {
|
|
156
|
+
return Joi.object({
|
|
157
|
+
groups: Joi.array().items(AnalyticsModel.StatGroup()),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
static StatsRes() {
|
|
161
|
+
return Joi.object({
|
|
162
|
+
data: Joi.any(),
|
|
163
|
+
key: Joi.string().allow(""),
|
|
164
|
+
title: Joi.string().allow(""),
|
|
165
|
+
type: Joi.string().allow(""),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
251
168
|
}
|
|
252
169
|
module.exports = AnalyticsModel;
|
|
@@ -2,16 +2,6 @@ export = AuditTrail;
|
|
|
2
2
|
declare class AuditTrail {
|
|
3
3
|
constructor(config: any);
|
|
4
4
|
config: any;
|
|
5
|
-
/**
|
|
6
|
-
* @param {Object} arg - Arg object.
|
|
7
|
-
* @param {string} arg.qs - Logs Query
|
|
8
|
-
* @returns {Promise<LogSchemaResponse>} - Success response
|
|
9
|
-
* @summary: Get paginated audit logs
|
|
10
|
-
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs
|
|
11
|
-
*/
|
|
12
|
-
getAuditLogs({ qs }?: {
|
|
13
|
-
qs: string;
|
|
14
|
-
}): Promise<LogSchemaResponse>;
|
|
15
5
|
/**
|
|
16
6
|
* @param {Object} arg - Arg object.
|
|
17
7
|
* @param {RequestBodyAuditLog} arg.body
|
|
@@ -32,6 +22,16 @@ declare class AuditTrail {
|
|
|
32
22
|
getAuditLog({ id }?: {
|
|
33
23
|
id: string;
|
|
34
24
|
}): Promise<LogSchemaResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* @param {Object} arg - Arg object.
|
|
27
|
+
* @param {string} arg.qs - Logs Query
|
|
28
|
+
* @returns {Promise<LogSchemaResponse>} - Success response
|
|
29
|
+
* @summary: Get paginated audit logs
|
|
30
|
+
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs
|
|
31
|
+
*/
|
|
32
|
+
getAuditLogs({ qs }?: {
|
|
33
|
+
qs: string;
|
|
34
|
+
}): Promise<LogSchemaResponse>;
|
|
35
35
|
/**
|
|
36
36
|
* @param {Object} arg - Arg object.
|
|
37
37
|
* @returns {Promise<EntityTypesResponse>} - Success response
|
|
@@ -12,15 +12,15 @@ class AuditTrail {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @param {Object} arg - Arg object.
|
|
15
|
-
* @param {
|
|
16
|
-
* @returns {Promise<
|
|
17
|
-
* @summary:
|
|
18
|
-
* @description:
|
|
15
|
+
* @param {RequestBodyAuditLog} arg.body
|
|
16
|
+
* @returns {Promise<CreateLogResponse>} - Success response
|
|
17
|
+
* @summary: Create logs for auditing later on
|
|
18
|
+
* @description: Create a log instance that stores all the relevant info to be logged
|
|
19
19
|
*/
|
|
20
|
-
async
|
|
21
|
-
const { error } = AuditTrailValidator.
|
|
20
|
+
async createAuditLog({ body } = {}) {
|
|
21
|
+
const { error } = AuditTrailValidator.createAuditLog().validate(
|
|
22
22
|
{
|
|
23
|
-
|
|
23
|
+
body,
|
|
24
24
|
},
|
|
25
25
|
{ abortEarly: false, allowUnknown: true }
|
|
26
26
|
);
|
|
@@ -29,37 +29,36 @@ class AuditTrail {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// Showing warrnings if extra unknown parameters are found
|
|
32
|
-
const { error: warrning } = AuditTrailValidator.
|
|
32
|
+
const { error: warrning } = AuditTrailValidator.createAuditLog().validate(
|
|
33
33
|
{
|
|
34
|
-
|
|
34
|
+
body,
|
|
35
35
|
},
|
|
36
36
|
{ abortEarly: false, allowUnknown: false }
|
|
37
37
|
);
|
|
38
38
|
if (warrning) {
|
|
39
39
|
Logger({
|
|
40
40
|
level: "WARN",
|
|
41
|
-
message: "Parameter Validation warrnings for
|
|
41
|
+
message: "Parameter Validation warrnings for createAuditLog",
|
|
42
42
|
});
|
|
43
43
|
Logger({ level: "WARN", message: warrning });
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const query_params = {};
|
|
47
|
-
query_params["qs"] = qs;
|
|
48
47
|
|
|
49
48
|
const xHeaders = {};
|
|
50
49
|
|
|
51
50
|
const response = await PlatformAPIClient.execute(
|
|
52
51
|
this.config,
|
|
53
|
-
"
|
|
52
|
+
"post",
|
|
54
53
|
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
|
|
55
54
|
query_params,
|
|
56
|
-
|
|
55
|
+
body,
|
|
57
56
|
xHeaders
|
|
58
57
|
);
|
|
59
58
|
|
|
60
59
|
const {
|
|
61
60
|
error: res_error,
|
|
62
|
-
} = AuditTrailModel.
|
|
61
|
+
} = AuditTrailModel.CreateLogResponse().validate(response, {
|
|
63
62
|
abortEarly: false,
|
|
64
63
|
allowUnknown: false,
|
|
65
64
|
});
|
|
@@ -67,7 +66,7 @@ class AuditTrail {
|
|
|
67
66
|
if (res_error) {
|
|
68
67
|
Logger({
|
|
69
68
|
level: "WARN",
|
|
70
|
-
message: "Response Validation Warnnings for
|
|
69
|
+
message: "Response Validation Warnnings for createAuditLog",
|
|
71
70
|
});
|
|
72
71
|
Logger({ level: "WARN", message: res_error });
|
|
73
72
|
}
|
|
@@ -77,15 +76,15 @@ class AuditTrail {
|
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* @param {Object} arg - Arg object.
|
|
80
|
-
* @param {
|
|
81
|
-
* @returns {Promise<
|
|
82
|
-
* @summary:
|
|
83
|
-
* @description:
|
|
79
|
+
* @param {string} arg.id - Log uuid
|
|
80
|
+
* @returns {Promise<LogSchemaResponse>} - Success response
|
|
81
|
+
* @summary: Get audit log
|
|
82
|
+
* @description: Get detailed log information by their id
|
|
84
83
|
*/
|
|
85
|
-
async
|
|
86
|
-
const { error } = AuditTrailValidator.
|
|
84
|
+
async getAuditLog({ id } = {}) {
|
|
85
|
+
const { error } = AuditTrailValidator.getAuditLog().validate(
|
|
87
86
|
{
|
|
88
|
-
|
|
87
|
+
id,
|
|
89
88
|
},
|
|
90
89
|
{ abortEarly: false, allowUnknown: true }
|
|
91
90
|
);
|
|
@@ -94,16 +93,16 @@ class AuditTrail {
|
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
// Showing warrnings if extra unknown parameters are found
|
|
97
|
-
const { error: warrning } = AuditTrailValidator.
|
|
96
|
+
const { error: warrning } = AuditTrailValidator.getAuditLog().validate(
|
|
98
97
|
{
|
|
99
|
-
|
|
98
|
+
id,
|
|
100
99
|
},
|
|
101
100
|
{ abortEarly: false, allowUnknown: false }
|
|
102
101
|
);
|
|
103
102
|
if (warrning) {
|
|
104
103
|
Logger({
|
|
105
104
|
level: "WARN",
|
|
106
|
-
message: "Parameter Validation warrnings for
|
|
105
|
+
message: "Parameter Validation warrnings for getAuditLog",
|
|
107
106
|
});
|
|
108
107
|
Logger({ level: "WARN", message: warrning });
|
|
109
108
|
}
|
|
@@ -114,16 +113,16 @@ class AuditTrail {
|
|
|
114
113
|
|
|
115
114
|
const response = await PlatformAPIClient.execute(
|
|
116
115
|
this.config,
|
|
117
|
-
"
|
|
118
|
-
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs
|
|
116
|
+
"get",
|
|
117
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/${id}`,
|
|
119
118
|
query_params,
|
|
120
|
-
|
|
119
|
+
undefined,
|
|
121
120
|
xHeaders
|
|
122
121
|
);
|
|
123
122
|
|
|
124
123
|
const {
|
|
125
124
|
error: res_error,
|
|
126
|
-
} = AuditTrailModel.
|
|
125
|
+
} = AuditTrailModel.LogSchemaResponse().validate(response, {
|
|
127
126
|
abortEarly: false,
|
|
128
127
|
allowUnknown: false,
|
|
129
128
|
});
|
|
@@ -131,7 +130,7 @@ class AuditTrail {
|
|
|
131
130
|
if (res_error) {
|
|
132
131
|
Logger({
|
|
133
132
|
level: "WARN",
|
|
134
|
-
message: "Response Validation Warnnings for
|
|
133
|
+
message: "Response Validation Warnnings for getAuditLog",
|
|
135
134
|
});
|
|
136
135
|
Logger({ level: "WARN", message: res_error });
|
|
137
136
|
}
|
|
@@ -141,15 +140,15 @@ class AuditTrail {
|
|
|
141
140
|
|
|
142
141
|
/**
|
|
143
142
|
* @param {Object} arg - Arg object.
|
|
144
|
-
* @param {string} arg.
|
|
143
|
+
* @param {string} arg.qs - Logs Query
|
|
145
144
|
* @returns {Promise<LogSchemaResponse>} - Success response
|
|
146
|
-
* @summary: Get audit
|
|
147
|
-
* @description: Get
|
|
145
|
+
* @summary: Get paginated audit logs
|
|
146
|
+
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs
|
|
148
147
|
*/
|
|
149
|
-
async
|
|
150
|
-
const { error } = AuditTrailValidator.
|
|
148
|
+
async getAuditLogs({ qs } = {}) {
|
|
149
|
+
const { error } = AuditTrailValidator.getAuditLogs().validate(
|
|
151
150
|
{
|
|
152
|
-
|
|
151
|
+
qs,
|
|
153
152
|
},
|
|
154
153
|
{ abortEarly: false, allowUnknown: true }
|
|
155
154
|
);
|
|
@@ -158,28 +157,29 @@ class AuditTrail {
|
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
// Showing warrnings if extra unknown parameters are found
|
|
161
|
-
const { error: warrning } = AuditTrailValidator.
|
|
160
|
+
const { error: warrning } = AuditTrailValidator.getAuditLogs().validate(
|
|
162
161
|
{
|
|
163
|
-
|
|
162
|
+
qs,
|
|
164
163
|
},
|
|
165
164
|
{ abortEarly: false, allowUnknown: false }
|
|
166
165
|
);
|
|
167
166
|
if (warrning) {
|
|
168
167
|
Logger({
|
|
169
168
|
level: "WARN",
|
|
170
|
-
message: "Parameter Validation warrnings for
|
|
169
|
+
message: "Parameter Validation warrnings for getAuditLogs",
|
|
171
170
|
});
|
|
172
171
|
Logger({ level: "WARN", message: warrning });
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
const query_params = {};
|
|
175
|
+
query_params["qs"] = qs;
|
|
176
176
|
|
|
177
177
|
const xHeaders = {};
|
|
178
178
|
|
|
179
179
|
const response = await PlatformAPIClient.execute(
|
|
180
180
|
this.config,
|
|
181
181
|
"get",
|
|
182
|
-
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs
|
|
182
|
+
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
|
|
183
183
|
query_params,
|
|
184
184
|
undefined,
|
|
185
185
|
xHeaders
|
|
@@ -195,7 +195,7 @@ class AuditTrail {
|
|
|
195
195
|
if (res_error) {
|
|
196
196
|
Logger({
|
|
197
197
|
level: "WARN",
|
|
198
|
-
message: "Response Validation Warnnings for
|
|
198
|
+
message: "Response Validation Warnnings for getAuditLogs",
|
|
199
199
|
});
|
|
200
200
|
Logger({ level: "WARN", message: res_error });
|
|
201
201
|
}
|