@selfcommunity/api-services 0.1.6 → 0.1.7
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/index.js +36 -0
- package/lib/cjs/services/category/index.js +168 -286
- package/lib/cjs/services/comment/index.js +107 -186
- package/lib/cjs/services/custom_adv/index.js +31 -51
- package/lib/cjs/services/custom_page/index.js +32 -52
- package/lib/cjs/services/data_portability/index.js +18 -43
- package/lib/cjs/services/embed/index.js +90 -151
- package/lib/cjs/services/feature/index.js +8 -16
- package/lib/cjs/services/feed/index.js +46 -81
- package/lib/cjs/services/feed_object/index.js +339 -505
- package/lib/cjs/services/incubator/index.js +64 -116
- package/lib/cjs/services/insight/index.js +51 -94
- package/lib/cjs/services/legal_page/index.js +60 -101
- package/lib/cjs/services/locality/index.js +14 -30
- package/lib/cjs/services/loyalty/index.js +92 -154
- package/lib/cjs/services/media/index.js +80 -122
- package/lib/cjs/services/moderation/index.js +65 -103
- package/lib/cjs/services/notification/index.js +67 -136
- package/lib/cjs/services/preference/index.js +25 -51
- package/lib/cjs/services/private_message/index.js +98 -177
- package/lib/cjs/services/score/index.js +22 -46
- package/lib/cjs/services/sso/index.js +17 -32
- package/lib/cjs/services/suggestion/index.js +23 -57
- package/lib/cjs/services/tag/index.js +72 -119
- package/lib/cjs/services/user/index.js +420 -767
- package/lib/cjs/services/webhook/index.js +4 -7
- package/lib/cjs/types/baseParams.js +3 -0
- package/lib/cjs/types/category.js +3 -0
- package/lib/cjs/types/comment.js +3 -0
- package/lib/cjs/types/customAdv.js +3 -0
- package/lib/cjs/types/customPage.js +3 -0
- package/lib/cjs/types/embed.js +3 -0
- package/lib/cjs/types/feed.js +3 -0
- package/lib/cjs/types/feedObject.js +3 -0
- package/lib/cjs/types/incubator.js +3 -0
- package/lib/cjs/types/index.js +91 -1
- package/lib/cjs/types/legalPage.js +3 -0
- package/lib/cjs/types/media.js +29 -0
- package/lib/cjs/types/moderation.js +3 -0
- package/lib/cjs/types/notification.js +3 -0
- package/lib/cjs/types/privateMessage.js +3 -0
- package/lib/cjs/types/prize.js +3 -0
- package/lib/cjs/types/sso.js +3 -0
- package/lib/cjs/types/tag.js +3 -0
- package/lib/cjs/types/user.js +3 -0
- package/lib/cjs/utils/apiRequest.js +2 -1
- package/lib/esm/index.js +36 -0
- package/lib/esm/services/category/index.js +168 -286
- package/lib/esm/services/comment/index.js +107 -186
- package/lib/esm/services/custom_adv/index.js +31 -51
- package/lib/esm/services/custom_page/index.js +32 -52
- package/lib/esm/services/data_portability/index.js +18 -43
- package/lib/esm/services/embed/index.js +90 -151
- package/lib/esm/services/feature/index.js +8 -16
- package/lib/esm/services/feed/index.js +46 -81
- package/lib/esm/services/feed_object/index.js +339 -505
- package/lib/esm/services/incubator/index.js +64 -116
- package/lib/esm/services/insight/index.js +51 -94
- package/lib/esm/services/legal_page/index.js +60 -101
- package/lib/esm/services/locality/index.js +14 -30
- package/lib/esm/services/loyalty/index.js +92 -154
- package/lib/esm/services/media/index.js +80 -122
- package/lib/esm/services/moderation/index.js +65 -103
- package/lib/esm/services/notification/index.js +67 -136
- package/lib/esm/services/preference/index.js +25 -51
- package/lib/esm/services/private_message/index.js +98 -177
- package/lib/esm/services/score/index.js +22 -46
- package/lib/esm/services/sso/index.js +17 -32
- package/lib/esm/services/suggestion/index.js +23 -57
- package/lib/esm/services/tag/index.js +72 -119
- package/lib/esm/services/user/index.js +420 -767
- package/lib/esm/services/webhook/index.js +4 -7
- package/lib/esm/types/baseParams.js +3 -0
- package/lib/esm/types/category.js +3 -0
- package/lib/esm/types/comment.js +3 -0
- package/lib/esm/types/customAdv.js +3 -0
- package/lib/esm/types/customPage.js +3 -0
- package/lib/esm/types/embed.js +3 -0
- package/lib/esm/types/feed.js +3 -0
- package/lib/esm/types/feedObject.js +3 -0
- package/lib/esm/types/incubator.js +3 -0
- package/lib/esm/types/index.js +91 -1
- package/lib/esm/types/legalPage.js +3 -0
- package/lib/esm/types/media.js +29 -0
- package/lib/esm/types/moderation.js +3 -0
- package/lib/esm/types/notification.js +3 -0
- package/lib/esm/types/privateMessage.js +3 -0
- package/lib/esm/types/prize.js +3 -0
- package/lib/esm/types/sso.js +3 -0
- package/lib/esm/types/tag.js +3 -0
- package/lib/esm/types/user.js +3 -0
- package/lib/esm/utils/apiRequest.js +2 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/services/category/index.d.ts +114 -42
- package/lib/types/services/category/index.d.ts.map +1 -1
- package/lib/types/services/comment/index.d.ts +74 -23
- package/lib/types/services/comment/index.d.ts.map +1 -1
- package/lib/types/services/custom_adv/index.d.ts +26 -9
- package/lib/types/services/custom_adv/index.d.ts.map +1 -1
- package/lib/types/services/custom_page/index.d.ts +26 -9
- package/lib/types/services/custom_page/index.d.ts.map +1 -1
- package/lib/types/services/data_portability/index.d.ts +19 -6
- package/lib/types/services/data_portability/index.d.ts.map +1 -1
- package/lib/types/services/embed/index.d.ts +62 -24
- package/lib/types/services/embed/index.d.ts.map +1 -1
- package/lib/types/services/feature/index.d.ts +11 -3
- package/lib/types/services/feature/index.d.ts.map +1 -1
- package/lib/types/services/feed/index.d.ts +37 -15
- package/lib/types/services/feed/index.d.ts.map +1 -1
- package/lib/types/services/feed_object/index.d.ts +229 -81
- package/lib/types/services/feed_object/index.d.ts.map +1 -1
- package/lib/types/services/incubator/index.d.ts +51 -18
- package/lib/types/services/incubator/index.d.ts.map +1 -1
- package/lib/types/services/insight/index.d.ts +44 -18
- package/lib/types/services/insight/index.d.ts.map +1 -1
- package/lib/types/services/legal_page/index.d.ts +46 -18
- package/lib/types/services/legal_page/index.d.ts.map +1 -1
- package/lib/types/services/locality/index.d.ts +17 -6
- package/lib/types/services/locality/index.d.ts.map +1 -1
- package/lib/types/services/loyalty/index.d.ts +70 -27
- package/lib/types/services/loyalty/index.d.ts.map +1 -1
- package/lib/types/services/media/index.d.ts +55 -18
- package/lib/types/services/media/index.d.ts.map +1 -1
- package/lib/types/services/moderation/index.d.ts +51 -18
- package/lib/types/services/moderation/index.d.ts.map +1 -1
- package/lib/types/services/notification/index.d.ts +63 -27
- package/lib/types/services/notification/index.d.ts.map +1 -1
- package/lib/types/services/preference/index.d.ts +28 -9
- package/lib/types/services/preference/index.d.ts.map +1 -1
- package/lib/types/services/private_message/index.d.ts +68 -24
- package/lib/types/services/private_message/index.d.ts.map +1 -1
- package/lib/types/services/score/index.d.ts +24 -9
- package/lib/types/services/score/index.d.ts.map +1 -1
- package/lib/types/services/sso/index.d.ts +18 -6
- package/lib/types/services/sso/index.d.ts.map +1 -1
- package/lib/types/services/suggestion/index.d.ts +29 -12
- package/lib/types/services/suggestion/index.d.ts.map +1 -1
- package/lib/types/services/tag/index.d.ts +57 -21
- package/lib/types/services/tag/index.d.ts.map +1 -1
- package/lib/types/services/user/index.d.ts +313 -114
- package/lib/types/services/user/index.d.ts.map +1 -1
- package/lib/types/services/webhook/index.d.ts +3 -4
- package/lib/types/services/webhook/index.d.ts.map +1 -1
- package/lib/types/tsconfig.build.tsbuildinfo +1 -1
- package/lib/types/types/baseParams.d.ts +23 -0
- package/lib/types/types/baseParams.d.ts.map +1 -0
- package/lib/types/types/category.d.ts +15 -0
- package/lib/types/types/category.d.ts.map +1 -0
- package/lib/types/types/comment.d.ts +51 -0
- package/lib/types/types/comment.d.ts.map +1 -0
- package/lib/types/types/customAdv.d.ts +19 -0
- package/lib/types/types/customAdv.d.ts.map +1 -0
- package/lib/types/types/customPage.d.ts +24 -0
- package/lib/types/types/customPage.d.ts.map +1 -0
- package/lib/types/types/embed.d.ts +26 -0
- package/lib/types/types/embed.d.ts.map +1 -0
- package/lib/types/types/feed.d.ts +11 -0
- package/lib/types/types/feed.d.ts.map +1 -0
- package/lib/types/types/feedObject.d.ts +56 -0
- package/lib/types/types/feedObject.d.ts.map +1 -0
- package/lib/types/types/incubator.d.ts +33 -0
- package/lib/types/types/incubator.d.ts.map +1 -0
- package/lib/types/types/index.d.ts +19 -1
- package/lib/types/types/index.d.ts.map +1 -1
- package/lib/types/types/legalPage.d.ts +19 -0
- package/lib/types/types/legalPage.d.ts.map +1 -0
- package/lib/types/types/media.d.ts +80 -0
- package/lib/types/types/media.d.ts.map +1 -0
- package/lib/types/types/moderation.d.ts +23 -0
- package/lib/types/types/moderation.d.ts.map +1 -0
- package/lib/types/types/notification.d.ts +31 -0
- package/lib/types/types/notification.d.ts.map +1 -0
- package/lib/types/types/privateMessage.d.ts +176 -0
- package/lib/types/types/privateMessage.d.ts.map +1 -0
- package/lib/types/types/prize.d.ts +47 -0
- package/lib/types/types/prize.d.ts.map +1 -0
- package/lib/types/types/sso.d.ts +12 -0
- package/lib/types/types/sso.d.ts.map +1 -0
- package/lib/types/types/tag.d.ts +39 -0
- package/lib/types/types/tag.d.ts.map +1 -0
- package/lib/types/types/user.d.ts +105 -0
- package/lib/types/types/user.d.ts.map +1 -0
- package/lib/types/utils/apiRequest.d.ts +1 -1
- package/lib/types/utils/apiRequest.d.ts.map +1 -1
- package/lib/umd/api-services.js +1 -1
- package/lib/umd/api-services.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/legal_page/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/legal_page/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEvE,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAEzE,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7F,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3D,gBAAgB,CA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CAAC,eAAe,CAAC;WAI1D,gBAAgB,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;WAI/F,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;WAIxF,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;WAI3D,WAAW,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;CAG1D"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
import { SCPaginatedResponse } from '../../types';
|
|
2
|
+
import { SCLocalityType } from '@selfcommunity/types';
|
|
1
3
|
export interface LocalityApiClientInterface {
|
|
2
|
-
getLocalities(): Promise<
|
|
3
|
-
searchLocalities(): Promise<
|
|
4
|
+
getLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
5
|
+
searchLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
4
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Contains all the endpoints needed to manage localities.
|
|
9
|
+
*/
|
|
5
10
|
export declare class LocalityApiClient {
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* This endpoint retrieves the list of available localities.
|
|
13
|
+
*/
|
|
14
|
+
static getLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
15
|
+
/**
|
|
16
|
+
* This endpoint searches localities
|
|
17
|
+
*/
|
|
18
|
+
static searchLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
8
19
|
}
|
|
9
20
|
export default class LocalityService {
|
|
10
|
-
static getLocalities(): Promise<
|
|
11
|
-
static searchLocalities(): Promise<
|
|
21
|
+
static getLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
22
|
+
static searchLocalities(): Promise<SCPaginatedResponse<SCLocalityType>>;
|
|
12
23
|
}
|
|
13
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/locality/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/locality/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,0BAA0B;IACzC,aAAa,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9D,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC,CAAC;CAClE;AACD;;GAEG;AAEH,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,aAAa,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAIpE;;OAEG;IACH,MAAM,CAAC,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;CAGxE;AAED,MAAM,CAAC,OAAO,OAAO,eAAe;WACrB,aAAa,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;WAG7D,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;CAG9E"}
|
|
@@ -1,34 +1,77 @@
|
|
|
1
|
+
import { SCPrizeType, SCPrizeUserStatusType, SCPrizeUserType } from '@selfcommunity/types';
|
|
2
|
+
import { SCPaginatedResponse, LoyaltyPrizeParams } from '../../types';
|
|
1
3
|
export interface LoyaltyApiClientInterface {
|
|
2
|
-
getPrizes(): Promise<
|
|
3
|
-
createPrize(): Promise<
|
|
4
|
-
getSpecificPrize(id: number): Promise<
|
|
5
|
-
updatePrize(id: number): Promise<
|
|
6
|
-
patchPrize(id: number): Promise<
|
|
7
|
-
|
|
8
|
-
createPrizeRequest(): Promise<
|
|
9
|
-
getSpecificPrizeRequest(id: number): Promise<
|
|
10
|
-
patchPrizeRequest(id: number): Promise<
|
|
4
|
+
getPrizes(): Promise<SCPaginatedResponse<SCPrizeType>>;
|
|
5
|
+
createPrize(data: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
6
|
+
getSpecificPrize(id: number): Promise<SCPrizeType>;
|
|
7
|
+
updatePrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
8
|
+
patchPrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
9
|
+
getAllPrizeRequests(): Promise<SCPaginatedResponse<SCPrizeUserType>>;
|
|
10
|
+
createPrizeRequest(prize: number): Promise<SCPrizeUserType>;
|
|
11
|
+
getSpecificPrizeRequest(id: number): Promise<SCPrizeUserType>;
|
|
12
|
+
patchPrizeRequest(id: number, status?: SCPrizeUserStatusType): Promise<SCPrizeUserType>;
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Contains all the endpoints needed to manage loyalty program.
|
|
16
|
+
*/
|
|
12
17
|
export declare class LoyaltyApiClient {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
static
|
|
18
|
+
/**
|
|
19
|
+
* This endpoint retrieves all prizes.
|
|
20
|
+
*/
|
|
21
|
+
static getPrizes(): Promise<SCPaginatedResponse<SCPrizeType>>;
|
|
22
|
+
/**
|
|
23
|
+
* This endpoint creates a prize.
|
|
24
|
+
* @param data
|
|
25
|
+
*/
|
|
26
|
+
static createPrize(data: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
27
|
+
/**
|
|
28
|
+
* This endpoint retrieves a specific prize
|
|
29
|
+
* @param id
|
|
30
|
+
*/
|
|
31
|
+
static getSpecificPrize(id: number): Promise<SCPrizeType>;
|
|
32
|
+
/**
|
|
33
|
+
* This endpoint updates a specific prize.
|
|
34
|
+
* @param id
|
|
35
|
+
* @param data
|
|
36
|
+
*/
|
|
37
|
+
static updatePrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
38
|
+
/**
|
|
39
|
+
* This endpoint patches a specific prize.
|
|
40
|
+
* @param id
|
|
41
|
+
* @param data
|
|
42
|
+
*/
|
|
43
|
+
static patchPrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
44
|
+
/**
|
|
45
|
+
* This endpoint retrieves all requests of loyalty prizes.
|
|
46
|
+
*/
|
|
47
|
+
static getAllPrizeRequests(): Promise<SCPaginatedResponse<SCPrizeUserType>>;
|
|
48
|
+
/**
|
|
49
|
+
* This endpoint creates a request for a loyalty prize
|
|
50
|
+
* @param prize
|
|
51
|
+
*/
|
|
52
|
+
static createPrizeRequest(prize: number): Promise<SCPrizeUserType>;
|
|
53
|
+
/**
|
|
54
|
+
* This endpoint retrieves a specific request for a loyalty prize.
|
|
55
|
+
* @param id
|
|
56
|
+
*/
|
|
57
|
+
static getSpecificPrizeRequest(id: number): Promise<SCPrizeUserType>;
|
|
58
|
+
/**
|
|
59
|
+
* This endpoint patches a specific request for a loyalty prize.
|
|
60
|
+
* You can use this endpoint to to change status in an admin list/table interface.
|
|
61
|
+
* @param id
|
|
62
|
+
* @param status
|
|
63
|
+
*/
|
|
64
|
+
static patchPrizeRequest(id: number, status?: SCPrizeUserStatusType): Promise<SCPrizeUserType>;
|
|
22
65
|
}
|
|
23
66
|
export default class LoyaltyService {
|
|
24
|
-
static getPrizes(): Promise<
|
|
25
|
-
static createPrize(): Promise<
|
|
26
|
-
static getSpecificPrize(id: number): Promise<
|
|
27
|
-
static updatePrize(id: number): Promise<
|
|
28
|
-
static patchPrize(id: number): Promise<
|
|
29
|
-
static
|
|
30
|
-
static createPrizeRequest(): Promise<
|
|
31
|
-
static getSpecificPrizeRequest(id: number): Promise<
|
|
32
|
-
static patchPrizeRequest(id: number): Promise<
|
|
67
|
+
static getPrizes(): Promise<SCPaginatedResponse<SCPrizeType>>;
|
|
68
|
+
static createPrize(data: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
69
|
+
static getSpecificPrize(id: number): Promise<SCPrizeType>;
|
|
70
|
+
static updatePrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
71
|
+
static patchPrize(id: number, data?: LoyaltyPrizeParams): Promise<SCPrizeType>;
|
|
72
|
+
static getAllPrizeRequests(): Promise<SCPaginatedResponse<SCPrizeUserType>>;
|
|
73
|
+
static createPrizeRequest(prize: number): Promise<SCPrizeUserType>;
|
|
74
|
+
static getSpecificPrizeRequest(id: number): Promise<SCPrizeUserType>;
|
|
75
|
+
static patchPrizeRequest(id: number, status?: SCPrizeUserStatusType): Promise<SCPrizeUserType>;
|
|
33
76
|
}
|
|
34
77
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/loyalty/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/loyalty/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAE,qBAAqB,EAAE,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAEpE,MAAM,WAAW,yBAAyB;IACxC,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;IACvD,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5D,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAA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BAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIpE;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;CAG/F;AAED,MAAM,CAAC,OAAO,OAAO,cAAc;WACpB,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;WAItD,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;WAI3D,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;WAIlD,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;WAIxE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;WAIvE,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;WAIpE,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;WAI3D,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;WAG7D,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;CAGrG"}
|
|
@@ -1,28 +1,65 @@
|
|
|
1
|
+
import { SCChunkMediaType, SCMediaType } from '@selfcommunity/types';
|
|
2
|
+
import { ChunkUploadCompleteParams, ChunkUploadParams, MediaCreateParams } from '../../types';
|
|
1
3
|
export interface MediaApiClientInterface {
|
|
2
|
-
chunkUploadMedia(): Promise<
|
|
3
|
-
chunkUploadMediaComplete(): Promise<
|
|
4
|
-
createMedia(): Promise<
|
|
5
|
-
clickMedia(id: number): Promise<any>;
|
|
6
|
-
getSpecificMedia(id: number): Promise<
|
|
7
|
-
updateMedia(id: number): Promise<
|
|
4
|
+
chunkUploadMedia(data: ChunkUploadParams): Promise<SCChunkMediaType>;
|
|
5
|
+
chunkUploadMediaComplete(data: ChunkUploadCompleteParams): Promise<SCMediaType>;
|
|
6
|
+
createMedia(data: MediaCreateParams): Promise<SCMediaType>;
|
|
7
|
+
clickMedia(id: number, ip?: string): Promise<any>;
|
|
8
|
+
getSpecificMedia(id: number): Promise<SCMediaType>;
|
|
9
|
+
updateMedia(id: number, image: string): Promise<SCMediaType>;
|
|
8
10
|
deleteMedia(id: number): Promise<any>;
|
|
9
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Contains all the endpoints needed to manage medias.
|
|
14
|
+
*/
|
|
10
15
|
export declare class MediaApiClient {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* This endpoint performs the chunk upload of a media with type image or document.
|
|
18
|
+
* The client must split the file into chunks and send to the server in series. After all the chunks have been uploaded the client must call the Chunk Upload Complete endpoint with the given upload_id parameter to finalize the upload and retrieve the Media.
|
|
19
|
+
* To perform chunk upload the request must contain Content-Range header with the information about the chunk.
|
|
20
|
+
* @param data
|
|
21
|
+
*/
|
|
22
|
+
static chunkUploadMedia(data: ChunkUploadParams): Promise<SCChunkMediaType>;
|
|
23
|
+
/**
|
|
24
|
+
* This endpoint completes the chunk upload and create the media.
|
|
25
|
+
* @param data
|
|
26
|
+
*/
|
|
27
|
+
static chunkUploadMediaComplete(data: ChunkUploadCompleteParams): Promise<SCMediaType>;
|
|
28
|
+
/**
|
|
29
|
+
* This endpoint creates a media.
|
|
30
|
+
* @param data
|
|
31
|
+
*/
|
|
32
|
+
static createMedia(data: MediaCreateParams): Promise<SCMediaType>;
|
|
33
|
+
/**
|
|
34
|
+
* This endpoint saves a click on a specific media using ID.
|
|
35
|
+
* @param id
|
|
36
|
+
* @param ip
|
|
37
|
+
*/
|
|
38
|
+
static clickMedia(id: number, ip?: string): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* This endpoint retrieves a specific media using ID.
|
|
41
|
+
* @param id
|
|
42
|
+
*/
|
|
43
|
+
static getSpecificMedia(id: number): Promise<SCMediaType>;
|
|
44
|
+
/**
|
|
45
|
+
* This endpoint updates a media.
|
|
46
|
+
* @param id
|
|
47
|
+
* @param image
|
|
48
|
+
*/
|
|
49
|
+
static updateMedia(id: number, image: string): Promise<SCMediaType>;
|
|
50
|
+
/**
|
|
51
|
+
* This endpoint deletes a media.
|
|
52
|
+
* @param id
|
|
53
|
+
*/
|
|
17
54
|
static deleteMedia(id: number): Promise<any>;
|
|
18
55
|
}
|
|
19
56
|
export default class MediaService {
|
|
20
|
-
static chunkUploadMedia(): Promise<
|
|
21
|
-
static chunkUploadMediaComplete(): Promise<
|
|
22
|
-
static createMedia(): Promise<
|
|
23
|
-
static clickMedia(id: number): Promise<any>;
|
|
24
|
-
static getSpecificMedia(id: number): Promise<
|
|
25
|
-
static updateMedia(id: number): Promise<
|
|
57
|
+
static chunkUploadMedia(data: ChunkUploadParams): Promise<SCChunkMediaType>;
|
|
58
|
+
static chunkUploadMediaComplete(data: ChunkUploadCompleteParams): Promise<SCMediaType>;
|
|
59
|
+
static createMedia(data: MediaCreateParams): Promise<SCMediaType>;
|
|
60
|
+
static clickMedia(id: number, ip?: string): Promise<any>;
|
|
61
|
+
static getSpecificMedia(id: number): Promise<SCMediaType>;
|
|
62
|
+
static updateMedia(id: number, image: string): Promise<SCMediaType>;
|
|
26
63
|
static deleteMedia(id: number): Promise<any>;
|
|
27
64
|
}
|
|
28
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/media/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","s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,CAAC;IAIxD;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIzD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAInE;;;OAGG;IACH,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAG7C;AAED,MAAM,CAAC,OAAO,OAAO,YAAY;WAClB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;WAIpE,wBAAwB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,WAAW,CAAC;WAI/E,WAAW,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC;WAI1D,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;WAIjD,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;WAIlD,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;WAI5D,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAGnD"}
|
|
@@ -1,25 +1,58 @@
|
|
|
1
|
+
import { SCUserModerationType, SCUserStatus, SCFlaggedContributionType, SCFlagType, SCFlagTypeEnum, SCContributionType } from '@selfcommunity/types';
|
|
2
|
+
import { ModerateContributionParams, SCPaginatedResponse } from '../../types';
|
|
3
|
+
import { SCContributionStatus } from '@selfcommunity/types';
|
|
1
4
|
export interface ModerationApiClientInterface {
|
|
2
|
-
getUsersForModeration(): Promise<
|
|
3
|
-
moderateASpecificUser(id: number): Promise<any>;
|
|
4
|
-
getAllFlaggedContributions(): Promise<
|
|
5
|
-
|
|
6
|
-
moderateAContribution(id: number): Promise<any>;
|
|
7
|
-
getContributionModerationStatus(id: number, contribution_type:
|
|
5
|
+
getUsersForModeration(): Promise<SCPaginatedResponse<SCUserModerationType>>;
|
|
6
|
+
moderateASpecificUser(id: number, status: SCUserStatus): Promise<any>;
|
|
7
|
+
getAllFlaggedContributions(): Promise<SCPaginatedResponse<SCFlaggedContributionType>>;
|
|
8
|
+
getAllFlagsForSpecificContribution(id: number, contribution_type: SCContributionType, flag_type?: SCFlagTypeEnum): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
9
|
+
moderateAContribution(id: number, data: ModerateContributionParams): Promise<any>;
|
|
10
|
+
getContributionModerationStatus(id: number, contribution_type: SCContributionType): Promise<SCContributionStatus>;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Contains all the endpoints needed to manage moderation.
|
|
14
|
+
*/
|
|
9
15
|
export declare class ModerationApiClient {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* This endpoint retrieves all users for moderation purpose.
|
|
18
|
+
*/
|
|
19
|
+
static getUsersForModeration(): Promise<SCPaginatedResponse<SCUserModerationType>>;
|
|
20
|
+
/**
|
|
21
|
+
* This endpoint performs users moderation.
|
|
22
|
+
* @param id
|
|
23
|
+
* @param status
|
|
24
|
+
*/
|
|
25
|
+
static moderateASpecificUser(id: number, status: SCUserStatus): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* This endpoint retrieves all flagged contributions.
|
|
28
|
+
*/
|
|
29
|
+
static getAllFlaggedContributions(): Promise<SCPaginatedResponse<SCFlaggedContributionType>>;
|
|
30
|
+
/**
|
|
31
|
+
* This endpoint retrieves all flags for a specific contribution.
|
|
32
|
+
* @param id
|
|
33
|
+
* @param contribution_type
|
|
34
|
+
* @param flag_type
|
|
35
|
+
*/
|
|
36
|
+
static getAllFlagsForSpecificContribution(id: number, contribution_type: SCContributionType, flag_type?: SCFlagTypeEnum): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
37
|
+
/**
|
|
38
|
+
* This endpoint provides actions for flagged contributions moderation.
|
|
39
|
+
* @param id
|
|
40
|
+
* @param data
|
|
41
|
+
*/
|
|
42
|
+
static moderateAContribution(id: number, data: ModerateContributionParams): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* This endpoint retrieves moderation status for a specific contribution.
|
|
45
|
+
* @param id
|
|
46
|
+
* @param contribution_type
|
|
47
|
+
*/
|
|
48
|
+
static getContributionModerationStatus(id: number, contribution_type: SCContributionType): Promise<SCContributionStatus>;
|
|
16
49
|
}
|
|
17
50
|
export default class ModerationService {
|
|
18
|
-
static getUsersForModeration(): Promise<
|
|
19
|
-
static moderateASpecificUser(id: number): Promise<any>;
|
|
20
|
-
static getAllFlaggedContributions(): Promise<
|
|
21
|
-
static
|
|
22
|
-
static moderateAContribution(id: number): Promise<any>;
|
|
23
|
-
static getContributionModerationStatus(id: number, contribution_type:
|
|
51
|
+
static getUsersForModeration(): Promise<SCPaginatedResponse<SCUserModerationType>>;
|
|
52
|
+
static moderateASpecificUser(id: number, status: SCUserStatus): Promise<any>;
|
|
53
|
+
static getAllFlaggedContributions(): Promise<SCPaginatedResponse<SCFlaggedContributionType>>;
|
|
54
|
+
static getAllFlagsForSpecificContribution(id: number, contribution_type: SCContributionType, flag_type?: SCFlagTypeEnum): Promise<SCPaginatedResponse<SCFlagType>>;
|
|
55
|
+
static moderateAContribution(id: number, data: ModerateContributionParams): Promise<any>;
|
|
56
|
+
static getContributionModerationStatus(id: number, contribution_type: SCContributionType): Promise<SCContributionStatus>;
|
|
24
57
|
}
|
|
25
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/moderation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"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ationParams, SCPaginatedResponse } from '../../types';
|
|
1
3
|
export interface NotificationApiClientInterface {
|
|
2
|
-
listUserNotification(): Promise<
|
|
3
|
-
markReadNotification(): Promise<any>;
|
|
4
|
-
getUnseenNotification(): Promise<
|
|
5
|
-
createCustomNotification(): Promise<any>;
|
|
6
|
-
listBroadcastMessages(): Promise<
|
|
7
|
-
listBroadcastMessagesUnseenCount(): Promise<
|
|
8
|
-
listBroadcastMessagesUndisposedCount(): Promise<
|
|
9
|
-
markReadBroadcastMessages(): Promise<any>;
|
|
10
|
-
disposeBroadcastMessages(): Promise<any>;
|
|
4
|
+
listUserNotification(): Promise<SCNotificationAggregatedType>;
|
|
5
|
+
markReadNotification(sids: string[]): Promise<any>;
|
|
6
|
+
getUnseenNotification(): Promise<SCNotificationUnseenCountType>;
|
|
7
|
+
createCustomNotification(data: CustomNotificationParams): Promise<any>;
|
|
8
|
+
listBroadcastMessages(): Promise<SCPaginatedResponse<SCBroadcastMessageType>>;
|
|
9
|
+
listBroadcastMessagesUnseenCount(): Promise<SCNotificationUnseenCountType>;
|
|
10
|
+
listBroadcastMessagesUndisposedCount(): Promise<SCNotificationUnseenCountType>;
|
|
11
|
+
markReadBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
12
|
+
disposeBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
11
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Contains all the endpoints needed to manage notifications.
|
|
16
|
+
*/
|
|
12
17
|
export declare class NotificationApiClient {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
static
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
static
|
|
18
|
+
/**
|
|
19
|
+
* List all user notifications (in aggregate form) related to the community.
|
|
20
|
+
*/
|
|
21
|
+
static listUserNotification(): Promise<SCNotificationAggregatedType>;
|
|
22
|
+
/**
|
|
23
|
+
* This endpoint marks as read a list of notifications identified by serialization_ids (sids).
|
|
24
|
+
* @param sids
|
|
25
|
+
*/
|
|
26
|
+
static markReadNotification(sids: string[]): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* This endpoint retrieves the number of unseen/unread notifications.
|
|
29
|
+
*/
|
|
30
|
+
static getUnseenNotification(): Promise<SCNotificationUnseenCountType>;
|
|
31
|
+
/**
|
|
32
|
+
* This endpoint generates a custom notification starting from the user. The recipients of the notification can be the user's friends/followers or the user himself (based on recipients_type value). Es. connections -> "user" added an item to the wishlist.
|
|
33
|
+
* @param data
|
|
34
|
+
*/
|
|
35
|
+
static createCustomNotification(data: CustomNotificationParams): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* This endpoint lists all broadcast messages. Broadcast Message is a feature which allows a specific user to send messages and announcements to a larger group of users at once.
|
|
38
|
+
*/
|
|
39
|
+
static listBroadcastMessages(): Promise<SCPaginatedResponse<SCBroadcastMessageType>>;
|
|
40
|
+
/**
|
|
41
|
+
* This endpoint retrieves the total number of broadcast messages not yet seen by the user.
|
|
42
|
+
*/
|
|
43
|
+
static listBroadcastMessagesUnseenCount(): Promise<SCNotificationUnseenCountType>;
|
|
44
|
+
/**
|
|
45
|
+
* This endpoint retrieves the total number of broadcast messages not yet disposed by the user.
|
|
46
|
+
*/
|
|
47
|
+
static listBroadcastMessagesUndisposedCount(): Promise<SCNotificationUnseenCountType>;
|
|
48
|
+
/**
|
|
49
|
+
* This endpoint marks as viewed/read a broadcast message for a user.
|
|
50
|
+
* @param banner_ids
|
|
51
|
+
*/
|
|
52
|
+
static markReadBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* This endpoint disposes a broadcast message for a user.
|
|
55
|
+
* @param banner_ids
|
|
56
|
+
*/
|
|
57
|
+
static disposeBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
22
58
|
}
|
|
23
59
|
export default class NotificationService {
|
|
24
|
-
static listUserNotification(): Promise<
|
|
25
|
-
static markReadNotification(): Promise<any>;
|
|
26
|
-
static getUnseenNotification(): Promise<
|
|
27
|
-
static createCustomNotification(): Promise<any>;
|
|
28
|
-
static listBroadcastMessages(): Promise<
|
|
29
|
-
static listBroadcastMessagesUnseenCount(): Promise<
|
|
30
|
-
static listBroadcastMessagesUndisposedCount(): Promise<
|
|
31
|
-
static disposeBroadcastMessages(): Promise<any>;
|
|
32
|
-
static markReadBroadcastMessages(): Promise<any>;
|
|
60
|
+
static listUserNotification(): Promise<SCNotificationAggregatedType>;
|
|
61
|
+
static markReadNotification(sids: string[]): Promise<any>;
|
|
62
|
+
static getUnseenNotification(): Promise<SCNotificationUnseenCountType>;
|
|
63
|
+
static createCustomNotification(data: CustomNotificationParams): Promise<any>;
|
|
64
|
+
static listBroadcastMessages(): Promise<SCPaginatedResponse<SCBroadcastMessageType>>;
|
|
65
|
+
static listBroadcastMessagesUnseenCount(): Promise<SCNotificationUnseenCountType>;
|
|
66
|
+
static listBroadcastMessagesUndisposedCount(): Promise<SCNotificationUnseenCountType>;
|
|
67
|
+
static disposeBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
68
|
+
static markReadBroadcastMessages(banner_ids: number[]): Promise<any>;
|
|
33
69
|
}
|
|
34
70
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/notification/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/notification/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,sBAAsB,EAAE,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAC,wBAAwB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,8BAA8B;IAC7C,oBAAoB,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAC9D,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GA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AAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAGpE;AAED,MAAM,CAAC,OAAO,OAAO,mBAAmB;WACzB,oBAAoB,IAAI,OAAO,CAAC,4BAA4B,CAAC;WAG7D,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;WAGlD,qBAAqB,IAAI,OAAO,CAAC,6BAA6B,CAAC;WAG/D,wBAAwB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC;WAGtE,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;WAG7E,gCAAgC,IAAI,OAAO,CAAC,6BAA6B,CAAC;WAG1E,oCAAoC,IAAI,OAAO,CAAC,6BAA6B,CAAC;WAG9E,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;WAG5D,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAG3E"}
|
|
@@ -1,16 +1,35 @@
|
|
|
1
|
+
import { SCPreferenceType } from '@selfcommunity/types/src/types';
|
|
2
|
+
import { SCPaginatedResponse } from '../../types';
|
|
1
3
|
export interface PreferenceApiClientInterface {
|
|
2
|
-
getAllPreferences(): Promise<
|
|
3
|
-
searchPreferences(search?: string, section?: string, keys?: string, ordering?: string): Promise<
|
|
4
|
-
getSpecificPreference(id: number): Promise<
|
|
4
|
+
getAllPreferences(): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
5
|
+
searchPreferences(search?: string, section?: string, keys?: string, ordering?: string): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
6
|
+
getSpecificPreference(id: number): Promise<SCPreferenceType>;
|
|
5
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Contains all the endpoints needed to manage dynamic preferences.
|
|
10
|
+
*/
|
|
6
11
|
export declare class PreferenceApiClient {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* This endpoint retrieves all available dynamic preferences.
|
|
14
|
+
*/
|
|
15
|
+
static getAllPreferences(): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
16
|
+
/**
|
|
17
|
+
* This endpoint searches dynamic preferences.
|
|
18
|
+
* @param search
|
|
19
|
+
* @param section
|
|
20
|
+
* @param keys
|
|
21
|
+
* @param ordering
|
|
22
|
+
*/
|
|
23
|
+
static searchPreferences(search?: string, section?: string, keys?: string, ordering?: string): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
24
|
+
/**
|
|
25
|
+
* This endpoint retrieves a specific dynamic preference.
|
|
26
|
+
* @param id
|
|
27
|
+
*/
|
|
28
|
+
static getSpecificPreference(id: number): Promise<SCPreferenceType>;
|
|
10
29
|
}
|
|
11
30
|
export default class PreferenceService {
|
|
12
|
-
static getAllPreferences(): Promise<
|
|
13
|
-
static searchPreferences(search?: string, section?: string, keys?: string, ordering?: string): Promise<
|
|
14
|
-
static getSpecificPreference(id: number): Promise<
|
|
31
|
+
static getAllPreferences(): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
32
|
+
static searchPreferences(search?: string, section?: string, keys?: string, ordering?: string): Promise<SCPaginatedResponse<SCPreferenceType[]>>;
|
|
33
|
+
static getSpecificPreference(id: number): Promise<SCPreferenceType>;
|
|
15
34
|
}
|
|
16
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/preference/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/preference/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC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