@gofynd/fdk-client-javascript 1.1.0 → 1.1.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.
Files changed (102) hide show
  1. package/README.md +0 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +11 -0
  4. package/sdk/application/Cart/CartApplicationClient.js +65 -0
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +6 -0
  6. package/sdk/application/Cart/CartApplicationModel.js +72 -0
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
  8. package/sdk/application/Cart/CartApplicationValidator.js +6 -0
  9. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +19 -4
  10. package/sdk/application/Catalog/CatalogApplicationClient.js +27 -6
  11. package/sdk/application/Catalog/CatalogApplicationValidator.js +4 -0
  12. package/sdk/application/Content/ContentApplicationModel.js +1 -4
  13. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
  15. package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
  16. package/sdk/application/Lead/LeadApplicationModel.js +1 -0
  17. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +4 -0
  18. package/sdk/application/PosCart/PosCartApplicationModel.js +50 -0
  19. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
  20. package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
  21. package/sdk/common/AxiosHelper.js +1 -1
  22. package/sdk/common/Constant.d.ts +0 -18
  23. package/sdk/common/Constant.js +0 -22
  24. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +51 -0
  25. package/sdk/platform/Cart/CartPlatformApplicationClient.js +308 -0
  26. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +5 -0
  27. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +30 -0
  28. package/sdk/platform/Cart/CartPlatformModel.d.ts +13 -0
  29. package/sdk/platform/Cart/CartPlatformModel.js +154 -0
  30. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -1
  31. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +5 -0
  32. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  33. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +1 -1
  34. package/sdk/platform/Catalog/CatalogPlatformClient.js +1 -1
  35. package/sdk/platform/Catalog/CatalogPlatformModel.js +3 -7
  36. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +0 -183
  37. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +0 -417
  38. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +0 -10
  39. package/sdk/platform/Communication/CommunicationPlatformClient.js +0 -26
  40. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +4 -0
  41. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -22
  42. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +0 -56
  43. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +12 -1
  44. package/sdk/platform/Content/ContentPlatformApplicationClient.js +62 -2
  45. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -0
  46. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +6 -0
  47. package/sdk/platform/Content/ContentPlatformModel.js +1 -4
  48. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
  49. package/sdk/platform/Discount/DiscountPlatformClient.js +1 -1
  50. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +1 -0
  51. package/sdk/platform/Discount/DiscountPlatformModel.js +15 -0
  52. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -1
  53. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
  54. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
  55. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  56. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  57. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
  58. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +9 -3
  59. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
  60. package/sdk/platform/Lead/LeadPlatformModel.js +1 -0
  61. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +1 -47
  62. package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -201
  63. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -3
  64. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -26
  65. package/sdk/platform/Order/OrderPlatformClient.d.ts +54 -186
  66. package/sdk/platform/Order/OrderPlatformClient.js +246 -934
  67. package/sdk/platform/Order/OrderPlatformModel.d.ts +4 -20
  68. package/sdk/platform/Order/OrderPlatformModel.js +40 -182
  69. package/sdk/platform/Order/OrderPlatformValidator.d.ts +3 -12
  70. package/sdk/platform/Order/OrderPlatformValidator.js +20 -96
  71. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +24 -10
  72. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +111 -44
  73. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +2 -1
  74. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +13 -5
  75. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2 -0
  76. package/sdk/platform/Payment/PaymentPlatformModel.js +12 -0
  77. package/sdk/platform/PlatformApplicationClient.d.ts +20 -41
  78. package/sdk/platform/PlatformApplicationClient.js +22 -45
  79. package/sdk/platform/PlatformClient.d.ts +190 -266
  80. package/sdk/platform/PlatformClient.js +223 -318
  81. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
  82. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
  83. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
  84. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
  85. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +11 -0
  86. package/sdk/platform/Share/SharePlatformApplicationClient.js +61 -0
  87. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -0
  88. package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -0
  89. package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
  90. package/sdk/platform/Share/SharePlatformModel.js +11 -0
  91. package/sdk/platform/index.d.ts +0 -1
  92. package/sdk/platform/index.js +0 -2
  93. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -109
  94. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -558
  95. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -11
  96. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -56
  97. package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +0 -88
  98. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +0 -361
  99. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -23
  100. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -169
  101. package/sdk/platform/Analytics/AnalyticsPlatformValidator.d.ts +0 -7
  102. 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(),
@@ -347,6 +347,7 @@ class ContentModel {
347
347
  static Detail() {
348
348
  return Joi.object({
349
349
  description: Joi.string().allow(""),
350
+ image_url: Joi.string().allow(""),
350
351
  title: Joi.string().allow(""),
351
352
  });
352
353
  }
@@ -911,10 +912,6 @@ class ContentModel {
911
912
 
912
913
  "product",
913
914
 
914
- "product-reviews",
915
-
916
- "add-product-review",
917
-
918
915
  "product-request",
919
916
 
920
917
  "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
  }
@@ -5,7 +5,10 @@ declare class FileStorage {
5
5
  applicationId: any;
6
6
  /**
7
7
  * @param {Object} arg - Arg object.
8
- * @param {string} arg.namespace - Bucket name
8
+ * @param {string} arg.namespace - Segregation of different types of
9
+ * files(products, orders, logistics etc), Required for validating the
10
+ * data of the file being uploaded, decides where exactly the file will be
11
+ * stored inside the storage bucket.
9
12
  * @param {StartResponse} arg.body
10
13
  * @returns {Promise<CompleteResponse>} - Success response
11
14
  * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
@@ -46,7 +49,10 @@ declare class FileStorage {
46
49
  }): Promise<BulkUploadResponse>;
47
50
  /**
48
51
  * @param {Object} arg - Arg object.
49
- * @param {string} arg.namespace - Bucket name
52
+ * @param {string} arg.namespace - Segregation of different types of
53
+ * files(products, orders, logistics etc), Required for validating the
54
+ * data of the file being uploaded, decides where exactly the file will be
55
+ * stored inside the storage bucket.
50
56
  * @param {StartRequest} arg.body
51
57
  * @returns {Promise<StartResponse>} - Success response
52
58
  * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
@@ -81,7 +87,7 @@ declare class FileStorage {
81
87
  * @summary: Browse Files
82
88
  * @description: Browse Files
83
89
  */
84
- browse({ namespace, pageNo, }?: {
90
+ appbrowse({ namespace, pageNo, }?: {
85
91
  namespace: string;
86
92
  pageNo?: number;
87
93
  }): Promise<BrowseResponse>;
@@ -93,7 +99,7 @@ declare class FileStorage {
93
99
  * @summary: Browse Files
94
100
  * @description: Browse Files
95
101
  */
96
- browsePaginator({ namespace, companyId, applicationId }?: {
102
+ appbrowsePaginator({ namespace, companyId, applicationId }?: {
97
103
  namespace: string;
98
104
  companyId: number;
99
105
  applicationId: number;
@@ -16,7 +16,10 @@ class FileStorage {
16
16
 
17
17
  /**
18
18
  * @param {Object} arg - Arg object.
19
- * @param {string} arg.namespace - Bucket name
19
+ * @param {string} arg.namespace - Segregation of different types of
20
+ * files(products, orders, logistics etc), Required for validating the
21
+ * data of the file being uploaded, decides where exactly the file will be
22
+ * stored inside the storage bucket.
20
23
  * @param {StartResponse} arg.body
21
24
  * @returns {Promise<CompleteResponse>} - Success response
22
25
  * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
@@ -170,7 +173,10 @@ class FileStorage {
170
173
 
171
174
  /**
172
175
  * @param {Object} arg - Arg object.
173
- * @param {string} arg.namespace - Bucket name
176
+ * @param {string} arg.namespace - Segregation of different types of
177
+ * files(products, orders, logistics etc), Required for validating the
178
+ * data of the file being uploaded, decides where exactly the file will be
179
+ * stored inside the storage bucket.
174
180
  * @param {StartRequest} arg.body
175
181
  * @returns {Promise<StartResponse>} - Success response
176
182
  * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
@@ -263,12 +269,12 @@ class FileStorage {
263
269
  * @summary: Browse Files
264
270
  * @description: Browse Files
265
271
  */
266
- async browse({
272
+ async appbrowse({
267
273
  namespace,
268
274
 
269
275
  pageNo,
270
276
  } = {}) {
271
- const { error } = FileStorageValidator.browse().validate(
277
+ const { error } = FileStorageValidator.appbrowse().validate(
272
278
  {
273
279
  namespace,
274
280
 
@@ -281,7 +287,7 @@ class FileStorage {
281
287
  }
282
288
 
283
289
  // Showing warrnings if extra unknown parameters are found
284
- const { error: warrning } = FileStorageValidator.browse().validate(
290
+ const { error: warrning } = FileStorageValidator.appbrowse().validate(
285
291
  {
286
292
  namespace,
287
293
 
@@ -292,7 +298,7 @@ class FileStorage {
292
298
  if (warrning) {
293
299
  Logger({
294
300
  level: "WARN",
295
- message: "Parameter Validation warrnings for browse",
301
+ message: "Parameter Validation warrnings for appbrowse",
296
302
  });
297
303
  Logger({ level: "WARN", message: warrning });
298
304
  }
@@ -318,7 +324,7 @@ class FileStorage {
318
324
  if (res_error) {
319
325
  Logger({
320
326
  level: "WARN",
321
- message: "Response Validation Warnnings for browse",
327
+ message: "Response Validation Warnnings for appbrowse",
322
328
  });
323
329
  Logger({ level: "WARN", message: res_error });
324
330
  }
@@ -334,13 +340,13 @@ class FileStorage {
334
340
  * @summary: Browse Files
335
341
  * @description: Browse Files
336
342
  */
337
- browsePaginator({ namespace, companyId, applicationId } = {}) {
343
+ appbrowsePaginator({ namespace, companyId, applicationId } = {}) {
338
344
  const paginator = new Paginator();
339
345
  const callback = async () => {
340
346
  const pageId = paginator.nextId;
341
347
  const pageNo = paginator.pageNo;
342
348
  const pageType = "number";
343
- const data = await this.browse({
349
+ const data = await this.appbrowse({
344
350
  namespace: namespace,
345
351
  companyId: companyId,
346
352
  applicationId: applicationId,
@@ -3,5 +3,5 @@ declare class FileStorageValidator {
3
3
  static appCompleteUpload(): any;
4
4
  static appCopyFiles(): any;
5
5
  static appStartUpload(): any;
6
- static browse(): any;
6
+ static appbrowse(): any;
7
7
  }
@@ -26,7 +26,7 @@ class FileStorageValidator {
26
26
  }).required();
27
27
  }
28
28
 
29
- static browse() {
29
+ static appbrowse() {
30
30
  return Joi.object({
31
31
  namespace: Joi.string().allow("").required(),
32
32
 
@@ -25,7 +25,10 @@ declare class FileStorage {
25
25
  }): Paginator;
26
26
  /**
27
27
  * @param {Object} arg - Arg object.
28
- * @param {string} arg.namespace - Bucket name
28
+ * @param {string} arg.namespace - Segregation of different types of
29
+ * files(products, orders, logistics etc), Required for validating the
30
+ * data of the file being uploaded, decides where exactly the file will be
31
+ * stored inside the storage bucket.
29
32
  * @param {StartResponse} arg.body
30
33
  * @returns {Promise<CompleteResponse>} - Success response
31
34
  * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
@@ -86,7 +89,10 @@ declare class FileStorage {
86
89
  }): Promise<string>;
87
90
  /**
88
91
  * @param {Object} arg - Arg object.
89
- * @param {string} arg.namespace - Bucket name
92
+ * @param {string} arg.namespace - Segregation of different types of
93
+ * files(products, orders, logistics etc), Required for validating the
94
+ * data of the file being uploaded, decides where exactly the file will be
95
+ * stored inside the storage bucket.
90
96
  * @param {StartRequest} arg.body
91
97
  * @returns {Promise<StartResponse>} - Success response
92
98
  * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
@@ -116,7 +116,10 @@ class FileStorage {
116
116
 
117
117
  /**
118
118
  * @param {Object} arg - Arg object.
119
- * @param {string} arg.namespace - Bucket name
119
+ * @param {string} arg.namespace - Segregation of different types of
120
+ * files(products, orders, logistics etc), Required for validating the
121
+ * data of the file being uploaded, decides where exactly the file will be
122
+ * stored inside the storage bucket.
120
123
  * @param {StartResponse} arg.body
121
124
  * @returns {Promise<CompleteResponse>} - Success response
122
125
  * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
@@ -376,7 +379,7 @@ class FileStorage {
376
379
 
377
380
  const response = await PlatformAPIClient.execute(
378
381
  this.config,
379
- "post",
382
+ "get",
380
383
  `/service/platform/assets/v1.0/company/${this.config.companyId}/proxy/`,
381
384
  query_params,
382
385
  undefined,
@@ -400,7 +403,10 @@ class FileStorage {
400
403
 
401
404
  /**
402
405
  * @param {Object} arg - Arg object.
403
- * @param {string} arg.namespace - Bucket name
406
+ * @param {string} arg.namespace - Segregation of different types of
407
+ * files(products, orders, logistics etc), Required for validating the
408
+ * data of the file being uploaded, decides where exactly the file will be
409
+ * stored inside the storage bucket.
404
410
  * @param {StartRequest} arg.body
405
411
  * @returns {Promise<StartResponse>} - Success response
406
412
  * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob.
@@ -22,8 +22,8 @@ class FileStorageModel {
22
22
  }
23
23
  static CDN() {
24
24
  return Joi.object({
25
- absolute_url: Joi.string().allow(""),
26
- relative_url: Joi.string().allow(""),
25
+ absolute_url: Joi.string().allow("").required(),
26
+ relative_url: Joi.string().allow("").required(),
27
27
  url: Joi.string().allow("").required(),
28
28
  });
29
29
  }
@@ -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
  }