@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
|
@@ -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 FileStoragePlatformApplicationValidator = require("./FileStoragePlatformApplicationValidator");
|
|
5
|
+
const FileStoragePlatformModel = require("./FileStoragePlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
7
|
const Joi = require("joi");
|
|
8
8
|
|
|
@@ -15,13 +15,13 @@ class FileStorage {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @param {
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
24
|
-
* @
|
|
18
|
+
* @param {FileStoragePlatformApplicationValidator.AppCompleteUploadParam} arg
|
|
19
|
+
* - Arg object
|
|
20
|
+
*
|
|
21
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
22
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
23
|
+
* @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
|
|
24
|
+
* @name appCompleteUpload
|
|
25
25
|
* @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
|
|
26
26
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
27
27
|
*
|
|
@@ -41,13 +41,15 @@ class FileStorage {
|
|
|
41
41
|
* ### Complete
|
|
42
42
|
* After successfully upload, call `appCompleteUpload` api to complete the upload process.
|
|
43
43
|
* This operation will return the url for the uploaded file.
|
|
44
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
|
|
44
45
|
*/
|
|
45
|
-
async appCompleteUpload(
|
|
46
|
-
namespace,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
async appCompleteUpload(
|
|
47
|
+
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
48
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
49
|
+
) {
|
|
50
|
+
const {
|
|
51
|
+
error,
|
|
52
|
+
} = FileStoragePlatformApplicationValidator.appCompleteUpload().validate(
|
|
51
53
|
{
|
|
52
54
|
namespace,
|
|
53
55
|
|
|
@@ -62,7 +64,7 @@ class FileStorage {
|
|
|
62
64
|
// Showing warrnings if extra unknown parameters are found
|
|
63
65
|
const {
|
|
64
66
|
error: warrning,
|
|
65
|
-
} =
|
|
67
|
+
} = FileStoragePlatformApplicationValidator.appCompleteUpload().validate(
|
|
66
68
|
{
|
|
67
69
|
namespace,
|
|
68
70
|
|
|
@@ -73,9 +75,8 @@ class FileStorage {
|
|
|
73
75
|
if (warrning) {
|
|
74
76
|
Logger({
|
|
75
77
|
level: "WARN",
|
|
76
|
-
message:
|
|
78
|
+
message: `Parameter Validation warrnings for platform > FileStorage > appCompleteUpload \n ${warrning}`,
|
|
77
79
|
});
|
|
78
|
-
Logger({ level: "WARN", message: warrning });
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
const query_params = {};
|
|
@@ -83,14 +84,21 @@ class FileStorage {
|
|
|
83
84
|
const response = await PlatformAPIClient.execute(
|
|
84
85
|
this.config,
|
|
85
86
|
"post",
|
|
86
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete
|
|
87
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
|
|
87
88
|
query_params,
|
|
88
|
-
body
|
|
89
|
+
body,
|
|
90
|
+
requestHeaders,
|
|
91
|
+
{ responseHeaders }
|
|
89
92
|
);
|
|
90
93
|
|
|
94
|
+
let responseData = response;
|
|
95
|
+
if (responseHeaders) {
|
|
96
|
+
responseData = response[0];
|
|
97
|
+
}
|
|
98
|
+
|
|
91
99
|
const {
|
|
92
100
|
error: res_error,
|
|
93
|
-
} =
|
|
101
|
+
} = FileStoragePlatformModel.CompleteResponse().validate(responseData, {
|
|
94
102
|
abortEarly: false,
|
|
95
103
|
allowUnknown: false,
|
|
96
104
|
});
|
|
@@ -98,24 +106,29 @@ class FileStorage {
|
|
|
98
106
|
if (res_error) {
|
|
99
107
|
Logger({
|
|
100
108
|
level: "WARN",
|
|
101
|
-
message:
|
|
109
|
+
message: `Response Validation Warnnings for platform > FileStorage > appCompleteUpload \n ${res_error}`,
|
|
102
110
|
});
|
|
103
|
-
Logger({ level: "WARN", message: res_error });
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
return response;
|
|
107
114
|
}
|
|
108
115
|
|
|
109
116
|
/**
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
113
|
-
* @returns {Promise<
|
|
117
|
+
* @param {FileStoragePlatformApplicationValidator.AppCopyFilesParam} arg - Arg object
|
|
118
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
119
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
120
|
+
* @returns {Promise<FileStoragePlatformModel.BulkUploadSyncMode>} - Success response
|
|
121
|
+
* @name appCopyFiles
|
|
114
122
|
* @summary: Copy Files
|
|
115
|
-
* @description: Copy Files
|
|
123
|
+
* @description: Copy Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
|
|
116
124
|
*/
|
|
117
|
-
async appCopyFiles(
|
|
118
|
-
|
|
125
|
+
async appCopyFiles(
|
|
126
|
+
{ body, sync, requestHeaders } = { requestHeaders: {} },
|
|
127
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
128
|
+
) {
|
|
129
|
+
const {
|
|
130
|
+
error,
|
|
131
|
+
} = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
|
|
119
132
|
{
|
|
120
133
|
body,
|
|
121
134
|
sync,
|
|
@@ -127,7 +140,9 @@ class FileStorage {
|
|
|
127
140
|
}
|
|
128
141
|
|
|
129
142
|
// Showing warrnings if extra unknown parameters are found
|
|
130
|
-
const {
|
|
143
|
+
const {
|
|
144
|
+
error: warrning,
|
|
145
|
+
} = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
|
|
131
146
|
{
|
|
132
147
|
body,
|
|
133
148
|
sync,
|
|
@@ -137,9 +152,8 @@ class FileStorage {
|
|
|
137
152
|
if (warrning) {
|
|
138
153
|
Logger({
|
|
139
154
|
level: "WARN",
|
|
140
|
-
message:
|
|
155
|
+
message: `Parameter Validation warrnings for platform > FileStorage > appCopyFiles \n ${warrning}`,
|
|
141
156
|
});
|
|
142
|
-
Logger({ level: "WARN", message: warrning });
|
|
143
157
|
}
|
|
144
158
|
|
|
145
159
|
const query_params = {};
|
|
@@ -148,14 +162,21 @@ class FileStorage {
|
|
|
148
162
|
const response = await PlatformAPIClient.execute(
|
|
149
163
|
this.config,
|
|
150
164
|
"post",
|
|
151
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy
|
|
165
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy`,
|
|
152
166
|
query_params,
|
|
153
|
-
body
|
|
167
|
+
body,
|
|
168
|
+
requestHeaders,
|
|
169
|
+
{ responseHeaders }
|
|
154
170
|
);
|
|
155
171
|
|
|
172
|
+
let responseData = response;
|
|
173
|
+
if (responseHeaders) {
|
|
174
|
+
responseData = response[0];
|
|
175
|
+
}
|
|
176
|
+
|
|
156
177
|
const {
|
|
157
178
|
error: res_error,
|
|
158
|
-
} =
|
|
179
|
+
} = FileStoragePlatformModel.BulkUploadSyncMode().validate(responseData, {
|
|
159
180
|
abortEarly: false,
|
|
160
181
|
allowUnknown: false,
|
|
161
182
|
});
|
|
@@ -163,22 +184,21 @@ class FileStorage {
|
|
|
163
184
|
if (res_error) {
|
|
164
185
|
Logger({
|
|
165
186
|
level: "WARN",
|
|
166
|
-
message:
|
|
187
|
+
message: `Response Validation Warnnings for platform > FileStorage > appCopyFiles \n ${res_error}`,
|
|
167
188
|
});
|
|
168
|
-
Logger({ level: "WARN", message: res_error });
|
|
169
189
|
}
|
|
170
190
|
|
|
171
191
|
return response;
|
|
172
192
|
}
|
|
173
193
|
|
|
174
194
|
/**
|
|
175
|
-
* @param {
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* @
|
|
181
|
-
* @
|
|
195
|
+
* @param {FileStoragePlatformApplicationValidator.AppStartUploadParam} arg
|
|
196
|
+
* - Arg object
|
|
197
|
+
*
|
|
198
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
199
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
200
|
+
* @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
|
|
201
|
+
* @name appStartUpload
|
|
182
202
|
* @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
|
|
183
203
|
* @description: Uploads an arbitrarily sized buffer or blob.
|
|
184
204
|
*
|
|
@@ -198,13 +218,15 @@ class FileStorage {
|
|
|
198
218
|
* ### Complete
|
|
199
219
|
* After successfully upload, call `appCompleteUpload` api to complete the upload process.
|
|
200
220
|
* This operation will return the url for the uploaded file.
|
|
221
|
+
* - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
|
|
201
222
|
*/
|
|
202
|
-
async appStartUpload(
|
|
203
|
-
namespace,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
223
|
+
async appStartUpload(
|
|
224
|
+
{ namespace, body, requestHeaders } = { requestHeaders: {} },
|
|
225
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
226
|
+
) {
|
|
227
|
+
const {
|
|
228
|
+
error,
|
|
229
|
+
} = FileStoragePlatformApplicationValidator.appStartUpload().validate(
|
|
208
230
|
{
|
|
209
231
|
namespace,
|
|
210
232
|
|
|
@@ -217,7 +239,9 @@ class FileStorage {
|
|
|
217
239
|
}
|
|
218
240
|
|
|
219
241
|
// Showing warrnings if extra unknown parameters are found
|
|
220
|
-
const {
|
|
242
|
+
const {
|
|
243
|
+
error: warrning,
|
|
244
|
+
} = FileStoragePlatformApplicationValidator.appStartUpload().validate(
|
|
221
245
|
{
|
|
222
246
|
namespace,
|
|
223
247
|
|
|
@@ -228,9 +252,8 @@ class FileStorage {
|
|
|
228
252
|
if (warrning) {
|
|
229
253
|
Logger({
|
|
230
254
|
level: "WARN",
|
|
231
|
-
message:
|
|
255
|
+
message: `Parameter Validation warrnings for platform > FileStorage > appStartUpload \n ${warrning}`,
|
|
232
256
|
});
|
|
233
|
-
Logger({ level: "WARN", message: warrning });
|
|
234
257
|
}
|
|
235
258
|
|
|
236
259
|
const query_params = {};
|
|
@@ -238,14 +261,21 @@ class FileStorage {
|
|
|
238
261
|
const response = await PlatformAPIClient.execute(
|
|
239
262
|
this.config,
|
|
240
263
|
"post",
|
|
241
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start
|
|
264
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
|
|
242
265
|
query_params,
|
|
243
|
-
body
|
|
266
|
+
body,
|
|
267
|
+
requestHeaders,
|
|
268
|
+
{ responseHeaders }
|
|
244
269
|
);
|
|
245
270
|
|
|
271
|
+
let responseData = response;
|
|
272
|
+
if (responseHeaders) {
|
|
273
|
+
responseData = response[0];
|
|
274
|
+
}
|
|
275
|
+
|
|
246
276
|
const {
|
|
247
277
|
error: res_error,
|
|
248
|
-
} =
|
|
278
|
+
} = FileStoragePlatformModel.StartResponse().validate(responseData, {
|
|
249
279
|
abortEarly: false,
|
|
250
280
|
allowUnknown: false,
|
|
251
281
|
});
|
|
@@ -253,32 +283,34 @@ class FileStorage {
|
|
|
253
283
|
if (res_error) {
|
|
254
284
|
Logger({
|
|
255
285
|
level: "WARN",
|
|
256
|
-
message:
|
|
286
|
+
message: `Response Validation Warnnings for platform > FileStorage > appStartUpload \n ${res_error}`,
|
|
257
287
|
});
|
|
258
|
-
Logger({ level: "WARN", message: res_error });
|
|
259
288
|
}
|
|
260
289
|
|
|
261
290
|
return response;
|
|
262
291
|
}
|
|
263
292
|
|
|
264
293
|
/**
|
|
265
|
-
* @param {
|
|
266
|
-
* @param {
|
|
267
|
-
* @param {
|
|
268
|
-
* @returns {Promise<BrowseResponse>} - Success response
|
|
294
|
+
* @param {FileStoragePlatformApplicationValidator.AppbrowseParam} arg - Arg object
|
|
295
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
296
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
297
|
+
* @returns {Promise<FileStoragePlatformModel.BrowseResponse>} - Success response
|
|
298
|
+
* @name appbrowse
|
|
269
299
|
* @summary: Browse Files
|
|
270
|
-
* @description: Browse Files
|
|
300
|
+
* @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
|
|
271
301
|
*/
|
|
272
|
-
async appbrowse(
|
|
273
|
-
namespace,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
302
|
+
async appbrowse(
|
|
303
|
+
{ namespace, page, limit, requestHeaders } = { requestHeaders: {} },
|
|
304
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
305
|
+
) {
|
|
306
|
+
const {
|
|
307
|
+
error,
|
|
308
|
+
} = FileStoragePlatformApplicationValidator.appbrowse().validate(
|
|
278
309
|
{
|
|
279
310
|
namespace,
|
|
280
311
|
|
|
281
|
-
|
|
312
|
+
page,
|
|
313
|
+
limit,
|
|
282
314
|
},
|
|
283
315
|
{ abortEarly: false, allowUnknown: true }
|
|
284
316
|
);
|
|
@@ -287,36 +319,46 @@ class FileStorage {
|
|
|
287
319
|
}
|
|
288
320
|
|
|
289
321
|
// Showing warrnings if extra unknown parameters are found
|
|
290
|
-
const {
|
|
322
|
+
const {
|
|
323
|
+
error: warrning,
|
|
324
|
+
} = FileStoragePlatformApplicationValidator.appbrowse().validate(
|
|
291
325
|
{
|
|
292
326
|
namespace,
|
|
293
327
|
|
|
294
|
-
|
|
328
|
+
page,
|
|
329
|
+
limit,
|
|
295
330
|
},
|
|
296
331
|
{ abortEarly: false, allowUnknown: false }
|
|
297
332
|
);
|
|
298
333
|
if (warrning) {
|
|
299
334
|
Logger({
|
|
300
335
|
level: "WARN",
|
|
301
|
-
message:
|
|
336
|
+
message: `Parameter Validation warrnings for platform > FileStorage > appbrowse \n ${warrning}`,
|
|
302
337
|
});
|
|
303
|
-
Logger({ level: "WARN", message: warrning });
|
|
304
338
|
}
|
|
305
339
|
|
|
306
340
|
const query_params = {};
|
|
307
|
-
query_params["
|
|
341
|
+
query_params["page"] = page;
|
|
342
|
+
query_params["limit"] = limit;
|
|
308
343
|
|
|
309
344
|
const response = await PlatformAPIClient.execute(
|
|
310
345
|
this.config,
|
|
311
346
|
"get",
|
|
312
|
-
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse
|
|
347
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse`,
|
|
313
348
|
query_params,
|
|
314
|
-
undefined
|
|
349
|
+
undefined,
|
|
350
|
+
requestHeaders,
|
|
351
|
+
{ responseHeaders }
|
|
315
352
|
);
|
|
316
353
|
|
|
354
|
+
let responseData = response;
|
|
355
|
+
if (responseHeaders) {
|
|
356
|
+
responseData = response[0];
|
|
357
|
+
}
|
|
358
|
+
|
|
317
359
|
const {
|
|
318
360
|
error: res_error,
|
|
319
|
-
} =
|
|
361
|
+
} = FileStoragePlatformModel.BrowseResponse().validate(responseData, {
|
|
320
362
|
abortEarly: false,
|
|
321
363
|
allowUnknown: false,
|
|
322
364
|
});
|
|
@@ -324,42 +366,465 @@ class FileStorage {
|
|
|
324
366
|
if (res_error) {
|
|
325
367
|
Logger({
|
|
326
368
|
level: "WARN",
|
|
327
|
-
message:
|
|
369
|
+
message: `Response Validation Warnnings for platform > FileStorage > appbrowse \n ${res_error}`,
|
|
328
370
|
});
|
|
329
|
-
Logger({ level: "WARN", message: res_error });
|
|
330
371
|
}
|
|
331
372
|
|
|
332
373
|
return response;
|
|
333
374
|
}
|
|
334
375
|
|
|
335
376
|
/**
|
|
336
|
-
* @param {
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* @param {
|
|
340
|
-
* @
|
|
341
|
-
* @
|
|
377
|
+
* @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg
|
|
378
|
+
* - Arg object
|
|
379
|
+
*
|
|
380
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
381
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
382
|
+
* @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess[]>} - Success response
|
|
383
|
+
* @name getDefaultHtmlTemplate
|
|
384
|
+
* @summary: Get html template for sales channel
|
|
385
|
+
* @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
|
|
386
|
+
*/
|
|
387
|
+
async getDefaultHtmlTemplate(
|
|
388
|
+
{ pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
|
|
389
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
390
|
+
) {
|
|
391
|
+
const {
|
|
392
|
+
error,
|
|
393
|
+
} = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
|
|
394
|
+
{
|
|
395
|
+
pdfTypeId,
|
|
396
|
+
format,
|
|
397
|
+
},
|
|
398
|
+
{ abortEarly: false, allowUnknown: true }
|
|
399
|
+
);
|
|
400
|
+
if (error) {
|
|
401
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// Showing warrnings if extra unknown parameters are found
|
|
405
|
+
const {
|
|
406
|
+
error: warrning,
|
|
407
|
+
} = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
|
|
408
|
+
{
|
|
409
|
+
pdfTypeId,
|
|
410
|
+
format,
|
|
411
|
+
},
|
|
412
|
+
{ abortEarly: false, allowUnknown: false }
|
|
413
|
+
);
|
|
414
|
+
if (warrning) {
|
|
415
|
+
Logger({
|
|
416
|
+
level: "WARN",
|
|
417
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getDefaultHtmlTemplate \n ${warrning}`,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const query_params = {};
|
|
422
|
+
query_params["pdf_type_id"] = pdfTypeId;
|
|
423
|
+
query_params["format"] = format;
|
|
424
|
+
|
|
425
|
+
const response = await PlatformAPIClient.execute(
|
|
426
|
+
this.config,
|
|
427
|
+
"get",
|
|
428
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
|
|
429
|
+
query_params,
|
|
430
|
+
undefined,
|
|
431
|
+
requestHeaders,
|
|
432
|
+
{ responseHeaders }
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
let responseData = response;
|
|
436
|
+
if (responseHeaders) {
|
|
437
|
+
responseData = response[0];
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const { error: res_error } = Joi.array()
|
|
441
|
+
.items(FileStoragePlatformModel.PdfConfigSuccess())
|
|
442
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
443
|
+
|
|
444
|
+
if (res_error) {
|
|
445
|
+
Logger({
|
|
446
|
+
level: "WARN",
|
|
447
|
+
message: `Response Validation Warnnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`,
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return response;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg
|
|
456
|
+
* - Arg object
|
|
457
|
+
*
|
|
458
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
459
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
460
|
+
* @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems[]>} -
|
|
461
|
+
* Success response
|
|
462
|
+
* @name getDefaultPdfData
|
|
463
|
+
* @summary: Get Dummy pdf data for invoice or label
|
|
464
|
+
* @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
|
|
342
465
|
*/
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
466
|
+
async getDefaultPdfData(
|
|
467
|
+
{ pdfTypeId, requestHeaders } = { requestHeaders: {} },
|
|
468
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
469
|
+
) {
|
|
470
|
+
const {
|
|
471
|
+
error,
|
|
472
|
+
} = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
|
|
473
|
+
{
|
|
474
|
+
pdfTypeId,
|
|
475
|
+
},
|
|
476
|
+
{ abortEarly: false, allowUnknown: true }
|
|
477
|
+
);
|
|
478
|
+
if (error) {
|
|
479
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// Showing warrnings if extra unknown parameters are found
|
|
483
|
+
const {
|
|
484
|
+
error: warrning,
|
|
485
|
+
} = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
|
|
486
|
+
{
|
|
487
|
+
pdfTypeId,
|
|
488
|
+
},
|
|
489
|
+
{ abortEarly: false, allowUnknown: false }
|
|
490
|
+
);
|
|
491
|
+
if (warrning) {
|
|
492
|
+
Logger({
|
|
493
|
+
level: "WARN",
|
|
494
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfData \n ${warrning}`,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const query_params = {};
|
|
499
|
+
query_params["pdf_type_id"] = pdfTypeId;
|
|
500
|
+
|
|
501
|
+
const response = await PlatformAPIClient.execute(
|
|
502
|
+
this.config,
|
|
503
|
+
"get",
|
|
504
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper`,
|
|
505
|
+
query_params,
|
|
506
|
+
undefined,
|
|
507
|
+
requestHeaders,
|
|
508
|
+
{ responseHeaders }
|
|
509
|
+
);
|
|
510
|
+
|
|
511
|
+
let responseData = response;
|
|
512
|
+
if (responseHeaders) {
|
|
513
|
+
responseData = response[0];
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const { error: res_error } = Joi.array()
|
|
517
|
+
.items(FileStoragePlatformModel.DummyTemplateDataItems())
|
|
518
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
519
|
+
|
|
520
|
+
if (res_error) {
|
|
521
|
+
Logger({
|
|
522
|
+
level: "WARN",
|
|
523
|
+
message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfData \n ${res_error}`,
|
|
354
524
|
});
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
return response;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg
|
|
532
|
+
* - Arg object
|
|
533
|
+
*
|
|
534
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
535
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
536
|
+
* @returns {Promise<
|
|
537
|
+
* FileStoragePlatformModel.PdfDefaultTemplateSuccess[]
|
|
538
|
+
* >}
|
|
539
|
+
* - Success response
|
|
540
|
+
*
|
|
541
|
+
* @name getDefaultPdfTemplate
|
|
542
|
+
* @summary: Default html template
|
|
543
|
+
* @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
|
|
544
|
+
*/
|
|
545
|
+
async getDefaultPdfTemplate(
|
|
546
|
+
{ pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
|
|
547
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
548
|
+
) {
|
|
549
|
+
const {
|
|
550
|
+
error,
|
|
551
|
+
} = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
|
|
552
|
+
{
|
|
553
|
+
pdfTypeId,
|
|
554
|
+
format,
|
|
555
|
+
},
|
|
556
|
+
{ abortEarly: false, allowUnknown: true }
|
|
557
|
+
);
|
|
558
|
+
if (error) {
|
|
559
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// Showing warrnings if extra unknown parameters are found
|
|
563
|
+
const {
|
|
564
|
+
error: warrning,
|
|
565
|
+
} = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
|
|
566
|
+
{
|
|
567
|
+
pdfTypeId,
|
|
568
|
+
format,
|
|
569
|
+
},
|
|
570
|
+
{ abortEarly: false, allowUnknown: false }
|
|
571
|
+
);
|
|
572
|
+
if (warrning) {
|
|
573
|
+
Logger({
|
|
574
|
+
level: "WARN",
|
|
575
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfTemplate \n ${warrning}`,
|
|
358
576
|
});
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const query_params = {};
|
|
580
|
+
query_params["pdf_type_id"] = pdfTypeId;
|
|
581
|
+
query_params["format"] = format;
|
|
582
|
+
|
|
583
|
+
const response = await PlatformAPIClient.execute(
|
|
584
|
+
this.config,
|
|
585
|
+
"get",
|
|
586
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template`,
|
|
587
|
+
query_params,
|
|
588
|
+
undefined,
|
|
589
|
+
requestHeaders,
|
|
590
|
+
{ responseHeaders }
|
|
591
|
+
);
|
|
592
|
+
|
|
593
|
+
let responseData = response;
|
|
594
|
+
if (responseHeaders) {
|
|
595
|
+
responseData = response[0];
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const { error: res_error } = Joi.array()
|
|
599
|
+
.items(FileStoragePlatformModel.PdfDefaultTemplateSuccess())
|
|
600
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
601
|
+
|
|
602
|
+
if (res_error) {
|
|
603
|
+
Logger({
|
|
604
|
+
level: "WARN",
|
|
605
|
+
message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfTemplate \n ${res_error}`,
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
return response;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
|
|
614
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
615
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
616
|
+
* @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse[]>} -
|
|
617
|
+
* Success response
|
|
618
|
+
* @name getPdfTypes
|
|
619
|
+
* @summary: Get all the supported invoice pdf types
|
|
620
|
+
* @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
|
|
621
|
+
*/
|
|
622
|
+
async getPdfTypes(
|
|
623
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
624
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
625
|
+
) {
|
|
626
|
+
const {
|
|
627
|
+
error,
|
|
628
|
+
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
629
|
+
{},
|
|
630
|
+
{ abortEarly: false, allowUnknown: true }
|
|
631
|
+
);
|
|
632
|
+
if (error) {
|
|
633
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// Showing warrnings if extra unknown parameters are found
|
|
637
|
+
const {
|
|
638
|
+
error: warrning,
|
|
639
|
+
} = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
|
|
640
|
+
{},
|
|
641
|
+
{ abortEarly: false, allowUnknown: false }
|
|
642
|
+
);
|
|
643
|
+
if (warrning) {
|
|
644
|
+
Logger({
|
|
645
|
+
level: "WARN",
|
|
646
|
+
message: `Parameter Validation warrnings for platform > FileStorage > getPdfTypes \n ${warrning}`,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const query_params = {};
|
|
651
|
+
|
|
652
|
+
const response = await PlatformAPIClient.execute(
|
|
653
|
+
this.config,
|
|
654
|
+
"get",
|
|
655
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types`,
|
|
656
|
+
query_params,
|
|
657
|
+
undefined,
|
|
658
|
+
requestHeaders,
|
|
659
|
+
{ responseHeaders }
|
|
660
|
+
);
|
|
661
|
+
|
|
662
|
+
let responseData = response;
|
|
663
|
+
if (responseHeaders) {
|
|
664
|
+
responseData = response[0];
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
const { error: res_error } = Joi.array()
|
|
668
|
+
.items(FileStoragePlatformModel.InvoiceTypesResponse())
|
|
669
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
670
|
+
|
|
671
|
+
if (res_error) {
|
|
672
|
+
Logger({
|
|
673
|
+
level: "WARN",
|
|
674
|
+
message: `Response Validation Warnnings for platform > FileStorage > getPdfTypes \n ${res_error}`,
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
return response;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* @param {FileStoragePlatformApplicationValidator.PreviewTemplateParam} arg
|
|
683
|
+
* - Arg object
|
|
684
|
+
*
|
|
685
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
686
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
687
|
+
* @returns {Promise<string>} - Success response
|
|
688
|
+
* @name previewTemplate
|
|
689
|
+
* @summary: Preview HTML template
|
|
690
|
+
* @description: Rendered HTML template with dummy json data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/previewTemplate/).
|
|
691
|
+
*/
|
|
692
|
+
async previewTemplate(
|
|
693
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
694
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
695
|
+
) {
|
|
696
|
+
const {
|
|
697
|
+
error,
|
|
698
|
+
} = FileStoragePlatformApplicationValidator.previewTemplate().validate(
|
|
699
|
+
{
|
|
700
|
+
body,
|
|
701
|
+
},
|
|
702
|
+
{ abortEarly: false, allowUnknown: true }
|
|
703
|
+
);
|
|
704
|
+
if (error) {
|
|
705
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// Showing warrnings if extra unknown parameters are found
|
|
709
|
+
const {
|
|
710
|
+
error: warrning,
|
|
711
|
+
} = FileStoragePlatformApplicationValidator.previewTemplate().validate(
|
|
712
|
+
{
|
|
713
|
+
body,
|
|
714
|
+
},
|
|
715
|
+
{ abortEarly: false, allowUnknown: false }
|
|
716
|
+
);
|
|
717
|
+
if (warrning) {
|
|
718
|
+
Logger({
|
|
719
|
+
level: "WARN",
|
|
720
|
+
message: `Parameter Validation warrnings for platform > FileStorage > previewTemplate \n ${warrning}`,
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
const query_params = {};
|
|
725
|
+
|
|
726
|
+
const response = await PlatformAPIClient.execute(
|
|
727
|
+
this.config,
|
|
728
|
+
"post",
|
|
729
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/render`,
|
|
730
|
+
query_params,
|
|
731
|
+
body,
|
|
732
|
+
requestHeaders,
|
|
733
|
+
{ responseHeaders }
|
|
734
|
+
);
|
|
735
|
+
|
|
736
|
+
let responseData = response;
|
|
737
|
+
if (responseHeaders) {
|
|
738
|
+
responseData = response[0];
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
const { error: res_error } = Joi.string()
|
|
742
|
+
.allow("")
|
|
743
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
744
|
+
|
|
745
|
+
if (res_error) {
|
|
746
|
+
Logger({
|
|
747
|
+
level: "WARN",
|
|
748
|
+
message: `Response Validation Warnnings for platform > FileStorage > previewTemplate \n ${res_error}`,
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return response;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
|
|
757
|
+
* - Arg object
|
|
758
|
+
*
|
|
759
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
760
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
761
|
+
* @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess[]>} -
|
|
762
|
+
* Success response
|
|
763
|
+
* @name saveHtmlTemplate
|
|
764
|
+
* @summary: Update html template for invoice or label
|
|
765
|
+
* @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
|
|
766
|
+
*/
|
|
767
|
+
async saveHtmlTemplate(
|
|
768
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
769
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
770
|
+
) {
|
|
771
|
+
const {
|
|
772
|
+
error,
|
|
773
|
+
} = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
|
|
774
|
+
{
|
|
775
|
+
body,
|
|
776
|
+
},
|
|
777
|
+
{ abortEarly: false, allowUnknown: true }
|
|
778
|
+
);
|
|
779
|
+
if (error) {
|
|
780
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// Showing warrnings if extra unknown parameters are found
|
|
784
|
+
const {
|
|
785
|
+
error: warrning,
|
|
786
|
+
} = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
|
|
787
|
+
{
|
|
788
|
+
body,
|
|
789
|
+
},
|
|
790
|
+
{ abortEarly: false, allowUnknown: false }
|
|
791
|
+
);
|
|
792
|
+
if (warrning) {
|
|
793
|
+
Logger({
|
|
794
|
+
level: "WARN",
|
|
795
|
+
message: `Parameter Validation warrnings for platform > FileStorage > saveHtmlTemplate \n ${warrning}`,
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
const query_params = {};
|
|
800
|
+
|
|
801
|
+
const response = await PlatformAPIClient.execute(
|
|
802
|
+
this.config,
|
|
803
|
+
"put",
|
|
804
|
+
`/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
|
|
805
|
+
query_params,
|
|
806
|
+
body,
|
|
807
|
+
requestHeaders,
|
|
808
|
+
{ responseHeaders }
|
|
809
|
+
);
|
|
810
|
+
|
|
811
|
+
let responseData = response;
|
|
812
|
+
if (responseHeaders) {
|
|
813
|
+
responseData = response[0];
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
const { error: res_error } = Joi.array()
|
|
817
|
+
.items(FileStoragePlatformModel.PdfConfigSaveSuccess())
|
|
818
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
819
|
+
|
|
820
|
+
if (res_error) {
|
|
821
|
+
Logger({
|
|
822
|
+
level: "WARN",
|
|
823
|
+
message: `Response Validation Warnnings for platform > FileStorage > saveHtmlTemplate \n ${res_error}`,
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
return response;
|
|
363
828
|
}
|
|
364
829
|
}
|
|
365
830
|
|