@gofynd/fdk-client-javascript 1.4.16-beta.4 → 1.4.16-beta.5

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 (239) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +2 -0
  4. package/sdk/application/ApplicationClient.js +2 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +68 -48
  6. package/sdk/application/Cart/CartApplicationClient.js +118 -27
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +59 -58
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +30 -29
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +1 -1
  11. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.js +10 -10
  13. package/sdk/application/Content/ContentApplicationClient.d.ts +51 -30
  14. package/sdk/application/Content/ContentApplicationClient.js +161 -56
  15. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +9 -11
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +7 -10
  17. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  18. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  19. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  20. package/sdk/application/Lead/LeadApplicationClient.js +1 -1
  21. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +35 -15
  22. package/sdk/application/Logistic/LogisticApplicationClient.js +101 -8
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +22 -12
  24. package/sdk/application/Order/OrderApplicationClient.js +56 -8
  25. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  26. package/sdk/application/Payment/PaymentApplicationClient.js +46 -46
  27. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  28. package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
  29. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  30. package/sdk/application/Theme/ThemeApplicationClient.js +4 -2
  31. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  32. package/sdk/application/User/UserApplicationClient.js +6 -6
  33. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  34. package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
  35. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
  37. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -21
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -16
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
  41. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  42. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  44. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  45. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +126 -20
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.js +970 -20
  47. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1200 -167
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.js +571 -160
  49. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +10 -0
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +121 -7
  51. package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
  52. package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
  53. package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
  54. package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
  55. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  56. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
  57. package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
  58. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
  59. package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
  60. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
  62. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
  64. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
  66. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  72. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  73. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  74. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  75. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  76. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  77. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  78. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.js +419 -115
  80. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +121 -65
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +109 -44
  82. package/sdk/platform/Cart/CartPlatformModel.d.ts +5070 -1296
  83. package/sdk/platform/Cart/CartPlatformModel.js +1992 -1217
  84. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
  88. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +154 -117
  89. package/sdk/platform/Catalog/CatalogPlatformClient.js +292 -172
  90. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6512 -1770
  91. package/sdk/platform/Catalog/CatalogPlatformModel.js +3228 -1687
  92. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +72 -31
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.js +50 -24
  94. package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
  95. package/sdk/platform/Common/CommonPlatformClient.js +3 -2
  96. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  97. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  98. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
  103. package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
  104. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  110. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
  116. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
  118. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  120. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +204 -141
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1076 -478
  122. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +253 -141
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +256 -130
  124. package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
  125. package/sdk/platform/Content/ContentPlatformClient.js +523 -336
  126. package/sdk/platform/Content/ContentPlatformModel.d.ts +1372 -400
  127. package/sdk/platform/Content/ContentPlatformModel.js +631 -394
  128. package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
  129. package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
  130. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
  131. package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
  132. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  133. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  134. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  135. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  136. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +95 -39
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -63
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
  140. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -22
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -24
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -116
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -104
  144. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  146. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  147. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  148. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  149. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  150. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +17 -6
  151. package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
  152. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
  153. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
  154. package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
  155. package/sdk/platform/Order/OrderPlatformClient.js +416 -198
  156. package/sdk/platform/Order/OrderPlatformModel.d.ts +7607 -1267
  157. package/sdk/platform/Order/OrderPlatformModel.js +3929 -1269
  158. package/sdk/platform/Order/OrderPlatformValidator.d.ts +270 -109
  159. package/sdk/platform/Order/OrderPlatformValidator.js +135 -77
  160. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
  161. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
  162. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  163. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  164. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
  165. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
  166. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  167. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  168. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  169. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  170. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
  171. package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
  172. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  173. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  174. package/sdk/platform/PlatformClient.d.ts +0 -2
  175. package/sdk/platform/PlatformClient.js +0 -4
  176. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  177. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  178. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  179. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  180. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  181. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  182. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +46 -36
  183. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
  184. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
  185. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
  186. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +40 -46
  187. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +58 -64
  188. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1842 -609
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +886 -554
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +42 -46
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +26 -28
  192. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +5 -5
  193. package/sdk/platform/Share/SharePlatformApplicationClient.js +9 -9
  194. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
  195. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  196. package/sdk/platform/Share/SharePlatformModel.d.ts +46 -7
  197. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  198. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  199. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
  200. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
  201. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
  202. package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
  203. package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
  204. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  205. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  206. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  207. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  208. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  209. package/sdk/platform/User/UserPlatformModel.js +23 -23
  210. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
  211. package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
  212. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
  213. package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
  214. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  215. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  216. package/sdk/platform/index.d.ts +0 -1
  217. package/sdk/platform/index.js +0 -2
  218. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
  219. package/sdk/public/Configuration/ConfigurationPublicClient.js +6 -5
  220. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  221. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  222. package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
  223. package/sdk/public/Content/ContentPublicClient.js +810 -6
  224. package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
  225. package/sdk/public/Content/ContentPublicModel.js +649 -3
  226. package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
  227. package/sdk/public/Content/ContentPublicValidator.js +88 -2
  228. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  229. package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
  230. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  231. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  232. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  233. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  234. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  235. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  236. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  237. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  238. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  239. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
@@ -23,10 +23,10 @@ class FileStorage {
23
23
  *
24
24
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
25
25
  * @param {import("../PlatformAPIClient").Options} - Options
26
- * @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
26
+ * @returns {Promise<FileStoragePlatformModel.FileUploadComplete>} - Success response
27
27
  * @name appCompleteUpload
28
- * @summary: Complete file upload for Application
29
- * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
28
+ * @summary: Application complete upload.
29
+ * @description: Finish uploading a file from an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
30
30
  */
31
31
  async appCompleteUpload(
32
32
  { namespace, body, requestHeaders } = { requestHeaders: {} },
@@ -69,7 +69,7 @@ class FileStorage {
69
69
  const response = await PlatformAPIClient.execute(
70
70
  this.config,
71
71
  "post",
72
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
72
+ `/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
73
73
  query_params,
74
74
  body,
75
75
  requestHeaders,
@@ -83,7 +83,7 @@ class FileStorage {
83
83
 
84
84
  const {
85
85
  error: res_error,
86
- } = FileStoragePlatformModel.CompleteResponse().validate(responseData, {
86
+ } = FileStoragePlatformModel.FileUploadComplete().validate(responseData, {
87
87
  abortEarly: false,
88
88
  allowUnknown: true,
89
89
  });
@@ -108,8 +108,8 @@ class FileStorage {
108
108
  * @param {import("../PlatformAPIClient").Options} - Options
109
109
  * @returns {Promise<Object>} - Success response
110
110
  * @name appCopyFiles
111
- * @summary: Copy files for Application
112
- * @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
111
+ * @summary: Application copy files.
112
+ * @description: Copy files from an application to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
113
113
  */
114
114
  async appCopyFiles(
115
115
  { body, sync, requestHeaders } = { requestHeaders: {} },
@@ -188,10 +188,10 @@ class FileStorage {
188
188
  *
189
189
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
190
190
  * @param {import("../PlatformAPIClient").Options} - Options
191
- * @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
191
+ * @returns {Promise<FileStoragePlatformModel.FileUpload>} - Success response
192
192
  * @name appStartUpload
193
- * @summary: Initiates file upload for Application
194
- * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
193
+ * @summary: Application start upload.
194
+ * @description: Start uploading a file from an application and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
195
195
  */
196
196
  async appStartUpload(
197
197
  { namespace, body, requestHeaders } = { requestHeaders: {} },
@@ -234,7 +234,7 @@ class FileStorage {
234
234
  const response = await PlatformAPIClient.execute(
235
235
  this.config,
236
236
  "post",
237
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
237
+ `/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
238
238
  query_params,
239
239
  body,
240
240
  requestHeaders,
@@ -248,7 +248,7 @@ class FileStorage {
248
248
 
249
249
  const {
250
250
  error: res_error,
251
- } = FileStoragePlatformModel.StartResponse().validate(responseData, {
251
+ } = FileStoragePlatformModel.FileUpload().validate(responseData, {
252
252
  abortEarly: false,
253
253
  allowUnknown: true,
254
254
  });
@@ -273,8 +273,8 @@ class FileStorage {
273
273
  * @param {import("../PlatformAPIClient").Options} - Options
274
274
  * @returns {Promise<Object>} - Success response
275
275
  * @name appbrowse
276
- * @summary: Browse files for Application
277
- * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
276
+ * @summary: Application browse files.
277
+ * @description: Browse files within an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
278
278
  */
279
279
  async appbrowse(
280
280
  { namespace, page, limit, search, requestHeaders } = { requestHeaders: {} },
@@ -361,8 +361,8 @@ class FileStorage {
361
361
  * @param {import("../PlatformAPIClient").Options} - Options
362
362
  * @returns {Promise<Object>} - Success response
363
363
  * @name browsefiles
364
- * @summary: Browse files for Application
365
- * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/).
364
+ * @summary: Browse Files
365
+ * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/).
366
366
  */
367
367
  async browsefiles(
368
368
  { namespace, body, page, limit, search, requestHeaders } = {
@@ -447,6 +447,248 @@ class FileStorage {
447
447
  return response;
448
448
  }
449
449
 
450
+ /**
451
+ * @param {FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam} arg
452
+ * - Arg object
453
+ *
454
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
455
+ * @param {import("../PlatformAPIClient").Options} - Options
456
+ * @returns {Promise<Object>} - Success response
457
+ * @name deletePdfGeneratorConfig
458
+ * @summary: Delete a PDF generator configuration
459
+ * @description: Deletes a specific PDF generator configuration based on the provided id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/deletePdfGeneratorConfig/).
460
+ */
461
+ async deletePdfGeneratorConfig(
462
+ { id, requestHeaders } = { requestHeaders: {} },
463
+ { responseHeaders } = { responseHeaders: false }
464
+ ) {
465
+ const {
466
+ error,
467
+ } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
468
+ {
469
+ id,
470
+ },
471
+ { abortEarly: false, allowUnknown: true }
472
+ );
473
+ if (error) {
474
+ return Promise.reject(new FDKClientValidationError(error));
475
+ }
476
+
477
+ // Showing warrnings if extra unknown parameters are found
478
+ const {
479
+ error: warrning,
480
+ } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate(
481
+ {
482
+ id,
483
+ },
484
+ { abortEarly: false, allowUnknown: false }
485
+ );
486
+ if (warrning) {
487
+ Logger({
488
+ level: "WARN",
489
+ message: `Parameter Validation warrnings for platform > FileStorage > deletePdfGeneratorConfig \n ${warrning}`,
490
+ });
491
+ }
492
+
493
+ const query_params = {};
494
+
495
+ const response = await PlatformAPIClient.execute(
496
+ this.config,
497
+ "delete",
498
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
499
+ query_params,
500
+ undefined,
501
+ requestHeaders,
502
+ { responseHeaders }
503
+ );
504
+
505
+ let responseData = response;
506
+ if (responseHeaders) {
507
+ responseData = response[0];
508
+ }
509
+
510
+ const { error: res_error } = Joi.any().validate(responseData, {
511
+ abortEarly: false,
512
+ allowUnknown: true,
513
+ });
514
+
515
+ if (res_error) {
516
+ if (this.config.options.strictResponseCheck === true) {
517
+ return Promise.reject(new FDKResponseValidationError(res_error));
518
+ } else {
519
+ Logger({
520
+ level: "WARN",
521
+ message: `Response Validation Warnings for platform > FileStorage > deletePdfGeneratorConfig \n ${res_error}`,
522
+ });
523
+ }
524
+ }
525
+
526
+ return response;
527
+ }
528
+
529
+ /**
530
+ * @param {FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam} arg
531
+ * - Arg object
532
+ *
533
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
534
+ * @param {import("../PlatformAPIClient").Options} - Options
535
+ * @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateById>} -
536
+ * Success response
537
+ * @name fetchPdfDefaultTemplateById
538
+ * @summary: get default html template for invoice or label
539
+ * @description: get default html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfDefaultTemplateById/).
540
+ */
541
+ async fetchPdfDefaultTemplateById(
542
+ { id, requestHeaders } = { requestHeaders: {} },
543
+ { responseHeaders } = { responseHeaders: false }
544
+ ) {
545
+ const {
546
+ error,
547
+ } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
548
+ {
549
+ id,
550
+ },
551
+ { abortEarly: false, allowUnknown: true }
552
+ );
553
+ if (error) {
554
+ return Promise.reject(new FDKClientValidationError(error));
555
+ }
556
+
557
+ // Showing warrnings if extra unknown parameters are found
558
+ const {
559
+ error: warrning,
560
+ } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate(
561
+ {
562
+ id,
563
+ },
564
+ { abortEarly: false, allowUnknown: false }
565
+ );
566
+ if (warrning) {
567
+ Logger({
568
+ level: "WARN",
569
+ message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${warrning}`,
570
+ });
571
+ }
572
+
573
+ const query_params = {};
574
+
575
+ const response = await PlatformAPIClient.execute(
576
+ this.config,
577
+ "get",
578
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template/${id}`,
579
+ query_params,
580
+ undefined,
581
+ requestHeaders,
582
+ { responseHeaders }
583
+ );
584
+
585
+ let responseData = response;
586
+ if (responseHeaders) {
587
+ responseData = response[0];
588
+ }
589
+
590
+ const {
591
+ error: res_error,
592
+ } = FileStoragePlatformModel.PdfDefaultTemplateById().validate(
593
+ responseData,
594
+ { abortEarly: false, allowUnknown: true }
595
+ );
596
+
597
+ if (res_error) {
598
+ if (this.config.options.strictResponseCheck === true) {
599
+ return Promise.reject(new FDKResponseValidationError(res_error));
600
+ } else {
601
+ Logger({
602
+ level: "WARN",
603
+ message: `Response Validation Warnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${res_error}`,
604
+ });
605
+ }
606
+ }
607
+
608
+ return response;
609
+ }
610
+
611
+ /**
612
+ * @param {FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam} arg
613
+ * - Arg object
614
+ *
615
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
616
+ * @param {import("../PlatformAPIClient").Options} - Options
617
+ * @returns {Promise<FileStoragePlatformModel.PdfTypeByIdDetails>} - Success response
618
+ * @name fetchPdfTypeById
619
+ * @summary: Get the pdf types of by id
620
+ * @description: Get the pdf types of PDF formats for filter - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfTypeById/).
621
+ */
622
+ async fetchPdfTypeById(
623
+ { id, requestHeaders } = { requestHeaders: {} },
624
+ { responseHeaders } = { responseHeaders: false }
625
+ ) {
626
+ const {
627
+ error,
628
+ } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
629
+ {
630
+ id,
631
+ },
632
+ { abortEarly: false, allowUnknown: true }
633
+ );
634
+ if (error) {
635
+ return Promise.reject(new FDKClientValidationError(error));
636
+ }
637
+
638
+ // Showing warrnings if extra unknown parameters are found
639
+ const {
640
+ error: warrning,
641
+ } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate(
642
+ {
643
+ id,
644
+ },
645
+ { abortEarly: false, allowUnknown: false }
646
+ );
647
+ if (warrning) {
648
+ Logger({
649
+ level: "WARN",
650
+ message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfTypeById \n ${warrning}`,
651
+ });
652
+ }
653
+
654
+ const query_params = {};
655
+
656
+ const response = await PlatformAPIClient.execute(
657
+ this.config,
658
+ "get",
659
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types/${id}`,
660
+ query_params,
661
+ undefined,
662
+ requestHeaders,
663
+ { responseHeaders }
664
+ );
665
+
666
+ let responseData = response;
667
+ if (responseHeaders) {
668
+ responseData = response[0];
669
+ }
670
+
671
+ const {
672
+ error: res_error,
673
+ } = FileStoragePlatformModel.PdfTypeByIdDetails().validate(responseData, {
674
+ abortEarly: false,
675
+ allowUnknown: true,
676
+ });
677
+
678
+ if (res_error) {
679
+ if (this.config.options.strictResponseCheck === true) {
680
+ return Promise.reject(new FDKResponseValidationError(res_error));
681
+ } else {
682
+ Logger({
683
+ level: "WARN",
684
+ message: `Response Validation Warnings for platform > FileStorage > fetchPdfTypeById \n ${res_error}`,
685
+ });
686
+ }
687
+ }
688
+
689
+ return response;
690
+ }
691
+
450
692
  /**
451
693
  * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg
452
694
  * - Arg object
@@ -455,7 +697,7 @@ class FileStorage {
455
697
  * @param {import("../PlatformAPIClient").Options} - Options
456
698
  * @returns {Promise<Object>} - Success response
457
699
  * @name generatePaymentReceipt
458
- * @summary: Generate payment receipt
700
+ * @summary: Generate payment receipt.
459
701
  * @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/).
460
702
  */
461
703
  async generatePaymentReceipt(
@@ -527,28 +769,25 @@ class FileStorage {
527
769
  }
528
770
 
529
771
  /**
530
- * @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg
772
+ * @param {FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam} arg
531
773
  * - Arg object
532
774
  *
533
775
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
534
776
  * @param {import("../PlatformAPIClient").Options} - Options
535
- * @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess>} - Success response
536
- * @name getDefaultHtmlTemplate
537
- * @summary: Get html template for Application
538
- * @description: Get the saved html template for provided sales channel
539
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
777
+ * @returns {Promise<Object>} - Success response
778
+ * @name getConfigHtmlTemplateById
779
+ * @summary: Update html template for invoice or label
780
+ * @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getConfigHtmlTemplateById/).
540
781
  */
541
- async getDefaultHtmlTemplate(
542
- { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
782
+ async getConfigHtmlTemplateById(
783
+ { id, requestHeaders } = { requestHeaders: {} },
543
784
  { responseHeaders } = { responseHeaders: false }
544
785
  ) {
545
786
  const {
546
787
  error,
547
- } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
788
+ } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
548
789
  {
549
- pdfTypeId,
550
- format,
551
- countryCode,
790
+ id,
552
791
  },
553
792
  { abortEarly: false, allowUnknown: true }
554
793
  );
@@ -559,30 +798,25 @@ class FileStorage {
559
798
  // Showing warrnings if extra unknown parameters are found
560
799
  const {
561
800
  error: warrning,
562
- } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
801
+ } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate(
563
802
  {
564
- pdfTypeId,
565
- format,
566
- countryCode,
803
+ id,
567
804
  },
568
805
  { abortEarly: false, allowUnknown: false }
569
806
  );
570
807
  if (warrning) {
571
808
  Logger({
572
809
  level: "WARN",
573
- message: `Parameter Validation warrnings for platform > FileStorage > getDefaultHtmlTemplate \n ${warrning}`,
810
+ message: `Parameter Validation warrnings for platform > FileStorage > getConfigHtmlTemplateById \n ${warrning}`,
574
811
  });
575
812
  }
576
813
 
577
814
  const query_params = {};
578
- query_params["pdf_type_id"] = pdfTypeId;
579
- query_params["format"] = format;
580
- query_params["country_code"] = countryCode;
581
815
 
582
816
  const response = await PlatformAPIClient.execute(
583
817
  this.config,
584
818
  "get",
585
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
819
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`,
586
820
  query_params,
587
821
  undefined,
588
822
  requestHeaders,
@@ -594,9 +828,7 @@ class FileStorage {
594
828
  responseData = response[0];
595
829
  }
596
830
 
597
- const {
598
- error: res_error,
599
- } = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, {
831
+ const { error: res_error } = Joi.any().validate(responseData, {
600
832
  abortEarly: false,
601
833
  allowUnknown: true,
602
834
  });
@@ -607,7 +839,7 @@ class FileStorage {
607
839
  } else {
608
840
  Logger({
609
841
  level: "WARN",
610
- message: `Response Validation Warnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`,
842
+ message: `Response Validation Warnings for platform > FileStorage > getConfigHtmlTemplateById \n ${res_error}`,
611
843
  });
612
844
  }
613
845
  }
@@ -621,11 +853,10 @@ class FileStorage {
621
853
  *
622
854
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
623
855
  * @param {import("../PlatformAPIClient").Options} - Options
624
- * @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems>} -
625
- * Success response
856
+ * @returns {Promise<FileStoragePlatformModel.PdfDataItemsDetails>} - Success response
626
857
  * @name getDefaultPdfData
627
- * @summary: Get default PDF data
628
- * @description: Retrieve default pdf payload data for invoice generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
858
+ * @summary: Get default PDF data.
859
+ * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
629
860
  */
630
861
  async getDefaultPdfData(
631
862
  { pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} },
@@ -682,10 +913,10 @@ class FileStorage {
682
913
 
683
914
  const {
684
915
  error: res_error,
685
- } = FileStoragePlatformModel.DummyTemplateDataItems().validate(
686
- responseData,
687
- { abortEarly: false, allowUnknown: true }
688
- );
916
+ } = FileStoragePlatformModel.PdfDataItemsDetails().validate(responseData, {
917
+ abortEarly: false,
918
+ allowUnknown: true,
919
+ });
689
920
 
690
921
  if (res_error) {
691
922
  if (this.config.options.strictResponseCheck === true) {
@@ -710,8 +941,8 @@ class FileStorage {
710
941
  * @returns {Promise<FileStoragePlatformModel.PdfDefaultTemplateSuccess>} -
711
942
  * Success response
712
943
  * @name getDefaultPdfTemplate
713
- * @summary: Get default PDF template
714
- * @description: Retrieve to get the default Invoice template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
944
+ * @summary: Get default PDF template.
945
+ * @description: Retrieve the default PDF template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
715
946
  */
716
947
  async getDefaultPdfTemplate(
717
948
  { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
@@ -790,24 +1021,193 @@ class FileStorage {
790
1021
  return response;
791
1022
  }
792
1023
 
1024
+ /**
1025
+ * @param {FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam} arg
1026
+ * - Arg object
1027
+ *
1028
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1029
+ * @param {import("../PlatformAPIClient").Options} - Options
1030
+ * @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess>} - Success response
1031
+ * @name getHtmlTemplateConfig
1032
+ * @summary: Get html template for sales channel
1033
+ * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getHtmlTemplateConfig/).
1034
+ */
1035
+ async getHtmlTemplateConfig(
1036
+ { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} },
1037
+ { responseHeaders } = { responseHeaders: false }
1038
+ ) {
1039
+ const {
1040
+ error,
1041
+ } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
1042
+ {
1043
+ pdfTypeId,
1044
+ format,
1045
+ countryCode,
1046
+ },
1047
+ { abortEarly: false, allowUnknown: true }
1048
+ );
1049
+ if (error) {
1050
+ return Promise.reject(new FDKClientValidationError(error));
1051
+ }
1052
+
1053
+ // Showing warrnings if extra unknown parameters are found
1054
+ const {
1055
+ error: warrning,
1056
+ } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate(
1057
+ {
1058
+ pdfTypeId,
1059
+ format,
1060
+ countryCode,
1061
+ },
1062
+ { abortEarly: false, allowUnknown: false }
1063
+ );
1064
+ if (warrning) {
1065
+ Logger({
1066
+ level: "WARN",
1067
+ message: `Parameter Validation warrnings for platform > FileStorage > getHtmlTemplateConfig \n ${warrning}`,
1068
+ });
1069
+ }
1070
+
1071
+ const query_params = {};
1072
+ query_params["pdf_type_id"] = pdfTypeId;
1073
+ query_params["format"] = format;
1074
+ query_params["country_code"] = countryCode;
1075
+
1076
+ const response = await PlatformAPIClient.execute(
1077
+ this.config,
1078
+ "get",
1079
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
1080
+ query_params,
1081
+ undefined,
1082
+ requestHeaders,
1083
+ { responseHeaders }
1084
+ );
1085
+
1086
+ let responseData = response;
1087
+ if (responseHeaders) {
1088
+ responseData = response[0];
1089
+ }
1090
+
1091
+ const {
1092
+ error: res_error,
1093
+ } = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, {
1094
+ abortEarly: false,
1095
+ allowUnknown: true,
1096
+ });
1097
+
1098
+ if (res_error) {
1099
+ if (this.config.options.strictResponseCheck === true) {
1100
+ return Promise.reject(new FDKResponseValidationError(res_error));
1101
+ } else {
1102
+ Logger({
1103
+ level: "WARN",
1104
+ message: `Response Validation Warnings for platform > FileStorage > getHtmlTemplateConfig \n ${res_error}`,
1105
+ });
1106
+ }
1107
+ }
1108
+
1109
+ return response;
1110
+ }
1111
+
1112
+ /**
1113
+ * @param {FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam} arg
1114
+ * - Arg object
1115
+ *
1116
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1117
+ * @param {import("../PlatformAPIClient").Options} - Options
1118
+ * @returns {Promise<FileStoragePlatformModel.MapperDetails>} - Success response
1119
+ * @name getPdfPayloadById
1120
+ * @summary: Get default PDF data.
1121
+ * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfPayloadById/).
1122
+ */
1123
+ async getPdfPayloadById(
1124
+ { id, requestHeaders } = { requestHeaders: {} },
1125
+ { responseHeaders } = { responseHeaders: false }
1126
+ ) {
1127
+ const {
1128
+ error,
1129
+ } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
1130
+ {
1131
+ id,
1132
+ },
1133
+ { abortEarly: false, allowUnknown: true }
1134
+ );
1135
+ if (error) {
1136
+ return Promise.reject(new FDKClientValidationError(error));
1137
+ }
1138
+
1139
+ // Showing warrnings if extra unknown parameters are found
1140
+ const {
1141
+ error: warrning,
1142
+ } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate(
1143
+ {
1144
+ id,
1145
+ },
1146
+ { abortEarly: false, allowUnknown: false }
1147
+ );
1148
+ if (warrning) {
1149
+ Logger({
1150
+ level: "WARN",
1151
+ message: `Parameter Validation warrnings for platform > FileStorage > getPdfPayloadById \n ${warrning}`,
1152
+ });
1153
+ }
1154
+
1155
+ const query_params = {};
1156
+
1157
+ const response = await PlatformAPIClient.execute(
1158
+ this.config,
1159
+ "get",
1160
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper/${id}`,
1161
+ query_params,
1162
+ undefined,
1163
+ requestHeaders,
1164
+ { responseHeaders }
1165
+ );
1166
+
1167
+ let responseData = response;
1168
+ if (responseHeaders) {
1169
+ responseData = response[0];
1170
+ }
1171
+
1172
+ const {
1173
+ error: res_error,
1174
+ } = FileStoragePlatformModel.MapperDetails().validate(responseData, {
1175
+ abortEarly: false,
1176
+ allowUnknown: true,
1177
+ });
1178
+
1179
+ if (res_error) {
1180
+ if (this.config.options.strictResponseCheck === true) {
1181
+ return Promise.reject(new FDKResponseValidationError(res_error));
1182
+ } else {
1183
+ Logger({
1184
+ level: "WARN",
1185
+ message: `Response Validation Warnings for platform > FileStorage > getPdfPayloadById \n ${res_error}`,
1186
+ });
1187
+ }
1188
+ }
1189
+
1190
+ return response;
1191
+ }
1192
+
793
1193
  /**
794
1194
  * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
795
1195
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
796
1196
  * @param {import("../PlatformAPIClient").Options} - Options
797
- * @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse>} -
798
- * Success response
1197
+ * @returns {Promise<FileStoragePlatformModel.InvoiceTypes>} - Success response
799
1198
  * @name getPdfTypes
800
- * @summary: Get PDF types
801
- * @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
1199
+ * @summary: Get all the supported invoice pdf types
1200
+ * @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
802
1201
  */
803
1202
  async getPdfTypes(
804
- { countryCode, requestHeaders } = { requestHeaders: {} },
1203
+ { storeOs, countryCode, requestHeaders } = { requestHeaders: {} },
805
1204
  { responseHeaders } = { responseHeaders: false }
806
1205
  ) {
807
1206
  const {
808
1207
  error,
809
1208
  } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
810
1209
  {
1210
+ storeOs,
811
1211
  countryCode,
812
1212
  },
813
1213
  { abortEarly: false, allowUnknown: true }
@@ -821,6 +1221,7 @@ class FileStorage {
821
1221
  error: warrning,
822
1222
  } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
823
1223
  {
1224
+ storeOs,
824
1225
  countryCode,
825
1226
  },
826
1227
  { abortEarly: false, allowUnknown: false }
@@ -834,6 +1235,7 @@ class FileStorage {
834
1235
 
835
1236
  const query_params = {};
836
1237
  query_params["country_code"] = countryCode;
1238
+ query_params["store_os"] = storeOs;
837
1239
 
838
1240
  const response = await PlatformAPIClient.execute(
839
1241
  this.config,
@@ -852,7 +1254,7 @@ class FileStorage {
852
1254
 
853
1255
  const {
854
1256
  error: res_error,
855
- } = FileStoragePlatformModel.InvoiceTypesResponse().validate(responseData, {
1257
+ } = FileStoragePlatformModel.InvoiceTypes().validate(responseData, {
856
1258
  abortEarly: false,
857
1259
  allowUnknown: true,
858
1260
  });
@@ -880,8 +1282,8 @@ class FileStorage {
880
1282
  * @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess>} -
881
1283
  * Success response
882
1284
  * @name saveHtmlTemplate
883
- * @summary: Save PDF template
884
- * @description: Save html template for provided sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
1285
+ * @summary: Save HTML template.
1286
+ * @description: Store an HTML template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/).
885
1287
  */
886
1288
  async saveHtmlTemplate(
887
1289
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1045,7 +1447,6 @@ class FileStorage {
1045
1447
  * @param {string} namespace
1046
1448
  * @param {number} size
1047
1449
  * @param {number} tags
1048
- * @param {string} enc_key
1049
1450
  */
1050
1451
  FileStorage.prototype.upload = function ({
1051
1452
  data,
@@ -1054,7 +1455,6 @@ FileStorage.prototype.upload = function ({
1054
1455
  namespace,
1055
1456
  size,
1056
1457
  tags,
1057
- enc_key,
1058
1458
  } = {}) {
1059
1459
  return new Promise(async (resolve, reject) => {
1060
1460
  try {
@@ -1065,7 +1465,6 @@ FileStorage.prototype.upload = function ({
1065
1465
  content_type,
1066
1466
  size: size,
1067
1467
  tags: tags,
1068
- enc_key: enc_key,
1069
1468
  },
1070
1469
  });
1071
1470
  if (dataObj.upload && dataObj.upload.url) {