@reyaxyz/api-sdk 0.122.0 → 0.123.0
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/README.md +1 -1
- package/dist/clients/modules/owner/index.js +27 -0
- package/dist/clients/modules/owner/index.js.map +1 -1
- package/dist/clients/modules/owner/types.js.map +1 -1
- package/dist/types/clients/modules/owner/index.d.ts +4 -1
- package/dist/types/clients/modules/owner/index.d.ts.map +1 -1
- package/dist/types/clients/modules/owner/types.d.ts +20 -0
- package/dist/types/clients/modules/owner/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/clients/modules/owner/index.ts +31 -1
- package/src/clients/modules/owner/types.ts +22 -0
package/README.md
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
|
|
7
7
|
| Statements | Branches | Functions | Lines |
|
|
8
8
|
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
|
|
9
|
-
|  |  |  |  |
|
|
10
10
|
|
|
@@ -66,6 +66,33 @@ var OwnerClient = /** @class */ (function (_super) {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
+
OwnerClient.prototype.getOwnerConfigurationSettings = function (params) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
+
var uri;
|
|
72
|
+
return __generator(this, function (_a) {
|
|
73
|
+
uri = "/api/owner/".concat(params.ownerAddress, "/configuration/settings");
|
|
74
|
+
return [2 /*return*/, this.get(uri)];
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
OwnerClient.prototype.addFavoriteMarket = function (params) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
+
var uri;
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
uri = "/api/owner/".concat(params.ownerAddress, "/configuration/favorite-market");
|
|
83
|
+
return [2 /*return*/, this.post(uri, undefined, params)];
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
OwnerClient.prototype.removeFavoriteMarket = function (params) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
89
|
+
var uri;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
uri = "/api/owner/".concat(params.ownerAddress, "/configuration/favorite-market");
|
|
92
|
+
return [2 /*return*/, this.delete(uri, undefined, params)];
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
};
|
|
69
96
|
return OwnerClient;
|
|
70
97
|
}(common_1.RestClient));
|
|
71
98
|
exports.default = OwnerClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,0CAA6C;AAE7C;IAAyC,+BAAU;IAAnD;;IA4BA,CAAC;IA3BO,sCAAgB,GAAtB,UACE,MAA8B;;;;gBAExB,GAAG,GAAG,qBAAc,MAAM,CAAC,YAAY,cAAW,CAAC;gBACzD,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,mDAA6B,GAAnC,UACE,MAA2C;;;;gBAErC,GAAG,GAAG,qBAAc,MAAM,CAAC,YAAY,4BAAyB,CAAC;gBACvE,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,uCAAiB,GAAvB,UACE,MAA+B;;;;gBAEzB,GAAG,GAAG,qBAAc,MAAM,CAAC,YAAY,mCAAgC,CAAC;gBAC9E,sBAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,EAAC;;;KAC1C;IAEK,0CAAoB,GAA1B,UACE,MAAkC;;;;gBAE5B,GAAG,GAAG,qBAAc,MAAM,CAAC,YAAY,mCAAgC,CAAC;gBAC9E,sBAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,EAAC;;;KAC5C;IACH,kBAAC;AAAD,CAAC,AA5BD,CAAyC,mBAAU,GA4BlD","sourcesContent":["import {\n AddFavoriteMarketParams,\n AddFavoriteMarketResult,\n GetOwnerConfigurationSettingsParams,\n GetOwnerConfigurationSettingsResult,\n GetOwnerMetadataParams,\n GetOwnerMetadataResult,\n RemoveFavoriteMarketParams,\n RemoveFavoriteMarketResult,\n} from './types';\nimport { RestClient } from '@reyaxyz/common';\n\nexport default class OwnerClient extends RestClient {\n async getOwnerMetadata(\n params: GetOwnerMetadataParams,\n ): Promise<GetOwnerMetadataResult> {\n const uri = `/api/owner/${params.ownerAddress}/metadata`;\n return this.get(uri);\n }\n\n async getOwnerConfigurationSettings(\n params: GetOwnerConfigurationSettingsParams,\n ): Promise<GetOwnerConfigurationSettingsResult> {\n const uri = `/api/owner/${params.ownerAddress}/configuration/settings`;\n return this.get(uri);\n }\n\n async addFavoriteMarket(\n params: AddFavoriteMarketParams,\n ): Promise<AddFavoriteMarketResult> {\n const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;\n return this.post(uri, undefined, params);\n }\n\n async removeFavoriteMarket(\n params: RemoveFavoriteMarketParams,\n ): Promise<RemoveFavoriteMarketResult> {\n const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;\n return this.delete(uri, undefined, params);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/owner/types.ts"],"names":[],"mappings":"","sourcesContent":["import { OwnerMetadataEntity } from '@reyaxyz/common';\n\nexport type GetOwnerMetadataParams = {\n ownerAddress: string;\n};\n\nexport type GetOwnerMetadataResult = OwnerMetadataEntity;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/owner/types.ts"],"names":[],"mappings":"","sourcesContent":["import { OwnerMetadataEntity } from '@reyaxyz/common';\n\nexport type GetOwnerMetadataParams = {\n ownerAddress: string;\n};\n\nexport type GetOwnerConfigurationSettingsParams = {\n ownerAddress: string;\n};\n\nexport type GetOwnerConfigurationSettingsResult = {\n favoriteMarkets: number[];\n};\n\nexport type AddFavoriteMarketParams = {\n ownerAddress: string;\n marketId: number;\n};\n\nexport type AddFavoriteMarketResult = { success: boolean };\n\nexport type RemoveFavoriteMarketParams = {\n ownerAddress: string;\n marketId: number;\n};\n\nexport type RemoveFavoriteMarketResult = { success: boolean };\n\nexport type GetOwnerMetadataResult = OwnerMetadataEntity;\n"]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { GetOwnerMetadataParams, GetOwnerMetadataResult } from './types';
|
|
1
|
+
import { AddFavoriteMarketParams, AddFavoriteMarketResult, GetOwnerConfigurationSettingsParams, GetOwnerConfigurationSettingsResult, GetOwnerMetadataParams, GetOwnerMetadataResult, RemoveFavoriteMarketParams, RemoveFavoriteMarketResult } from './types';
|
|
2
2
|
import { RestClient } from '@reyaxyz/common';
|
|
3
3
|
export default class OwnerClient extends RestClient {
|
|
4
4
|
getOwnerMetadata(params: GetOwnerMetadataParams): Promise<GetOwnerMetadataResult>;
|
|
5
|
+
getOwnerConfigurationSettings(params: GetOwnerConfigurationSettingsParams): Promise<GetOwnerConfigurationSettingsResult>;
|
|
6
|
+
addFavoriteMarket(params: AddFavoriteMarketParams): Promise<AddFavoriteMarketResult>;
|
|
7
|
+
removeFavoriteMarket(params: RemoveFavoriteMarketParams): Promise<RemoveFavoriteMarketResult>;
|
|
5
8
|
}
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/owner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,mCAAmC,EACnC,mCAAmC,EACnC,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;IAC3C,gBAAgB,CACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IAK5B,6BAA6B,CACjC,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;IAKzC,iBAAiB,CACrB,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC;IAK7B,oBAAoB,CACxB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC;CAIvC"}
|
|
@@ -2,5 +2,25 @@ import { OwnerMetadataEntity } from '@reyaxyz/common';
|
|
|
2
2
|
export type GetOwnerMetadataParams = {
|
|
3
3
|
ownerAddress: string;
|
|
4
4
|
};
|
|
5
|
+
export type GetOwnerConfigurationSettingsParams = {
|
|
6
|
+
ownerAddress: string;
|
|
7
|
+
};
|
|
8
|
+
export type GetOwnerConfigurationSettingsResult = {
|
|
9
|
+
favoriteMarkets: number[];
|
|
10
|
+
};
|
|
11
|
+
export type AddFavoriteMarketParams = {
|
|
12
|
+
ownerAddress: string;
|
|
13
|
+
marketId: number;
|
|
14
|
+
};
|
|
15
|
+
export type AddFavoriteMarketResult = {
|
|
16
|
+
success: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type RemoveFavoriteMarketParams = {
|
|
19
|
+
ownerAddress: string;
|
|
20
|
+
marketId: number;
|
|
21
|
+
};
|
|
22
|
+
export type RemoveFavoriteMarketResult = {
|
|
23
|
+
success: boolean;
|
|
24
|
+
};
|
|
5
25
|
export type GetOwnerMetadataResult = OwnerMetadataEntity;
|
|
6
26
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/owner/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/owner/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/api-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.123.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ws": "^8.16.0"
|
|
44
44
|
},
|
|
45
45
|
"packageManager": "pnpm@8.3.1",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "f9a06f4b904efd6ecadb25e95f190b0c55c250aa",
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/ws": "8.5.10"
|
|
49
49
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddFavoriteMarketParams,
|
|
3
|
+
AddFavoriteMarketResult,
|
|
4
|
+
GetOwnerConfigurationSettingsParams,
|
|
5
|
+
GetOwnerConfigurationSettingsResult,
|
|
6
|
+
GetOwnerMetadataParams,
|
|
7
|
+
GetOwnerMetadataResult,
|
|
8
|
+
RemoveFavoriteMarketParams,
|
|
9
|
+
RemoveFavoriteMarketResult,
|
|
10
|
+
} from './types';
|
|
2
11
|
import { RestClient } from '@reyaxyz/common';
|
|
3
12
|
|
|
4
13
|
export default class OwnerClient extends RestClient {
|
|
@@ -8,4 +17,25 @@ export default class OwnerClient extends RestClient {
|
|
|
8
17
|
const uri = `/api/owner/${params.ownerAddress}/metadata`;
|
|
9
18
|
return this.get(uri);
|
|
10
19
|
}
|
|
20
|
+
|
|
21
|
+
async getOwnerConfigurationSettings(
|
|
22
|
+
params: GetOwnerConfigurationSettingsParams,
|
|
23
|
+
): Promise<GetOwnerConfigurationSettingsResult> {
|
|
24
|
+
const uri = `/api/owner/${params.ownerAddress}/configuration/settings`;
|
|
25
|
+
return this.get(uri);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async addFavoriteMarket(
|
|
29
|
+
params: AddFavoriteMarketParams,
|
|
30
|
+
): Promise<AddFavoriteMarketResult> {
|
|
31
|
+
const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;
|
|
32
|
+
return this.post(uri, undefined, params);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async removeFavoriteMarket(
|
|
36
|
+
params: RemoveFavoriteMarketParams,
|
|
37
|
+
): Promise<RemoveFavoriteMarketResult> {
|
|
38
|
+
const uri = `/api/owner/${params.ownerAddress}/configuration/favorite-market`;
|
|
39
|
+
return this.delete(uri, undefined, params);
|
|
40
|
+
}
|
|
11
41
|
}
|
|
@@ -4,4 +4,26 @@ export type GetOwnerMetadataParams = {
|
|
|
4
4
|
ownerAddress: string;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
export type GetOwnerConfigurationSettingsParams = {
|
|
8
|
+
ownerAddress: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type GetOwnerConfigurationSettingsResult = {
|
|
12
|
+
favoriteMarkets: number[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type AddFavoriteMarketParams = {
|
|
16
|
+
ownerAddress: string;
|
|
17
|
+
marketId: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type AddFavoriteMarketResult = { success: boolean };
|
|
21
|
+
|
|
22
|
+
export type RemoveFavoriteMarketParams = {
|
|
23
|
+
ownerAddress: string;
|
|
24
|
+
marketId: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type RemoveFavoriteMarketResult = { success: boolean };
|
|
28
|
+
|
|
7
29
|
export type GetOwnerMetadataResult = OwnerMetadataEntity;
|