@gofynd/fdk-client-javascript 1.4.2-beta.1 → 1.4.2-beta.10
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 +3 -2
- package/sdk/application/ApplicationClient.js +20 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +3 -5
- package/sdk/application/Cart/CartApplicationModel.d.ts +1634 -1742
- package/sdk/application/Cart/CartApplicationModel.js +1388 -1464
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -4
- package/sdk/application/Cart/CartApplicationValidator.js +0 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -3
- package/sdk/application/Catalog/CatalogApplicationClient.js +20 -7
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1613 -1613
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +14 -0
- package/sdk/application/Catalog/CatalogApplicationValidator.js +6 -0
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1492 -1626
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1038 -1180
- package/sdk/application/Content/ContentApplicationClient.d.ts +0 -36
- package/sdk/application/Content/ContentApplicationClient.js +0 -246
- package/sdk/application/Content/ContentApplicationModel.d.ts +546 -753
- package/sdk/application/Content/ContentApplicationModel.js +565 -817
- package/sdk/application/Content/ContentApplicationValidator.d.ts +1 -40
- package/sdk/application/Content/ContentApplicationValidator.js +0 -41
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +0 -67
- package/sdk/application/Logistic/LogisticApplicationClient.js +0 -547
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +257 -712
- package/sdk/application/Logistic/LogisticApplicationModel.js +267 -755
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +1 -211
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -131
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +8 -32
- package/sdk/application/Order/OrderApplicationModel.d.ts +845 -853
- package/sdk/application/Order/OrderApplicationModel.js +816 -824
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -20
- package/sdk/application/Order/OrderApplicationValidator.js +0 -8
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -46
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -341
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +1892 -2199
- package/sdk/application/Payment/PaymentApplicationModel.js +1235 -1506
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +14 -59
- package/sdk/application/Payment/PaymentApplicationValidator.js +10 -64
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1396 -1429
- package/sdk/application/PosCart/PosCartApplicationModel.js +1233 -1257
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -7
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +783 -969
- package/sdk/application/Theme/ThemeApplicationModel.js +571 -867
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -10
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -4
- package/sdk/application/User/UserApplicationClient.d.ts +0 -33
- package/sdk/application/User/UserApplicationClient.js +0 -239
- package/sdk/application/User/UserApplicationModel.d.ts +753 -768
- package/sdk/application/User/UserApplicationModel.js +731 -755
- package/sdk/application/User/UserApplicationValidator.d.ts +1 -34
- package/sdk/application/User/UserApplicationValidator.js +0 -36
- package/sdk/common/Clickstream.d.ts +1 -0
- package/sdk/common/Clickstream.js +254 -0
- package/sdk/common/Utility.js +1 -4
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +72 -60
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +70 -58
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +0 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +0 -80
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1178 -1153
- package/sdk/partner/Theme/ThemePartnerModel.js +830 -974
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +0 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +0 -9
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +1 -11
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -110
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +734 -800
- package/sdk/platform/Billing/BillingPlatformModel.js +732 -810
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +4 -43
- package/sdk/platform/Billing/BillingPlatformValidator.js +2 -29
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +81 -7
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +13 -5
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +12 -4
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3223 -3328
- package/sdk/platform/Cart/CartPlatformModel.js +2875 -2946
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +11 -15
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +21 -52
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +0 -27
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +0 -11
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +15 -27
- package/sdk/platform/Catalog/CatalogPlatformClient.js +93 -189
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +617 -920
- package/sdk/platform/Catalog/CatalogPlatformModel.js +584 -919
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +27 -41
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -31
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +37 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +52 -737
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +3 -133
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -113
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1079 -1228
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1090 -1262
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +4 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +629 -658
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +641 -675
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +0 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +0 -6
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2992 -3231
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2092 -2303
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -391
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1074 -3656
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -351
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -410
- package/sdk/platform/Content/ContentPlatformModel.d.ts +972 -2071
- package/sdk/platform/Content/ContentPlatformModel.js +1039 -2355
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +174 -259
- package/sdk/platform/Discount/DiscountPlatformModel.js +163 -257
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +6 -16
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +8 -117
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -55
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -39
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +821 -892
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +833 -901
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -33
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -240
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +910 -1056
- package/sdk/platform/Finance/FinancePlatformModel.js +884 -1070
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +1 -38
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -38
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +28 -38
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +56 -137
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +29 -41
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +21 -33
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +601 -610
- package/sdk/platform/Lead/LeadPlatformModel.js +457 -471
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +1 -93
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -143
- package/sdk/platform/Order/OrderPlatformClient.js +160 -1190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4451 -5275
- package/sdk/platform/Order/OrderPlatformModel.js +4039 -4994
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +21 -257
- package/sdk/platform/Order/OrderPlatformValidator.js +15 -216
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -119
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +40 -750
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +7 -143
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +6 -133
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2067 -2929
- package/sdk/platform/Payment/PaymentPlatformModel.js +1427 -2090
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +2 -4
- package/sdk/platform/PlatformClient.js +4 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +66 -142
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +147 -645
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +63 -131
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +47 -126
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +105 -217
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +349 -1138
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +989 -1588
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +977 -1695
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +133 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +102 -266
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +1 -11
- package/sdk/platform/Theme/ThemePlatformClient.js +3 -87
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +765 -1133
- package/sdk/platform/Theme/ThemePlatformModel.js +561 -1009
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +4 -28
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -21
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +1 -116
- package/sdk/platform/User/UserPlatformApplicationClient.js +86 -932
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -224
- package/sdk/platform/User/UserPlatformApplicationValidator.js +5 -173
- package/sdk/platform/User/UserPlatformModel.d.ts +428 -765
- package/sdk/platform/User/UserPlatformModel.js +428 -679
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +37 -45
- package/sdk/platform/Webhook/WebhookPlatformClient.js +57 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +403 -448
- package/sdk/platform/Webhook/WebhookPlatformModel.js +309 -369
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/PublicClient.d.ts +0 -4
- package/sdk/public/PublicClient.js +0 -8
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +0 -33
- package/sdk/public/Webhook/WebhookPublicClient.js +0 -242
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +15 -161
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -189
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +1 -23
- package/sdk/public/Webhook/WebhookPublicValidator.js +0 -31
- package/sdk/public/index.d.ts +0 -2
- package/sdk/public/index.js +0 -4
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -125
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -785
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +0 -1127
- package/sdk/partner/Lead/LeadPartnerModel.js +0 -896
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -12
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -67
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +0 -155
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +0 -1195
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +0 -372
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +0 -442
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -16
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +0 -123
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +0 -99
- package/sdk/partner/Webhook/WebhookPartnerClient.js +0 -753
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +0 -566
- package/sdk/partner/Webhook/WebhookPartnerModel.js +0 -583
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -12
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +0 -74
- package/sdk/platform/Content/ContentPlatformClient.d.ts +0 -277
- package/sdk/platform/Content/ContentPlatformClient.js +0 -2011
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +0 -247
- package/sdk/platform/Content/ContentPlatformValidator.js +0 -319
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -23
- package/sdk/public/Billing/BillingPublicClient.js +0 -116
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -92
- package/sdk/public/Billing/BillingPublicModel.js +0 -96
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -18
- package/sdk/public/Billing/BillingPublicValidator.js +0 -19
- package/sdk/public/Content/ContentPublicClient.d.ts +0 -22
- package/sdk/public/Content/ContentPublicClient.js +0 -114
- package/sdk/public/Content/ContentPublicModel.d.ts +0 -53
- package/sdk/public/Content/ContentPublicModel.js +0 -60
- package/sdk/public/Content/ContentPublicValidator.d.ts +0 -18
- package/sdk/public/Content/ContentPublicValidator.js +0 -19
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @typedef CampaignShortLink
|
|
10
|
-
* @property {string} [medium]
|
|
11
|
-
* @property {string} [source]
|
|
4
|
+
* @typedef ClickStatsResponse
|
|
5
|
+
* @property {ClickStatsItem[]} click_stats - An array of click statistics for
|
|
6
|
+
* the short link.
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
/**
|
|
@@ -18,120 +13,119 @@ const Joi = require("joi");
|
|
|
18
13
|
*/
|
|
19
14
|
|
|
20
15
|
/**
|
|
21
|
-
* @typedef
|
|
22
|
-
* @property {
|
|
23
|
-
*
|
|
16
|
+
* @typedef RedirectDevice
|
|
17
|
+
* @property {string} [link]
|
|
18
|
+
* @property {string} [type]
|
|
24
19
|
*/
|
|
25
20
|
|
|
26
21
|
/**
|
|
27
|
-
* @typedef
|
|
28
|
-
* @property {string} [
|
|
22
|
+
* @typedef WebRedirect
|
|
23
|
+
* @property {string} [link]
|
|
24
|
+
* @property {string} [type]
|
|
29
25
|
*/
|
|
30
26
|
|
|
31
27
|
/**
|
|
32
|
-
* @typedef
|
|
33
|
-
* @property {
|
|
34
|
-
* @property {
|
|
35
|
-
* @property {
|
|
36
|
-
* @property {
|
|
37
|
-
* @property {string} [next_id]
|
|
38
|
-
* @property {number} [size]
|
|
39
|
-
* @property {string} type
|
|
28
|
+
* @typedef Redirects
|
|
29
|
+
* @property {RedirectDevice} [ios]
|
|
30
|
+
* @property {RedirectDevice} [android]
|
|
31
|
+
* @property {WebRedirect} [web]
|
|
32
|
+
* @property {boolean} [force_web]
|
|
40
33
|
*/
|
|
41
34
|
|
|
42
35
|
/**
|
|
43
|
-
* @typedef
|
|
44
|
-
* @property {string} [
|
|
45
|
-
* @property {string} [
|
|
36
|
+
* @typedef CampaignShortLink
|
|
37
|
+
* @property {string} [source]
|
|
38
|
+
* @property {string} [medium]
|
|
46
39
|
*/
|
|
47
40
|
|
|
48
41
|
/**
|
|
49
|
-
* @typedef
|
|
50
|
-
* @property {
|
|
51
|
-
* @property {boolean} [force_web]
|
|
52
|
-
* @property {RedirectDevice} [ios]
|
|
53
|
-
* @property {WebRedirect} [web]
|
|
42
|
+
* @typedef Attribution
|
|
43
|
+
* @property {string} [campaign_cookie_expiry]
|
|
54
44
|
*/
|
|
55
45
|
|
|
56
46
|
/**
|
|
57
|
-
* @typedef
|
|
58
|
-
* @property {
|
|
59
|
-
* @property {
|
|
47
|
+
* @typedef SocialMediaTags
|
|
48
|
+
* @property {string} [title]
|
|
49
|
+
* @property {string} [description]
|
|
50
|
+
* @property {string} [image]
|
|
60
51
|
*/
|
|
61
52
|
|
|
62
53
|
/**
|
|
63
54
|
* @typedef ShortLinkReq
|
|
55
|
+
* @property {string} title - Give a name to the link.
|
|
56
|
+
* @property {string} url - The web address to shorten.
|
|
57
|
+
* @property {string} [hash]
|
|
64
58
|
* @property {boolean} [active]
|
|
65
|
-
* @property {Attribution} [attribution]
|
|
66
|
-
* @property {CampaignShortLink} [campaign]
|
|
67
|
-
* @property {number} [count]
|
|
68
|
-
* @property {boolean} [enable_tracking]
|
|
69
59
|
* @property {string} [expire_at]
|
|
70
|
-
* @property {
|
|
60
|
+
* @property {boolean} [enable_tracking]
|
|
71
61
|
* @property {boolean} [personalized] - To create personalized short links.
|
|
62
|
+
* @property {CampaignShortLink} [campaign]
|
|
72
63
|
* @property {Redirects} [redirects]
|
|
64
|
+
* @property {Attribution} [attribution]
|
|
73
65
|
* @property {SocialMediaTags} [social_media_tags]
|
|
74
|
-
* @property {
|
|
75
|
-
|
|
66
|
+
* @property {number} [count]
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @typedef UrlInfo
|
|
71
|
+
* @property {string} [original]
|
|
72
|
+
* @property {string} [short]
|
|
73
|
+
* @property {string} [hash]
|
|
76
74
|
*/
|
|
77
75
|
|
|
78
76
|
/**
|
|
79
77
|
* @typedef ShortLinkRes
|
|
80
|
-
* @property {string} [
|
|
81
|
-
* @property {
|
|
82
|
-
* @property {boolean} [app_redirect]
|
|
83
|
-
* @property {string} [application]
|
|
84
|
-
* @property {Attribution} [attribution]
|
|
85
|
-
* @property {CampaignShortLink} [campaign]
|
|
86
|
-
* @property {number} [count]
|
|
87
|
-
* @property {string} [created_at]
|
|
78
|
+
* @property {string} [title]
|
|
79
|
+
* @property {UrlInfo} [url]
|
|
88
80
|
* @property {string} [created_by]
|
|
81
|
+
* @property {boolean} [app_redirect]
|
|
82
|
+
* @property {string} [fallback]
|
|
83
|
+
* @property {boolean} [active]
|
|
84
|
+
* @property {string} [_id]
|
|
89
85
|
* @property {boolean} [enable_tracking]
|
|
90
86
|
* @property {string} [expire_at]
|
|
91
|
-
* @property {string} [
|
|
87
|
+
* @property {string} [application]
|
|
88
|
+
* @property {string} [user_id]
|
|
89
|
+
* @property {string} [created_at]
|
|
92
90
|
* @property {Object} [meta]
|
|
91
|
+
* @property {string} [updated_at]
|
|
93
92
|
* @property {boolean} [personalized] - To create personalized short links
|
|
93
|
+
* @property {CampaignShortLink} [campaign]
|
|
94
94
|
* @property {Redirects} [redirects]
|
|
95
|
+
* @property {Attribution} [attribution]
|
|
95
96
|
* @property {SocialMediaTags} [social_media_tags]
|
|
96
|
-
* @property {
|
|
97
|
-
* @property {string} [updated_at]
|
|
98
|
-
* @property {UrlInfo} [url]
|
|
99
|
-
* @property {string} [user_id]
|
|
97
|
+
* @property {number} [count]
|
|
100
98
|
*/
|
|
101
99
|
|
|
102
100
|
/**
|
|
103
|
-
* @typedef
|
|
104
|
-
* @property {
|
|
105
|
-
* @property {string} [
|
|
106
|
-
* @property {
|
|
101
|
+
* @typedef Page
|
|
102
|
+
* @property {number} [item_total]
|
|
103
|
+
* @property {string} [next_id]
|
|
104
|
+
* @property {boolean} [has_previous]
|
|
105
|
+
* @property {boolean} [has_next]
|
|
106
|
+
* @property {number} [current]
|
|
107
|
+
* @property {string} type
|
|
108
|
+
* @property {number} [size]
|
|
107
109
|
*/
|
|
108
110
|
|
|
109
111
|
/**
|
|
110
|
-
* @typedef
|
|
111
|
-
* @property {
|
|
112
|
-
* @property {
|
|
113
|
-
* @property {string} [short]
|
|
112
|
+
* @typedef ShortLinkList
|
|
113
|
+
* @property {ShortLinkRes[]} [items]
|
|
114
|
+
* @property {Page} [page]
|
|
114
115
|
*/
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
|
-
* @typedef
|
|
118
|
-
* @property {string} [
|
|
119
|
-
* @property {string} [type]
|
|
118
|
+
* @typedef ErrorRes
|
|
119
|
+
* @property {string} [message]
|
|
120
120
|
*/
|
|
121
121
|
|
|
122
122
|
class SharePlatformModel {
|
|
123
|
-
/** @returns {
|
|
124
|
-
static
|
|
125
|
-
return Joi.object({
|
|
126
|
-
campaign_cookie_expiry: Joi.string().allow(""),
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/** @returns {CampaignShortLink} */
|
|
131
|
-
static CampaignShortLink() {
|
|
123
|
+
/** @returns {ClickStatsResponse} */
|
|
124
|
+
static ClickStatsResponse() {
|
|
132
125
|
return Joi.object({
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
click_stats: Joi.array()
|
|
127
|
+
.items(SharePlatformModel.ClickStatsItem())
|
|
128
|
+
.required(),
|
|
135
129
|
});
|
|
136
130
|
}
|
|
137
131
|
|
|
@@ -143,128 +137,134 @@ class SharePlatformModel {
|
|
|
143
137
|
});
|
|
144
138
|
}
|
|
145
139
|
|
|
146
|
-
/** @returns {
|
|
147
|
-
static
|
|
140
|
+
/** @returns {RedirectDevice} */
|
|
141
|
+
static RedirectDevice() {
|
|
148
142
|
return Joi.object({
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.required(),
|
|
143
|
+
link: Joi.string().allow(""),
|
|
144
|
+
type: Joi.string().allow(""),
|
|
152
145
|
});
|
|
153
146
|
}
|
|
154
147
|
|
|
155
|
-
/** @returns {
|
|
156
|
-
static
|
|
148
|
+
/** @returns {WebRedirect} */
|
|
149
|
+
static WebRedirect() {
|
|
157
150
|
return Joi.object({
|
|
158
|
-
|
|
151
|
+
link: Joi.string().allow(""),
|
|
152
|
+
type: Joi.string().allow(""),
|
|
159
153
|
});
|
|
160
154
|
}
|
|
161
155
|
|
|
162
|
-
/** @returns {
|
|
163
|
-
static
|
|
156
|
+
/** @returns {Redirects} */
|
|
157
|
+
static Redirects() {
|
|
164
158
|
return Joi.object({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
next_id: Joi.string().allow(""),
|
|
170
|
-
size: Joi.number(),
|
|
171
|
-
type: Joi.string().allow("").required(),
|
|
159
|
+
ios: SharePlatformModel.RedirectDevice(),
|
|
160
|
+
android: SharePlatformModel.RedirectDevice(),
|
|
161
|
+
web: SharePlatformModel.WebRedirect(),
|
|
162
|
+
force_web: Joi.boolean(),
|
|
172
163
|
});
|
|
173
164
|
}
|
|
174
165
|
|
|
175
|
-
/** @returns {
|
|
176
|
-
static
|
|
166
|
+
/** @returns {CampaignShortLink} */
|
|
167
|
+
static CampaignShortLink() {
|
|
177
168
|
return Joi.object({
|
|
178
|
-
|
|
179
|
-
|
|
169
|
+
source: Joi.string().allow(""),
|
|
170
|
+
medium: Joi.string().allow(""),
|
|
180
171
|
});
|
|
181
172
|
}
|
|
182
173
|
|
|
183
|
-
/** @returns {
|
|
184
|
-
static
|
|
174
|
+
/** @returns {Attribution} */
|
|
175
|
+
static Attribution() {
|
|
185
176
|
return Joi.object({
|
|
186
|
-
|
|
187
|
-
force_web: Joi.boolean(),
|
|
188
|
-
ios: SharePlatformModel.RedirectDevice(),
|
|
189
|
-
web: SharePlatformModel.WebRedirect(),
|
|
177
|
+
campaign_cookie_expiry: Joi.string().allow(""),
|
|
190
178
|
});
|
|
191
179
|
}
|
|
192
180
|
|
|
193
|
-
/** @returns {
|
|
194
|
-
static
|
|
181
|
+
/** @returns {SocialMediaTags} */
|
|
182
|
+
static SocialMediaTags() {
|
|
195
183
|
return Joi.object({
|
|
196
|
-
|
|
197
|
-
|
|
184
|
+
title: Joi.string().allow(""),
|
|
185
|
+
description: Joi.string().allow(""),
|
|
186
|
+
image: Joi.string().allow(""),
|
|
198
187
|
});
|
|
199
188
|
}
|
|
200
189
|
|
|
201
190
|
/** @returns {ShortLinkReq} */
|
|
202
191
|
static ShortLinkReq() {
|
|
203
192
|
return Joi.object({
|
|
193
|
+
title: Joi.string().allow("").required(),
|
|
194
|
+
url: Joi.string().allow("").required(),
|
|
195
|
+
hash: Joi.string().allow(""),
|
|
204
196
|
active: Joi.boolean(),
|
|
205
|
-
attribution: SharePlatformModel.Attribution(),
|
|
206
|
-
campaign: SharePlatformModel.CampaignShortLink(),
|
|
207
|
-
count: Joi.number(),
|
|
208
|
-
enable_tracking: Joi.boolean(),
|
|
209
197
|
expire_at: Joi.string().allow(""),
|
|
210
|
-
|
|
198
|
+
enable_tracking: Joi.boolean(),
|
|
211
199
|
personalized: Joi.boolean(),
|
|
200
|
+
campaign: SharePlatformModel.CampaignShortLink(),
|
|
212
201
|
redirects: SharePlatformModel.Redirects(),
|
|
202
|
+
attribution: SharePlatformModel.Attribution(),
|
|
213
203
|
social_media_tags: SharePlatformModel.SocialMediaTags(),
|
|
214
|
-
|
|
215
|
-
|
|
204
|
+
count: Joi.number(),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** @returns {UrlInfo} */
|
|
209
|
+
static UrlInfo() {
|
|
210
|
+
return Joi.object({
|
|
211
|
+
original: Joi.string().allow(""),
|
|
212
|
+
short: Joi.string().allow(""),
|
|
213
|
+
hash: Joi.string().allow(""),
|
|
216
214
|
});
|
|
217
215
|
}
|
|
218
216
|
|
|
219
217
|
/** @returns {ShortLinkRes} */
|
|
220
218
|
static ShortLinkRes() {
|
|
221
219
|
return Joi.object({
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
app_redirect: Joi.boolean(),
|
|
225
|
-
application: Joi.string().allow(""),
|
|
226
|
-
attribution: SharePlatformModel.Attribution(),
|
|
227
|
-
campaign: SharePlatformModel.CampaignShortLink(),
|
|
228
|
-
count: Joi.number(),
|
|
229
|
-
created_at: Joi.string().allow(""),
|
|
220
|
+
title: Joi.string().allow(""),
|
|
221
|
+
url: SharePlatformModel.UrlInfo(),
|
|
230
222
|
created_by: Joi.string().allow(""),
|
|
223
|
+
app_redirect: Joi.boolean(),
|
|
224
|
+
fallback: Joi.string().allow(""),
|
|
225
|
+
active: Joi.boolean(),
|
|
226
|
+
_id: Joi.string().allow(""),
|
|
231
227
|
enable_tracking: Joi.boolean(),
|
|
232
228
|
expire_at: Joi.string().allow(""),
|
|
233
|
-
|
|
229
|
+
application: Joi.string().allow(""),
|
|
230
|
+
user_id: Joi.string().allow(""),
|
|
231
|
+
created_at: Joi.string().allow(""),
|
|
234
232
|
meta: Joi.any(),
|
|
233
|
+
updated_at: Joi.string().allow(""),
|
|
235
234
|
personalized: Joi.boolean(),
|
|
235
|
+
campaign: SharePlatformModel.CampaignShortLink(),
|
|
236
236
|
redirects: SharePlatformModel.Redirects(),
|
|
237
|
+
attribution: SharePlatformModel.Attribution(),
|
|
237
238
|
social_media_tags: SharePlatformModel.SocialMediaTags(),
|
|
238
|
-
|
|
239
|
-
updated_at: Joi.string().allow(""),
|
|
240
|
-
url: SharePlatformModel.UrlInfo(),
|
|
241
|
-
user_id: Joi.string().allow(""),
|
|
239
|
+
count: Joi.number(),
|
|
242
240
|
});
|
|
243
241
|
}
|
|
244
242
|
|
|
245
|
-
/** @returns {
|
|
246
|
-
static
|
|
243
|
+
/** @returns {Page} */
|
|
244
|
+
static Page() {
|
|
247
245
|
return Joi.object({
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
246
|
+
item_total: Joi.number(),
|
|
247
|
+
next_id: Joi.string().allow(""),
|
|
248
|
+
has_previous: Joi.boolean(),
|
|
249
|
+
has_next: Joi.boolean(),
|
|
250
|
+
current: Joi.number(),
|
|
251
|
+
type: Joi.string().allow("").required(),
|
|
252
|
+
size: Joi.number(),
|
|
251
253
|
});
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
/** @returns {
|
|
255
|
-
static
|
|
256
|
+
/** @returns {ShortLinkList} */
|
|
257
|
+
static ShortLinkList() {
|
|
256
258
|
return Joi.object({
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
short: Joi.string().allow(""),
|
|
259
|
+
items: Joi.array().items(SharePlatformModel.ShortLinkRes()),
|
|
260
|
+
page: SharePlatformModel.Page(),
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
/** @returns {
|
|
264
|
-
static
|
|
264
|
+
/** @returns {ErrorRes} */
|
|
265
|
+
static ErrorRes() {
|
|
265
266
|
return Joi.object({
|
|
266
|
-
|
|
267
|
-
type: Joi.string().allow(""),
|
|
267
|
+
message: Joi.string().allow(""),
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
}
|
|
@@ -22,16 +22,6 @@ declare class Theme {
|
|
|
22
22
|
* @description: Delete a specific theme for a company by providing the company ID and theme ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deleteCompanyTheme/).
|
|
23
23
|
*/
|
|
24
24
|
deleteCompanyTheme({ themeId, requestHeaders }?: ThemePlatformValidator.DeleteCompanyThemeParam, { responseHeaders }?: object): Promise<ThemePlatformModel.CompanyThemeSchema>;
|
|
25
|
-
/**
|
|
26
|
-
* @param {ThemePlatformValidator.GetCompanyLevelPrivateThemesParam} arg - Arg object
|
|
27
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
28
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
29
|
-
* @returns {Promise<ThemePlatformModel.CompanyPrivateTheme[]>} - Success response
|
|
30
|
-
* @name getCompanyLevelPrivateThemes
|
|
31
|
-
* @summary: Get private themes for a company
|
|
32
|
-
* @description: Retrieve a list of private themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelPrivateThemes/).
|
|
33
|
-
*/
|
|
34
|
-
getCompanyLevelPrivateThemes({ searchText, requestHeaders }?: ThemePlatformValidator.GetCompanyLevelPrivateThemesParam, { responseHeaders }?: object): Promise<ThemePlatformModel.CompanyPrivateTheme[]>;
|
|
35
25
|
/**
|
|
36
26
|
* @param {ThemePlatformValidator.GetCompanyLevelThemesParam} arg - Arg object
|
|
37
27
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -41,7 +31,7 @@ declare class Theme {
|
|
|
41
31
|
* @summary: Get themes for a company
|
|
42
32
|
* @description: Retrieve a list of themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelThemes/).
|
|
43
33
|
*/
|
|
44
|
-
getCompanyLevelThemes({
|
|
34
|
+
getCompanyLevelThemes({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ThemePlatformModel.CompanyThemeSchema[]>;
|
|
45
35
|
}
|
|
46
36
|
import ThemePlatformValidator = require("./ThemePlatformValidator");
|
|
47
37
|
import ThemePlatformModel = require("./ThemePlatformModel");
|
|
@@ -174,85 +174,6 @@ class Theme {
|
|
|
174
174
|
return response;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
/**
|
|
178
|
-
* @param {ThemePlatformValidator.GetCompanyLevelPrivateThemesParam} arg - Arg object
|
|
179
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
180
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
181
|
-
* @returns {Promise<ThemePlatformModel.CompanyPrivateTheme[]>} - Success response
|
|
182
|
-
* @name getCompanyLevelPrivateThemes
|
|
183
|
-
* @summary: Get private themes for a company
|
|
184
|
-
* @description: Retrieve a list of private themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelPrivateThemes/).
|
|
185
|
-
*/
|
|
186
|
-
async getCompanyLevelPrivateThemes(
|
|
187
|
-
{ searchText, requestHeaders } = { requestHeaders: {} },
|
|
188
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
189
|
-
) {
|
|
190
|
-
const {
|
|
191
|
-
error,
|
|
192
|
-
} = ThemePlatformValidator.getCompanyLevelPrivateThemes().validate(
|
|
193
|
-
{
|
|
194
|
-
searchText,
|
|
195
|
-
},
|
|
196
|
-
{ abortEarly: false, allowUnknown: true }
|
|
197
|
-
);
|
|
198
|
-
if (error) {
|
|
199
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Showing warrnings if extra unknown parameters are found
|
|
203
|
-
const {
|
|
204
|
-
error: warrning,
|
|
205
|
-
} = ThemePlatformValidator.getCompanyLevelPrivateThemes().validate(
|
|
206
|
-
{
|
|
207
|
-
searchText,
|
|
208
|
-
},
|
|
209
|
-
{ abortEarly: false, allowUnknown: false }
|
|
210
|
-
);
|
|
211
|
-
if (warrning) {
|
|
212
|
-
Logger({
|
|
213
|
-
level: "WARN",
|
|
214
|
-
message: `Parameter Validation warrnings for platform > Theme > getCompanyLevelPrivateThemes \n ${warrning}`,
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const query_params = {};
|
|
219
|
-
query_params["search_text"] = searchText;
|
|
220
|
-
|
|
221
|
-
const xHeaders = {};
|
|
222
|
-
|
|
223
|
-
const response = await PlatformAPIClient.execute(
|
|
224
|
-
this.config,
|
|
225
|
-
"get",
|
|
226
|
-
`/service/platform/theme/v2.0/company/${this.config.companyId}/private_themes`,
|
|
227
|
-
query_params,
|
|
228
|
-
undefined,
|
|
229
|
-
{ ...xHeaders, ...requestHeaders },
|
|
230
|
-
{ responseHeaders }
|
|
231
|
-
);
|
|
232
|
-
|
|
233
|
-
let responseData = response;
|
|
234
|
-
if (responseHeaders) {
|
|
235
|
-
responseData = response[0];
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
const { error: res_error } = Joi.array()
|
|
239
|
-
.items(ThemePlatformModel.CompanyPrivateTheme())
|
|
240
|
-
.validate(responseData, { abortEarly: false, allowUnknown: true });
|
|
241
|
-
|
|
242
|
-
if (res_error) {
|
|
243
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
244
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
245
|
-
} else {
|
|
246
|
-
Logger({
|
|
247
|
-
level: "WARN",
|
|
248
|
-
message: `Response Validation Warnings for platform > Theme > getCompanyLevelPrivateThemes \n ${res_error}`,
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return response;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
177
|
/**
|
|
257
178
|
* @param {ThemePlatformValidator.GetCompanyLevelThemesParam} arg - Arg object
|
|
258
179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -263,13 +184,11 @@ class Theme {
|
|
|
263
184
|
* @description: Retrieve a list of themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelThemes/).
|
|
264
185
|
*/
|
|
265
186
|
async getCompanyLevelThemes(
|
|
266
|
-
{
|
|
187
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
267
188
|
{ responseHeaders } = { responseHeaders: false }
|
|
268
189
|
) {
|
|
269
190
|
const { error } = ThemePlatformValidator.getCompanyLevelThemes().validate(
|
|
270
|
-
{
|
|
271
|
-
searchText,
|
|
272
|
-
},
|
|
191
|
+
{},
|
|
273
192
|
{ abortEarly: false, allowUnknown: true }
|
|
274
193
|
);
|
|
275
194
|
if (error) {
|
|
@@ -280,9 +199,7 @@ class Theme {
|
|
|
280
199
|
const {
|
|
281
200
|
error: warrning,
|
|
282
201
|
} = ThemePlatformValidator.getCompanyLevelThemes().validate(
|
|
283
|
-
{
|
|
284
|
-
searchText,
|
|
285
|
-
},
|
|
202
|
+
{},
|
|
286
203
|
{ abortEarly: false, allowUnknown: false }
|
|
287
204
|
);
|
|
288
205
|
if (warrning) {
|
|
@@ -293,7 +210,6 @@ class Theme {
|
|
|
293
210
|
}
|
|
294
211
|
|
|
295
212
|
const query_params = {};
|
|
296
|
-
query_params["search_text"] = searchText;
|
|
297
213
|
|
|
298
214
|
const xHeaders = {};
|
|
299
215
|
|