@selfcommunity/api-services 0.4.1-alpha.2 → 0.4.1-alpha.4
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/cjs/services/account/index.d.ts +1 -1
- package/lib/cjs/services/account/index.js +1 -1
- package/lib/cjs/services/category/index.d.ts +2 -2
- package/lib/cjs/services/category/index.js +2 -2
- package/lib/cjs/services/comment/index.d.ts +1 -1
- package/lib/cjs/services/comment/index.js +1 -1
- package/lib/cjs/services/custom_adv/index.d.ts +1 -1
- package/lib/cjs/services/custom_adv/index.js +1 -1
- package/lib/cjs/services/custom_menu/index.d.ts +1 -1
- package/lib/cjs/services/custom_menu/index.js +1 -1
- package/lib/cjs/services/custom_page/index.d.ts +1 -1
- package/lib/cjs/services/custom_page/index.js +1 -1
- package/lib/cjs/services/data_portability/index.d.ts +1 -1
- package/lib/cjs/services/data_portability/index.js +1 -1
- package/lib/cjs/services/embed/index.d.ts +1 -1
- package/lib/cjs/services/embed/index.js +1 -1
- package/lib/cjs/services/feature/index.d.ts +1 -1
- package/lib/cjs/services/feature/index.js +1 -1
- package/lib/cjs/services/feed/index.d.ts +1 -1
- package/lib/cjs/services/feed/index.js +1 -1
- package/lib/cjs/services/feed_object/index.d.ts +1 -1
- package/lib/cjs/services/feed_object/index.js +1 -1
- package/lib/cjs/services/incubator/index.d.ts +1 -1
- package/lib/cjs/services/incubator/index.js +1 -1
- package/lib/cjs/services/insight/index.d.ts +1 -1
- package/lib/cjs/services/insight/index.js +1 -1
- package/lib/cjs/services/legal_page/index.d.ts +1 -1
- package/lib/cjs/services/legal_page/index.js +1 -1
- package/lib/cjs/services/locality/index.d.ts +1 -1
- package/lib/cjs/services/locality/index.js +1 -1
- package/lib/cjs/services/loyalty/index.d.ts +1 -1
- package/lib/cjs/services/loyalty/index.js +1 -1
- package/lib/cjs/services/media/index.d.ts +1 -1
- package/lib/cjs/services/media/index.js +1 -1
- package/lib/cjs/services/moderation/index.d.ts +1 -1
- package/lib/cjs/services/moderation/index.js +1 -1
- package/lib/cjs/services/notification/index.d.ts +1 -1
- package/lib/cjs/services/notification/index.js +1 -1
- package/lib/cjs/services/preference/index.d.ts +1 -1
- package/lib/cjs/services/preference/index.js +1 -1
- package/lib/cjs/services/private_message/index.d.ts +1 -1
- package/lib/cjs/services/private_message/index.js +1 -1
- package/lib/cjs/services/promo/index.d.ts +1 -1
- package/lib/cjs/services/promo/index.js +1 -1
- package/lib/cjs/services/reactions/index.d.ts +1 -1
- package/lib/cjs/services/reactions/index.js +1 -1
- package/lib/cjs/services/score/index.d.ts +1 -1
- package/lib/cjs/services/score/index.js +1 -1
- package/lib/cjs/services/sso/index.d.ts +1 -1
- package/lib/cjs/services/sso/index.js +1 -1
- package/lib/cjs/services/suggestion/index.d.ts +1 -1
- package/lib/cjs/services/suggestion/index.js +1 -1
- package/lib/cjs/services/tag/index.d.ts +1 -1
- package/lib/cjs/services/tag/index.js +1 -1
- package/lib/cjs/services/user/index.d.ts +14 -14
- package/lib/cjs/services/user/index.js +14 -14
- package/lib/cjs/services/webhook/index.d.ts +1 -1
- package/lib/cjs/services/webhook/index.js +1 -1
- package/lib/cjs/utils/token.d.ts +1 -1
- package/lib/cjs/utils/token.js +1 -1
- package/lib/esm/services/account/index.d.ts +1 -1
- package/lib/esm/services/account/index.js +1 -1
- package/lib/esm/services/category/index.d.ts +2 -2
- package/lib/esm/services/category/index.js +2 -2
- package/lib/esm/services/comment/index.d.ts +1 -1
- package/lib/esm/services/comment/index.js +1 -1
- package/lib/esm/services/custom_adv/index.d.ts +1 -1
- package/lib/esm/services/custom_adv/index.js +1 -1
- package/lib/esm/services/custom_menu/index.d.ts +1 -1
- package/lib/esm/services/custom_menu/index.js +1 -1
- package/lib/esm/services/custom_page/index.d.ts +1 -1
- package/lib/esm/services/custom_page/index.js +1 -1
- package/lib/esm/services/data_portability/index.d.ts +1 -1
- package/lib/esm/services/data_portability/index.js +1 -1
- package/lib/esm/services/embed/index.d.ts +1 -1
- package/lib/esm/services/embed/index.js +1 -1
- package/lib/esm/services/feature/index.d.ts +1 -1
- package/lib/esm/services/feature/index.js +1 -1
- package/lib/esm/services/feed/index.d.ts +1 -1
- package/lib/esm/services/feed/index.js +1 -1
- package/lib/esm/services/feed_object/index.d.ts +1 -1
- package/lib/esm/services/feed_object/index.js +1 -1
- package/lib/esm/services/incubator/index.d.ts +1 -1
- package/lib/esm/services/incubator/index.js +1 -1
- package/lib/esm/services/insight/index.d.ts +1 -1
- package/lib/esm/services/insight/index.js +1 -1
- package/lib/esm/services/legal_page/index.d.ts +1 -1
- package/lib/esm/services/legal_page/index.js +1 -1
- package/lib/esm/services/locality/index.d.ts +1 -1
- package/lib/esm/services/locality/index.js +1 -1
- package/lib/esm/services/loyalty/index.d.ts +1 -1
- package/lib/esm/services/loyalty/index.js +1 -1
- package/lib/esm/services/media/index.d.ts +1 -1
- package/lib/esm/services/media/index.js +1 -1
- package/lib/esm/services/moderation/index.d.ts +1 -1
- package/lib/esm/services/moderation/index.js +1 -1
- package/lib/esm/services/notification/index.d.ts +1 -1
- package/lib/esm/services/notification/index.js +1 -1
- package/lib/esm/services/preference/index.d.ts +1 -1
- package/lib/esm/services/preference/index.js +1 -1
- package/lib/esm/services/private_message/index.d.ts +1 -1
- package/lib/esm/services/private_message/index.js +1 -1
- package/lib/esm/services/promo/index.d.ts +1 -1
- package/lib/esm/services/promo/index.js +1 -1
- package/lib/esm/services/reactions/index.d.ts +1 -1
- package/lib/esm/services/reactions/index.js +1 -1
- package/lib/esm/services/score/index.d.ts +1 -1
- package/lib/esm/services/score/index.js +1 -1
- package/lib/esm/services/sso/index.d.ts +1 -1
- package/lib/esm/services/sso/index.js +1 -1
- package/lib/esm/services/suggestion/index.d.ts +1 -1
- package/lib/esm/services/suggestion/index.js +1 -1
- package/lib/esm/services/tag/index.d.ts +1 -1
- package/lib/esm/services/tag/index.js +1 -1
- package/lib/esm/services/user/index.d.ts +14 -14
- package/lib/esm/services/user/index.js +14 -14
- package/lib/esm/services/webhook/index.d.ts +1 -1
- package/lib/esm/services/webhook/index.js +1 -1
- package/lib/esm/utils/token.d.ts +1 -1
- package/lib/esm/utils/token.js +1 -1
- package/package.json +2 -2
|
@@ -111,14 +111,14 @@ export declare class UserApiClient {
|
|
|
111
111
|
*/
|
|
112
112
|
static userUpdate(id: number | string, data?: SCUserType, config?: AxiosRequestConfig): Promise<SCUserType>;
|
|
113
113
|
/**
|
|
114
|
-
* This endpoint patches a specific user identified by
|
|
114
|
+
* This endpoint patches a specific user identified by ID.
|
|
115
115
|
* @param id
|
|
116
116
|
* @param data
|
|
117
117
|
* @param config
|
|
118
118
|
*/
|
|
119
119
|
static userPatch(id: number | string, data?: SCUserType, config?: AxiosRequestConfig): Promise<SCUserType>;
|
|
120
120
|
/**
|
|
121
|
-
* This endpoint deletes a specific user identified by
|
|
121
|
+
* This endpoint deletes a specific user identified by ID.
|
|
122
122
|
* @param id
|
|
123
123
|
* @param hard
|
|
124
124
|
* @param config
|
|
@@ -190,27 +190,27 @@ export declare class UserApiClient {
|
|
|
190
190
|
*/
|
|
191
191
|
static getUserFollowedCategories(id: number | string, mutual?: number, config?: AxiosRequestConfig): Promise<SCCategoryType[]>;
|
|
192
192
|
/**
|
|
193
|
-
* This endpoint retrieves the list of posts of the user identified
|
|
193
|
+
* This endpoint retrieves the list of posts of the user identified by ID.
|
|
194
194
|
* @param id
|
|
195
195
|
* @param config
|
|
196
196
|
*/
|
|
197
197
|
static getUserFeed(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCFeedUnitType>>;
|
|
198
198
|
/**
|
|
199
|
-
* This endpoint retrieves the list of followers of a specific user identified
|
|
199
|
+
* This endpoint retrieves the list of followers of a specific user identified by ID.
|
|
200
200
|
* @param id
|
|
201
201
|
* @param mutual
|
|
202
202
|
* @param config
|
|
203
203
|
*/
|
|
204
204
|
static getUserFollowers(id: number | string, params?: UserGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
205
205
|
/**
|
|
206
|
-
* This endpoint retrieves the list of following of a specific user identified
|
|
206
|
+
* This endpoint retrieves the list of following of a specific user identified by ID..
|
|
207
207
|
* @param id
|
|
208
208
|
* @param mutual
|
|
209
209
|
* @param config
|
|
210
210
|
*/
|
|
211
211
|
static getUserFollowings(id: number | string, params?: UserGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
212
212
|
/**
|
|
213
|
-
* This endpoint allows a user to follow another user identified
|
|
213
|
+
* This endpoint allows a user to follow another user identified by ID.
|
|
214
214
|
* @param id
|
|
215
215
|
* @param config
|
|
216
216
|
*/
|
|
@@ -253,25 +253,25 @@ export declare class UserApiClient {
|
|
|
253
253
|
*/
|
|
254
254
|
static getUserRequestConnectionsSent(params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserConnectionRequestType>>;
|
|
255
255
|
/**
|
|
256
|
-
* This endpoint accepts a request connection of the user identified
|
|
256
|
+
* This endpoint accepts a request connection of the user identified by ID.
|
|
257
257
|
* @param id
|
|
258
258
|
* @param config
|
|
259
259
|
*/
|
|
260
260
|
static userAcceptRequestConnection(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
261
261
|
/**
|
|
262
|
-
* This endpoint requests a connection to the user identified
|
|
262
|
+
* This endpoint requests a connection to the user identified by ID.
|
|
263
263
|
* @param id
|
|
264
264
|
* @param config
|
|
265
265
|
*/
|
|
266
266
|
static userRequestConnection(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
267
267
|
/**
|
|
268
|
-
* This endpoint removes connection with the user identified
|
|
268
|
+
* This endpoint removes connection with the user identified by ID.
|
|
269
269
|
* @param id
|
|
270
270
|
* @param config
|
|
271
271
|
*/
|
|
272
272
|
static userRemoveConnection(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
273
273
|
/**
|
|
274
|
-
* This endpoint cancels reject connection to a user identified
|
|
274
|
+
* This endpoint cancels reject connection to a user identified by ID.
|
|
275
275
|
* @param id
|
|
276
276
|
* @param config
|
|
277
277
|
*/
|
|
@@ -283,19 +283,19 @@ export declare class UserApiClient {
|
|
|
283
283
|
*/
|
|
284
284
|
static userCancelRequestConnection(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
285
285
|
/**
|
|
286
|
-
* This endpoint rejects a connection request sent from user identified
|
|
286
|
+
* This endpoint rejects a connection request sent from user identified by ID.
|
|
287
287
|
* @param id
|
|
288
288
|
* @param config
|
|
289
289
|
*/
|
|
290
290
|
static userRejectConnectionRequest(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
291
291
|
/**
|
|
292
|
-
* This endpoint marks seen a connection request of user identified
|
|
292
|
+
* This endpoint marks seen a connection request of user identified by ID. for the authenticated user.
|
|
293
293
|
* @param id
|
|
294
294
|
* @param config
|
|
295
295
|
*/
|
|
296
296
|
static userMarkSeenConnectionRequest(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
297
297
|
/**
|
|
298
|
-
* This endpoint shows/hides a user (and its posts) identified
|
|
298
|
+
* This endpoint shows/hides a user (and its posts) identified by ID. for the authenticated user.
|
|
299
299
|
* @param id
|
|
300
300
|
* @param config
|
|
301
301
|
*/
|
|
@@ -385,7 +385,7 @@ export declare class UserApiClient {
|
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
*
|
|
388
|
-
:::
|
|
388
|
+
:::tip User service can be used in the following way:
|
|
389
389
|
|
|
390
390
|
```jsx
|
|
391
391
|
1. Import the service from our library:
|
|
@@ -79,7 +79,7 @@ export class UserApiClient {
|
|
|
79
79
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserUpdate.url({ id }), method: Endpoints.UserUpdate.method, data: data }));
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* This endpoint patches a specific user identified by
|
|
82
|
+
* This endpoint patches a specific user identified by ID.
|
|
83
83
|
* @param id
|
|
84
84
|
* @param data
|
|
85
85
|
* @param config
|
|
@@ -88,7 +88,7 @@ export class UserApiClient {
|
|
|
88
88
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserPatch.url({ id }), method: Endpoints.UserPatch.method, data: data }));
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
* This endpoint deletes a specific user identified by
|
|
91
|
+
* This endpoint deletes a specific user identified by ID.
|
|
92
92
|
* @param id
|
|
93
93
|
* @param hard
|
|
94
94
|
* @param config
|
|
@@ -191,7 +191,7 @@ export class UserApiClient {
|
|
|
191
191
|
return apiRequest(Object.assign(Object.assign({}, config), { url: `${Endpoints.FollowedCategories.url({ id })}?${p.toString()}`, method: Endpoints.FollowedCategories.method }));
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
|
-
* This endpoint retrieves the list of posts of the user identified
|
|
194
|
+
* This endpoint retrieves the list of posts of the user identified by ID.
|
|
195
195
|
* @param id
|
|
196
196
|
* @param config
|
|
197
197
|
*/
|
|
@@ -199,7 +199,7 @@ export class UserApiClient {
|
|
|
199
199
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserFeed.url({ id }), method: Endpoints.UserFeed.method, params }));
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
|
-
* This endpoint retrieves the list of followers of a specific user identified
|
|
202
|
+
* This endpoint retrieves the list of followers of a specific user identified by ID.
|
|
203
203
|
* @param id
|
|
204
204
|
* @param mutual
|
|
205
205
|
* @param config
|
|
@@ -208,7 +208,7 @@ export class UserApiClient {
|
|
|
208
208
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserFollowers.url({ id }), method: Endpoints.UserFollowers.method, params }));
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
|
-
* This endpoint retrieves the list of following of a specific user identified
|
|
211
|
+
* This endpoint retrieves the list of following of a specific user identified by ID..
|
|
212
212
|
* @param id
|
|
213
213
|
* @param mutual
|
|
214
214
|
* @param config
|
|
@@ -217,7 +217,7 @@ export class UserApiClient {
|
|
|
217
217
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserFollowings.url({ id }), method: Endpoints.UserFollowings.method, params }));
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
220
|
-
* This endpoint allows a user to follow another user identified
|
|
220
|
+
* This endpoint allows a user to follow another user identified by ID.
|
|
221
221
|
* @param id
|
|
222
222
|
* @param config
|
|
223
223
|
*/
|
|
@@ -274,7 +274,7 @@ export class UserApiClient {
|
|
|
274
274
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserRequestConnectionsSent.url(), method: Endpoints.UserRequestConnectionsSent.method, params }));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
|
-
* This endpoint accepts a request connection of the user identified
|
|
277
|
+
* This endpoint accepts a request connection of the user identified by ID.
|
|
278
278
|
* @param id
|
|
279
279
|
* @param config
|
|
280
280
|
*/
|
|
@@ -282,7 +282,7 @@ export class UserApiClient {
|
|
|
282
282
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserAcceptRequestConnection.url({ id }), method: Endpoints.UserAcceptRequestConnection.method }));
|
|
283
283
|
}
|
|
284
284
|
/**
|
|
285
|
-
* This endpoint requests a connection to the user identified
|
|
285
|
+
* This endpoint requests a connection to the user identified by ID.
|
|
286
286
|
* @param id
|
|
287
287
|
* @param config
|
|
288
288
|
*/
|
|
@@ -290,7 +290,7 @@ export class UserApiClient {
|
|
|
290
290
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserRequestConnection.url({ id }), method: Endpoints.UserRequestConnection.method }));
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
|
-
* This endpoint removes connection with the user identified
|
|
293
|
+
* This endpoint removes connection with the user identified by ID.
|
|
294
294
|
* @param id
|
|
295
295
|
* @param config
|
|
296
296
|
*/
|
|
@@ -298,7 +298,7 @@ export class UserApiClient {
|
|
|
298
298
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserRemoveConnection.url({ id }), method: Endpoints.UserRemoveConnection.method }));
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
|
-
* This endpoint cancels reject connection to a user identified
|
|
301
|
+
* This endpoint cancels reject connection to a user identified by ID.
|
|
302
302
|
* @param id
|
|
303
303
|
* @param config
|
|
304
304
|
*/
|
|
@@ -314,7 +314,7 @@ export class UserApiClient {
|
|
|
314
314
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserCancelRequestConnection.url({ id }), method: Endpoints.UserCancelRequestConnection.method }));
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
|
-
* This endpoint rejects a connection request sent from user identified
|
|
317
|
+
* This endpoint rejects a connection request sent from user identified by ID.
|
|
318
318
|
* @param id
|
|
319
319
|
* @param config
|
|
320
320
|
*/
|
|
@@ -322,7 +322,7 @@ export class UserApiClient {
|
|
|
322
322
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserRejectConnectionRequest.url({ id }), method: Endpoints.UserRejectConnectionRequest.method }));
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
325
|
-
* This endpoint marks seen a connection request of user identified
|
|
325
|
+
* This endpoint marks seen a connection request of user identified by ID. for the authenticated user.
|
|
326
326
|
* @param id
|
|
327
327
|
* @param config
|
|
328
328
|
*/
|
|
@@ -330,7 +330,7 @@ export class UserApiClient {
|
|
|
330
330
|
return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserMarkSeenConnectionRequest.url({ id }), method: Endpoints.UserMarkSeenConnectionRequest.method }));
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
|
-
* This endpoint shows/hides a user (and its posts) identified
|
|
333
|
+
* This endpoint shows/hides a user (and its posts) identified by ID. for the authenticated user.
|
|
334
334
|
* @param id
|
|
335
335
|
* @param config
|
|
336
336
|
*/
|
|
@@ -449,7 +449,7 @@ export class UserApiClient {
|
|
|
449
449
|
}
|
|
450
450
|
/**
|
|
451
451
|
*
|
|
452
|
-
:::
|
|
452
|
+
:::tip User service can be used in the following way:
|
|
453
453
|
|
|
454
454
|
```jsx
|
|
455
455
|
1. Import the service from our library:
|
package/lib/esm/utils/token.d.ts
CHANGED
package/lib/esm/utils/token.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __awaiter } from "tslib";
|
|
|
2
2
|
import * as jose from 'jose';
|
|
3
3
|
/**
|
|
4
4
|
* Generate a JWT
|
|
5
|
-
:::
|
|
5
|
+
:::tip Context can be consumed as following:
|
|
6
6
|
```jsx
|
|
7
7
|
1. const token = await generateJWTToken(userId, secretKey, expirationTime);
|
|
8
8
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfcommunity/api-services",
|
|
3
|
-
"version": "0.4.1-alpha.
|
|
3
|
+
"version": "0.4.1-alpha.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"bugs": {
|
|
111
111
|
"url": "https://github.com/selfcommunity/community-js/issues"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "6572d63e375015bacd5f42a5c036caa29adc8b97"
|
|
114
114
|
}
|