@gofynd/fdk-client-javascript 1.4.15-beta.14 → 1.4.15-beta.15
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 +23 -26
- package/package.json +5 -1
- package/sdk/application/ApplicationClient.d.ts +5 -6
- package/sdk/application/ApplicationClient.js +24 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
- package/sdk/application/Cart/CartApplicationClient.js +444 -76
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
- package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
- package/sdk/application/Content/ContentApplicationClient.js +274 -111
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
- package/sdk/application/Lead/LeadApplicationClient.js +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
- package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
- package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
- package/sdk/application/Order/OrderApplicationClient.js +217 -17
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
- package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
- package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
- package/sdk/application/User/UserApplicationClient.d.ts +103 -53
- package/sdk/application/User/UserApplicationClient.js +308 -49
- package/sdk/common/AxiosHelper.js +11 -4
- package/sdk/common/Constant.d.ts +27 -4
- package/sdk/common/Constant.js +33 -6
- package/sdk/common/utils.d.ts +10 -0
- package/sdk/common/utils.js +24 -3
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
- package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
- package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
- package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
- package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
- package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
- package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
- package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9573 -2678
- package/sdk/platform/Catalog/CatalogPlatformModel.js +5033 -1973
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
- package/sdk/platform/Common/CommonPlatformModel.js +25 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
- package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
- package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
- package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
- package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
- package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
- package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
- package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
- package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
- package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
- package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
- package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
- package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/PlatformClient.d.ts +5 -4
- package/sdk/platform/PlatformClient.js +32 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
- package/sdk/platform/Share/SharePlatformModel.js +31 -6
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
- package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
- package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
- package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
- package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
- package/sdk/platform/User/UserPlatformModel.js +607 -46
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
- package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
- package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -2
- package/sdk/platform/index.js +0 -4
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
- package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
- package/sdk/public/Content/ContentPublicClient.js +1067 -17
- package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
- package/sdk/public/Content/ContentPublicModel.js +751 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
- package/sdk/public/Content/ContentPublicValidator.js +119 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +1 -1
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +5 -2
- package/sdk/public/PublicClient.js +16 -6
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/utility.d.ts +3 -0
- package/utility.js +7 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
- package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef E
|
|
5
|
-
* @property {number} [code]
|
|
6
|
-
* @property {string} [exception]
|
|
7
|
-
* @property {string} [info]
|
|
8
|
-
* @property {string} [message]
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef GiveawayResponse
|
|
13
|
-
* @property {Giveaway[]} [items]
|
|
14
|
-
* @property {Page} [page]
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @typedef Giveaway
|
|
19
|
-
* @property {string} [_id]
|
|
20
|
-
* @property {Schedule} [_schedule]
|
|
21
|
-
* @property {boolean} [active]
|
|
22
|
-
* @property {string} [application_id]
|
|
23
|
-
* @property {RewardsAudience} [audience]
|
|
24
|
-
* @property {Asset} [banner_image]
|
|
25
|
-
* @property {string} [created_at]
|
|
26
|
-
* @property {string} [description]
|
|
27
|
-
* @property {string} [name]
|
|
28
|
-
* @property {RewardsRule} [rule]
|
|
29
|
-
* @property {string} [title]
|
|
30
|
-
* @property {string} [updated_at]
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @typedef Schedule
|
|
35
|
-
* @property {number} [duration]
|
|
36
|
-
* @property {string} [end]
|
|
37
|
-
* @property {string} [start]
|
|
38
|
-
* @property {string} [cron]
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @typedef RewardsAudience
|
|
43
|
-
* @property {string} [header_user_id]
|
|
44
|
-
* @property {string} [id]
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @typedef Asset
|
|
49
|
-
* @property {string} [aspect_ratio]
|
|
50
|
-
* @property {string} [id]
|
|
51
|
-
* @property {string} [secure_url]
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @typedef RewardsRule
|
|
56
|
-
* @property {number} [amount]
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @typedef Page
|
|
61
|
-
* @property {number} [item_total] - The total number of items on the page.
|
|
62
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
63
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
64
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
65
|
-
* @property {number} [current] - The current page number.
|
|
66
|
-
* @property {string} type - The type of the page, such as 'PageType'.
|
|
67
|
-
* @property {number} [size] - The number of items per page.
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @typedef Offer
|
|
72
|
-
* @property {Schedule} [_schedule]
|
|
73
|
-
* @property {boolean} [active]
|
|
74
|
-
* @property {string} [application_id]
|
|
75
|
-
* @property {Asset} [banner_image]
|
|
76
|
-
* @property {string} [created_at]
|
|
77
|
-
* @property {string} [name]
|
|
78
|
-
* @property {Object} [rule]
|
|
79
|
-
* @property {ShareMessages} [share]
|
|
80
|
-
* @property {string} [sub_text]
|
|
81
|
-
* @property {string} [text]
|
|
82
|
-
* @property {string} [type]
|
|
83
|
-
* @property {string} [updated_at]
|
|
84
|
-
* @property {string} [updated_by]
|
|
85
|
-
* @property {string} [url]
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @typedef ShareMessages
|
|
90
|
-
* @property {number} [email]
|
|
91
|
-
* @property {string} [facebook]
|
|
92
|
-
* @property {string} [fallback]
|
|
93
|
-
* @property {string} [message]
|
|
94
|
-
* @property {string} [messenger]
|
|
95
|
-
* @property {string} [sms]
|
|
96
|
-
* @property {string} [text]
|
|
97
|
-
* @property {string} [twitter]
|
|
98
|
-
* @property {string} [whatsapp]
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @typedef UserRes
|
|
103
|
-
* @property {Points} [points]
|
|
104
|
-
* @property {RewardUser} [user]
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @typedef Points
|
|
109
|
-
* @property {number} [available]
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @typedef RewardUser
|
|
114
|
-
* @property {string} [_id]
|
|
115
|
-
* @property {boolean} [active]
|
|
116
|
-
* @property {string} [created_at]
|
|
117
|
-
* @property {Referral} [referral]
|
|
118
|
-
* @property {number} [uid]
|
|
119
|
-
* @property {string} [updated_at]
|
|
120
|
-
* @property {string} [user_block_reason]
|
|
121
|
-
* @property {string} [user_id]
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* @typedef Referral
|
|
126
|
-
* @property {string} [code]
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @typedef AppUser
|
|
131
|
-
* @property {string} [_id]
|
|
132
|
-
* @property {boolean} [active]
|
|
133
|
-
* @property {string} [application_id]
|
|
134
|
-
* @property {string} [block_reason]
|
|
135
|
-
* @property {string} [updated_at]
|
|
136
|
-
* @property {string} [updated_by]
|
|
137
|
-
* @property {string} [user_id]
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @typedef HistoryRes
|
|
142
|
-
* @property {PointsHistory[]} [items] - History is the list of points transaction.
|
|
143
|
-
* @property {Page} [page]
|
|
144
|
-
* @property {number} [points]
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @typedef PointsHistory
|
|
149
|
-
* @property {string} [_id]
|
|
150
|
-
* @property {string} [application_id]
|
|
151
|
-
* @property {boolean} [claimed]
|
|
152
|
-
* @property {string} [created_at]
|
|
153
|
-
* @property {string} [expires_on]
|
|
154
|
-
* @property {Object} [meta]
|
|
155
|
-
* @property {number} [points]
|
|
156
|
-
* @property {number} [remaining_points]
|
|
157
|
-
* @property {string} [text_1]
|
|
158
|
-
* @property {string} [text_2]
|
|
159
|
-
* @property {string} [text_3]
|
|
160
|
-
* @property {string} [txn_name]
|
|
161
|
-
* @property {string} [updated_at]
|
|
162
|
-
* @property {string} [user_id]
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @typedef ConfigurationRes
|
|
167
|
-
* @property {string[]} [valid_android_packages] - Contains array of string
|
|
168
|
-
* items, Valid android package names.
|
|
169
|
-
* @property {string} [terms_conditions_link] - A URL that redirects to the
|
|
170
|
-
* referral information suport page link
|
|
171
|
-
* @property {string} [application_id]
|
|
172
|
-
* @property {boolean} [success]
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @typedef SetConfigurationRes
|
|
177
|
-
* @property {boolean} [success]
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @typedef ConfigurationRequest
|
|
182
|
-
* @property {string[]} [valid_android_packages]
|
|
183
|
-
* @property {string} [terms_conditions_link]
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
class RewardsPlatformModel {
|
|
187
|
-
/** @returns {E} */
|
|
188
|
-
static E() {
|
|
189
|
-
return Joi.object({
|
|
190
|
-
code: Joi.number(),
|
|
191
|
-
exception: Joi.string().allow(""),
|
|
192
|
-
info: Joi.string().allow(""),
|
|
193
|
-
message: Joi.string().allow(""),
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** @returns {GiveawayResponse} */
|
|
198
|
-
static GiveawayResponse() {
|
|
199
|
-
return Joi.object({
|
|
200
|
-
items: Joi.array().items(RewardsPlatformModel.Giveaway()),
|
|
201
|
-
page: RewardsPlatformModel.Page(),
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/** @returns {Giveaway} */
|
|
206
|
-
static Giveaway() {
|
|
207
|
-
return Joi.object({
|
|
208
|
-
_id: Joi.string().allow(""),
|
|
209
|
-
_schedule: RewardsPlatformModel.Schedule(),
|
|
210
|
-
active: Joi.boolean(),
|
|
211
|
-
application_id: Joi.string().allow(""),
|
|
212
|
-
audience: RewardsPlatformModel.RewardsAudience(),
|
|
213
|
-
banner_image: RewardsPlatformModel.Asset(),
|
|
214
|
-
created_at: Joi.string().allow(""),
|
|
215
|
-
description: Joi.string().allow(""),
|
|
216
|
-
name: Joi.string().allow(""),
|
|
217
|
-
rule: RewardsPlatformModel.RewardsRule(),
|
|
218
|
-
title: Joi.string().allow(""),
|
|
219
|
-
updated_at: Joi.string().allow(""),
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/** @returns {Schedule} */
|
|
224
|
-
static Schedule() {
|
|
225
|
-
return Joi.object({
|
|
226
|
-
duration: Joi.number(),
|
|
227
|
-
end: Joi.string().allow(""),
|
|
228
|
-
start: Joi.string().allow(""),
|
|
229
|
-
cron: Joi.string().allow(""),
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** @returns {RewardsAudience} */
|
|
234
|
-
static RewardsAudience() {
|
|
235
|
-
return Joi.object({
|
|
236
|
-
header_user_id: Joi.string().allow(""),
|
|
237
|
-
id: Joi.string().allow(""),
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/** @returns {Asset} */
|
|
242
|
-
static Asset() {
|
|
243
|
-
return Joi.object({
|
|
244
|
-
aspect_ratio: Joi.string().allow(""),
|
|
245
|
-
id: Joi.string().allow(""),
|
|
246
|
-
secure_url: Joi.string().allow(""),
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/** @returns {RewardsRule} */
|
|
251
|
-
static RewardsRule() {
|
|
252
|
-
return Joi.object({
|
|
253
|
-
amount: Joi.number(),
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/** @returns {Page} */
|
|
258
|
-
static Page() {
|
|
259
|
-
return Joi.object({
|
|
260
|
-
item_total: Joi.number(),
|
|
261
|
-
next_id: Joi.string().allow(""),
|
|
262
|
-
has_previous: Joi.boolean(),
|
|
263
|
-
has_next: Joi.boolean(),
|
|
264
|
-
current: Joi.number(),
|
|
265
|
-
type: Joi.string().allow("").required(),
|
|
266
|
-
size: Joi.number(),
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/** @returns {Offer} */
|
|
271
|
-
static Offer() {
|
|
272
|
-
return Joi.object({
|
|
273
|
-
_schedule: RewardsPlatformModel.Schedule(),
|
|
274
|
-
active: Joi.boolean(),
|
|
275
|
-
application_id: Joi.string().allow(""),
|
|
276
|
-
banner_image: RewardsPlatformModel.Asset(),
|
|
277
|
-
created_at: Joi.string().allow(""),
|
|
278
|
-
name: Joi.string().allow(""),
|
|
279
|
-
rule: Joi.any(),
|
|
280
|
-
share: RewardsPlatformModel.ShareMessages(),
|
|
281
|
-
sub_text: Joi.string().allow(""),
|
|
282
|
-
text: Joi.string().allow(""),
|
|
283
|
-
type: Joi.string().allow(""),
|
|
284
|
-
updated_at: Joi.string().allow(""),
|
|
285
|
-
updated_by: Joi.string().allow(""),
|
|
286
|
-
url: Joi.string().allow(""),
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/** @returns {ShareMessages} */
|
|
291
|
-
static ShareMessages() {
|
|
292
|
-
return Joi.object({
|
|
293
|
-
email: Joi.number(),
|
|
294
|
-
facebook: Joi.string().allow(""),
|
|
295
|
-
fallback: Joi.string().allow(""),
|
|
296
|
-
message: Joi.string().allow(""),
|
|
297
|
-
messenger: Joi.string().allow(""),
|
|
298
|
-
sms: Joi.string().allow(""),
|
|
299
|
-
text: Joi.string().allow(""),
|
|
300
|
-
twitter: Joi.string().allow(""),
|
|
301
|
-
whatsapp: Joi.string().allow(""),
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/** @returns {UserRes} */
|
|
306
|
-
static UserRes() {
|
|
307
|
-
return Joi.object({
|
|
308
|
-
points: RewardsPlatformModel.Points(),
|
|
309
|
-
user: RewardsPlatformModel.RewardUser(),
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/** @returns {Points} */
|
|
314
|
-
static Points() {
|
|
315
|
-
return Joi.object({
|
|
316
|
-
available: Joi.number(),
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/** @returns {RewardUser} */
|
|
321
|
-
static RewardUser() {
|
|
322
|
-
return Joi.object({
|
|
323
|
-
_id: Joi.string().allow(""),
|
|
324
|
-
active: Joi.boolean(),
|
|
325
|
-
created_at: Joi.string().allow(""),
|
|
326
|
-
referral: RewardsPlatformModel.Referral(),
|
|
327
|
-
uid: Joi.number(),
|
|
328
|
-
updated_at: Joi.string().allow(""),
|
|
329
|
-
user_block_reason: Joi.string().allow(""),
|
|
330
|
-
user_id: Joi.string().allow(""),
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/** @returns {Referral} */
|
|
335
|
-
static Referral() {
|
|
336
|
-
return Joi.object({
|
|
337
|
-
code: Joi.string().allow(""),
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/** @returns {AppUser} */
|
|
342
|
-
static AppUser() {
|
|
343
|
-
return Joi.object({
|
|
344
|
-
_id: Joi.string().allow(""),
|
|
345
|
-
active: Joi.boolean(),
|
|
346
|
-
application_id: Joi.string().allow(""),
|
|
347
|
-
block_reason: Joi.string().allow(""),
|
|
348
|
-
updated_at: Joi.string().allow(""),
|
|
349
|
-
updated_by: Joi.string().allow(""),
|
|
350
|
-
user_id: Joi.string().allow(""),
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/** @returns {HistoryRes} */
|
|
355
|
-
static HistoryRes() {
|
|
356
|
-
return Joi.object({
|
|
357
|
-
items: Joi.array().items(RewardsPlatformModel.PointsHistory()),
|
|
358
|
-
page: RewardsPlatformModel.Page(),
|
|
359
|
-
points: Joi.number(),
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/** @returns {PointsHistory} */
|
|
364
|
-
static PointsHistory() {
|
|
365
|
-
return Joi.object({
|
|
366
|
-
_id: Joi.string().allow(""),
|
|
367
|
-
application_id: Joi.string().allow(""),
|
|
368
|
-
claimed: Joi.boolean(),
|
|
369
|
-
created_at: Joi.string().allow(""),
|
|
370
|
-
expires_on: Joi.string().allow(""),
|
|
371
|
-
meta: Joi.any(),
|
|
372
|
-
points: Joi.number(),
|
|
373
|
-
remaining_points: Joi.number(),
|
|
374
|
-
text_1: Joi.string().allow(""),
|
|
375
|
-
text_2: Joi.string().allow(""),
|
|
376
|
-
text_3: Joi.string().allow(""),
|
|
377
|
-
txn_name: Joi.string().allow(""),
|
|
378
|
-
updated_at: Joi.string().allow(""),
|
|
379
|
-
user_id: Joi.string().allow(""),
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/** @returns {ConfigurationRes} */
|
|
384
|
-
static ConfigurationRes() {
|
|
385
|
-
return Joi.object({
|
|
386
|
-
valid_android_packages: Joi.array().items(Joi.string().allow("")),
|
|
387
|
-
terms_conditions_link: Joi.string().allow(""),
|
|
388
|
-
application_id: Joi.string().allow(""),
|
|
389
|
-
success: Joi.boolean(),
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/** @returns {SetConfigurationRes} */
|
|
394
|
-
static SetConfigurationRes() {
|
|
395
|
-
return Joi.object({
|
|
396
|
-
success: Joi.boolean(),
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/** @returns {ConfigurationRequest} */
|
|
401
|
-
static ConfigurationRequest() {
|
|
402
|
-
return Joi.object({
|
|
403
|
-
valid_android_packages: Joi.array().items(Joi.string().allow("")),
|
|
404
|
-
terms_conditions_link: Joi.string().allow(""),
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
module.exports = RewardsPlatformModel;
|