@openfort/openfort-node 0.5.5 → 0.5.6
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/.eslintrc.json +9 -0
- package/dist/generated/api/apis.d.ts +1 -1
- package/dist/index.d.ts +5 -8
- package/dist/index.js +27 -31
- package/dist/index.js.map +1 -1
- package/dist/model/validationError.d.ts +4 -0
- package/dist/model/validationError.js +11 -0
- package/dist/model/validationError.js.map +1 -0
- package/dist/utility/httpErrorHandler.d.ts +1 -0
- package/dist/utility/httpErrorHandler.js +54 -0
- package/dist/utility/httpErrorHandler.js.map +1 -0
- package/dist/utility/observable.d.ts +5 -0
- package/dist/utility/observable.js +3 -0
- package/dist/utility/observable.js.map +1 -0
- package/dist/utility/observer.d.ts +19 -0
- package/dist/utility/observer.js +8 -0
- package/dist/utility/observer.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/accountsApiWrapper.d.ts +4 -3
- package/dist/wrapper/accountsApiWrapper.js +15 -50
- package/dist/wrapper/accountsApiWrapper.js.map +1 -1
- package/dist/wrapper/baseApiWrapper.d.ts +14 -0
- package/dist/wrapper/baseApiWrapper.js +20 -0
- package/dist/wrapper/baseApiWrapper.js.map +1 -0
- package/dist/wrapper/contractsApiWrapper.d.ts +4 -3
- package/dist/wrapper/contractsApiWrapper.js +14 -43
- package/dist/wrapper/contractsApiWrapper.js.map +1 -1
- package/dist/wrapper/playersApiWrapper.d.ts +4 -3
- package/dist/wrapper/playersApiWrapper.js +19 -78
- package/dist/wrapper/playersApiWrapper.js.map +1 -1
- package/dist/wrapper/policiesApiWrapper.d.ts +4 -3
- package/dist/wrapper/policiesApiWrapper.js +18 -71
- package/dist/wrapper/policiesApiWrapper.js.map +1 -1
- package/dist/wrapper/policyRulesApiWrapper.d.ts +4 -3
- package/dist/wrapper/policyRulesApiWrapper.js +13 -36
- package/dist/wrapper/policyRulesApiWrapper.js.map +1 -1
- package/dist/wrapper/projectsApiWrapper.d.ts +4 -3
- package/dist/wrapper/projectsApiWrapper.js +13 -36
- package/dist/wrapper/projectsApiWrapper.js.map +1 -1
- package/dist/wrapper/sessionsApiWrapper.d.ts +4 -3
- package/dist/wrapper/sessionsApiWrapper.js +13 -36
- package/dist/wrapper/sessionsApiWrapper.js.map +1 -1
- package/dist/wrapper/transactionIntentsApiWrapper.d.ts +4 -3
- package/dist/wrapper/transactionIntentsApiWrapper.js +15 -50
- package/dist/wrapper/transactionIntentsApiWrapper.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/wrapper/httpErrorHandler.d.ts +0 -5
- package/dist/wrapper/httpErrorHandler.js +0 -46
- package/dist/wrapper/httpErrorHandler.js.map +0 -1
package/.eslintrc.json
CHANGED
|
@@ -52,6 +52,15 @@
|
|
|
52
52
|
"modifiers": ["public"],
|
|
53
53
|
"format": ["camelCase"]
|
|
54
54
|
}
|
|
55
|
+
],
|
|
56
|
+
"sort-imports": [
|
|
57
|
+
"error", {
|
|
58
|
+
"ignoreCase": false,
|
|
59
|
+
"ignoreDeclarationSort": false,
|
|
60
|
+
"ignoreMemberSort": false,
|
|
61
|
+
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
|
62
|
+
"allowSeparatedGroups": false
|
|
63
|
+
}
|
|
55
64
|
]
|
|
56
65
|
}
|
|
57
66
|
}
|
|
@@ -23,4 +23,4 @@ export declare class HttpError extends Error {
|
|
|
23
23
|
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
24
24
|
}
|
|
25
25
|
export { RequestFile } from '../model/models';
|
|
26
|
-
export declare const APIS: (typeof
|
|
26
|
+
export declare const APIS: (typeof ContractsApi | typeof PlayersApi | typeof PoliciesApi | typeof PolicyRulesApi | typeof ProjectsApi | typeof SessionsApi | typeof TransactionIntentsApi | typeof AccountsApi)[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AccountsApiWrapper } from "./wrapper/accountsApiWrapper";
|
|
2
2
|
import { ContractsApiWrapper } from "./wrapper/contractsApiWrapper";
|
|
3
|
+
import { Observer } from "./utility/observer";
|
|
3
4
|
import { PlayersApiWrapper } from "./wrapper/playersApiWrapper";
|
|
4
5
|
import { PoliciesApiWrapper } from "./wrapper/policiesApiWrapper";
|
|
5
6
|
import { PolicyRulesApiWrapper } from "./wrapper/policyRulesApiWrapper";
|
|
@@ -9,14 +10,8 @@ import { TransactionIntentsApiWrapper } from "./wrapper/transactionIntentsApiWra
|
|
|
9
10
|
export default class Openfort {
|
|
10
11
|
private readonly apiKey;
|
|
11
12
|
private readonly basePath?;
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private _playersApi?;
|
|
15
|
-
private _policiesApi?;
|
|
16
|
-
private _policyRulesApi?;
|
|
17
|
-
private _projectsApi?;
|
|
18
|
-
private _sessionsApi?;
|
|
19
|
-
private _transactionIntentsApi?;
|
|
13
|
+
private readonly apiWrappers;
|
|
14
|
+
private readonly observers;
|
|
20
15
|
constructor(apiKey: string, basePath?: string | undefined);
|
|
21
16
|
get accounts(): AccountsApiWrapper;
|
|
22
17
|
get contracts(): ContractsApiWrapper;
|
|
@@ -26,5 +21,7 @@ export default class Openfort {
|
|
|
26
21
|
get projects(): ProjectsApiWrapper;
|
|
27
22
|
get sessions(): SessionsApiWrapper;
|
|
28
23
|
get transactionIntents(): TransactionIntentsApiWrapper;
|
|
24
|
+
subscribe(observer: Observer): void;
|
|
25
|
+
private getOrCreateWrapper;
|
|
29
26
|
}
|
|
30
27
|
export * from "./model";
|
package/dist/index.js
CHANGED
|
@@ -26,54 +26,50 @@ class Openfort {
|
|
|
26
26
|
constructor(apiKey, basePath) {
|
|
27
27
|
this.apiKey = apiKey;
|
|
28
28
|
this.basePath = basePath;
|
|
29
|
+
this.apiWrappers = {};
|
|
30
|
+
this.observers = [];
|
|
29
31
|
}
|
|
30
32
|
get accounts() {
|
|
31
|
-
|
|
32
|
-
this._accountsApi = new accountsApiWrapper_1.AccountsApiWrapper(this.apiKey, this.basePath);
|
|
33
|
-
}
|
|
34
|
-
return this._accountsApi;
|
|
33
|
+
return this.getOrCreateWrapper(accountsApiWrapper_1.AccountsApiWrapper);
|
|
35
34
|
}
|
|
36
35
|
get contracts() {
|
|
37
|
-
|
|
38
|
-
this._contractsApi = new contractsApiWrapper_1.ContractsApiWrapper(this.apiKey, this.basePath);
|
|
39
|
-
}
|
|
40
|
-
return this._contractsApi;
|
|
36
|
+
return this.getOrCreateWrapper(contractsApiWrapper_1.ContractsApiWrapper);
|
|
41
37
|
}
|
|
42
38
|
get players() {
|
|
43
|
-
|
|
44
|
-
this._playersApi = new playersApiWrapper_1.PlayersApiWrapper(this.apiKey, this.basePath);
|
|
45
|
-
}
|
|
46
|
-
return this._playersApi;
|
|
39
|
+
return this.getOrCreateWrapper(playersApiWrapper_1.PlayersApiWrapper);
|
|
47
40
|
}
|
|
48
41
|
get policies() {
|
|
49
|
-
|
|
50
|
-
this._policiesApi = new policiesApiWrapper_1.PoliciesApiWrapper(this.apiKey, this.basePath);
|
|
51
|
-
}
|
|
52
|
-
return this._policiesApi;
|
|
42
|
+
return this.getOrCreateWrapper(policiesApiWrapper_1.PoliciesApiWrapper);
|
|
53
43
|
}
|
|
54
44
|
get policyRules() {
|
|
55
|
-
|
|
56
|
-
this._policyRulesApi = new policyRulesApiWrapper_1.PolicyRulesApiWrapper(this.apiKey, this.basePath);
|
|
57
|
-
}
|
|
58
|
-
return this._policyRulesApi;
|
|
45
|
+
return this.getOrCreateWrapper(policyRulesApiWrapper_1.PolicyRulesApiWrapper);
|
|
59
46
|
}
|
|
60
47
|
get projects() {
|
|
61
|
-
|
|
62
|
-
this._projectsApi = new projectsApiWrapper_1.ProjectsApiWrapper(this.apiKey, this.basePath);
|
|
63
|
-
}
|
|
64
|
-
return this._projectsApi;
|
|
48
|
+
return this.getOrCreateWrapper(projectsApiWrapper_1.ProjectsApiWrapper);
|
|
65
49
|
}
|
|
66
50
|
get sessions() {
|
|
67
|
-
|
|
68
|
-
this._sessionsApi = new sessionsApiWrapper_1.SessionsApiWrapper(this.apiKey, this.basePath);
|
|
69
|
-
}
|
|
70
|
-
return this._sessionsApi;
|
|
51
|
+
return this.getOrCreateWrapper(sessionsApiWrapper_1.SessionsApiWrapper);
|
|
71
52
|
}
|
|
72
53
|
get transactionIntents() {
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
return this.getOrCreateWrapper(transactionIntentsApiWrapper_1.TransactionIntentsApiWrapper);
|
|
55
|
+
}
|
|
56
|
+
subscribe(observer) {
|
|
57
|
+
this.observers.push(observer);
|
|
58
|
+
for (const apiWrapper of Object.values(this.apiWrappers)) {
|
|
59
|
+
apiWrapper.observers?.push(observer);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
getOrCreateWrapper(type) {
|
|
63
|
+
const wrapper = this.apiWrappers[type.name];
|
|
64
|
+
if (wrapper) {
|
|
65
|
+
return wrapper;
|
|
66
|
+
}
|
|
67
|
+
const result = new type(this.apiKey, this.basePath);
|
|
68
|
+
for (const observer of this.observers) {
|
|
69
|
+
result.subscribe?.(observer);
|
|
75
70
|
}
|
|
76
|
-
|
|
71
|
+
this.apiWrappers[type.name] = result;
|
|
72
|
+
return result;
|
|
77
73
|
}
|
|
78
74
|
}
|
|
79
75
|
exports.default = Openfort;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAgE;AAChE,uEAAkE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qEAAgE;AAChE,uEAAkE;AAGlE,mEAA8D;AAC9D,qEAAgE;AAChE,2EAAsE;AACtE,qEAAgE;AAChE,qEAAgE;AAChE,yFAAoF;AAEpF,MAAqB,QAAQ;IAIzB,YAA6B,MAAc,EAAmB,QAAiB;QAAlD,WAAM,GAAN,MAAM,CAAQ;QAAmB,aAAQ,GAAR,QAAQ,CAAS;QAH9D,gBAAW,GAAG,EAAE,CAAC;QACjB,cAAS,GAAe,EAAE,CAAC;IAEsC,CAAC;IAEnF,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,kBAAkB,CAAC,uCAAkB,CAAC,CAAC;IACvD,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,kBAAkB,CAAC,yCAAmB,CAAC,CAAC;IACxD,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,kBAAkB,CAAC,qCAAiB,CAAC,CAAC;IACtD,CAAC;IAED,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,kBAAkB,CAAC,uCAAkB,CAAC,CAAC;IACvD,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,6CAAqB,CAAC,CAAC;IAC1D,CAAC;IAED,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,kBAAkB,CAAC,uCAAkB,CAAC,CAAC;IACvD,CAAC;IAED,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,kBAAkB,CAAC,uCAAkB,CAAC,CAAC;IACvD,CAAC;IAED,IAAW,kBAAkB;QACzB,OAAO,IAAI,CAAC,kBAAkB,CAAC,2DAA4B,CAAC,CAAC;IACjE,CAAC;IAEM,SAAS,CAAC,QAAkB;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACrD,UAAyB,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxD;IACL,CAAC;IAEO,kBAAkB,CAAI,IAAuD;QACjF,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,OAAO,EAAE;YACT,OAAO,OAAO,CAAC;SAClB;QAED,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;YAClC,MAAqB,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAC;SAChD;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;QACrC,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AA1DD,2BA0DC;AAED,0CAAwB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationError = void 0;
|
|
4
|
+
class ValidationError extends Error {
|
|
5
|
+
constructor(message, details) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.details = details;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ValidationError = ValidationError;
|
|
11
|
+
//# sourceMappingURL=validationError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationError.js","sourceRoot":"","sources":["../../src/model/validationError.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAgB,SAAQ,KAAK;IACtC,YAAmB,OAAe,EAAkB,OAAgB;QAChE,KAAK,CAAC,OAAO,CAAC,CAAC;QADiC,YAAO,GAAP,OAAO,CAAS;IAEpE,CAAC;CACJ;AAJD,0CAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function httpErrorHandler(target: Function): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.httpErrorHandler = void 0;
|
|
4
|
+
const apis_1 = require("../generated/api/apis");
|
|
5
|
+
const validationError_1 = require("../model/validationError");
|
|
6
|
+
function parseAndPrepareHttpError(error) {
|
|
7
|
+
if (error instanceof apis_1.HttpError) {
|
|
8
|
+
const bareError = error.body?.error ?? error.body;
|
|
9
|
+
if (bareError?.details) {
|
|
10
|
+
return new validationError_1.ValidationError(bareError.message, bareError.details);
|
|
11
|
+
}
|
|
12
|
+
if (bareError?.message) {
|
|
13
|
+
return new Error(bareError.message);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return error;
|
|
17
|
+
}
|
|
18
|
+
function processError(error, observers, methodName) {
|
|
19
|
+
const parsedError = parseAndPrepareHttpError(error);
|
|
20
|
+
if (observers?.length) {
|
|
21
|
+
Promise.all(observers.map((observer) => observer.onError?.(error)));
|
|
22
|
+
if (parsedError instanceof validationError_1.ValidationError) {
|
|
23
|
+
Promise.all(observers.map((observer) => observer.onValidationError?.({ ...parsedError, methodName })));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return parsedError;
|
|
27
|
+
}
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
29
|
+
function httpErrorHandler(target) {
|
|
30
|
+
const descriptors = Object.getOwnPropertyDescriptors(target.prototype);
|
|
31
|
+
for (const [propertyName, descriptor] of Object.entries(descriptors)) {
|
|
32
|
+
const isMethod = descriptor.value instanceof Function;
|
|
33
|
+
if (!isMethod)
|
|
34
|
+
continue;
|
|
35
|
+
const targetMethod = descriptor.value;
|
|
36
|
+
descriptor.value = function (...args) {
|
|
37
|
+
try {
|
|
38
|
+
const result = targetMethod.apply(this, args);
|
|
39
|
+
if (result instanceof Promise) {
|
|
40
|
+
return result.catch((error) => {
|
|
41
|
+
throw processError(error, this.observers, propertyName);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
throw processError(error, this.observers, propertyName);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(target.prototype, propertyName, descriptor);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.httpErrorHandler = httpErrorHandler;
|
|
54
|
+
//# sourceMappingURL=httpErrorHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpErrorHandler.js","sourceRoot":"","sources":["../../src/utility/httpErrorHandler.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAGhD,8DAAyD;AAEzD,SAAS,wBAAwB,CAAI,KAAQ;IACzC,IAAI,KAAK,YAAY,gBAAS,EAAE;QAC5B,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,EAAE,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC;QAElD,IAAI,SAAS,EAAE,OAAO,EAAE;YACpB,OAAO,IAAI,iCAAe,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;SACpE;QACD,IAAI,SAAS,EAAE,OAAO,EAAE;YACpB,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;SACvC;KACJ;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,KAAc,EAAE,SAAiC,EAAE,UAAkB;IACvF,MAAM,WAAW,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,SAAS,EAAE,MAAM,EAAE;QACnB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpE,IAAI,WAAW,YAAY,iCAAe,EAAE;YACxC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC,EAAC,GAAG,WAAW,EAAE,UAAU,EAAC,CAAC,CAAC,CAAC,CAAC;SACxG;KACJ;IACD,OAAO,WAAW,CAAC;AACvB,CAAC;AAED,wDAAwD;AACxD,SAAgB,gBAAgB,CAAC,MAAgB;IAC7C,MAAM,WAAW,GAAG,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACvE,KAAK,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAClE,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,YAAY,QAAQ,CAAC;QACtD,IAAI,CAAC,QAAQ;YAAE,SAAS;QAExB,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC;QACtC,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAI;YAChC,IAAI;gBACA,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC9C,IAAI,MAAM,YAAY,OAAO,EAAE;oBAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;wBAC1B,MAAM,YAAY,CAAC,KAAK,EAAG,IAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;oBAC5E,CAAC,CAAC,CAAC;iBACN;gBACD,OAAO,MAAM,CAAC;aACjB;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,YAAY,CAAC,KAAK,EAAG,IAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;aAC3E;QACL,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;KACrE;AACL,CAAC;AAvBD,4CAuBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../src/utility/observable.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ValidationError } from "../model/validationError";
|
|
2
|
+
/**
|
|
3
|
+
* Interface introduce the ability to observe the messages from the observable class
|
|
4
|
+
*/
|
|
5
|
+
export interface Observer {
|
|
6
|
+
/**
|
|
7
|
+
* Triggers when any error is happening on sending request to the server.
|
|
8
|
+
* @param error Error object with the all details of the request
|
|
9
|
+
*/
|
|
10
|
+
onError?(error: unknown): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Triggers when any validation request error is occuring
|
|
13
|
+
* @param error Contains information about calling method and happened error
|
|
14
|
+
*/
|
|
15
|
+
onValidationError?(error: ValidationErrorMessage): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ValidationErrorMessage extends ValidationError {
|
|
18
|
+
methodName?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationErrorMessage = void 0;
|
|
4
|
+
const validationError_1 = require("../model/validationError");
|
|
5
|
+
class ValidationErrorMessage extends validationError_1.ValidationError {
|
|
6
|
+
}
|
|
7
|
+
exports.ValidationErrorMessage = ValidationErrorMessage;
|
|
8
|
+
//# sourceMappingURL=observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observer.js","sourceRoot":"","sources":["../../src/utility/observer.ts"],"names":[],"mappings":";;;AAAA,8DAAyD;AAkBzD,MAAa,sBAAuB,SAAQ,iCAAe;CAE1D;AAFD,wDAEC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.5.
|
|
1
|
+
export declare const VERSION = "0.5.6";
|
|
2
2
|
export declare const PACKAGE = "@openfort/openfort-node";
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AccountResponse, AccountsResponse,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { AccountResponse, AccountsResponse, CreateAccountRequest, GetAccountInventoryRequest, GetAccountRequest, InventoryResponse, ListAccountsRequest, SignPayloadRequest, SignPayloadResponse, TransactionIntentResponse, TransferAccountOwnershipRequest } from "../model";
|
|
2
|
+
import { AccountsApi } from "../generated/api/accountsApi";
|
|
3
|
+
import { BaseApiWrapper } from "./baseApiWrapper";
|
|
4
|
+
export declare class AccountsApiWrapper extends BaseApiWrapper<AccountsApi> {
|
|
4
5
|
constructor(accessToken: string, basePath?: string);
|
|
5
6
|
/**
|
|
6
7
|
* Creates an account object.
|
|
@@ -10,22 +10,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AccountsApiWrapper = void 0;
|
|
13
|
-
const httpErrorHandler_1 = require("./httpErrorHandler");
|
|
14
13
|
const accountsApi_1 = require("../generated/api/accountsApi");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
class AccountsApiWrapper {
|
|
14
|
+
const baseApiWrapper_1 = require("./baseApiWrapper");
|
|
15
|
+
const httpErrorHandler_1 = require("../utility/httpErrorHandler");
|
|
16
|
+
let AccountsApiWrapper = class AccountsApiWrapper extends baseApiWrapper_1.BaseApiWrapper {
|
|
18
17
|
constructor(accessToken, basePath) {
|
|
19
|
-
|
|
20
|
-
this._api.accessToken = accessToken;
|
|
21
|
-
this._api.defaultHeaders["User-Agent"] = `${version_1.PACKAGE}@${version_1.VERSION}`;
|
|
18
|
+
super(accountsApi_1.AccountsApi, accessToken, basePath);
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
21
|
* Creates an account object.
|
|
25
22
|
* @param req The account to create
|
|
26
23
|
*/
|
|
27
24
|
async create(req) {
|
|
28
|
-
const response = await this.
|
|
25
|
+
const response = await this.api.createAccount(req);
|
|
29
26
|
return response.body;
|
|
30
27
|
}
|
|
31
28
|
/**
|
|
@@ -33,7 +30,7 @@ class AccountsApiWrapper {
|
|
|
33
30
|
* @param req Criteria to get account.
|
|
34
31
|
*/
|
|
35
32
|
async get(req) {
|
|
36
|
-
const response = await this.
|
|
33
|
+
const response = await this.api.getAccount(req.id, req.expand);
|
|
37
34
|
return response.body;
|
|
38
35
|
}
|
|
39
36
|
/**
|
|
@@ -41,7 +38,7 @@ class AccountsApiWrapper {
|
|
|
41
38
|
* @param req Criteria to get inventory.
|
|
42
39
|
*/
|
|
43
40
|
async getInventory(req) {
|
|
44
|
-
const response = await this.
|
|
41
|
+
const response = await this.api.getAccountInventory(req.id);
|
|
45
42
|
return response.body;
|
|
46
43
|
}
|
|
47
44
|
/**
|
|
@@ -49,7 +46,7 @@ class AccountsApiWrapper {
|
|
|
49
46
|
* @param req Criteria to get the list of accounts.
|
|
50
47
|
*/
|
|
51
48
|
async list(req) {
|
|
52
|
-
const response = await this.
|
|
49
|
+
const response = await this.api.getAccounts(req.player, req.expand, req.limit);
|
|
53
50
|
return response.body;
|
|
54
51
|
}
|
|
55
52
|
/**
|
|
@@ -58,7 +55,7 @@ class AccountsApiWrapper {
|
|
|
58
55
|
*/
|
|
59
56
|
async transferOwnership(req) {
|
|
60
57
|
const { id, ...body } = req;
|
|
61
|
-
const response = await this.
|
|
58
|
+
const response = await this.api.transferOwnership(id, body);
|
|
62
59
|
return response.body;
|
|
63
60
|
}
|
|
64
61
|
/**
|
|
@@ -67,45 +64,13 @@ class AccountsApiWrapper {
|
|
|
67
64
|
*/
|
|
68
65
|
async signPayload(req) {
|
|
69
66
|
const { id, ...body } = req;
|
|
70
|
-
const response = await this.
|
|
67
|
+
const response = await this.api.signPayload(id, body);
|
|
71
68
|
return response.body;
|
|
72
69
|
}
|
|
73
|
-
}
|
|
74
|
-
__decorate([
|
|
75
|
-
|
|
76
|
-
__metadata("design:
|
|
77
|
-
|
|
78
|
-
__metadata("design:returntype", Promise)
|
|
79
|
-
], AccountsApiWrapper.prototype, "create", null);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
82
|
-
__metadata("design:type", Function),
|
|
83
|
-
__metadata("design:paramtypes", [Object]),
|
|
84
|
-
__metadata("design:returntype", Promise)
|
|
85
|
-
], AccountsApiWrapper.prototype, "get", null);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
88
|
-
__metadata("design:type", Function),
|
|
89
|
-
__metadata("design:paramtypes", [Object]),
|
|
90
|
-
__metadata("design:returntype", Promise)
|
|
91
|
-
], AccountsApiWrapper.prototype, "getInventory", null);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
94
|
-
__metadata("design:type", Function),
|
|
95
|
-
__metadata("design:paramtypes", [Object]),
|
|
96
|
-
__metadata("design:returntype", Promise)
|
|
97
|
-
], AccountsApiWrapper.prototype, "list", null);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
100
|
-
__metadata("design:type", Function),
|
|
101
|
-
__metadata("design:paramtypes", [Object]),
|
|
102
|
-
__metadata("design:returntype", Promise)
|
|
103
|
-
], AccountsApiWrapper.prototype, "transferOwnership", null);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
106
|
-
__metadata("design:type", Function),
|
|
107
|
-
__metadata("design:paramtypes", [Object]),
|
|
108
|
-
__metadata("design:returntype", Promise)
|
|
109
|
-
], AccountsApiWrapper.prototype, "signPayload", null);
|
|
70
|
+
};
|
|
71
|
+
AccountsApiWrapper = __decorate([
|
|
72
|
+
httpErrorHandler_1.httpErrorHandler,
|
|
73
|
+
__metadata("design:paramtypes", [String, String])
|
|
74
|
+
], AccountsApiWrapper);
|
|
110
75
|
exports.AccountsApiWrapper = AccountsApiWrapper;
|
|
111
76
|
//# sourceMappingURL=accountsApiWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/accountsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"accountsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/accountsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AAaA,8DAAyD;AACzD,qDAAgD;AAChD,kEAA6D;AAGtD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAA2B;IAC/D,YAAY,WAAmB,EAAE,QAAiB;QAC9C,KAAK,CAAC,yBAAW,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,GAAyB;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,GAAsB;QACnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAC/D,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAY,CAAC,GAA+B;QACrD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5D,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CAAC,GAAwB;QACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/E,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,iBAAiB,CAAC,GAAoC;QAC/D,MAAM,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,GAAG,GAAG,CAAC;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAC5D,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,WAAW,CAAC,GAAuB;QAC5C,MAAM,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,GAAG,GAAG,CAAC;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACtD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CACJ,CAAA;AA5DY,kBAAkB;IAD9B,mCAAgB;;GACJ,kBAAkB,CA4D9B;AA5DY,gDAAkB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from "../utility/observable";
|
|
2
|
+
import { Observer } from "../utility/observer";
|
|
3
|
+
export declare class BaseApiWrapper<T extends BaseApi> implements Observable {
|
|
4
|
+
private readonly _observers;
|
|
5
|
+
protected readonly api: T;
|
|
6
|
+
constructor(type: new (basePath?: string) => T, accessToken: string, basePath?: string);
|
|
7
|
+
subscribe(observer: Observer): void;
|
|
8
|
+
get observers(): Observer[];
|
|
9
|
+
}
|
|
10
|
+
interface BaseApi {
|
|
11
|
+
set accessToken(accessToken: string | (() => string));
|
|
12
|
+
get defaultHeaders(): any;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseApiWrapper = void 0;
|
|
4
|
+
const version_1 = require("../version");
|
|
5
|
+
class BaseApiWrapper {
|
|
6
|
+
constructor(type, accessToken, basePath) {
|
|
7
|
+
this._observers = [];
|
|
8
|
+
this.api = new type(basePath);
|
|
9
|
+
this.api.accessToken = accessToken;
|
|
10
|
+
this.api.defaultHeaders["User-Agent"] = `${version_1.PACKAGE}@${version_1.VERSION}`;
|
|
11
|
+
}
|
|
12
|
+
subscribe(observer) {
|
|
13
|
+
this._observers.push(observer);
|
|
14
|
+
}
|
|
15
|
+
get observers() {
|
|
16
|
+
return this._observers;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.BaseApiWrapper = BaseApiWrapper;
|
|
20
|
+
//# sourceMappingURL=baseApiWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/baseApiWrapper.ts"],"names":[],"mappings":";;;AAAA,wCAA4C;AAI5C,MAAa,cAAc;IAIvB,YAAY,IAAkC,EAAE,WAAmB,EAAE,QAAiB;QAHrE,eAAU,GAAe,EAAE,CAAC;QAIzC,IAAI,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,GAAG,iBAAO,IAAI,iBAAO,EAAE,CAAC;IACpE,CAAC;IAEM,SAAS,CAAC,QAAkB;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CACJ;AAjBD,wCAiBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ContractDeleteResponse, ContractResponse, ContractsResponse, CreateContractRequest, GetContractRequest, ListContractsRequest, UpdateContractRequest } from "../model";
|
|
2
|
+
import { BaseApiWrapper } from "./baseApiWrapper";
|
|
3
|
+
import { ContractsApi } from "../generated/api/contractsApi";
|
|
4
|
+
export declare class ContractsApiWrapper extends BaseApiWrapper<ContractsApi> {
|
|
4
5
|
constructor(accessToken: string, basePath?: string);
|
|
5
6
|
/**
|
|
6
7
|
* Creates a contract object.
|
|
@@ -10,22 +10,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ContractsApiWrapper = void 0;
|
|
13
|
-
const
|
|
13
|
+
const baseApiWrapper_1 = require("./baseApiWrapper");
|
|
14
14
|
const contractsApi_1 = require("../generated/api/contractsApi");
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
class ContractsApiWrapper {
|
|
15
|
+
const httpErrorHandler_1 = require("../utility/httpErrorHandler");
|
|
16
|
+
let ContractsApiWrapper = class ContractsApiWrapper extends baseApiWrapper_1.BaseApiWrapper {
|
|
18
17
|
constructor(accessToken, basePath) {
|
|
19
|
-
|
|
20
|
-
this._api.accessToken = accessToken;
|
|
21
|
-
this._api.defaultHeaders["User-Agent"] = `${version_1.PACKAGE}@${version_1.VERSION}`;
|
|
18
|
+
super(contractsApi_1.ContractsApi, accessToken, basePath);
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
21
|
* Creates a contract object.
|
|
25
22
|
* @param req Parameters to create contract
|
|
26
23
|
*/
|
|
27
24
|
async create(req) {
|
|
28
|
-
const response = await this.
|
|
25
|
+
const response = await this.api.createContract(req);
|
|
29
26
|
return response.body;
|
|
30
27
|
}
|
|
31
28
|
/**
|
|
@@ -34,7 +31,7 @@ class ContractsApiWrapper {
|
|
|
34
31
|
*/
|
|
35
32
|
async update(req) {
|
|
36
33
|
const { id, ...body } = req;
|
|
37
|
-
const response = await this.
|
|
34
|
+
const response = await this.api.updateContract(id, body);
|
|
38
35
|
return response.body;
|
|
39
36
|
}
|
|
40
37
|
/**
|
|
@@ -42,7 +39,7 @@ class ContractsApiWrapper {
|
|
|
42
39
|
* @param id Id of the contract to delete
|
|
43
40
|
*/
|
|
44
41
|
async delete(id) {
|
|
45
|
-
const response = await this.
|
|
42
|
+
const response = await this.api.deleteContract(id);
|
|
46
43
|
return response.body;
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
@@ -50,7 +47,7 @@ class ContractsApiWrapper {
|
|
|
50
47
|
* @param req Criteria to get the contract.
|
|
51
48
|
*/
|
|
52
49
|
async get(req) {
|
|
53
|
-
const response = await this.
|
|
50
|
+
const response = await this.api.getContract(req.id);
|
|
54
51
|
return response.body;
|
|
55
52
|
}
|
|
56
53
|
/**
|
|
@@ -58,39 +55,13 @@ class ContractsApiWrapper {
|
|
|
58
55
|
* @param req Criteria to retrieve list of contracts.
|
|
59
56
|
*/
|
|
60
57
|
async list(req) {
|
|
61
|
-
const response = await this.
|
|
58
|
+
const response = await this.api.getContracts(req?.limit);
|
|
62
59
|
return response.body;
|
|
63
60
|
}
|
|
64
|
-
}
|
|
65
|
-
__decorate([
|
|
66
|
-
|
|
67
|
-
__metadata("design:
|
|
68
|
-
|
|
69
|
-
__metadata("design:returntype", Promise)
|
|
70
|
-
], ContractsApiWrapper.prototype, "create", null);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
73
|
-
__metadata("design:type", Function),
|
|
74
|
-
__metadata("design:paramtypes", [Object]),
|
|
75
|
-
__metadata("design:returntype", Promise)
|
|
76
|
-
], ContractsApiWrapper.prototype, "update", null);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
79
|
-
__metadata("design:type", Function),
|
|
80
|
-
__metadata("design:paramtypes", [String]),
|
|
81
|
-
__metadata("design:returntype", Promise)
|
|
82
|
-
], ContractsApiWrapper.prototype, "delete", null);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
85
|
-
__metadata("design:type", Function),
|
|
86
|
-
__metadata("design:paramtypes", [Object]),
|
|
87
|
-
__metadata("design:returntype", Promise)
|
|
88
|
-
], ContractsApiWrapper.prototype, "get", null);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, httpErrorHandler_1.httpErrorHandler)(),
|
|
91
|
-
__metadata("design:type", Function),
|
|
92
|
-
__metadata("design:paramtypes", [Object]),
|
|
93
|
-
__metadata("design:returntype", Promise)
|
|
94
|
-
], ContractsApiWrapper.prototype, "list", null);
|
|
61
|
+
};
|
|
62
|
+
ContractsApiWrapper = __decorate([
|
|
63
|
+
httpErrorHandler_1.httpErrorHandler,
|
|
64
|
+
__metadata("design:paramtypes", [String, String])
|
|
65
|
+
], ContractsApiWrapper);
|
|
95
66
|
exports.ContractsApiWrapper = ContractsApiWrapper;
|
|
96
67
|
//# sourceMappingURL=contractsApiWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/contractsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"contractsApiWrapper.js","sourceRoot":"","sources":["../../src/wrapper/contractsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,qDAAgD;AAChD,gEAA2D;AAC3D,kEAA6D;AAGtD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,+BAA4B;IACjE,YAAY,WAAmB,EAAE,QAAiB;QAC9C,KAAK,CAAC,2BAAY,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,GAA0B;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACpD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,GAA0B;QAC1C,MAAM,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,GAAG,GAAG,CAAC;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,EAAU;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,GAAuB;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CAAC,GAA0B;QACxC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;CACJ,CAAA;AAlDY,mBAAmB;IAD/B,mCAAgB;;GACJ,mBAAmB,CAkD/B;AAlDY,kDAAmB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AccountResponse, AccountsResponse,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { AccountResponse, AccountsResponse, CreateAccountRequest, CreatePlayerRequest, CreatePlayerSessionRequest, GetPlayerInventoryRequest, GetPlayerRequest, InventoryResponse, ListPlayerAccountsRequest, ListPlayersRequest, PlayerResponse, PlayersResponse, RevokePlayerSessionRequest, SessionResponse, TransactionIntentResponse, TransferPlayerAccountOwnershipRequest, UpdatePlayerRequest } from "../model";
|
|
2
|
+
import { BaseApiWrapper } from "./baseApiWrapper";
|
|
3
|
+
import { PlayersApi } from "../generated/api/playersApi";
|
|
4
|
+
export declare class PlayersApiWrapper extends BaseApiWrapper<PlayersApi> {
|
|
4
5
|
constructor(accessToken: string, basePath?: string);
|
|
5
6
|
/**
|
|
6
7
|
* Creates a player object.
|