@gofynd/fdk-client-javascript 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation/application/CART.md +251 -251
- package/documentation/application/CATALOG.md +414 -414
- package/documentation/application/CONTENT.md +15 -1
- package/documentation/application/ORDER.md +290 -290
- package/documentation/application/PAYMENT.md +255 -255
- package/documentation/application/POSCART.md +297 -297
- package/documentation/platform/CART.md +499 -499
- package/documentation/platform/CATALOG.md +3088 -2702
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/CONTENT.md +123 -1
- package/documentation/platform/ORDER.md +1233 -1158
- package/documentation/platform/PARTNER.md +7 -7
- package/documentation/platform/PAYMENT.md +83 -83
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +619 -108
- package/sdk/application/Cart/CartApplicationModel.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationModel.js +335 -335
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +1 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +730 -134
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +21 -21
- package/sdk/application/Catalog/CatalogApplicationModel.js +547 -547
- package/sdk/application/Common/CommonApplicationClient.js +48 -8
- package/sdk/application/Communication/CommunicationApplicationClient.js +75 -14
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +1 -1
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +392 -66
- package/sdk/application/Content/ContentApplicationClient.js +444 -76
- package/sdk/application/Content/ContentApplicationModel.d.ts +1 -0
- package/sdk/application/Content/ContentApplicationModel.js +11 -1
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -12
- package/sdk/application/Lead/LeadApplicationClient.js +164 -30
- package/sdk/application/Logistic/LogisticApplicationClient.js +98 -16
- package/sdk/application/Order/OrderApplicationClient.d.ts +1 -1
- package/sdk/application/Order/OrderApplicationClient.js +287 -54
- package/sdk/application/Order/OrderApplicationModel.d.ts +19 -19
- package/sdk/application/Order/OrderApplicationModel.js +357 -357
- package/sdk/application/Payment/PaymentApplicationClient.js +961 -186
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3 -3
- package/sdk/application/Payment/PaymentApplicationModel.js +352 -352
- package/sdk/application/PosCart/PosCartApplicationClient.js +645 -114
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +15 -15
- package/sdk/application/PosCart/PosCartApplicationModel.js +389 -389
- package/sdk/application/Rewards/RewardsApplicationClient.js +168 -28
- package/sdk/application/Share/ShareApplicationClient.js +157 -32
- package/sdk/application/Theme/ThemeApplicationClient.js +94 -16
- package/sdk/application/User/UserApplicationClient.js +806 -148
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +16 -8
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +191 -34
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +103 -16
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +299 -54
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -17
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +409 -72
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -35
- package/sdk/platform/Cart/CartPlatformModel.js +617 -617
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +167 -114
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1562 -453
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +39 -39
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +314 -196
- package/sdk/platform/Catalog/CatalogPlatformClient.js +2459 -718
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +103 -94
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2063 -1797
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +17 -15
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +95 -76
- package/sdk/platform/Common/CommonPlatformClient.d.ts +4 -2
- package/sdk/platform/Common/CommonPlatformClient.js +51 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -40
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1000 -168
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +27 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +335 -54
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +10 -10
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +278 -278
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +56 -28
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +702 -118
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +457 -82
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +148 -67
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1724 -284
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +4 -0
- package/sdk/platform/Content/ContentPlatformModel.js +43 -1
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +21 -10
- package/sdk/platform/Discount/DiscountPlatformClient.js +270 -44
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +102 -16
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +12 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +150 -24
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +27 -14
- package/sdk/platform/Inventory/InventoryPlatformClient.js +316 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +311 -52
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +22 -11
- package/sdk/platform/Lead/LeadPlatformClient.js +266 -44
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -3
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +78 -14
- package/sdk/platform/Order/OrderPlatformClient.d.ts +95 -43
- package/sdk/platform/Order/OrderPlatformClient.js +1062 -180
- package/sdk/platform/Order/OrderPlatformModel.d.ts +64 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1481 -1425
- package/sdk/platform/Order/OrderPlatformValidator.js +5 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +22 -11
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +287 -56
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +21 -11
- package/sdk/platform/Payment/PaymentPlatformClient.js +263 -48
- package/sdk/platform/Payment/PaymentPlatformModel.js +122 -122
- package/sdk/platform/PlatformApplicationClient.d.ts +2959 -2787
- package/sdk/platform/PlatformApplicationClient.js +3420 -3212
- package/sdk/platform/PlatformClient.d.ts +2959 -2787
- package/sdk/platform/PlatformClient.js +3420 -3212
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +26 -13
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +308 -54
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +8 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +94 -16
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +47 -23
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +571 -96
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +24 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +296 -48
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +12 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +157 -30
- package/sdk/public/Configuration/ConfigurationPublicClient.js +51 -8
- package/sdk/public/Inventory/InventoryPublicClient.js +149 -26
- package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
|
@@ -6,12 +6,13 @@ declare class Share {
|
|
|
6
6
|
/**
|
|
7
7
|
* @param {Object} arg - Arg object.
|
|
8
8
|
* @param {ShortLinkReq} arg.body
|
|
9
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
9
10
|
* @summary: Create short link
|
|
10
11
|
* @description: Create short link
|
|
11
12
|
*/
|
|
12
13
|
createShortLink({ body }?: {
|
|
13
14
|
body: ShortLinkReq;
|
|
14
|
-
}): Promise<
|
|
15
|
+
}): Promise<ShortLinkRes>;
|
|
15
16
|
/**
|
|
16
17
|
* @param {Object} arg - Arg object.
|
|
17
18
|
* @param {number} [arg.pageNo] - Current page number
|
|
@@ -19,6 +20,7 @@ declare class Share {
|
|
|
19
20
|
* @param {string} [arg.createdBy] - Short link creator
|
|
20
21
|
* @param {string} [arg.active] - Short link active status
|
|
21
22
|
* @param {string} [arg.q] - Search text for original and short url
|
|
23
|
+
* @returns {Promise<ShortLinkList>} - Success response
|
|
22
24
|
* @summary: Get short links
|
|
23
25
|
* @description: Get short links
|
|
24
26
|
*/
|
|
@@ -28,7 +30,7 @@ declare class Share {
|
|
|
28
30
|
createdBy?: string;
|
|
29
31
|
active?: string;
|
|
30
32
|
q?: string;
|
|
31
|
-
}): Promise<
|
|
33
|
+
}): Promise<ShortLinkList>;
|
|
32
34
|
/**
|
|
33
35
|
* @param {Object} arg - Arg object.
|
|
34
36
|
* @param {string} arg.companyId - Company Id
|
|
@@ -51,22 +53,24 @@ declare class Share {
|
|
|
51
53
|
/**
|
|
52
54
|
* @param {Object} arg - Arg object.
|
|
53
55
|
* @param {string} arg.hash - Hash of short url
|
|
56
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
54
57
|
* @summary: Get short link by hash
|
|
55
58
|
* @description: Get short link by hash
|
|
56
59
|
*/
|
|
57
60
|
getShortLinkByHash({ hash }?: {
|
|
58
61
|
hash: string;
|
|
59
|
-
}): Promise<
|
|
62
|
+
}): Promise<ShortLinkRes>;
|
|
60
63
|
/**
|
|
61
64
|
* @param {Object} arg - Arg object.
|
|
62
65
|
* @param {string} arg.id - Short link document identifier
|
|
63
66
|
* @param {ShortLinkReq} arg.body
|
|
67
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
64
68
|
* @summary: Update short link by id
|
|
65
69
|
* @description: Update short link by id
|
|
66
70
|
*/
|
|
67
71
|
updateShortLinkById({ id, body }?: {
|
|
68
72
|
id: string;
|
|
69
73
|
body: ShortLinkReq;
|
|
70
|
-
}): Promise<
|
|
74
|
+
}): Promise<ShortLinkRes>;
|
|
71
75
|
}
|
|
72
76
|
import Paginator = require("../../common/Paginator");
|
|
@@ -2,6 +2,8 @@ const Paginator = require("../../common/Paginator");
|
|
|
2
2
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
3
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
4
|
const ShareValidator = require("./SharePlatformApplicationValidator");
|
|
5
|
+
const ShareModel = require("./SharePlatformModel");
|
|
6
|
+
const { Logger } = require("./../../common/Logger");
|
|
5
7
|
|
|
6
8
|
class Share {
|
|
7
9
|
constructor(config, applicationId) {
|
|
@@ -12,10 +14,11 @@ class Share {
|
|
|
12
14
|
/**
|
|
13
15
|
* @param {Object} arg - Arg object.
|
|
14
16
|
* @param {ShortLinkReq} arg.body
|
|
17
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
15
18
|
* @summary: Create short link
|
|
16
19
|
* @description: Create short link
|
|
17
20
|
*/
|
|
18
|
-
createShortLink({ body } = {}) {
|
|
21
|
+
async createShortLink({ body } = {}) {
|
|
19
22
|
const { error } = ShareValidator.createShortLink().validate(
|
|
20
23
|
{
|
|
21
24
|
body,
|
|
@@ -34,19 +37,37 @@ class Share {
|
|
|
34
37
|
{ abortEarly: false, allowUnknown: false }
|
|
35
38
|
);
|
|
36
39
|
if (warrning) {
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
Logger({
|
|
41
|
+
level: "WARN",
|
|
42
|
+
message: "Parameter Validation warrnings for createShortLink",
|
|
43
|
+
});
|
|
44
|
+
Logger({ level: "WARN", message: warrning });
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
const query_params = {};
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
const response = await PlatformAPIClient.execute(
|
|
44
50
|
this.config,
|
|
45
51
|
"post",
|
|
46
52
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/`,
|
|
47
53
|
query_params,
|
|
48
54
|
body
|
|
49
55
|
);
|
|
56
|
+
|
|
57
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
58
|
+
abortEarly: false,
|
|
59
|
+
allowUnknown: false,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
if (res_error) {
|
|
63
|
+
Logger({
|
|
64
|
+
level: "WARN",
|
|
65
|
+
message: "Response Validation Warnnings for createShortLink",
|
|
66
|
+
});
|
|
67
|
+
Logger({ level: "WARN", message: res_error });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return response;
|
|
50
71
|
}
|
|
51
72
|
|
|
52
73
|
/**
|
|
@@ -56,10 +77,11 @@ class Share {
|
|
|
56
77
|
* @param {string} [arg.createdBy] - Short link creator
|
|
57
78
|
* @param {string} [arg.active] - Short link active status
|
|
58
79
|
* @param {string} [arg.q] - Search text for original and short url
|
|
80
|
+
* @returns {Promise<ShortLinkList>} - Success response
|
|
59
81
|
* @summary: Get short links
|
|
60
82
|
* @description: Get short links
|
|
61
83
|
*/
|
|
62
|
-
getShortLinks({ pageNo, pageSize, createdBy, active, q } = {}) {
|
|
84
|
+
async getShortLinks({ pageNo, pageSize, createdBy, active, q } = {}) {
|
|
63
85
|
const { error } = ShareValidator.getShortLinks().validate(
|
|
64
86
|
{
|
|
65
87
|
pageNo,
|
|
@@ -86,8 +108,11 @@ class Share {
|
|
|
86
108
|
{ abortEarly: false, allowUnknown: false }
|
|
87
109
|
);
|
|
88
110
|
if (warrning) {
|
|
89
|
-
|
|
90
|
-
|
|
111
|
+
Logger({
|
|
112
|
+
level: "WARN",
|
|
113
|
+
message: "Parameter Validation warrnings for getShortLinks",
|
|
114
|
+
});
|
|
115
|
+
Logger({ level: "WARN", message: warrning });
|
|
91
116
|
}
|
|
92
117
|
|
|
93
118
|
const query_params = {};
|
|
@@ -97,13 +122,28 @@ class Share {
|
|
|
97
122
|
query_params["active"] = active;
|
|
98
123
|
query_params["q"] = q;
|
|
99
124
|
|
|
100
|
-
|
|
125
|
+
const response = await PlatformAPIClient.execute(
|
|
101
126
|
this.config,
|
|
102
127
|
"get",
|
|
103
128
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/`,
|
|
104
129
|
query_params,
|
|
105
130
|
undefined
|
|
106
131
|
);
|
|
132
|
+
|
|
133
|
+
const { error: res_error } = ShareModel.ShortLinkList().validate(response, {
|
|
134
|
+
abortEarly: false,
|
|
135
|
+
allowUnknown: false,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
if (res_error) {
|
|
139
|
+
Logger({
|
|
140
|
+
level: "WARN",
|
|
141
|
+
message: "Response Validation Warnnings for getShortLinks",
|
|
142
|
+
});
|
|
143
|
+
Logger({ level: "WARN", message: res_error });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return response;
|
|
107
147
|
}
|
|
108
148
|
|
|
109
149
|
/**
|
|
@@ -152,10 +192,11 @@ class Share {
|
|
|
152
192
|
/**
|
|
153
193
|
* @param {Object} arg - Arg object.
|
|
154
194
|
* @param {string} arg.hash - Hash of short url
|
|
195
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
155
196
|
* @summary: Get short link by hash
|
|
156
197
|
* @description: Get short link by hash
|
|
157
198
|
*/
|
|
158
|
-
getShortLinkByHash({ hash } = {}) {
|
|
199
|
+
async getShortLinkByHash({ hash } = {}) {
|
|
159
200
|
const { error } = ShareValidator.getShortLinkByHash().validate(
|
|
160
201
|
{
|
|
161
202
|
hash,
|
|
@@ -174,29 +215,48 @@ class Share {
|
|
|
174
215
|
{ abortEarly: false, allowUnknown: false }
|
|
175
216
|
);
|
|
176
217
|
if (warrning) {
|
|
177
|
-
|
|
178
|
-
|
|
218
|
+
Logger({
|
|
219
|
+
level: "WARN",
|
|
220
|
+
message: "Parameter Validation warrnings for getShortLinkByHash",
|
|
221
|
+
});
|
|
222
|
+
Logger({ level: "WARN", message: warrning });
|
|
179
223
|
}
|
|
180
224
|
|
|
181
225
|
const query_params = {};
|
|
182
226
|
|
|
183
|
-
|
|
227
|
+
const response = await PlatformAPIClient.execute(
|
|
184
228
|
this.config,
|
|
185
229
|
"get",
|
|
186
230
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${hash}/`,
|
|
187
231
|
query_params,
|
|
188
232
|
undefined
|
|
189
233
|
);
|
|
234
|
+
|
|
235
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
236
|
+
abortEarly: false,
|
|
237
|
+
allowUnknown: false,
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
if (res_error) {
|
|
241
|
+
Logger({
|
|
242
|
+
level: "WARN",
|
|
243
|
+
message: "Response Validation Warnnings for getShortLinkByHash",
|
|
244
|
+
});
|
|
245
|
+
Logger({ level: "WARN", message: res_error });
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return response;
|
|
190
249
|
}
|
|
191
250
|
|
|
192
251
|
/**
|
|
193
252
|
* @param {Object} arg - Arg object.
|
|
194
253
|
* @param {string} arg.id - Short link document identifier
|
|
195
254
|
* @param {ShortLinkReq} arg.body
|
|
255
|
+
* @returns {Promise<ShortLinkRes>} - Success response
|
|
196
256
|
* @summary: Update short link by id
|
|
197
257
|
* @description: Update short link by id
|
|
198
258
|
*/
|
|
199
|
-
updateShortLinkById({ id, body } = {}) {
|
|
259
|
+
async updateShortLinkById({ id, body } = {}) {
|
|
200
260
|
const { error } = ShareValidator.updateShortLinkById().validate(
|
|
201
261
|
{
|
|
202
262
|
id,
|
|
@@ -217,19 +277,37 @@ class Share {
|
|
|
217
277
|
{ abortEarly: false, allowUnknown: false }
|
|
218
278
|
);
|
|
219
279
|
if (warrning) {
|
|
220
|
-
|
|
221
|
-
|
|
280
|
+
Logger({
|
|
281
|
+
level: "WARN",
|
|
282
|
+
message: "Parameter Validation warrnings for updateShortLinkById",
|
|
283
|
+
});
|
|
284
|
+
Logger({ level: "WARN", message: warrning });
|
|
222
285
|
}
|
|
223
286
|
|
|
224
287
|
const query_params = {};
|
|
225
288
|
|
|
226
|
-
|
|
289
|
+
const response = await PlatformAPIClient.execute(
|
|
227
290
|
this.config,
|
|
228
291
|
"patch",
|
|
229
292
|
`/service/platform/share/v1.0/company/${this.config.companyId}/application/${this.applicationId}/links/short-link/${id}/`,
|
|
230
293
|
query_params,
|
|
231
294
|
body
|
|
232
295
|
);
|
|
296
|
+
|
|
297
|
+
const { error: res_error } = ShareModel.ShortLinkRes().validate(response, {
|
|
298
|
+
abortEarly: false,
|
|
299
|
+
allowUnknown: false,
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
if (res_error) {
|
|
303
|
+
Logger({
|
|
304
|
+
level: "WARN",
|
|
305
|
+
message: "Response Validation Warnnings for updateShortLinkById",
|
|
306
|
+
});
|
|
307
|
+
Logger({ level: "WARN", message: res_error });
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return response;
|
|
233
311
|
}
|
|
234
312
|
}
|
|
235
313
|
module.exports = Share;
|
|
@@ -6,50 +6,55 @@ declare class Theme {
|
|
|
6
6
|
/**
|
|
7
7
|
* @param {Object} arg - Arg object.
|
|
8
8
|
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
9
|
+
* @returns {Promise<AllAvailablePageSchema>} - Success response
|
|
9
10
|
* @summary: Get all pages of a theme
|
|
10
11
|
* @description: Use this API to retrieve all the available pages of a theme by its ID.
|
|
11
12
|
*/
|
|
12
13
|
getAllPages({ themeId }?: {
|
|
13
14
|
themeId: string;
|
|
14
|
-
}): Promise<
|
|
15
|
+
}): Promise<AllAvailablePageSchema>;
|
|
15
16
|
/**
|
|
16
17
|
* @param {Object} arg - Arg object.
|
|
17
18
|
* @param {string} arg.themeId - ID of the theme
|
|
18
19
|
* @param {AvailablePageSchema} arg.body
|
|
20
|
+
* @returns {Promise<AvailablePageSchema>} - Success response
|
|
19
21
|
* @summary: Create a page
|
|
20
22
|
* @description: Use this API to create a page for a theme by its ID.
|
|
21
23
|
*/
|
|
22
24
|
createPage({ themeId, body }?: {
|
|
23
25
|
themeId: string;
|
|
24
26
|
body: AvailablePageSchema;
|
|
25
|
-
}): Promise<
|
|
27
|
+
}): Promise<AvailablePageSchema>;
|
|
26
28
|
/**
|
|
27
29
|
* @param {Object} arg - Arg object.
|
|
28
30
|
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
29
31
|
* @param {AllAvailablePageSchema} arg.body
|
|
32
|
+
* @returns {Promise<AllAvailablePageSchema>} - Success response
|
|
30
33
|
* @summary: Update multiple pages of a theme
|
|
31
34
|
* @description: Use this API to update multiple pages of a theme by its ID.
|
|
32
35
|
*/
|
|
33
36
|
updateMultiplePages({ themeId, body }?: {
|
|
34
37
|
themeId: string;
|
|
35
38
|
body: AllAvailablePageSchema;
|
|
36
|
-
}): Promise<
|
|
39
|
+
}): Promise<AllAvailablePageSchema>;
|
|
37
40
|
/**
|
|
38
41
|
* @param {Object} arg - Arg object.
|
|
39
42
|
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
40
43
|
* @param {string} arg.pageValue - Value of the page to be retrieved
|
|
44
|
+
* @returns {Promise<AvailablePageSchema>} - Success response
|
|
41
45
|
* @summary: Get page of a theme
|
|
42
46
|
* @description: Use this API to retrieve a page of a theme.
|
|
43
47
|
*/
|
|
44
48
|
getPage({ themeId, pageValue }?: {
|
|
45
49
|
themeId: string;
|
|
46
50
|
pageValue: string;
|
|
47
|
-
}): Promise<
|
|
51
|
+
}): Promise<AvailablePageSchema>;
|
|
48
52
|
/**
|
|
49
53
|
* @param {Object} arg - Arg object.
|
|
50
54
|
* @param {string} arg.themeId - ID of the theme
|
|
51
55
|
* @param {string} arg.pageValue - Value of the page to be updated
|
|
52
56
|
* @param {AvailablePageSchema} arg.body
|
|
57
|
+
* @returns {Promise<AvailablePageSchema>} - Success response
|
|
53
58
|
* @summary: Updates a page
|
|
54
59
|
* @description: Use this API to update a page for a theme by its ID.
|
|
55
60
|
*/
|
|
@@ -57,178 +62,197 @@ declare class Theme {
|
|
|
57
62
|
themeId: string;
|
|
58
63
|
pageValue: string;
|
|
59
64
|
body: AvailablePageSchema;
|
|
60
|
-
}): Promise<
|
|
65
|
+
}): Promise<AvailablePageSchema>;
|
|
61
66
|
/**
|
|
62
67
|
* @param {Object} arg - Arg object.
|
|
63
68
|
* @param {string} arg.themeId - ID of the theme
|
|
64
69
|
* @param {string} arg.pageValue - Value of the page to be updated
|
|
70
|
+
* @returns {Promise<AvailablePageSchema>} - Success response
|
|
65
71
|
* @summary: Deletes a page
|
|
66
72
|
* @description: Use this API to delete a page for a theme by its ID and page_value.
|
|
67
73
|
*/
|
|
68
74
|
deletePage({ themeId, pageValue }?: {
|
|
69
75
|
themeId: string;
|
|
70
76
|
pageValue: string;
|
|
71
|
-
}): Promise<
|
|
77
|
+
}): Promise<AvailablePageSchema>;
|
|
72
78
|
/**
|
|
73
79
|
* @param {Object} arg - Arg object.
|
|
74
80
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
75
81
|
* page. Default value is 10.
|
|
76
82
|
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
77
83
|
* given set of results. Default value is 1.
|
|
84
|
+
* @returns {Promise<ThemesListingResponseSchema>} - Success response
|
|
78
85
|
* @summary: Get a list of themes from the theme library
|
|
79
86
|
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to fetch a list of themes from the library along with their configuration details.
|
|
80
87
|
*/
|
|
81
88
|
getThemeLibrary({ pageSize, pageNo }?: {
|
|
82
89
|
pageSize?: number;
|
|
83
90
|
pageNo?: number;
|
|
84
|
-
}): Promise<
|
|
91
|
+
}): Promise<ThemesListingResponseSchema>;
|
|
85
92
|
/**
|
|
86
93
|
* @param {Object} arg - Arg object.
|
|
87
94
|
* @param {AddThemeRequestSchema} arg.body
|
|
95
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
88
96
|
* @summary: Add a theme to the theme library
|
|
89
97
|
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to choose a theme and add it to the theme library.
|
|
90
98
|
*/
|
|
91
99
|
addToThemeLibrary({ body }?: {
|
|
92
100
|
body: AddThemeRequestSchema;
|
|
93
|
-
}): Promise<
|
|
101
|
+
}): Promise<ThemesSchema>;
|
|
94
102
|
/**
|
|
95
103
|
* @param {Object} arg - Arg object.
|
|
96
104
|
* @param {AddThemeRequestSchema} arg.body
|
|
105
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
97
106
|
* @summary: Apply a theme
|
|
98
107
|
* @description: Use this API to apply a theme to the website.
|
|
99
108
|
*/
|
|
100
109
|
applyTheme({ body }?: {
|
|
101
110
|
body: AddThemeRequestSchema;
|
|
102
|
-
}): Promise<
|
|
111
|
+
}): Promise<ThemesSchema>;
|
|
103
112
|
/**
|
|
104
113
|
* @param {Object} arg - Arg object.
|
|
105
114
|
* @param {string} arg.themeId - Theme ID
|
|
115
|
+
* @returns {Promise<UpgradableThemeSchema>} - Success response
|
|
106
116
|
* @summary: Checks if theme is upgradable
|
|
107
117
|
* @description: There's always a possibility that new features get added to a theme. Use this API to check if the applied theme has an upgrade available.
|
|
108
118
|
*/
|
|
109
119
|
isUpgradable({ themeId }?: {
|
|
110
120
|
themeId: string;
|
|
111
|
-
}): Promise<
|
|
121
|
+
}): Promise<UpgradableThemeSchema>;
|
|
112
122
|
/**
|
|
113
123
|
* @param {Object} arg - Arg object.
|
|
114
124
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
125
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
115
126
|
* @summary: Upgrade a theme
|
|
116
127
|
* @description: Use this API to upgrade the current theme to its latest version.
|
|
117
128
|
*/
|
|
118
129
|
upgradeTheme({ themeId }?: {
|
|
119
130
|
themeId: string;
|
|
120
|
-
}): Promise<
|
|
131
|
+
}): Promise<ThemesSchema>;
|
|
121
132
|
/**
|
|
122
133
|
* @param {Object} arg - Arg object.
|
|
123
134
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
124
135
|
* page. Default value is 10.
|
|
125
136
|
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
126
137
|
* given set of results. Default value is 1.
|
|
138
|
+
* @returns {Promise<ThemesListingResponseSchema>} - Success response
|
|
127
139
|
* @summary: Get all public themes
|
|
128
140
|
* @description: Use this API to get a list of free themes that you can apply to your website.
|
|
129
141
|
*/
|
|
130
142
|
getPublicThemes({ pageSize, pageNo }?: {
|
|
131
143
|
pageSize?: number;
|
|
132
144
|
pageNo?: number;
|
|
133
|
-
}): Promise<
|
|
145
|
+
}): Promise<ThemesListingResponseSchema>;
|
|
134
146
|
/**
|
|
135
147
|
* @param {Object} arg - Arg object.
|
|
136
148
|
* @param {ThemesSchema} arg.body
|
|
149
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
137
150
|
* @summary: Create a new theme
|
|
138
151
|
* @description: Themes improve the look and appearance of a website. Use this API to create a theme.
|
|
139
152
|
*/
|
|
140
153
|
createTheme({ body }?: {
|
|
141
154
|
body: ThemesSchema;
|
|
142
|
-
}): Promise<
|
|
155
|
+
}): Promise<ThemesSchema>;
|
|
143
156
|
/**
|
|
144
157
|
* @param {Object} arg - Arg object.
|
|
158
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
145
159
|
* @summary: Get the applied theme
|
|
146
160
|
* @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
|
|
147
161
|
*/
|
|
148
|
-
getAppliedTheme({}?: any): Promise<
|
|
162
|
+
getAppliedTheme({}?: any): Promise<ThemesSchema>;
|
|
149
163
|
/**
|
|
150
164
|
* @param {Object} arg - Arg object.
|
|
165
|
+
* @returns {Promise<FontsSchema>} - Success response
|
|
151
166
|
* @summary: Get all the supported fonts in a theme
|
|
152
167
|
* @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
|
|
153
168
|
*/
|
|
154
|
-
getFonts({}?: any): Promise<
|
|
169
|
+
getFonts({}?: any): Promise<FontsSchema>;
|
|
155
170
|
/**
|
|
156
171
|
* @param {Object} arg - Arg object.
|
|
157
172
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
173
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
158
174
|
* @summary: Gets theme by id
|
|
159
175
|
* @description: Use this API to retrieve the details of a specific theme by using its ID.
|
|
160
176
|
*/
|
|
161
177
|
getThemeById({ themeId }?: {
|
|
162
178
|
themeId: string;
|
|
163
|
-
}): Promise<
|
|
179
|
+
}): Promise<ThemesSchema>;
|
|
164
180
|
/**
|
|
165
181
|
* @param {Object} arg - Arg object.
|
|
166
182
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
167
183
|
* @param {ThemesSchema} arg.body
|
|
184
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
168
185
|
* @summary: Update a theme
|
|
169
186
|
* @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
|
|
170
187
|
*/
|
|
171
188
|
updateTheme({ themeId, body }?: {
|
|
172
189
|
themeId: string;
|
|
173
190
|
body: ThemesSchema;
|
|
174
|
-
}): Promise<
|
|
191
|
+
}): Promise<ThemesSchema>;
|
|
175
192
|
/**
|
|
176
193
|
* @param {Object} arg - Arg object.
|
|
177
194
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
195
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
178
196
|
* @summary: Delete a theme
|
|
179
197
|
* @description: Use this API to delete a theme from the theme library.
|
|
180
198
|
*/
|
|
181
199
|
deleteTheme({ themeId }?: {
|
|
182
200
|
themeId: string;
|
|
183
|
-
}): Promise<
|
|
201
|
+
}): Promise<ThemesSchema>;
|
|
184
202
|
/**
|
|
185
203
|
* @param {Object} arg - Arg object.
|
|
186
204
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
205
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
187
206
|
* @summary: Get a theme preview
|
|
188
207
|
* @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
|
|
189
208
|
*/
|
|
190
209
|
getThemeForPreview({ themeId }?: {
|
|
191
210
|
themeId: string;
|
|
192
|
-
}): Promise<
|
|
211
|
+
}): Promise<ThemesSchema>;
|
|
193
212
|
/**
|
|
194
213
|
* @param {Object} arg - Arg object.
|
|
195
214
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
215
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
196
216
|
* @summary: Publish a theme
|
|
197
217
|
* @description: Use this API to publish a theme that is either newly created or edited.
|
|
198
218
|
*/
|
|
199
219
|
publishTheme({ themeId }?: {
|
|
200
220
|
themeId: string;
|
|
201
|
-
}): Promise<
|
|
221
|
+
}): Promise<ThemesSchema>;
|
|
202
222
|
/**
|
|
203
223
|
* @param {Object} arg - Arg object.
|
|
204
224
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
225
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
205
226
|
* @summary: Unpublish a theme
|
|
206
227
|
* @description: Use this API to remove an existing theme from the list of available themes.
|
|
207
228
|
*/
|
|
208
229
|
unpublishTheme({ themeId }?: {
|
|
209
230
|
themeId: string;
|
|
210
|
-
}): Promise<
|
|
231
|
+
}): Promise<ThemesSchema>;
|
|
211
232
|
/**
|
|
212
233
|
* @param {Object} arg - Arg object.
|
|
213
234
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
235
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
214
236
|
* @summary: Archive a theme
|
|
215
237
|
* @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
|
|
216
238
|
*/
|
|
217
239
|
archiveTheme({ themeId }?: {
|
|
218
240
|
themeId: string;
|
|
219
|
-
}): Promise<
|
|
241
|
+
}): Promise<ThemesSchema>;
|
|
220
242
|
/**
|
|
221
243
|
* @param {Object} arg - Arg object.
|
|
222
244
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
245
|
+
* @returns {Promise<ThemesSchema>} - Success response
|
|
223
246
|
* @summary: Unarchive a theme
|
|
224
247
|
* @description: Use this API to restore an archived theme and bring it back for editing or publishing.
|
|
225
248
|
*/
|
|
226
249
|
unarchiveTheme({ themeId }?: {
|
|
227
250
|
themeId: string;
|
|
228
|
-
}): Promise<
|
|
251
|
+
}): Promise<ThemesSchema>;
|
|
229
252
|
/**
|
|
230
253
|
* @param {Object} arg - Arg object.
|
|
231
254
|
* @param {string} arg.themeId - ID allotted to the theme.
|
|
255
|
+
* @returns {Promise<any>} - Success response
|
|
232
256
|
* @summary: Fetch last modified timestamp
|
|
233
257
|
* @description: Use this API to fetch Last-Modified timestamp in header metadata.
|
|
234
258
|
*/
|