@selfcommunity/api-services 0.1.7 → 0.1.8-alpha.2
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.
- package/lib/{types → cjs}/client/index.d.ts +0 -0
- package/lib/{types → cjs}/client/index.d.ts.map +0 -0
- package/lib/cjs/client/index.js +112 -157
- package/lib/cjs/client/index.js.map +1 -0
- package/lib/{types → cjs}/constants/Endpoints.d.ts +0 -0
- package/lib/{types → cjs}/constants/Endpoints.d.ts.map +1 -1
- package/lib/cjs/constants/Endpoints.js +1017 -1051
- package/lib/cjs/constants/Endpoints.js.map +1 -0
- package/lib/{types → cjs}/index.d.ts +2 -2
- package/lib/{types → cjs}/index.d.ts.map +1 -1
- package/lib/cjs/index.js +133 -222
- package/lib/cjs/index.js.map +1 -0
- package/lib/{types → cjs}/services/category/index.d.ts +0 -0
- package/lib/{types → cjs}/services/category/index.d.ts.map +0 -0
- package/lib/cjs/services/category/index.js +218 -251
- package/lib/cjs/services/category/index.js.map +1 -0
- package/lib/{types → cjs}/services/comment/index.d.ts +5 -4
- package/lib/cjs/services/comment/index.d.ts.map +1 -0
- package/lib/cjs/services/comment/index.js +154 -181
- package/lib/cjs/services/comment/index.js.map +1 -0
- package/lib/{types → cjs}/services/custom_adv/index.d.ts +3 -3
- package/lib/cjs/services/custom_adv/index.d.ts.map +1 -0
- package/lib/cjs/services/custom_adv/index.js +56 -56
- package/lib/cjs/services/custom_adv/index.js.map +1 -0
- package/lib/{types → cjs}/services/custom_page/index.d.ts +0 -0
- package/lib/{types → cjs}/services/custom_page/index.d.ts.map +0 -0
- package/lib/cjs/services/custom_page/index.js +56 -56
- package/lib/cjs/services/custom_page/index.js.map +1 -0
- package/lib/{types → cjs}/services/data_portability/index.d.ts +0 -0
- package/lib/{types → cjs}/services/data_portability/index.d.ts.map +0 -0
- package/lib/cjs/services/data_portability/index.js +51 -49
- package/lib/cjs/services/data_portability/index.js.map +1 -0
- package/lib/{types → cjs}/services/embed/index.d.ts +8 -6
- package/lib/cjs/services/embed/index.d.ts.map +1 -0
- package/lib/cjs/services/embed/index.js +120 -128
- package/lib/cjs/services/embed/index.js.map +1 -0
- package/lib/cjs/services/feature/index.d.ts +19 -0
- package/lib/cjs/services/feature/index.d.ts.map +1 -0
- package/lib/cjs/services/feature/index.js +31 -25
- package/lib/cjs/services/feature/index.js.map +1 -0
- package/lib/{types → cjs}/services/feed/index.d.ts +2 -0
- package/lib/{types → cjs}/services/feed/index.d.ts.map +1 -1
- package/lib/cjs/services/feed/index.js +79 -81
- package/lib/cjs/services/feed/index.js.map +1 -0
- package/lib/{types → cjs}/services/feed_object/index.d.ts +9 -9
- package/lib/cjs/services/feed_object/index.d.ts.map +1 -0
- package/lib/cjs/services/feed_object/index.js +387 -485
- package/lib/cjs/services/feed_object/index.js.map +1 -0
- package/lib/{types → cjs}/services/incubator/index.d.ts +0 -0
- package/lib/{types → cjs}/services/incubator/index.d.ts.map +0 -0
- package/lib/cjs/services/incubator/index.js +104 -114
- package/lib/cjs/services/incubator/index.js.map +1 -0
- package/lib/{types → cjs}/services/insight/index.d.ts +13 -10
- package/lib/cjs/services/insight/index.d.ts.map +1 -0
- package/lib/cjs/services/insight/index.js +93 -94
- package/lib/cjs/services/insight/index.js.map +1 -0
- package/lib/{types → cjs}/services/legal_page/index.d.ts +0 -0
- package/lib/{types → cjs}/services/legal_page/index.d.ts.map +0 -0
- package/lib/cjs/services/legal_page/index.js +92 -102
- package/lib/cjs/services/legal_page/index.js.map +1 -0
- package/lib/cjs/services/locality/index.d.ts +26 -0
- package/lib/cjs/services/locality/index.d.ts.map +1 -0
- package/lib/cjs/services/locality/index.js +44 -37
- package/lib/cjs/services/locality/index.js.map +1 -0
- package/lib/{types → cjs}/services/loyalty/index.d.ts +3 -3
- package/lib/cjs/services/loyalty/index.d.ts.map +1 -0
- package/lib/cjs/services/loyalty/index.js +128 -148
- package/lib/cjs/services/loyalty/index.js.map +1 -0
- package/lib/{types → cjs}/services/media/index.d.ts +0 -0
- package/lib/{types → cjs}/services/media/index.d.ts.map +1 -1
- package/lib/cjs/services/media/index.js +107 -124
- package/lib/cjs/services/media/index.js.map +1 -0
- package/lib/{types → cjs}/services/moderation/index.d.ts +0 -0
- package/lib/{types → cjs}/services/moderation/index.d.ts.map +1 -1
- package/lib/cjs/services/moderation/index.js +95 -109
- package/lib/cjs/services/moderation/index.js.map +1 -0
- package/lib/{types → cjs}/services/notification/index.d.ts +3 -3
- package/lib/cjs/services/notification/index.d.ts.map +1 -0
- package/lib/cjs/services/notification/index.js +121 -131
- package/lib/cjs/services/notification/index.js.map +1 -0
- package/lib/{types → cjs}/services/preference/index.d.ts +0 -0
- package/lib/{types → cjs}/services/preference/index.d.ts.map +0 -0
- package/lib/cjs/services/preference/index.js +57 -65
- package/lib/cjs/services/preference/index.js.map +1 -0
- package/lib/{types → cjs}/services/private_message/index.d.ts +0 -0
- package/lib/{types → cjs}/services/private_message/index.d.ts.map +0 -0
- package/lib/cjs/services/private_message/index.js +137 -148
- package/lib/cjs/services/private_message/index.js.map +1 -0
- package/lib/cjs/services/score/index.d.ts +33 -0
- package/lib/cjs/services/score/index.d.ts.map +1 -0
- package/lib/cjs/services/score/index.js +56 -50
- package/lib/cjs/services/score/index.js.map +1 -0
- package/lib/{types → cjs}/services/sso/index.d.ts +2 -1
- package/lib/{types → cjs}/services/sso/index.d.ts.map +1 -1
- package/lib/cjs/services/sso/index.js +42 -38
- package/lib/cjs/services/sso/index.js.map +1 -0
- package/lib/{types → cjs}/services/suggestion/index.d.ts +0 -0
- package/lib/{types → cjs}/services/suggestion/index.d.ts.map +0 -0
- package/lib/cjs/services/suggestion/index.js +62 -61
- package/lib/cjs/services/suggestion/index.js.map +1 -0
- package/lib/{types → cjs}/services/tag/index.d.ts +10 -7
- package/lib/cjs/services/tag/index.d.ts.map +1 -0
- package/lib/cjs/services/tag/index.js +110 -119
- package/lib/cjs/services/tag/index.js.map +1 -0
- package/lib/{types → cjs}/services/user/index.d.ts +16 -12
- package/lib/cjs/services/user/index.d.ts.map +1 -0
- package/lib/cjs/services/user/index.js +606 -715
- package/lib/cjs/services/user/index.js.map +1 -0
- package/lib/{types → cjs}/services/webhook/index.d.ts +0 -0
- package/lib/{types → cjs}/services/webhook/index.d.ts.map +0 -0
- package/lib/cjs/services/webhook/index.js +164 -193
- package/lib/cjs/services/webhook/index.js.map +1 -0
- package/lib/{types → cjs}/types/baseParams.d.ts +0 -0
- package/lib/{types → cjs}/types/baseParams.d.ts.map +0 -0
- package/lib/cjs/types/baseParams.js +5 -2
- package/lib/cjs/types/baseParams.js.map +1 -0
- package/lib/{types → cjs}/types/category.d.ts +0 -0
- package/lib/{types → cjs}/types/category.d.ts.map +0 -0
- package/lib/cjs/types/category.js +2 -2
- package/lib/cjs/types/category.js.map +1 -0
- package/lib/{types → cjs}/types/comment.d.ts +0 -0
- package/lib/{types → cjs}/types/comment.d.ts.map +0 -0
- package/lib/cjs/types/comment.js +2 -2
- package/lib/cjs/types/comment.js.map +1 -0
- package/lib/{types → cjs}/types/customAdv.d.ts +0 -0
- package/lib/{types → cjs}/types/customAdv.d.ts.map +0 -0
- package/lib/cjs/types/customAdv.js +2 -2
- package/lib/cjs/types/customAdv.js.map +1 -0
- package/lib/{types → cjs}/types/customPage.d.ts +0 -0
- package/lib/{types → cjs}/types/customPage.d.ts.map +0 -0
- package/lib/cjs/types/customPage.js +2 -2
- package/lib/cjs/types/customPage.js.map +1 -0
- package/lib/{types → cjs}/types/embed.d.ts +0 -0
- package/lib/{types → cjs}/types/embed.d.ts.map +0 -0
- package/lib/cjs/types/embed.js +2 -2
- package/lib/cjs/types/embed.js.map +1 -0
- package/lib/cjs/types/feature.d.ts +11 -0
- package/lib/cjs/types/feature.d.ts.map +1 -0
- package/lib/cjs/types/feature.js +3 -0
- package/lib/cjs/types/feature.js.map +1 -0
- package/lib/{types → cjs}/types/feed.d.ts +0 -0
- package/lib/{types → cjs}/types/feed.d.ts.map +0 -0
- package/lib/cjs/types/feed.js +2 -2
- package/lib/cjs/types/feed.js.map +1 -0
- package/lib/{types → cjs}/types/feedObject.d.ts +0 -0
- package/lib/{types → cjs}/types/feedObject.d.ts.map +0 -0
- package/lib/cjs/types/feedObject.js +2 -2
- package/lib/cjs/types/feedObject.js.map +1 -0
- package/lib/{types → cjs}/types/incubator.d.ts +0 -0
- package/lib/{types → cjs}/types/incubator.d.ts.map +0 -0
- package/lib/cjs/types/incubator.js +2 -2
- package/lib/cjs/types/incubator.js.map +1 -0
- package/lib/{types → cjs}/types/index.d.ts +6 -3
- package/lib/{types → cjs}/types/index.d.ts.map +1 -1
- package/lib/cjs/types/index.js +5 -101
- package/lib/cjs/types/index.js.map +1 -0
- package/lib/cjs/types/insight.d.ts +67 -0
- package/lib/cjs/types/insight.d.ts.map +1 -0
- package/lib/cjs/types/insight.js +3 -0
- package/lib/cjs/types/insight.js.map +1 -0
- package/lib/{types → cjs}/types/legalPage.d.ts +0 -0
- package/lib/{types → cjs}/types/legalPage.d.ts.map +0 -0
- package/lib/cjs/types/legalPage.js +2 -2
- package/lib/cjs/types/legalPage.js.map +1 -0
- package/lib/{types → cjs}/types/media.d.ts +2 -15
- package/lib/{types → cjs}/types/media.d.ts.map +1 -1
- package/lib/cjs/types/media.js +8 -27
- package/lib/cjs/types/media.js.map +1 -0
- package/lib/{types → cjs}/types/moderation.d.ts +1 -1
- package/lib/{types → cjs}/types/moderation.d.ts.map +1 -1
- package/lib/cjs/types/moderation.js +2 -2
- package/lib/cjs/types/moderation.js.map +1 -0
- package/lib/{types → cjs}/types/notification.d.ts +0 -0
- package/lib/{types → cjs}/types/notification.d.ts.map +0 -0
- package/lib/cjs/types/notification.js +2 -2
- package/lib/cjs/types/notification.js.map +1 -0
- package/lib/{types → cjs}/types/paginatedResponse.d.ts +0 -0
- package/lib/{types → cjs}/types/paginatedResponse.d.ts.map +0 -0
- package/lib/cjs/types/paginatedResponse.js +5 -2
- package/lib/cjs/types/paginatedResponse.js.map +1 -0
- package/lib/{types → cjs}/types/privateMessage.d.ts +0 -0
- package/lib/{types → cjs}/types/privateMessage.d.ts.map +0 -0
- package/lib/cjs/types/privateMessage.js +2 -2
- package/lib/cjs/types/privateMessage.js.map +1 -0
- package/lib/{types → cjs}/types/prize.d.ts +0 -0
- package/lib/{types → cjs}/types/prize.d.ts.map +0 -0
- package/lib/cjs/types/prize.js +2 -2
- package/lib/cjs/types/prize.js.map +1 -0
- package/lib/cjs/types/score.d.ts +19 -0
- package/lib/cjs/types/score.d.ts.map +1 -0
- package/lib/cjs/types/score.js +3 -0
- package/lib/cjs/types/score.js.map +1 -0
- package/lib/{types → cjs}/types/sso.d.ts +0 -0
- package/lib/{types → cjs}/types/sso.d.ts.map +0 -0
- package/lib/cjs/types/sso.js +5 -2
- package/lib/cjs/types/sso.js.map +1 -0
- package/lib/{types → cjs}/types/tag.d.ts +22 -0
- package/lib/cjs/types/tag.d.ts.map +1 -0
- package/lib/cjs/types/tag.js +2 -2
- package/lib/cjs/types/tag.js.map +1 -0
- package/lib/{types → cjs}/types/user.d.ts +0 -0
- package/lib/{types → cjs}/types/user.d.ts.map +0 -0
- package/lib/cjs/types/user.js +2 -2
- package/lib/cjs/types/user.js.map +1 -0
- package/lib/{types → cjs}/types/webhook.d.ts +0 -0
- package/lib/{types → cjs}/types/webhook.d.ts.map +0 -0
- package/lib/cjs/types/webhook.js +2 -2
- package/lib/cjs/types/webhook.js.map +1 -0
- package/lib/cjs/utils/apiRequest.d.ts +2 -0
- package/lib/{types → cjs}/utils/apiRequest.d.ts.map +1 -1
- package/lib/cjs/utils/apiRequest.js +26 -25
- package/lib/cjs/utils/apiRequest.js.map +1 -0
- package/lib/{types → cjs}/utils/http.d.ts +0 -0
- package/lib/{types → cjs}/utils/http.d.ts.map +0 -0
- package/lib/cjs/utils/http.js +41 -45
- package/lib/cjs/utils/http.js.map +1 -0
- package/lib/{types → cjs}/utils/token.d.ts +0 -0
- package/lib/{types → cjs}/utils/token.d.ts.map +0 -0
- package/lib/cjs/utils/token.js +62 -31
- package/lib/cjs/utils/token.js.map +1 -0
- package/lib/esm/client/index.d.ts +115 -0
- package/lib/esm/client/index.d.ts.map +1 -0
- package/lib/esm/client/index.js +108 -160
- package/lib/esm/client/index.js.map +1 -0
- package/lib/esm/constants/Endpoints.d.ts +10 -0
- package/lib/esm/constants/Endpoints.d.ts.map +1 -0
- package/lib/esm/constants/Endpoints.js +1016 -1052
- package/lib/esm/constants/Endpoints.js.map +1 -0
- package/lib/esm/index.d.ts +51 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +51 -223
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/services/category/index.d.ts +127 -0
- package/lib/esm/services/category/index.d.ts.map +1 -0
- package/lib/esm/services/category/index.js +214 -255
- package/lib/esm/services/category/index.js.map +1 -0
- package/lib/esm/services/comment/index.d.ts +92 -0
- package/lib/esm/services/comment/index.d.ts.map +1 -0
- package/lib/esm/services/comment/index.js +150 -185
- package/lib/esm/services/comment/index.js.map +1 -0
- package/lib/esm/services/custom_adv/index.d.ts +33 -0
- package/lib/esm/services/custom_adv/index.d.ts.map +1 -0
- package/lib/esm/services/custom_adv/index.js +52 -60
- package/lib/esm/services/custom_adv/index.js.map +1 -0
- package/lib/esm/services/custom_page/index.d.ts +33 -0
- package/lib/esm/services/custom_page/index.d.ts.map +1 -0
- package/lib/esm/services/custom_page/index.js +52 -60
- package/lib/esm/services/custom_page/index.js.map +1 -0
- package/lib/esm/services/data_portability/index.d.ts +29 -0
- package/lib/esm/services/data_portability/index.d.ts.map +1 -0
- package/lib/esm/services/data_portability/index.js +47 -53
- package/lib/esm/services/data_portability/index.js.map +1 -0
- package/lib/esm/services/embed/index.d.ts +71 -0
- package/lib/esm/services/embed/index.d.ts.map +1 -0
- package/lib/esm/services/embed/index.js +116 -132
- package/lib/esm/services/embed/index.js.map +1 -0
- package/lib/esm/services/feature/index.d.ts +19 -0
- package/lib/esm/services/feature/index.d.ts.map +1 -0
- package/lib/esm/services/feature/index.js +27 -29
- package/lib/esm/services/feature/index.js.map +1 -0
- package/lib/esm/services/feed/index.d.ts +46 -0
- package/lib/esm/services/feed/index.d.ts.map +1 -0
- package/lib/esm/services/feed/index.js +75 -85
- package/lib/esm/services/feed/index.js.map +1 -0
- package/lib/esm/services/feed_object/index.d.ts +236 -0
- package/lib/esm/services/feed_object/index.d.ts.map +1 -0
- package/lib/esm/services/feed_object/index.js +383 -489
- package/lib/esm/services/feed_object/index.js.map +1 -0
- package/lib/esm/services/incubator/index.d.ts +61 -0
- package/lib/esm/services/incubator/index.d.ts.map +1 -0
- package/lib/esm/services/incubator/index.js +100 -118
- package/lib/esm/services/incubator/index.js.map +1 -0
- package/lib/esm/services/insight/index.d.ts +54 -0
- package/lib/esm/services/insight/index.d.ts.map +1 -0
- package/lib/esm/services/insight/index.js +89 -98
- package/lib/esm/services/insight/index.js.map +1 -0
- package/lib/esm/services/legal_page/index.d.ts +53 -0
- package/lib/esm/services/legal_page/index.d.ts.map +1 -0
- package/lib/esm/services/legal_page/index.js +88 -106
- package/lib/esm/services/legal_page/index.js.map +1 -0
- package/lib/esm/services/locality/index.d.ts +26 -0
- package/lib/esm/services/locality/index.d.ts.map +1 -0
- package/lib/esm/services/locality/index.js +40 -41
- package/lib/esm/services/locality/index.js.map +1 -0
- package/lib/esm/services/loyalty/index.d.ts +77 -0
- package/lib/esm/services/loyalty/index.d.ts.map +1 -0
- package/lib/esm/services/loyalty/index.js +124 -152
- package/lib/esm/services/loyalty/index.js.map +1 -0
- package/lib/esm/services/media/index.d.ts +65 -0
- package/lib/esm/services/media/index.d.ts.map +1 -0
- package/lib/esm/services/media/index.js +103 -128
- package/lib/esm/services/media/index.js.map +1 -0
- package/lib/esm/services/moderation/index.d.ts +58 -0
- package/lib/esm/services/moderation/index.d.ts.map +1 -0
- package/lib/esm/services/moderation/index.js +91 -113
- package/lib/esm/services/moderation/index.js.map +1 -0
- package/lib/esm/services/notification/index.d.ts +70 -0
- package/lib/esm/services/notification/index.d.ts.map +1 -0
- package/lib/esm/services/notification/index.js +117 -135
- package/lib/esm/services/notification/index.js.map +1 -0
- package/lib/esm/services/preference/index.d.ts +35 -0
- package/lib/esm/services/preference/index.d.ts.map +1 -0
- package/lib/esm/services/preference/index.js +53 -69
- package/lib/esm/services/preference/index.js.map +1 -0
- package/lib/esm/services/private_message/index.d.ts +81 -0
- package/lib/esm/services/private_message/index.d.ts.map +1 -0
- package/lib/esm/services/private_message/index.js +133 -152
- package/lib/esm/services/private_message/index.js.map +1 -0
- package/lib/esm/services/score/index.d.ts +33 -0
- package/lib/esm/services/score/index.d.ts.map +1 -0
- package/lib/esm/services/score/index.js +52 -54
- package/lib/esm/services/score/index.js.map +1 -0
- package/lib/esm/services/sso/index.d.ts +26 -0
- package/lib/esm/services/sso/index.d.ts.map +1 -0
- package/lib/esm/services/sso/index.js +38 -42
- package/lib/esm/services/sso/index.js.map +1 -0
- package/lib/esm/services/suggestion/index.d.ts +36 -0
- package/lib/esm/services/suggestion/index.d.ts.map +1 -0
- package/lib/esm/services/suggestion/index.js +58 -65
- package/lib/esm/services/suggestion/index.js.map +1 -0
- package/lib/esm/services/tag/index.d.ts +67 -0
- package/lib/esm/services/tag/index.d.ts.map +1 -0
- package/lib/esm/services/tag/index.js +106 -123
- package/lib/esm/services/tag/index.js.map +1 -0
- package/lib/esm/services/user/index.d.ts +351 -0
- package/lib/esm/services/user/index.d.ts.map +1 -0
- package/lib/esm/services/user/index.js +602 -719
- package/lib/esm/services/user/index.js.map +1 -0
- package/lib/esm/services/webhook/index.d.ts +99 -0
- package/lib/esm/services/webhook/index.d.ts.map +1 -0
- package/lib/esm/services/webhook/index.js +160 -197
- package/lib/esm/services/webhook/index.js.map +1 -0
- package/lib/esm/types/baseParams.d.ts +23 -0
- package/lib/esm/types/baseParams.d.ts.map +1 -0
- package/lib/esm/types/baseParams.js +5 -3
- package/lib/esm/types/baseParams.js.map +1 -0
- package/lib/esm/types/category.d.ts +15 -0
- package/lib/esm/types/category.d.ts.map +1 -0
- package/lib/esm/types/category.js +2 -3
- package/lib/esm/types/category.js.map +1 -0
- package/lib/esm/types/comment.d.ts +51 -0
- package/lib/esm/types/comment.d.ts.map +1 -0
- package/lib/esm/types/comment.js +2 -3
- package/lib/esm/types/comment.js.map +1 -0
- package/lib/esm/types/customAdv.d.ts +19 -0
- package/lib/esm/types/customAdv.d.ts.map +1 -0
- package/lib/esm/types/customAdv.js +2 -3
- package/lib/esm/types/customAdv.js.map +1 -0
- package/lib/esm/types/customPage.d.ts +24 -0
- package/lib/esm/types/customPage.d.ts.map +1 -0
- package/lib/esm/types/customPage.js +2 -3
- package/lib/esm/types/customPage.js.map +1 -0
- package/lib/esm/types/embed.d.ts +26 -0
- package/lib/esm/types/embed.d.ts.map +1 -0
- package/lib/esm/types/embed.js +2 -3
- package/lib/esm/types/embed.js.map +1 -0
- package/lib/esm/types/feature.d.ts +11 -0
- package/lib/esm/types/feature.d.ts.map +1 -0
- package/lib/esm/types/feature.js +2 -0
- package/lib/esm/types/feature.js.map +1 -0
- package/lib/esm/types/feed.d.ts +11 -0
- package/lib/esm/types/feed.d.ts.map +1 -0
- package/lib/esm/types/feed.js +2 -3
- package/lib/esm/types/feed.js.map +1 -0
- package/lib/esm/types/feedObject.d.ts +56 -0
- package/lib/esm/types/feedObject.d.ts.map +1 -0
- package/lib/esm/types/feedObject.js +2 -3
- package/lib/esm/types/feedObject.js.map +1 -0
- package/lib/esm/types/incubator.d.ts +33 -0
- package/lib/esm/types/incubator.d.ts.map +1 -0
- package/lib/esm/types/incubator.js +2 -3
- package/lib/esm/types/incubator.js.map +1 -0
- package/lib/esm/types/index.d.ts +25 -0
- package/lib/esm/types/index.d.ts.map +1 -0
- package/lib/esm/types/index.js +3 -102
- package/lib/esm/types/index.js.map +1 -0
- package/lib/esm/types/insight.d.ts +67 -0
- package/lib/esm/types/insight.d.ts.map +1 -0
- package/lib/esm/types/insight.js +2 -0
- package/lib/esm/types/insight.js.map +1 -0
- package/lib/esm/types/legalPage.d.ts +19 -0
- package/lib/esm/types/legalPage.d.ts.map +1 -0
- package/lib/esm/types/legalPage.js +2 -3
- package/lib/esm/types/legalPage.js.map +1 -0
- package/lib/esm/types/media.d.ts +67 -0
- package/lib/esm/types/media.d.ts.map +1 -0
- package/lib/esm/types/media.js +6 -28
- package/lib/esm/types/media.js.map +1 -0
- package/lib/esm/types/moderation.d.ts +23 -0
- package/lib/esm/types/moderation.d.ts.map +1 -0
- package/lib/esm/types/moderation.js +2 -3
- package/lib/esm/types/moderation.js.map +1 -0
- package/lib/esm/types/notification.d.ts +31 -0
- package/lib/esm/types/notification.d.ts.map +1 -0
- package/lib/esm/types/notification.js +2 -3
- package/lib/esm/types/notification.js.map +1 -0
- package/lib/esm/types/paginatedResponse.d.ts +10 -0
- package/lib/esm/types/paginatedResponse.d.ts.map +1 -0
- package/lib/esm/types/paginatedResponse.js +5 -3
- package/lib/esm/types/paginatedResponse.js.map +1 -0
- package/lib/esm/types/privateMessage.d.ts +176 -0
- package/lib/esm/types/privateMessage.d.ts.map +1 -0
- package/lib/esm/types/privateMessage.js +2 -3
- package/lib/esm/types/privateMessage.js.map +1 -0
- package/lib/esm/types/prize.d.ts +47 -0
- package/lib/esm/types/prize.d.ts.map +1 -0
- package/lib/esm/types/prize.js +2 -3
- package/lib/esm/types/prize.js.map +1 -0
- package/lib/esm/types/score.d.ts +19 -0
- package/lib/esm/types/score.d.ts.map +1 -0
- package/lib/esm/types/score.js +2 -0
- package/lib/esm/types/score.js.map +1 -0
- package/lib/esm/types/sso.d.ts +12 -0
- package/lib/esm/types/sso.d.ts.map +1 -0
- package/lib/esm/types/sso.js +5 -3
- package/lib/esm/types/sso.js.map +1 -0
- package/lib/esm/types/tag.d.ts +61 -0
- package/lib/esm/types/tag.d.ts.map +1 -0
- package/lib/esm/types/tag.js +2 -3
- package/lib/esm/types/tag.js.map +1 -0
- package/lib/esm/types/user.d.ts +105 -0
- package/lib/esm/types/user.d.ts.map +1 -0
- package/lib/esm/types/user.js +2 -3
- package/lib/esm/types/user.js.map +1 -0
- package/lib/esm/types/webhook.d.ts +32 -0
- package/lib/esm/types/webhook.d.ts.map +1 -0
- package/lib/esm/types/webhook.js +2 -3
- package/lib/esm/types/webhook.js.map +1 -0
- package/lib/esm/utils/apiRequest.d.ts +2 -0
- package/lib/esm/utils/apiRequest.d.ts.map +1 -0
- package/lib/esm/utils/apiRequest.js +21 -27
- package/lib/esm/utils/apiRequest.js.map +1 -0
- package/lib/esm/utils/http.d.ts +6 -0
- package/lib/esm/utils/http.d.ts.map +1 -0
- package/lib/esm/utils/http.js +39 -48
- package/lib/esm/utils/http.js.map +1 -0
- package/lib/esm/utils/token.d.ts +21 -0
- package/lib/esm/utils/token.d.ts.map +1 -0
- package/lib/esm/utils/token.js +36 -33
- package/lib/esm/utils/token.js.map +1 -0
- package/lib/umd/api-services.js +1 -1
- package/lib/umd/api-services.js.map +1 -1
- package/package.json +7 -9
- package/lib/cjs/index.d.js +0 -2
- package/lib/esm/index.d.js +0 -2
- package/lib/types/services/comment/index.d.ts.map +0 -1
- package/lib/types/services/custom_adv/index.d.ts.map +0 -1
- package/lib/types/services/embed/index.d.ts.map +0 -1
- package/lib/types/services/feature/index.d.ts +0 -18
- package/lib/types/services/feature/index.d.ts.map +0 -1
- package/lib/types/services/feed_object/index.d.ts.map +0 -1
- package/lib/types/services/insight/index.d.ts.map +0 -1
- package/lib/types/services/locality/index.d.ts +0 -24
- package/lib/types/services/locality/index.d.ts.map +0 -1
- package/lib/types/services/loyalty/index.d.ts.map +0 -1
- package/lib/types/services/notification/index.d.ts.map +0 -1
- package/lib/types/services/score/index.d.ts +0 -31
- package/lib/types/services/score/index.d.ts.map +0 -1
- package/lib/types/services/tag/index.d.ts.map +0 -1
- package/lib/types/services/user/index.d.ts.map +0 -1
- package/lib/types/tsconfig.build.tsbuildinfo +0 -1
- package/lib/types/types/tag.d.ts.map +0 -1
- package/lib/types/utils/apiRequest.d.ts +0 -2
|
@@ -1,494 +1,388 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { apiRequest } from '../../utils/apiRequest';
|
|
11
|
+
import Endpoints from '../../constants/Endpoints';
|
|
12
12
|
/**
|
|
13
13
|
* Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
|
|
14
14
|
*/
|
|
15
|
-
class FeedObjectApiClient {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
* @param params
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
static feedObjectFollowingList(type, params) {
|
|
255
|
-
const p = new URLSearchParams(params);
|
|
256
|
-
return (0, _apiRequest.apiRequest)(`${_Endpoints.default.FeedObjectFollowingList.url({
|
|
257
|
-
type
|
|
258
|
-
})}?${p.toString()}`, _Endpoints.default.FeedObjectFollowingList.method);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* This endpoint returns following = true if the feed obj (identified in path) is followed by the authenticated user
|
|
262
|
-
* @param type
|
|
263
|
-
* @param id
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
static checkIfFollowingFeedObject(type, id) {
|
|
268
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.CheckIfFollowingFeedObject.url({
|
|
269
|
-
type,
|
|
270
|
-
id
|
|
271
|
-
}), _Endpoints.default.CheckIfFollowingFeedObject.method);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* This endpoint suspends the notifications for the selected feed obj
|
|
275
|
-
* @param type
|
|
276
|
-
* @param id
|
|
277
|
-
*/
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
static suspendFeedObject(type, id) {
|
|
281
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.UserSuspendContributionNotification.url({
|
|
282
|
-
type,
|
|
283
|
-
id
|
|
284
|
-
}), _Endpoints.default.UserSuspendContributionNotification.method);
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* This endpoint returns suspended = true if the notifications for the feed obj (identified in path) is suspended by the authenticated user
|
|
288
|
-
* @param type
|
|
289
|
-
* @param id
|
|
290
|
-
*/
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
static checkIfSuspendedFeedObject(type, id) {
|
|
294
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.UserCheckContributionNotificationSuspended.url({
|
|
295
|
-
type,
|
|
296
|
-
id
|
|
297
|
-
}), _Endpoints.default.UserCheckContributionNotificationSuspended.method);
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user
|
|
301
|
-
* @param type
|
|
302
|
-
* @param params
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
static feedObjectSuspendedList(type, params) {
|
|
307
|
-
const p = new URLSearchParams(params);
|
|
308
|
-
return (0, _apiRequest.apiRequest)(`${_Endpoints.default.UserListContributionNotificationSuspended.url({
|
|
309
|
-
type
|
|
310
|
-
})}?${p.toString()}`, _Endpoints.default.UserListContributionNotificationSuspended.method);
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* This endpoint flags a specific feed obj
|
|
314
|
-
* @param type
|
|
315
|
-
* @param id
|
|
316
|
-
* @param flag_type
|
|
317
|
-
*/
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
static flagFeedObject(type, id, flag_type) {
|
|
321
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.Flag.url({
|
|
322
|
-
type,
|
|
323
|
-
id
|
|
324
|
-
}), _Endpoints.default.Flag.method, flag_type);
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Retrieves, if exists, a flag for this contribute created by the authenticated user
|
|
328
|
-
* @param type
|
|
329
|
-
* @param id
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
static feedObjectFlagStatus(type, id) {
|
|
334
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.FlagStatus.url({
|
|
335
|
-
type,
|
|
336
|
-
id
|
|
337
|
-
}), _Endpoints.default.FlagStatus.method);
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* This endpoint retrieves a list of flags for a specific feed obj
|
|
341
|
-
* @param type
|
|
342
|
-
* @param id
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
static feedObjectFlagList(type, id) {
|
|
347
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.FeedObjectFlagList.url({
|
|
348
|
-
type,
|
|
349
|
-
id
|
|
350
|
-
}), _Endpoints.default.FeedObjectFlagList.method);
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* This endpoint hides the feed obj for the logged user. The feed obj must be in show state
|
|
354
|
-
* @param type
|
|
355
|
-
* @param id
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
static hideFeedObject(type, id) {
|
|
360
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.HideFeedObject.url({
|
|
361
|
-
type,
|
|
362
|
-
id
|
|
363
|
-
}), _Endpoints.default.HideFeedObject.method);
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* This endpoint retrieves if the the feed obj has been hidden by the authenticated user (hidden = true)
|
|
367
|
-
* @param type
|
|
368
|
-
* @param id
|
|
369
|
-
*/
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
static feedObjectHideStatus(type, id) {
|
|
373
|
-
return (0, _apiRequest.apiRequest)(_Endpoints.default.FeedObjectHideStatus.url({
|
|
374
|
-
type,
|
|
375
|
-
id
|
|
376
|
-
}), _Endpoints.default.FeedObjectHideStatus.method);
|
|
377
|
-
}
|
|
378
|
-
|
|
15
|
+
export class FeedObjectApiClient {
|
|
16
|
+
/**
|
|
17
|
+
* This endpoint retrieves all feed objs
|
|
18
|
+
* @param type
|
|
19
|
+
* @param params
|
|
20
|
+
*/
|
|
21
|
+
static getAllFeedObjects(type, params) {
|
|
22
|
+
const p = new URLSearchParams(params);
|
|
23
|
+
return apiRequest(`${Endpoints.FeedObjectList.url({ type })}?${p.toString()}`, Endpoints.FeedObjectList.method);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* This endpoint retrieves all uncommented feed objs
|
|
27
|
+
* @param type
|
|
28
|
+
* @param params
|
|
29
|
+
*/
|
|
30
|
+
static getUncommentedFeedObjects(type, params) {
|
|
31
|
+
const p = new URLSearchParams(params);
|
|
32
|
+
return apiRequest(`${Endpoints.FeedObjectsUncommented.url({ type })}?${p.toString()}`, Endpoints.FeedObjectsUncommented.method);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* This endpoint performs search operation to feed objs
|
|
36
|
+
* @param type
|
|
37
|
+
*/
|
|
38
|
+
static searchFeedObject(type) {
|
|
39
|
+
return apiRequest(Endpoints.SearchFeedObject.url({ type }), Endpoints.SearchFeedObject.method);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This endpoint creates a feed obj
|
|
43
|
+
* @param type
|
|
44
|
+
* @param data
|
|
45
|
+
*/
|
|
46
|
+
static createFeedObject(type, data) {
|
|
47
|
+
return apiRequest(Endpoints.CreateFeedObject.url({ type }), Endpoints.CreateFeedObject.method, data);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* This endpoint retrieves a specific feed obj using ID
|
|
51
|
+
* @param type
|
|
52
|
+
* @param id
|
|
53
|
+
*/
|
|
54
|
+
static getSpecificFeedObject(type, id) {
|
|
55
|
+
return apiRequest(Endpoints.FeedObject.url({ type, id }), Endpoints.FeedObject.method);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* This endpoint updates a specific feed obj
|
|
59
|
+
* @param type
|
|
60
|
+
* @param id
|
|
61
|
+
* @param data
|
|
62
|
+
*/
|
|
63
|
+
static updateFeedObject(type, id, data) {
|
|
64
|
+
return apiRequest(Endpoints.UpdateFeedObject.url({ id, type }), Endpoints.UpdateFeedObject.method, data);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* This endpoint deletes a specific feed obj
|
|
68
|
+
* @param type
|
|
69
|
+
* @param id
|
|
70
|
+
*/
|
|
71
|
+
static deleteFeedObject(type, id) {
|
|
72
|
+
return apiRequest(Endpoints.DeleteFeedObject.url({ type, id }), Endpoints.DeleteFeedObject.method);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* This endpoint retrieves all contributors for a specific feed obj
|
|
76
|
+
* @param type
|
|
77
|
+
* @param id
|
|
78
|
+
* @param params
|
|
79
|
+
*/
|
|
80
|
+
static feedObjectContributorsList(type, id, params) {
|
|
81
|
+
const p = new URLSearchParams(params);
|
|
82
|
+
return apiRequest(`${Endpoints.FeedObjectContributorsList.url({ type, id })}?${p.toString()}`, Endpoints.FeedObjectContributorsList.method);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* This endpoint retrieves all shares for a specific feed obj
|
|
86
|
+
* @param type
|
|
87
|
+
* @param id
|
|
88
|
+
* @param params
|
|
89
|
+
*/
|
|
90
|
+
static feedObjectSharesList(type, id, params) {
|
|
91
|
+
const p = new URLSearchParams(params);
|
|
92
|
+
return apiRequest(`${Endpoints.FeedObjectSharesList.url({ type, id })}?${p.toString()}`, Endpoints.FeedObjectSharesList.method);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* This endpoint retrieves all shares users for a specific feed obj
|
|
96
|
+
* @param type
|
|
97
|
+
* @param id
|
|
98
|
+
* @param params
|
|
99
|
+
*/
|
|
100
|
+
static feedObjectUserSharesList(type, id, params) {
|
|
101
|
+
const p = new URLSearchParams(params);
|
|
102
|
+
return apiRequest(`${Endpoints.FeedObjectUserSharesList.url({ type, id })}?${p.toString()}`, Endpoints.FeedObjectUserSharesList.method);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @param type
|
|
107
|
+
* @param id
|
|
108
|
+
*/
|
|
109
|
+
static restoreFeedObject(type, id) {
|
|
110
|
+
return apiRequest(Endpoints.RestoreFeedObject.url({ type, id }), Endpoints.RestoreFeedObject.method);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* This endpoint restores a feed obj
|
|
114
|
+
* @param type
|
|
115
|
+
* @param id
|
|
116
|
+
* @param params
|
|
117
|
+
*/
|
|
118
|
+
static relatedFeedObjects(type, id, params) {
|
|
119
|
+
const p = new URLSearchParams(params);
|
|
120
|
+
return apiRequest(`${Endpoints.RelatedFeedObjects.url({ type, id })}?${p.toString()}`, Endpoints.RelatedFeedObjects.method);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* This endpoint upvotes a specific feed obj
|
|
124
|
+
* @param type
|
|
125
|
+
* @param id
|
|
126
|
+
*/
|
|
127
|
+
static voteFeedObject(type, id) {
|
|
128
|
+
return apiRequest(Endpoints.Vote.url({ type, id }), Endpoints.Vote.method);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This endpoint retrieves all votes for a specific feed obj
|
|
132
|
+
* @param type
|
|
133
|
+
* @param id
|
|
134
|
+
* @param params
|
|
135
|
+
*/
|
|
136
|
+
static feedObjectVotes(type, id, params) {
|
|
137
|
+
const p = new URLSearchParams(params);
|
|
138
|
+
return apiRequest(`${Endpoints.VotesList.url({ type, id })}?${p.toString()}`, Endpoints.VotesList.method);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* This endpoint upvotes a specific poll choice in a feed obj
|
|
142
|
+
* @param type It can be only "discussion" or "post".
|
|
143
|
+
* @param id
|
|
144
|
+
* @param choice
|
|
145
|
+
*/
|
|
146
|
+
static feedObjectPollVote(type, id, choice) {
|
|
147
|
+
return apiRequest(Endpoints.PollVote.url({ type, id }), Endpoints.PollVote.method, { choice: choice });
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* This endpoint retrieves all poll votes for a specific feed obj
|
|
151
|
+
* @param type It can be only "discussion" or "post".
|
|
152
|
+
* @param id
|
|
153
|
+
* @param params
|
|
154
|
+
*/
|
|
155
|
+
static feedObjectPollVotesList(type, id, params) {
|
|
156
|
+
const p = new URLSearchParams(params);
|
|
157
|
+
return apiRequest(`${Endpoints.PollVotesList.url({ type, id })}?${p.toString()}`, Endpoints.PollVotesList.method);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* This endpoint follows a feed obj
|
|
161
|
+
* @param type
|
|
162
|
+
* @param id
|
|
163
|
+
*/
|
|
164
|
+
static followFeedObject(type, id) {
|
|
165
|
+
return apiRequest(Endpoints.FollowContribution.url({ id }), Endpoints.FollowContribution.method);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* This endpoint retrieves all feed objs followed by the authenticated user
|
|
169
|
+
* @param type
|
|
170
|
+
* @param params
|
|
171
|
+
*/
|
|
172
|
+
static feedObjectFollowingList(type, params) {
|
|
173
|
+
const p = new URLSearchParams(params);
|
|
174
|
+
return apiRequest(`${Endpoints.FeedObjectFollowingList.url({ type })}?${p.toString()}`, Endpoints.FeedObjectFollowingList.method);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* This endpoint returns following = true if the feed obj (identified in path) is followed by the authenticated user
|
|
178
|
+
* @param type
|
|
179
|
+
* @param id
|
|
180
|
+
*/
|
|
181
|
+
static checkIfFollowingFeedObject(type, id) {
|
|
182
|
+
return apiRequest(Endpoints.CheckIfFollowingFeedObject.url({ type, id }), Endpoints.CheckIfFollowingFeedObject.method);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* This endpoint suspends the notifications for the selected feed obj
|
|
186
|
+
* @param type
|
|
187
|
+
* @param id
|
|
188
|
+
*/
|
|
189
|
+
static suspendFeedObject(type, id) {
|
|
190
|
+
return apiRequest(Endpoints.UserSuspendContributionNotification.url({ type, id }), Endpoints.UserSuspendContributionNotification.method);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* This endpoint returns suspended = true if the notifications for the feed obj (identified in path) is suspended by the authenticated user
|
|
194
|
+
* @param type
|
|
195
|
+
* @param id
|
|
196
|
+
*/
|
|
197
|
+
static checkIfSuspendedFeedObject(type, id) {
|
|
198
|
+
return apiRequest(Endpoints.UserCheckContributionNotificationSuspended.url({ type, id }), Endpoints.UserCheckContributionNotificationSuspended.method);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user
|
|
202
|
+
* @param type
|
|
203
|
+
* @param params
|
|
204
|
+
*/
|
|
205
|
+
static feedObjectSuspendedList(type, params) {
|
|
206
|
+
const p = new URLSearchParams(params);
|
|
207
|
+
return apiRequest(`${Endpoints.UserListContributionNotificationSuspended.url({ type })}?${p.toString()}`, Endpoints.UserListContributionNotificationSuspended.method);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* This endpoint flags a specific feed obj
|
|
211
|
+
* @param type
|
|
212
|
+
* @param id
|
|
213
|
+
* @param flag_type
|
|
214
|
+
*/
|
|
215
|
+
static flagFeedObject(type, id, flag_type) {
|
|
216
|
+
return apiRequest(Endpoints.Flag.url({ type, id }), Endpoints.Flag.method, flag_type);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Retrieves, if exists, a flag for this contribute created by the authenticated user
|
|
220
|
+
* @param type
|
|
221
|
+
* @param id
|
|
222
|
+
*/
|
|
223
|
+
static feedObjectFlagStatus(type, id) {
|
|
224
|
+
return apiRequest(Endpoints.FlagStatus.url({ type, id }), Endpoints.FlagStatus.method);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* This endpoint retrieves a list of flags for a specific feed obj
|
|
228
|
+
* @param type
|
|
229
|
+
* @param id
|
|
230
|
+
*/
|
|
231
|
+
static feedObjectFlagList(type, id) {
|
|
232
|
+
return apiRequest(Endpoints.FeedObjectFlagList.url({ type, id }), Endpoints.FeedObjectFlagList.method);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* This endpoint hides the feed obj for the logged user. The feed obj must be in show state
|
|
236
|
+
* @param type
|
|
237
|
+
* @param id
|
|
238
|
+
*/
|
|
239
|
+
static hideFeedObject(type, id) {
|
|
240
|
+
return apiRequest(Endpoints.HideFeedObject.url({ type, id }), Endpoints.HideFeedObject.method);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* This endpoint retrieves if the the feed obj has been hidden by the authenticated user (hidden = true)
|
|
244
|
+
* @param type
|
|
245
|
+
* @param id
|
|
246
|
+
*/
|
|
247
|
+
static feedObjectHideStatus(type, id) {
|
|
248
|
+
return apiRequest(Endpoints.FeedObjectHideStatus.url({ type, id }), Endpoints.FeedObjectHideStatus.method);
|
|
249
|
+
}
|
|
379
250
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
251
|
+
export default class FeedObjectService {
|
|
252
|
+
static getAllFeedObjects(type, params) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
return FeedObjectApiClient.getAllFeedObjects(type, params);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
static getUncommentedFeedObjects(type, params) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
return FeedObjectApiClient.getUncommentedFeedObjects(type, params);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
static searchFeedObject(type) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
return FeedObjectApiClient.searchFeedObject(type);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
static createFeedObject(type, data) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
return FeedObjectApiClient.createFeedObject(type, data);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
static getSpecificFeedObject(type, id) {
|
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
274
|
+
return FeedObjectApiClient.getSpecificFeedObject(type, id);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
static updateFeedObject(type, id, data) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
return FeedObjectApiClient.updateFeedObject(type, id, data);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
static deleteFeedObject(type, id) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
return FeedObjectApiClient.deleteFeedObject(type, id);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
static feedObjectContributorsList(type, id, params) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
return FeedObjectApiClient.feedObjectContributorsList(type, id, params);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
static feedObjectSharesList(type, id, params) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
return FeedObjectApiClient.feedObjectSharesList(type, id, params);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
static feedObjectUserSharesList(type, id, params) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
return FeedObjectApiClient.feedObjectUserSharesList(type, id, params);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
static restoreFeedObject(type, id) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
return FeedObjectApiClient.restoreFeedObject(type, id);
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
static relatedFeedObjects(type, id, params) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
return FeedObjectApiClient.relatedFeedObjects(type, id, params);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
static voteFeedObject(type, id) {
|
|
313
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
+
return FeedObjectApiClient.voteFeedObject(type, id);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
static feedObjectVotes(type, id, params) {
|
|
318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
+
return FeedObjectApiClient.feedObjectVotes(type, id, params);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
static feedObjectPollVote(type, id, choice) {
|
|
323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
+
return FeedObjectApiClient.feedObjectPollVote(type, id, choice);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
static feedObjectPollVotesList(type, id, params) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
return FeedObjectApiClient.feedObjectPollVotesList(type, id, params);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
static followFeedObject(type, id) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
+
return FeedObjectApiClient.followFeedObject(type, id);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
static feedObjectFollowingList(type, params) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
return FeedObjectApiClient.feedObjectFollowingList(type, params);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
static checkIfFollowingFeedObject(type, id) {
|
|
343
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
+
return FeedObjectApiClient.checkIfFollowingFeedObject(type, id);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
static suspendFeedObject(type, id) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
return FeedObjectApiClient.suspendFeedObject(type, id);
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
static checkIfSuspendedFeedObject(type, id) {
|
|
353
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
354
|
+
return FeedObjectApiClient.checkIfSuspendedFeedObject(type, id);
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
static feedObjectSuspendedList(type, params) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
359
|
+
return FeedObjectApiClient.feedObjectSuspendedList(type, params);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
static flagFeedObject(type, id, flag_type) {
|
|
363
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
364
|
+
return FeedObjectApiClient.flagFeedObject(type, id, flag_type);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
static feedObjectFlagList(type, id) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
return FeedObjectApiClient.feedObjectFlagList(type, id);
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
static feedObjectFlagStatus(type, id) {
|
|
373
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
return FeedObjectApiClient.feedObjectFlagStatus(type, id);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
static hideFeedObject(type, id) {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
return FeedObjectApiClient.hideFeedObject(type, id);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
static feedObjectHideStatus(type, id) {
|
|
383
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
384
|
+
return FeedObjectApiClient.feedObjectHideStatus(type, id);
|
|
385
|
+
});
|
|
386
|
+
}
|
|
492
387
|
}
|
|
493
|
-
|
|
494
|
-
exports.default = FeedObjectService;
|
|
388
|
+
//# sourceMappingURL=index.js.map
|