@gofynd/fdk-client-javascript 1.4.12 → 1.4.14
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 +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +60 -53
- package/sdk/application/Cart/CartApplicationClient.js +130 -53
- package/sdk/application/Cart/CartApplicationModel.d.ts +489 -143
- package/sdk/application/Cart/CartApplicationModel.js +380 -159
- package/sdk/application/Cart/CartApplicationValidator.d.ts +38 -19
- package/sdk/application/Cart/CartApplicationValidator.js +34 -18
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +88 -68
- package/sdk/application/Catalog/CatalogApplicationClient.js +114 -94
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +194 -142
- package/sdk/application/Catalog/CatalogApplicationModel.js +171 -133
- package/sdk/application/Common/CommonApplicationClient.d.ts +3 -2
- package/sdk/application/Common/CommonApplicationClient.js +6 -5
- package/sdk/application/Common/CommonApplicationModel.d.ts +9 -9
- package/sdk/application/Common/CommonApplicationModel.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +34 -27
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +45 -57
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +35 -47
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +2 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +23 -33
- package/sdk/application/Content/ContentApplicationClient.js +54 -75
- package/sdk/application/Content/ContentApplicationModel.d.ts +96 -39
- package/sdk/application/Content/ContentApplicationModel.js +88 -34
- package/sdk/application/Content/ContentApplicationValidator.d.ts +23 -17
- package/sdk/application/Content/ContentApplicationValidator.js +15 -10
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -8
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +14 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -25
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +16 -18
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +6 -6
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +36 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +202 -0
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +289 -0
- package/sdk/application/Finance/FinanceApplicationModel.js +208 -0
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +25 -0
- package/sdk/application/Finance/FinanceApplicationValidator.js +31 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -3
- package/sdk/application/Lead/LeadApplicationClient.js +2 -3
- package/sdk/application/Lead/LeadApplicationModel.d.ts +11 -11
- package/sdk/application/Lead/LeadApplicationModel.js +19 -19
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +39 -16
- package/sdk/application/Logistic/LogisticApplicationClient.js +189 -21
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +532 -173
- package/sdk/application/Logistic/LogisticApplicationModel.js +409 -139
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +54 -9
- package/sdk/application/Logistic/LogisticApplicationValidator.js +42 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -10
- package/sdk/application/Order/OrderApplicationClient.js +96 -13
- package/sdk/application/Order/OrderApplicationModel.d.ts +434 -102
- package/sdk/application/Order/OrderApplicationModel.js +278 -73
- package/sdk/application/Order/OrderApplicationValidator.d.ts +17 -3
- package/sdk/application/Order/OrderApplicationValidator.js +15 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +96 -99
- package/sdk/application/Payment/PaymentApplicationClient.js +111 -114
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +293 -289
- package/sdk/application/Payment/PaymentApplicationModel.js +243 -241
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +46 -46
- package/sdk/application/Payment/PaymentApplicationValidator.js +46 -46
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -16
- package/sdk/application/Rewards/RewardsApplicationClient.js +19 -22
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +37 -37
- package/sdk/application/Rewards/RewardsApplicationModel.js +29 -29
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +6 -6
- package/sdk/application/Rewards/RewardsApplicationValidator.js +6 -6
- package/sdk/application/Share/ShareApplicationModel.js +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -6
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +51 -19
- package/sdk/application/Theme/ThemeApplicationModel.js +47 -24
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +16 -3
- package/sdk/application/Theme/ThemeApplicationValidator.js +9 -2
- package/sdk/application/User/UserApplicationClient.d.ts +10 -10
- package/sdk/application/User/UserApplicationClient.js +10 -10
- package/sdk/application/User/UserApplicationModel.d.ts +17 -17
- package/sdk/application/User/UserApplicationModel.js +16 -16
- package/sdk/application/User/UserApplicationValidator.d.ts +2 -2
- package/sdk/application/User/UserApplicationValidator.js +2 -2
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -4
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +11 -9
- package/sdk/application/Webhook/WebhookApplicationModel.js +8 -6
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +2 -2
- package/sdk/application/Webhook/WebhookApplicationValidator.js +2 -2
- package/sdk/application/index.d.ts +1 -0
- package/sdk/application/index.js +2 -0
- package/sdk/common/Clickstream.js +12 -0
- package/sdk/common/Constant.d.ts +5 -0
- package/sdk/common/Constant.js +5 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +767 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +429 -76
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +120 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +99 -39
- package/sdk/partner/Theme/ThemePartnerModel.js +95 -38
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4978 -1303
- package/sdk/platform/Cart/CartPlatformModel.js +1922 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +192 -164
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +371 -343
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +99 -99
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +54 -54
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +139 -116
- package/sdk/platform/Catalog/CatalogPlatformClient.js +191 -168
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1374 -749
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1241 -830
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +124 -141
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +449 -422
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +179 -141
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +168 -130
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1244 -397
- package/sdk/platform/Content/ContentPlatformModel.js +526 -392
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +15 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +83 -5
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +25 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +138 -101
- package/sdk/platform/Order/OrderPlatformClient.js +267 -203
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4497 -877
- package/sdk/platform/Order/OrderPlatformModel.js +2336 -812
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +147 -50
- package/sdk/platform/Order/OrderPlatformValidator.js +75 -46
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +327 -313
- package/sdk/platform/Payment/PaymentPlatformModel.js +283 -273
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +45 -35
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +117 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +22 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +24 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +602 -341
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +483 -284
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +8 -8
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +40 -13
- package/sdk/platform/Theme/ThemePlatformModel.js +38 -17
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +791 -5
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -26,6 +26,12 @@ const Joi = require("joi");
|
|
|
26
26
|
* @property {SeoSchema} [seo]
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @typedef ValidationError
|
|
31
|
+
* @property {string} message - A brief description of the error encountered.
|
|
32
|
+
* @property {string} field - The field in the request that caused the error.
|
|
33
|
+
*/
|
|
34
|
+
|
|
29
35
|
/**
|
|
30
36
|
* @typedef SeoSchema
|
|
31
37
|
* @property {string} [app] - Application ID - Identifier for a Sales channel.
|
|
@@ -111,7 +117,7 @@ const Joi = require("joi");
|
|
|
111
117
|
*/
|
|
112
118
|
|
|
113
119
|
/**
|
|
114
|
-
* @typedef
|
|
120
|
+
* @typedef BlogGetDetails
|
|
115
121
|
* @property {BlogSchema[]} [items] - List of blogs with details.
|
|
116
122
|
* @property {Page} [page]
|
|
117
123
|
* @property {BlogFilters} [filters]
|
|
@@ -414,7 +420,7 @@ const Joi = require("joi");
|
|
|
414
420
|
*/
|
|
415
421
|
|
|
416
422
|
/**
|
|
417
|
-
* @typedef
|
|
423
|
+
* @typedef NavigationGetDetails
|
|
418
424
|
* @property {NavigationSchema[]} [items] - List of navigation items.
|
|
419
425
|
* @property {Page} [page]
|
|
420
426
|
*/
|
|
@@ -446,7 +452,7 @@ const Joi = require("joi");
|
|
|
446
452
|
*/
|
|
447
453
|
|
|
448
454
|
/**
|
|
449
|
-
* @typedef
|
|
455
|
+
* @typedef PageGetDetails
|
|
450
456
|
* @property {PageSchema[]} [items] - List of details of custom pages.
|
|
451
457
|
* @property {Page} [page]
|
|
452
458
|
*/
|
|
@@ -487,7 +493,7 @@ const Joi = require("joi");
|
|
|
487
493
|
*/
|
|
488
494
|
|
|
489
495
|
/**
|
|
490
|
-
* @typedef
|
|
496
|
+
* @typedef SlideshowGetDetails
|
|
491
497
|
* @property {SlideshowSchema[]} [items] - Details related to slideshow/screensaver.
|
|
492
498
|
* @property {Page} [page]
|
|
493
499
|
*/
|
|
@@ -592,7 +598,7 @@ const Joi = require("joi");
|
|
|
592
598
|
/**
|
|
593
599
|
* @typedef CustomObjectFieldSchema
|
|
594
600
|
* @property {string} [_id] - Unique identifier of an entry.
|
|
595
|
-
* @property {string} [
|
|
601
|
+
* @property {string} [slug] - Slug of custom field inside custom object.
|
|
596
602
|
* @property {CustomObjectFieldValue[]} [value] - Value of custom field inside
|
|
597
603
|
* custom object.
|
|
598
604
|
* @property {string} [type] - Data type of custom field inside custom object.
|
|
@@ -602,7 +608,7 @@ const Joi = require("joi");
|
|
|
602
608
|
|
|
603
609
|
/**
|
|
604
610
|
* @typedef CustomObjectByIdSchema
|
|
605
|
-
* @property {string} [
|
|
611
|
+
* @property {string} [id] - Unique identifier of an entry.
|
|
606
612
|
* @property {string} [status] - String denoting whether custom object is active
|
|
607
613
|
* or inactive.
|
|
608
614
|
* @property {string} [display_name] - Unique Display name of a custom object
|
|
@@ -623,10 +629,8 @@ const Joi = require("joi");
|
|
|
623
629
|
* @typedef CustomFieldSchema
|
|
624
630
|
* @property {string} [_id] - Unique identifier of an entry.
|
|
625
631
|
* @property {string} [namespace] - Namespace under which custom field is present.
|
|
626
|
-
* @property {string} [
|
|
632
|
+
* @property {string} [slug] - Unique identifier for a custom field in a given namespace.
|
|
627
633
|
* @property {string} [resource] - Type of an entity under which custom field is defined.
|
|
628
|
-
* @property {string} [creator] - Denotes where the custom field has been
|
|
629
|
-
* defined - within a company or within a sales channel.
|
|
630
634
|
* @property {CustomFieldValue[]} [value] - Array containing values of custom field.
|
|
631
635
|
* @property {string} [resource_id] - Unique identifier for the entity under
|
|
632
636
|
* which custom field is defined.
|
|
@@ -639,7 +643,6 @@ const Joi = require("joi");
|
|
|
639
643
|
* @property {boolean} [has_invalid_values] - Whether the custom field has invalid values.
|
|
640
644
|
* @property {Object[]} [invalid_value_errors] - Array denoting if there's a
|
|
641
645
|
* validation failure on a custom field inside a custom object.
|
|
642
|
-
* @property {string} [created_by] - Details of the owner of custom field creator.
|
|
643
646
|
* @property {boolean} [is_deleted] - Whether the custom field definition is deleted.
|
|
644
647
|
* @property {string} [created_at] - Timestamp which represent the time when
|
|
645
648
|
* data was created.
|
|
@@ -652,6 +655,25 @@ const Joi = require("joi");
|
|
|
652
655
|
* @property {CustomFieldSchema[]} [items] - List of custom fields against a resource.
|
|
653
656
|
*/
|
|
654
657
|
|
|
658
|
+
/**
|
|
659
|
+
* @typedef CustomObjectListItemSchema
|
|
660
|
+
* @property {string} [_id] - Unique system generated if for a custom object
|
|
661
|
+
* @property {string} [definition_id] - Unique system generated id for a custom
|
|
662
|
+
* object definition
|
|
663
|
+
* @property {string} [status] - Flag to denote whether custom object is active or not
|
|
664
|
+
* @property {string} [updated_at] - Updation time of custom object entry
|
|
665
|
+
* @property {string} [display_name] - A custom field inside custom object used
|
|
666
|
+
* to display the entry of custom object in listing
|
|
667
|
+
* @property {CustomObjectListItemDefinationSchema} [definition]
|
|
668
|
+
* @property {number} [references]
|
|
669
|
+
*/
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* @typedef CustomObjectsSchema
|
|
673
|
+
* @property {CustomObjectListItemSchema[]} [items]
|
|
674
|
+
* @property {Page} [page]
|
|
675
|
+
*/
|
|
676
|
+
|
|
655
677
|
/**
|
|
656
678
|
* @typedef ActionPage
|
|
657
679
|
* @property {Object} [params] - Parameters that should be considered in path.
|
|
@@ -707,7 +729,8 @@ const Joi = require("joi");
|
|
|
707
729
|
* | "register"
|
|
708
730
|
* | "shipping-policy"
|
|
709
731
|
* | "return-policy"
|
|
710
|
-
* | "order-status"
|
|
732
|
+
* | "order-status"
|
|
733
|
+
* | "locate-us"} PageType
|
|
711
734
|
*/
|
|
712
735
|
|
|
713
736
|
class ContentApplicationModel {
|
|
@@ -741,6 +764,14 @@ class ContentApplicationModel {
|
|
|
741
764
|
});
|
|
742
765
|
}
|
|
743
766
|
|
|
767
|
+
/** @returns {ValidationError} */
|
|
768
|
+
static ValidationError() {
|
|
769
|
+
return Joi.object({
|
|
770
|
+
message: Joi.string().allow("").required(),
|
|
771
|
+
field: Joi.string().allow("").required(),
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
|
|
744
775
|
/** @returns {SeoSchema} */
|
|
745
776
|
static SeoSchema() {
|
|
746
777
|
return Joi.object({
|
|
@@ -836,8 +867,8 @@ class ContentApplicationModel {
|
|
|
836
867
|
});
|
|
837
868
|
}
|
|
838
869
|
|
|
839
|
-
/** @returns {
|
|
840
|
-
static
|
|
870
|
+
/** @returns {BlogGetDetails} */
|
|
871
|
+
static BlogGetDetails() {
|
|
841
872
|
return Joi.object({
|
|
842
873
|
items: Joi.array().items(ContentApplicationModel.BlogSchema()),
|
|
843
874
|
page: ContentApplicationModel.Page(),
|
|
@@ -882,7 +913,7 @@ class ContentApplicationModel {
|
|
|
882
913
|
static BlogSchema() {
|
|
883
914
|
return Joi.object({
|
|
884
915
|
_id: Joi.string().allow(""),
|
|
885
|
-
_custom_json: Joi.any(),
|
|
916
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
886
917
|
application: Joi.string().allow(""),
|
|
887
918
|
archived: Joi.boolean(),
|
|
888
919
|
author: ContentApplicationModel.Author(),
|
|
@@ -1081,7 +1112,7 @@ class ContentApplicationModel {
|
|
|
1081
1112
|
info: Joi.string().allow(""),
|
|
1082
1113
|
request_id: Joi.string().allow(""),
|
|
1083
1114
|
stack_trace: Joi.string().allow(""),
|
|
1084
|
-
meta: Joi.any(),
|
|
1115
|
+
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
1085
1116
|
});
|
|
1086
1117
|
}
|
|
1087
1118
|
|
|
@@ -1103,7 +1134,7 @@ class ContentApplicationModel {
|
|
|
1103
1134
|
slug: Joi.string().allow(""),
|
|
1104
1135
|
application: Joi.string().allow(""),
|
|
1105
1136
|
icon_url: Joi.string().allow(""),
|
|
1106
|
-
_custom_json: Joi.any(),
|
|
1137
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1107
1138
|
});
|
|
1108
1139
|
}
|
|
1109
1140
|
|
|
@@ -1129,7 +1160,7 @@ class ContentApplicationModel {
|
|
|
1129
1160
|
slug: Joi.string().allow(""),
|
|
1130
1161
|
application: Joi.string().allow(""),
|
|
1131
1162
|
icon_url: Joi.string().allow(""),
|
|
1132
|
-
_custom_json: Joi.any(),
|
|
1163
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1133
1164
|
});
|
|
1134
1165
|
}
|
|
1135
1166
|
|
|
@@ -1190,12 +1221,12 @@ class ContentApplicationModel {
|
|
|
1190
1221
|
_id: Joi.string().allow(""),
|
|
1191
1222
|
application: Joi.string().allow(""),
|
|
1192
1223
|
archived: Joi.boolean(),
|
|
1193
|
-
_custom_json: Joi.any(),
|
|
1224
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1194
1225
|
});
|
|
1195
1226
|
}
|
|
1196
1227
|
|
|
1197
|
-
/** @returns {
|
|
1198
|
-
static
|
|
1228
|
+
/** @returns {NavigationGetDetails} */
|
|
1229
|
+
static NavigationGetDetails() {
|
|
1199
1230
|
return Joi.object({
|
|
1200
1231
|
items: Joi.array().items(ContentApplicationModel.NavigationSchema()),
|
|
1201
1232
|
page: ContentApplicationModel.Page(),
|
|
@@ -1229,8 +1260,8 @@ class ContentApplicationModel {
|
|
|
1229
1260
|
});
|
|
1230
1261
|
}
|
|
1231
1262
|
|
|
1232
|
-
/** @returns {
|
|
1233
|
-
static
|
|
1263
|
+
/** @returns {PageGetDetails} */
|
|
1264
|
+
static PageGetDetails() {
|
|
1234
1265
|
return Joi.object({
|
|
1235
1266
|
items: Joi.array().items(ContentApplicationModel.PageSchema()),
|
|
1236
1267
|
page: ContentApplicationModel.Page(),
|
|
@@ -1251,7 +1282,7 @@ class ContentApplicationModel {
|
|
|
1251
1282
|
feature_image: ContentApplicationModel.Asset(),
|
|
1252
1283
|
page_meta: Joi.array().items(Joi.any()),
|
|
1253
1284
|
_schedule: ContentApplicationModel.ScheduleSchema(),
|
|
1254
|
-
_custom_json: Joi.any(),
|
|
1285
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1255
1286
|
orientation: Joi.string().allow(""),
|
|
1256
1287
|
platform: Joi.string().allow(""),
|
|
1257
1288
|
published: Joi.boolean(),
|
|
@@ -1260,7 +1291,7 @@ class ContentApplicationModel {
|
|
|
1260
1291
|
title: Joi.string().allow(""),
|
|
1261
1292
|
type: Joi.string().allow(""),
|
|
1262
1293
|
seo: ContentApplicationModel.SEO(),
|
|
1263
|
-
visibility: Joi.any(),
|
|
1294
|
+
visibility: Joi.object().pattern(/\S/, Joi.any()),
|
|
1264
1295
|
archived: Joi.boolean(),
|
|
1265
1296
|
});
|
|
1266
1297
|
}
|
|
@@ -1272,8 +1303,8 @@ class ContentApplicationModel {
|
|
|
1272
1303
|
});
|
|
1273
1304
|
}
|
|
1274
1305
|
|
|
1275
|
-
/** @returns {
|
|
1276
|
-
static
|
|
1306
|
+
/** @returns {SlideshowGetDetails} */
|
|
1307
|
+
static SlideshowGetDetails() {
|
|
1277
1308
|
return Joi.object({
|
|
1278
1309
|
items: Joi.array().items(ContentApplicationModel.SlideshowSchema()),
|
|
1279
1310
|
page: ContentApplicationModel.Page(),
|
|
@@ -1292,7 +1323,7 @@ class ContentApplicationModel {
|
|
|
1292
1323
|
media: Joi.array().items(ContentApplicationModel.SlideshowMedia()),
|
|
1293
1324
|
active: Joi.boolean(),
|
|
1294
1325
|
archived: Joi.boolean(),
|
|
1295
|
-
_custom_json: Joi.any(),
|
|
1326
|
+
_custom_json: Joi.object().pattern(/\S/, Joi.any()),
|
|
1296
1327
|
});
|
|
1297
1328
|
}
|
|
1298
1329
|
|
|
@@ -1368,7 +1399,7 @@ class ContentApplicationModel {
|
|
|
1368
1399
|
sub_type: Joi.string().allow(""),
|
|
1369
1400
|
_id: Joi.string().allow(""),
|
|
1370
1401
|
position: Joi.string().allow(""),
|
|
1371
|
-
attributes: Joi.any(),
|
|
1402
|
+
attributes: Joi.object().pattern(/\S/, Joi.any()),
|
|
1372
1403
|
content: Joi.string().allow(""),
|
|
1373
1404
|
pages: Joi.array().items(Joi.any()),
|
|
1374
1405
|
__source: ContentApplicationModel.TagSourceSchema(),
|
|
@@ -1403,7 +1434,7 @@ class ContentApplicationModel {
|
|
|
1403
1434
|
static CustomObjectFieldSchema() {
|
|
1404
1435
|
return Joi.object({
|
|
1405
1436
|
_id: Joi.string().allow(""),
|
|
1406
|
-
|
|
1437
|
+
slug: Joi.string().allow(""),
|
|
1407
1438
|
value: Joi.array().items(
|
|
1408
1439
|
ContentApplicationModel.CustomObjectFieldValue()
|
|
1409
1440
|
),
|
|
@@ -1415,7 +1446,7 @@ class ContentApplicationModel {
|
|
|
1415
1446
|
/** @returns {CustomObjectByIdSchema} */
|
|
1416
1447
|
static CustomObjectByIdSchema() {
|
|
1417
1448
|
return Joi.object({
|
|
1418
|
-
|
|
1449
|
+
id: Joi.string().allow(""),
|
|
1419
1450
|
status: Joi.string().allow(""),
|
|
1420
1451
|
display_name: Joi.string().allow(""),
|
|
1421
1452
|
definition: ContentApplicationModel.CustomObjectListItemDefinationSchema(),
|
|
@@ -1438,9 +1469,8 @@ class ContentApplicationModel {
|
|
|
1438
1469
|
return Joi.object({
|
|
1439
1470
|
_id: Joi.string().allow(""),
|
|
1440
1471
|
namespace: Joi.string().allow(""),
|
|
1441
|
-
|
|
1472
|
+
slug: Joi.string().allow(""),
|
|
1442
1473
|
resource: Joi.string().allow(""),
|
|
1443
|
-
creator: Joi.string().allow(""),
|
|
1444
1474
|
value: Joi.array().items(ContentApplicationModel.CustomFieldValue()),
|
|
1445
1475
|
resource_id: Joi.string().allow(""),
|
|
1446
1476
|
type: Joi.string().allow(""),
|
|
@@ -1450,7 +1480,6 @@ class ContentApplicationModel {
|
|
|
1450
1480
|
definition_id: Joi.string().allow(""),
|
|
1451
1481
|
has_invalid_values: Joi.boolean(),
|
|
1452
1482
|
invalid_value_errors: Joi.array().items(Joi.any()),
|
|
1453
|
-
created_by: Joi.string().allow(""),
|
|
1454
1483
|
is_deleted: Joi.boolean(),
|
|
1455
1484
|
created_at: Joi.string().allow(""),
|
|
1456
1485
|
updated_at: Joi.string().allow(""),
|
|
@@ -1464,6 +1493,29 @@ class ContentApplicationModel {
|
|
|
1464
1493
|
});
|
|
1465
1494
|
}
|
|
1466
1495
|
|
|
1496
|
+
/** @returns {CustomObjectListItemSchema} */
|
|
1497
|
+
static CustomObjectListItemSchema() {
|
|
1498
|
+
return Joi.object({
|
|
1499
|
+
_id: Joi.string().allow(""),
|
|
1500
|
+
definition_id: Joi.string().allow(""),
|
|
1501
|
+
status: Joi.string().allow(""),
|
|
1502
|
+
updated_at: Joi.string().allow(""),
|
|
1503
|
+
display_name: Joi.string().allow(""),
|
|
1504
|
+
definition: ContentApplicationModel.CustomObjectListItemDefinationSchema(),
|
|
1505
|
+
references: Joi.number(),
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/** @returns {CustomObjectsSchema} */
|
|
1510
|
+
static CustomObjectsSchema() {
|
|
1511
|
+
return Joi.object({
|
|
1512
|
+
items: Joi.array().items(
|
|
1513
|
+
ContentApplicationModel.CustomObjectListItemSchema()
|
|
1514
|
+
),
|
|
1515
|
+
page: ContentApplicationModel.Page(),
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1467
1519
|
/** @returns {ActionPage} */
|
|
1468
1520
|
static ActionPage() {
|
|
1469
1521
|
return Joi.object({
|
|
@@ -1579,7 +1631,9 @@ class ContentApplicationModel {
|
|
|
1579
1631
|
|
|
1580
1632
|
"return-policy",
|
|
1581
1633
|
|
|
1582
|
-
"order-status"
|
|
1634
|
+
"order-status",
|
|
1635
|
+
|
|
1636
|
+
"locate-us"
|
|
1583
1637
|
);
|
|
1584
1638
|
}
|
|
1585
1639
|
}
|
|
@@ -6,6 +6,7 @@ export = ContentApplicationValidator;
|
|
|
6
6
|
* a blog. You can get slug value from the endpoint
|
|
7
7
|
* /service/application/content/v1.0/blogs/.
|
|
8
8
|
* @property {string} [rootId] - ID given to the HTML element.
|
|
9
|
+
* @property {boolean} [preview] - Boolean value to get the preview for the blogs.
|
|
9
10
|
*/
|
|
10
11
|
/**
|
|
11
12
|
* @typedef GetBlogsParam
|
|
@@ -16,14 +17,16 @@ export = ContentApplicationValidator;
|
|
|
16
17
|
* @property {string} [search] - Blogs retrieve based on the title.
|
|
17
18
|
*/
|
|
18
19
|
/**
|
|
19
|
-
* @typedef
|
|
20
|
+
* @typedef GetCustomFieldsByResourceIdParam
|
|
20
21
|
* @property {string} resource - This is the name of resource for which you want
|
|
21
22
|
* to fetch custom fields eg. product, collection, customer etc.
|
|
22
|
-
* @property {string}
|
|
23
|
+
* @property {string} resourceSlug - This is the resource id for which custom
|
|
24
|
+
* fields created
|
|
23
25
|
*/
|
|
24
26
|
/**
|
|
25
|
-
* @typedef
|
|
26
|
-
* @property {string}
|
|
27
|
+
* @typedef GetCustomObjectBySlugParam
|
|
28
|
+
* @property {string} definitionSlug
|
|
29
|
+
* @property {string} slug
|
|
27
30
|
*/
|
|
28
31
|
/** @typedef GetDataLoadersParam */
|
|
29
32
|
/**
|
|
@@ -95,10 +98,10 @@ declare class ContentApplicationValidator {
|
|
|
95
98
|
static getBlog(): GetBlogParam;
|
|
96
99
|
/** @returns {GetBlogsParam} */
|
|
97
100
|
static getBlogs(): GetBlogsParam;
|
|
98
|
-
/** @returns {
|
|
99
|
-
static
|
|
100
|
-
/** @returns {
|
|
101
|
-
static
|
|
101
|
+
/** @returns {GetCustomFieldsByResourceIdParam} */
|
|
102
|
+
static getCustomFieldsByResourceId(): GetCustomFieldsByResourceIdParam;
|
|
103
|
+
/** @returns {GetCustomObjectBySlugParam} */
|
|
104
|
+
static getCustomObjectBySlug(): GetCustomObjectBySlugParam;
|
|
102
105
|
/** @returns {GetDataLoadersParam} */
|
|
103
106
|
static getDataLoaders(): any;
|
|
104
107
|
/** @returns {GetFaqBySlugParam} */
|
|
@@ -135,7 +138,7 @@ declare class ContentApplicationValidator {
|
|
|
135
138
|
static getTags(): any;
|
|
136
139
|
}
|
|
137
140
|
declare namespace ContentApplicationValidator {
|
|
138
|
-
export { GetAnnouncementsParam, GetBlogParam, GetBlogsParam,
|
|
141
|
+
export { GetAnnouncementsParam, GetBlogParam, GetBlogsParam, GetCustomFieldsByResourceIdParam, GetCustomObjectBySlugParam, GetDataLoadersParam, GetFaqBySlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugParam, GetFaqsParam, GetFaqsByCategorySlugParam, GetLandingPageParam, GetLegalInformationParam, GetNavigationsParam, GetPageParam, GetPagesParam, GetSEOConfigurationParam, GetSEOMarkupSchemasParam, GetSlideshowParam, GetSlideshowsParam, GetSupportInformationParam, GetTagsParam };
|
|
139
142
|
}
|
|
140
143
|
type GetBlogParam = {
|
|
141
144
|
/**
|
|
@@ -148,6 +151,10 @@ type GetBlogParam = {
|
|
|
148
151
|
* - ID given to the HTML element.
|
|
149
152
|
*/
|
|
150
153
|
rootId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* - Boolean value to get the preview for the blogs.
|
|
156
|
+
*/
|
|
157
|
+
preview?: boolean;
|
|
151
158
|
};
|
|
152
159
|
type GetBlogsParam = {
|
|
153
160
|
/**
|
|
@@ -168,22 +175,21 @@ type GetBlogsParam = {
|
|
|
168
175
|
*/
|
|
169
176
|
search?: string;
|
|
170
177
|
};
|
|
171
|
-
type
|
|
178
|
+
type GetCustomFieldsByResourceIdParam = {
|
|
172
179
|
/**
|
|
173
180
|
* - This is the name of resource for which you want
|
|
174
181
|
* to fetch custom fields eg. product, collection, customer etc.
|
|
175
182
|
*/
|
|
176
183
|
resource: string;
|
|
177
184
|
/**
|
|
178
|
-
* - This is the resource id for which custom
|
|
185
|
+
* - This is the resource id for which custom
|
|
186
|
+
* fields created
|
|
179
187
|
*/
|
|
180
|
-
|
|
188
|
+
resourceSlug: string;
|
|
181
189
|
};
|
|
182
|
-
type
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*/
|
|
186
|
-
metaobjectId: string;
|
|
190
|
+
type GetCustomObjectBySlugParam = {
|
|
191
|
+
definitionSlug: string;
|
|
192
|
+
slug: string;
|
|
187
193
|
};
|
|
188
194
|
type GetFaqBySlugParam = {
|
|
189
195
|
/**
|
|
@@ -10,6 +10,7 @@ const ContentApplicationModel = require("./ContentApplicationModel");
|
|
|
10
10
|
* a blog. You can get slug value from the endpoint
|
|
11
11
|
* /service/application/content/v1.0/blogs/.
|
|
12
12
|
* @property {string} [rootId] - ID given to the HTML element.
|
|
13
|
+
* @property {boolean} [preview] - Boolean value to get the preview for the blogs.
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -22,15 +23,17 @@ const ContentApplicationModel = require("./ContentApplicationModel");
|
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
|
-
* @typedef
|
|
26
|
+
* @typedef GetCustomFieldsByResourceIdParam
|
|
26
27
|
* @property {string} resource - This is the name of resource for which you want
|
|
27
28
|
* to fetch custom fields eg. product, collection, customer etc.
|
|
28
|
-
* @property {string}
|
|
29
|
+
* @property {string} resourceSlug - This is the resource id for which custom
|
|
30
|
+
* fields created
|
|
29
31
|
*/
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
|
-
* @typedef
|
|
33
|
-
* @property {string}
|
|
34
|
+
* @typedef GetCustomObjectBySlugParam
|
|
35
|
+
* @property {string} definitionSlug
|
|
36
|
+
* @property {string} slug
|
|
34
37
|
*/
|
|
35
38
|
|
|
36
39
|
/** @typedef GetDataLoadersParam */
|
|
@@ -124,6 +127,7 @@ class ContentApplicationValidator {
|
|
|
124
127
|
return Joi.object({
|
|
125
128
|
slug: Joi.string().allow("").required(),
|
|
126
129
|
rootId: Joi.string().allow(""),
|
|
130
|
+
preview: Joi.boolean(),
|
|
127
131
|
}).required();
|
|
128
132
|
}
|
|
129
133
|
|
|
@@ -137,18 +141,19 @@ class ContentApplicationValidator {
|
|
|
137
141
|
});
|
|
138
142
|
}
|
|
139
143
|
|
|
140
|
-
/** @returns {
|
|
141
|
-
static
|
|
144
|
+
/** @returns {GetCustomFieldsByResourceIdParam} */
|
|
145
|
+
static getCustomFieldsByResourceId() {
|
|
142
146
|
return Joi.object({
|
|
143
147
|
resource: Joi.string().allow("").required(),
|
|
144
|
-
|
|
148
|
+
resourceSlug: Joi.string().allow("").required(),
|
|
145
149
|
}).required();
|
|
146
150
|
}
|
|
147
151
|
|
|
148
|
-
/** @returns {
|
|
149
|
-
static
|
|
152
|
+
/** @returns {GetCustomObjectBySlugParam} */
|
|
153
|
+
static getCustomObjectBySlug() {
|
|
150
154
|
return Joi.object({
|
|
151
|
-
|
|
155
|
+
definitionSlug: Joi.string().allow("").required(),
|
|
156
|
+
slug: Joi.string().allow("").required(),
|
|
152
157
|
}).required();
|
|
153
158
|
}
|
|
154
159
|
|
|
@@ -13,32 +13,33 @@ declare class FileStorage {
|
|
|
13
13
|
* @param {FileStorageApplicationValidator.CompleteUploadParam} arg - Arg object.
|
|
14
14
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
15
15
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
16
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
16
|
+
* @returns {Promise<FileStorageApplicationModel.FileUploadComplete>} -
|
|
17
|
+
* Success response
|
|
17
18
|
* @name completeUpload
|
|
18
|
-
* @summary:
|
|
19
|
+
* @summary: Finalizes upload process.
|
|
19
20
|
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
|
|
20
21
|
*/
|
|
21
|
-
completeUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.
|
|
22
|
+
completeUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.CompleteUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.FileUploadComplete>;
|
|
22
23
|
/**
|
|
23
24
|
* @param {FileStorageApplicationValidator.SignUrlsParam} arg - Arg object.
|
|
24
25
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
25
26
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
26
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
27
|
+
* @returns {Promise<FileStorageApplicationModel.SignUrlResult>} - Success response
|
|
27
28
|
* @name signUrls
|
|
28
|
-
* @summary:
|
|
29
|
+
* @summary: Signs file URLs.
|
|
29
30
|
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
|
|
30
31
|
*/
|
|
31
|
-
signUrls({ body, requestHeaders }?: FileStorageApplicationValidator.SignUrlsParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.
|
|
32
|
+
signUrls({ body, requestHeaders }?: FileStorageApplicationValidator.SignUrlsParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.SignUrlResult>;
|
|
32
33
|
/**
|
|
33
34
|
* @param {FileStorageApplicationValidator.StartUploadParam} arg - Arg object.
|
|
34
35
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
35
36
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
36
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
37
|
+
* @returns {Promise<FileStorageApplicationModel.FileUpload>} - Success response
|
|
37
38
|
* @name startUpload
|
|
38
39
|
* @summary: Initiates file upload
|
|
39
40
|
* @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
|
|
40
41
|
*/
|
|
41
|
-
startUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.
|
|
42
|
+
startUpload({ namespace, body, requestHeaders }?: FileStorageApplicationValidator.StartUploadParam, { responseHeaders }?: object): Promise<FileStorageApplicationModel.FileUpload>;
|
|
42
43
|
/**
|
|
43
44
|
* @param data
|
|
44
45
|
* @param {string} file_name
|
|
@@ -16,10 +16,10 @@ class FileStorage {
|
|
|
16
16
|
this._conf = _conf;
|
|
17
17
|
this._relativeUrls = {
|
|
18
18
|
completeUpload:
|
|
19
|
-
"/service/application/assets/
|
|
19
|
+
"/service/application/assets/v2.0/namespaces/{namespace}/upload/complete",
|
|
20
20
|
signUrls: "/service/application/assets/v1.0/sign-urls",
|
|
21
21
|
startUpload:
|
|
22
|
-
"/service/application/assets/
|
|
22
|
+
"/service/application/assets/v2.0/namespaces/{namespace}/upload/start",
|
|
23
23
|
};
|
|
24
24
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
25
25
|
(urls, [method, relativeUrl]) => {
|
|
@@ -41,9 +41,10 @@ class FileStorage {
|
|
|
41
41
|
* @param {FileStorageApplicationValidator.CompleteUploadParam} arg - Arg object.
|
|
42
42
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
43
43
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
44
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
44
|
+
* @returns {Promise<FileStorageApplicationModel.FileUploadComplete>} -
|
|
45
|
+
* Success response
|
|
45
46
|
* @name completeUpload
|
|
46
|
-
* @summary:
|
|
47
|
+
* @summary: Finalizes upload process.
|
|
47
48
|
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
|
|
48
49
|
*/
|
|
49
50
|
async completeUpload(
|
|
@@ -96,10 +97,10 @@ class FileStorage {
|
|
|
96
97
|
|
|
97
98
|
const {
|
|
98
99
|
error: res_error,
|
|
99
|
-
} = FileStorageApplicationModel.
|
|
100
|
-
|
|
101
|
-
allowUnknown: true
|
|
102
|
-
|
|
100
|
+
} = FileStorageApplicationModel.FileUploadComplete().validate(
|
|
101
|
+
responseData,
|
|
102
|
+
{ abortEarly: false, allowUnknown: true }
|
|
103
|
+
);
|
|
103
104
|
|
|
104
105
|
if (res_error) {
|
|
105
106
|
if (this._conf.options.strictResponseCheck === true) {
|
|
@@ -119,9 +120,9 @@ class FileStorage {
|
|
|
119
120
|
* @param {FileStorageApplicationValidator.SignUrlsParam} arg - Arg object.
|
|
120
121
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
121
122
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
122
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
123
|
+
* @returns {Promise<FileStorageApplicationModel.SignUrlResult>} - Success response
|
|
123
124
|
* @name signUrls
|
|
124
|
-
* @summary:
|
|
125
|
+
* @summary: Signs file URLs.
|
|
125
126
|
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
|
|
126
127
|
*/
|
|
127
128
|
async signUrls(
|
|
@@ -174,7 +175,7 @@ class FileStorage {
|
|
|
174
175
|
|
|
175
176
|
const {
|
|
176
177
|
error: res_error,
|
|
177
|
-
} = FileStorageApplicationModel.
|
|
178
|
+
} = FileStorageApplicationModel.SignUrlResult().validate(responseData, {
|
|
178
179
|
abortEarly: false,
|
|
179
180
|
allowUnknown: true,
|
|
180
181
|
});
|
|
@@ -197,7 +198,7 @@ class FileStorage {
|
|
|
197
198
|
* @param {FileStorageApplicationValidator.StartUploadParam} arg - Arg object.
|
|
198
199
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
199
200
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
200
|
-
* @returns {Promise<FileStorageApplicationModel.
|
|
201
|
+
* @returns {Promise<FileStorageApplicationModel.FileUpload>} - Success response
|
|
201
202
|
* @name startUpload
|
|
202
203
|
* @summary: Initiates file upload
|
|
203
204
|
* @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
|
|
@@ -252,7 +253,7 @@ class FileStorage {
|
|
|
252
253
|
|
|
253
254
|
const {
|
|
254
255
|
error: res_error,
|
|
255
|
-
} = FileStorageApplicationModel.
|
|
256
|
+
} = FileStorageApplicationModel.FileUpload().validate(responseData, {
|
|
256
257
|
abortEarly: false,
|
|
257
258
|
allowUnknown: true,
|
|
258
259
|
});
|