@selfcommunity/api-services 0.1.2-alpha.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 (50) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +12 -0
  3. package/lib/cjs/client/index.js +170 -0
  4. package/lib/cjs/constants/Endpoints.js +622 -0
  5. package/lib/cjs/index.d.js +2 -0
  6. package/lib/cjs/index.js +46 -0
  7. package/lib/cjs/services/category/index.js +64 -0
  8. package/lib/cjs/services/feature/index.js +42 -0
  9. package/lib/cjs/services/preference/index.js +100 -0
  10. package/lib/cjs/services/user/index.js +85 -0
  11. package/lib/cjs/utils/http.js +51 -0
  12. package/lib/cjs/utils/token.js +36 -0
  13. package/lib/esm/api-services/src/client/index.d.ts +115 -0
  14. package/lib/esm/api-services/src/client/index.d.ts.map +1 -0
  15. package/lib/esm/api-services/src/constants/Endpoints.d.ts +10 -0
  16. package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -0
  17. package/lib/esm/api-services/src/index.d.ts +24 -0
  18. package/lib/esm/api-services/src/index.d.ts.map +1 -0
  19. package/lib/esm/api-services/src/services/category/index.d.ts +13 -0
  20. package/lib/esm/api-services/src/services/category/index.d.ts.map +1 -0
  21. package/lib/esm/api-services/src/services/feature/index.d.ts +10 -0
  22. package/lib/esm/api-services/src/services/feature/index.d.ts.map +1 -0
  23. package/lib/esm/api-services/src/services/preference/index.d.ts +16 -0
  24. package/lib/esm/api-services/src/services/preference/index.d.ts.map +1 -0
  25. package/lib/esm/api-services/src/services/user/index.d.ts +16 -0
  26. package/lib/esm/api-services/src/services/user/index.d.ts.map +1 -0
  27. package/lib/esm/api-services/src/utils/http.d.ts +6 -0
  28. package/lib/esm/api-services/src/utils/http.d.ts.map +1 -0
  29. package/lib/esm/api-services/src/utils/token.d.ts +16 -0
  30. package/lib/esm/api-services/src/utils/token.d.ts.map +1 -0
  31. package/lib/esm/client/index.js +170 -0
  32. package/lib/esm/constants/Endpoints.js +622 -0
  33. package/lib/esm/index.d.js +2 -0
  34. package/lib/esm/index.js +46 -0
  35. package/lib/esm/services/category/index.js +64 -0
  36. package/lib/esm/services/feature/index.js +42 -0
  37. package/lib/esm/services/preference/index.js +100 -0
  38. package/lib/esm/services/user/index.js +85 -0
  39. package/lib/esm/utils/http.js +51 -0
  40. package/lib/esm/utils/src/index.d.ts +7 -0
  41. package/lib/esm/utils/src/index.d.ts.map +1 -0
  42. package/lib/esm/utils/src/utils/string.d.ts +21 -0
  43. package/lib/esm/utils/src/utils/string.d.ts.map +1 -0
  44. package/lib/esm/utils/src/utils/url.d.ts +22 -0
  45. package/lib/esm/utils/src/utils/url.d.ts.map +1 -0
  46. package/lib/esm/utils/token.js +36 -0
  47. package/lib/umd/api-services.js +3 -0
  48. package/lib/umd/api-services.js.LICENSE.txt +1 -0
  49. package/lib/umd/api-services.js.map +1 -0
  50. package/package.json +114 -0
@@ -0,0 +1,622 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _utils = require("@selfcommunity/utils");
7
+
8
+ const Endpoints = {
9
+ /**
10
+ * OAuth2 Endpoints
11
+ */
12
+ OAuthToken: {
13
+ url: (0, _utils.urlReplacer)('/oauth/token/'),
14
+ method: 'POST'
15
+ },
16
+
17
+ /**
18
+ * Preferences Endpoints
19
+ */
20
+ Preferences: {
21
+ url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/'),
22
+ method: 'GET'
23
+ },
24
+
25
+ /**
26
+ * Features Endpoints
27
+ * */
28
+ Feature: {
29
+ url: (0, _utils.urlReplacer)('/api/v2/feature/'),
30
+ method: 'GET'
31
+ },
32
+
33
+ /**
34
+ * FeedObject Endpoints
35
+ */
36
+ FeedObject: {
37
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/'),
38
+ method: 'GET'
39
+ },
40
+ DeleteFeedObject: {
41
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/'),
42
+ method: 'DELETE'
43
+ },
44
+ RestoreFeedObject: {
45
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/restore/'),
46
+ method: 'POST'
47
+ },
48
+ RelatedFeedObjects: {
49
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/related/'),
50
+ method: 'GET'
51
+ },
52
+
53
+ /**
54
+ * Comments
55
+ */
56
+ Comment: {
57
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/'),
58
+ method: 'GET'
59
+ },
60
+ NewComment: {
61
+ url: (0, _utils.urlReplacer)('/api/v2/comment/'),
62
+ method: 'POST'
63
+ },
64
+ UpdateComment: {
65
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/'),
66
+ method: 'PUT'
67
+ },
68
+ DeleteComment: {
69
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/'),
70
+ method: 'DELETE'
71
+ },
72
+ RestoreComment: {
73
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/restore/'),
74
+ method: 'POST'
75
+ },
76
+ Comments: {
77
+ url: (0, _utils.urlReplacer)('/api/v2/comment/'),
78
+ method: 'GET'
79
+ },
80
+ CommentVote: {
81
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/vote/'),
82
+ method: 'POST'
83
+ },
84
+ CommentRestore: {
85
+ url: (0, _utils.urlReplacer)('/api/v2/comment/$(id)/restore'),
86
+ method: 'POST'
87
+ },
88
+
89
+ /**
90
+ * Reporting Flag Endpoints
91
+ */
92
+ FlagStatus: {
93
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/flag/status/'),
94
+ method: 'GET'
95
+ },
96
+ Flag: {
97
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/flag/'),
98
+ method: 'POST'
99
+ },
100
+
101
+ /**
102
+ * Categories Endpoints
103
+ */
104
+ CategoryList: {
105
+ url: (0, _utils.urlReplacer)('/api/v2/category/'),
106
+ method: 'GET'
107
+ },
108
+ Category: {
109
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/'),
110
+ method: 'GET'
111
+ },
112
+ CategoriesFollowed: {
113
+ url: (0, _utils.urlReplacer)('/api/v2/category/followed/'),
114
+ method: 'GET'
115
+ },
116
+ CategoryFollowers: {
117
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/followers/'),
118
+ method: 'GET'
119
+ },
120
+ CategoriesSuggestion: {
121
+ url: (0, _utils.urlReplacer)('/api/v2/suggestion/category/'),
122
+ method: 'GET'
123
+ },
124
+ CategoryTrendingFeed: {
125
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/feed/trending/'),
126
+ method: 'GET'
127
+ },
128
+ CategoryTrendingPeople: {
129
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/followers/trending/'),
130
+ method: 'GET'
131
+ },
132
+ FollowCategory: {
133
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/follow/'),
134
+ method: 'POST'
135
+ },
136
+ CheckCategoryIsFollowed: {
137
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/is_followed/'),
138
+ method: 'GET'
139
+ },
140
+ PopularCategories: {
141
+ url: (0, _utils.urlReplacer)('/api/v2/category/popular/'),
142
+ method: 'GET'
143
+ },
144
+
145
+ /**
146
+ * Tag Endpoints
147
+ */
148
+ Tag: {
149
+ url: (0, _utils.urlReplacer)('/api/v2/tag/$(id)/'),
150
+ method: 'GET'
151
+ },
152
+
153
+ /**
154
+ * User Endpoints
155
+ */
156
+ UserSearch: {
157
+ url: (0, _utils.urlReplacer)('/api/v2/user/search/'),
158
+ method: 'GET'
159
+ },
160
+ User: {
161
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/'),
162
+ method: 'GET'
163
+ },
164
+ UserPatch: {
165
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/'),
166
+ method: 'PATCH'
167
+ },
168
+ UserSettings: {
169
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/settings/'),
170
+ method: 'GET'
171
+ },
172
+ UserSettingsPatch: {
173
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/settings/'),
174
+ method: 'PATCH'
175
+ },
176
+ GetUserLoyaltyPoints: {
177
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/loyalty/points/'),
178
+ method: 'GET'
179
+ },
180
+ UserFollowers: {
181
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/followers/'),
182
+ method: 'GET'
183
+ },
184
+ UsersFollowed: {
185
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/followings/'),
186
+ method: 'GET'
187
+ },
188
+ FollowUser: {
189
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/follow/'),
190
+ method: 'POST'
191
+ },
192
+ CheckUserFollowed: {
193
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/is_followed/'),
194
+ method: 'GET'
195
+ },
196
+ UserConnections: {
197
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connections/'),
198
+ method: 'GET'
199
+ },
200
+ UserCheckConnection: {
201
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/is_connection/'),
202
+ method: 'GET'
203
+ },
204
+ UserConnectionStatuses: {
205
+ url: (0, _utils.urlReplacer)('/api/v2/user/connection/statuses/'),
206
+ method: 'POST'
207
+ },
208
+ UserConnectionRequests: {
209
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/requests/'),
210
+ method: 'POST'
211
+ },
212
+ UserRequestConnections: {
213
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/requests_sent/'),
214
+ method: 'POST'
215
+ },
216
+ UserRequestConnection: {
217
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/request'),
218
+ method: 'POST'
219
+ },
220
+ UserCancelRequestConnection: {
221
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/cancel_request'),
222
+ method: 'POST'
223
+ },
224
+ UserAcceptRequestConnection: {
225
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/accept/'),
226
+ method: 'POST'
227
+ },
228
+ UserRejectConnectionRequest: {
229
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/reject'),
230
+ method: 'POST'
231
+ },
232
+ UserCancelRejectConnectionRequest: {
233
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/cancel_reject'),
234
+ method: 'POST'
235
+ },
236
+ UserRemoveConnection: {
237
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/connection/remove'),
238
+ method: 'POST'
239
+ },
240
+ Me: {
241
+ url: (0, _utils.urlReplacer)('/api/v2/user/me/'),
242
+ method: 'GET'
243
+ },
244
+ UpdateUser: {
245
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/'),
246
+ method: 'PATCH'
247
+ },
248
+ FollowedCategories: {
249
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/categories'),
250
+ method: 'GET'
251
+ },
252
+ GetAvatars: {
253
+ url: (0, _utils.urlReplacer)('/api/v2/user/avatar/'),
254
+ method: 'GET'
255
+ },
256
+ SetPrimaryAvatar: {
257
+ url: (0, _utils.urlReplacer)('/api/v2/user/avatar/'),
258
+ method: 'PATCH'
259
+ },
260
+ AddAvatar: {
261
+ url: (0, _utils.urlReplacer)('/api/v2/user/avatar/'),
262
+ method: 'POST'
263
+ },
264
+ RemoveAvatar: {
265
+ url: (0, _utils.urlReplacer)('/api/v2/user/avatar/'),
266
+ method: 'DELETE'
267
+ },
268
+ CheckEmailToken: {
269
+ url: (0, _utils.urlReplacer)('/api/v2/user/check_email_token/'),
270
+ method: 'GET'
271
+ },
272
+
273
+ /**
274
+ * Broadcast Messages
275
+ */
276
+ BroadcastMessagesList: {
277
+ url: (0, _utils.urlReplacer)('/api/v2/notification/banner/'),
278
+ method: 'GET'
279
+ },
280
+ BroadcastMessagesMarkRead: {
281
+ url: (0, _utils.urlReplacer)('/api/v2/notification/banner/read/'),
282
+ method: 'POST'
283
+ },
284
+ BroadcastMessagesDispose: {
285
+ url: (0, _utils.urlReplacer)('/api/v2/notification/banner/dispose/'),
286
+ method: 'POST'
287
+ },
288
+ BroadcastMessagesUnseenCount: {
289
+ url: (0, _utils.urlReplacer)('/api/v2/notification/banner/unseen/count/'),
290
+ method: 'GET'
291
+ },
292
+
293
+ /**
294
+ * Notifications
295
+ */
296
+ UserNotificationList: {
297
+ url: (0, _utils.urlReplacer)('/api/v2/notification/'),
298
+ method: 'GET'
299
+ },
300
+ UserMarkReadNotification: {
301
+ url: (0, _utils.urlReplacer)('/api/v2/notification/read/'),
302
+ method: 'POST'
303
+ },
304
+ UserUnseenNotificationCount: {
305
+ url: (0, _utils.urlReplacer)('/api/v2/notification/unseen/'),
306
+ method: 'GET'
307
+ },
308
+ UserSuspendContributionNotification: {
309
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/suspend/'),
310
+ method: 'POST'
311
+ },
312
+ UserCheckContributionNotificationSuspended: {
313
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/suspended/'),
314
+ method: 'GET'
315
+ },
316
+ UserListContributionNotificationSuspended: {
317
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/suspended/'),
318
+ method: 'GET'
319
+ },
320
+
321
+ /**
322
+ * Suggestion Endpoints
323
+ */
324
+ UserSuggestion: {
325
+ url: (0, _utils.urlReplacer)('/api/v2/suggestion/user/'),
326
+ method: 'GET'
327
+ },
328
+ Platform: {
329
+ url: (0, _utils.urlReplacer)('/api/v2/user/me/platform_url'),
330
+ method: 'GET'
331
+ },
332
+ PollSuggestion: {
333
+ url: (0, _utils.urlReplacer)('/api/v2/suggestion/poll/'),
334
+ method: 'GET'
335
+ },
336
+
337
+ /**
338
+ * Follow
339
+ */
340
+ FollowContribution: {
341
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/follow/'),
342
+ method: 'POST'
343
+ },
344
+
345
+ /**
346
+ * Manage votes for post, discussion, status and comment
347
+ */
348
+ Vote: {
349
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/vote/'),
350
+ method: 'POST'
351
+ },
352
+ VotesList: {
353
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/vote/'),
354
+ method: 'GET'
355
+ },
356
+
357
+ /**
358
+ * Shares
359
+ */
360
+ ShareUsersList: {
361
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/shares_users/'),
362
+ method: 'GET'
363
+ },
364
+
365
+ /**
366
+ * Poll
367
+ */
368
+ PollVote: {
369
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/poll/vote/'),
370
+ method: 'POST'
371
+ },
372
+ PollVotesList: {
373
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/poll/vote/'),
374
+ method: 'GET'
375
+ },
376
+
377
+ /**
378
+ * Contributors
379
+ */
380
+ Contributors: {
381
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/contributors/'),
382
+ method: 'GET'
383
+ },
384
+
385
+ /**
386
+ * Loyalty Endpoints
387
+ */
388
+ GetPrizes: {
389
+ url: (0, _utils.urlReplacer)('/api/v2/loyalty/prize/'),
390
+ method: 'GET'
391
+ },
392
+
393
+ /**
394
+ * Composer Endpoints
395
+ */
396
+ Composer: {
397
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/'),
398
+ method: 'POST'
399
+ },
400
+ ComposerEdit: {
401
+ url: (0, _utils.urlReplacer)('/api/v2/$(type)/$(id)/'),
402
+ method: 'PUT'
403
+ },
404
+ ComposerChunkUploadMedia: {
405
+ url: (0, _utils.urlReplacer)('/api/v2/media/upload/chunk/'),
406
+ method: 'POST'
407
+ },
408
+ ComposerChunkUploadMediaComplete: {
409
+ url: (0, _utils.urlReplacer)('/api/v2/media/upload/complete/'),
410
+ method: 'POST'
411
+ },
412
+ ComposerMediaCreate: {
413
+ url: (0, _utils.urlReplacer)('/api/v2/media/'),
414
+ method: 'POST'
415
+ },
416
+ ComposerCategoryList: {
417
+ url: (0, _utils.urlReplacer)('/api/v2/category/'),
418
+ method: 'GET'
419
+ },
420
+ ComposerAddressingTagList: {
421
+ url: (0, _utils.urlReplacer)('/api/v2/user/tag/tags_to_address_a_contribution/'),
422
+ method: 'GET'
423
+ },
424
+ ComposerLocalitySearch: {
425
+ url: (0, _utils.urlReplacer)('/api/v2/locality/search/'),
426
+ method: 'GET'
427
+ },
428
+
429
+ /**
430
+ * Custom ADV
431
+ */
432
+ CustomAdvSearch: {
433
+ url: (0, _utils.urlReplacer)('/api/v2/custom_adv/search/'),
434
+ method: 'GET'
435
+ },
436
+
437
+ /**
438
+ * Feed
439
+ */
440
+ MainFeed: {
441
+ url: (0, _utils.urlReplacer)('/api/v2/feed/'),
442
+ method: 'GET'
443
+ },
444
+ MainFeedUnseenCount: {
445
+ url: (0, _utils.urlReplacer)('/api/v2/feed/unseen/count/'),
446
+ method: 'GET'
447
+ },
448
+ FeedObjectMarkRead: {
449
+ url: (0, _utils.urlReplacer)('/api/v2/feed/read/'),
450
+ method: 'POST'
451
+ },
452
+ ExploreFeed: {
453
+ url: (0, _utils.urlReplacer)('/api/v2/feed/explore/'),
454
+ method: 'GET'
455
+ },
456
+ FeedLikeThese: {
457
+ url: (0, _utils.urlReplacer)('/api/v2/feed/likethis/'),
458
+ method: 'POST'
459
+ },
460
+ CategoryFeed: {
461
+ url: (0, _utils.urlReplacer)('/api/v2/category/$(id)/feed/'),
462
+ method: 'GET'
463
+ },
464
+ UserFeed: {
465
+ url: (0, _utils.urlReplacer)('/api/v2/user/$(id)/feed/'),
466
+ method: 'GET'
467
+ },
468
+ EmbedFeed: {
469
+ url: (0, _utils.urlReplacer)('/api/v2/embed/feed/'),
470
+ method: 'GET'
471
+ },
472
+
473
+ /**
474
+ * Private Messages Endpoints
475
+ */
476
+ GetSnippets: {
477
+ url: (0, _utils.urlReplacer)('/api/v2/pm/'),
478
+ method: 'GET'
479
+ },
480
+ GetASingleMessage: {
481
+ url: (0, _utils.urlReplacer)('/api/v2/pm/$(id)/'),
482
+ method: 'GET'
483
+ },
484
+ SendMessage: {
485
+ url: (0, _utils.urlReplacer)('/api/v2/pm/'),
486
+ method: 'POST'
487
+ },
488
+ GetAThread: {
489
+ url: (0, _utils.urlReplacer)('/api/v2/pm/'),
490
+ method: 'GET'
491
+ },
492
+ PrivateMessageUploadMediaInChunks: {
493
+ url: (0, _utils.urlReplacer)('/api/v2/pm/upload/'),
494
+ method: 'POST'
495
+ },
496
+ PrivateMessageChunkUploadDone: {
497
+ url: (0, _utils.urlReplacer)('/api/v2/pm/upload/?done'),
498
+ method: 'POST'
499
+ },
500
+ DeleteASingleMessage: {
501
+ url: (0, _utils.urlReplacer)('/api/v2/pm/$(id)/'),
502
+ method: 'DELETE'
503
+ },
504
+ DeleteAThread: {
505
+ url: (0, _utils.urlReplacer)('/api/v2/pm/$(id)/?hide=1'),
506
+ method: 'DELETE'
507
+ },
508
+
509
+ /**
510
+ * Device
511
+ */
512
+ Device: {
513
+ url: (0, _utils.urlReplacer)('/api/v2/device/$(type)/$(id)/'),
514
+ method: 'GET'
515
+ },
516
+ NewDevice: {
517
+ url: (0, _utils.urlReplacer)('/api/v2/device/$(type)/'),
518
+ method: 'POST'
519
+ },
520
+ DeleteDevice: {
521
+ url: (0, _utils.urlReplacer)('/api/v2/device/$(type)/$(id)/'),
522
+ method: 'DELETE'
523
+ },
524
+
525
+ /**
526
+ * Moderation
527
+ */
528
+ ModerateContribution: {
529
+ url: (0, _utils.urlReplacer)('/api/v2/moderation/contribution/$(id)/'),
530
+ method: 'PATCH'
531
+ },
532
+
533
+ /**
534
+ * Moderation
535
+ */
536
+ ModerateContributionStatus: {
537
+ url: (0, _utils.urlReplacer)('/api/v2/moderation/contribution/$(id)/status/?contribution_type=$(contribution_type)'),
538
+ method: 'GET'
539
+ },
540
+
541
+ /**
542
+ * Insights
543
+ **/
544
+ InsightBestContribution: {
545
+ url: (0, _utils.urlReplacer)('/api/v2/insight/contribution/'),
546
+ method: 'GET'
547
+ },
548
+ InsightBestEmbed: {
549
+ url: (0, _utils.urlReplacer)('/api/v2/insight/embed/'),
550
+ method: 'GET'
551
+ },
552
+ InsightBestUser: {
553
+ url: (0, _utils.urlReplacer)('/api/v2/insight/user/'),
554
+ method: 'GET'
555
+ },
556
+ InsightContributionCounter: {
557
+ url: (0, _utils.urlReplacer)('/api/v2/insight/contribution/counters/?contribution_id=$(id)'),
558
+ method: 'GET'
559
+ },
560
+ InsightEmbedCounter: {
561
+ url: (0, _utils.urlReplacer)('/api/v2/insight/embed/counters/?embed_type=$(type)&embed_id=$(id)'),
562
+ method: 'GET'
563
+ },
564
+ InsightUserCounter: {
565
+ url: (0, _utils.urlReplacer)('/api/v2/insight/user/counters/?user_id=$(id)'),
566
+ method: 'GET'
567
+ },
568
+
569
+ /**
570
+ * Incubators
571
+ */
572
+ GetAllIncubators: {
573
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/'),
574
+ method: 'GET'
575
+ },
576
+ GetIncubatorSuggestion: {
577
+ url: (0, _utils.urlReplacer)('/api/v2/suggestion/incubator/'),
578
+ method: 'GET'
579
+ },
580
+ GetASpecificIncubator: {
581
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/$(id)/'),
582
+ method: 'GET'
583
+ },
584
+ CheckIncubatorSubscription: {
585
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/$(id)/subscribed/'),
586
+ method: 'GET'
587
+ },
588
+ SubscribeToIncubator: {
589
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/$(id)/subscribe/'),
590
+ method: 'POST'
591
+ },
592
+ CreateAnIncubator: {
593
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/'),
594
+ method: 'POST'
595
+ },
596
+ GetIncubatorSubscribers: {
597
+ url: (0, _utils.urlReplacer)('/api/v2/incubator/$(id)/subscribers/'),
598
+ method: 'GET'
599
+ },
600
+
601
+ /**
602
+ * Footer
603
+ */
604
+ GetCustomPages: {
605
+ url: (0, _utils.urlReplacer)('/api/v2/custom_page/'),
606
+ method: 'GET'
607
+ },
608
+ GetLegalPages: {
609
+ url: (0, _utils.urlReplacer)('/api/v2/legal_page/'),
610
+ method: 'GET'
611
+ },
612
+
613
+ /**
614
+ * Media
615
+ */
616
+ MediaClickTracker: {
617
+ url: (0, _utils.urlReplacer)('/api/v2/media/$(id)/click/'),
618
+ method: 'POST'
619
+ }
620
+ };
621
+ var _default = Endpoints;
622
+ exports.default = _default;
@@ -0,0 +1,2 @@
1
+ /* eslint-disable global-require */
2
+ "use strict";
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _client = _interopRequireWildcard(require("./client"));
6
+
7
+ exports.http = _client.default;
8
+ exports.HttpResponse = _client.HttpResponse;
9
+ exports.HttpMethod = _client.HttpMethod;
10
+
11
+ var _Endpoints = _interopRequireWildcard(require("./constants/Endpoints"));
12
+
13
+ exports.Endpoints = _Endpoints.default;
14
+ exports.EndpointType = _Endpoints.EndpointType;
15
+
16
+ var _http = require("./utils/http");
17
+
18
+ exports.formatHttpError = _http.formatHttpError;
19
+
20
+ var _preference = _interopRequireWildcard(require("./services/preference"));
21
+
22
+ exports.PreferenceService = _preference.default;
23
+ exports.PreferenceApiClient = _preference.PreferenceApiClient;
24
+ exports.PreferenceApiClientInterface = _preference.PreferenceApiClientInterface;
25
+
26
+ var _user = _interopRequireWildcard(require("./services/user"));
27
+
28
+ exports.UserService = _user.default;
29
+ exports.UserApiClient = _user.UserApiClient;
30
+ exports.UserApiClientInterface = _user.UserApiClientInterface;
31
+
32
+ var _feature = _interopRequireWildcard(require("./services/feature"));
33
+
34
+ exports.FeatureService = _feature.default;
35
+ exports.FeatureApiClient = _feature.FeatureApiClient;
36
+ exports.FeatureApiClientInterface = _feature.FeatureApiClientInterface;
37
+
38
+ var _category = _interopRequireWildcard(require("./services/category"));
39
+
40
+ exports.CategoryService = _category.default;
41
+ exports.CategoryApiClient = _category.CategoryApiClient;
42
+ exports.CategoryApiClientInterface = _category.CategoryApiClientInterface;
43
+
44
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
+
46
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }