@gofynd/fdk-client-javascript 1.1.6 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export = ThemeValidator;
|
|
2
|
+
declare class ThemeValidator {
|
|
3
|
+
static getAllPages(): any;
|
|
4
|
+
static createPage(): any;
|
|
5
|
+
static updateMultiplePages(): any;
|
|
6
|
+
static getPage(): any;
|
|
7
|
+
static updatePage(): any;
|
|
8
|
+
static deletePage(): any;
|
|
9
|
+
static getApplicationThemes(): any;
|
|
10
|
+
static getThemeById(): any;
|
|
11
|
+
static updateTheme(): any;
|
|
12
|
+
static deleteTheme(): any;
|
|
13
|
+
static getOrganizationThemes(): any;
|
|
14
|
+
static getOrganizationThemeDetails(): any;
|
|
15
|
+
static updateDraftTheme(): any;
|
|
16
|
+
static submitOrganizationTheme(): any;
|
|
17
|
+
static deleteOrganizationTheme(): any;
|
|
18
|
+
static getLatestVersionOfThemeBySlug(): any;
|
|
19
|
+
static createNewThemeInOrganization(): any;
|
|
20
|
+
static getThemeRejectionReasons(): any;
|
|
21
|
+
static getThemeVersions(): any;
|
|
22
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
const ThemeModel = require("./ThemePartnerModel");
|
|
4
|
+
class ThemeValidator {
|
|
5
|
+
static getAllPages() {
|
|
6
|
+
return Joi.object({
|
|
7
|
+
companyId: Joi.number().required(),
|
|
8
|
+
applicationId: Joi.string().allow("").required(),
|
|
9
|
+
themeId: Joi.string().allow("").required(),
|
|
10
|
+
}).required();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static createPage() {
|
|
14
|
+
return Joi.object({
|
|
15
|
+
companyId: Joi.number().required(),
|
|
16
|
+
applicationId: Joi.string().allow("").required(),
|
|
17
|
+
themeId: Joi.string().allow("").required(),
|
|
18
|
+
|
|
19
|
+
body: ThemeModel.AvailablePageSchema().required(),
|
|
20
|
+
}).required();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static updateMultiplePages() {
|
|
24
|
+
return Joi.object({
|
|
25
|
+
companyId: Joi.number().required(),
|
|
26
|
+
applicationId: Joi.string().allow("").required(),
|
|
27
|
+
themeId: Joi.string().allow("").required(),
|
|
28
|
+
|
|
29
|
+
body: ThemeModel.AllAvailablePageSchema().required(),
|
|
30
|
+
}).required();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static getPage() {
|
|
34
|
+
return Joi.object({
|
|
35
|
+
companyId: Joi.number().required(),
|
|
36
|
+
applicationId: Joi.string().allow("").required(),
|
|
37
|
+
themeId: Joi.string().allow("").required(),
|
|
38
|
+
pageValue: Joi.string().allow("").required(),
|
|
39
|
+
}).required();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static updatePage() {
|
|
43
|
+
return Joi.object({
|
|
44
|
+
companyId: Joi.number().required(),
|
|
45
|
+
applicationId: Joi.string().allow("").required(),
|
|
46
|
+
themeId: Joi.string().allow("").required(),
|
|
47
|
+
pageValue: Joi.string().allow("").required(),
|
|
48
|
+
|
|
49
|
+
body: ThemeModel.AvailablePageSchema().required(),
|
|
50
|
+
}).required();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static deletePage() {
|
|
54
|
+
return Joi.object({
|
|
55
|
+
companyId: Joi.number().required(),
|
|
56
|
+
applicationId: Joi.string().allow("").required(),
|
|
57
|
+
themeId: Joi.string().allow("").required(),
|
|
58
|
+
pageValue: Joi.string().allow("").required(),
|
|
59
|
+
}).required();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static getApplicationThemes() {
|
|
63
|
+
return Joi.object({
|
|
64
|
+
companyId: Joi.number().required(),
|
|
65
|
+
applicationId: Joi.string().allow("").required(),
|
|
66
|
+
}).required();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static getThemeById() {
|
|
70
|
+
return Joi.object({
|
|
71
|
+
companyId: Joi.number().required(),
|
|
72
|
+
applicationId: Joi.string().allow("").required(),
|
|
73
|
+
themeId: Joi.string().allow("").required(),
|
|
74
|
+
}).required();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static updateTheme() {
|
|
78
|
+
return Joi.object({
|
|
79
|
+
companyId: Joi.number().required(),
|
|
80
|
+
applicationId: Joi.string().allow("").required(),
|
|
81
|
+
themeId: Joi.string().allow("").required(),
|
|
82
|
+
|
|
83
|
+
body: ThemeModel.UpdateThemeRequestBody().required(),
|
|
84
|
+
}).required();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static deleteTheme() {
|
|
88
|
+
return Joi.object({
|
|
89
|
+
companyId: Joi.number().required(),
|
|
90
|
+
applicationId: Joi.string().allow("").required(),
|
|
91
|
+
themeId: Joi.string().allow("").required(),
|
|
92
|
+
}).required();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static getOrganizationThemes() {
|
|
96
|
+
return Joi.object({
|
|
97
|
+
status: Joi.string().allow(""),
|
|
98
|
+
pageSize: Joi.number(),
|
|
99
|
+
pageNo: Joi.number(),
|
|
100
|
+
}).required();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static getOrganizationThemeDetails() {
|
|
104
|
+
return Joi.object({
|
|
105
|
+
themeId: Joi.string().allow("").required(),
|
|
106
|
+
}).required();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static updateDraftTheme() {
|
|
110
|
+
return Joi.object({
|
|
111
|
+
themeId: Joi.string().allow("").required(),
|
|
112
|
+
body: ThemeModel.MarketplaceTheme().required(),
|
|
113
|
+
}).required();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static submitOrganizationTheme() {
|
|
117
|
+
return Joi.object({
|
|
118
|
+
themeId: Joi.string().allow("").required(),
|
|
119
|
+
body: ThemeModel.MarketplaceTheme().required(),
|
|
120
|
+
}).required();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static deleteOrganizationTheme() {
|
|
124
|
+
return Joi.object({
|
|
125
|
+
themeId: Joi.string().allow("").required(),
|
|
126
|
+
}).required();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static getLatestVersionOfThemeBySlug() {
|
|
130
|
+
return Joi.object({
|
|
131
|
+
slugName: Joi.string().allow("").required(),
|
|
132
|
+
}).required();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static createNewThemeInOrganization() {
|
|
136
|
+
return Joi.object({
|
|
137
|
+
slug: Joi.string().allow(""),
|
|
138
|
+
body: ThemeModel.MarketplaceTheme().required(),
|
|
139
|
+
}).required();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static getThemeRejectionReasons() {
|
|
143
|
+
return Joi.object({
|
|
144
|
+
themeId: Joi.string().allow("").required(),
|
|
145
|
+
}).required();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
static getThemeVersions() {
|
|
149
|
+
return Joi.object({
|
|
150
|
+
themeSlug: Joi.string().allow("").required(),
|
|
151
|
+
pageSize: Joi.number(),
|
|
152
|
+
pageNo: Joi.number(),
|
|
153
|
+
}).required();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
module.exports = ThemeValidator;
|
package/sdk/partner/index.d.ts
CHANGED
package/sdk/partner/index.js
CHANGED
|
@@ -3,40 +3,45 @@ declare class AuditTrail {
|
|
|
3
3
|
constructor(config: any);
|
|
4
4
|
config: any;
|
|
5
5
|
/**
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {
|
|
8
|
-
* @
|
|
6
|
+
* @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
|
|
7
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
8
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
9
|
+
* @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
|
|
10
|
+
* @name createAuditLog
|
|
9
11
|
* @summary: Create logs for auditing later on
|
|
10
|
-
* @description: Create a log instance that stores all the relevant info to be logged
|
|
12
|
+
* @description: Create a log instance that stores all the relevant info to be logged - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
|
|
11
13
|
*/
|
|
12
|
-
createAuditLog({ body }?: {
|
|
13
|
-
body: RequestBodyAuditLog;
|
|
14
|
-
}): Promise<CreateLogResponse>;
|
|
14
|
+
createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.CreateLogResponse>;
|
|
15
15
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
18
|
-
* @
|
|
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
|
|
19
21
|
* @summary: Get audit log
|
|
20
|
-
* @description: Get detailed log information by their id
|
|
22
|
+
* @description: Get detailed log information by their id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
|
|
21
23
|
*/
|
|
22
|
-
getAuditLog({ id }?: {
|
|
23
|
-
id: string;
|
|
24
|
-
}): Promise<LogSchemaResponse>;
|
|
24
|
+
getAuditLog({ id, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
|
|
25
25
|
/**
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {
|
|
28
|
-
* @
|
|
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
|
|
29
31
|
* @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
|
|
32
|
+
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
|
|
31
33
|
*/
|
|
32
|
-
getAuditLogs({ qs }?: {
|
|
33
|
-
qs: string;
|
|
34
|
-
}): Promise<LogSchemaResponse>;
|
|
34
|
+
getAuditLogs({ qs, limit, sort, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogsParam, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.LogSchemaResponse>;
|
|
35
35
|
/**
|
|
36
|
-
* @param {
|
|
37
|
-
* @
|
|
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
|
|
38
41
|
* @summary: Get entity types
|
|
39
|
-
* @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better
|
|
42
|
+
* @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
|
|
40
43
|
*/
|
|
41
|
-
getEntityTypes({}?: any): Promise<EntityTypesResponse>;
|
|
44
|
+
getEntityTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise<AuditTrailPlatformModel.EntityTypesResponse>;
|
|
42
45
|
}
|
|
46
|
+
import AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator");
|
|
47
|
+
import AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator");
|
|
5
|
+
const AuditTrailPlatformModel = require("./AuditTrailPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -12,14 +12,19 @@ class AuditTrail {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
16
|
-
* @param {
|
|
17
|
-
* @
|
|
15
|
+
* @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object
|
|
16
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
|
+
* @returns {Promise<AuditTrailPlatformModel.CreateLogResponse>} - Success response
|
|
19
|
+
* @name createAuditLog
|
|
18
20
|
* @summary: Create logs for auditing later on
|
|
19
|
-
* @description: Create a log instance that stores all the relevant info to be logged
|
|
21
|
+
* @description: Create a log instance that stores all the relevant info to be logged - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/).
|
|
20
22
|
*/
|
|
21
|
-
async createAuditLog(
|
|
22
|
-
|
|
23
|
+
async createAuditLog(
|
|
24
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
25
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
26
|
+
) {
|
|
27
|
+
const { error } = AuditTrailPlatformValidator.createAuditLog().validate(
|
|
23
28
|
{
|
|
24
29
|
body,
|
|
25
30
|
},
|
|
@@ -30,7 +35,9 @@ class AuditTrail {
|
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
// Showing warrnings if extra unknown parameters are found
|
|
33
|
-
const {
|
|
38
|
+
const {
|
|
39
|
+
error: warrning,
|
|
40
|
+
} = AuditTrailPlatformValidator.createAuditLog().validate(
|
|
34
41
|
{
|
|
35
42
|
body,
|
|
36
43
|
},
|
|
@@ -39,9 +46,8 @@ class AuditTrail {
|
|
|
39
46
|
if (warrning) {
|
|
40
47
|
Logger({
|
|
41
48
|
level: "WARN",
|
|
42
|
-
message:
|
|
49
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > createAuditLog \n ${warrning}`,
|
|
43
50
|
});
|
|
44
|
-
Logger({ level: "WARN", message: warrning });
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
const query_params = {};
|
|
@@ -54,12 +60,18 @@ class AuditTrail {
|
|
|
54
60
|
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
|
|
55
61
|
query_params,
|
|
56
62
|
body,
|
|
57
|
-
xHeaders
|
|
63
|
+
{ ...xHeaders, ...requestHeaders },
|
|
64
|
+
{ responseHeaders }
|
|
58
65
|
);
|
|
59
66
|
|
|
67
|
+
let responseData = response;
|
|
68
|
+
if (responseHeaders) {
|
|
69
|
+
responseData = response[0];
|
|
70
|
+
}
|
|
71
|
+
|
|
60
72
|
const {
|
|
61
73
|
error: res_error,
|
|
62
|
-
} =
|
|
74
|
+
} = AuditTrailPlatformModel.CreateLogResponse().validate(responseData, {
|
|
63
75
|
abortEarly: false,
|
|
64
76
|
allowUnknown: false,
|
|
65
77
|
});
|
|
@@ -67,23 +79,27 @@ class AuditTrail {
|
|
|
67
79
|
if (res_error) {
|
|
68
80
|
Logger({
|
|
69
81
|
level: "WARN",
|
|
70
|
-
message:
|
|
82
|
+
message: `Response Validation Warnnings for platform > AuditTrail > createAuditLog \n ${res_error}`,
|
|
71
83
|
});
|
|
72
|
-
Logger({ level: "WARN", message: res_error });
|
|
73
84
|
}
|
|
74
85
|
|
|
75
86
|
return response;
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
/**
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {
|
|
81
|
-
* @
|
|
90
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object
|
|
91
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
92
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
93
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
94
|
+
* @name getAuditLog
|
|
82
95
|
* @summary: Get audit log
|
|
83
|
-
* @description: Get detailed log information by their id
|
|
96
|
+
* @description: Get detailed log information by their id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/).
|
|
84
97
|
*/
|
|
85
|
-
async getAuditLog(
|
|
86
|
-
|
|
98
|
+
async getAuditLog(
|
|
99
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
100
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
101
|
+
) {
|
|
102
|
+
const { error } = AuditTrailPlatformValidator.getAuditLog().validate(
|
|
87
103
|
{
|
|
88
104
|
id,
|
|
89
105
|
},
|
|
@@ -94,7 +110,9 @@ class AuditTrail {
|
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
// Showing warrnings if extra unknown parameters are found
|
|
97
|
-
const {
|
|
113
|
+
const {
|
|
114
|
+
error: warrning,
|
|
115
|
+
} = AuditTrailPlatformValidator.getAuditLog().validate(
|
|
98
116
|
{
|
|
99
117
|
id,
|
|
100
118
|
},
|
|
@@ -103,9 +121,8 @@ class AuditTrail {
|
|
|
103
121
|
if (warrning) {
|
|
104
122
|
Logger({
|
|
105
123
|
level: "WARN",
|
|
106
|
-
message:
|
|
124
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLog \n ${warrning}`,
|
|
107
125
|
});
|
|
108
|
-
Logger({ level: "WARN", message: warrning });
|
|
109
126
|
}
|
|
110
127
|
|
|
111
128
|
const query_params = {};
|
|
@@ -118,12 +135,18 @@ class AuditTrail {
|
|
|
118
135
|
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/${id}`,
|
|
119
136
|
query_params,
|
|
120
137
|
undefined,
|
|
121
|
-
xHeaders
|
|
138
|
+
{ ...xHeaders, ...requestHeaders },
|
|
139
|
+
{ responseHeaders }
|
|
122
140
|
);
|
|
123
141
|
|
|
142
|
+
let responseData = response;
|
|
143
|
+
if (responseHeaders) {
|
|
144
|
+
responseData = response[0];
|
|
145
|
+
}
|
|
146
|
+
|
|
124
147
|
const {
|
|
125
148
|
error: res_error,
|
|
126
|
-
} =
|
|
149
|
+
} = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, {
|
|
127
150
|
abortEarly: false,
|
|
128
151
|
allowUnknown: false,
|
|
129
152
|
});
|
|
@@ -131,25 +154,31 @@ class AuditTrail {
|
|
|
131
154
|
if (res_error) {
|
|
132
155
|
Logger({
|
|
133
156
|
level: "WARN",
|
|
134
|
-
message:
|
|
157
|
+
message: `Response Validation Warnnings for platform > AuditTrail > getAuditLog \n ${res_error}`,
|
|
135
158
|
});
|
|
136
|
-
Logger({ level: "WARN", message: res_error });
|
|
137
159
|
}
|
|
138
160
|
|
|
139
161
|
return response;
|
|
140
162
|
}
|
|
141
163
|
|
|
142
164
|
/**
|
|
143
|
-
* @param {
|
|
144
|
-
* @param {
|
|
145
|
-
* @
|
|
165
|
+
* @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object
|
|
166
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
167
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
168
|
+
* @returns {Promise<AuditTrailPlatformModel.LogSchemaResponse>} - Success response
|
|
169
|
+
* @name getAuditLogs
|
|
146
170
|
* @summary: Get paginated audit logs
|
|
147
|
-
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs
|
|
171
|
+
* @description: Get a paginated set of logs that can be filtered using the available set of parameters and get the relevant group of logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/).
|
|
148
172
|
*/
|
|
149
|
-
async getAuditLogs(
|
|
150
|
-
|
|
173
|
+
async getAuditLogs(
|
|
174
|
+
{ qs, limit, sort, requestHeaders } = { requestHeaders: {} },
|
|
175
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
176
|
+
) {
|
|
177
|
+
const { error } = AuditTrailPlatformValidator.getAuditLogs().validate(
|
|
151
178
|
{
|
|
152
179
|
qs,
|
|
180
|
+
limit,
|
|
181
|
+
sort,
|
|
153
182
|
},
|
|
154
183
|
{ abortEarly: false, allowUnknown: true }
|
|
155
184
|
);
|
|
@@ -158,22 +187,27 @@ class AuditTrail {
|
|
|
158
187
|
}
|
|
159
188
|
|
|
160
189
|
// Showing warrnings if extra unknown parameters are found
|
|
161
|
-
const {
|
|
190
|
+
const {
|
|
191
|
+
error: warrning,
|
|
192
|
+
} = AuditTrailPlatformValidator.getAuditLogs().validate(
|
|
162
193
|
{
|
|
163
194
|
qs,
|
|
195
|
+
limit,
|
|
196
|
+
sort,
|
|
164
197
|
},
|
|
165
198
|
{ abortEarly: false, allowUnknown: false }
|
|
166
199
|
);
|
|
167
200
|
if (warrning) {
|
|
168
201
|
Logger({
|
|
169
202
|
level: "WARN",
|
|
170
|
-
message:
|
|
203
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLogs \n ${warrning}`,
|
|
171
204
|
});
|
|
172
|
-
Logger({ level: "WARN", message: warrning });
|
|
173
205
|
}
|
|
174
206
|
|
|
175
207
|
const query_params = {};
|
|
176
208
|
query_params["qs"] = qs;
|
|
209
|
+
query_params["limit"] = limit;
|
|
210
|
+
query_params["sort"] = sort;
|
|
177
211
|
|
|
178
212
|
const xHeaders = {};
|
|
179
213
|
|
|
@@ -183,12 +217,18 @@ class AuditTrail {
|
|
|
183
217
|
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`,
|
|
184
218
|
query_params,
|
|
185
219
|
undefined,
|
|
186
|
-
xHeaders
|
|
220
|
+
{ ...xHeaders, ...requestHeaders },
|
|
221
|
+
{ responseHeaders }
|
|
187
222
|
);
|
|
188
223
|
|
|
224
|
+
let responseData = response;
|
|
225
|
+
if (responseHeaders) {
|
|
226
|
+
responseData = response[0];
|
|
227
|
+
}
|
|
228
|
+
|
|
189
229
|
const {
|
|
190
230
|
error: res_error,
|
|
191
|
-
} =
|
|
231
|
+
} = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, {
|
|
192
232
|
abortEarly: false,
|
|
193
233
|
allowUnknown: false,
|
|
194
234
|
});
|
|
@@ -196,22 +236,27 @@ class AuditTrail {
|
|
|
196
236
|
if (res_error) {
|
|
197
237
|
Logger({
|
|
198
238
|
level: "WARN",
|
|
199
|
-
message:
|
|
239
|
+
message: `Response Validation Warnnings for platform > AuditTrail > getAuditLogs \n ${res_error}`,
|
|
200
240
|
});
|
|
201
|
-
Logger({ level: "WARN", message: res_error });
|
|
202
241
|
}
|
|
203
242
|
|
|
204
243
|
return response;
|
|
205
244
|
}
|
|
206
245
|
|
|
207
246
|
/**
|
|
208
|
-
* @param {
|
|
209
|
-
* @
|
|
247
|
+
* @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object
|
|
248
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
249
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
250
|
+
* @returns {Promise<AuditTrailPlatformModel.EntityTypesResponse>} - Success response
|
|
251
|
+
* @name getEntityTypes
|
|
210
252
|
* @summary: Get entity types
|
|
211
|
-
* @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better
|
|
253
|
+
* @description: Get a consolidated list of entity types from all the logs stored on the db, which further helps to filter the logs better - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/).
|
|
212
254
|
*/
|
|
213
|
-
async getEntityTypes(
|
|
214
|
-
|
|
255
|
+
async getEntityTypes(
|
|
256
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
257
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
258
|
+
) {
|
|
259
|
+
const { error } = AuditTrailPlatformValidator.getEntityTypes().validate(
|
|
215
260
|
{},
|
|
216
261
|
{ abortEarly: false, allowUnknown: true }
|
|
217
262
|
);
|
|
@@ -220,16 +265,17 @@ class AuditTrail {
|
|
|
220
265
|
}
|
|
221
266
|
|
|
222
267
|
// Showing warrnings if extra unknown parameters are found
|
|
223
|
-
const {
|
|
268
|
+
const {
|
|
269
|
+
error: warrning,
|
|
270
|
+
} = AuditTrailPlatformValidator.getEntityTypes().validate(
|
|
224
271
|
{},
|
|
225
272
|
{ abortEarly: false, allowUnknown: false }
|
|
226
273
|
);
|
|
227
274
|
if (warrning) {
|
|
228
275
|
Logger({
|
|
229
276
|
level: "WARN",
|
|
230
|
-
message:
|
|
277
|
+
message: `Parameter Validation warrnings for platform > AuditTrail > getEntityTypes \n ${warrning}`,
|
|
231
278
|
});
|
|
232
|
-
Logger({ level: "WARN", message: warrning });
|
|
233
279
|
}
|
|
234
280
|
|
|
235
281
|
const query_params = {};
|
|
@@ -242,12 +288,18 @@ class AuditTrail {
|
|
|
242
288
|
`/service/platform/audit-trail/v1.0/company/${this.config.companyId}/entity-types`,
|
|
243
289
|
query_params,
|
|
244
290
|
undefined,
|
|
245
|
-
xHeaders
|
|
291
|
+
{ ...xHeaders, ...requestHeaders },
|
|
292
|
+
{ responseHeaders }
|
|
246
293
|
);
|
|
247
294
|
|
|
295
|
+
let responseData = response;
|
|
296
|
+
if (responseHeaders) {
|
|
297
|
+
responseData = response[0];
|
|
298
|
+
}
|
|
299
|
+
|
|
248
300
|
const {
|
|
249
301
|
error: res_error,
|
|
250
|
-
} =
|
|
302
|
+
} = AuditTrailPlatformModel.EntityTypesResponse().validate(responseData, {
|
|
251
303
|
abortEarly: false,
|
|
252
304
|
allowUnknown: false,
|
|
253
305
|
});
|
|
@@ -255,9 +307,8 @@ class AuditTrail {
|
|
|
255
307
|
if (res_error) {
|
|
256
308
|
Logger({
|
|
257
309
|
level: "WARN",
|
|
258
|
-
message:
|
|
310
|
+
message: `Response Validation Warnnings for platform > AuditTrail > getEntityTypes \n ${res_error}`,
|
|
259
311
|
});
|
|
260
|
-
Logger({ level: "WARN", message: res_error });
|
|
261
312
|
}
|
|
262
313
|
|
|
263
314
|
return response;
|