@gofynd/fdk-client-javascript 1.0.2 → 1.0.4
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 +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +595 -594
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +490 -885
- 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 +1079 -1078
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
- 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 +43 -42
- 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 +32 -31
- 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 +350 -349
- 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 +216 -215
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +468 -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 +65 -64
- 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 +109 -108
- 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 +31 -22
- package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
- 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 -9
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +247 -246
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +361 -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 +781 -780
- 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 +646 -645
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
- 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 +122 -121
- 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 +94 -93
- 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 +38 -37
- 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 +619 -618
- 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 +18 -7
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
- 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 +7 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
- 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 +26 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +40 -51
- 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 +7 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
- 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 +25 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
- 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 +39 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +485 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
- 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 +30 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
- 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 +12 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
- 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 +29 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
- 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 +25 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
- 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 +22 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7972 -7888
- package/sdk/platform/PlatformClient.js +8678 -10107
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
- 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 +62 -60
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
- 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 +314 -312
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
- 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 +507 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
- 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 +91 -90
- 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 +15 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -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 +115 -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/WebhookPublicClient.js +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -7339
- package/documentation/application/CATALOG.md +0 -9597
- package/documentation/application/COMMON.md +0 -452
- package/documentation/application/COMMUNICATION.md +0 -467
- package/documentation/application/CONFIGURATION.md +0 -2906
- package/documentation/application/CONTENT.md +0 -3351
- package/documentation/application/FILESTORAGE.md +0 -578
- package/documentation/application/LEAD.md +0 -1895
- package/documentation/application/LOGISTIC.md +0 -765
- package/documentation/application/ORDER.md +0 -3432
- package/documentation/application/PAYMENT.md +0 -5221
- package/documentation/application/POSCART.md +0 -7938
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -708
- package/documentation/application/SHARE.md +0 -733
- package/documentation/application/THEME.md +0 -5800
- package/documentation/application/USER.md +0 -4335
- package/documentation/platform/ANALYTICS.md +0 -1154
- package/documentation/platform/AUDITTRAIL.md +0 -576
- package/documentation/platform/BILLING.md +0 -2400
- package/documentation/platform/CART.md +0 -5559
- package/documentation/platform/CATALOG.md +0 -23261
- package/documentation/platform/COMMON.md +0 -452
- package/documentation/platform/COMMUNICATION.md +0 -5718
- package/documentation/platform/COMPANYPROFILE.md +0 -2031
- package/documentation/platform/CONFIGURATION.md +0 -7339
- package/documentation/platform/CONTENT.md +0 -9098
- package/documentation/platform/DISCOUNT.md +0 -863
- package/documentation/platform/FILESTORAGE.md +0 -1081
- package/documentation/platform/INVENTORY.md +0 -1779
- package/documentation/platform/LEAD.md +0 -4740
- package/documentation/platform/ORDER.md +0 -8486
- package/documentation/platform/PARTNER.md +0 -220
- package/documentation/platform/PAYMENT.md +0 -3448
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -1083
- package/documentation/platform/SHARE.md +0 -606
- package/documentation/platform/THEME.md +0 -35729
- package/documentation/platform/USER.md +0 -2319
- package/documentation/platform/WEBHOOK.md +0 -591
- package/documentation/public/CONFIGURATION.md +0 -452
- package/documentation/public/INVENTORY.md +0 -690
- package/documentation/public/WEBHOOK.md +0 -352
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -47
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const ShareValidator = require("./ShareApplicationValidator");
|
|
6
6
|
const ShareModel = require("./ShareApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Share {
|
|
10
11
|
constructor(_conf) {
|
|
11
12
|
this._conf = _conf;
|
|
12
13
|
this._relativeUrls = {
|
|
14
|
+
createShortLink: "/service/application/share/v1.0/links/short-link/",
|
|
13
15
|
getApplicationQRCode: "/service/application/share/v1.0/qr/",
|
|
14
|
-
getProductQRCodeBySlug:
|
|
15
|
-
"/service/application/share/v1.0/qr/products/{slug}/",
|
|
16
16
|
getCollectionQRCodeBySlug:
|
|
17
17
|
"/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
18
|
getOriginalShortLinkByHash:
|
|
23
19
|
"/service/application/share/v1.0/links/short-link/{hash}/original/",
|
|
20
|
+
getProductQRCodeBySlug:
|
|
21
|
+
"/service/application/share/v1.0/qr/products/{slug}/",
|
|
22
|
+
getShortLinkByHash:
|
|
23
|
+
"/service/application/share/v1.0/links/short-link/{hash}/",
|
|
24
|
+
getUrlQRCode: "/service/application/share/v1.0/qr/url/",
|
|
24
25
|
};
|
|
25
26
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
26
27
|
(urls, [method, relativeUrl]) => {
|
|
@@ -40,13 +41,14 @@ class Share {
|
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* @param {Object} arg - Arg object.
|
|
43
|
-
* @
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
44
|
+
* @param {ShortLinkReq} arg.body
|
|
45
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
46
|
+
* @summary: Create a short link
|
|
47
|
+
* @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs.
|
|
46
48
|
*/
|
|
47
|
-
async
|
|
48
|
-
const { error } = ShareValidator.
|
|
49
|
-
{},
|
|
49
|
+
async createShortLink({ body } = {}) {
|
|
50
|
+
const { error } = ShareValidator.createShortLink().validate(
|
|
51
|
+
{ body },
|
|
50
52
|
{ abortEarly: false, allowUnknown: true }
|
|
51
53
|
);
|
|
52
54
|
if (error) {
|
|
@@ -54,14 +56,14 @@ class Share {
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
// Showing warrnings if extra unknown parameters are found
|
|
57
|
-
const { error: warrning } = ShareValidator.
|
|
58
|
-
{},
|
|
59
|
+
const { error: warrning } = ShareValidator.createShortLink().validate(
|
|
60
|
+
{ body },
|
|
59
61
|
{ abortEarly: false, allowUnknown: false }
|
|
60
62
|
);
|
|
61
63
|
if (warrning) {
|
|
62
64
|
Logger({
|
|
63
65
|
level: "WARN",
|
|
64
|
-
message: "Parameter Validation warrnings for
|
|
66
|
+
message: "Parameter Validation warrnings for createShortLink",
|
|
65
67
|
});
|
|
66
68
|
Logger({ level: "WARN", message: warrning });
|
|
67
69
|
}
|
|
@@ -70,19 +72,19 @@ class Share {
|
|
|
70
72
|
|
|
71
73
|
const xHeaders = {};
|
|
72
74
|
|
|
73
|
-
const response = await
|
|
75
|
+
const response = await ApplicationAPIClient.execute(
|
|
74
76
|
this._conf,
|
|
75
77
|
"post",
|
|
76
78
|
constructUrl({
|
|
77
|
-
url: this._urls["
|
|
79
|
+
url: this._urls["createShortLink"],
|
|
78
80
|
params: {},
|
|
79
81
|
}),
|
|
80
82
|
query_params,
|
|
81
|
-
|
|
83
|
+
body,
|
|
82
84
|
xHeaders
|
|
83
85
|
);
|
|
84
86
|
|
|
85
|
-
const { error: res_error } = ShareModel.
|
|
87
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
86
88
|
abortEarly: false,
|
|
87
89
|
allowUnknown: false,
|
|
88
90
|
});
|
|
@@ -90,7 +92,7 @@ class Share {
|
|
|
90
92
|
if (res_error) {
|
|
91
93
|
Logger({
|
|
92
94
|
level: "WARN",
|
|
93
|
-
message: "Response Validation Warnnings for
|
|
95
|
+
message: "Response Validation Warnnings for createShortLink",
|
|
94
96
|
});
|
|
95
97
|
Logger({ level: "WARN", message: res_error });
|
|
96
98
|
}
|
|
@@ -100,15 +102,13 @@ class Share {
|
|
|
100
102
|
|
|
101
103
|
/**
|
|
102
104
|
* @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
105
|
* @returns {Promise<QRCodeResp>} - Success response
|
|
106
|
-
* @summary: Create QR Code of
|
|
107
|
-
* @description: Use this API to create a QR code of
|
|
106
|
+
* @summary: Create QR Code of an app
|
|
107
|
+
* @description: Use this API to create a QR code of an app for sharing it with users who want to use the app.
|
|
108
108
|
*/
|
|
109
|
-
async
|
|
110
|
-
const { error } = ShareValidator.
|
|
111
|
-
{
|
|
109
|
+
async getApplicationQRCode({} = {}) {
|
|
110
|
+
const { error } = ShareValidator.getApplicationQRCode().validate(
|
|
111
|
+
{},
|
|
112
112
|
{ abortEarly: false, allowUnknown: true }
|
|
113
113
|
);
|
|
114
114
|
if (error) {
|
|
@@ -116,16 +116,14 @@ class Share {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// Showing warrnings if extra unknown parameters are found
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
} = ShareValidator.getProductQRCodeBySlug().validate(
|
|
122
|
-
{ slug },
|
|
119
|
+
const { error: warrning } = ShareValidator.getApplicationQRCode().validate(
|
|
120
|
+
{},
|
|
123
121
|
{ abortEarly: false, allowUnknown: false }
|
|
124
122
|
);
|
|
125
123
|
if (warrning) {
|
|
126
124
|
Logger({
|
|
127
125
|
level: "WARN",
|
|
128
|
-
message: "Parameter Validation warrnings for
|
|
126
|
+
message: "Parameter Validation warrnings for getApplicationQRCode",
|
|
129
127
|
});
|
|
130
128
|
Logger({ level: "WARN", message: warrning });
|
|
131
129
|
}
|
|
@@ -134,12 +132,12 @@ class Share {
|
|
|
134
132
|
|
|
135
133
|
const xHeaders = {};
|
|
136
134
|
|
|
137
|
-
const response = await
|
|
135
|
+
const response = await ApplicationAPIClient.execute(
|
|
138
136
|
this._conf,
|
|
139
137
|
"post",
|
|
140
138
|
constructUrl({
|
|
141
|
-
url: this._urls["
|
|
142
|
-
params: {
|
|
139
|
+
url: this._urls["getApplicationQRCode"],
|
|
140
|
+
params: {},
|
|
143
141
|
}),
|
|
144
142
|
query_params,
|
|
145
143
|
undefined,
|
|
@@ -154,7 +152,7 @@ class Share {
|
|
|
154
152
|
if (res_error) {
|
|
155
153
|
Logger({
|
|
156
154
|
level: "WARN",
|
|
157
|
-
message: "Response Validation Warnnings for
|
|
155
|
+
message: "Response Validation Warnnings for getApplicationQRCode",
|
|
158
156
|
});
|
|
159
157
|
Logger({ level: "WARN", message: res_error });
|
|
160
158
|
}
|
|
@@ -198,7 +196,7 @@ class Share {
|
|
|
198
196
|
|
|
199
197
|
const xHeaders = {};
|
|
200
198
|
|
|
201
|
-
const response = await
|
|
199
|
+
const response = await ApplicationAPIClient.execute(
|
|
202
200
|
this._conf,
|
|
203
201
|
"post",
|
|
204
202
|
constructUrl({
|
|
@@ -228,14 +226,15 @@ class Share {
|
|
|
228
226
|
|
|
229
227
|
/**
|
|
230
228
|
* @param {Object} arg - Arg object.
|
|
231
|
-
* @param {string} arg.
|
|
232
|
-
*
|
|
233
|
-
* @
|
|
234
|
-
* @
|
|
229
|
+
* @param {string} arg.hash - A string value used for converting long URL to
|
|
230
|
+
* short URL and vice-versa.
|
|
231
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
232
|
+
* @summary: Get original link by hash
|
|
233
|
+
* @description: Use this API to retrieve the original link from a short-link by using a hash value.
|
|
235
234
|
*/
|
|
236
|
-
async
|
|
237
|
-
const { error } = ShareValidator.
|
|
238
|
-
{
|
|
235
|
+
async getOriginalShortLinkByHash({ hash } = {}) {
|
|
236
|
+
const { error } = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
237
|
+
{ hash },
|
|
239
238
|
{ abortEarly: false, allowUnknown: true }
|
|
240
239
|
);
|
|
241
240
|
if (error) {
|
|
@@ -243,36 +242,38 @@ class Share {
|
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
// Showing warrnings if extra unknown parameters are found
|
|
246
|
-
const {
|
|
247
|
-
|
|
245
|
+
const {
|
|
246
|
+
error: warrning,
|
|
247
|
+
} = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
248
|
+
{ hash },
|
|
248
249
|
{ abortEarly: false, allowUnknown: false }
|
|
249
250
|
);
|
|
250
251
|
if (warrning) {
|
|
251
252
|
Logger({
|
|
252
253
|
level: "WARN",
|
|
253
|
-
message:
|
|
254
|
+
message:
|
|
255
|
+
"Parameter Validation warrnings for getOriginalShortLinkByHash",
|
|
254
256
|
});
|
|
255
257
|
Logger({ level: "WARN", message: warrning });
|
|
256
258
|
}
|
|
257
259
|
|
|
258
260
|
const query_params = {};
|
|
259
|
-
query_params["url"] = url;
|
|
260
261
|
|
|
261
262
|
const xHeaders = {};
|
|
262
263
|
|
|
263
|
-
const response = await
|
|
264
|
+
const response = await ApplicationAPIClient.execute(
|
|
264
265
|
this._conf,
|
|
265
|
-
"
|
|
266
|
+
"get",
|
|
266
267
|
constructUrl({
|
|
267
|
-
url: this._urls["
|
|
268
|
-
params: {},
|
|
268
|
+
url: this._urls["getOriginalShortLinkByHash"],
|
|
269
|
+
params: { hash },
|
|
269
270
|
}),
|
|
270
271
|
query_params,
|
|
271
272
|
undefined,
|
|
272
273
|
xHeaders
|
|
273
274
|
);
|
|
274
275
|
|
|
275
|
-
const { error: res_error } = ShareModel.
|
|
276
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
276
277
|
abortEarly: false,
|
|
277
278
|
allowUnknown: false,
|
|
278
279
|
});
|
|
@@ -280,7 +281,7 @@ class Share {
|
|
|
280
281
|
if (res_error) {
|
|
281
282
|
Logger({
|
|
282
283
|
level: "WARN",
|
|
283
|
-
message: "Response Validation Warnnings for
|
|
284
|
+
message: "Response Validation Warnnings for getOriginalShortLinkByHash",
|
|
284
285
|
});
|
|
285
286
|
Logger({ level: "WARN", message: res_error });
|
|
286
287
|
}
|
|
@@ -290,14 +291,15 @@ class Share {
|
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
293
|
* @param {Object} arg - Arg object.
|
|
293
|
-
* @param {
|
|
294
|
-
*
|
|
295
|
-
* @
|
|
296
|
-
* @
|
|
294
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
295
|
+
* identifier of a product. You can get slug value from the endpoint.
|
|
296
|
+
* @returns {Promise<QRCodeResp>} - Success response
|
|
297
|
+
* @summary: Create QR Code of a product
|
|
298
|
+
* @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
299
|
*/
|
|
298
|
-
async
|
|
299
|
-
const { error } = ShareValidator.
|
|
300
|
-
{
|
|
300
|
+
async getProductQRCodeBySlug({ slug } = {}) {
|
|
301
|
+
const { error } = ShareValidator.getProductQRCodeBySlug().validate(
|
|
302
|
+
{ slug },
|
|
301
303
|
{ abortEarly: false, allowUnknown: true }
|
|
302
304
|
);
|
|
303
305
|
if (error) {
|
|
@@ -305,14 +307,16 @@ class Share {
|
|
|
305
307
|
}
|
|
306
308
|
|
|
307
309
|
// Showing warrnings if extra unknown parameters are found
|
|
308
|
-
const {
|
|
309
|
-
|
|
310
|
+
const {
|
|
311
|
+
error: warrning,
|
|
312
|
+
} = ShareValidator.getProductQRCodeBySlug().validate(
|
|
313
|
+
{ slug },
|
|
310
314
|
{ abortEarly: false, allowUnknown: false }
|
|
311
315
|
);
|
|
312
316
|
if (warrning) {
|
|
313
317
|
Logger({
|
|
314
318
|
level: "WARN",
|
|
315
|
-
message: "Parameter Validation warrnings for
|
|
319
|
+
message: "Parameter Validation warrnings for getProductQRCodeBySlug",
|
|
316
320
|
});
|
|
317
321
|
Logger({ level: "WARN", message: warrning });
|
|
318
322
|
}
|
|
@@ -321,19 +325,19 @@ class Share {
|
|
|
321
325
|
|
|
322
326
|
const xHeaders = {};
|
|
323
327
|
|
|
324
|
-
const response = await
|
|
328
|
+
const response = await ApplicationAPIClient.execute(
|
|
325
329
|
this._conf,
|
|
326
330
|
"post",
|
|
327
331
|
constructUrl({
|
|
328
|
-
url: this._urls["
|
|
329
|
-
params: {},
|
|
332
|
+
url: this._urls["getProductQRCodeBySlug"],
|
|
333
|
+
params: { slug },
|
|
330
334
|
}),
|
|
331
335
|
query_params,
|
|
332
|
-
|
|
336
|
+
undefined,
|
|
333
337
|
xHeaders
|
|
334
338
|
);
|
|
335
339
|
|
|
336
|
-
const { error: res_error } = ShareModel.
|
|
340
|
+
const { error: res_error } = ShareModel.QRCodeResp().validate(response, {
|
|
337
341
|
abortEarly: false,
|
|
338
342
|
allowUnknown: false,
|
|
339
343
|
});
|
|
@@ -341,7 +345,7 @@ class Share {
|
|
|
341
345
|
if (res_error) {
|
|
342
346
|
Logger({
|
|
343
347
|
level: "WARN",
|
|
344
|
-
message: "Response Validation Warnnings for
|
|
348
|
+
message: "Response Validation Warnnings for getProductQRCodeBySlug",
|
|
345
349
|
});
|
|
346
350
|
Logger({ level: "WARN", message: res_error });
|
|
347
351
|
}
|
|
@@ -383,7 +387,7 @@ class Share {
|
|
|
383
387
|
|
|
384
388
|
const xHeaders = {};
|
|
385
389
|
|
|
386
|
-
const response = await
|
|
390
|
+
const response = await ApplicationAPIClient.execute(
|
|
387
391
|
this._conf,
|
|
388
392
|
"get",
|
|
389
393
|
constructUrl({
|
|
@@ -413,15 +417,14 @@ class Share {
|
|
|
413
417
|
|
|
414
418
|
/**
|
|
415
419
|
* @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.
|
|
420
|
+
* @param {string} arg.url - A link or a web address
|
|
421
|
+
* @returns {Promise<QRCodeResp>} - Success response
|
|
422
|
+
* @summary: Create QR Code of a URL
|
|
423
|
+
* @description: Use this API to create a QR code of a URL for sharing it with users who want to visit the link.
|
|
421
424
|
*/
|
|
422
|
-
async
|
|
423
|
-
const { error } = ShareValidator.
|
|
424
|
-
{
|
|
425
|
+
async getUrlQRCode({ url } = {}) {
|
|
426
|
+
const { error } = ShareValidator.getUrlQRCode().validate(
|
|
427
|
+
{ url },
|
|
425
428
|
{ abortEarly: false, allowUnknown: true }
|
|
426
429
|
);
|
|
427
430
|
if (error) {
|
|
@@ -429,38 +432,36 @@ class Share {
|
|
|
429
432
|
}
|
|
430
433
|
|
|
431
434
|
// Showing warrnings if extra unknown parameters are found
|
|
432
|
-
const {
|
|
433
|
-
|
|
434
|
-
} = ShareValidator.getOriginalShortLinkByHash().validate(
|
|
435
|
-
{ hash },
|
|
435
|
+
const { error: warrning } = ShareValidator.getUrlQRCode().validate(
|
|
436
|
+
{ url },
|
|
436
437
|
{ abortEarly: false, allowUnknown: false }
|
|
437
438
|
);
|
|
438
439
|
if (warrning) {
|
|
439
440
|
Logger({
|
|
440
441
|
level: "WARN",
|
|
441
|
-
message:
|
|
442
|
-
"Parameter Validation warrnings for getOriginalShortLinkByHash",
|
|
442
|
+
message: "Parameter Validation warrnings for getUrlQRCode",
|
|
443
443
|
});
|
|
444
444
|
Logger({ level: "WARN", message: warrning });
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
const query_params = {};
|
|
448
|
+
query_params["url"] = url;
|
|
448
449
|
|
|
449
450
|
const xHeaders = {};
|
|
450
451
|
|
|
451
|
-
const response = await
|
|
452
|
+
const response = await ApplicationAPIClient.execute(
|
|
452
453
|
this._conf,
|
|
453
|
-
"
|
|
454
|
+
"post",
|
|
454
455
|
constructUrl({
|
|
455
|
-
url: this._urls["
|
|
456
|
-
params: {
|
|
456
|
+
url: this._urls["getUrlQRCode"],
|
|
457
|
+
params: {},
|
|
457
458
|
}),
|
|
458
459
|
query_params,
|
|
459
460
|
undefined,
|
|
460
461
|
xHeaders
|
|
461
462
|
);
|
|
462
463
|
|
|
463
|
-
const { error: res_error } = ShareModel.
|
|
464
|
+
const { error: res_error } = ShareModel.QRCodeResp().validate(response, {
|
|
464
465
|
abortEarly: false,
|
|
465
466
|
allowUnknown: false,
|
|
466
467
|
});
|
|
@@ -468,7 +469,7 @@ class Share {
|
|
|
468
469
|
if (res_error) {
|
|
469
470
|
Logger({
|
|
470
471
|
level: "WARN",
|
|
471
|
-
message: "Response Validation Warnnings for
|
|
472
|
+
message: "Response Validation Warnnings for getUrlQRCode",
|
|
472
473
|
});
|
|
473
474
|
Logger({ level: "WARN", message: res_error });
|
|
474
475
|
}
|
|
@@ -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
|
}
|