@reyaxyz/community-sdk 0.6.0 → 0.6.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/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/vote/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/vote/index.d.ts +2 -2
- package/dist/types/modules/vote/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/modules/vote/index.ts +9 -3
package/dist/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./client"), exports);
|
|
|
18
18
|
__exportStar(require("./modules/lge/services/get-account-lge-status/types"), exports);
|
|
19
19
|
__exportStar(require("./modules/lge/services/get-lge-boost-rate/types"), exports);
|
|
20
20
|
__exportStar(require("./modules/twitter/services/get-auth-url/types"), exports);
|
|
21
|
+
__exportStar(require("./modules/vote/types"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,sFAAoE;AACpE,kFAAgE;AAChE,gFAA8D","sourcesContent":["export * from './client';\nexport * from './modules/lge/services/get-account-lge-status/types';\nexport * from './modules/lge/services/get-lge-boost-rate/types';\nexport * from './modules/twitter/services/get-auth-url/types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,sFAAoE;AACpE,kFAAgE;AAChE,gFAA8D;AAC9D,uDAAqC","sourcesContent":["export * from './client';\nexport * from './modules/lge/services/get-account-lge-status/types';\nexport * from './modules/lge/services/get-lge-boost-rate/types';\nexport * from './modules/twitter/services/get-auth-url/types';\nexport * from './modules/vote/types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA6C;AAQ7C,uCAAkC;AAElC;IAAwC,8BAAU;IAAlD;;IAkBA,CAAC;IAjBC,QAAQ;IAEF,yBAAI,GAAV,UAAW,MAAkB;;;gBAC3B,sBAAO,IAAA,eAAI,EAAC,MAAM,CAAC,EAAC;;;KACrB;IAED,OAAO;IAED,mCAAc,GAApB,UAAqB,MAA4B;;;;gBACzC,GAAG,GAAG,oBAAa,MAAM,CAAC,EAAE,CAAE,CAAC;gBACrC,sBAAO,IAAI,CAAC,GAAG,CAAuB,GAAG,CAAC,EAAC;;;KAC5C;IAEK,kCAAa,GAAnB,UAAoB,MAA2B;;;;gBACvC,GAAG,GAAG,oBAAa,MAAM,CAAC,EAAE,mBAAS,MAAM,CAAC,OAAO,CAAE,CAAC;gBAC5D,sBAAO,IAAI,CAAC,GAAG,CAAsB,GAAG,CAAC,EAAC;;;KAC3C;IACH,iBAAC;AAAD,CAAC,AAlBD,CAAwC,mBAAU,GAkBjD","sourcesContent":["import { RestClient } from '@reyaxyz/common';\nimport {\n GetVoteDetailsParams,\n GetVoteDetailsResult,\n GetVoteStatusParams,\n GetVoteStatusResult,\n VoteParams,\n} from './types';\nimport { vote } from './services';\n\nexport default class VoteModule extends RestClient {\n // WRITE\n\n async vote(params: VoteParams) {\n return vote(params);\n }\n\n // READ\n\n async getVoteDetails(params: GetVoteDetailsParams) {\n const uri = `/api/vote/${params.id}`;\n return this.get<GetVoteDetailsResult>(uri);\n }\n\n async getVoteStatus(params: GetVoteStatusParams) {\n const uri = `/api/vote/${params.id}/user/${params.address}`;\n return this.get<GetVoteStatusResult>(uri);\n }\n}\n"]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export * from './client';
|
|
|
2
2
|
export * from './modules/lge/services/get-account-lge-status/types';
|
|
3
3
|
export * from './modules/lge/services/get-lge-boost-rate/types';
|
|
4
4
|
export * from './modules/twitter/services/get-auth-url/types';
|
|
5
|
+
export * from './modules/vote/types';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qDAAqD,CAAC;AACpE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sBAAsB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { RestClient } from '@reyaxyz/common';
|
|
|
2
2
|
import { GetVoteDetailsParams, GetVoteStatusParams, VoteParams } from './types';
|
|
3
3
|
export default class VoteModule extends RestClient {
|
|
4
4
|
vote(params: VoteParams): Promise<import("./types").VoteResult>;
|
|
5
|
-
getVoteDetails(params: GetVoteDetailsParams): Promise<
|
|
6
|
-
getVoteStatus(params: GetVoteStatusParams): Promise<
|
|
5
|
+
getVoteDetails(params: GetVoteDetailsParams): Promise<import("@reyaxyz/common").VoteDetailsEntity>;
|
|
6
|
+
getVoteStatus(params: GetVoteStatusParams): Promise<import("@reyaxyz/common").VoteStatusEntity>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/vote/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,oBAAoB,EAEpB,mBAAmB,EAEnB,UAAU,EACX,MAAM,SAAS,CAAC;AAGjB,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;IAG1C,IAAI,CAAC,MAAM,EAAE,UAAU;IAMvB,cAAc,CAAC,MAAM,EAAE,oBAAoB;IAK3C,aAAa,CAAC,MAAM,EAAE,mBAAmB;CAIhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/community-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
39
39
|
},
|
|
40
40
|
"packageManager": "pnpm@8.10.4",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "1f371c0c7a145a218982c2d2c04ca9b2e70a8b4f"
|
|
42
42
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { RestClient } from '@reyaxyz/common';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
GetVoteDetailsParams,
|
|
4
|
+
GetVoteDetailsResult,
|
|
5
|
+
GetVoteStatusParams,
|
|
6
|
+
GetVoteStatusResult,
|
|
7
|
+
VoteParams,
|
|
8
|
+
} from './types';
|
|
3
9
|
import { vote } from './services';
|
|
4
10
|
|
|
5
11
|
export default class VoteModule extends RestClient {
|
|
@@ -13,11 +19,11 @@ export default class VoteModule extends RestClient {
|
|
|
13
19
|
|
|
14
20
|
async getVoteDetails(params: GetVoteDetailsParams) {
|
|
15
21
|
const uri = `/api/vote/${params.id}`;
|
|
16
|
-
return this.get(uri);
|
|
22
|
+
return this.get<GetVoteDetailsResult>(uri);
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
async getVoteStatus(params: GetVoteStatusParams) {
|
|
20
26
|
const uri = `/api/vote/${params.id}/user/${params.address}`;
|
|
21
|
-
return this.get(uri);
|
|
27
|
+
return this.get<GetVoteStatusResult>(uri);
|
|
22
28
|
}
|
|
23
29
|
}
|