@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1
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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
- package/sdk/application/Cart/CartApplicationModel.js +6 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -14,13 +14,17 @@ class Rewards {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @param {RewardsPlatformApplicationValidator.GetGiveawayByIdParam} arg - Arg object
|
|
17
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
18
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
19
|
* @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
|
|
19
20
|
* @name getGiveawayById
|
|
20
21
|
* @summary: Get giveaway by ID.
|
|
21
22
|
* @description: Retrieve the specific giveaway by giveaway ID. It will show all the details of the requested giveaway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getGiveawayById/).
|
|
22
23
|
*/
|
|
23
|
-
async getGiveawayById(
|
|
24
|
+
async getGiveawayById(
|
|
25
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
26
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
27
|
+
) {
|
|
24
28
|
const {
|
|
25
29
|
error,
|
|
26
30
|
} = RewardsPlatformApplicationValidator.getGiveawayById().validate(
|
|
@@ -57,12 +61,12 @@ class Rewards {
|
|
|
57
61
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways/${id}`,
|
|
58
62
|
query_params,
|
|
59
63
|
undefined,
|
|
60
|
-
|
|
61
|
-
{
|
|
64
|
+
requestHeaders,
|
|
65
|
+
{ responseHeaders }
|
|
62
66
|
);
|
|
63
67
|
|
|
64
68
|
let responseData = response;
|
|
65
|
-
if (
|
|
69
|
+
if (responseHeaders) {
|
|
66
70
|
responseData = response[0];
|
|
67
71
|
}
|
|
68
72
|
|
|
@@ -85,13 +89,17 @@ class Rewards {
|
|
|
85
89
|
|
|
86
90
|
/**
|
|
87
91
|
* @param {RewardsPlatformApplicationValidator.GetOfferByNameParam} arg - Arg object
|
|
92
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
88
93
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
89
94
|
* @returns {Promise<RewardsPlatformModel.Offer>} - Success response
|
|
90
95
|
* @name getOfferByName
|
|
91
96
|
* @summary: Fetch a offer by its name
|
|
92
97
|
* @description: Fetch the specific offer details and configuration by the name of the offer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getOfferByName/).
|
|
93
98
|
*/
|
|
94
|
-
async getOfferByName(
|
|
99
|
+
async getOfferByName(
|
|
100
|
+
{ name, requestHeaders } = { requestHeaders: {} },
|
|
101
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
102
|
+
) {
|
|
95
103
|
const {
|
|
96
104
|
error,
|
|
97
105
|
} = RewardsPlatformApplicationValidator.getOfferByName().validate(
|
|
@@ -124,12 +132,12 @@ class Rewards {
|
|
|
124
132
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${name}/`,
|
|
125
133
|
query_params,
|
|
126
134
|
undefined,
|
|
127
|
-
|
|
128
|
-
{
|
|
135
|
+
requestHeaders,
|
|
136
|
+
{ responseHeaders }
|
|
129
137
|
);
|
|
130
138
|
|
|
131
139
|
let responseData = response;
|
|
132
|
-
if (
|
|
140
|
+
if (responseHeaders) {
|
|
133
141
|
responseData = response[0];
|
|
134
142
|
}
|
|
135
143
|
|
|
@@ -151,13 +159,20 @@ class Rewards {
|
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
/**
|
|
162
|
+
* @param {RewardsPlatformApplicationValidator.GetRewardsConfigurationParam} arg
|
|
163
|
+
* - Arg object
|
|
164
|
+
*
|
|
165
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
154
166
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
155
167
|
* @returns {Promise<RewardsPlatformModel.ConfigurationRes>} - Success response
|
|
156
168
|
* @name getRewardsConfiguration
|
|
157
169
|
* @summary: Get all valid android paths
|
|
158
170
|
* @description: Use this API to get a list of valid android paths required by the Rewards INIT API to validate a fraudulent device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getRewardsConfiguration/).
|
|
159
171
|
*/
|
|
160
|
-
async getRewardsConfiguration(
|
|
172
|
+
async getRewardsConfiguration(
|
|
173
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
174
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
175
|
+
) {
|
|
161
176
|
const {
|
|
162
177
|
error,
|
|
163
178
|
} = RewardsPlatformApplicationValidator.getRewardsConfiguration().validate(
|
|
@@ -190,12 +205,12 @@ class Rewards {
|
|
|
190
205
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration/`,
|
|
191
206
|
query_params,
|
|
192
207
|
undefined,
|
|
193
|
-
|
|
194
|
-
{
|
|
208
|
+
requestHeaders,
|
|
209
|
+
{ responseHeaders }
|
|
195
210
|
);
|
|
196
211
|
|
|
197
212
|
let responseData = response;
|
|
198
|
-
if (
|
|
213
|
+
if (responseHeaders) {
|
|
199
214
|
responseData = response[0];
|
|
200
215
|
}
|
|
201
216
|
|
|
@@ -218,13 +233,17 @@ class Rewards {
|
|
|
218
233
|
|
|
219
234
|
/**
|
|
220
235
|
* @param {RewardsPlatformApplicationValidator.GetUserDetailsParam} arg - Arg object
|
|
236
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
221
237
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
222
238
|
* @returns {Promise<RewardsPlatformModel.UserRes>} - Success response
|
|
223
239
|
* @name getUserDetails
|
|
224
240
|
* @summary: Get user reward details
|
|
225
241
|
* @description: Fetches the user details and the user reward details with their current reward points for the specific user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getUserDetails/).
|
|
226
242
|
*/
|
|
227
|
-
async getUserDetails(
|
|
243
|
+
async getUserDetails(
|
|
244
|
+
{ userId, requestHeaders } = { requestHeaders: {} },
|
|
245
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
246
|
+
) {
|
|
228
247
|
const {
|
|
229
248
|
error,
|
|
230
249
|
} = RewardsPlatformApplicationValidator.getUserDetails().validate(
|
|
@@ -257,12 +276,12 @@ class Rewards {
|
|
|
257
276
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/`,
|
|
258
277
|
query_params,
|
|
259
278
|
undefined,
|
|
260
|
-
|
|
261
|
-
{
|
|
279
|
+
requestHeaders,
|
|
280
|
+
{ responseHeaders }
|
|
262
281
|
);
|
|
263
282
|
|
|
264
283
|
let responseData = response;
|
|
265
|
-
if (
|
|
284
|
+
if (responseHeaders) {
|
|
266
285
|
responseData = response[0];
|
|
267
286
|
}
|
|
268
287
|
|
|
@@ -287,6 +306,7 @@ class Rewards {
|
|
|
287
306
|
* @param {RewardsPlatformApplicationValidator.GetUserPointsHistoryParam} arg
|
|
288
307
|
* - Arg object
|
|
289
308
|
*
|
|
309
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
290
310
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
291
311
|
* @returns {Promise<RewardsPlatformModel.HistoryRes>} - Success response
|
|
292
312
|
* @name getUserPointsHistory
|
|
@@ -294,8 +314,8 @@ class Rewards {
|
|
|
294
314
|
* @description: Fetches a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/getUserPointsHistory/).
|
|
295
315
|
*/
|
|
296
316
|
async getUserPointsHistory(
|
|
297
|
-
{ userId, pageId, pageSize } = {},
|
|
298
|
-
{
|
|
317
|
+
{ userId, pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
318
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
299
319
|
) {
|
|
300
320
|
const {
|
|
301
321
|
error,
|
|
@@ -341,12 +361,12 @@ class Rewards {
|
|
|
341
361
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/points/history/`,
|
|
342
362
|
query_params,
|
|
343
363
|
undefined,
|
|
344
|
-
|
|
345
|
-
{
|
|
364
|
+
requestHeaders,
|
|
365
|
+
{ responseHeaders }
|
|
346
366
|
);
|
|
347
367
|
|
|
348
368
|
let responseData = response;
|
|
349
|
-
if (
|
|
369
|
+
if (responseHeaders) {
|
|
350
370
|
responseData = response[0];
|
|
351
371
|
}
|
|
352
372
|
|
|
@@ -407,13 +427,17 @@ class Rewards {
|
|
|
407
427
|
|
|
408
428
|
/**
|
|
409
429
|
* @param {RewardsPlatformApplicationValidator.SaveGiveAwayParam} arg - Arg object
|
|
430
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
410
431
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
411
432
|
* @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
|
|
412
433
|
* @name saveGiveAway
|
|
413
434
|
* @summary: List of giveaways of the current application.
|
|
414
435
|
* @description: Creates a new giveaway in the current application, specifying the target audience, points allocation, as well as the name and display name of the giveaway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/saveGiveAway/).
|
|
415
436
|
*/
|
|
416
|
-
async saveGiveAway(
|
|
437
|
+
async saveGiveAway(
|
|
438
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
439
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
440
|
+
) {
|
|
417
441
|
const {
|
|
418
442
|
error,
|
|
419
443
|
} = RewardsPlatformApplicationValidator.saveGiveAway().validate(
|
|
@@ -450,12 +474,12 @@ class Rewards {
|
|
|
450
474
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways`,
|
|
451
475
|
query_params,
|
|
452
476
|
body,
|
|
453
|
-
|
|
454
|
-
{
|
|
477
|
+
requestHeaders,
|
|
478
|
+
{ responseHeaders }
|
|
455
479
|
);
|
|
456
480
|
|
|
457
481
|
let responseData = response;
|
|
458
|
-
if (
|
|
482
|
+
if (responseHeaders) {
|
|
459
483
|
responseData = response[0];
|
|
460
484
|
}
|
|
461
485
|
|
|
@@ -480,6 +504,7 @@ class Rewards {
|
|
|
480
504
|
* @param {RewardsPlatformApplicationValidator.SetRewardsConfigurationParam} arg
|
|
481
505
|
* - Arg object
|
|
482
506
|
*
|
|
507
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
483
508
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
484
509
|
* @returns {Promise<RewardsPlatformModel.SetConfigurationRes>} - Success response
|
|
485
510
|
* @name setRewardsConfiguration
|
|
@@ -487,8 +512,8 @@ class Rewards {
|
|
|
487
512
|
* @description: Updates the configuration or inserts new records with the given android paths. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/setRewardsConfiguration/).
|
|
488
513
|
*/
|
|
489
514
|
async setRewardsConfiguration(
|
|
490
|
-
{ body } = {},
|
|
491
|
-
{
|
|
515
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
516
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
492
517
|
) {
|
|
493
518
|
const {
|
|
494
519
|
error,
|
|
@@ -526,12 +551,12 @@ class Rewards {
|
|
|
526
551
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration/`,
|
|
527
552
|
query_params,
|
|
528
553
|
body,
|
|
529
|
-
|
|
530
|
-
{
|
|
554
|
+
requestHeaders,
|
|
555
|
+
{ responseHeaders }
|
|
531
556
|
);
|
|
532
557
|
|
|
533
558
|
let responseData = response;
|
|
534
|
-
if (
|
|
559
|
+
if (responseHeaders) {
|
|
535
560
|
responseData = response[0];
|
|
536
561
|
}
|
|
537
562
|
|
|
@@ -554,6 +579,7 @@ class Rewards {
|
|
|
554
579
|
|
|
555
580
|
/**
|
|
556
581
|
* @param {RewardsPlatformApplicationValidator.ShowGiveawaysParam} arg - Arg object
|
|
582
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
557
583
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
558
584
|
* @returns {Promise<RewardsPlatformModel.GiveawayResponse>} - Success response
|
|
559
585
|
* @name showGiveaways
|
|
@@ -561,8 +587,8 @@ class Rewards {
|
|
|
561
587
|
* @description: Fetch the detailed compilation of live, completed, and scheduled point-based giveaways created. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showGiveaways/).
|
|
562
588
|
*/
|
|
563
589
|
async showGiveaways(
|
|
564
|
-
{ pageId, pageSize } = {},
|
|
565
|
-
{
|
|
590
|
+
{ pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
591
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
566
592
|
) {
|
|
567
593
|
const {
|
|
568
594
|
error,
|
|
@@ -604,12 +630,12 @@ class Rewards {
|
|
|
604
630
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways`,
|
|
605
631
|
query_params,
|
|
606
632
|
undefined,
|
|
607
|
-
|
|
608
|
-
{
|
|
633
|
+
requestHeaders,
|
|
634
|
+
{ responseHeaders }
|
|
609
635
|
);
|
|
610
636
|
|
|
611
637
|
let responseData = response;
|
|
612
|
-
if (
|
|
638
|
+
if (responseHeaders) {
|
|
613
639
|
responseData = response[0];
|
|
614
640
|
}
|
|
615
641
|
|
|
@@ -631,13 +657,18 @@ class Rewards {
|
|
|
631
657
|
}
|
|
632
658
|
|
|
633
659
|
/**
|
|
660
|
+
* @param {RewardsPlatformApplicationValidator.ShowOffersParam} arg - Arg object
|
|
661
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
634
662
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
635
663
|
* @returns {Promise<RewardsPlatformModel.Offer[]>} - Success response
|
|
636
664
|
* @name showOffers
|
|
637
665
|
* @summary: List of offers of the current application.
|
|
638
666
|
* @description: Retrieve the list of offers within the current application, including order_discount, order, sign_up, and referral, along with their respective details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showOffers/).
|
|
639
667
|
*/
|
|
640
|
-
async showOffers(
|
|
668
|
+
async showOffers(
|
|
669
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
670
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
671
|
+
) {
|
|
641
672
|
const { error } = RewardsPlatformApplicationValidator.showOffers().validate(
|
|
642
673
|
{},
|
|
643
674
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -668,12 +699,12 @@ class Rewards {
|
|
|
668
699
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/`,
|
|
669
700
|
query_params,
|
|
670
701
|
undefined,
|
|
671
|
-
|
|
672
|
-
{
|
|
702
|
+
requestHeaders,
|
|
703
|
+
{ responseHeaders }
|
|
673
704
|
);
|
|
674
705
|
|
|
675
706
|
let responseData = response;
|
|
676
|
-
if (
|
|
707
|
+
if (responseHeaders) {
|
|
677
708
|
responseData = response[0];
|
|
678
709
|
}
|
|
679
710
|
|
|
@@ -693,13 +724,17 @@ class Rewards {
|
|
|
693
724
|
|
|
694
725
|
/**
|
|
695
726
|
* @param {RewardsPlatformApplicationValidator.UpdateGiveAwayParam} arg - Arg object
|
|
727
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
696
728
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
697
729
|
* @returns {Promise<RewardsPlatformModel.Giveaway>} - Success response
|
|
698
730
|
* @name updateGiveAway
|
|
699
731
|
* @summary: Updates the giveaway by it's ID.
|
|
700
732
|
* @description: Make the necessary updates to the giveaway based on its giveaway ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateGiveAway/).
|
|
701
733
|
*/
|
|
702
|
-
async updateGiveAway(
|
|
734
|
+
async updateGiveAway(
|
|
735
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
736
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
737
|
+
) {
|
|
703
738
|
const {
|
|
704
739
|
error,
|
|
705
740
|
} = RewardsPlatformApplicationValidator.updateGiveAway().validate(
|
|
@@ -738,12 +773,12 @@ class Rewards {
|
|
|
738
773
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/giveaways/${id}`,
|
|
739
774
|
query_params,
|
|
740
775
|
body,
|
|
741
|
-
|
|
742
|
-
{
|
|
776
|
+
requestHeaders,
|
|
777
|
+
{ responseHeaders }
|
|
743
778
|
);
|
|
744
779
|
|
|
745
780
|
let responseData = response;
|
|
746
|
-
if (
|
|
781
|
+
if (responseHeaders) {
|
|
747
782
|
responseData = response[0];
|
|
748
783
|
}
|
|
749
784
|
|
|
@@ -768,6 +803,7 @@ class Rewards {
|
|
|
768
803
|
* @param {RewardsPlatformApplicationValidator.UpdateOfferByNameParam} arg
|
|
769
804
|
* - Arg object
|
|
770
805
|
*
|
|
806
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
771
807
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
772
808
|
* @returns {Promise<RewardsPlatformModel.Offer>} - Success response
|
|
773
809
|
* @name updateOfferByName
|
|
@@ -775,8 +811,8 @@ class Rewards {
|
|
|
775
811
|
* @description: Update the specific offer details and its configuration by offer name. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateOfferByName/).
|
|
776
812
|
*/
|
|
777
813
|
async updateOfferByName(
|
|
778
|
-
{ name, body } = {},
|
|
779
|
-
{
|
|
814
|
+
{ name, body, requestHeaders } = { requestHeaders: {} },
|
|
815
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
780
816
|
) {
|
|
781
817
|
const {
|
|
782
818
|
error,
|
|
@@ -818,12 +854,12 @@ class Rewards {
|
|
|
818
854
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${name}/`,
|
|
819
855
|
query_params,
|
|
820
856
|
body,
|
|
821
|
-
|
|
822
|
-
{
|
|
857
|
+
requestHeaders,
|
|
858
|
+
{ responseHeaders }
|
|
823
859
|
);
|
|
824
860
|
|
|
825
861
|
let responseData = response;
|
|
826
|
-
if (
|
|
862
|
+
if (responseHeaders) {
|
|
827
863
|
responseData = response[0];
|
|
828
864
|
}
|
|
829
865
|
|
|
@@ -846,6 +882,7 @@ class Rewards {
|
|
|
846
882
|
|
|
847
883
|
/**
|
|
848
884
|
* @param {RewardsPlatformApplicationValidator.UpdateUserStatusParam} arg - Arg object
|
|
885
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
849
886
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
850
887
|
* @returns {Promise<RewardsPlatformModel.AppUser>} - Success response
|
|
851
888
|
* @name updateUserStatus
|
|
@@ -853,8 +890,8 @@ class Rewards {
|
|
|
853
890
|
* @description: Update the user status by marking them as a block or unblock. It can be done by changing the active flag in request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/updateUserStatus/).
|
|
854
891
|
*/
|
|
855
892
|
async updateUserStatus(
|
|
856
|
-
{ userId, body } = {},
|
|
857
|
-
{
|
|
893
|
+
{ userId, body, requestHeaders } = { requestHeaders: {} },
|
|
894
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
858
895
|
) {
|
|
859
896
|
const {
|
|
860
897
|
error,
|
|
@@ -896,12 +933,12 @@ class Rewards {
|
|
|
896
933
|
`/service/platform/rewards/v1.0/company/${this.config.companyId}/application/${this.applicationId}/users/${userId}/`,
|
|
897
934
|
query_params,
|
|
898
935
|
body,
|
|
899
|
-
|
|
900
|
-
{
|
|
936
|
+
requestHeaders,
|
|
937
|
+
{ responseHeaders }
|
|
901
938
|
);
|
|
902
939
|
|
|
903
940
|
let responseData = response;
|
|
904
|
-
if (
|
|
941
|
+
if (responseHeaders) {
|
|
905
942
|
responseData = response[0];
|
|
906
943
|
}
|
|
907
944
|
|
|
@@ -51,11 +51,6 @@ export = RewardsPlatformModel;
|
|
|
51
51
|
* @property {string} [title]
|
|
52
52
|
* @property {string} [updated_at]
|
|
53
53
|
*/
|
|
54
|
-
/**
|
|
55
|
-
* @typedef GiveawayAudience
|
|
56
|
-
* @property {string} [audience_id]
|
|
57
|
-
* @property {number} [current_count]
|
|
58
|
-
*/
|
|
59
54
|
/**
|
|
60
55
|
* @typedef GiveawayResponse
|
|
61
56
|
* @property {Giveaway[]} [items]
|
|
@@ -170,7 +165,7 @@ export = RewardsPlatformModel;
|
|
|
170
165
|
declare class RewardsPlatformModel {
|
|
171
166
|
}
|
|
172
167
|
declare namespace RewardsPlatformModel {
|
|
173
|
-
export { AppUser, Asset, ConfigurationRequest, ConfigurationRes, E, Giveaway,
|
|
168
|
+
export { AppUser, Asset, ConfigurationRequest, ConfigurationRes, E, Giveaway, GiveawayResponse, HistoryRes, Offer, Page, Points, PointsHistory, Referral, RewardsAudience, RewardsRule, RewardUser, Schedule, SetConfigurationRes, ShareMessages, UserRes };
|
|
174
169
|
}
|
|
175
170
|
/** @returns {AppUser} */
|
|
176
171
|
declare function AppUser(): AppUser;
|
|
@@ -236,12 +231,6 @@ type Giveaway = {
|
|
|
236
231
|
title?: string;
|
|
237
232
|
updated_at?: string;
|
|
238
233
|
};
|
|
239
|
-
/** @returns {GiveawayAudience} */
|
|
240
|
-
declare function GiveawayAudience(): GiveawayAudience;
|
|
241
|
-
type GiveawayAudience = {
|
|
242
|
-
audience_id?: string;
|
|
243
|
-
current_count?: number;
|
|
244
|
-
};
|
|
245
234
|
/** @returns {GiveawayResponse} */
|
|
246
235
|
declare function GiveawayResponse(): GiveawayResponse;
|
|
247
236
|
type GiveawayResponse = {
|
|
@@ -58,12 +58,6 @@ const Joi = require("joi");
|
|
|
58
58
|
* @property {string} [updated_at]
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* @typedef GiveawayAudience
|
|
63
|
-
* @property {string} [audience_id]
|
|
64
|
-
* @property {number} [current_count]
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
61
|
/**
|
|
68
62
|
* @typedef GiveawayResponse
|
|
69
63
|
* @property {Giveaway[]} [items]
|
|
@@ -258,14 +252,6 @@ class RewardsPlatformModel {
|
|
|
258
252
|
});
|
|
259
253
|
}
|
|
260
254
|
|
|
261
|
-
/** @returns {GiveawayAudience} */
|
|
262
|
-
static GiveawayAudience() {
|
|
263
|
-
return Joi.object({
|
|
264
|
-
audience_id: Joi.string().allow(""),
|
|
265
|
-
current_count: Joi.number(),
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
255
|
/** @returns {GiveawayResponse} */
|
|
270
256
|
static GiveawayResponse() {
|
|
271
257
|
return Joi.object({
|