@gofynd/fdk-client-javascript 1.0.3 → 1.1.0

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 (185) hide show
  1. package/README.md +51 -2
  2. package/index.d.ts +7 -4
  3. package/index.js +22 -7
  4. package/package.json +23 -14
  5. package/partner.d.ts +4 -0
  6. package/partner.js +7 -0
  7. package/sdk/application/ApplicationAPIClient.js +2 -4
  8. package/sdk/application/Cart/CartApplicationClient.js +29 -28
  9. package/sdk/application/Cart/CartApplicationModel.js +3 -1
  10. package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
  11. package/sdk/application/Catalog/CatalogApplicationModel.js +5 -3
  12. package/sdk/application/Common/CommonApplicationClient.js +5 -4
  13. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
  15. package/sdk/application/Content/ContentApplicationClient.js +26 -25
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
  17. package/sdk/application/Lead/LeadApplicationClient.js +10 -9
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
  20. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
  21. package/sdk/application/Order/OrderApplicationClient.js +15 -14
  22. package/sdk/application/Order/OrderApplicationModel.js +9 -0
  23. package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
  24. package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
  25. package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
  27. package/sdk/application/Share/ShareApplicationClient.js +10 -9
  28. package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
  29. package/sdk/application/User/UserApplicationClient.js +38 -37
  30. package/sdk/common/AxiosHelper.js +17 -6
  31. package/sdk/common/BaseOAuthClient.d.ts +17 -0
  32. package/sdk/common/BaseOAuthClient.js +67 -0
  33. package/sdk/common/RequestSigner.js +0 -5
  34. package/sdk/partner/OAuthClient.d.ts +14 -0
  35. package/sdk/partner/OAuthClient.js +112 -0
  36. package/sdk/partner/PartnerAPIClient.d.ts +12 -0
  37. package/sdk/partner/PartnerAPIClient.js +42 -0
  38. package/sdk/partner/PartnerClient.d.ts +6 -0
  39. package/sdk/partner/PartnerClient.js +17 -0
  40. package/sdk/partner/PartnerConfig.d.ts +30 -0
  41. package/sdk/partner/PartnerConfig.js +39 -0
  42. package/sdk/partner/index.d.ts +3 -0
  43. package/sdk/partner/index.js +5 -0
  44. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
  45. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  46. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  47. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  48. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
  50. package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -0
  51. package/sdk/platform/Billing/BillingPlatformClient.js +137 -2
  52. package/sdk/platform/Billing/BillingPlatformModel.d.ts +4 -0
  53. package/sdk/platform/Billing/BillingPlatformModel.js +44 -0
  54. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +2 -0
  55. package/sdk/platform/Billing/BillingPlatformValidator.js +15 -0
  56. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
  57. package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
  58. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  59. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
  60. package/sdk/platform/Cart/CartPlatformModel.js +7 -3
  61. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
  62. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
  63. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  64. package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
  65. package/sdk/platform/Catalog/CatalogPlatformModel.js +9 -9
  66. package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
  67. package/sdk/platform/Common/CommonPlatformClient.js +7 -18
  68. package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
  69. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
  70. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
  71. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  72. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  73. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
  74. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
  75. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
  76. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
  77. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
  78. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
  79. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -1
  80. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -1
  81. package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
  82. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
  83. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
  84. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
  85. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  86. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
  87. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
  88. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
  89. package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
  90. package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
  91. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
  92. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
  93. package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
  94. package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
  95. package/sdk/platform/OAuthClient.js +3 -9
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
  98. package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
  99. package/sdk/platform/Order/OrderPlatformClient.js +16 -3
  100. package/sdk/platform/Order/OrderPlatformModel.js +1 -0
  101. package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
  102. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  103. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  104. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
  105. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
  106. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
  107. package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
  108. package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
  109. package/sdk/platform/PlatformApplicationClient.d.ts +5 -1
  110. package/sdk/platform/PlatformApplicationClient.js +4 -0
  111. package/sdk/platform/PlatformClient.d.ts +51 -12
  112. package/sdk/platform/PlatformClient.js +54 -11
  113. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +17 -19
  114. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +88 -83
  115. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
  116. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +8 -9
  117. package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
  118. package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
  119. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
  120. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
  121. package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
  122. package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
  123. package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
  124. package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
  125. package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
  126. package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
  127. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  128. package/.github/workflows/on_create_release.yml +0 -23
  129. package/.github/workflows/on_merge_main.yml +0 -38
  130. package/.github/workflows/on_pull_request.yml +0 -35
  131. package/.prettierrc +0 -5
  132. package/documentation/application/CART.md +0 -8771
  133. package/documentation/application/CATALOG.md +0 -8690
  134. package/documentation/application/COMMON.md +0 -325
  135. package/documentation/application/COMMUNICATION.md +0 -387
  136. package/documentation/application/CONFIGURATION.md +0 -2212
  137. package/documentation/application/CONTENT.md +0 -2629
  138. package/documentation/application/FILESTORAGE.md +0 -442
  139. package/documentation/application/LEAD.md +0 -1549
  140. package/documentation/application/LOGISTIC.md +0 -689
  141. package/documentation/application/ORDER.md +0 -2937
  142. package/documentation/application/PAYMENT.md +0 -4475
  143. package/documentation/application/POSCART.md +0 -9375
  144. package/documentation/application/README.md +0 -21
  145. package/documentation/application/REWARDS.md +0 -554
  146. package/documentation/application/SHARE.md +0 -635
  147. package/documentation/application/THEME.md +0 -5517
  148. package/documentation/application/USER.md +0 -3798
  149. package/documentation/platform/ANALYTICS.md +0 -1012
  150. package/documentation/platform/AUDITTRAIL.md +0 -493
  151. package/documentation/platform/BILLING.md +0 -1889
  152. package/documentation/platform/CART.md +0 -4711
  153. package/documentation/platform/CATALOG.md +0 -20522
  154. package/documentation/platform/COMMON.md +0 -325
  155. package/documentation/platform/COMMUNICATION.md +0 -4970
  156. package/documentation/platform/COMPANYPROFILE.md +0 -1646
  157. package/documentation/platform/CONFIGURATION.md +0 -6316
  158. package/documentation/platform/CONTENT.md +0 -8364
  159. package/documentation/platform/DISCOUNT.md +0 -767
  160. package/documentation/platform/FILESTORAGE.md +0 -945
  161. package/documentation/platform/INVENTORY.md +0 -1136
  162. package/documentation/platform/LEAD.md +0 -4394
  163. package/documentation/platform/ORDER.md +0 -6525
  164. package/documentation/platform/PARTNER.md +0 -193
  165. package/documentation/platform/PAYMENT.md +0 -3138
  166. package/documentation/platform/README.md +0 -27
  167. package/documentation/platform/REWARDS.md +0 -919
  168. package/documentation/platform/SHARE.md +0 -513
  169. package/documentation/platform/THEME.md +0 -35446
  170. package/documentation/platform/USER.md +0 -2174
  171. package/documentation/platform/WEBHOOK.md +0 -485
  172. package/documentation/public/CONFIGURATION.md +0 -325
  173. package/documentation/public/INVENTORY.md +0 -508
  174. package/documentation/public/WEBHOOK.md +0 -246
  175. package/jest.config.d.ts +0 -4
  176. package/jest.config.js +0 -6
  177. package/tests/application/catalog.spec.js +0 -54
  178. package/tests/common/action-url.spec.js +0 -35
  179. package/tests/common/schema/action-url.json +0 -178
  180. package/tests/common/schema/url-action.json +0 -683
  181. package/tests/common/url-action.spec.js +0 -48
  182. package/tests/helpers/cookie.helper.js +0 -31
  183. package/tests/helpers/oauth.helper.js +0 -43
  184. package/tests/platform/catalog.spec.js +0 -49
  185. package/tests/public/location.spec.js +0 -39
@@ -1,635 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
- ##### [Back to Application docs](./README.md)
7
-
8
- ## Share Methods
9
- Short link and QR Code
10
-
11
- * [createShortLink](#createshortlink)
12
- * [getApplicationQRCode](#getapplicationqrcode)
13
- * [getCollectionQRCodeBySlug](#getcollectionqrcodebyslug)
14
- * [getOriginalShortLinkByHash](#getoriginalshortlinkbyhash)
15
- * [getProductQRCodeBySlug](#getproductqrcodebyslug)
16
- * [getShortLinkByHash](#getshortlinkbyhash)
17
- * [getUrlQRCode](#geturlqrcode)
18
-
19
-
20
-
21
- ## Methods with example and description
22
-
23
-
24
-
25
-
26
- ### createShortLink
27
- Create a short link
28
-
29
-
30
-
31
- ```javascript
32
- // Promise
33
- const promise = share.createShortLink({ body : value });
34
-
35
- // Async/Await
36
- const data = await share.createShortLink({ body : value });
37
- ```
38
-
39
-
40
-
41
-
42
-
43
- | Argument | Type | Required | Description |
44
- | --------- | ----- | -------- | ----------- |
45
- | body | [ShortLinkReq](#ShortLinkReq) | yes | Request body |
46
-
47
-
48
- Use this API to create a short link that is easy to write/share/read as compared to long URLs.
49
-
50
- *Returned Response:*
51
-
52
-
53
-
54
-
55
- [ShortLinkRes](#ShortLinkRes)
56
-
57
- Success. Check the example shown below or refer `ShortLinkRes` for more details.
58
-
59
-
60
-
61
-
62
- <details>
63
- <summary><i>&nbsp; Example:</i></summary>
64
-
65
- ```json
66
- {
67
- "url": {
68
- "original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
69
- "short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
70
- "hash": "3qKlnsq-x"
71
- },
72
- "redirects": {
73
- "ios": {
74
- "type": "web",
75
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
76
- },
77
- "android": {
78
- "type": "web",
79
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
80
- },
81
- "web": {
82
- "type": "web",
83
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
84
- },
85
- "force_web": false
86
- },
87
- "created_by": "team",
88
- "personalized": false,
89
- "app_redirect": false,
90
- "fallback": "web",
91
- "enable_tracking": false,
92
- "active": true,
93
- "count": 0,
94
- "_id": "601a54054c0349592e76c8f3",
95
- "title": "new ",
96
- "meta": {
97
- "type": "brand"
98
- },
99
- "expire_at": null,
100
- "application": "5eda528b97457fe43a733ace",
101
- "user_id": "5e4d01e2c39837ab66144f6d",
102
- "created_at": "2021-02-03T07:43:01.342Z",
103
- "updated_at": "2021-02-03T07:43:01.342Z"
104
- }
105
- ```
106
- </details>
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- ---
117
-
118
-
119
- ### getApplicationQRCode
120
- Create QR Code of an app
121
-
122
-
123
-
124
- ```javascript
125
- // Promise
126
- const promise = share.getApplicationQRCode();
127
-
128
- // Async/Await
129
- const data = await share.getApplicationQRCode();
130
- ```
131
-
132
-
133
-
134
-
135
-
136
-
137
- Use this API to create a QR code of an app for sharing it with users who want to use the app.
138
-
139
- *Returned Response:*
140
-
141
-
142
-
143
-
144
- [QRCodeResp](#QRCodeResp)
145
-
146
- Success. Check the example shown below or refer `QRCodeResp` for more details.
147
-
148
-
149
-
150
-
151
- <details>
152
- <summary><i>&nbsp; Example:</i></summary>
153
-
154
- ```json
155
- {
156
- "link": "https://fynd.com",
157
- "svg": "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 29 29\\\" shape-rendering=\\\"crispEdges\\\"></svg>"
158
- }
159
- ```
160
- </details>
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
- ---
171
-
172
-
173
- ### getCollectionQRCodeBySlug
174
- Create QR Code of a collection
175
-
176
-
177
-
178
- ```javascript
179
- // Promise
180
- const promise = share.getCollectionQRCodeBySlug({ slug : value });
181
-
182
- // Async/Await
183
- const data = await share.getCollectionQRCodeBySlug({ slug : value });
184
- ```
185
-
186
-
187
-
188
-
189
-
190
- | Argument | Type | Required | Description |
191
- | --------- | ----- | -------- | ----------- |
192
- | slug | string | yes | A short, human-readable, URL-friendly identifier of a collection. You can get slug value from the endpoint. |
193
-
194
-
195
-
196
- Use this API to create a QR code of a collection of products for sharing it with users who want to view/purchase the collection.
197
-
198
- *Returned Response:*
199
-
200
-
201
-
202
-
203
- [QRCodeResp](#QRCodeResp)
204
-
205
- Success. Check the example shown below or refer `QRCodeResp` for more details.
206
-
207
-
208
-
209
-
210
- <details>
211
- <summary><i>&nbsp; Example:</i></summary>
212
-
213
- ```json
214
- {
215
- "link": "https://fynd.com/collection/flat-50-off",
216
- "svg": "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 29 29\\\" shape-rendering=\\\"crispEdges\\\"></svg>"
217
- }
218
- ```
219
- </details>
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
- ---
230
-
231
-
232
- ### getOriginalShortLinkByHash
233
- Get original link by hash
234
-
235
-
236
-
237
- ```javascript
238
- // Promise
239
- const promise = share.getOriginalShortLinkByHash({ hash : value });
240
-
241
- // Async/Await
242
- const data = await share.getOriginalShortLinkByHash({ hash : value });
243
- ```
244
-
245
-
246
-
247
-
248
-
249
- | Argument | Type | Required | Description |
250
- | --------- | ----- | -------- | ----------- |
251
- | hash | string | yes | A string value used for converting long URL to short URL and vice-versa. |
252
-
253
-
254
-
255
- Use this API to retrieve the original link from a short-link by using a hash value.
256
-
257
- *Returned Response:*
258
-
259
-
260
-
261
-
262
- [ShortLinkRes](#ShortLinkRes)
263
-
264
- Success. Check the example shown below or refer `ShortLinkRes` for more details.
265
-
266
-
267
-
268
-
269
- <details>
270
- <summary><i>&nbsp; Example:</i></summary>
271
-
272
- ```json
273
- {
274
- "url": {
275
- "original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
276
- "short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
277
- "hash": "3qKlnsq-x"
278
- },
279
- "redirects": {
280
- "ios": {
281
- "type": "web",
282
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
283
- },
284
- "android": {
285
- "type": "web",
286
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
287
- },
288
- "web": {
289
- "type": "web",
290
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
291
- },
292
- "force_web": false
293
- },
294
- "created_by": "team",
295
- "personalized": false,
296
- "app_redirect": false,
297
- "fallback": "web",
298
- "enable_tracking": false,
299
- "active": true,
300
- "count": 0,
301
- "_id": "601a54054c0349592e76c8f3",
302
- "title": "new ",
303
- "meta": {
304
- "type": "brand"
305
- },
306
- "expire_at": null,
307
- "application": "5eda528b97457fe43a733ace",
308
- "user_id": "5e4d01e2c39837ab66144f6d",
309
- "created_at": "2021-02-03T07:43:01.342Z",
310
- "updated_at": "2021-02-03T07:43:01.342Z"
311
- }
312
- ```
313
- </details>
314
-
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
- ---
324
-
325
-
326
- ### getProductQRCodeBySlug
327
- Create QR Code of a product
328
-
329
-
330
-
331
- ```javascript
332
- // Promise
333
- const promise = share.getProductQRCodeBySlug({ slug : value });
334
-
335
- // Async/Await
336
- const data = await share.getProductQRCodeBySlug({ slug : value });
337
- ```
338
-
339
-
340
-
341
-
342
-
343
- | Argument | Type | Required | Description |
344
- | --------- | ----- | -------- | ----------- |
345
- | slug | string | yes | A short, human-readable, URL-friendly identifier of a product. You can get slug value from the endpoint. |
346
-
347
-
348
-
349
- Use this API to create a QR code of a product for sharing it with users who want to view/purchase the product.
350
-
351
- *Returned Response:*
352
-
353
-
354
-
355
-
356
- [QRCodeResp](#QRCodeResp)
357
-
358
- Success. Check the example shown below or refer `QRCodeResp` for more details.
359
-
360
-
361
-
362
-
363
- <details>
364
- <summary><i>&nbsp; Example:</i></summary>
365
-
366
- ```json
367
- {
368
- "link": "https://fynd.com/products/shirt-small-blue",
369
- "svg": "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 29 29\\\" shape-rendering=\\\"crispEdges\\\"></svg>"
370
- }
371
- ```
372
- </details>
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
- ---
383
-
384
-
385
- ### getShortLinkByHash
386
- Get short link by hash
387
-
388
-
389
-
390
- ```javascript
391
- // Promise
392
- const promise = share.getShortLinkByHash({ hash : value });
393
-
394
- // Async/Await
395
- const data = await share.getShortLinkByHash({ hash : value });
396
- ```
397
-
398
-
399
-
400
-
401
-
402
- | Argument | Type | Required | Description |
403
- | --------- | ----- | -------- | ----------- |
404
- | hash | string | yes | A string value used for converting long URL to short URL and vice-versa. |
405
-
406
-
407
-
408
- Use this API to get a short link by using a hash value.
409
-
410
- *Returned Response:*
411
-
412
-
413
-
414
-
415
- [ShortLinkRes](#ShortLinkRes)
416
-
417
- Success. Check the example shown below or refer `ShortLinkRes` for more details.
418
-
419
-
420
-
421
-
422
- <details>
423
- <summary><i>&nbsp; Example:</i></summary>
424
-
425
- ```json
426
- {
427
- "url": {
428
- "original": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh",
429
- "short": "https://0icof6vvsf.hostx0.de/l/3qKlnsq-x",
430
- "hash": "3qKlnsq-x"
431
- },
432
- "redirects": {
433
- "ios": {
434
- "type": "web",
435
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
436
- },
437
- "android": {
438
- "type": "web",
439
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
440
- },
441
- "web": {
442
- "type": "web",
443
- "link": "https://0icof6vvsf.hostx0.de/products/?brand=ruosh"
444
- },
445
- "force_web": false
446
- },
447
- "created_by": "team",
448
- "personalized": false,
449
- "app_redirect": false,
450
- "fallback": "web",
451
- "enable_tracking": false,
452
- "active": true,
453
- "count": 0,
454
- "_id": "601a54054c0349592e76c8f3",
455
- "title": "new ",
456
- "meta": {
457
- "type": "brand"
458
- },
459
- "expire_at": null,
460
- "application": "5eda528b97457fe43a733ace",
461
- "user_id": "5e4d01e2c39837ab66144f6d",
462
- "created_at": "2021-02-03T07:43:01.342Z",
463
- "updated_at": "2021-02-03T07:43:01.342Z"
464
- }
465
- ```
466
- </details>
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
- ---
477
-
478
-
479
- ### getUrlQRCode
480
- Create QR Code of a URL
481
-
482
-
483
-
484
- ```javascript
485
- // Promise
486
- const promise = share.getUrlQRCode({ url : value });
487
-
488
- // Async/Await
489
- const data = await share.getUrlQRCode({ url : value });
490
- ```
491
-
492
-
493
-
494
-
495
-
496
- | Argument | Type | Required | Description |
497
- | --------- | ----- | -------- | ----------- |
498
- | url | string | yes | A link or a web address |
499
-
500
-
501
-
502
- Use this API to create a QR code of a URL for sharing it with users who want to visit the link.
503
-
504
- *Returned Response:*
505
-
506
-
507
-
508
-
509
- [QRCodeResp](#QRCodeResp)
510
-
511
- Success. Check the example shown below or refer `QRCodeResp` for more details.
512
-
513
-
514
-
515
-
516
- <details>
517
- <summary><i>&nbsp; Example:</i></summary>
518
-
519
- ```json
520
- {
521
- "link": "https://fynd.com",
522
- "svg": "<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 29 29\\\" shape-rendering=\\\"crispEdges\\\"></svg>"
523
- }
524
- ```
525
- </details>
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
-
534
-
535
- ---
536
-
537
-
538
-
539
- ### Schemas
540
-
541
-
542
- #### [Attribution](#Attribution)
543
-
544
- | Properties | Type | Nullable | Description |
545
- | ---------- | ---- | -------- | ----------- || campaign_cookie_expiry | string | no | |
546
-
547
- ---
548
-
549
- #### [CampaignShortLink](#CampaignShortLink)
550
-
551
- | Properties | Type | Nullable | Description |
552
- | ---------- | ---- | -------- | ----------- || medium | string | no | || source | string | no | |
553
-
554
- ---
555
-
556
- #### [ErrorRes](#ErrorRes)
557
-
558
- | Properties | Type | Nullable | Description |
559
- | ---------- | ---- | -------- | ----------- || message | string | no | |
560
-
561
- ---
562
-
563
- #### [Page](#Page)
564
-
565
- | Properties | Type | Nullable | Description |
566
- | ---------- | ---- | -------- | ----------- || current | number | no | || has_next | boolean | no | || has_previous | boolean | no | || item_total | number | no | || next_id | string | no | || size | number | no | || type | string | yes | |
567
-
568
- ---
569
-
570
- #### [QRCodeResp](#QRCodeResp)
571
-
572
- | Properties | Type | Nullable | Description |
573
- | ---------- | ---- | -------- | ----------- || link | string | no | || svg | string | no | |
574
-
575
- ---
576
-
577
- #### [RedirectDevice](#RedirectDevice)
578
-
579
- | Properties | Type | Nullable | Description |
580
- | ---------- | ---- | -------- | ----------- || link | string | no | || type | string | no | |
581
-
582
- ---
583
-
584
- #### [Redirects](#Redirects)
585
-
586
- | Properties | Type | Nullable | Description |
587
- | ---------- | ---- | -------- | ----------- || android | [RedirectDevice](#RedirectDevice) | no | || force_web | boolean | no | || ios | [RedirectDevice](#RedirectDevice) | no | || web | [WebRedirect](#WebRedirect) | no | |
588
-
589
- ---
590
-
591
- #### [ShortLinkList](#ShortLinkList)
592
-
593
- | Properties | Type | Nullable | Description |
594
- | ---------- | ---- | -------- | ----------- || items | [[ShortLinkRes](#ShortLinkRes)] | no | || page | [Page](#Page) | no | |
595
-
596
- ---
597
-
598
- #### [ShortLinkReq](#ShortLinkReq)
599
-
600
- | Properties | Type | Nullable | Description |
601
- | ---------- | ---- | -------- | ----------- || active | boolean | no | || attribution | [Attribution](#Attribution) | no | || campaign | [CampaignShortLink](#CampaignShortLink) | no | || count | number | no | || enable_tracking | boolean | no | || expire_at | string | no | || hash | string | no | || personalized | boolean | no | || redirects | [Redirects](#Redirects) | no | || social_media_tags | [SocialMediaTags](#SocialMediaTags) | no | || title | string | yes | || url | string | yes | |
602
-
603
- ---
604
-
605
- #### [ShortLinkRes](#ShortLinkRes)
606
-
607
- | Properties | Type | Nullable | Description |
608
- | ---------- | ---- | -------- | ----------- || _id | string | no | || active | boolean | no | || app_redirect | boolean | no | || application | string | no | || attribution | [Attribution](#Attribution) | no | || campaign | [CampaignShortLink](#CampaignShortLink) | no | || count | number | no | || created_at | string | no | || created_by | string | no | || enable_tracking | boolean | no | || expire_at | string | no | || fallback | string | no | || meta | string | no | || personalized | boolean | no | || redirects | [Redirects](#Redirects) | no | || social_media_tags | [SocialMediaTags](#SocialMediaTags) | no | || title | string | no | || updated_at | string | no | || url | [UrlInfo](#UrlInfo) | no | || user_id | string | no | |
609
-
610
- ---
611
-
612
- #### [SocialMediaTags](#SocialMediaTags)
613
-
614
- | Properties | Type | Nullable | Description |
615
- | ---------- | ---- | -------- | ----------- || description | string | no | || image | string | no | || title | string | no | |
616
-
617
- ---
618
-
619
- #### [UrlInfo](#UrlInfo)
620
-
621
- | Properties | Type | Nullable | Description |
622
- | ---------- | ---- | -------- | ----------- || hash | string | no | || original | string | no | || short | string | no | |
623
-
624
- ---
625
-
626
- #### [WebRedirect](#WebRedirect)
627
-
628
- | Properties | Type | Nullable | Description |
629
- | ---------- | ---- | -------- | ----------- || link | string | no | || type | string | no | |
630
-
631
- ---
632
-
633
-
634
-
635
-