@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
|
@@ -10,17 +10,17 @@ class Share {
|
|
|
10
10
|
constructor(_conf) {
|
|
11
11
|
this._conf = _conf;
|
|
12
12
|
this._relativeUrls = {
|
|
13
|
+
createShortLink: "/service/application/share/v1.0/links/short-link/",
|
|
13
14
|
getApplicationQRCode: "/service/application/share/v1.0/qr/",
|
|
14
|
-
getProductQRCodeBySlug:
|
|
15
|
-
"/service/application/share/v1.0/qr/products/{slug}/",
|
|
16
15
|
getCollectionQRCodeBySlug:
|
|
17
16
|
"/service/application/share/v1.0/qr/collection/{slug}/",
|
|
18
|
-
getUrlQRCode: "/service/application/share/v1.0/qr/url/",
|
|
19
|
-
createShortLink: "/service/application/share/v1.0/links/short-link/",
|
|
20
|
-
getShortLinkByHash:
|
|
21
|
-
"/service/application/share/v1.0/links/short-link/{hash}/",
|
|
22
17
|
getOriginalShortLinkByHash:
|
|
23
18
|
"/service/application/share/v1.0/links/short-link/{hash}/original/",
|
|
19
|
+
getProductQRCodeBySlug:
|
|
20
|
+
"/service/application/share/v1.0/qr/products/{slug}/",
|
|
21
|
+
getShortLinkByHash:
|
|
22
|
+
"/service/application/share/v1.0/links/short-link/{hash}/",
|
|
23
|
+
getUrlQRCode: "/service/application/share/v1.0/qr/url/",
|
|
24
24
|
};
|
|
25
25
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
26
26
|
(urls, [method, relativeUrl]) => {
|
|
@@ -40,13 +40,14 @@ class Share {
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* @param {Object} arg - Arg object.
|
|
43
|
-
* @
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
43
|
+
* @param {ShortLinkReq} arg.body
|
|
44
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
45
|
+
* @summary: Create a short link
|
|
46
|
+
* @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs.
|
|
46
47
|
*/
|
|
47
|
-
async
|
|
48
|
-
const { error } = ShareValidator.
|
|
49
|
-
{},
|
|
48
|
+
async createShortLink({ body } = {}) {
|
|
49
|
+
const { error } = ShareValidator.createShortLink().validate(
|
|
50
|
+
{ body },
|
|
50
51
|
{ abortEarly: false, allowUnknown: true }
|
|
51
52
|
);
|
|
52
53
|
if (error) {
|
|
@@ -54,14 +55,14 @@ class Share {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
// Showing warrnings if extra unknown parameters are found
|
|
57
|
-
const { error: warrning } = ShareValidator.
|
|
58
|
-
{},
|
|
58
|
+
const { error: warrning } = ShareValidator.createShortLink().validate(
|
|
59
|
+
{ body },
|
|
59
60
|
{ abortEarly: false, allowUnknown: false }
|
|
60
61
|
);
|
|
61
62
|
if (warrning) {
|
|
62
63
|
Logger({
|
|
63
64
|
level: "WARN",
|
|
64
|
-
message: "Parameter Validation warrnings for
|
|
65
|
+
message: "Parameter Validation warrnings for createShortLink",
|
|
65
66
|
});
|
|
66
67
|
Logger({ level: "WARN", message: warrning });
|
|
67
68
|
}
|
|
@@ -74,15 +75,15 @@ class Share {
|
|
|
74
75
|
this._conf,
|
|
75
76
|
"post",
|
|
76
77
|
constructUrl({
|
|
77
|
-
url: this._urls["
|
|
78
|
+
url: this._urls["createShortLink"],
|
|
78
79
|
params: {},
|
|
79
80
|
}),
|
|
80
81
|
query_params,
|
|
81
|
-
|
|
82
|
+
body,
|
|
82
83
|
xHeaders
|
|
83
84
|
);
|
|
84
85
|
|
|
85
|
-
const { error: res_error } = ShareModel.
|
|
86
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
86
87
|
abortEarly: false,
|
|
87
88
|
allowUnknown: false,
|
|
88
89
|
});
|
|
@@ -90,7 +91,7 @@ class Share {
|
|
|
90
91
|
if (res_error) {
|
|
91
92
|
Logger({
|
|
92
93
|
level: "WARN",
|
|
93
|
-
message: "Response Validation Warnnings for
|
|
94
|
+
message: "Response Validation Warnnings for createShortLink",
|
|
94
95
|
});
|
|
95
96
|
Logger({ level: "WARN", message: res_error });
|
|
96
97
|
}
|
|
@@ -100,15 +101,13 @@ class Share {
|
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
* @param {Object} arg - Arg object.
|
|
103
|
-
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
104
|
-
* identifier of a product. You can get slug value from the endpoint.
|
|
105
104
|
* @returns {Promise<QRCodeResp>} - Success response
|
|
106
|
-
* @summary: Create QR Code of
|
|
107
|
-
* @description: Use this API to create a QR code of
|
|
105
|
+
* @summary: Create QR Code of an app
|
|
106
|
+
* @description: Use this API to create a QR code of an app for sharing it with users who want to use the app.
|
|
108
107
|
*/
|
|
109
|
-
async
|
|
110
|
-
const { error } = ShareValidator.
|
|
111
|
-
{
|
|
108
|
+
async getApplicationQRCode({} = {}) {
|
|
109
|
+
const { error } = ShareValidator.getApplicationQRCode().validate(
|
|
110
|
+
{},
|
|
112
111
|
{ abortEarly: false, allowUnknown: true }
|
|
113
112
|
);
|
|
114
113
|
if (error) {
|
|
@@ -116,16 +115,14 @@ class Share {
|
|
|
116
115
|
}
|
|
117
116
|
|
|
118
117
|
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
} = ShareValidator.getProductQRCodeBySlug().validate(
|
|
122
|
-
{ slug },
|
|
118
|
+
const { error: warrning } = ShareValidator.getApplicationQRCode().validate(
|
|
119
|
+
{},
|
|
123
120
|
{ abortEarly: false, allowUnknown: false }
|
|
124
121
|
);
|
|
125
122
|
if (warrning) {
|
|
126
123
|
Logger({
|
|
127
124
|
level: "WARN",
|
|
128
|
-
message: "Parameter Validation warrnings for
|
|
125
|
+
message: "Parameter Validation warrnings for getApplicationQRCode",
|
|
129
126
|
});
|
|
130
127
|
Logger({ level: "WARN", message: warrning });
|
|
131
128
|
}
|
|
@@ -138,8 +135,8 @@ class Share {
|
|
|
138
135
|
this._conf,
|
|
139
136
|
"post",
|
|
140
137
|
constructUrl({
|
|
141
|
-
url: this._urls["
|
|
142
|
-
params: {
|
|
138
|
+
url: this._urls["getApplicationQRCode"],
|
|
139
|
+
params: {},
|
|
143
140
|
}),
|
|
144
141
|
query_params,
|
|
145
142
|
undefined,
|
|
@@ -154,7 +151,7 @@ class Share {
|
|
|
154
151
|
if (res_error) {
|
|
155
152
|
Logger({
|
|
156
153
|
level: "WARN",
|
|
157
|
-
message: "Response Validation Warnnings for
|
|
154
|
+
message: "Response Validation Warnnings for getApplicationQRCode",
|
|
158
155
|
});
|
|
159
156
|
Logger({ level: "WARN", message: res_error });
|
|
160
157
|
}
|
|
@@ -228,14 +225,15 @@ class Share {
|
|
|
228
225
|
|
|
229
226
|
/**
|
|
230
227
|
* @param {Object} arg - Arg object.
|
|
231
|
-
* @param {string} arg.
|
|
232
|
-
*
|
|
233
|
-
* @
|
|
234
|
-
* @
|
|
228
|
+
* @param {string} arg.hash - A string value used for converting long URL to
|
|
229
|
+
* short URL and vice-versa.
|
|
230
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
231
|
+
* @summary: Get original link by hash
|
|
232
|
+
* @description: Use this API to retrieve the original link from a short-link by using a hash value.
|
|
235
233
|
*/
|
|
236
|
-
async
|
|
237
|
-
const { error } = ShareValidator.
|
|
238
|
-
{
|
|
234
|
+
async getOriginalShortLinkByHash({ hash } = {}) {
|
|
235
|
+
const { error } = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
236
|
+
{ hash },
|
|
239
237
|
{ abortEarly: false, allowUnknown: true }
|
|
240
238
|
);
|
|
241
239
|
if (error) {
|
|
@@ -243,36 +241,38 @@ class Share {
|
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
// Showing warrnings if extra unknown parameters are found
|
|
246
|
-
const {
|
|
247
|
-
|
|
244
|
+
const {
|
|
245
|
+
error: warrning,
|
|
246
|
+
} = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
247
|
+
{ hash },
|
|
248
248
|
{ abortEarly: false, allowUnknown: false }
|
|
249
249
|
);
|
|
250
250
|
if (warrning) {
|
|
251
251
|
Logger({
|
|
252
252
|
level: "WARN",
|
|
253
|
-
message:
|
|
253
|
+
message:
|
|
254
|
+
"Parameter Validation warrnings for getOriginalShortLinkByHash",
|
|
254
255
|
});
|
|
255
256
|
Logger({ level: "WARN", message: warrning });
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
const query_params = {};
|
|
259
|
-
query_params["url"] = url;
|
|
260
260
|
|
|
261
261
|
const xHeaders = {};
|
|
262
262
|
|
|
263
263
|
const response = await APIClient.execute(
|
|
264
264
|
this._conf,
|
|
265
|
-
"
|
|
265
|
+
"get",
|
|
266
266
|
constructUrl({
|
|
267
|
-
url: this._urls["
|
|
268
|
-
params: {},
|
|
267
|
+
url: this._urls["getOriginalShortLinkByHash"],
|
|
268
|
+
params: { hash },
|
|
269
269
|
}),
|
|
270
270
|
query_params,
|
|
271
271
|
undefined,
|
|
272
272
|
xHeaders
|
|
273
273
|
);
|
|
274
274
|
|
|
275
|
-
const { error: res_error } = ShareModel.
|
|
275
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
276
276
|
abortEarly: false,
|
|
277
277
|
allowUnknown: false,
|
|
278
278
|
});
|
|
@@ -280,7 +280,7 @@ class Share {
|
|
|
280
280
|
if (res_error) {
|
|
281
281
|
Logger({
|
|
282
282
|
level: "WARN",
|
|
283
|
-
message: "Response Validation Warnnings for
|
|
283
|
+
message: "Response Validation Warnnings for getOriginalShortLinkByHash",
|
|
284
284
|
});
|
|
285
285
|
Logger({ level: "WARN", message: res_error });
|
|
286
286
|
}
|
|
@@ -290,14 +290,15 @@ class Share {
|
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
292
|
* @param {Object} arg - Arg object.
|
|
293
|
-
* @param {
|
|
294
|
-
*
|
|
295
|
-
* @
|
|
296
|
-
* @
|
|
293
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
294
|
+
* identifier of a product. You can get slug value from the endpoint.
|
|
295
|
+
* @returns {Promise<QRCodeResp>} - Success response
|
|
296
|
+
* @summary: Create QR Code of a product
|
|
297
|
+
* @description: Use this API to create a QR code of a product for sharing it with users who want to view/purchase the product.
|
|
297
298
|
*/
|
|
298
|
-
async
|
|
299
|
-
const { error } = ShareValidator.
|
|
300
|
-
{
|
|
299
|
+
async getProductQRCodeBySlug({ slug } = {}) {
|
|
300
|
+
const { error } = ShareValidator.getProductQRCodeBySlug().validate(
|
|
301
|
+
{ slug },
|
|
301
302
|
{ abortEarly: false, allowUnknown: true }
|
|
302
303
|
);
|
|
303
304
|
if (error) {
|
|
@@ -305,14 +306,16 @@ class Share {
|
|
|
305
306
|
}
|
|
306
307
|
|
|
307
308
|
// Showing warrnings if extra unknown parameters are found
|
|
308
|
-
const {
|
|
309
|
-
|
|
309
|
+
const {
|
|
310
|
+
error: warrning,
|
|
311
|
+
} = ShareValidator.getProductQRCodeBySlug().validate(
|
|
312
|
+
{ slug },
|
|
310
313
|
{ abortEarly: false, allowUnknown: false }
|
|
311
314
|
);
|
|
312
315
|
if (warrning) {
|
|
313
316
|
Logger({
|
|
314
317
|
level: "WARN",
|
|
315
|
-
message: "Parameter Validation warrnings for
|
|
318
|
+
message: "Parameter Validation warrnings for getProductQRCodeBySlug",
|
|
316
319
|
});
|
|
317
320
|
Logger({ level: "WARN", message: warrning });
|
|
318
321
|
}
|
|
@@ -325,15 +328,15 @@ class Share {
|
|
|
325
328
|
this._conf,
|
|
326
329
|
"post",
|
|
327
330
|
constructUrl({
|
|
328
|
-
url: this._urls["
|
|
329
|
-
params: {},
|
|
331
|
+
url: this._urls["getProductQRCodeBySlug"],
|
|
332
|
+
params: { slug },
|
|
330
333
|
}),
|
|
331
334
|
query_params,
|
|
332
|
-
|
|
335
|
+
undefined,
|
|
333
336
|
xHeaders
|
|
334
337
|
);
|
|
335
338
|
|
|
336
|
-
const { error: res_error } = ShareModel.
|
|
339
|
+
const { error: res_error } = ShareModel.QRCodeResp().validate(response, {
|
|
337
340
|
abortEarly: false,
|
|
338
341
|
allowUnknown: false,
|
|
339
342
|
});
|
|
@@ -341,7 +344,7 @@ class Share {
|
|
|
341
344
|
if (res_error) {
|
|
342
345
|
Logger({
|
|
343
346
|
level: "WARN",
|
|
344
|
-
message: "Response Validation Warnnings for
|
|
347
|
+
message: "Response Validation Warnnings for getProductQRCodeBySlug",
|
|
345
348
|
});
|
|
346
349
|
Logger({ level: "WARN", message: res_error });
|
|
347
350
|
}
|
|
@@ -413,15 +416,14 @@ class Share {
|
|
|
413
416
|
|
|
414
417
|
/**
|
|
415
418
|
* @param {Object} arg - Arg object.
|
|
416
|
-
* @param {string} arg.
|
|
417
|
-
*
|
|
418
|
-
* @
|
|
419
|
-
* @
|
|
420
|
-
* @description: Use this API to retrieve the original link from a short-link by using a hash value.
|
|
419
|
+
* @param {string} arg.url - A link or a web address
|
|
420
|
+
* @returns {Promise<QRCodeResp>} - Success response
|
|
421
|
+
* @summary: Create QR Code of a URL
|
|
422
|
+
* @description: Use this API to create a QR code of a URL for sharing it with users who want to visit the link.
|
|
421
423
|
*/
|
|
422
|
-
async
|
|
423
|
-
const { error } = ShareValidator.
|
|
424
|
-
{
|
|
424
|
+
async getUrlQRCode({ url } = {}) {
|
|
425
|
+
const { error } = ShareValidator.getUrlQRCode().validate(
|
|
426
|
+
{ url },
|
|
425
427
|
{ abortEarly: false, allowUnknown: true }
|
|
426
428
|
);
|
|
427
429
|
if (error) {
|
|
@@ -429,38 +431,36 @@ class Share {
|
|
|
429
431
|
}
|
|
430
432
|
|
|
431
433
|
// Showing warrnings if extra unknown parameters are found
|
|
432
|
-
const {
|
|
433
|
-
|
|
434
|
-
} = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
435
|
-
{ hash },
|
|
434
|
+
const { error: warrning } = ShareValidator.getUrlQRCode().validate(
|
|
435
|
+
{ url },
|
|
436
436
|
{ abortEarly: false, allowUnknown: false }
|
|
437
437
|
);
|
|
438
438
|
if (warrning) {
|
|
439
439
|
Logger({
|
|
440
440
|
level: "WARN",
|
|
441
|
-
message:
|
|
442
|
-
"Parameter Validation warrnings for getOriginalShortLinkByHash",
|
|
441
|
+
message: "Parameter Validation warrnings for getUrlQRCode",
|
|
443
442
|
});
|
|
444
443
|
Logger({ level: "WARN", message: warrning });
|
|
445
444
|
}
|
|
446
445
|
|
|
447
446
|
const query_params = {};
|
|
447
|
+
query_params["url"] = url;
|
|
448
448
|
|
|
449
449
|
const xHeaders = {};
|
|
450
450
|
|
|
451
451
|
const response = await APIClient.execute(
|
|
452
452
|
this._conf,
|
|
453
|
-
"
|
|
453
|
+
"post",
|
|
454
454
|
constructUrl({
|
|
455
|
-
url: this._urls["
|
|
456
|
-
params: {
|
|
455
|
+
url: this._urls["getUrlQRCode"],
|
|
456
|
+
params: {},
|
|
457
457
|
}),
|
|
458
458
|
query_params,
|
|
459
459
|
undefined,
|
|
460
460
|
xHeaders
|
|
461
461
|
);
|
|
462
462
|
|
|
463
|
-
const { error: res_error } = ShareModel.
|
|
463
|
+
const { error: res_error } = ShareModel.QRCodeResp().validate(response, {
|
|
464
464
|
abortEarly: false,
|
|
465
465
|
allowUnknown: false,
|
|
466
466
|
});
|
|
@@ -468,7 +468,7 @@ class Share {
|
|
|
468
468
|
if (res_error) {
|
|
469
469
|
Logger({
|
|
470
470
|
level: "WARN",
|
|
471
|
-
message: "Response Validation Warnnings for
|
|
471
|
+
message: "Response Validation Warnnings for getUrlQRCode",
|
|
472
472
|
});
|
|
473
473
|
Logger({ level: "WARN", message: res_error });
|
|
474
474
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export = ShareModel;
|
|
2
2
|
declare class ShareModel {
|
|
3
|
+
static Attribution(): any;
|
|
4
|
+
static CampaignShortLink(): any;
|
|
5
|
+
static ErrorRes(): any;
|
|
6
|
+
static Page(): any;
|
|
3
7
|
static QRCodeResp(): any;
|
|
4
8
|
static RedirectDevice(): any;
|
|
5
|
-
static WebRedirect(): any;
|
|
6
9
|
static Redirects(): any;
|
|
7
|
-
static
|
|
8
|
-
static Attribution(): any;
|
|
9
|
-
static SocialMediaTags(): any;
|
|
10
|
+
static ShortLinkList(): any;
|
|
10
11
|
static ShortLinkReq(): any;
|
|
11
|
-
static UrlInfo(): any;
|
|
12
12
|
static ShortLinkRes(): any;
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
static
|
|
13
|
+
static SocialMediaTags(): any;
|
|
14
|
+
static UrlInfo(): any;
|
|
15
|
+
static WebRedirect(): any;
|
|
16
16
|
}
|
|
@@ -1,177 +1,117 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class ShareModel {
|
|
4
|
-
static
|
|
4
|
+
static Attribution() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
svg: Joi.string().allow(""),
|
|
6
|
+
campaign_cookie_expiry: Joi.string().allow(""),
|
|
9
7
|
});
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
static RedirectDevice() {
|
|
9
|
+
static CampaignShortLink() {
|
|
13
10
|
return Joi.object({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: Joi.string().allow(""),
|
|
11
|
+
medium: Joi.string().allow(""),
|
|
12
|
+
source: Joi.string().allow(""),
|
|
17
13
|
});
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
static WebRedirect() {
|
|
15
|
+
static ErrorRes() {
|
|
21
16
|
return Joi.object({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type: Joi.string().allow(""),
|
|
17
|
+
message: Joi.string().allow(""),
|
|
25
18
|
});
|
|
26
19
|
}
|
|
27
|
-
|
|
28
|
-
static Redirects() {
|
|
20
|
+
static Page() {
|
|
29
21
|
return Joi.object({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
current: Joi.number(),
|
|
23
|
+
has_next: Joi.boolean(),
|
|
24
|
+
has_previous: Joi.boolean(),
|
|
25
|
+
item_total: Joi.number(),
|
|
26
|
+
next_id: Joi.string().allow(""),
|
|
27
|
+
size: Joi.number(),
|
|
28
|
+
type: Joi.string().allow("").required(),
|
|
37
29
|
});
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
static CampaignShortLink() {
|
|
31
|
+
static QRCodeResp() {
|
|
41
32
|
return Joi.object({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
medium: Joi.string().allow(""),
|
|
33
|
+
link: Joi.string().allow(""),
|
|
34
|
+
svg: Joi.string().allow(""),
|
|
45
35
|
});
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
static Attribution() {
|
|
37
|
+
static RedirectDevice() {
|
|
49
38
|
return Joi.object({
|
|
50
|
-
|
|
39
|
+
link: Joi.string().allow(""),
|
|
40
|
+
type: Joi.string().allow(""),
|
|
51
41
|
});
|
|
52
42
|
}
|
|
53
|
-
|
|
54
|
-
static SocialMediaTags() {
|
|
43
|
+
static Redirects() {
|
|
55
44
|
return Joi.object({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
android: ShareModel.RedirectDevice(),
|
|
46
|
+
force_web: Joi.boolean(),
|
|
47
|
+
ios: ShareModel.RedirectDevice(),
|
|
48
|
+
web: ShareModel.WebRedirect(),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
static ShortLinkList() {
|
|
52
|
+
return Joi.object({
|
|
53
|
+
items: Joi.array().items(ShareModel.ShortLinkRes()),
|
|
54
|
+
page: ShareModel.Page(),
|
|
61
55
|
});
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
static ShortLinkReq() {
|
|
65
58
|
return Joi.object({
|
|
66
|
-
title: Joi.string().allow("").required(),
|
|
67
|
-
|
|
68
|
-
url: Joi.string().allow("").required(),
|
|
69
|
-
|
|
70
|
-
hash: Joi.string().allow(""),
|
|
71
|
-
|
|
72
59
|
active: Joi.boolean(),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
60
|
+
attribution: ShareModel.Attribution(),
|
|
61
|
+
campaign: ShareModel.CampaignShortLink(),
|
|
62
|
+
count: Joi.number(),
|
|
76
63
|
enable_tracking: Joi.boolean(),
|
|
77
|
-
|
|
64
|
+
expire_at: Joi.string().allow(""),
|
|
65
|
+
hash: Joi.string().allow(""),
|
|
78
66
|
personalized: Joi.boolean(),
|
|
79
|
-
|
|
80
|
-
campaign: ShareModel.CampaignShortLink(),
|
|
81
|
-
|
|
82
67
|
redirects: ShareModel.Redirects(),
|
|
83
|
-
|
|
84
|
-
attribution: ShareModel.Attribution(),
|
|
85
|
-
|
|
86
68
|
social_media_tags: ShareModel.SocialMediaTags(),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
static UrlInfo() {
|
|
93
|
-
return Joi.object({
|
|
94
|
-
original: Joi.string().allow(""),
|
|
95
|
-
|
|
96
|
-
short: Joi.string().allow(""),
|
|
97
|
-
|
|
98
|
-
hash: Joi.string().allow(""),
|
|
69
|
+
title: Joi.string().allow("").required(),
|
|
70
|
+
url: Joi.string().allow("").required(),
|
|
99
71
|
});
|
|
100
72
|
}
|
|
101
|
-
|
|
102
73
|
static ShortLinkRes() {
|
|
103
74
|
return Joi.object({
|
|
104
|
-
title: Joi.string().allow(""),
|
|
105
|
-
|
|
106
|
-
url: ShareModel.UrlInfo(),
|
|
107
|
-
|
|
108
|
-
created_by: Joi.string().allow(""),
|
|
109
|
-
|
|
110
|
-
app_redirect: Joi.boolean(),
|
|
111
|
-
|
|
112
|
-
fallback: Joi.string().allow(""),
|
|
113
|
-
|
|
114
|
-
active: Joi.boolean(),
|
|
115
|
-
|
|
116
75
|
_id: Joi.string().allow(""),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
expire_at: Joi.string().allow(""),
|
|
121
|
-
|
|
76
|
+
active: Joi.boolean(),
|
|
77
|
+
app_redirect: Joi.boolean(),
|
|
122
78
|
application: Joi.string().allow(""),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
79
|
+
attribution: ShareModel.Attribution(),
|
|
80
|
+
campaign: ShareModel.CampaignShortLink(),
|
|
81
|
+
count: Joi.number(),
|
|
126
82
|
created_at: Joi.string().allow(""),
|
|
127
|
-
|
|
83
|
+
created_by: Joi.string().allow(""),
|
|
84
|
+
enable_tracking: Joi.boolean(),
|
|
85
|
+
expire_at: Joi.string().allow(""),
|
|
86
|
+
fallback: Joi.string().allow(""),
|
|
128
87
|
meta: Joi.any(),
|
|
129
|
-
|
|
130
|
-
updated_at: Joi.string().allow(""),
|
|
131
|
-
|
|
132
88
|
personalized: Joi.boolean(),
|
|
133
|
-
|
|
134
|
-
campaign: ShareModel.CampaignShortLink(),
|
|
135
|
-
|
|
136
89
|
redirects: ShareModel.Redirects(),
|
|
137
|
-
|
|
138
|
-
attribution: ShareModel.Attribution(),
|
|
139
|
-
|
|
140
90
|
social_media_tags: ShareModel.SocialMediaTags(),
|
|
141
|
-
|
|
142
|
-
|
|
91
|
+
title: Joi.string().allow(""),
|
|
92
|
+
updated_at: Joi.string().allow(""),
|
|
93
|
+
url: ShareModel.UrlInfo(),
|
|
94
|
+
user_id: Joi.string().allow(""),
|
|
143
95
|
});
|
|
144
96
|
}
|
|
145
|
-
|
|
146
|
-
static Page() {
|
|
97
|
+
static SocialMediaTags() {
|
|
147
98
|
return Joi.object({
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
has_previous: Joi.boolean(),
|
|
153
|
-
|
|
154
|
-
has_next: Joi.boolean(),
|
|
155
|
-
|
|
156
|
-
current: Joi.number(),
|
|
157
|
-
|
|
158
|
-
type: Joi.string().allow("").required(),
|
|
159
|
-
|
|
160
|
-
size: Joi.number(),
|
|
99
|
+
description: Joi.string().allow(""),
|
|
100
|
+
image: Joi.string().allow(""),
|
|
101
|
+
title: Joi.string().allow(""),
|
|
161
102
|
});
|
|
162
103
|
}
|
|
163
|
-
|
|
164
|
-
static ShortLinkList() {
|
|
104
|
+
static UrlInfo() {
|
|
165
105
|
return Joi.object({
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
106
|
+
hash: Joi.string().allow(""),
|
|
107
|
+
original: Joi.string().allow(""),
|
|
108
|
+
short: Joi.string().allow(""),
|
|
169
109
|
});
|
|
170
110
|
}
|
|
171
|
-
|
|
172
|
-
static ErrorRes() {
|
|
111
|
+
static WebRedirect() {
|
|
173
112
|
return Joi.object({
|
|
174
|
-
|
|
113
|
+
link: Joi.string().allow(""),
|
|
114
|
+
type: Joi.string().allow(""),
|
|
175
115
|
});
|
|
176
116
|
}
|
|
177
117
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export = ShareValidator;
|
|
2
2
|
declare class ShareValidator {
|
|
3
|
+
static createShortLink(): any;
|
|
3
4
|
static getApplicationQRCode(): any;
|
|
4
|
-
static getProductQRCodeBySlug(): any;
|
|
5
5
|
static getCollectionQRCodeBySlug(): any;
|
|
6
|
-
static getUrlQRCode(): any;
|
|
7
|
-
static createShortLink(): any;
|
|
8
|
-
static getShortLinkByHash(): any;
|
|
9
6
|
static getOriginalShortLinkByHash(): any;
|
|
7
|
+
static getProductQRCodeBySlug(): any;
|
|
8
|
+
static getShortLinkByHash(): any;
|
|
9
|
+
static getUrlQRCode(): any;
|
|
10
10
|
}
|