@gofynd/fdk-client-javascript 1.1.0 → 1.1.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.
Files changed (85) hide show
  1. package/README.md +0 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +6 -1
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +11 -2
  5. package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
  6. package/sdk/application/Content/ContentApplicationModel.js +0 -4
  7. package/sdk/application/Lead/LeadApplicationModel.js +1 -0
  8. package/sdk/application/Order/OrderApplicationClient.d.ts +0 -15
  9. package/sdk/application/Order/OrderApplicationClient.js +0 -68
  10. package/sdk/application/Order/OrderApplicationModel.d.ts +0 -17
  11. package/sdk/application/Order/OrderApplicationModel.js +0 -111
  12. package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -1
  13. package/sdk/application/Order/OrderApplicationValidator.js +0 -7
  14. package/sdk/common/AxiosHelper.js +1 -1
  15. package/sdk/common/Constant.d.ts +0 -18
  16. package/sdk/common/Constant.js +0 -22
  17. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +29 -0
  18. package/sdk/platform/Cart/CartPlatformApplicationClient.js +181 -0
  19. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  20. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -0
  21. package/sdk/platform/Cart/CartPlatformModel.d.ts +4 -0
  22. package/sdk/platform/Cart/CartPlatformModel.js +37 -0
  23. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
  24. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
  25. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  26. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  27. package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
  28. package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -7
  29. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
  30. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
  31. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
  32. package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
  33. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
  34. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
  35. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
  36. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +12 -1
  37. package/sdk/platform/Content/ContentPlatformApplicationClient.js +62 -2
  38. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
  39. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +6 -0
  40. package/sdk/platform/Content/ContentPlatformModel.js +0 -4
  41. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  42. package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
  43. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
  44. package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
  45. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
  46. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +1 -1
  47. package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
  48. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
  49. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
  50. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
  51. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
  52. package/sdk/platform/Order/OrderPlatformClient.d.ts +51 -183
  53. package/sdk/platform/Order/OrderPlatformClient.js +243 -931
  54. package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
  55. package/sdk/platform/Order/OrderPlatformModel.js +38 -182
  56. package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
  57. package/sdk/platform/Order/OrderPlatformValidator.js +19 -95
  58. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
  59. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
  60. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
  61. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
  62. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
  63. package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
  64. package/sdk/platform/PlatformApplicationClient.d.ts +12 -41
  65. package/sdk/platform/PlatformApplicationClient.js +13 -45
  66. package/sdk/platform/PlatformClient.d.ts +90 -264
  67. package/sdk/platform/PlatformClient.js +110 -316
  68. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
  69. package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
  70. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
  71. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
  72. package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
  73. package/sdk/platform/Share/SharePlatformModel.js +11 -0
  74. package/sdk/platform/index.d.ts +0 -1
  75. package/sdk/platform/index.js +0 -2
  76. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
  77. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
  78. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
  79. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
  80. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
  81. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
  82. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
  83. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
  84. package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
  85. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +0 -38
@@ -114,7 +114,7 @@ class Content {
114
114
  const response = await PlatformAPIClient.execute(
115
115
  this.config,
116
116
  "post",
117
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${categoryId}/faqs`,
117
+ `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${categoryId}/faq`,
118
118
  query_params,
119
119
  body
120
120
  );
@@ -1760,6 +1760,66 @@ class Content {
1760
1760
  return paginator;
1761
1761
  }
1762
1762
 
1763
+ /**
1764
+ * @param {Object} arg - Arg object.
1765
+ * @param {string} arg.slug - A short, human-readable, URL-friendly
1766
+ * identifier of a blog page. You can get slug value of a blog from `getBlogs` API.
1767
+ * @returns {Promise<BlogSchema>} - Success response
1768
+ * @summary: Get blog by slug
1769
+ * @description: Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc.
1770
+ */
1771
+ async getBlogBySlug({ slug } = {}) {
1772
+ const { error } = ContentValidator.getBlogBySlug().validate(
1773
+ {
1774
+ slug,
1775
+ },
1776
+ { abortEarly: false, allowUnknown: true }
1777
+ );
1778
+ if (error) {
1779
+ return Promise.reject(new FDKClientValidationError(error));
1780
+ }
1781
+
1782
+ // Showing warrnings if extra unknown parameters are found
1783
+ const { error: warrning } = ContentValidator.getBlogBySlug().validate(
1784
+ {
1785
+ slug,
1786
+ },
1787
+ { abortEarly: false, allowUnknown: false }
1788
+ );
1789
+ if (warrning) {
1790
+ Logger({
1791
+ level: "WARN",
1792
+ message: "Parameter Validation warrnings for getBlogBySlug",
1793
+ });
1794
+ Logger({ level: "WARN", message: warrning });
1795
+ }
1796
+
1797
+ const query_params = {};
1798
+
1799
+ const response = await PlatformAPIClient.execute(
1800
+ this.config,
1801
+ "get",
1802
+ `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`,
1803
+ query_params,
1804
+ undefined
1805
+ );
1806
+
1807
+ const { error: res_error } = ContentModel.BlogSchema().validate(response, {
1808
+ abortEarly: false,
1809
+ allowUnknown: false,
1810
+ });
1811
+
1812
+ if (res_error) {
1813
+ Logger({
1814
+ level: "WARN",
1815
+ message: "Response Validation Warnnings for getBlogBySlug",
1816
+ });
1817
+ Logger({ level: "WARN", message: res_error });
1818
+ }
1819
+
1820
+ return response;
1821
+ }
1822
+
1763
1823
  /**
1764
1824
  * @param {Object} arg - Arg object.
1765
1825
  * @param {number} [arg.pageNo] - The page number to navigate through the
@@ -2683,7 +2743,7 @@ class Content {
2683
2743
  * @param {string} arg.slug - A short, human-readable, URL-friendly
2684
2744
  * identifier of a page. You can get slug value of a page from `getPages` API.
2685
2745
  * @returns {Promise<PageSchema>} - Success response
2686
- * @summary: Get pages by component Id
2746
+ * @summary: Get page by slug
2687
2747
  * @description: Use this API to retrieve the components of a page, such as its title, seo, publish status, feature image, tags, schedule, etc.
2688
2748
  */
2689
2749
  async getPageBySlug({ slug } = {}) {
@@ -28,6 +28,7 @@ declare class ContentValidator {
28
28
  static generateSEOTitle(): any;
29
29
  static getAnnouncementById(): any;
30
30
  static getAnnouncementsList(): any;
31
+ static getBlogBySlug(): any;
31
32
  static getBlogs(): any;
32
33
  static getComponentById(): any;
33
34
  static getDataLoaders(): any;
@@ -174,6 +174,12 @@ class ContentValidator {
174
174
  }).required();
175
175
  }
176
176
 
177
+ static getBlogBySlug() {
178
+ return Joi.object({
179
+ slug: Joi.string().allow("").required(),
180
+ }).required();
181
+ }
182
+
177
183
  static getBlogs() {
178
184
  return Joi.object({
179
185
  pageNo: Joi.number(),
@@ -911,10 +911,6 @@ class ContentModel {
911
911
 
912
912
  "product",
913
913
 
914
- "product-reviews",
915
-
916
- "add-product-review",
917
-
918
914
  "product-request",
919
915
 
920
916
  "products",
@@ -128,13 +128,13 @@ declare class Discount {
128
128
  /**
129
129
  * @param {Object} arg - Arg object.
130
130
  * @param {string} [arg.discount] - Discount
131
- * @param {DiscountJob} arg.body
131
+ * @param {FileJobRequest} arg.body
132
132
  * @returns {Promise<FileJobResponse>} - Success response
133
133
  * @summary: Validate File.
134
134
  * @description: Validate File.
135
135
  */
136
136
  validateDiscountFile({ body, discount }?: {
137
137
  discount?: string;
138
- body: DiscountJob;
138
+ body: FileJobRequest;
139
139
  }): Promise<FileJobResponse>;
140
140
  }
@@ -705,7 +705,7 @@ class Discount {
705
705
  /**
706
706
  * @param {Object} arg - Arg object.
707
707
  * @param {string} [arg.discount] - Discount
708
- * @param {DiscountJob} arg.body
708
+ * @param {FileJobRequest} arg.body
709
709
  * @returns {Promise<FileJobResponse>} - Success response
710
710
  * @summary: Validate File.
711
711
  * @description: Validate File.
@@ -7,6 +7,7 @@ declare class DiscountModel {
7
7
  static DiscountItems(): any;
8
8
  static DiscountJob(): any;
9
9
  static DownloadFileJob(): any;
10
+ static FileJobRequest(): any;
10
11
  static FileJobResponse(): any;
11
12
  static ListOrCalender(): any;
12
13
  static Page(): any;
@@ -71,6 +71,21 @@ class DiscountModel {
71
71
  store_ids: Joi.array().items(Joi.number()),
72
72
  });
73
73
  }
74
+ static FileJobRequest() {
75
+ return Joi.object({
76
+ app_ids: Joi.array().items(Joi.string().allow("")),
77
+ brand_ids: Joi.array().items(Joi.number()),
78
+ discount_level: Joi.string().allow(""),
79
+ discount_type: Joi.string().allow(""),
80
+ file_path: Joi.string().allow(""),
81
+ is_active: Joi.boolean().required(),
82
+ job_type: Joi.string().allow(""),
83
+ meta: Joi.any(),
84
+ name: Joi.string().allow("").required(),
85
+ store_ids: Joi.array().items(Joi.number()),
86
+ validity: DiscountModel.ValidityObject().required(),
87
+ });
88
+ }
74
89
  static FileJobResponse() {
75
90
  return Joi.object({
76
91
  body: Joi.any(),
@@ -76,7 +76,7 @@ class DiscountValidator {
76
76
  static validateDiscountFile() {
77
77
  return Joi.object({
78
78
  discount: Joi.string().allow(""),
79
- body: DiscountModel.DiscountJob().required(),
79
+ body: DiscountModel.FileJobRequest().required(),
80
80
  }).required();
81
81
  }
82
82
  }
@@ -376,7 +376,7 @@ class FileStorage {
376
376
 
377
377
  const response = await PlatformAPIClient.execute(
378
378
  this.config,
379
- "post",
379
+ "get",
380
380
  `/service/platform/assets/v1.0/company/${this.config.companyId}/proxy/`,
381
381
  query_params,
382
382
  undefined,
@@ -258,6 +258,7 @@ class LeadModel {
258
258
  support_email: LeadModel.CommunicationDetails(),
259
259
  support_faq: LeadModel.CommunicationDetails(),
260
260
  support_phone: LeadModel.CommunicationDetails(),
261
+ type: Joi.string().allow(""),
261
262
  });
262
263
  }
263
264
  static Ticket() {
@@ -3,52 +3,6 @@ declare class Order {
3
3
  constructor(config: any, applicationId: any);
4
4
  config: any;
5
5
  applicationId: any;
6
- /**
7
- * @param {Object} arg - Arg object.
8
- * @param {string} arg.orderId -
9
- * @returns {Promise<ShipmentDetailsResponse>} - Success response
10
- * @summary:
11
- * @description:
12
- */
13
- getAppOrderShipmentDetails({ orderId }?: {
14
- orderId: string;
15
- }): Promise<ShipmentDetailsResponse>;
16
- /**
17
- * @param {Object} arg - Arg object.
18
- * @param {string} [arg.lane] -
19
- * @param {string} [arg.searchType] -
20
- * @param {string} [arg.searchId] -
21
- * @param {string} [arg.fromDate] -
22
- * @param {string} [arg.toDate] -
23
- * @param {string} [arg.dpIds] -
24
- * @param {string} [arg.orderingCompanyId] -
25
- * @param {string} [arg.stores] -
26
- * @param {string} [arg.salesChannel] -
27
- * @param {string} [arg.requestByExt] -
28
- * @param {number} [arg.pageNo] -
29
- * @param {number} [arg.pageSize] -
30
- * @param {string} [arg.customerId] -
31
- * @param {boolean} [arg.isPrioritySort] -
32
- * @returns {Promise<ShipmentInternalPlatformViewResponse>} - Success response
33
- * @summary:
34
- * @description:
35
- */
36
- getApplicationShipments({ lane, searchType, searchId, fromDate, toDate, dpIds, orderingCompanyId, stores, salesChannel, requestByExt, pageNo, pageSize, customerId, isPrioritySort, }?: {
37
- lane?: string;
38
- searchType?: string;
39
- searchId?: string;
40
- fromDate?: string;
41
- toDate?: string;
42
- dpIds?: string;
43
- orderingCompanyId?: string;
44
- stores?: string;
45
- salesChannel?: string;
46
- requestByExt?: string;
47
- pageNo?: number;
48
- pageSize?: number;
49
- customerId?: string;
50
- isPrioritySort?: boolean;
51
- }): Promise<ShipmentInternalPlatformViewResponse>;
52
6
  /**
53
7
  * @param {Object} arg - Arg object.
54
8
  * @param {string} arg.shipmentId -
@@ -56,7 +10,7 @@ declare class Order {
56
10
  * @summary: Track shipment
57
11
  * @description: Track Shipment by shipment id, for application based on application Id
58
12
  */
59
- trackPlatformShipment({ shipmentId }?: {
13
+ trackShipmentPlatform({ shipmentId }?: {
60
14
  shipmentId: string;
61
15
  }): Promise<PlatformShipmentTrack>;
62
16
  }
@@ -12,202 +12,6 @@ class Order {
12
12
  this.applicationId = applicationId;
13
13
  }
14
14
 
15
- /**
16
- * @param {Object} arg - Arg object.
17
- * @param {string} arg.orderId -
18
- * @returns {Promise<ShipmentDetailsResponse>} - Success response
19
- * @summary:
20
- * @description:
21
- */
22
- async getAppOrderShipmentDetails({ orderId } = {}) {
23
- const { error } = OrderValidator.getAppOrderShipmentDetails().validate(
24
- {
25
- orderId,
26
- },
27
- { abortEarly: false, allowUnknown: true }
28
- );
29
- if (error) {
30
- return Promise.reject(new FDKClientValidationError(error));
31
- }
32
-
33
- // Showing warrnings if extra unknown parameters are found
34
- const {
35
- error: warrning,
36
- } = OrderValidator.getAppOrderShipmentDetails().validate(
37
- {
38
- orderId,
39
- },
40
- { abortEarly: false, allowUnknown: false }
41
- );
42
- if (warrning) {
43
- Logger({
44
- level: "WARN",
45
- message:
46
- "Parameter Validation warrnings for getAppOrderShipmentDetails",
47
- });
48
- Logger({ level: "WARN", message: warrning });
49
- }
50
-
51
- const query_params = {};
52
- query_params["order_id"] = orderId;
53
-
54
- const response = await PlatformAPIClient.execute(
55
- this.config,
56
- "get",
57
- `/service/platform/orders/v1.0/company/${this.config.companyId}/application/${this.applicationId}/order-details`,
58
- query_params,
59
- undefined
60
- );
61
-
62
- const {
63
- error: res_error,
64
- } = OrderModel.ShipmentDetailsResponse().validate(response, {
65
- abortEarly: false,
66
- allowUnknown: false,
67
- });
68
-
69
- if (res_error) {
70
- Logger({
71
- level: "WARN",
72
- message: "Response Validation Warnnings for getAppOrderShipmentDetails",
73
- });
74
- Logger({ level: "WARN", message: res_error });
75
- }
76
-
77
- return response;
78
- }
79
-
80
- /**
81
- * @param {Object} arg - Arg object.
82
- * @param {string} [arg.lane] -
83
- * @param {string} [arg.searchType] -
84
- * @param {string} [arg.searchId] -
85
- * @param {string} [arg.fromDate] -
86
- * @param {string} [arg.toDate] -
87
- * @param {string} [arg.dpIds] -
88
- * @param {string} [arg.orderingCompanyId] -
89
- * @param {string} [arg.stores] -
90
- * @param {string} [arg.salesChannel] -
91
- * @param {string} [arg.requestByExt] -
92
- * @param {number} [arg.pageNo] -
93
- * @param {number} [arg.pageSize] -
94
- * @param {string} [arg.customerId] -
95
- * @param {boolean} [arg.isPrioritySort] -
96
- * @returns {Promise<ShipmentInternalPlatformViewResponse>} - Success response
97
- * @summary:
98
- * @description:
99
- */
100
- async getApplicationShipments({
101
- lane,
102
- searchType,
103
- searchId,
104
- fromDate,
105
- toDate,
106
- dpIds,
107
- orderingCompanyId,
108
- stores,
109
- salesChannel,
110
- requestByExt,
111
- pageNo,
112
- pageSize,
113
- customerId,
114
- isPrioritySort,
115
- } = {}) {
116
- const { error } = OrderValidator.getApplicationShipments().validate(
117
- {
118
- lane,
119
- searchType,
120
- searchId,
121
- fromDate,
122
- toDate,
123
- dpIds,
124
- orderingCompanyId,
125
- stores,
126
- salesChannel,
127
- requestByExt,
128
- pageNo,
129
- pageSize,
130
- customerId,
131
- isPrioritySort,
132
- },
133
- { abortEarly: false, allowUnknown: true }
134
- );
135
- if (error) {
136
- return Promise.reject(new FDKClientValidationError(error));
137
- }
138
-
139
- // Showing warrnings if extra unknown parameters are found
140
- const {
141
- error: warrning,
142
- } = OrderValidator.getApplicationShipments().validate(
143
- {
144
- lane,
145
- searchType,
146
- searchId,
147
- fromDate,
148
- toDate,
149
- dpIds,
150
- orderingCompanyId,
151
- stores,
152
- salesChannel,
153
- requestByExt,
154
- pageNo,
155
- pageSize,
156
- customerId,
157
- isPrioritySort,
158
- },
159
- { abortEarly: false, allowUnknown: false }
160
- );
161
- if (warrning) {
162
- Logger({
163
- level: "WARN",
164
- message: "Parameter Validation warrnings for getApplicationShipments",
165
- });
166
- Logger({ level: "WARN", message: warrning });
167
- }
168
-
169
- const query_params = {};
170
- query_params["lane"] = lane;
171
- query_params["search_type"] = searchType;
172
- query_params["search_id"] = searchId;
173
- query_params["from_date"] = fromDate;
174
- query_params["to_date"] = toDate;
175
- query_params["dp_ids"] = dpIds;
176
- query_params["ordering_company_id"] = orderingCompanyId;
177
- query_params["stores"] = stores;
178
- query_params["sales_channel"] = salesChannel;
179
- query_params["request_by_ext"] = requestByExt;
180
- query_params["page_no"] = pageNo;
181
- query_params["page_size"] = pageSize;
182
- query_params["customer_id"] = customerId;
183
- query_params["is_priority_sort"] = isPrioritySort;
184
-
185
- const response = await PlatformAPIClient.execute(
186
- this.config,
187
- "get",
188
- `/service/platform/orders/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipments/`,
189
- query_params,
190
- undefined
191
- );
192
-
193
- const {
194
- error: res_error,
195
- } = OrderModel.ShipmentInternalPlatformViewResponse().validate(response, {
196
- abortEarly: false,
197
- allowUnknown: false,
198
- });
199
-
200
- if (res_error) {
201
- Logger({
202
- level: "WARN",
203
- message: "Response Validation Warnnings for getApplicationShipments",
204
- });
205
- Logger({ level: "WARN", message: res_error });
206
- }
207
-
208
- return response;
209
- }
210
-
211
15
  /**
212
16
  * @param {Object} arg - Arg object.
213
17
  * @param {string} arg.shipmentId -
@@ -215,8 +19,8 @@ class Order {
215
19
  * @summary: Track shipment
216
20
  * @description: Track Shipment by shipment id, for application based on application Id
217
21
  */
218
- async trackPlatformShipment({ shipmentId } = {}) {
219
- const { error } = OrderValidator.trackPlatformShipment().validate(
22
+ async trackShipmentPlatform({ shipmentId } = {}) {
23
+ const { error } = OrderValidator.trackShipmentPlatform().validate(
220
24
  {
221
25
  shipmentId,
222
26
  },
@@ -227,7 +31,7 @@ class Order {
227
31
  }
228
32
 
229
33
  // Showing warrnings if extra unknown parameters are found
230
- const { error: warrning } = OrderValidator.trackPlatformShipment().validate(
34
+ const { error: warrning } = OrderValidator.trackShipmentPlatform().validate(
231
35
  {
232
36
  shipmentId,
233
37
  },
@@ -236,7 +40,7 @@ class Order {
236
40
  if (warrning) {
237
41
  Logger({
238
42
  level: "WARN",
239
- message: "Parameter Validation warrnings for trackPlatformShipment",
43
+ message: "Parameter Validation warrnings for trackShipmentPlatform",
240
44
  });
241
45
  Logger({ level: "WARN", message: warrning });
242
46
  }
@@ -261,7 +65,7 @@ class Order {
261
65
  if (res_error) {
262
66
  Logger({
263
67
  level: "WARN",
264
- message: "Response Validation Warnnings for trackPlatformShipment",
68
+ message: "Response Validation Warnnings for trackShipmentPlatform",
265
69
  });
266
70
  Logger({ level: "WARN", message: res_error });
267
71
  }
@@ -1,6 +1,4 @@
1
1
  export = OrderValidator;
2
2
  declare class OrderValidator {
3
- static getAppOrderShipmentDetails(): any;
4
- static getApplicationShipments(): any;
5
- static trackPlatformShipment(): any;
3
+ static trackShipmentPlatform(): any;
6
4
  }
@@ -2,32 +2,7 @@ const Joi = require("joi");
2
2
 
3
3
  const OrderModel = require("./OrderPlatformModel");
4
4
  class OrderValidator {
5
- static getAppOrderShipmentDetails() {
6
- return Joi.object({
7
- orderId: Joi.string().allow("").required(),
8
- }).required();
9
- }
10
-
11
- static getApplicationShipments() {
12
- return Joi.object({
13
- lane: Joi.string().allow(""),
14
- searchType: Joi.string().allow(""),
15
- searchId: Joi.string().allow(""),
16
- fromDate: Joi.string().allow(""),
17
- toDate: Joi.string().allow(""),
18
- dpIds: Joi.string().allow(""),
19
- orderingCompanyId: Joi.string().allow(""),
20
- stores: Joi.string().allow(""),
21
- salesChannel: Joi.string().allow(""),
22
- requestByExt: Joi.string().allow(""),
23
- pageNo: Joi.number(),
24
- pageSize: Joi.number(),
25
- customerId: Joi.string().allow(""),
26
- isPrioritySort: Joi.boolean(),
27
- }).required();
28
- }
29
-
30
- static trackPlatformShipment() {
5
+ static trackShipmentPlatform() {
31
6
  return Joi.object({
32
7
  shipmentId: Joi.string().allow("").required(),
33
8
  }).required();