@gofynd/fdk-client-javascript 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +557 -1279
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +14453 -17192
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3438 -4172
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3400 -5361
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +567 -567
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1036 -1036
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +677 -1243
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +38 -38
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +26 -26
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +330 -330
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +191 -191
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +467 -884
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +59 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +100 -100
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -43
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +232 -232
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +352 -656
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +739 -739
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +617 -617
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +475 -871
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +112 -112
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +84 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +31 -31
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +581 -581
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +179 -179
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +41 -41
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +181 -181
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +168 -168
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +553 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +671 -1205
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1525 -1525
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +174 -174
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +682 -682
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1557 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2127 -3904
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -229
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +41 -41
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +943 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +212 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +615 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +342 -342
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +534 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1324 -1324
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +156 -156
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +484 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +216 -216
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +24 -24
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +58 -58
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +52 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +123 -123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +228 -228
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +200 -200
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +212 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +65 -65
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1035 -1035
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1574 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -160
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +167 -167
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +153 -153
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7965 -7885
- package/sdk/platform/PlatformClient.js +8672 -10105
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +83 -83
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +275 -275
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +59 -59
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +310 -310
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +505 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +88 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +38 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +113 -113
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -14,23 +14,23 @@ class Content {
|
|
|
14
14
|
getBlog: "/service/application/content/v1.0/blogs/{slug}",
|
|
15
15
|
getBlogs: "/service/application/content/v1.0/blogs/",
|
|
16
16
|
getDataLoaders: "/service/application/content/v1.0/data-loader",
|
|
17
|
-
getFaqs: "/service/application/content/v1.0/faq",
|
|
18
|
-
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
19
17
|
getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
|
|
18
|
+
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
20
19
|
getFaqCategoryBySlug:
|
|
21
20
|
"/service/application/content/v1.0/faq/category/{slug}",
|
|
21
|
+
getFaqs: "/service/application/content/v1.0/faq",
|
|
22
22
|
getFaqsByCategorySlug:
|
|
23
23
|
"/service/application/content/v1.0/faq/category/{slug}/faqs",
|
|
24
24
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
25
25
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
26
26
|
getNavigations: "/service/application/content/v1.0/navigations/",
|
|
27
|
+
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
28
|
+
getPages: "/service/application/content/v2.0/pages/",
|
|
27
29
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
28
|
-
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
29
30
|
getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
|
|
31
|
+
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
30
32
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
31
33
|
getTags: "/service/application/content/v1.0/tags",
|
|
32
|
-
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
33
|
-
getPages: "/service/application/content/v2.0/pages/",
|
|
34
34
|
};
|
|
35
35
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
36
36
|
(urls, [method, relativeUrl]) => {
|
|
@@ -332,13 +332,16 @@ class Content {
|
|
|
332
332
|
|
|
333
333
|
/**
|
|
334
334
|
* @param {Object} arg - Arg object.
|
|
335
|
-
* @
|
|
336
|
-
*
|
|
337
|
-
*
|
|
335
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
336
|
+
* identifier of an FAQ. You can get slug value from the endpoint
|
|
337
|
+
* /service/application/content/v1.0/faq.
|
|
338
|
+
* @returns {Promise<FaqSchema>} - Success response
|
|
339
|
+
* @summary: Get an FAQ
|
|
340
|
+
* @description: Use this API to get a particular FAQ by its slug.
|
|
338
341
|
*/
|
|
339
|
-
async
|
|
340
|
-
const { error } = ContentValidator.
|
|
341
|
-
{},
|
|
342
|
+
async getFaqBySlug({ slug } = {}) {
|
|
343
|
+
const { error } = ContentValidator.getFaqBySlug().validate(
|
|
344
|
+
{ slug },
|
|
342
345
|
{ abortEarly: false, allowUnknown: true }
|
|
343
346
|
);
|
|
344
347
|
if (error) {
|
|
@@ -346,14 +349,14 @@ class Content {
|
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
// Showing warrnings if extra unknown parameters are found
|
|
349
|
-
const { error: warrning } = ContentValidator.
|
|
350
|
-
{},
|
|
352
|
+
const { error: warrning } = ContentValidator.getFaqBySlug().validate(
|
|
353
|
+
{ slug },
|
|
351
354
|
{ abortEarly: false, allowUnknown: false }
|
|
352
355
|
);
|
|
353
356
|
if (warrning) {
|
|
354
357
|
Logger({
|
|
355
358
|
level: "WARN",
|
|
356
|
-
message: "Parameter Validation warrnings for
|
|
359
|
+
message: "Parameter Validation warrnings for getFaqBySlug",
|
|
357
360
|
});
|
|
358
361
|
Logger({ level: "WARN", message: warrning });
|
|
359
362
|
}
|
|
@@ -366,17 +369,15 @@ class Content {
|
|
|
366
369
|
this._conf,
|
|
367
370
|
"get",
|
|
368
371
|
constructUrl({
|
|
369
|
-
url: this._urls["
|
|
370
|
-
params: {},
|
|
372
|
+
url: this._urls["getFaqBySlug"],
|
|
373
|
+
params: { slug },
|
|
371
374
|
}),
|
|
372
375
|
query_params,
|
|
373
376
|
undefined,
|
|
374
377
|
xHeaders
|
|
375
378
|
);
|
|
376
379
|
|
|
377
|
-
const {
|
|
378
|
-
error: res_error,
|
|
379
|
-
} = ContentModel.FaqResponseSchema().validate(response, {
|
|
380
|
+
const { error: res_error } = ContentModel.FaqSchema().validate(response, {
|
|
380
381
|
abortEarly: false,
|
|
381
382
|
allowUnknown: false,
|
|
382
383
|
});
|
|
@@ -384,7 +385,7 @@ class Content {
|
|
|
384
385
|
if (res_error) {
|
|
385
386
|
Logger({
|
|
386
387
|
level: "WARN",
|
|
387
|
-
message: "Response Validation Warnnings for
|
|
388
|
+
message: "Response Validation Warnnings for getFaqBySlug",
|
|
388
389
|
});
|
|
389
390
|
Logger({ level: "WARN", message: res_error });
|
|
390
391
|
}
|
|
@@ -457,14 +458,14 @@ class Content {
|
|
|
457
458
|
/**
|
|
458
459
|
* @param {Object} arg - Arg object.
|
|
459
460
|
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
460
|
-
* identifier of an FAQ. You can get slug value from the endpoint
|
|
461
|
-
* /service/application/content/v1.0/faq.
|
|
462
|
-
* @returns {Promise<
|
|
463
|
-
* @summary: Get
|
|
464
|
-
* @description: Use this API to get
|
|
461
|
+
* identifier of an FAQ category. You can get slug value from the endpoint
|
|
462
|
+
* /service/application/content/v1.0/faq/categories.
|
|
463
|
+
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
464
|
+
* @summary: Get the FAQ category
|
|
465
|
+
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
465
466
|
*/
|
|
466
|
-
async
|
|
467
|
-
const { error } = ContentValidator.
|
|
467
|
+
async getFaqCategoryBySlug({ slug } = {}) {
|
|
468
|
+
const { error } = ContentValidator.getFaqCategoryBySlug().validate(
|
|
468
469
|
{ slug },
|
|
469
470
|
{ abortEarly: false, allowUnknown: true }
|
|
470
471
|
);
|
|
@@ -473,14 +474,16 @@ class Content {
|
|
|
473
474
|
}
|
|
474
475
|
|
|
475
476
|
// Showing warrnings if extra unknown parameters are found
|
|
476
|
-
const {
|
|
477
|
+
const {
|
|
478
|
+
error: warrning,
|
|
479
|
+
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
477
480
|
{ slug },
|
|
478
481
|
{ abortEarly: false, allowUnknown: false }
|
|
479
482
|
);
|
|
480
483
|
if (warrning) {
|
|
481
484
|
Logger({
|
|
482
485
|
level: "WARN",
|
|
483
|
-
message: "Parameter Validation warrnings for
|
|
486
|
+
message: "Parameter Validation warrnings for getFaqCategoryBySlug",
|
|
484
487
|
});
|
|
485
488
|
Logger({ level: "WARN", message: warrning });
|
|
486
489
|
}
|
|
@@ -493,7 +496,7 @@ class Content {
|
|
|
493
496
|
this._conf,
|
|
494
497
|
"get",
|
|
495
498
|
constructUrl({
|
|
496
|
-
url: this._urls["
|
|
499
|
+
url: this._urls["getFaqCategoryBySlug"],
|
|
497
500
|
params: { slug },
|
|
498
501
|
}),
|
|
499
502
|
query_params,
|
|
@@ -501,7 +504,9 @@ class Content {
|
|
|
501
504
|
xHeaders
|
|
502
505
|
);
|
|
503
506
|
|
|
504
|
-
const {
|
|
507
|
+
const {
|
|
508
|
+
error: res_error,
|
|
509
|
+
} = ContentModel.GetFaqCategoryBySlugSchema().validate(response, {
|
|
505
510
|
abortEarly: false,
|
|
506
511
|
allowUnknown: false,
|
|
507
512
|
});
|
|
@@ -509,7 +514,7 @@ class Content {
|
|
|
509
514
|
if (res_error) {
|
|
510
515
|
Logger({
|
|
511
516
|
level: "WARN",
|
|
512
|
-
message: "Response Validation Warnnings for
|
|
517
|
+
message: "Response Validation Warnnings for getFaqCategoryBySlug",
|
|
513
518
|
});
|
|
514
519
|
Logger({ level: "WARN", message: res_error });
|
|
515
520
|
}
|
|
@@ -519,16 +524,13 @@ class Content {
|
|
|
519
524
|
|
|
520
525
|
/**
|
|
521
526
|
* @param {Object} arg - Arg object.
|
|
522
|
-
* @
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
526
|
-
* @summary: Get the FAQ category
|
|
527
|
-
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
527
|
+
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
528
|
+
* @summary: Get a list of FAQs
|
|
529
|
+
* @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
|
|
528
530
|
*/
|
|
529
|
-
async
|
|
530
|
-
const { error } = ContentValidator.
|
|
531
|
-
{
|
|
531
|
+
async getFaqs({} = {}) {
|
|
532
|
+
const { error } = ContentValidator.getFaqs().validate(
|
|
533
|
+
{},
|
|
532
534
|
{ abortEarly: false, allowUnknown: true }
|
|
533
535
|
);
|
|
534
536
|
if (error) {
|
|
@@ -536,16 +538,14 @@ class Content {
|
|
|
536
538
|
}
|
|
537
539
|
|
|
538
540
|
// Showing warrnings if extra unknown parameters are found
|
|
539
|
-
const {
|
|
540
|
-
|
|
541
|
-
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
542
|
-
{ slug },
|
|
541
|
+
const { error: warrning } = ContentValidator.getFaqs().validate(
|
|
542
|
+
{},
|
|
543
543
|
{ abortEarly: false, allowUnknown: false }
|
|
544
544
|
);
|
|
545
545
|
if (warrning) {
|
|
546
546
|
Logger({
|
|
547
547
|
level: "WARN",
|
|
548
|
-
message: "Parameter Validation warrnings for
|
|
548
|
+
message: "Parameter Validation warrnings for getFaqs",
|
|
549
549
|
});
|
|
550
550
|
Logger({ level: "WARN", message: warrning });
|
|
551
551
|
}
|
|
@@ -558,8 +558,8 @@ class Content {
|
|
|
558
558
|
this._conf,
|
|
559
559
|
"get",
|
|
560
560
|
constructUrl({
|
|
561
|
-
url: this._urls["
|
|
562
|
-
params: {
|
|
561
|
+
url: this._urls["getFaqs"],
|
|
562
|
+
params: {},
|
|
563
563
|
}),
|
|
564
564
|
query_params,
|
|
565
565
|
undefined,
|
|
@@ -568,7 +568,7 @@ class Content {
|
|
|
568
568
|
|
|
569
569
|
const {
|
|
570
570
|
error: res_error,
|
|
571
|
-
} = ContentModel.
|
|
571
|
+
} = ContentModel.FaqResponseSchema().validate(response, {
|
|
572
572
|
abortEarly: false,
|
|
573
573
|
allowUnknown: false,
|
|
574
574
|
});
|
|
@@ -576,7 +576,7 @@ class Content {
|
|
|
576
576
|
if (res_error) {
|
|
577
577
|
Logger({
|
|
578
578
|
level: "WARN",
|
|
579
|
-
message: "Response Validation Warnnings for
|
|
579
|
+
message: "Response Validation Warnnings for getFaqs",
|
|
580
580
|
});
|
|
581
581
|
Logger({ level: "WARN", message: res_error });
|
|
582
582
|
}
|
|
@@ -868,13 +868,17 @@ class Content {
|
|
|
868
868
|
|
|
869
869
|
/**
|
|
870
870
|
* @param {Object} arg - Arg object.
|
|
871
|
-
* @
|
|
872
|
-
*
|
|
873
|
-
*
|
|
871
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
872
|
+
* identifier of a page. You can get slug value from the endpoint
|
|
873
|
+
* /service/application/content/v2.0/pages/.
|
|
874
|
+
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
875
|
+
* @returns {Promise<PageSchema>} - Success response
|
|
876
|
+
* @summary: Get a page
|
|
877
|
+
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
|
|
874
878
|
*/
|
|
875
|
-
async
|
|
876
|
-
const { error } = ContentValidator.
|
|
877
|
-
{},
|
|
879
|
+
async getPage({ slug, rootId } = {}) {
|
|
880
|
+
const { error } = ContentValidator.getPage().validate(
|
|
881
|
+
{ slug, rootId },
|
|
878
882
|
{ abortEarly: false, allowUnknown: true }
|
|
879
883
|
);
|
|
880
884
|
if (error) {
|
|
@@ -882,19 +886,20 @@ class Content {
|
|
|
882
886
|
}
|
|
883
887
|
|
|
884
888
|
// Showing warrnings if extra unknown parameters are found
|
|
885
|
-
const { error: warrning } = ContentValidator.
|
|
886
|
-
{},
|
|
889
|
+
const { error: warrning } = ContentValidator.getPage().validate(
|
|
890
|
+
{ slug, rootId },
|
|
887
891
|
{ abortEarly: false, allowUnknown: false }
|
|
888
892
|
);
|
|
889
893
|
if (warrning) {
|
|
890
894
|
Logger({
|
|
891
895
|
level: "WARN",
|
|
892
|
-
message: "Parameter Validation warrnings for
|
|
896
|
+
message: "Parameter Validation warrnings for getPage",
|
|
893
897
|
});
|
|
894
898
|
Logger({ level: "WARN", message: warrning });
|
|
895
899
|
}
|
|
896
900
|
|
|
897
901
|
const query_params = {};
|
|
902
|
+
query_params["root_id"] = rootId;
|
|
898
903
|
|
|
899
904
|
const xHeaders = {};
|
|
900
905
|
|
|
@@ -902,23 +907,23 @@ class Content {
|
|
|
902
907
|
this._conf,
|
|
903
908
|
"get",
|
|
904
909
|
constructUrl({
|
|
905
|
-
url: this._urls["
|
|
906
|
-
params: {},
|
|
910
|
+
url: this._urls["getPage"],
|
|
911
|
+
params: { slug },
|
|
907
912
|
}),
|
|
908
913
|
query_params,
|
|
909
914
|
undefined,
|
|
910
915
|
xHeaders
|
|
911
916
|
);
|
|
912
917
|
|
|
913
|
-
const { error: res_error } = ContentModel.
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
);
|
|
918
|
+
const { error: res_error } = ContentModel.PageSchema().validate(response, {
|
|
919
|
+
abortEarly: false,
|
|
920
|
+
allowUnknown: false,
|
|
921
|
+
});
|
|
917
922
|
|
|
918
923
|
if (res_error) {
|
|
919
924
|
Logger({
|
|
920
925
|
level: "WARN",
|
|
921
|
-
message: "Response Validation Warnnings for
|
|
926
|
+
message: "Response Validation Warnnings for getPage",
|
|
922
927
|
});
|
|
923
928
|
Logger({ level: "WARN", message: res_error });
|
|
924
929
|
}
|
|
@@ -931,12 +936,12 @@ class Content {
|
|
|
931
936
|
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
932
937
|
* given set of results. Default value is 1.
|
|
933
938
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
934
|
-
* @returns {Promise<
|
|
935
|
-
* @summary: Get
|
|
936
|
-
* @description: Use this API to get a list of
|
|
939
|
+
* @returns {Promise<PageGetResponse>} - Success response
|
|
940
|
+
* @summary: Get all pages
|
|
941
|
+
* @description: Use this API to get a list of pages.
|
|
937
942
|
*/
|
|
938
|
-
async
|
|
939
|
-
const { error } = ContentValidator.
|
|
943
|
+
async getPages({ pageNo, pageSize } = {}) {
|
|
944
|
+
const { error } = ContentValidator.getPages().validate(
|
|
940
945
|
{ pageNo, pageSize },
|
|
941
946
|
{ abortEarly: false, allowUnknown: true }
|
|
942
947
|
);
|
|
@@ -945,14 +950,14 @@ class Content {
|
|
|
945
950
|
}
|
|
946
951
|
|
|
947
952
|
// Showing warrnings if extra unknown parameters are found
|
|
948
|
-
const { error: warrning } = ContentValidator.
|
|
953
|
+
const { error: warrning } = ContentValidator.getPages().validate(
|
|
949
954
|
{ pageNo, pageSize },
|
|
950
955
|
{ abortEarly: false, allowUnknown: false }
|
|
951
956
|
);
|
|
952
957
|
if (warrning) {
|
|
953
958
|
Logger({
|
|
954
959
|
level: "WARN",
|
|
955
|
-
message: "Parameter Validation warrnings for
|
|
960
|
+
message: "Parameter Validation warrnings for getPages",
|
|
956
961
|
});
|
|
957
962
|
Logger({ level: "WARN", message: warrning });
|
|
958
963
|
}
|
|
@@ -967,7 +972,7 @@ class Content {
|
|
|
967
972
|
this._conf,
|
|
968
973
|
"get",
|
|
969
974
|
constructUrl({
|
|
970
|
-
url: this._urls["
|
|
975
|
+
url: this._urls["getPages"],
|
|
971
976
|
params: {},
|
|
972
977
|
}),
|
|
973
978
|
query_params,
|
|
@@ -977,7 +982,7 @@ class Content {
|
|
|
977
982
|
|
|
978
983
|
const {
|
|
979
984
|
error: res_error,
|
|
980
|
-
} = ContentModel.
|
|
985
|
+
} = ContentModel.PageGetResponse().validate(response, {
|
|
981
986
|
abortEarly: false,
|
|
982
987
|
allowUnknown: false,
|
|
983
988
|
});
|
|
@@ -985,7 +990,7 @@ class Content {
|
|
|
985
990
|
if (res_error) {
|
|
986
991
|
Logger({
|
|
987
992
|
level: "WARN",
|
|
988
|
-
message: "Response Validation Warnnings for
|
|
993
|
+
message: "Response Validation Warnnings for getPages",
|
|
989
994
|
});
|
|
990
995
|
Logger({ level: "WARN", message: res_error });
|
|
991
996
|
}
|
|
@@ -996,16 +1001,16 @@ class Content {
|
|
|
996
1001
|
/**
|
|
997
1002
|
* @param {Object} arg - Arg object.
|
|
998
1003
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
999
|
-
* @summary: Get
|
|
1000
|
-
* @description: Use this API to get a list of
|
|
1004
|
+
* @summary: Get all pages
|
|
1005
|
+
* @description: Use this API to get a list of pages.
|
|
1001
1006
|
*/
|
|
1002
|
-
|
|
1007
|
+
getPagesPaginator({ pageSize } = {}) {
|
|
1003
1008
|
const paginator = new Paginator();
|
|
1004
1009
|
const callback = async () => {
|
|
1005
1010
|
const pageId = paginator.nextId;
|
|
1006
1011
|
const pageNo = paginator.pageNo;
|
|
1007
1012
|
const pageType = "number";
|
|
1008
|
-
const data = await this.
|
|
1013
|
+
const data = await this.getPages({
|
|
1009
1014
|
pageNo: pageNo,
|
|
1010
1015
|
pageSize: pageSize,
|
|
1011
1016
|
});
|
|
@@ -1021,16 +1026,13 @@ class Content {
|
|
|
1021
1026
|
|
|
1022
1027
|
/**
|
|
1023
1028
|
* @param {Object} arg - Arg object.
|
|
1024
|
-
* @
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1028
|
-
* @summary: Get a slideshow
|
|
1029
|
-
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
|
|
1029
|
+
* @returns {Promise<SeoComponent>} - Success response
|
|
1030
|
+
* @summary: Get the SEO of an application
|
|
1031
|
+
* @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
|
|
1030
1032
|
*/
|
|
1031
|
-
async
|
|
1032
|
-
const { error } = ContentValidator.
|
|
1033
|
-
{
|
|
1033
|
+
async getSEOConfiguration({} = {}) {
|
|
1034
|
+
const { error } = ContentValidator.getSEOConfiguration().validate(
|
|
1035
|
+
{},
|
|
1034
1036
|
{ abortEarly: false, allowUnknown: true }
|
|
1035
1037
|
);
|
|
1036
1038
|
if (error) {
|
|
@@ -1038,14 +1040,14 @@ class Content {
|
|
|
1038
1040
|
}
|
|
1039
1041
|
|
|
1040
1042
|
// Showing warrnings if extra unknown parameters are found
|
|
1041
|
-
const { error: warrning } = ContentValidator.
|
|
1042
|
-
{
|
|
1043
|
+
const { error: warrning } = ContentValidator.getSEOConfiguration().validate(
|
|
1044
|
+
{},
|
|
1043
1045
|
{ abortEarly: false, allowUnknown: false }
|
|
1044
1046
|
);
|
|
1045
1047
|
if (warrning) {
|
|
1046
1048
|
Logger({
|
|
1047
1049
|
level: "WARN",
|
|
1048
|
-
message: "Parameter Validation warrnings for
|
|
1050
|
+
message: "Parameter Validation warrnings for getSEOConfiguration",
|
|
1049
1051
|
});
|
|
1050
1052
|
Logger({ level: "WARN", message: warrning });
|
|
1051
1053
|
}
|
|
@@ -1058,25 +1060,23 @@ class Content {
|
|
|
1058
1060
|
this._conf,
|
|
1059
1061
|
"get",
|
|
1060
1062
|
constructUrl({
|
|
1061
|
-
url: this._urls["
|
|
1062
|
-
params: {
|
|
1063
|
+
url: this._urls["getSEOConfiguration"],
|
|
1064
|
+
params: {},
|
|
1063
1065
|
}),
|
|
1064
1066
|
query_params,
|
|
1065
1067
|
undefined,
|
|
1066
1068
|
xHeaders
|
|
1067
1069
|
);
|
|
1068
1070
|
|
|
1069
|
-
const {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
allowUnknown: false,
|
|
1074
|
-
});
|
|
1071
|
+
const { error: res_error } = ContentModel.SeoComponent().validate(
|
|
1072
|
+
response,
|
|
1073
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1074
|
+
);
|
|
1075
1075
|
|
|
1076
1076
|
if (res_error) {
|
|
1077
1077
|
Logger({
|
|
1078
1078
|
level: "WARN",
|
|
1079
|
-
message: "Response Validation Warnnings for
|
|
1079
|
+
message: "Response Validation Warnnings for getSEOConfiguration",
|
|
1080
1080
|
});
|
|
1081
1081
|
Logger({ level: "WARN", message: res_error });
|
|
1082
1082
|
}
|
|
@@ -1086,13 +1086,16 @@ class Content {
|
|
|
1086
1086
|
|
|
1087
1087
|
/**
|
|
1088
1088
|
* @param {Object} arg - Arg object.
|
|
1089
|
-
* @
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1089
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
1090
|
+
* identifier of a slideshow. You can get slug value from the endpoint
|
|
1091
|
+
* /service/application/content/v1.0/slideshow/.
|
|
1092
|
+
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1093
|
+
* @summary: Get a slideshow
|
|
1094
|
+
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
|
|
1092
1095
|
*/
|
|
1093
|
-
async
|
|
1094
|
-
const { error } = ContentValidator.
|
|
1095
|
-
{},
|
|
1096
|
+
async getSlideshow({ slug } = {}) {
|
|
1097
|
+
const { error } = ContentValidator.getSlideshow().validate(
|
|
1098
|
+
{ slug },
|
|
1096
1099
|
{ abortEarly: false, allowUnknown: true }
|
|
1097
1100
|
);
|
|
1098
1101
|
if (error) {
|
|
@@ -1100,16 +1103,14 @@ class Content {
|
|
|
1100
1103
|
}
|
|
1101
1104
|
|
|
1102
1105
|
// Showing warrnings if extra unknown parameters are found
|
|
1103
|
-
const {
|
|
1104
|
-
|
|
1105
|
-
} = ContentValidator.getSupportInformation().validate(
|
|
1106
|
-
{},
|
|
1106
|
+
const { error: warrning } = ContentValidator.getSlideshow().validate(
|
|
1107
|
+
{ slug },
|
|
1107
1108
|
{ abortEarly: false, allowUnknown: false }
|
|
1108
1109
|
);
|
|
1109
1110
|
if (warrning) {
|
|
1110
1111
|
Logger({
|
|
1111
1112
|
level: "WARN",
|
|
1112
|
-
message: "Parameter Validation warrnings for
|
|
1113
|
+
message: "Parameter Validation warrnings for getSlideshow",
|
|
1113
1114
|
});
|
|
1114
1115
|
Logger({ level: "WARN", message: warrning });
|
|
1115
1116
|
}
|
|
@@ -1122,15 +1123,17 @@ class Content {
|
|
|
1122
1123
|
this._conf,
|
|
1123
1124
|
"get",
|
|
1124
1125
|
constructUrl({
|
|
1125
|
-
url: this._urls["
|
|
1126
|
-
params: {},
|
|
1126
|
+
url: this._urls["getSlideshow"],
|
|
1127
|
+
params: { slug },
|
|
1127
1128
|
}),
|
|
1128
1129
|
query_params,
|
|
1129
1130
|
undefined,
|
|
1130
1131
|
xHeaders
|
|
1131
1132
|
);
|
|
1132
1133
|
|
|
1133
|
-
const {
|
|
1134
|
+
const {
|
|
1135
|
+
error: res_error,
|
|
1136
|
+
} = ContentModel.SlideshowSchema().validate(response, {
|
|
1134
1137
|
abortEarly: false,
|
|
1135
1138
|
allowUnknown: false,
|
|
1136
1139
|
});
|
|
@@ -1138,7 +1141,7 @@ class Content {
|
|
|
1138
1141
|
if (res_error) {
|
|
1139
1142
|
Logger({
|
|
1140
1143
|
level: "WARN",
|
|
1141
|
-
message: "Response Validation Warnnings for
|
|
1144
|
+
message: "Response Validation Warnnings for getSlideshow",
|
|
1142
1145
|
});
|
|
1143
1146
|
Logger({ level: "WARN", message: res_error });
|
|
1144
1147
|
}
|
|
@@ -1148,13 +1151,16 @@ class Content {
|
|
|
1148
1151
|
|
|
1149
1152
|
/**
|
|
1150
1153
|
* @param {Object} arg - Arg object.
|
|
1151
|
-
* @
|
|
1152
|
-
*
|
|
1153
|
-
* @
|
|
1154
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1155
|
+
* given set of results. Default value is 1.
|
|
1156
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1157
|
+
* @returns {Promise<SlideshowGetResponse>} - Success response
|
|
1158
|
+
* @summary: Get the slideshows
|
|
1159
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
1154
1160
|
*/
|
|
1155
|
-
async
|
|
1156
|
-
const { error } = ContentValidator.
|
|
1157
|
-
{},
|
|
1161
|
+
async getSlideshows({ pageNo, pageSize } = {}) {
|
|
1162
|
+
const { error } = ContentValidator.getSlideshows().validate(
|
|
1163
|
+
{ pageNo, pageSize },
|
|
1158
1164
|
{ abortEarly: false, allowUnknown: true }
|
|
1159
1165
|
);
|
|
1160
1166
|
if (error) {
|
|
@@ -1162,19 +1168,21 @@ class Content {
|
|
|
1162
1168
|
}
|
|
1163
1169
|
|
|
1164
1170
|
// Showing warrnings if extra unknown parameters are found
|
|
1165
|
-
const { error: warrning } = ContentValidator.
|
|
1166
|
-
{},
|
|
1171
|
+
const { error: warrning } = ContentValidator.getSlideshows().validate(
|
|
1172
|
+
{ pageNo, pageSize },
|
|
1167
1173
|
{ abortEarly: false, allowUnknown: false }
|
|
1168
1174
|
);
|
|
1169
1175
|
if (warrning) {
|
|
1170
1176
|
Logger({
|
|
1171
1177
|
level: "WARN",
|
|
1172
|
-
message: "Parameter Validation warrnings for
|
|
1178
|
+
message: "Parameter Validation warrnings for getSlideshows",
|
|
1173
1179
|
});
|
|
1174
1180
|
Logger({ level: "WARN", message: warrning });
|
|
1175
1181
|
}
|
|
1176
1182
|
|
|
1177
1183
|
const query_params = {};
|
|
1184
|
+
query_params["page_no"] = pageNo;
|
|
1185
|
+
query_params["page_size"] = pageSize;
|
|
1178
1186
|
|
|
1179
1187
|
const xHeaders = {};
|
|
1180
1188
|
|
|
@@ -1182,7 +1190,7 @@ class Content {
|
|
|
1182
1190
|
this._conf,
|
|
1183
1191
|
"get",
|
|
1184
1192
|
constructUrl({
|
|
1185
|
-
url: this._urls["
|
|
1193
|
+
url: this._urls["getSlideshows"],
|
|
1186
1194
|
params: {},
|
|
1187
1195
|
}),
|
|
1188
1196
|
query_params,
|
|
@@ -1190,7 +1198,9 @@ class Content {
|
|
|
1190
1198
|
xHeaders
|
|
1191
1199
|
);
|
|
1192
1200
|
|
|
1193
|
-
const {
|
|
1201
|
+
const {
|
|
1202
|
+
error: res_error,
|
|
1203
|
+
} = ContentModel.SlideshowGetResponse().validate(response, {
|
|
1194
1204
|
abortEarly: false,
|
|
1195
1205
|
allowUnknown: false,
|
|
1196
1206
|
});
|
|
@@ -1198,7 +1208,7 @@ class Content {
|
|
|
1198
1208
|
if (res_error) {
|
|
1199
1209
|
Logger({
|
|
1200
1210
|
level: "WARN",
|
|
1201
|
-
message: "Response Validation Warnnings for
|
|
1211
|
+
message: "Response Validation Warnnings for getSlideshows",
|
|
1202
1212
|
});
|
|
1203
1213
|
Logger({ level: "WARN", message: res_error });
|
|
1204
1214
|
}
|
|
@@ -1208,17 +1218,39 @@ class Content {
|
|
|
1208
1218
|
|
|
1209
1219
|
/**
|
|
1210
1220
|
* @param {Object} arg - Arg object.
|
|
1211
|
-
* @param {
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
1215
|
-
* @returns {Promise<PageSchema>} - Success response
|
|
1216
|
-
* @summary: Get a page
|
|
1217
|
-
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
|
|
1221
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1222
|
+
* @summary: Get the slideshows
|
|
1223
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
1218
1224
|
*/
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1225
|
+
getSlideshowsPaginator({ pageSize } = {}) {
|
|
1226
|
+
const paginator = new Paginator();
|
|
1227
|
+
const callback = async () => {
|
|
1228
|
+
const pageId = paginator.nextId;
|
|
1229
|
+
const pageNo = paginator.pageNo;
|
|
1230
|
+
const pageType = "number";
|
|
1231
|
+
const data = await this.getSlideshows({
|
|
1232
|
+
pageNo: pageNo,
|
|
1233
|
+
pageSize: pageSize,
|
|
1234
|
+
});
|
|
1235
|
+
paginator.setPaginator({
|
|
1236
|
+
hasNext: data.page.has_next ? true : false,
|
|
1237
|
+
nextId: data.page.next_id,
|
|
1238
|
+
});
|
|
1239
|
+
return data;
|
|
1240
|
+
};
|
|
1241
|
+
paginator.setCallback(callback);
|
|
1242
|
+
return paginator;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* @param {Object} arg - Arg object.
|
|
1247
|
+
* @returns {Promise<Support>} - Success response
|
|
1248
|
+
* @summary: Get the support information
|
|
1249
|
+
* @description: Use this API to get contact details for customer support including emails and phone numbers.
|
|
1250
|
+
*/
|
|
1251
|
+
async getSupportInformation({} = {}) {
|
|
1252
|
+
const { error } = ContentValidator.getSupportInformation().validate(
|
|
1253
|
+
{},
|
|
1222
1254
|
{ abortEarly: false, allowUnknown: true }
|
|
1223
1255
|
);
|
|
1224
1256
|
if (error) {
|
|
@@ -1226,20 +1258,21 @@ class Content {
|
|
|
1226
1258
|
}
|
|
1227
1259
|
|
|
1228
1260
|
// Showing warrnings if extra unknown parameters are found
|
|
1229
|
-
const {
|
|
1230
|
-
|
|
1261
|
+
const {
|
|
1262
|
+
error: warrning,
|
|
1263
|
+
} = ContentValidator.getSupportInformation().validate(
|
|
1264
|
+
{},
|
|
1231
1265
|
{ abortEarly: false, allowUnknown: false }
|
|
1232
1266
|
);
|
|
1233
1267
|
if (warrning) {
|
|
1234
1268
|
Logger({
|
|
1235
1269
|
level: "WARN",
|
|
1236
|
-
message: "Parameter Validation warrnings for
|
|
1270
|
+
message: "Parameter Validation warrnings for getSupportInformation",
|
|
1237
1271
|
});
|
|
1238
1272
|
Logger({ level: "WARN", message: warrning });
|
|
1239
1273
|
}
|
|
1240
1274
|
|
|
1241
1275
|
const query_params = {};
|
|
1242
|
-
query_params["root_id"] = rootId;
|
|
1243
1276
|
|
|
1244
1277
|
const xHeaders = {};
|
|
1245
1278
|
|
|
@@ -1247,15 +1280,15 @@ class Content {
|
|
|
1247
1280
|
this._conf,
|
|
1248
1281
|
"get",
|
|
1249
1282
|
constructUrl({
|
|
1250
|
-
url: this._urls["
|
|
1251
|
-
params: {
|
|
1283
|
+
url: this._urls["getSupportInformation"],
|
|
1284
|
+
params: {},
|
|
1252
1285
|
}),
|
|
1253
1286
|
query_params,
|
|
1254
1287
|
undefined,
|
|
1255
1288
|
xHeaders
|
|
1256
1289
|
);
|
|
1257
1290
|
|
|
1258
|
-
const { error: res_error } = ContentModel.
|
|
1291
|
+
const { error: res_error } = ContentModel.Support().validate(response, {
|
|
1259
1292
|
abortEarly: false,
|
|
1260
1293
|
allowUnknown: false,
|
|
1261
1294
|
});
|
|
@@ -1263,7 +1296,7 @@ class Content {
|
|
|
1263
1296
|
if (res_error) {
|
|
1264
1297
|
Logger({
|
|
1265
1298
|
level: "WARN",
|
|
1266
|
-
message: "Response Validation Warnnings for
|
|
1299
|
+
message: "Response Validation Warnnings for getSupportInformation",
|
|
1267
1300
|
});
|
|
1268
1301
|
Logger({ level: "WARN", message: res_error });
|
|
1269
1302
|
}
|
|
@@ -1273,16 +1306,13 @@ class Content {
|
|
|
1273
1306
|
|
|
1274
1307
|
/**
|
|
1275
1308
|
* @param {Object} arg - Arg object.
|
|
1276
|
-
* @
|
|
1277
|
-
*
|
|
1278
|
-
* @
|
|
1279
|
-
* @returns {Promise<PageGetResponse>} - Success response
|
|
1280
|
-
* @summary: Get all pages
|
|
1281
|
-
* @description: Use this API to get a list of pages.
|
|
1309
|
+
* @returns {Promise<TagsSchema>} - Success response
|
|
1310
|
+
* @summary: Get the tags associated with an application
|
|
1311
|
+
* @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
|
|
1282
1312
|
*/
|
|
1283
|
-
async
|
|
1284
|
-
const { error } = ContentValidator.
|
|
1285
|
-
{
|
|
1313
|
+
async getTags({} = {}) {
|
|
1314
|
+
const { error } = ContentValidator.getTags().validate(
|
|
1315
|
+
{},
|
|
1286
1316
|
{ abortEarly: false, allowUnknown: true }
|
|
1287
1317
|
);
|
|
1288
1318
|
if (error) {
|
|
@@ -1290,21 +1320,19 @@ class Content {
|
|
|
1290
1320
|
}
|
|
1291
1321
|
|
|
1292
1322
|
// Showing warrnings if extra unknown parameters are found
|
|
1293
|
-
const { error: warrning } = ContentValidator.
|
|
1294
|
-
{
|
|
1323
|
+
const { error: warrning } = ContentValidator.getTags().validate(
|
|
1324
|
+
{},
|
|
1295
1325
|
{ abortEarly: false, allowUnknown: false }
|
|
1296
1326
|
);
|
|
1297
1327
|
if (warrning) {
|
|
1298
1328
|
Logger({
|
|
1299
1329
|
level: "WARN",
|
|
1300
|
-
message: "Parameter Validation warrnings for
|
|
1330
|
+
message: "Parameter Validation warrnings for getTags",
|
|
1301
1331
|
});
|
|
1302
1332
|
Logger({ level: "WARN", message: warrning });
|
|
1303
1333
|
}
|
|
1304
1334
|
|
|
1305
1335
|
const query_params = {};
|
|
1306
|
-
query_params["page_no"] = pageNo;
|
|
1307
|
-
query_params["page_size"] = pageSize;
|
|
1308
1336
|
|
|
1309
1337
|
const xHeaders = {};
|
|
1310
1338
|
|
|
@@ -1312,7 +1340,7 @@ class Content {
|
|
|
1312
1340
|
this._conf,
|
|
1313
1341
|
"get",
|
|
1314
1342
|
constructUrl({
|
|
1315
|
-
url: this._urls["
|
|
1343
|
+
url: this._urls["getTags"],
|
|
1316
1344
|
params: {},
|
|
1317
1345
|
}),
|
|
1318
1346
|
query_params,
|
|
@@ -1320,9 +1348,7 @@ class Content {
|
|
|
1320
1348
|
xHeaders
|
|
1321
1349
|
);
|
|
1322
1350
|
|
|
1323
|
-
const {
|
|
1324
|
-
error: res_error,
|
|
1325
|
-
} = ContentModel.PageGetResponse().validate(response, {
|
|
1351
|
+
const { error: res_error } = ContentModel.TagsSchema().validate(response, {
|
|
1326
1352
|
abortEarly: false,
|
|
1327
1353
|
allowUnknown: false,
|
|
1328
1354
|
});
|
|
@@ -1330,39 +1356,13 @@ class Content {
|
|
|
1330
1356
|
if (res_error) {
|
|
1331
1357
|
Logger({
|
|
1332
1358
|
level: "WARN",
|
|
1333
|
-
message: "Response Validation Warnnings for
|
|
1359
|
+
message: "Response Validation Warnnings for getTags",
|
|
1334
1360
|
});
|
|
1335
1361
|
Logger({ level: "WARN", message: res_error });
|
|
1336
1362
|
}
|
|
1337
1363
|
|
|
1338
1364
|
return response;
|
|
1339
1365
|
}
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* @param {Object} arg - Arg object.
|
|
1343
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1344
|
-
* @summary: Get all pages
|
|
1345
|
-
* @description: Use this API to get a list of pages.
|
|
1346
|
-
*/
|
|
1347
|
-
getPagesPaginator({ pageSize } = {}) {
|
|
1348
|
-
const paginator = new Paginator();
|
|
1349
|
-
const callback = async () => {
|
|
1350
|
-
const pageId = paginator.nextId;
|
|
1351
|
-
const pageNo = paginator.pageNo;
|
|
1352
|
-
const pageType = "number";
|
|
1353
|
-
const data = await this.getPages({
|
|
1354
|
-
pageNo: pageNo,
|
|
1355
|
-
pageSize: pageSize,
|
|
1356
|
-
});
|
|
1357
|
-
paginator.setPaginator({
|
|
1358
|
-
hasNext: data.page.has_next ? true : false,
|
|
1359
|
-
nextId: data.page.next_id,
|
|
1360
|
-
});
|
|
1361
|
-
return data;
|
|
1362
|
-
};
|
|
1363
|
-
paginator.setCallback(callback);
|
|
1364
|
-
return paginator;
|
|
1365
|
-
}
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
1368
|
module.exports = Content;
|