@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,768 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const PartnerAPIClient = require("../PartnerAPIClient");
|
|
4
|
+
const ThemeValidator = require("./ThemePartnerValidator");
|
|
5
|
+
const ThemeModel = require("./ThemePartnerModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
|
|
8
|
+
class Theme {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this.config = config;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {Object} arg - Arg object.
|
|
15
|
+
* @param {number} arg.companyId - Company ID
|
|
16
|
+
* @param {string} arg.applicationId - Application ID
|
|
17
|
+
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
18
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
19
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
20
|
+
* @summary: Get all pages of a theme
|
|
21
|
+
* @description: Use this API to retrieve all the available pages of a theme by its ID.
|
|
22
|
+
*/
|
|
23
|
+
getAllPages(
|
|
24
|
+
{ companyId, applicationId, themeId, requestHeaders } = {
|
|
25
|
+
requestHeaders: {},
|
|
26
|
+
},
|
|
27
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
28
|
+
) {
|
|
29
|
+
const { error } = ThemeValidator.getAllPages().validate(
|
|
30
|
+
{
|
|
31
|
+
companyId,
|
|
32
|
+
applicationId,
|
|
33
|
+
themeId,
|
|
34
|
+
},
|
|
35
|
+
{ abortEarly: false }
|
|
36
|
+
);
|
|
37
|
+
if (error) {
|
|
38
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const query_params = {};
|
|
42
|
+
|
|
43
|
+
return PartnerAPIClient.execute(
|
|
44
|
+
this.config,
|
|
45
|
+
"get",
|
|
46
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/page`,
|
|
47
|
+
query_params,
|
|
48
|
+
undefined,
|
|
49
|
+
requestHeaders,
|
|
50
|
+
{ responseHeaders }
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @param {Object} arg - Arg object.
|
|
56
|
+
* @param {number} arg.companyId - Company ID
|
|
57
|
+
* @param {string} arg.applicationId - Application ID
|
|
58
|
+
* @param {string} arg.themeId - ID of the theme
|
|
59
|
+
* @param {AvailablePageSchema} arg.body
|
|
60
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
61
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
62
|
+
* @summary: Create a page
|
|
63
|
+
* @description: Use this API to create a page for a theme by its ID.
|
|
64
|
+
*/
|
|
65
|
+
createPage(
|
|
66
|
+
{ companyId, applicationId, themeId, body, requestHeaders } = {
|
|
67
|
+
requestHeaders: {},
|
|
68
|
+
},
|
|
69
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
70
|
+
) {
|
|
71
|
+
const { error } = ThemeValidator.createPage().validate(
|
|
72
|
+
{
|
|
73
|
+
companyId,
|
|
74
|
+
applicationId,
|
|
75
|
+
themeId,
|
|
76
|
+
body,
|
|
77
|
+
},
|
|
78
|
+
{ abortEarly: false }
|
|
79
|
+
);
|
|
80
|
+
if (error) {
|
|
81
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const query_params = {};
|
|
85
|
+
|
|
86
|
+
return PartnerAPIClient.execute(
|
|
87
|
+
this.config,
|
|
88
|
+
"post",
|
|
89
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/page`,
|
|
90
|
+
query_params,
|
|
91
|
+
body,
|
|
92
|
+
requestHeaders,
|
|
93
|
+
{ responseHeaders }
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @param {Object} arg - Arg object.
|
|
99
|
+
* @param {number} arg.companyId - Company ID
|
|
100
|
+
* @param {string} arg.applicationId - Application ID
|
|
101
|
+
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
102
|
+
* @param {AllAvailablePageSchema} arg.body
|
|
103
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
104
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
105
|
+
* @summary: Update multiple pages of a theme
|
|
106
|
+
* @description: Use this API to update multiple pages of a theme by its ID.
|
|
107
|
+
*/
|
|
108
|
+
updateMultiplePages(
|
|
109
|
+
{ companyId, applicationId, themeId, body, requestHeaders } = {
|
|
110
|
+
requestHeaders: {},
|
|
111
|
+
},
|
|
112
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
113
|
+
) {
|
|
114
|
+
const { error } = ThemeValidator.updateMultiplePages().validate(
|
|
115
|
+
{
|
|
116
|
+
companyId,
|
|
117
|
+
applicationId,
|
|
118
|
+
themeId,
|
|
119
|
+
body,
|
|
120
|
+
},
|
|
121
|
+
{ abortEarly: false }
|
|
122
|
+
);
|
|
123
|
+
if (error) {
|
|
124
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const query_params = {};
|
|
128
|
+
|
|
129
|
+
return PartnerAPIClient.execute(
|
|
130
|
+
this.config,
|
|
131
|
+
"put",
|
|
132
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/page`,
|
|
133
|
+
query_params,
|
|
134
|
+
body,
|
|
135
|
+
requestHeaders,
|
|
136
|
+
{ responseHeaders }
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @param {Object} arg - Arg object.
|
|
142
|
+
* @param {number} arg.companyId - Company ID
|
|
143
|
+
* @param {string} arg.applicationId - Application ID
|
|
144
|
+
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
145
|
+
* @param {string} arg.pageValue - Value of the page to be retrieved
|
|
146
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
147
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
148
|
+
* @summary: Get page of a theme
|
|
149
|
+
* @description: Use this API to retrieve a page of a theme.
|
|
150
|
+
*/
|
|
151
|
+
getPage(
|
|
152
|
+
{ companyId, applicationId, themeId, pageValue, requestHeaders } = {
|
|
153
|
+
requestHeaders: {},
|
|
154
|
+
},
|
|
155
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
156
|
+
) {
|
|
157
|
+
const { error } = ThemeValidator.getPage().validate(
|
|
158
|
+
{
|
|
159
|
+
companyId,
|
|
160
|
+
applicationId,
|
|
161
|
+
themeId,
|
|
162
|
+
pageValue,
|
|
163
|
+
},
|
|
164
|
+
{ abortEarly: false }
|
|
165
|
+
);
|
|
166
|
+
if (error) {
|
|
167
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const query_params = {};
|
|
171
|
+
|
|
172
|
+
return PartnerAPIClient.execute(
|
|
173
|
+
this.config,
|
|
174
|
+
"get",
|
|
175
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/${pageValue}`,
|
|
176
|
+
query_params,
|
|
177
|
+
undefined,
|
|
178
|
+
requestHeaders,
|
|
179
|
+
{ responseHeaders }
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @param {Object} arg - Arg object.
|
|
185
|
+
* @param {number} arg.companyId - Company ID
|
|
186
|
+
* @param {string} arg.applicationId - Application ID
|
|
187
|
+
* @param {string} arg.themeId - ID of the theme
|
|
188
|
+
* @param {string} arg.pageValue - Value of the page to be updated
|
|
189
|
+
* @param {AvailablePageSchema} arg.body
|
|
190
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
191
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
192
|
+
* @summary: Updates a page
|
|
193
|
+
* @description: Use this API to update a page for a theme by its ID.
|
|
194
|
+
*/
|
|
195
|
+
updatePage(
|
|
196
|
+
{ companyId, applicationId, themeId, pageValue, body, requestHeaders } = {
|
|
197
|
+
requestHeaders: {},
|
|
198
|
+
},
|
|
199
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
200
|
+
) {
|
|
201
|
+
const { error } = ThemeValidator.updatePage().validate(
|
|
202
|
+
{
|
|
203
|
+
companyId,
|
|
204
|
+
applicationId,
|
|
205
|
+
themeId,
|
|
206
|
+
pageValue,
|
|
207
|
+
body,
|
|
208
|
+
},
|
|
209
|
+
{ abortEarly: false }
|
|
210
|
+
);
|
|
211
|
+
if (error) {
|
|
212
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const query_params = {};
|
|
216
|
+
|
|
217
|
+
return PartnerAPIClient.execute(
|
|
218
|
+
this.config,
|
|
219
|
+
"put",
|
|
220
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/${pageValue}`,
|
|
221
|
+
query_params,
|
|
222
|
+
body,
|
|
223
|
+
requestHeaders,
|
|
224
|
+
{ responseHeaders }
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @param {Object} arg - Arg object.
|
|
230
|
+
* @param {number} arg.companyId - Company ID
|
|
231
|
+
* @param {string} arg.applicationId - Application ID
|
|
232
|
+
* @param {string} arg.themeId - ID of the theme
|
|
233
|
+
* @param {string} arg.pageValue - Value of the page to be updated
|
|
234
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
235
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
236
|
+
* @summary: Deletes a page
|
|
237
|
+
* @description: Use this API to delete a page for a theme by its ID and page_value.
|
|
238
|
+
*/
|
|
239
|
+
deletePage(
|
|
240
|
+
{ companyId, applicationId, themeId, pageValue, requestHeaders } = {
|
|
241
|
+
requestHeaders: {},
|
|
242
|
+
},
|
|
243
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
244
|
+
) {
|
|
245
|
+
const { error } = ThemeValidator.deletePage().validate(
|
|
246
|
+
{
|
|
247
|
+
companyId,
|
|
248
|
+
applicationId,
|
|
249
|
+
themeId,
|
|
250
|
+
pageValue,
|
|
251
|
+
},
|
|
252
|
+
{ abortEarly: false }
|
|
253
|
+
);
|
|
254
|
+
if (error) {
|
|
255
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const query_params = {};
|
|
259
|
+
|
|
260
|
+
return PartnerAPIClient.execute(
|
|
261
|
+
this.config,
|
|
262
|
+
"delete",
|
|
263
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}/${pageValue}`,
|
|
264
|
+
query_params,
|
|
265
|
+
undefined,
|
|
266
|
+
requestHeaders,
|
|
267
|
+
{ responseHeaders }
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @param {Object} arg - Arg object.
|
|
273
|
+
* @param {number} arg.companyId - The ID of the company
|
|
274
|
+
* @param {string} arg.applicationId - The ID of the application
|
|
275
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
276
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
277
|
+
* @summary: Get all the themes for a specific application
|
|
278
|
+
* @description: Use this API to get list of theme
|
|
279
|
+
*/
|
|
280
|
+
getApplicationThemes(
|
|
281
|
+
{ companyId, applicationId, requestHeaders } = { requestHeaders: {} },
|
|
282
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
283
|
+
) {
|
|
284
|
+
const { error } = ThemeValidator.getApplicationThemes().validate(
|
|
285
|
+
{
|
|
286
|
+
companyId,
|
|
287
|
+
applicationId,
|
|
288
|
+
},
|
|
289
|
+
{ abortEarly: false }
|
|
290
|
+
);
|
|
291
|
+
if (error) {
|
|
292
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const query_params = {};
|
|
296
|
+
|
|
297
|
+
return PartnerAPIClient.execute(
|
|
298
|
+
this.config,
|
|
299
|
+
"get",
|
|
300
|
+
`/service/partner/theme/v2.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/themes`,
|
|
301
|
+
query_params,
|
|
302
|
+
undefined,
|
|
303
|
+
requestHeaders,
|
|
304
|
+
{ responseHeaders }
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @param {Object} arg - Arg object.
|
|
310
|
+
* @param {number} arg.companyId - The ID of the company
|
|
311
|
+
* @param {string} arg.applicationId - The ID of the application
|
|
312
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
313
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
314
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
315
|
+
* @summary: Get Theme By Theme Id
|
|
316
|
+
* @description: Use this API to get theme details
|
|
317
|
+
*/
|
|
318
|
+
getThemeById(
|
|
319
|
+
{ companyId, applicationId, themeId, requestHeaders } = {
|
|
320
|
+
requestHeaders: {},
|
|
321
|
+
},
|
|
322
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
323
|
+
) {
|
|
324
|
+
const { error } = ThemeValidator.getThemeById().validate(
|
|
325
|
+
{
|
|
326
|
+
companyId,
|
|
327
|
+
applicationId,
|
|
328
|
+
themeId,
|
|
329
|
+
},
|
|
330
|
+
{ abortEarly: false }
|
|
331
|
+
);
|
|
332
|
+
if (error) {
|
|
333
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const query_params = {};
|
|
337
|
+
|
|
338
|
+
return PartnerAPIClient.execute(
|
|
339
|
+
this.config,
|
|
340
|
+
"get",
|
|
341
|
+
`/service/partner/theme/v2.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}`,
|
|
342
|
+
query_params,
|
|
343
|
+
undefined,
|
|
344
|
+
requestHeaders,
|
|
345
|
+
{ responseHeaders }
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @param {Object} arg - Arg object.
|
|
351
|
+
* @param {number} arg.companyId - The ID of the company.
|
|
352
|
+
* @param {string} arg.applicationId - The ID of the application.
|
|
353
|
+
* @param {string} arg.themeId - The ID of the theme.
|
|
354
|
+
* @param {UpdateThemeRequestBody} arg.body
|
|
355
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
356
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
357
|
+
* @summary: Update theme for a specific company and application
|
|
358
|
+
* @description: Update theme for a specific company and application
|
|
359
|
+
*/
|
|
360
|
+
updateTheme(
|
|
361
|
+
{ companyId, applicationId, themeId, body, requestHeaders } = {
|
|
362
|
+
requestHeaders: {},
|
|
363
|
+
},
|
|
364
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
365
|
+
) {
|
|
366
|
+
const { error } = ThemeValidator.updateTheme().validate(
|
|
367
|
+
{
|
|
368
|
+
companyId,
|
|
369
|
+
applicationId,
|
|
370
|
+
themeId,
|
|
371
|
+
body,
|
|
372
|
+
},
|
|
373
|
+
{ abortEarly: false }
|
|
374
|
+
);
|
|
375
|
+
if (error) {
|
|
376
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const query_params = {};
|
|
380
|
+
|
|
381
|
+
return PartnerAPIClient.execute(
|
|
382
|
+
this.config,
|
|
383
|
+
"put",
|
|
384
|
+
`/service/partner/theme/v2.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}`,
|
|
385
|
+
query_params,
|
|
386
|
+
body,
|
|
387
|
+
requestHeaders,
|
|
388
|
+
{ responseHeaders }
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @param {Object} arg - Arg object.
|
|
394
|
+
* @param {number} arg.companyId - The ID of the company.
|
|
395
|
+
* @param {string} arg.applicationId - The ID of the application.
|
|
396
|
+
* @param {string} arg.themeId - The ID of the theme to be deleted.
|
|
397
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
398
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
399
|
+
* @summary: Delete a theme
|
|
400
|
+
* @description: This endpoint is used to delete a theme from the specified company and application.
|
|
401
|
+
*/
|
|
402
|
+
deleteTheme(
|
|
403
|
+
{ companyId, applicationId, themeId, requestHeaders } = {
|
|
404
|
+
requestHeaders: {},
|
|
405
|
+
},
|
|
406
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
407
|
+
) {
|
|
408
|
+
const { error } = ThemeValidator.deleteTheme().validate(
|
|
409
|
+
{
|
|
410
|
+
companyId,
|
|
411
|
+
applicationId,
|
|
412
|
+
themeId,
|
|
413
|
+
},
|
|
414
|
+
{ abortEarly: false }
|
|
415
|
+
);
|
|
416
|
+
if (error) {
|
|
417
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
const query_params = {};
|
|
421
|
+
|
|
422
|
+
return PartnerAPIClient.execute(
|
|
423
|
+
this.config,
|
|
424
|
+
"delete",
|
|
425
|
+
`/service/partner/theme/v2.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/${themeId}`,
|
|
426
|
+
query_params,
|
|
427
|
+
undefined,
|
|
428
|
+
requestHeaders,
|
|
429
|
+
{ responseHeaders }
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @param {Object} arg - Arg object.
|
|
435
|
+
* @param {string} [arg.status] - The status of the theme
|
|
436
|
+
* @param {number} [arg.pageSize] - Number of themes per page
|
|
437
|
+
* @param {number} [arg.pageNo] - Page number to retrieve
|
|
438
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
439
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
440
|
+
* @summary: Get organization's themes
|
|
441
|
+
* @description: Get organization's themes
|
|
442
|
+
*/
|
|
443
|
+
getOrganizationThemes(
|
|
444
|
+
{ status, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
445
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
446
|
+
) {
|
|
447
|
+
const { error } = ThemeValidator.getOrganizationThemes().validate(
|
|
448
|
+
{
|
|
449
|
+
status,
|
|
450
|
+
pageSize,
|
|
451
|
+
pageNo,
|
|
452
|
+
},
|
|
453
|
+
{ abortEarly: false }
|
|
454
|
+
);
|
|
455
|
+
if (error) {
|
|
456
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const query_params = {};
|
|
460
|
+
query_params["status"] = status;
|
|
461
|
+
query_params["page_size"] = pageSize;
|
|
462
|
+
query_params["page_no"] = pageNo;
|
|
463
|
+
|
|
464
|
+
return PartnerAPIClient.execute(
|
|
465
|
+
this.config,
|
|
466
|
+
"get",
|
|
467
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/themes`,
|
|
468
|
+
query_params,
|
|
469
|
+
undefined,
|
|
470
|
+
requestHeaders,
|
|
471
|
+
{ responseHeaders }
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @param {Object} arg - Arg object.
|
|
477
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
478
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
479
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
480
|
+
* @summary: Get theme details for an organization
|
|
481
|
+
* @description: Fetches the theme details for a specific organization and theme ID
|
|
482
|
+
*/
|
|
483
|
+
getOrganizationThemeDetails(
|
|
484
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
485
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
486
|
+
) {
|
|
487
|
+
const { error } = ThemeValidator.getOrganizationThemeDetails().validate(
|
|
488
|
+
{
|
|
489
|
+
themeId,
|
|
490
|
+
},
|
|
491
|
+
{ abortEarly: false }
|
|
492
|
+
);
|
|
493
|
+
if (error) {
|
|
494
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
const query_params = {};
|
|
498
|
+
|
|
499
|
+
return PartnerAPIClient.execute(
|
|
500
|
+
this.config,
|
|
501
|
+
"get",
|
|
502
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeId}`,
|
|
503
|
+
query_params,
|
|
504
|
+
undefined,
|
|
505
|
+
requestHeaders,
|
|
506
|
+
{ responseHeaders }
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @param {Object} arg - Arg object.
|
|
512
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
513
|
+
* @param {MarketplaceTheme} arg.body
|
|
514
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
515
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
516
|
+
* @summary: Update theme draft/submitted
|
|
517
|
+
* @description: Update theme draft/submitted
|
|
518
|
+
*/
|
|
519
|
+
updateDraftTheme(
|
|
520
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
521
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
522
|
+
) {
|
|
523
|
+
const { error } = ThemeValidator.updateDraftTheme().validate(
|
|
524
|
+
{
|
|
525
|
+
themeId,
|
|
526
|
+
body,
|
|
527
|
+
},
|
|
528
|
+
{ abortEarly: false }
|
|
529
|
+
);
|
|
530
|
+
if (error) {
|
|
531
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const query_params = {};
|
|
535
|
+
|
|
536
|
+
return PartnerAPIClient.execute(
|
|
537
|
+
this.config,
|
|
538
|
+
"patch",
|
|
539
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeId}`,
|
|
540
|
+
query_params,
|
|
541
|
+
body,
|
|
542
|
+
requestHeaders,
|
|
543
|
+
{ responseHeaders }
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @param {Object} arg - Arg object.
|
|
549
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
550
|
+
* @param {MarketplaceTheme} arg.body
|
|
551
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
552
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
553
|
+
* @summary: Submit a theme
|
|
554
|
+
* @description: Use this api to Submit a theme
|
|
555
|
+
*/
|
|
556
|
+
submitOrganizationTheme(
|
|
557
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
558
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
559
|
+
) {
|
|
560
|
+
const { error } = ThemeValidator.submitOrganizationTheme().validate(
|
|
561
|
+
{
|
|
562
|
+
themeId,
|
|
563
|
+
body,
|
|
564
|
+
},
|
|
565
|
+
{ abortEarly: false }
|
|
566
|
+
);
|
|
567
|
+
if (error) {
|
|
568
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
const query_params = {};
|
|
572
|
+
|
|
573
|
+
return PartnerAPIClient.execute(
|
|
574
|
+
this.config,
|
|
575
|
+
"put",
|
|
576
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeId}`,
|
|
577
|
+
query_params,
|
|
578
|
+
body,
|
|
579
|
+
requestHeaders,
|
|
580
|
+
{ responseHeaders }
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* @param {Object} arg - Arg object.
|
|
586
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
587
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
588
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
589
|
+
* @summary: Delete a theme
|
|
590
|
+
* @description: This endpoint allows you to delete a theme by providing the organization and theme IDs.
|
|
591
|
+
*/
|
|
592
|
+
deleteOrganizationTheme(
|
|
593
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
594
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
595
|
+
) {
|
|
596
|
+
const { error } = ThemeValidator.deleteOrganizationTheme().validate(
|
|
597
|
+
{
|
|
598
|
+
themeId,
|
|
599
|
+
},
|
|
600
|
+
{ abortEarly: false }
|
|
601
|
+
);
|
|
602
|
+
if (error) {
|
|
603
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
const query_params = {};
|
|
607
|
+
|
|
608
|
+
return PartnerAPIClient.execute(
|
|
609
|
+
this.config,
|
|
610
|
+
"delete",
|
|
611
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeId}`,
|
|
612
|
+
query_params,
|
|
613
|
+
undefined,
|
|
614
|
+
requestHeaders,
|
|
615
|
+
{ responseHeaders }
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @param {Object} arg - Arg object.
|
|
621
|
+
* @param {string} arg.slugName - Slug of theme
|
|
622
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
623
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
624
|
+
* @summary: Get latest version of specified theme
|
|
625
|
+
* @description: Use this api to get latest version of specified theme
|
|
626
|
+
*/
|
|
627
|
+
getLatestVersionOfThemeBySlug(
|
|
628
|
+
{ slugName, requestHeaders } = { requestHeaders: {} },
|
|
629
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
630
|
+
) {
|
|
631
|
+
const { error } = ThemeValidator.getLatestVersionOfThemeBySlug().validate(
|
|
632
|
+
{
|
|
633
|
+
slugName,
|
|
634
|
+
},
|
|
635
|
+
{ abortEarly: false }
|
|
636
|
+
);
|
|
637
|
+
if (error) {
|
|
638
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
const query_params = {};
|
|
642
|
+
|
|
643
|
+
return PartnerAPIClient.execute(
|
|
644
|
+
this.config,
|
|
645
|
+
"get",
|
|
646
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/${slugName}/latest`,
|
|
647
|
+
query_params,
|
|
648
|
+
undefined,
|
|
649
|
+
requestHeaders,
|
|
650
|
+
{ responseHeaders }
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* @param {Object} arg - Arg object.
|
|
656
|
+
* @param {string} [arg.slug] - The slug of the theme.
|
|
657
|
+
* @param {MarketplaceTheme} arg.body
|
|
658
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
659
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
660
|
+
* @summary: Create a new theme for the organization
|
|
661
|
+
* @description: Use this api to create a new theme for the organization
|
|
662
|
+
*/
|
|
663
|
+
createNewThemeInOrganization(
|
|
664
|
+
{ body, slug, requestHeaders } = { requestHeaders: {} },
|
|
665
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
666
|
+
) {
|
|
667
|
+
const { error } = ThemeValidator.createNewThemeInOrganization().validate(
|
|
668
|
+
{
|
|
669
|
+
body,
|
|
670
|
+
slug,
|
|
671
|
+
},
|
|
672
|
+
{ abortEarly: false }
|
|
673
|
+
);
|
|
674
|
+
if (error) {
|
|
675
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const query_params = {};
|
|
679
|
+
query_params["slug"] = slug;
|
|
680
|
+
|
|
681
|
+
return PartnerAPIClient.execute(
|
|
682
|
+
this.config,
|
|
683
|
+
"post",
|
|
684
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme`,
|
|
685
|
+
query_params,
|
|
686
|
+
body,
|
|
687
|
+
requestHeaders,
|
|
688
|
+
{ responseHeaders }
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @param {Object} arg - Arg object.
|
|
694
|
+
* @param {string} arg.themeId - The ID of the theme
|
|
695
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
696
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
697
|
+
* @summary: Get theme rejection reasons
|
|
698
|
+
* @description: Use this api to get theme rejection reasons
|
|
699
|
+
*/
|
|
700
|
+
getThemeRejectionReasons(
|
|
701
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
702
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
703
|
+
) {
|
|
704
|
+
const { error } = ThemeValidator.getThemeRejectionReasons().validate(
|
|
705
|
+
{
|
|
706
|
+
themeId,
|
|
707
|
+
},
|
|
708
|
+
{ abortEarly: false }
|
|
709
|
+
);
|
|
710
|
+
if (error) {
|
|
711
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
const query_params = {};
|
|
715
|
+
|
|
716
|
+
return PartnerAPIClient.execute(
|
|
717
|
+
this.config,
|
|
718
|
+
"get",
|
|
719
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeId}/reasons`,
|
|
720
|
+
query_params,
|
|
721
|
+
undefined,
|
|
722
|
+
requestHeaders,
|
|
723
|
+
{ responseHeaders }
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* @param {Object} arg - Arg object.
|
|
729
|
+
* @param {string} arg.themeSlug - The slug of the theme.
|
|
730
|
+
* @param {number} [arg.pageSize] - The number of items to return per page.
|
|
731
|
+
* @param {number} [arg.pageNo] - The page number to return.
|
|
732
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
733
|
+
* @param {import("../PartnerAPIClient").Options} - Options
|
|
734
|
+
* @summary: Get theme versions
|
|
735
|
+
* @description: Retrieve a list of theme versions for a specific theme in an organization.
|
|
736
|
+
*/
|
|
737
|
+
getThemeVersions(
|
|
738
|
+
{ themeSlug, pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
739
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
740
|
+
) {
|
|
741
|
+
const { error } = ThemeValidator.getThemeVersions().validate(
|
|
742
|
+
{
|
|
743
|
+
themeSlug,
|
|
744
|
+
pageSize,
|
|
745
|
+
pageNo,
|
|
746
|
+
},
|
|
747
|
+
{ abortEarly: false }
|
|
748
|
+
);
|
|
749
|
+
if (error) {
|
|
750
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
const query_params = {};
|
|
754
|
+
query_params["page_size"] = pageSize;
|
|
755
|
+
query_params["page_no"] = pageNo;
|
|
756
|
+
|
|
757
|
+
return PartnerAPIClient.execute(
|
|
758
|
+
this.config,
|
|
759
|
+
"get",
|
|
760
|
+
`/service/partner/theme/v1.0/organization/${this.config.organizationId}/theme/${themeSlug}/versions`,
|
|
761
|
+
query_params,
|
|
762
|
+
undefined,
|
|
763
|
+
requestHeaders,
|
|
764
|
+
{ responseHeaders }
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
module.exports = Theme;
|