@selfcommunity/api-services 0.7.0-alpha.3 → 0.7.0-alpha.5

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.
@@ -333,6 +333,10 @@ const Endpoints = {
333
333
  url: (0, utils_1.urlReplacer)('/api/v2/user/'),
334
334
  method: 'GET'
335
335
  },
336
+ UserMatchUsernames: {
337
+ url: (0, utils_1.urlReplacer)('/api/v2/user/match/?usernames=$(usernames)'),
338
+ method: 'GET'
339
+ },
336
340
  ListHiddenUsers: {
337
341
  url: (0, utils_1.urlReplacer)('/api/v2/user/hidden_users/'),
338
342
  method: 'GET'
@@ -57,6 +57,7 @@ export interface UserApiClientInterface {
57
57
  getUserLiveStream(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
58
58
  getOrderHistory(id: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder[]>;
59
59
  getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
60
+ matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
60
61
  }
61
62
  /**
62
63
  * Contains all the endpoints needed to manage users.
@@ -410,6 +411,12 @@ export declare class UserApiClient {
410
411
  * @param config
411
412
  */
412
413
  static getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
414
+ /**
415
+ * This endpoint retrieve detail of an order
416
+ * @param usernames
417
+ * @param config
418
+ */
419
+ static matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
413
420
  }
414
421
  /**
415
422
  *
@@ -503,4 +510,5 @@ export default class UserService {
503
510
  static getUserLiveStream(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
504
511
  static getOrderHistory(id: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
505
512
  static getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
513
+ static matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
506
514
  }
@@ -480,6 +480,14 @@ class UserApiClient {
480
480
  static getOrderDetail(id, order, params, config) {
481
481
  return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.GetOrderDetail.url({ id, order }), method: Endpoints_1.default.GetOrderDetail.method, params }));
482
482
  }
483
+ /**
484
+ * This endpoint retrieve detail of an order
485
+ * @param usernames
486
+ * @param config
487
+ */
488
+ static matchUsernames(usernames, config) {
489
+ return (0, apiRequest_1.apiRequest)(Object.assign(Object.assign({}, config), { url: Endpoints_1.default.UserMatchUsernames.url({ usernames }), method: Endpoints_1.default.UserMatchUsernames.method }));
490
+ }
483
491
  }
484
492
  exports.UserApiClient = UserApiClient;
485
493
  /**
@@ -790,5 +798,10 @@ class UserService {
790
798
  return UserApiClient.getOrderDetail(id, order, params, config);
791
799
  });
792
800
  }
801
+ static matchUsernames(usernames, config) {
802
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
803
+ return UserApiClient.matchUsernames(usernames, config);
804
+ });
805
+ }
793
806
  }
794
807
  exports.default = UserService;
@@ -11,15 +11,15 @@ export interface ContactUsRequestParams {
11
11
  */
12
12
  surname?: string;
13
13
  /**
14
- * Email field for the account
15
- */
14
+ * Email field for the account
15
+ */
16
16
  email?: string;
17
17
  /**
18
- * Contact request text
18
+ * Contact request message text
19
19
  */
20
- body?: string;
20
+ message?: string;
21
21
  /**
22
- * Any other properties available in user_metadata_definition
22
+ * Any other properties
23
23
  */
24
24
  [p: string]: any;
25
25
  }
@@ -27,6 +27,10 @@ export interface UserAutocompleteParams extends BaseSearchParams {
27
27
  * Ordering fields (eg?: ?ordering=username). Minus char is used for descending ordering, eg. -username
28
28
  */
29
29
  ordering?: string;
30
+ /**
31
+ * Filter using the user ids
32
+ */
33
+ exclude?: string;
30
34
  }
31
35
  /**
32
36
  * UserScoreParams interface.
@@ -331,6 +331,10 @@ const Endpoints = {
331
331
  url: urlReplacer('/api/v2/user/'),
332
332
  method: 'GET'
333
333
  },
334
+ UserMatchUsernames: {
335
+ url: urlReplacer('/api/v2/user/match/?usernames=$(usernames)'),
336
+ method: 'GET'
337
+ },
334
338
  ListHiddenUsers: {
335
339
  url: urlReplacer('/api/v2/user/hidden_users/'),
336
340
  method: 'GET'
@@ -57,6 +57,7 @@ export interface UserApiClientInterface {
57
57
  getUserLiveStream(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
58
58
  getOrderHistory(id: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder[]>;
59
59
  getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
60
+ matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
60
61
  }
61
62
  /**
62
63
  * Contains all the endpoints needed to manage users.
@@ -410,6 +411,12 @@ export declare class UserApiClient {
410
411
  * @param config
411
412
  */
412
413
  static getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
414
+ /**
415
+ * This endpoint retrieve detail of an order
416
+ * @param usernames
417
+ * @param config
418
+ */
419
+ static matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
413
420
  }
414
421
  /**
415
422
  *
@@ -503,4 +510,5 @@ export default class UserService {
503
510
  static getUserLiveStream(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCLiveStreamType>>;
504
511
  static getOrderHistory(id: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCPaymentOrder>>;
505
512
  static getOrderDetail(id: number, order: number, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaymentOrder>;
513
+ static matchUsernames(usernames: string, config?: AxiosRequestConfig): Promise<SCUserAutocompleteType[]>;
506
514
  }
@@ -477,6 +477,14 @@ export class UserApiClient {
477
477
  static getOrderDetail(id, order, params, config) {
478
478
  return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.GetOrderDetail.url({ id, order }), method: Endpoints.GetOrderDetail.method, params }));
479
479
  }
480
+ /**
481
+ * This endpoint retrieve detail of an order
482
+ * @param usernames
483
+ * @param config
484
+ */
485
+ static matchUsernames(usernames, config) {
486
+ return apiRequest(Object.assign(Object.assign({}, config), { url: Endpoints.UserMatchUsernames.url({ usernames }), method: Endpoints.UserMatchUsernames.method }));
487
+ }
480
488
  }
481
489
  /**
482
490
  *
@@ -786,4 +794,9 @@ export default class UserService {
786
794
  return UserApiClient.getOrderDetail(id, order, params, config);
787
795
  });
788
796
  }
797
+ static matchUsernames(usernames, config) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ return UserApiClient.matchUsernames(usernames, config);
800
+ });
801
+ }
789
802
  }
@@ -11,15 +11,15 @@ export interface ContactUsRequestParams {
11
11
  */
12
12
  surname?: string;
13
13
  /**
14
- * Email field for the account
15
- */
14
+ * Email field for the account
15
+ */
16
16
  email?: string;
17
17
  /**
18
- * Contact request text
18
+ * Contact request message text
19
19
  */
20
- body?: string;
20
+ message?: string;
21
21
  /**
22
- * Any other properties available in user_metadata_definition
22
+ * Any other properties
23
23
  */
24
24
  [p: string]: any;
25
25
  }
@@ -27,6 +27,10 @@ export interface UserAutocompleteParams extends BaseSearchParams {
27
27
  * Ordering fields (eg?: ?ordering=username). Minus char is used for descending ordering, eg. -username
28
28
  */
29
29
  ordering?: string;
30
+ /**
31
+ * Filter using the user ids
32
+ */
33
+ exclude?: string;
30
34
  }
31
35
  /**
32
36
  * UserScoreParams interface.