@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +6 -6
- package/sdk/application/Cart/CartApplicationClient.js +30 -269
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
- package/sdk/application/Content/ContentApplicationClient.js +174 -211
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
- package/sdk/platform/Cart/CartPlatformModel.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
- package/sdk/platform/Content/ContentPlatformModel.js +110 -4
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +16 -104
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -66,8 +66,6 @@ const Joi = require("joi");
|
|
|
66
66
|
* @property {string} [app]
|
|
67
67
|
* @property {string} [_id]
|
|
68
68
|
* @property {string} [robots_txt]
|
|
69
|
-
* @property {boolean} [sitemap_enabled]
|
|
70
|
-
* @property {string} [additional_sitemap]
|
|
71
69
|
* @property {boolean} [cannonical_enabled]
|
|
72
70
|
* @property {CustomMetaTag[]} [custom_meta_tags]
|
|
73
71
|
* @property {Detail} [details]
|
|
@@ -281,6 +279,56 @@ const Joi = require("joi");
|
|
|
281
279
|
* @property {string} [modified_on]
|
|
282
280
|
*/
|
|
283
281
|
|
|
282
|
+
/**
|
|
283
|
+
* @typedef DefaultSitemapIndividualConfig
|
|
284
|
+
* @property {boolean} [enabled] - Whether sitemap configuration is enabled or
|
|
285
|
+
* not for this sitemap configuration
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* @typedef DefaultSitemapConfig
|
|
290
|
+
* @property {DefaultSitemapIndividualConfig} [root]
|
|
291
|
+
* @property {DefaultSitemapIndividualConfig} [brand]
|
|
292
|
+
* @property {DefaultSitemapIndividualConfig} [collections]
|
|
293
|
+
* @property {DefaultSitemapIndividualConfig} [category_l1]
|
|
294
|
+
* @property {DefaultSitemapIndividualConfig} [category_l2]
|
|
295
|
+
* @property {DefaultSitemapIndividualConfig} [category_l3]
|
|
296
|
+
* @property {DefaultSitemapIndividualConfig} [pages]
|
|
297
|
+
* @property {DefaultSitemapIndividualConfig} [blog]
|
|
298
|
+
* @property {DefaultSitemapIndividualConfig} [section]
|
|
299
|
+
* @property {DefaultSitemapIndividualConfig} [faq]
|
|
300
|
+
* @property {DefaultSitemapIndividualConfig} [sitemap]
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @typedef SitemapConfigCreate
|
|
305
|
+
* @property {string} [name] - Unique identifier for the sitemap configuration
|
|
306
|
+
* @property {boolean} [is_active] - Indicates if the sitemap configuration is active
|
|
307
|
+
* @property {string} [sitemap] - XML string containing sitemap data in base64 encoding
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @typedef SitemapConfig
|
|
312
|
+
* @property {string} [name] - Unique identifier for the sitemap configuration
|
|
313
|
+
* @property {boolean} [is_active] - Indicates if the sitemap configuration is
|
|
314
|
+
* active or not in storefront
|
|
315
|
+
* @property {string} [sitemap] - XML string containing sitemap data in base64 encoding
|
|
316
|
+
* @property {string} [created_at] - Timestamp when the configuration was created
|
|
317
|
+
* @property {string} [updated_at] - Timestamp when the configuration was last updated
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @typedef SitemapConfigurationList
|
|
322
|
+
* @property {SitemapConfig[]} [items] - List of all Sitemap configurations
|
|
323
|
+
* @property {Page} [page]
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @typedef SitemapConfigUpdate
|
|
328
|
+
* @property {boolean} [is_active] - Indicates if the sitemap configuration is active
|
|
329
|
+
* @property {string} [sitemap] - XML string containing sitemap data
|
|
330
|
+
*/
|
|
331
|
+
|
|
284
332
|
/**
|
|
285
333
|
* @typedef BlogPayload
|
|
286
334
|
* @property {string} [application]
|
|
@@ -1545,8 +1593,6 @@ class ContentPlatformModel {
|
|
|
1545
1593
|
app: Joi.string().allow(""),
|
|
1546
1594
|
_id: Joi.string().allow(""),
|
|
1547
1595
|
robots_txt: Joi.string().allow(""),
|
|
1548
|
-
sitemap_enabled: Joi.boolean(),
|
|
1549
|
-
additional_sitemap: Joi.string().allow(""),
|
|
1550
1596
|
cannonical_enabled: Joi.boolean(),
|
|
1551
1597
|
custom_meta_tags: Joi.array().items(ContentPlatformModel.CustomMetaTag()),
|
|
1552
1598
|
details: ContentPlatformModel.Detail(),
|
|
@@ -1815,6 +1861,66 @@ class ContentPlatformModel {
|
|
|
1815
1861
|
});
|
|
1816
1862
|
}
|
|
1817
1863
|
|
|
1864
|
+
/** @returns {DefaultSitemapIndividualConfig} */
|
|
1865
|
+
static DefaultSitemapIndividualConfig() {
|
|
1866
|
+
return Joi.object({
|
|
1867
|
+
enabled: Joi.boolean(),
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/** @returns {DefaultSitemapConfig} */
|
|
1872
|
+
static DefaultSitemapConfig() {
|
|
1873
|
+
return Joi.object({
|
|
1874
|
+
root: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1875
|
+
brand: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1876
|
+
collections: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1877
|
+
category_l1: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1878
|
+
category_l2: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1879
|
+
category_l3: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1880
|
+
pages: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1881
|
+
blog: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1882
|
+
section: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1883
|
+
faq: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1884
|
+
sitemap: ContentPlatformModel.DefaultSitemapIndividualConfig(),
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/** @returns {SitemapConfigCreate} */
|
|
1889
|
+
static SitemapConfigCreate() {
|
|
1890
|
+
return Joi.object({
|
|
1891
|
+
name: Joi.string().allow(""),
|
|
1892
|
+
is_active: Joi.boolean(),
|
|
1893
|
+
sitemap: Joi.string().allow(""),
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/** @returns {SitemapConfig} */
|
|
1898
|
+
static SitemapConfig() {
|
|
1899
|
+
return Joi.object({
|
|
1900
|
+
name: Joi.string().allow(""),
|
|
1901
|
+
is_active: Joi.boolean(),
|
|
1902
|
+
sitemap: Joi.string().allow(""),
|
|
1903
|
+
created_at: Joi.string().allow(""),
|
|
1904
|
+
updated_at: Joi.string().allow(""),
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
/** @returns {SitemapConfigurationList} */
|
|
1909
|
+
static SitemapConfigurationList() {
|
|
1910
|
+
return Joi.object({
|
|
1911
|
+
items: Joi.array().items(ContentPlatformModel.SitemapConfig()),
|
|
1912
|
+
page: ContentPlatformModel.Page(),
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
/** @returns {SitemapConfigUpdate} */
|
|
1917
|
+
static SitemapConfigUpdate() {
|
|
1918
|
+
return Joi.object({
|
|
1919
|
+
is_active: Joi.boolean(),
|
|
1920
|
+
sitemap: Joi.string().allow(""),
|
|
1921
|
+
});
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1818
1924
|
/** @returns {BlogPayload} */
|
|
1819
1925
|
static BlogPayload() {
|
|
1820
1926
|
return Joi.object({
|
|
@@ -3,16 +3,6 @@ declare class Order {
|
|
|
3
3
|
constructor(config: any, applicationId: any);
|
|
4
4
|
config: any;
|
|
5
5
|
applicationId: any;
|
|
6
|
-
/**
|
|
7
|
-
* @param {OrderPlatformApplicationValidator.FailedOrderLogsParam} arg - Arg object
|
|
8
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
9
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
10
|
-
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
11
|
-
* @name failedOrderLogs
|
|
12
|
-
* @summary: List failed order logs
|
|
13
|
-
* @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
|
|
14
|
-
*/
|
|
15
|
-
failedOrderLogs({ pageNo, pageSize, searchType, searchValue, requestHeaders }?: OrderPlatformApplicationValidator.FailedOrderLogsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.FailedOrderLogs>;
|
|
16
6
|
/**
|
|
17
7
|
* @param {OrderPlatformApplicationValidator.GetApplicationShipmentsParam} arg
|
|
18
8
|
* - Arg object
|
|
@@ -15,98 +15,6 @@ class Order {
|
|
|
15
15
|
this.applicationId = applicationId;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @param {OrderPlatformApplicationValidator.FailedOrderLogsParam} arg - Arg object
|
|
20
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
22
|
-
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
23
|
-
* @name failedOrderLogs
|
|
24
|
-
* @summary: List failed order logs
|
|
25
|
-
* @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
|
|
26
|
-
*/
|
|
27
|
-
async failedOrderLogs(
|
|
28
|
-
{ pageNo, pageSize, searchType, searchValue, requestHeaders } = {
|
|
29
|
-
requestHeaders: {},
|
|
30
|
-
},
|
|
31
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
32
|
-
) {
|
|
33
|
-
const {
|
|
34
|
-
error,
|
|
35
|
-
} = OrderPlatformApplicationValidator.failedOrderLogs().validate(
|
|
36
|
-
{
|
|
37
|
-
pageNo,
|
|
38
|
-
pageSize,
|
|
39
|
-
searchType,
|
|
40
|
-
searchValue,
|
|
41
|
-
},
|
|
42
|
-
{ abortEarly: false, allowUnknown: true }
|
|
43
|
-
);
|
|
44
|
-
if (error) {
|
|
45
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Showing warrnings if extra unknown parameters are found
|
|
49
|
-
const {
|
|
50
|
-
error: warrning,
|
|
51
|
-
} = OrderPlatformApplicationValidator.failedOrderLogs().validate(
|
|
52
|
-
{
|
|
53
|
-
pageNo,
|
|
54
|
-
pageSize,
|
|
55
|
-
searchType,
|
|
56
|
-
searchValue,
|
|
57
|
-
},
|
|
58
|
-
{ abortEarly: false, allowUnknown: false }
|
|
59
|
-
);
|
|
60
|
-
if (warrning) {
|
|
61
|
-
Logger({
|
|
62
|
-
level: "WARN",
|
|
63
|
-
message: `Parameter Validation warrnings for platform > Order > failedOrderLogs \n ${warrning}`,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const query_params = {};
|
|
68
|
-
query_params["application_id"] = applicationId;
|
|
69
|
-
query_params["page_no"] = pageNo;
|
|
70
|
-
query_params["page_size"] = pageSize;
|
|
71
|
-
query_params["search_type"] = searchType;
|
|
72
|
-
query_params["search_value"] = searchValue;
|
|
73
|
-
|
|
74
|
-
const response = await PlatformAPIClient.execute(
|
|
75
|
-
this.config,
|
|
76
|
-
"get",
|
|
77
|
-
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
|
|
78
|
-
query_params,
|
|
79
|
-
undefined,
|
|
80
|
-
requestHeaders,
|
|
81
|
-
{ responseHeaders }
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
let responseData = response;
|
|
85
|
-
if (responseHeaders) {
|
|
86
|
-
responseData = response[0];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const {
|
|
90
|
-
error: res_error,
|
|
91
|
-
} = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
|
|
92
|
-
abortEarly: false,
|
|
93
|
-
allowUnknown: true,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
if (res_error) {
|
|
97
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
98
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
99
|
-
} else {
|
|
100
|
-
Logger({
|
|
101
|
-
level: "WARN",
|
|
102
|
-
message: `Response Validation Warnings for platform > Order > failedOrderLogs \n ${res_error}`,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return response;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
18
|
/**
|
|
111
19
|
* @param {OrderPlatformApplicationValidator.GetApplicationShipmentsParam} arg
|
|
112
20
|
* - Arg object
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
export = OrderPlatformApplicationValidator;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef FailedOrderLogsParam
|
|
4
|
-
* @property {number} [pageNo] - Page Number
|
|
5
|
-
* @property {number} [pageSize] - Page Size
|
|
6
|
-
* @property {string} [searchType] - Search type for filter
|
|
7
|
-
* @property {string} [searchValue] - Search value for filter
|
|
8
|
-
*/
|
|
9
2
|
/**
|
|
10
3
|
* @typedef GetApplicationShipmentsParam
|
|
11
4
|
* @property {string} [lane] - Optional parameter to specify the lane for
|
|
@@ -51,8 +44,6 @@ export = OrderPlatformApplicationValidator;
|
|
|
51
44
|
* @property {string} shipmentId - The unique identifier for the shipment
|
|
52
45
|
*/
|
|
53
46
|
declare class OrderPlatformApplicationValidator {
|
|
54
|
-
/** @returns {FailedOrderLogsParam} */
|
|
55
|
-
static failedOrderLogs(): FailedOrderLogsParam;
|
|
56
47
|
/** @returns {GetApplicationShipmentsParam} */
|
|
57
48
|
static getApplicationShipments(): GetApplicationShipmentsParam;
|
|
58
49
|
/** @returns {GetPlatformShipmentReasonsParam} */
|
|
@@ -65,26 +56,8 @@ declare class OrderPlatformApplicationValidator {
|
|
|
65
56
|
static trackShipmentPlatform(): TrackShipmentPlatformParam;
|
|
66
57
|
}
|
|
67
58
|
declare namespace OrderPlatformApplicationValidator {
|
|
68
|
-
export {
|
|
59
|
+
export { GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetRulesParam, GetShipmentBagReasonsParam, TrackShipmentPlatformParam };
|
|
69
60
|
}
|
|
70
|
-
type FailedOrderLogsParam = {
|
|
71
|
-
/**
|
|
72
|
-
* - Page Number
|
|
73
|
-
*/
|
|
74
|
-
pageNo?: number;
|
|
75
|
-
/**
|
|
76
|
-
* - Page Size
|
|
77
|
-
*/
|
|
78
|
-
pageSize?: number;
|
|
79
|
-
/**
|
|
80
|
-
* - Search type for filter
|
|
81
|
-
*/
|
|
82
|
-
searchType?: string;
|
|
83
|
-
/**
|
|
84
|
-
* - Search value for filter
|
|
85
|
-
*/
|
|
86
|
-
searchValue?: string;
|
|
87
|
-
};
|
|
88
61
|
type GetApplicationShipmentsParam = {
|
|
89
62
|
/**
|
|
90
63
|
* - Optional parameter to specify the lane for
|
|
@@ -2,14 +2,6 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const OrderPlatformModel = require("./OrderPlatformModel");
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @typedef FailedOrderLogsParam
|
|
7
|
-
* @property {number} [pageNo] - Page Number
|
|
8
|
-
* @property {number} [pageSize] - Page Size
|
|
9
|
-
* @property {string} [searchType] - Search type for filter
|
|
10
|
-
* @property {string} [searchValue] - Search value for filter
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
5
|
/**
|
|
14
6
|
* @typedef GetApplicationShipmentsParam
|
|
15
7
|
* @property {string} [lane] - Optional parameter to specify the lane for
|
|
@@ -60,16 +52,6 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
60
52
|
*/
|
|
61
53
|
|
|
62
54
|
class OrderPlatformApplicationValidator {
|
|
63
|
-
/** @returns {FailedOrderLogsParam} */
|
|
64
|
-
static failedOrderLogs() {
|
|
65
|
-
return Joi.object({
|
|
66
|
-
pageNo: Joi.number(),
|
|
67
|
-
pageSize: Joi.number(),
|
|
68
|
-
searchType: Joi.string().allow(""),
|
|
69
|
-
searchValue: Joi.string().allow(""),
|
|
70
|
-
}).required();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
55
|
/** @returns {GetApplicationShipmentsParam} */
|
|
74
56
|
static getApplicationShipments() {
|
|
75
57
|
return Joi.object({
|
|
@@ -131,6 +131,16 @@ declare class Order {
|
|
|
131
131
|
* @description: Get the exact error trace from the log Id provided in the failed order list API response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/).
|
|
132
132
|
*/
|
|
133
133
|
failedOrderLogDetails({ logId, requestHeaders }?: OrderPlatformValidator.FailedOrderLogDetailsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.FailedOrderLogDetails>;
|
|
134
|
+
/**
|
|
135
|
+
* @param {OrderPlatformValidator.FailedOrderLogsParam} arg - Arg object
|
|
136
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
137
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
138
|
+
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
139
|
+
* @name failedOrderLogs
|
|
140
|
+
* @summary: List failed order logs
|
|
141
|
+
* @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
|
|
142
|
+
*/
|
|
143
|
+
failedOrderLogs({ applicationId, pageNo, pageSize, searchType, searchValue, requestHeaders, }?: OrderPlatformValidator.FailedOrderLogsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.FailedOrderLogs>;
|
|
134
144
|
/**
|
|
135
145
|
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
136
146
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -996,6 +996,105 @@ class Order {
|
|
|
996
996
|
return response;
|
|
997
997
|
}
|
|
998
998
|
|
|
999
|
+
/**
|
|
1000
|
+
* @param {OrderPlatformValidator.FailedOrderLogsParam} arg - Arg object
|
|
1001
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1002
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1003
|
+
* @returns {Promise<OrderPlatformModel.FailedOrderLogs>} - Success response
|
|
1004
|
+
* @name failedOrderLogs
|
|
1005
|
+
* @summary: List failed order logs
|
|
1006
|
+
* @description: Get failed order logs listing for filters based on order Id, user contact number, user email Id and sales channel Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/).
|
|
1007
|
+
*/
|
|
1008
|
+
async failedOrderLogs(
|
|
1009
|
+
{
|
|
1010
|
+
applicationId,
|
|
1011
|
+
pageNo,
|
|
1012
|
+
pageSize,
|
|
1013
|
+
searchType,
|
|
1014
|
+
searchValue,
|
|
1015
|
+
requestHeaders,
|
|
1016
|
+
} = { requestHeaders: {} },
|
|
1017
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1018
|
+
) {
|
|
1019
|
+
const { error } = OrderPlatformValidator.failedOrderLogs().validate(
|
|
1020
|
+
{
|
|
1021
|
+
applicationId,
|
|
1022
|
+
pageNo,
|
|
1023
|
+
pageSize,
|
|
1024
|
+
searchType,
|
|
1025
|
+
searchValue,
|
|
1026
|
+
},
|
|
1027
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1028
|
+
);
|
|
1029
|
+
if (error) {
|
|
1030
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1034
|
+
const {
|
|
1035
|
+
error: warrning,
|
|
1036
|
+
} = OrderPlatformValidator.failedOrderLogs().validate(
|
|
1037
|
+
{
|
|
1038
|
+
applicationId,
|
|
1039
|
+
pageNo,
|
|
1040
|
+
pageSize,
|
|
1041
|
+
searchType,
|
|
1042
|
+
searchValue,
|
|
1043
|
+
},
|
|
1044
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1045
|
+
);
|
|
1046
|
+
if (warrning) {
|
|
1047
|
+
Logger({
|
|
1048
|
+
level: "WARN",
|
|
1049
|
+
message: `Parameter Validation warrnings for platform > Order > failedOrderLogs \n ${warrning}`,
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
const query_params = {};
|
|
1054
|
+
query_params["application_id"] = applicationId;
|
|
1055
|
+
query_params["page_no"] = pageNo;
|
|
1056
|
+
query_params["page_size"] = pageSize;
|
|
1057
|
+
query_params["search_type"] = searchType;
|
|
1058
|
+
query_params["search_value"] = searchValue;
|
|
1059
|
+
|
|
1060
|
+
const xHeaders = {};
|
|
1061
|
+
|
|
1062
|
+
const response = await PlatformAPIClient.execute(
|
|
1063
|
+
this.config,
|
|
1064
|
+
"get",
|
|
1065
|
+
`/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`,
|
|
1066
|
+
query_params,
|
|
1067
|
+
undefined,
|
|
1068
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1069
|
+
{ responseHeaders }
|
|
1070
|
+
);
|
|
1071
|
+
|
|
1072
|
+
let responseData = response;
|
|
1073
|
+
if (responseHeaders) {
|
|
1074
|
+
responseData = response[0];
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
const {
|
|
1078
|
+
error: res_error,
|
|
1079
|
+
} = OrderPlatformModel.FailedOrderLogs().validate(responseData, {
|
|
1080
|
+
abortEarly: false,
|
|
1081
|
+
allowUnknown: true,
|
|
1082
|
+
});
|
|
1083
|
+
|
|
1084
|
+
if (res_error) {
|
|
1085
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1086
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1087
|
+
} else {
|
|
1088
|
+
Logger({
|
|
1089
|
+
level: "WARN",
|
|
1090
|
+
message: `Response Validation Warnings for platform > Order > failedOrderLogs \n ${res_error}`,
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
return response;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
999
1098
|
/**
|
|
1000
1099
|
* @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object
|
|
1001
1100
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -55,6 +55,14 @@ export = OrderPlatformValidator;
|
|
|
55
55
|
* @typedef FailedOrderLogDetailsParam
|
|
56
56
|
* @property {string} logId - Log Error ID
|
|
57
57
|
*/
|
|
58
|
+
/**
|
|
59
|
+
* @typedef FailedOrderLogsParam
|
|
60
|
+
* @property {string} [applicationId] - Application ID
|
|
61
|
+
* @property {number} [pageNo] - Page Number
|
|
62
|
+
* @property {number} [pageSize] - Page Size
|
|
63
|
+
* @property {string} [searchType] - Search type for filter
|
|
64
|
+
* @property {string} [searchValue] - Search value for filter
|
|
65
|
+
*/
|
|
58
66
|
/**
|
|
59
67
|
* @typedef FetchRefundModeConfigParam
|
|
60
68
|
* @property {OrderPlatformModel.RefundModeConfigRequestPayload} body
|
|
@@ -456,6 +464,8 @@ declare class OrderPlatformValidator {
|
|
|
456
464
|
static eInvoiceRetry(): EInvoiceRetryParam;
|
|
457
465
|
/** @returns {FailedOrderLogDetailsParam} */
|
|
458
466
|
static failedOrderLogDetails(): FailedOrderLogDetailsParam;
|
|
467
|
+
/** @returns {FailedOrderLogsParam} */
|
|
468
|
+
static failedOrderLogs(): FailedOrderLogsParam;
|
|
459
469
|
/** @returns {FetchRefundModeConfigParam} */
|
|
460
470
|
static fetchRefundModeConfig(): FetchRefundModeConfigParam;
|
|
461
471
|
/** @returns {GenerateInvoiceIDParam} */
|
|
@@ -548,7 +558,7 @@ declare class OrderPlatformValidator {
|
|
|
548
558
|
static verifyMobileOTP(): VerifyMobileOTPParam;
|
|
549
559
|
}
|
|
550
560
|
declare namespace OrderPlatformValidator {
|
|
551
|
-
export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
|
|
561
|
+
export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FailedOrderLogsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam };
|
|
552
562
|
}
|
|
553
563
|
type AddStateManagerConfigParam = {
|
|
554
564
|
body: OrderPlatformModel.TransitionConfigPayload;
|
|
@@ -621,6 +631,28 @@ type FailedOrderLogDetailsParam = {
|
|
|
621
631
|
*/
|
|
622
632
|
logId: string;
|
|
623
633
|
};
|
|
634
|
+
type FailedOrderLogsParam = {
|
|
635
|
+
/**
|
|
636
|
+
* - Application ID
|
|
637
|
+
*/
|
|
638
|
+
applicationId?: string;
|
|
639
|
+
/**
|
|
640
|
+
* - Page Number
|
|
641
|
+
*/
|
|
642
|
+
pageNo?: number;
|
|
643
|
+
/**
|
|
644
|
+
* - Page Size
|
|
645
|
+
*/
|
|
646
|
+
pageSize?: number;
|
|
647
|
+
/**
|
|
648
|
+
* - Search type for filter
|
|
649
|
+
*/
|
|
650
|
+
searchType?: string;
|
|
651
|
+
/**
|
|
652
|
+
* - Search value for filter
|
|
653
|
+
*/
|
|
654
|
+
searchValue?: string;
|
|
655
|
+
};
|
|
624
656
|
type FetchRefundModeConfigParam = {
|
|
625
657
|
body: OrderPlatformModel.RefundModeConfigRequestPayload;
|
|
626
658
|
};
|
|
@@ -70,6 +70,15 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
70
70
|
* @property {string} logId - Log Error ID
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @typedef FailedOrderLogsParam
|
|
75
|
+
* @property {string} [applicationId] - Application ID
|
|
76
|
+
* @property {number} [pageNo] - Page Number
|
|
77
|
+
* @property {number} [pageSize] - Page Size
|
|
78
|
+
* @property {string} [searchType] - Search type for filter
|
|
79
|
+
* @property {string} [searchValue] - Search value for filter
|
|
80
|
+
*/
|
|
81
|
+
|
|
73
82
|
/**
|
|
74
83
|
* @typedef FetchRefundModeConfigParam
|
|
75
84
|
* @property {OrderPlatformModel.RefundModeConfigRequestPayload} body
|
|
@@ -582,6 +591,17 @@ class OrderPlatformValidator {
|
|
|
582
591
|
}).required();
|
|
583
592
|
}
|
|
584
593
|
|
|
594
|
+
/** @returns {FailedOrderLogsParam} */
|
|
595
|
+
static failedOrderLogs() {
|
|
596
|
+
return Joi.object({
|
|
597
|
+
applicationId: Joi.string().allow(""),
|
|
598
|
+
pageNo: Joi.number(),
|
|
599
|
+
pageSize: Joi.number(),
|
|
600
|
+
searchType: Joi.string().allow(""),
|
|
601
|
+
searchValue: Joi.string().allow(""),
|
|
602
|
+
}).required();
|
|
603
|
+
}
|
|
604
|
+
|
|
585
605
|
/** @returns {FetchRefundModeConfigParam} */
|
|
586
606
|
static fetchRefundModeConfig() {
|
|
587
607
|
return Joi.object({
|
|
@@ -138,16 +138,6 @@ declare class Serviceability {
|
|
|
138
138
|
* @description: Retrieves an existing order routing setup for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/).
|
|
139
139
|
*/
|
|
140
140
|
getStoreRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetStoreRulesParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.GetStoreRulesApiResult>;
|
|
141
|
-
/**
|
|
142
|
-
* @param {ServiceabilityPlatformApplicationValidator.GetZonesParam} arg - Arg object
|
|
143
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
144
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
145
|
-
* @returns {Promise<ServiceabilityPlatformModel.ListViewResult>} - Success response
|
|
146
|
-
* @name getZones
|
|
147
|
-
* @summary: Get zones
|
|
148
|
-
* @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/).
|
|
149
|
-
*/
|
|
150
|
-
getZones({ pageNo, pageSize, isActive, q, countryIsoCode, state, city, pincode, sector, requestHeaders, }?: ServiceabilityPlatformApplicationValidator.GetZonesParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.ListViewResult>;
|
|
151
141
|
/**
|
|
152
142
|
* @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg
|
|
153
143
|
* - Arg object
|