@gofynd/fdk-client-javascript 0.1.35

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 (277) hide show
  1. package/.github/workflows/on_create_release.yml +23 -0
  2. package/.github/workflows/on_merge_main.yml +38 -0
  3. package/.github/workflows/on_pull_request.yml +35 -0
  4. package/.prettierrc +5 -0
  5. package/LICENSE +21 -0
  6. package/README.md +118 -0
  7. package/application.d.ts +3 -0
  8. package/application.js +6 -0
  9. package/common.d.ts +4 -0
  10. package/common.js +9 -0
  11. package/documentation/application/CART.md +7290 -0
  12. package/documentation/application/CATALOG.md +9570 -0
  13. package/documentation/application/COMMON.md +448 -0
  14. package/documentation/application/COMMUNICATION.md +463 -0
  15. package/documentation/application/CONFIGURATION.md +2902 -0
  16. package/documentation/application/CONTENT.md +3350 -0
  17. package/documentation/application/FILESTORAGE.md +491 -0
  18. package/documentation/application/LEAD.md +1891 -0
  19. package/documentation/application/LOGISTIC.md +439 -0
  20. package/documentation/application/ORDER.md +3428 -0
  21. package/documentation/application/PAYMENT.md +5035 -0
  22. package/documentation/application/POSCART.md +7889 -0
  23. package/documentation/application/README.md +21 -0
  24. package/documentation/application/REWARDS.md +714 -0
  25. package/documentation/application/SHARE.md +729 -0
  26. package/documentation/application/THEME.md +5796 -0
  27. package/documentation/application/USER.md +4326 -0
  28. package/documentation/platform/ANALYTICS.md +1150 -0
  29. package/documentation/platform/AUDITTRAIL.md +572 -0
  30. package/documentation/platform/BILLING.md +2396 -0
  31. package/documentation/platform/CART.md +5539 -0
  32. package/documentation/platform/CATALOG.md +21624 -0
  33. package/documentation/platform/COMMON.md +448 -0
  34. package/documentation/platform/COMMUNICATION.md +5714 -0
  35. package/documentation/platform/COMPANYPROFILE.md +2141 -0
  36. package/documentation/platform/CONFIGURATION.md +7335 -0
  37. package/documentation/platform/CONTENT.md +8989 -0
  38. package/documentation/platform/DISCOUNT.md +773 -0
  39. package/documentation/platform/FILESTORAGE.md +994 -0
  40. package/documentation/platform/INVENTORY.md +1775 -0
  41. package/documentation/platform/LEAD.md +4736 -0
  42. package/documentation/platform/ORDER.md +3764 -0
  43. package/documentation/platform/PARTNER.md +216 -0
  44. package/documentation/platform/PAYMENT.md +3444 -0
  45. package/documentation/platform/README.md +27 -0
  46. package/documentation/platform/REWARDS.md +871 -0
  47. package/documentation/platform/SHARE.md +602 -0
  48. package/documentation/platform/THEME.md +35725 -0
  49. package/documentation/platform/USER.md +2305 -0
  50. package/documentation/platform/WEBHOOK.md +587 -0
  51. package/documentation/public/CONFIGURATION.md +448 -0
  52. package/documentation/public/INVENTORY.md +686 -0
  53. package/documentation/public/WEBHOOK.md +348 -0
  54. package/index.d.ts +10 -0
  55. package/index.js +18 -0
  56. package/jest.config.d.ts +4 -0
  57. package/jest.config.js +6 -0
  58. package/package.json +35 -0
  59. package/platform.d.ts +3 -0
  60. package/platform.js +6 -0
  61. package/public.d.ts +3 -0
  62. package/public.js +6 -0
  63. package/sdk/application/ApplicationAPIClient.d.ts +11 -0
  64. package/sdk/application/ApplicationAPIClient.js +44 -0
  65. package/sdk/application/ApplicationClient.d.ts +40 -0
  66. package/sdk/application/ApplicationClient.js +84 -0
  67. package/sdk/application/ApplicationConfig.d.ts +19 -0
  68. package/sdk/application/ApplicationConfig.js +55 -0
  69. package/sdk/application/ApplicationModels.d.ts +826 -0
  70. package/sdk/application/ApplicationModels.js +10474 -0
  71. package/sdk/application/client/CartApplicationClient.d.ts +432 -0
  72. package/sdk/application/client/CartApplicationClient.js +1066 -0
  73. package/sdk/application/client/CatalogApplicationClient.d.ts +694 -0
  74. package/sdk/application/client/CatalogApplicationClient.js +1629 -0
  75. package/sdk/application/client/CommonApplicationClient.d.ts +38 -0
  76. package/sdk/application/client/CommonApplicationClient.js +105 -0
  77. package/sdk/application/client/CommunicationApplicationClient.d.ts +39 -0
  78. package/sdk/application/client/CommunicationApplicationClient.js +131 -0
  79. package/sdk/application/client/ConfigurationApplicationClient.d.ts +210 -0
  80. package/sdk/application/client/ConfigurationApplicationClient.js +649 -0
  81. package/sdk/application/client/ContentApplicationClient.d.ts +256 -0
  82. package/sdk/application/client/ContentApplicationClient.js +785 -0
  83. package/sdk/application/client/FileStorageApplicationClient.d.ts +88 -0
  84. package/sdk/application/client/FileStorageApplicationClient.js +214 -0
  85. package/sdk/application/client/LeadApplicationClient.d.ts +90 -0
  86. package/sdk/application/client/LeadApplicationClient.js +264 -0
  87. package/sdk/application/client/LogisticApplicationClient.d.ts +42 -0
  88. package/sdk/application/client/LogisticApplicationClient.js +128 -0
  89. package/sdk/application/client/OrderApplicationClient.d.ts +190 -0
  90. package/sdk/application/client/OrderApplicationClient.js +479 -0
  91. package/sdk/application/client/PaymentApplicationClient.d.ts +454 -0
  92. package/sdk/application/client/PaymentApplicationClient.js +1378 -0
  93. package/sdk/application/client/PosCartApplicationClient.d.ts +449 -0
  94. package/sdk/application/client/PosCartApplicationClient.js +1123 -0
  95. package/sdk/application/client/RewardsApplicationClient.d.ts +93 -0
  96. package/sdk/application/client/RewardsApplicationClient.js +293 -0
  97. package/sdk/application/client/ShareApplicationClient.d.ts +87 -0
  98. package/sdk/application/client/ShareApplicationClient.js +268 -0
  99. package/sdk/application/client/ThemeApplicationClient.d.ts +52 -0
  100. package/sdk/application/client/ThemeApplicationClient.js +161 -0
  101. package/sdk/application/client/UserApplicationClient.d.ts +446 -0
  102. package/sdk/application/client/UserApplicationClient.js +1275 -0
  103. package/sdk/application/constructUrl.d.ts +5 -0
  104. package/sdk/application/constructUrl.js +13 -0
  105. package/sdk/application/index.d.ts +2 -0
  106. package/sdk/application/index.js +4 -0
  107. package/sdk/application/models/CartValidator.d.ts +29 -0
  108. package/sdk/application/models/CartValidator.js +223 -0
  109. package/sdk/application/models/CatalogValidator.d.ts +33 -0
  110. package/sdk/application/models/CatalogValidator.js +233 -0
  111. package/sdk/application/models/CommonValidator.d.ts +5 -0
  112. package/sdk/application/models/CommonValidator.js +18 -0
  113. package/sdk/application/models/CommunicationValidator.d.ts +6 -0
  114. package/sdk/application/models/CommunicationValidator.js +20 -0
  115. package/sdk/application/models/ConfigurationValidator.d.ts +19 -0
  116. package/sdk/application/models/ConfigurationValidator.js +88 -0
  117. package/sdk/application/models/ContentValidator.d.ts +22 -0
  118. package/sdk/application/models/ContentValidator.js +106 -0
  119. package/sdk/application/models/FileStorageValidator.d.ts +6 -0
  120. package/sdk/application/models/FileStorageValidator.js +24 -0
  121. package/sdk/application/models/LeadValidator.d.ts +10 -0
  122. package/sdk/application/models/LeadValidator.js +48 -0
  123. package/sdk/application/models/LogisticValidator.d.ts +6 -0
  124. package/sdk/application/models/LogisticValidator.js +22 -0
  125. package/sdk/application/models/OrderValidator.d.ts +15 -0
  126. package/sdk/application/models/OrderValidator.js +87 -0
  127. package/sdk/application/models/PaymentValidator.d.ts +40 -0
  128. package/sdk/application/models/PaymentValidator.js +235 -0
  129. package/sdk/application/models/PosCartValidator.d.ts +30 -0
  130. package/sdk/application/models/PosCartValidator.js +232 -0
  131. package/sdk/application/models/RewardsValidator.d.ts +10 -0
  132. package/sdk/application/models/RewardsValidator.js +43 -0
  133. package/sdk/application/models/ShareValidator.d.ts +10 -0
  134. package/sdk/application/models/ShareValidator.js +44 -0
  135. package/sdk/application/models/ThemeValidator.d.ts +7 -0
  136. package/sdk/application/models/ThemeValidator.js +27 -0
  137. package/sdk/application/models/UserValidator.d.ts +38 -0
  138. package/sdk/application/models/UserValidator.js +233 -0
  139. package/sdk/common/AxiosHelper.d.ts +1 -0
  140. package/sdk/common/AxiosHelper.js +141 -0
  141. package/sdk/common/Constant.d.ts +294 -0
  142. package/sdk/common/Constant.js +332 -0
  143. package/sdk/common/FDKError.d.ts +26 -0
  144. package/sdk/common/FDKError.js +51 -0
  145. package/sdk/common/Logger.d.ts +2 -0
  146. package/sdk/common/Logger.js +85 -0
  147. package/sdk/common/Paginator.d.ts +16 -0
  148. package/sdk/common/Paginator.js +26 -0
  149. package/sdk/common/RequestSigner.d.ts +1 -0
  150. package/sdk/common/RequestSigner.js +306 -0
  151. package/sdk/common/Utility.d.ts +9 -0
  152. package/sdk/common/Utility.js +86 -0
  153. package/sdk/common/utils.d.ts +14 -0
  154. package/sdk/common/utils.js +165 -0
  155. package/sdk/platform/OAuthClient.d.ts +26 -0
  156. package/sdk/platform/OAuthClient.js +221 -0
  157. package/sdk/platform/PlatformAPIClient.d.ts +12 -0
  158. package/sdk/platform/PlatformAPIClient.js +43 -0
  159. package/sdk/platform/PlatformApplicationClient.d.ts +24398 -0
  160. package/sdk/platform/PlatformApplicationClient.js +23185 -0
  161. package/sdk/platform/PlatformApplicationModels.d.ts +333 -0
  162. package/sdk/platform/PlatformApplicationModels.js +21262 -0
  163. package/sdk/platform/PlatformClient.d.ts +9535 -0
  164. package/sdk/platform/PlatformClient.js +12336 -0
  165. package/sdk/platform/PlatformConfig.d.ts +29 -0
  166. package/sdk/platform/PlatformConfig.js +36 -0
  167. package/sdk/platform/PlatformModels.d.ts +1396 -0
  168. package/sdk/platform/PlatformModels.js +19222 -0
  169. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +84 -0
  170. package/sdk/platform/client/AnalyticsPlatformClient.js +215 -0
  171. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +38 -0
  172. package/sdk/platform/client/AuditTrailPlatformClient.js +133 -0
  173. package/sdk/platform/client/BillingPlatformClient.d.ts +109 -0
  174. package/sdk/platform/client/BillingPlatformClient.js +381 -0
  175. package/sdk/platform/client/CatalogPlatformClient.d.ts +806 -0
  176. package/sdk/platform/client/CatalogPlatformClient.js +2462 -0
  177. package/sdk/platform/client/CommonPlatformClient.d.ts +30 -0
  178. package/sdk/platform/client/CommonPlatformClient.js +84 -0
  179. package/sdk/platform/client/CommunicationPlatformClient.d.ts +26 -0
  180. package/sdk/platform/client/CommunicationPlatformClient.js +72 -0
  181. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +182 -0
  182. package/sdk/platform/client/CompanyProfilePlatformClient.js +540 -0
  183. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +277 -0
  184. package/sdk/platform/client/ConfigurationPlatformClient.js +806 -0
  185. package/sdk/platform/client/DiscountPlatformClient.d.ts +118 -0
  186. package/sdk/platform/client/DiscountPlatformClient.js +364 -0
  187. package/sdk/platform/client/FileStoragePlatformClient.d.ts +111 -0
  188. package/sdk/platform/client/FileStoragePlatformClient.js +268 -0
  189. package/sdk/platform/client/InventoryPlatformClient.d.ts +125 -0
  190. package/sdk/platform/client/InventoryPlatformClient.js +409 -0
  191. package/sdk/platform/client/LeadPlatformClient.d.ts +150 -0
  192. package/sdk/platform/client/LeadPlatformClient.js +439 -0
  193. package/sdk/platform/client/OrderPlatformClient.d.ts +190 -0
  194. package/sdk/platform/client/OrderPlatformClient.js +521 -0
  195. package/sdk/platform/client/PaymentPlatformClient.d.ts +98 -0
  196. package/sdk/platform/client/PaymentPlatformClient.js +331 -0
  197. package/sdk/platform/client/WebhookPlatformClient.d.ts +64 -0
  198. package/sdk/platform/client/WebhookPlatformClient.js +207 -0
  199. package/sdk/platform/index.d.ts +2 -0
  200. package/sdk/platform/index.js +4 -0
  201. package/sdk/platform/models/AnalyticsValidator.d.ts +7 -0
  202. package/sdk/platform/models/AnalyticsValidator.js +36 -0
  203. package/sdk/platform/models/AuditTrailValidator.d.ts +7 -0
  204. package/sdk/platform/models/AuditTrailValidator.js +26 -0
  205. package/sdk/platform/models/BillingValidator.d.ts +15 -0
  206. package/sdk/platform/models/BillingValidator.js +72 -0
  207. package/sdk/platform/models/CartValidator.d.ts +0 -0
  208. package/sdk/platform/models/CartValidator.js +0 -0
  209. package/sdk/platform/models/CatalogValidator.d.ts +74 -0
  210. package/sdk/platform/models/CatalogValidator.js +484 -0
  211. package/sdk/platform/models/CommonValidator.d.ts +5 -0
  212. package/sdk/platform/models/CommonValidator.js +18 -0
  213. package/sdk/platform/models/CommunicationValidator.d.ts +4 -0
  214. package/sdk/platform/models/CommunicationValidator.js +11 -0
  215. package/sdk/platform/models/CompanyProfileValidator.d.ts +17 -0
  216. package/sdk/platform/models/CompanyProfileValidator.js +93 -0
  217. package/sdk/platform/models/ConfigurationValidator.d.ts +21 -0
  218. package/sdk/platform/models/ConfigurationValidator.js +134 -0
  219. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  220. package/sdk/platform/models/ContentValidator.js +0 -0
  221. package/sdk/platform/models/DiscountValidator.d.ts +13 -0
  222. package/sdk/platform/models/DiscountValidator.js +75 -0
  223. package/sdk/platform/models/FileStorageValidator.d.ts +9 -0
  224. package/sdk/platform/models/FileStorageValidator.js +44 -0
  225. package/sdk/platform/models/InventoryValidator.d.ts +15 -0
  226. package/sdk/platform/models/InventoryValidator.js +81 -0
  227. package/sdk/platform/models/LeadValidator.d.ts +14 -0
  228. package/sdk/platform/models/LeadValidator.js +78 -0
  229. package/sdk/platform/models/OrderValidator.d.ts +14 -0
  230. package/sdk/platform/models/OrderValidator.js +110 -0
  231. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  232. package/sdk/platform/models/PartnerValidator.js +0 -0
  233. package/sdk/platform/models/PaymentValidator.d.ts +13 -0
  234. package/sdk/platform/models/PaymentValidator.js +65 -0
  235. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  236. package/sdk/platform/models/RewardsValidator.js +0 -0
  237. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  238. package/sdk/platform/models/ShareValidator.js +0 -0
  239. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  240. package/sdk/platform/models/ThemeValidator.js +0 -0
  241. package/sdk/platform/models/UserValidator.d.ts +0 -0
  242. package/sdk/platform/models/UserValidator.js +0 -0
  243. package/sdk/platform/models/WebhookValidator.d.ts +9 -0
  244. package/sdk/platform/models/WebhookValidator.js +42 -0
  245. package/sdk/public/PublicAPIClient.d.ts +11 -0
  246. package/sdk/public/PublicAPIClient.js +38 -0
  247. package/sdk/public/PublicClient.d.ts +12 -0
  248. package/sdk/public/PublicClient.js +24 -0
  249. package/sdk/public/PublicConfig.d.ts +10 -0
  250. package/sdk/public/PublicConfig.js +12 -0
  251. package/sdk/public/PublicModels.d.ts +50 -0
  252. package/sdk/public/PublicModels.js +712 -0
  253. package/sdk/public/client/ConfigurationPublicClient.d.ts +38 -0
  254. package/sdk/public/client/ConfigurationPublicClient.js +102 -0
  255. package/sdk/public/client/InventoryPublicClient.d.ts +81 -0
  256. package/sdk/public/client/InventoryPublicClient.js +239 -0
  257. package/sdk/public/client/WebhookPublicClient.d.ts +28 -0
  258. package/sdk/public/client/WebhookPublicClient.js +92 -0
  259. package/sdk/public/constructUrl.d.ts +5 -0
  260. package/sdk/public/constructUrl.js +13 -0
  261. package/sdk/public/index.d.ts +2 -0
  262. package/sdk/public/index.js +4 -0
  263. package/sdk/public/models/ConfigurationValidator.d.ts +5 -0
  264. package/sdk/public/models/ConfigurationValidator.js +18 -0
  265. package/sdk/public/models/InventoryValidator.d.ts +9 -0
  266. package/sdk/public/models/InventoryValidator.js +43 -0
  267. package/sdk/public/models/WebhookValidator.d.ts +5 -0
  268. package/sdk/public/models/WebhookValidator.js +14 -0
  269. package/tests/application/catalog.spec.js +47 -0
  270. package/tests/common/action-url.spec.js +35 -0
  271. package/tests/common/schema/action-url.json +163 -0
  272. package/tests/common/schema/url-action.json +667 -0
  273. package/tests/common/url-action.spec.js +48 -0
  274. package/tests/helpers/cookie.helper.js +31 -0
  275. package/tests/helpers/oauth.helper.js +43 -0
  276. package/tests/platform/catalog.spec.js +49 -0
  277. package/tests/public/location.spec.js +39 -0
@@ -0,0 +1,994 @@
1
+
2
+
3
+
4
+
5
+ ##### [Back to Platform docs](./README.md)
6
+
7
+ ## FileStorage Methods
8
+ File Storage
9
+ * [startUpload](#startupload)
10
+ * [completeUpload](#completeupload)
11
+ * [appStartUpload](#appstartupload)
12
+ * [appCompleteUpload](#appcompleteupload)
13
+ * [getSignUrls](#getsignurls)
14
+ * [copyFiles](#copyfiles)
15
+ * [appCopyFiles](#appcopyfiles)
16
+ * [browse](#browse)
17
+ * [browse](#browse)
18
+ * [proxy](#proxy)
19
+
20
+
21
+
22
+ ## Methods with example and description
23
+
24
+
25
+ ### startUpload
26
+ 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.
27
+
28
+
29
+
30
+ ```javascript
31
+ // Promise
32
+ const promise = client.fileStorage.startUpload({ namespace : value,
33
+ body : value });
34
+
35
+ // Async/Await
36
+ const data = await client.fileStorage.startUpload({ namespace : value,
37
+ body : value });
38
+ ```
39
+
40
+
41
+
42
+
43
+
44
+ | Argument | Type | Required | Description |
45
+ | --------- | ----- | -------- | ----------- |
46
+ | namespace | string | yes | bucket name |
47
+ | body | [StartRequest](#StartRequest) | yes | Request body |
48
+
49
+
50
+ Uploads an arbitrarily sized buffer or blob.
51
+
52
+ It has three Major Steps:
53
+ * Start
54
+ * Upload
55
+ * Complete
56
+
57
+ ### Start
58
+ Initiates the assets upload using `startUpload`.
59
+ It returns the storage link in response.
60
+
61
+ ### Upload
62
+ Use the storage link to upload a file (Buffer or Blob) to the File Storage.
63
+ Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body.
64
+
65
+ ### Complete
66
+ After successfully upload, call `completeUpload` api to complete the upload process.
67
+ This operation will return the url for the uploaded file.
68
+
69
+
70
+ *Returned Response:*
71
+
72
+
73
+
74
+
75
+ [StartResponse](#StartResponse)
76
+
77
+ Success
78
+
79
+
80
+
81
+
82
+ <details>
83
+ <summary><i>&nbsp; Example:</i></summary>
84
+
85
+ ```json
86
+
87
+ ```
88
+ </details>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ ---
99
+
100
+
101
+ ### completeUpload
102
+ This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
103
+
104
+
105
+
106
+ ```javascript
107
+ // Promise
108
+ const promise = client.fileStorage.completeUpload({ namespace : value,
109
+ body : value });
110
+
111
+ // Async/Await
112
+ const data = await client.fileStorage.completeUpload({ namespace : value,
113
+ body : value });
114
+ ```
115
+
116
+
117
+
118
+
119
+
120
+ | Argument | Type | Required | Description |
121
+ | --------- | ----- | -------- | ----------- |
122
+ | namespace | string | yes | bucket name |
123
+ | body | [StartResponse](#StartResponse) | yes | Request body |
124
+
125
+
126
+ Uploads an arbitrarily sized buffer or blob.
127
+
128
+ It has three Major Steps:
129
+ * Start
130
+ * Upload
131
+ * Complete
132
+
133
+ ### Start
134
+ Initiates the assets upload using `startUpload`.
135
+ It returns the storage link in response.
136
+
137
+ ### Upload
138
+ Use the storage link to upload a file (Buffer or Blob) to the File Storage.
139
+ Make a `PUT` request on storage link received from `startUpload` api with file (Buffer or Blob) as a request body.
140
+
141
+ ### Complete
142
+ After successfully upload, call `completeUpload` api to complete the upload process.
143
+ This operation will return the url for the uploaded file.
144
+
145
+
146
+ *Returned Response:*
147
+
148
+
149
+
150
+
151
+ [CompleteResponse](#CompleteResponse)
152
+
153
+ Success
154
+
155
+
156
+
157
+
158
+ <details>
159
+ <summary><i>&nbsp; Example:</i></summary>
160
+
161
+ ```json
162
+
163
+ ```
164
+ </details>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ ---
175
+
176
+
177
+ ### appStartUpload
178
+ 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.
179
+
180
+
181
+
182
+ ```javascript
183
+ // Promise
184
+ const promise = client.application("<APPLICATION_ID>").fileStorage.appStartUpload({ namespace : value,
185
+ body : value });
186
+
187
+ // Async/Await
188
+ const data = await client.application("<APPLICATION_ID>").fileStorage.appStartUpload({ namespace : value,
189
+ body : value });
190
+ ```
191
+
192
+
193
+
194
+
195
+
196
+ | Argument | Type | Required | Description |
197
+ | --------- | ----- | -------- | ----------- |
198
+ | namespace | string | yes | bucket name |
199
+ | body | [StartRequest](#StartRequest) | yes | Request body |
200
+
201
+
202
+ Uploads an arbitrarily sized buffer or blob.
203
+
204
+ It has three Major Steps:
205
+ * Start
206
+ * Upload
207
+ * Complete
208
+
209
+ ### Start
210
+ Initiates the assets upload using `appStartUpload`.
211
+ It returns the storage link in response.
212
+
213
+ ### Upload
214
+ Use the storage link to upload a file (Buffer or Blob) to the File Storage.
215
+ Make a `PUT` request on storage link received from `appStartUpload` api with file (Buffer or Blob) as a request body.
216
+
217
+ ### Complete
218
+ After successfully upload, call `appCompleteUpload` api to complete the upload process.
219
+ This operation will return the url for the uploaded file.
220
+
221
+
222
+ *Returned Response:*
223
+
224
+
225
+
226
+
227
+ [StartResponse](#StartResponse)
228
+
229
+ Success
230
+
231
+
232
+
233
+
234
+ <details>
235
+ <summary><i>&nbsp; Example:</i></summary>
236
+
237
+ ```json
238
+
239
+ ```
240
+ </details>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ ---
251
+
252
+
253
+ ### appCompleteUpload
254
+ This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process.
255
+
256
+
257
+
258
+ ```javascript
259
+ // Promise
260
+ const promise = client.application("<APPLICATION_ID>").fileStorage.appCompleteUpload({ namespace : value,
261
+ body : value });
262
+
263
+ // Async/Await
264
+ const data = await client.application("<APPLICATION_ID>").fileStorage.appCompleteUpload({ namespace : value,
265
+ body : value });
266
+ ```
267
+
268
+
269
+
270
+
271
+
272
+ | Argument | Type | Required | Description |
273
+ | --------- | ----- | -------- | ----------- |
274
+ | namespace | string | yes | bucket name |
275
+ | body | [StartResponse](#StartResponse) | yes | Request body |
276
+
277
+
278
+ Uploads an arbitrarily sized buffer or blob.
279
+
280
+ It has three Major Steps:
281
+ * Start
282
+ * Upload
283
+ * Complete
284
+
285
+ ### Start
286
+ Initiates the assets upload using `appStartUpload`.
287
+ It returns the storage link in response.
288
+
289
+ ### Upload
290
+ Use the storage link to upload a file (Buffer or Blob) to the File Storage.
291
+ Make a `PUT` request on storage link received from `appStartUpload` api with file (Buffer or Blob) as a request body.
292
+
293
+ ### Complete
294
+ After successfully upload, call `appCompleteUpload` api to complete the upload process.
295
+ This operation will return the url for the uploaded file.
296
+
297
+
298
+ *Returned Response:*
299
+
300
+
301
+
302
+
303
+ [CompleteResponse](#CompleteResponse)
304
+
305
+ Success
306
+
307
+
308
+
309
+
310
+ <details>
311
+ <summary><i>&nbsp; Example:</i></summary>
312
+
313
+ ```json
314
+
315
+ ```
316
+ </details>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ ---
327
+
328
+
329
+ ### getSignUrls
330
+ Gives signed urls to access private files
331
+
332
+
333
+
334
+ ```javascript
335
+ // Promise
336
+ const promise = client.fileStorage.getSignUrls({ body : value });
337
+
338
+ // Async/Await
339
+ const data = await client.fileStorage.getSignUrls({ body : value });
340
+ ```
341
+
342
+
343
+
344
+
345
+
346
+ | Argument | Type | Required | Description |
347
+ | --------- | ----- | -------- | ----------- |
348
+ | body | [SignUrlRequest](#SignUrlRequest) | yes | Request body |
349
+
350
+
351
+ Describe here
352
+
353
+ *Returned Response:*
354
+
355
+
356
+
357
+
358
+ [SignUrlResponse](#SignUrlResponse)
359
+
360
+ Success
361
+
362
+
363
+
364
+
365
+ <details>
366
+ <summary><i>&nbsp; Example:</i></summary>
367
+
368
+ ```json
369
+
370
+ ```
371
+ </details>
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+ ---
382
+
383
+
384
+ ### copyFiles
385
+ Copy Files
386
+
387
+
388
+
389
+ ```javascript
390
+ // Promise
391
+ const promise = client.fileStorage.copyFiles({ body : value,
392
+ sync : value });
393
+
394
+ // Async/Await
395
+ const data = await client.fileStorage.copyFiles({ body : value,
396
+ sync : value });
397
+ ```
398
+
399
+
400
+
401
+
402
+
403
+ | Argument | Type | Required | Description |
404
+ | --------- | ----- | -------- | ----------- |
405
+ | sync | boolean | no | sync |
406
+ | body | [BulkRequest](#BulkRequest) | yes | Request body |
407
+
408
+
409
+ Copy Files
410
+
411
+ *Returned Response:*
412
+
413
+
414
+
415
+
416
+ [BulkUploadResponse](#BulkUploadResponse)
417
+
418
+ Success
419
+
420
+
421
+
422
+
423
+ <details>
424
+ <summary><i>&nbsp; Example:</i></summary>
425
+
426
+ ```json
427
+ {
428
+ "tracking_url": "https://xxx.xxx.xxx/2",
429
+ "task": {
430
+ "id": "2",
431
+ "name": "__default__",
432
+ "data": {
433
+ "urls": [
434
+ "https://xxx.xxx.xxx/files.csv"
435
+ ],
436
+ "destination": {
437
+ "namespace": "/domaine/path",
438
+ "rewrite": "{{namespace}}/bar/{{dest.path}}"
439
+ }
440
+ },
441
+ "opts": {
442
+ "attempts": 1,
443
+ "delay": 0,
444
+ "timestamp": 1613534206645
445
+ },
446
+ "progress": 0,
447
+ "delay": 0,
448
+ "timestamp": 1613534206645,
449
+ "attempts_made": 0,
450
+ "stacktrace": [],
451
+ "finished_on": 1613534206645,
452
+ "processed_on": 1613534206645
453
+ }
454
+ }
455
+ ```
456
+ </details>
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+ ---
467
+
468
+
469
+ ### appCopyFiles
470
+ Copy Files
471
+
472
+
473
+
474
+ ```javascript
475
+ // Promise
476
+ const promise = client.application("<APPLICATION_ID>").fileStorage.appCopyFiles({ body : value,
477
+ sync : value });
478
+
479
+ // Async/Await
480
+ const data = await client.application("<APPLICATION_ID>").fileStorage.appCopyFiles({ body : value,
481
+ sync : value });
482
+ ```
483
+
484
+
485
+
486
+
487
+
488
+ | Argument | Type | Required | Description |
489
+ | --------- | ----- | -------- | ----------- |
490
+ | sync | boolean | no | sync |
491
+ | body | [BulkRequest](#BulkRequest) | yes | Request body |
492
+
493
+
494
+ Copy Files
495
+
496
+ *Returned Response:*
497
+
498
+
499
+
500
+
501
+ [BulkUploadResponse](#BulkUploadResponse)
502
+
503
+ Success
504
+
505
+
506
+
507
+
508
+ <details>
509
+ <summary><i>&nbsp; Example:</i></summary>
510
+
511
+ ```json
512
+ {
513
+ "tracking_url": "https://xxx.xxx.xxx/2",
514
+ "task": {
515
+ "id": "2",
516
+ "name": "__default__",
517
+ "data": {
518
+ "urls": [
519
+ "https://xxx.xxx.xxx/files.csv"
520
+ ],
521
+ "destination": {
522
+ "namespace": "/domaine/path",
523
+ "rewrite": "{{namespace}}/bar/{{dest.path}}"
524
+ }
525
+ },
526
+ "opts": {
527
+ "attempts": 1,
528
+ "delay": 0,
529
+ "timestamp": 1613534206645
530
+ },
531
+ "progress": 0,
532
+ "delay": 0,
533
+ "timestamp": 1613534206645,
534
+ "attempts_made": 0,
535
+ "stacktrace": [],
536
+ "finished_on": 1613534206645,
537
+ "processed_on": 1613534206645
538
+ }
539
+ }
540
+ ```
541
+ </details>
542
+
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+ ---
552
+
553
+
554
+ ### browse
555
+ Browse Files
556
+
557
+
558
+
559
+ ```javascript
560
+ // Promise
561
+ const promise = client.fileStorage.browse({ namespace : value,
562
+ pageNo : value });
563
+
564
+ // Async/Await
565
+ const data = await client.fileStorage.browse({ namespace : value,
566
+ pageNo : value });
567
+ ```
568
+
569
+
570
+
571
+
572
+
573
+ | Argument | Type | Required | Description |
574
+ | --------- | ----- | -------- | ----------- |
575
+ | namespace | string | yes | bucket name |
576
+ | pageNo | number | no | page no |
577
+
578
+
579
+
580
+ Browse Files
581
+
582
+ *Returned Response:*
583
+
584
+
585
+
586
+
587
+ [BrowseResponse](#BrowseResponse)
588
+
589
+ Success
590
+
591
+
592
+
593
+
594
+ <details>
595
+ <summary><i>&nbsp; Example:</i></summary>
596
+
597
+ ```json
598
+
599
+ ```
600
+ </details>
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+ ---
611
+
612
+
613
+ ### browse
614
+ Browse Files
615
+
616
+
617
+
618
+ ```javascript
619
+ // Promise
620
+ const promise = client.application("<APPLICATION_ID>").fileStorage.browse({ namespace : value,
621
+ pageNo : value });
622
+
623
+ // Async/Await
624
+ const data = await client.application("<APPLICATION_ID>").fileStorage.browse({ namespace : value,
625
+ pageNo : value });
626
+ ```
627
+
628
+
629
+
630
+
631
+
632
+ | Argument | Type | Required | Description |
633
+ | --------- | ----- | -------- | ----------- |
634
+ | namespace | string | yes | bucket name |
635
+ | pageNo | number | no | page no |
636
+
637
+
638
+
639
+ Browse Files
640
+
641
+ *Returned Response:*
642
+
643
+
644
+
645
+
646
+ [BrowseResponse](#BrowseResponse)
647
+
648
+ Success
649
+
650
+
651
+
652
+
653
+ <details>
654
+ <summary><i>&nbsp; Example:</i></summary>
655
+
656
+ ```json
657
+
658
+ ```
659
+ </details>
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+ ---
670
+
671
+
672
+ ### proxy
673
+ Proxy
674
+
675
+
676
+
677
+ ```javascript
678
+ // Promise
679
+ const promise = client.fileStorage.proxy({ url : value });
680
+
681
+ // Async/Await
682
+ const data = await client.fileStorage.proxy({ url : value });
683
+ ```
684
+
685
+
686
+
687
+
688
+
689
+ | Argument | Type | Required | Description |
690
+ | --------- | ----- | -------- | ----------- |
691
+ | url | string | yes | url |
692
+
693
+
694
+
695
+ Proxy
696
+
697
+ *Returned Response:*
698
+
699
+
700
+
701
+
702
+ [string](#string)
703
+
704
+ Success
705
+
706
+
707
+
708
+
709
+ <details>
710
+ <summary><i>&nbsp; Example:</i></summary>
711
+
712
+ ```json
713
+
714
+ ```
715
+ </details>
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+ ---
726
+
727
+
728
+
729
+ ### Schemas
730
+
731
+
732
+
733
+ #### [FailedResponse](#FailedResponse)
734
+
735
+ | Properties | Type | Nullable | Description |
736
+ | ---------- | ---- | -------- | ----------- |
737
+ | message | string | yes | |
738
+
739
+ ---
740
+
741
+
742
+
743
+
744
+ #### [CDN](#CDN)
745
+
746
+ | Properties | Type | Nullable | Description |
747
+ | ---------- | ---- | -------- | ----------- |
748
+ | url | string | yes | |
749
+
750
+ ---
751
+
752
+
753
+
754
+
755
+ #### [Upload](#Upload)
756
+
757
+ | Properties | Type | Nullable | Description |
758
+ | ---------- | ---- | -------- | ----------- |
759
+ | expiry | number | yes | |
760
+ | url | string | yes | |
761
+
762
+ ---
763
+
764
+
765
+
766
+
767
+ #### [StartResponse](#StartResponse)
768
+
769
+ | Properties | Type | Nullable | Description |
770
+ | ---------- | ---- | -------- | ----------- |
771
+ | file_name | string | yes | |
772
+ | file_path | string | yes | |
773
+ | content_type | string | yes | |
774
+ | method | string | no | |
775
+ | namespace | string | yes | |
776
+ | operation | string | yes | |
777
+ | size | number | yes | |
778
+ | upload | [Upload](#Upload) | yes | |
779
+ | cdn | [CDN](#CDN) | yes | |
780
+ | tags | [string] | no | |
781
+
782
+ ---
783
+
784
+
785
+
786
+
787
+ #### [StartRequest](#StartRequest)
788
+
789
+ | Properties | Type | Nullable | Description |
790
+ | ---------- | ---- | -------- | ----------- |
791
+ | file_name | string | yes | |
792
+ | content_type | string | yes | |
793
+ | size | number | yes | |
794
+ | tags | [string] | no | |
795
+ | params | string | no | |
796
+
797
+ ---
798
+
799
+
800
+
801
+
802
+ #### [CompleteResponse](#CompleteResponse)
803
+
804
+ | Properties | Type | Nullable | Description |
805
+ | ---------- | ---- | -------- | ----------- |
806
+ | _id | string | yes | |
807
+ | file_name | string | yes | |
808
+ | file_path | string | yes | |
809
+ | content_type | string | yes | |
810
+ | namespace | string | yes | |
811
+ | operation | string | yes | |
812
+ | size | number | yes | |
813
+ | upload | [Upload](#Upload) | yes | |
814
+ | cdn | [CDN](#CDN) | yes | |
815
+ | success | boolean | yes | |
816
+ | tags | [string] | no | |
817
+ | created_on | string | yes | |
818
+ | modified_on | string | yes | |
819
+
820
+ ---
821
+
822
+
823
+
824
+
825
+ #### [Opts](#Opts)
826
+
827
+ | Properties | Type | Nullable | Description |
828
+ | ---------- | ---- | -------- | ----------- |
829
+ | attempts | number | no | |
830
+ | timestamp | number | no | |
831
+ | delay | number | no | |
832
+
833
+ ---
834
+
835
+
836
+
837
+
838
+ #### [CopyFileTask](#CopyFileTask)
839
+
840
+ | Properties | Type | Nullable | Description |
841
+ | ---------- | ---- | -------- | ----------- |
842
+ | id | string | yes | |
843
+ | name | string | yes | |
844
+ | data | [BulkRequest](#BulkRequest) | yes | |
845
+ | opts | [Opts](#Opts) | yes | |
846
+ | progress | number | yes | |
847
+ | delay | number | yes | |
848
+ | timestamp | number | yes | |
849
+ | attempts_made | number | yes | |
850
+ | stacktrace | [string] | no | |
851
+ | finished_on | number | yes | |
852
+ | processed_on | number | yes | |
853
+
854
+ ---
855
+
856
+
857
+
858
+
859
+ #### [BulkUploadResponse](#BulkUploadResponse)
860
+
861
+ | Properties | Type | Nullable | Description |
862
+ | ---------- | ---- | -------- | ----------- |
863
+ | tracking_url | string | yes | |
864
+ | task | [CopyFileTask](#CopyFileTask) | yes | |
865
+
866
+ ---
867
+
868
+
869
+
870
+
871
+ #### [ReqConfiguration](#ReqConfiguration)
872
+
873
+ | Properties | Type | Nullable | Description |
874
+ | ---------- | ---- | -------- | ----------- |
875
+ | concurrency | number | no | |
876
+
877
+ ---
878
+
879
+
880
+
881
+
882
+ #### [Destination](#Destination)
883
+
884
+ | Properties | Type | Nullable | Description |
885
+ | ---------- | ---- | -------- | ----------- |
886
+ | namespace | string | yes | |
887
+ | rewrite | string | yes | |
888
+ | basepath | string | no | |
889
+
890
+ ---
891
+
892
+
893
+
894
+
895
+ #### [BulkRequest](#BulkRequest)
896
+
897
+ | Properties | Type | Nullable | Description |
898
+ | ---------- | ---- | -------- | ----------- |
899
+ | urls | [string] | yes | |
900
+ | destination | [Destination](#Destination) | yes | |
901
+ | configuration | [ReqConfiguration](#ReqConfiguration) | no | |
902
+
903
+ ---
904
+
905
+
906
+
907
+
908
+ #### [Urls](#Urls)
909
+
910
+ | Properties | Type | Nullable | Description |
911
+ | ---------- | ---- | -------- | ----------- |
912
+ | url | string | yes | |
913
+ | signed_url | string | yes | |
914
+ | expiry | number | yes | |
915
+
916
+ ---
917
+
918
+
919
+
920
+
921
+ #### [SignUrlResponse](#SignUrlResponse)
922
+
923
+ | Properties | Type | Nullable | Description |
924
+ | ---------- | ---- | -------- | ----------- |
925
+ | urls | [[Urls](#Urls)] | yes | |
926
+
927
+ ---
928
+
929
+
930
+
931
+
932
+ #### [SignUrlRequest](#SignUrlRequest)
933
+
934
+ | Properties | Type | Nullable | Description |
935
+ | ---------- | ---- | -------- | ----------- |
936
+ | expiry | number | yes | |
937
+ | urls | [string] | yes | |
938
+
939
+ ---
940
+
941
+
942
+
943
+
944
+ #### [Page](#Page)
945
+
946
+ | Properties | Type | Nullable | Description |
947
+ | ---------- | ---- | -------- | ----------- |
948
+ | item_total | number | no | |
949
+ | next_id | string | no | |
950
+ | has_previous | boolean | no | |
951
+ | has_next | boolean | no | |
952
+ | current | number | no | |
953
+ | type | number | yes | |
954
+ | size | number | no | |
955
+
956
+ ---
957
+
958
+
959
+
960
+
961
+ #### [DbRecord](#DbRecord)
962
+
963
+ | Properties | Type | Nullable | Description |
964
+ | ---------- | ---- | -------- | ----------- |
965
+ | success | boolean | yes | |
966
+ | tags | [string] | yes | |
967
+ | _id | string | yes | |
968
+ | file_name | string | yes | |
969
+ | operation | string | no | |
970
+ | namespace | string | yes | |
971
+ | content_type | string | yes | |
972
+ | file_path | string | yes | |
973
+ | upload | [Upload](#Upload) | yes | |
974
+ | cdn | [CDN](#CDN) | yes | |
975
+ | created_on | string | yes | |
976
+ | modified_on | string | yes | |
977
+
978
+ ---
979
+
980
+
981
+
982
+
983
+ #### [BrowseResponse](#BrowseResponse)
984
+
985
+ | Properties | Type | Nullable | Description |
986
+ | ---------- | ---- | -------- | ----------- |
987
+ | items | [[DbRecord](#DbRecord)] | yes | |
988
+ | page | [Page](#Page) | yes | |
989
+
990
+ ---
991
+
992
+
993
+
994
+