@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.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 (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +6 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -18,6 +18,7 @@ class FileStorage {
18
18
  * @param {FileStoragePlatformApplicationValidator.AppCompleteUploadParam} arg
19
19
  * - Arg object
20
20
  *
21
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
21
22
  * @param {import("../PlatformAPIClient").Options} - Options
22
23
  * @returns {Promise<FileStoragePlatformModel.CompleteResponse>} - Success response
23
24
  * @name appCompleteUpload
@@ -43,8 +44,8 @@ class FileStorage {
43
44
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/).
44
45
  */
45
46
  async appCompleteUpload(
46
- { namespace, body } = {},
47
- { headers } = { headers: false }
47
+ { namespace, body, requestHeaders } = { requestHeaders: {} },
48
+ { responseHeaders } = { responseHeaders: false }
48
49
  ) {
49
50
  const {
50
51
  error,
@@ -83,15 +84,15 @@ class FileStorage {
83
84
  const response = await PlatformAPIClient.execute(
84
85
  this.config,
85
86
  "post",
86
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete/`,
87
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`,
87
88
  query_params,
88
89
  body,
89
- undefined,
90
- { headers }
90
+ requestHeaders,
91
+ { responseHeaders }
91
92
  );
92
93
 
93
94
  let responseData = response;
94
- if (headers) {
95
+ if (responseHeaders) {
95
96
  responseData = response[0];
96
97
  }
97
98
 
@@ -114,13 +115,17 @@ class FileStorage {
114
115
 
115
116
  /**
116
117
  * @param {FileStoragePlatformApplicationValidator.AppCopyFilesParam} arg - Arg object
118
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
117
119
  * @param {import("../PlatformAPIClient").Options} - Options
118
- * @returns {Promise<FileStoragePlatformModel.BulkUploadResponse>} - Success response
120
+ * @returns {Promise<FileStoragePlatformModel.BulkUploadSyncMode>} - Success response
119
121
  * @name appCopyFiles
120
122
  * @summary: Copy Files
121
123
  * @description: Copy Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/).
122
124
  */
123
- async appCopyFiles({ body, sync } = {}, { headers } = { headers: false }) {
125
+ async appCopyFiles(
126
+ { body, sync, requestHeaders } = { requestHeaders: {} },
127
+ { responseHeaders } = { responseHeaders: false }
128
+ ) {
124
129
  const {
125
130
  error,
126
131
  } = FileStoragePlatformApplicationValidator.appCopyFiles().validate(
@@ -157,21 +162,21 @@ class FileStorage {
157
162
  const response = await PlatformAPIClient.execute(
158
163
  this.config,
159
164
  "post",
160
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy/`,
165
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/uploads/copy`,
161
166
  query_params,
162
167
  body,
163
- undefined,
164
- { headers }
168
+ requestHeaders,
169
+ { responseHeaders }
165
170
  );
166
171
 
167
172
  let responseData = response;
168
- if (headers) {
173
+ if (responseHeaders) {
169
174
  responseData = response[0];
170
175
  }
171
176
 
172
177
  const {
173
178
  error: res_error,
174
- } = FileStoragePlatformModel.BulkUploadResponse().validate(responseData, {
179
+ } = FileStoragePlatformModel.BulkUploadSyncMode().validate(responseData, {
175
180
  abortEarly: false,
176
181
  allowUnknown: false,
177
182
  });
@@ -190,6 +195,7 @@ class FileStorage {
190
195
  * @param {FileStoragePlatformApplicationValidator.AppStartUploadParam} arg
191
196
  * - Arg object
192
197
  *
198
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
193
199
  * @param {import("../PlatformAPIClient").Options} - Options
194
200
  * @returns {Promise<FileStoragePlatformModel.StartResponse>} - Success response
195
201
  * @name appStartUpload
@@ -215,8 +221,8 @@ class FileStorage {
215
221
  * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/).
216
222
  */
217
223
  async appStartUpload(
218
- { namespace, body } = {},
219
- { headers } = { headers: false }
224
+ { namespace, body, requestHeaders } = { requestHeaders: {} },
225
+ { responseHeaders } = { responseHeaders: false }
220
226
  ) {
221
227
  const {
222
228
  error,
@@ -255,15 +261,15 @@ class FileStorage {
255
261
  const response = await PlatformAPIClient.execute(
256
262
  this.config,
257
263
  "post",
258
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start/`,
264
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`,
259
265
  query_params,
260
266
  body,
261
- undefined,
262
- { headers }
267
+ requestHeaders,
268
+ { responseHeaders }
263
269
  );
264
270
 
265
271
  let responseData = response;
266
- if (headers) {
272
+ if (responseHeaders) {
267
273
  responseData = response[0];
268
274
  }
269
275
 
@@ -286,6 +292,7 @@ class FileStorage {
286
292
 
287
293
  /**
288
294
  * @param {FileStoragePlatformApplicationValidator.AppbrowseParam} arg - Arg object
295
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
289
296
  * @param {import("../PlatformAPIClient").Options} - Options
290
297
  * @returns {Promise<FileStoragePlatformModel.BrowseResponse>} - Success response
291
298
  * @name appbrowse
@@ -293,8 +300,8 @@ class FileStorage {
293
300
  * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/).
294
301
  */
295
302
  async appbrowse(
296
- { namespace, pageNo } = {},
297
- { headers } = { headers: false }
303
+ { namespace, page, limit, requestHeaders } = { requestHeaders: {} },
304
+ { responseHeaders } = { responseHeaders: false }
298
305
  ) {
299
306
  const {
300
307
  error,
@@ -302,7 +309,8 @@ class FileStorage {
302
309
  {
303
310
  namespace,
304
311
 
305
- pageNo,
312
+ page,
313
+ limit,
306
314
  },
307
315
  { abortEarly: false, allowUnknown: true }
308
316
  );
@@ -317,7 +325,8 @@ class FileStorage {
317
325
  {
318
326
  namespace,
319
327
 
320
- pageNo,
328
+ page,
329
+ limit,
321
330
  },
322
331
  { abortEarly: false, allowUnknown: false }
323
332
  );
@@ -329,20 +338,21 @@ class FileStorage {
329
338
  }
330
339
 
331
340
  const query_params = {};
332
- query_params["page_no"] = pageNo;
341
+ query_params["page"] = page;
342
+ query_params["limit"] = limit;
333
343
 
334
344
  const response = await PlatformAPIClient.execute(
335
345
  this.config,
336
346
  "get",
337
- `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse/`,
347
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse`,
338
348
  query_params,
339
349
  undefined,
340
- undefined,
341
- { headers }
350
+ requestHeaders,
351
+ { responseHeaders }
342
352
  );
343
353
 
344
354
  let responseData = response;
345
- if (headers) {
355
+ if (responseHeaders) {
346
356
  responseData = response[0];
347
357
  }
348
358
 
@@ -364,34 +374,457 @@ class FileStorage {
364
374
  }
365
375
 
366
376
  /**
367
- * @param {Object} arg - Arg object.
368
- * @param {string} arg.namespace - Bucket name
369
- * @param {number} arg.companyId - Company_id
370
- * @param {number} arg.applicationId - Application_id
371
- * @returns {Paginator<FileStoragePlatformModel.BrowseResponse>}
372
- * @summary: Browse Files
373
- * @description: Browse Files
377
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg
378
+ * - Arg object
379
+ *
380
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
381
+ * @param {import("../PlatformAPIClient").Options} - Options
382
+ * @returns {Promise<FileStoragePlatformModel.PdfConfigSuccess[]>} - Success response
383
+ * @name getDefaultHtmlTemplate
384
+ * @summary: Get html template for sales channel
385
+ * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/).
386
+ */
387
+ async getDefaultHtmlTemplate(
388
+ { pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
389
+ { responseHeaders } = { responseHeaders: false }
390
+ ) {
391
+ const {
392
+ error,
393
+ } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
394
+ {
395
+ pdfTypeId,
396
+ format,
397
+ },
398
+ { abortEarly: false, allowUnknown: true }
399
+ );
400
+ if (error) {
401
+ return Promise.reject(new FDKClientValidationError(error));
402
+ }
403
+
404
+ // Showing warrnings if extra unknown parameters are found
405
+ const {
406
+ error: warrning,
407
+ } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate(
408
+ {
409
+ pdfTypeId,
410
+ format,
411
+ },
412
+ { abortEarly: false, allowUnknown: false }
413
+ );
414
+ if (warrning) {
415
+ Logger({
416
+ level: "WARN",
417
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultHtmlTemplate \n ${warrning}`,
418
+ });
419
+ }
420
+
421
+ const query_params = {};
422
+ query_params["pdf_type_id"] = pdfTypeId;
423
+ query_params["format"] = format;
424
+
425
+ const response = await PlatformAPIClient.execute(
426
+ this.config,
427
+ "get",
428
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
429
+ query_params,
430
+ undefined,
431
+ requestHeaders,
432
+ { responseHeaders }
433
+ );
434
+
435
+ let responseData = response;
436
+ if (responseHeaders) {
437
+ responseData = response[0];
438
+ }
439
+
440
+ const { error: res_error } = Joi.array()
441
+ .items(FileStoragePlatformModel.PdfConfigSuccess())
442
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
443
+
444
+ if (res_error) {
445
+ Logger({
446
+ level: "WARN",
447
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`,
448
+ });
449
+ }
450
+
451
+ return response;
452
+ }
453
+
454
+ /**
455
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg
456
+ * - Arg object
457
+ *
458
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
459
+ * @param {import("../PlatformAPIClient").Options} - Options
460
+ * @returns {Promise<FileStoragePlatformModel.DummyTemplateDataItems[]>} -
461
+ * Success response
462
+ * @name getDefaultPdfData
463
+ * @summary: Get Dummy pdf data for invoice or label
464
+ * @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/).
465
+ */
466
+ async getDefaultPdfData(
467
+ { pdfTypeId, requestHeaders } = { requestHeaders: {} },
468
+ { responseHeaders } = { responseHeaders: false }
469
+ ) {
470
+ const {
471
+ error,
472
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
473
+ {
474
+ pdfTypeId,
475
+ },
476
+ { abortEarly: false, allowUnknown: true }
477
+ );
478
+ if (error) {
479
+ return Promise.reject(new FDKClientValidationError(error));
480
+ }
481
+
482
+ // Showing warrnings if extra unknown parameters are found
483
+ const {
484
+ error: warrning,
485
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate(
486
+ {
487
+ pdfTypeId,
488
+ },
489
+ { abortEarly: false, allowUnknown: false }
490
+ );
491
+ if (warrning) {
492
+ Logger({
493
+ level: "WARN",
494
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfData \n ${warrning}`,
495
+ });
496
+ }
497
+
498
+ const query_params = {};
499
+ query_params["pdf_type_id"] = pdfTypeId;
500
+
501
+ const response = await PlatformAPIClient.execute(
502
+ this.config,
503
+ "get",
504
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper`,
505
+ query_params,
506
+ undefined,
507
+ requestHeaders,
508
+ { responseHeaders }
509
+ );
510
+
511
+ let responseData = response;
512
+ if (responseHeaders) {
513
+ responseData = response[0];
514
+ }
515
+
516
+ const { error: res_error } = Joi.array()
517
+ .items(FileStoragePlatformModel.DummyTemplateDataItems())
518
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
519
+
520
+ if (res_error) {
521
+ Logger({
522
+ level: "WARN",
523
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfData \n ${res_error}`,
524
+ });
525
+ }
526
+
527
+ return response;
528
+ }
529
+
530
+ /**
531
+ * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg
532
+ * - Arg object
533
+ *
534
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
535
+ * @param {import("../PlatformAPIClient").Options} - Options
536
+ * @returns {Promise<
537
+ * FileStoragePlatformModel.PdfDefaultTemplateSuccess[]
538
+ * >}
539
+ * - Success response
540
+ *
541
+ * @name getDefaultPdfTemplate
542
+ * @summary: Default html template
543
+ * @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/).
544
+ */
545
+ async getDefaultPdfTemplate(
546
+ { pdfTypeId, format, requestHeaders } = { requestHeaders: {} },
547
+ { responseHeaders } = { responseHeaders: false }
548
+ ) {
549
+ const {
550
+ error,
551
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
552
+ {
553
+ pdfTypeId,
554
+ format,
555
+ },
556
+ { abortEarly: false, allowUnknown: true }
557
+ );
558
+ if (error) {
559
+ return Promise.reject(new FDKClientValidationError(error));
560
+ }
561
+
562
+ // Showing warrnings if extra unknown parameters are found
563
+ const {
564
+ error: warrning,
565
+ } = FileStoragePlatformApplicationValidator.getDefaultPdfTemplate().validate(
566
+ {
567
+ pdfTypeId,
568
+ format,
569
+ },
570
+ { abortEarly: false, allowUnknown: false }
571
+ );
572
+ if (warrning) {
573
+ Logger({
574
+ level: "WARN",
575
+ message: `Parameter Validation warrnings for platform > FileStorage > getDefaultPdfTemplate \n ${warrning}`,
576
+ });
577
+ }
578
+
579
+ const query_params = {};
580
+ query_params["pdf_type_id"] = pdfTypeId;
581
+ query_params["format"] = format;
582
+
583
+ const response = await PlatformAPIClient.execute(
584
+ this.config,
585
+ "get",
586
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template`,
587
+ query_params,
588
+ undefined,
589
+ requestHeaders,
590
+ { responseHeaders }
591
+ );
592
+
593
+ let responseData = response;
594
+ if (responseHeaders) {
595
+ responseData = response[0];
596
+ }
597
+
598
+ const { error: res_error } = Joi.array()
599
+ .items(FileStoragePlatformModel.PdfDefaultTemplateSuccess())
600
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
601
+
602
+ if (res_error) {
603
+ Logger({
604
+ level: "WARN",
605
+ message: `Response Validation Warnnings for platform > FileStorage > getDefaultPdfTemplate \n ${res_error}`,
606
+ });
607
+ }
608
+
609
+ return response;
610
+ }
611
+
612
+ /**
613
+ * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object
614
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
615
+ * @param {import("../PlatformAPIClient").Options} - Options
616
+ * @returns {Promise<FileStoragePlatformModel.InvoiceTypesResponse[]>} -
617
+ * Success response
618
+ * @name getPdfTypes
619
+ * @summary: Get all the supported invoice pdf types
620
+ * @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
374
621
  */
375
- appbrowsePaginator({ namespace, companyId, applicationId } = {}) {
376
- const paginator = new Paginator();
377
- const callback = async () => {
378
- const pageId = paginator.nextId;
379
- const pageNo = paginator.pageNo;
380
- const pageType = "number";
381
- const data = await this.appbrowse({
382
- namespace: namespace,
383
- companyId: companyId,
384
- applicationId: applicationId,
385
- pageNo: pageNo,
622
+ async getPdfTypes(
623
+ { requestHeaders } = { requestHeaders: {} },
624
+ { responseHeaders } = { responseHeaders: false }
625
+ ) {
626
+ const {
627
+ error,
628
+ } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
629
+ {},
630
+ { abortEarly: false, allowUnknown: true }
631
+ );
632
+ if (error) {
633
+ return Promise.reject(new FDKClientValidationError(error));
634
+ }
635
+
636
+ // Showing warrnings if extra unknown parameters are found
637
+ const {
638
+ error: warrning,
639
+ } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
640
+ {},
641
+ { abortEarly: false, allowUnknown: false }
642
+ );
643
+ if (warrning) {
644
+ Logger({
645
+ level: "WARN",
646
+ message: `Parameter Validation warrnings for platform > FileStorage > getPdfTypes \n ${warrning}`,
386
647
  });
387
- paginator.setPaginator({
388
- hasNext: data.page.has_next ? true : false,
389
- nextId: data.page.next_id,
648
+ }
649
+
650
+ const query_params = {};
651
+
652
+ const response = await PlatformAPIClient.execute(
653
+ this.config,
654
+ "get",
655
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types`,
656
+ query_params,
657
+ undefined,
658
+ requestHeaders,
659
+ { responseHeaders }
660
+ );
661
+
662
+ let responseData = response;
663
+ if (responseHeaders) {
664
+ responseData = response[0];
665
+ }
666
+
667
+ const { error: res_error } = Joi.array()
668
+ .items(FileStoragePlatformModel.InvoiceTypesResponse())
669
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
670
+
671
+ if (res_error) {
672
+ Logger({
673
+ level: "WARN",
674
+ message: `Response Validation Warnnings for platform > FileStorage > getPdfTypes \n ${res_error}`,
390
675
  });
391
- return data;
392
- };
393
- paginator.setCallback(callback.bind(this));
394
- return paginator;
676
+ }
677
+
678
+ return response;
679
+ }
680
+
681
+ /**
682
+ * @param {FileStoragePlatformApplicationValidator.PreviewTemplateParam} arg
683
+ * - Arg object
684
+ *
685
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
686
+ * @param {import("../PlatformAPIClient").Options} - Options
687
+ * @returns {Promise<string>} - Success response
688
+ * @name previewTemplate
689
+ * @summary: Preview HTML template
690
+ * @description: Rendered HTML template with dummy json data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/previewTemplate/).
691
+ */
692
+ async previewTemplate(
693
+ { body, requestHeaders } = { requestHeaders: {} },
694
+ { responseHeaders } = { responseHeaders: false }
695
+ ) {
696
+ const {
697
+ error,
698
+ } = FileStoragePlatformApplicationValidator.previewTemplate().validate(
699
+ {
700
+ body,
701
+ },
702
+ { abortEarly: false, allowUnknown: true }
703
+ );
704
+ if (error) {
705
+ return Promise.reject(new FDKClientValidationError(error));
706
+ }
707
+
708
+ // Showing warrnings if extra unknown parameters are found
709
+ const {
710
+ error: warrning,
711
+ } = FileStoragePlatformApplicationValidator.previewTemplate().validate(
712
+ {
713
+ body,
714
+ },
715
+ { abortEarly: false, allowUnknown: false }
716
+ );
717
+ if (warrning) {
718
+ Logger({
719
+ level: "WARN",
720
+ message: `Parameter Validation warrnings for platform > FileStorage > previewTemplate \n ${warrning}`,
721
+ });
722
+ }
723
+
724
+ const query_params = {};
725
+
726
+ const response = await PlatformAPIClient.execute(
727
+ this.config,
728
+ "post",
729
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/render`,
730
+ query_params,
731
+ body,
732
+ requestHeaders,
733
+ { responseHeaders }
734
+ );
735
+
736
+ let responseData = response;
737
+ if (responseHeaders) {
738
+ responseData = response[0];
739
+ }
740
+
741
+ const { error: res_error } = Joi.string()
742
+ .allow("")
743
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
744
+
745
+ if (res_error) {
746
+ Logger({
747
+ level: "WARN",
748
+ message: `Response Validation Warnnings for platform > FileStorage > previewTemplate \n ${res_error}`,
749
+ });
750
+ }
751
+
752
+ return response;
753
+ }
754
+
755
+ /**
756
+ * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
757
+ * - Arg object
758
+ *
759
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
760
+ * @param {import("../PlatformAPIClient").Options} - Options
761
+ * @returns {Promise<FileStoragePlatformModel.PdfConfigSaveSuccess[]>} -
762
+ * Success response
763
+ * @name saveHtmlTemplate
764
+ * @summary: Update html template for invoice or label
765
+ * @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/saveHtmlTemplate/).
766
+ */
767
+ async saveHtmlTemplate(
768
+ { body, requestHeaders } = { requestHeaders: {} },
769
+ { responseHeaders } = { responseHeaders: false }
770
+ ) {
771
+ const {
772
+ error,
773
+ } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
774
+ {
775
+ body,
776
+ },
777
+ { abortEarly: false, allowUnknown: true }
778
+ );
779
+ if (error) {
780
+ return Promise.reject(new FDKClientValidationError(error));
781
+ }
782
+
783
+ // Showing warrnings if extra unknown parameters are found
784
+ const {
785
+ error: warrning,
786
+ } = FileStoragePlatformApplicationValidator.saveHtmlTemplate().validate(
787
+ {
788
+ body,
789
+ },
790
+ { abortEarly: false, allowUnknown: false }
791
+ );
792
+ if (warrning) {
793
+ Logger({
794
+ level: "WARN",
795
+ message: `Parameter Validation warrnings for platform > FileStorage > saveHtmlTemplate \n ${warrning}`,
796
+ });
797
+ }
798
+
799
+ const query_params = {};
800
+
801
+ const response = await PlatformAPIClient.execute(
802
+ this.config,
803
+ "put",
804
+ `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`,
805
+ query_params,
806
+ body,
807
+ requestHeaders,
808
+ { responseHeaders }
809
+ );
810
+
811
+ let responseData = response;
812
+ if (responseHeaders) {
813
+ responseData = response[0];
814
+ }
815
+
816
+ const { error: res_error } = Joi.array()
817
+ .items(FileStoragePlatformModel.PdfConfigSaveSuccess())
818
+ .validate(responseData, { abortEarly: false, allowUnknown: false });
819
+
820
+ if (res_error) {
821
+ Logger({
822
+ level: "WARN",
823
+ message: `Response Validation Warnnings for platform > FileStorage > saveHtmlTemplate \n ${res_error}`,
824
+ });
825
+ }
826
+
827
+ return response;
395
828
  }
396
829
  }
397
830