@p2pmodels/connect-round-robin
Advanced tools
Comparing version 1.0.0-beta.15 to 1.0.0-beta.16
@@ -1,2 +0,2 @@ | ||
import { IRoundRobinConnector, UserData } from '../types'; | ||
import { IRoundRobinConnector, UserData, TaskData } from '../types'; | ||
export default class User { | ||
@@ -8,4 +8,5 @@ #private; | ||
readonly appAddress: string; | ||
readonly allocatedTasks: TaskData[]; | ||
constructor(data: UserData, connector: IRoundRobinConnector); | ||
} | ||
//# sourceMappingURL=User.d.ts.map |
@@ -12,3 +12,2 @@ "use strict"; | ||
class User { | ||
// readonly allocatedTasks: TaskData[] | ||
// readonly acceptedTasks: TaskData[] | ||
@@ -23,3 +22,3 @@ // readonly rejectedTasks: TaskData[] | ||
this.appAddress = data.appAddress; | ||
// this.allocatedTasks = data.allocatedTasks | ||
this.allocatedTasks = data.allocatedTasks; | ||
// this.acceptedTasks = data.acceptedTasks | ||
@@ -26,0 +25,0 @@ // this.rejectedTasks = data.rejectedTasks |
@@ -81,4 +81,2 @@ "use strict"; | ||
const id = helpers_1.buildUserEntityId(appAddress, userId); | ||
console.log('[Connector] id: ' + id + ', statuses: '); | ||
console.log(statuses); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
@@ -85,0 +83,0 @@ } |
@@ -10,8 +10,14 @@ "use strict"; | ||
function parseUser(result, connector) { | ||
var _a; | ||
const user = result.data.user; | ||
if (!user) | ||
throw new errors_1.ErrorUnexpectedResult('Unable to parse user.'); | ||
return user ? new User_1.default(user, connector) : null; | ||
const allocatedTasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t); | ||
const data = { | ||
...user, | ||
allocatedTasks, | ||
}; | ||
return user ? new User_1.default(data, connector) : null; | ||
} | ||
exports.parseUser = parseUser; | ||
//# sourceMappingURL=users.js.map |
@@ -35,2 +35,8 @@ "use strict"; | ||
available | ||
allocatedTasks { | ||
id | ||
endDate | ||
reallocationTime | ||
status | ||
} | ||
} | ||
@@ -37,0 +43,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { IRoundRobinConnector, UserData } from '../types'; | ||
import { IRoundRobinConnector, UserData, TaskData } from '../types'; | ||
export default class User { | ||
@@ -8,4 +8,5 @@ #private; | ||
readonly appAddress: string; | ||
readonly allocatedTasks: TaskData[]; | ||
constructor(data: UserData, connector: IRoundRobinConnector); | ||
} | ||
//# sourceMappingURL=User.d.ts.map |
@@ -12,3 +12,2 @@ "use strict"; | ||
class User { | ||
// readonly allocatedTasks: TaskData[] | ||
// readonly acceptedTasks: TaskData[] | ||
@@ -23,3 +22,3 @@ // readonly rejectedTasks: TaskData[] | ||
this.appAddress = data.appAddress; | ||
// this.allocatedTasks = data.allocatedTasks | ||
this.allocatedTasks = data.allocatedTasks; | ||
// this.acceptedTasks = data.acceptedTasks | ||
@@ -26,0 +25,0 @@ // this.rejectedTasks = data.rejectedTasks |
@@ -81,4 +81,2 @@ "use strict"; | ||
const id = helpers_1.buildUserEntityId(appAddress, userId); | ||
console.log('[Connector] id: ' + id + ', statuses: '); | ||
console.log(statuses); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
@@ -85,0 +83,0 @@ } |
@@ -10,8 +10,14 @@ "use strict"; | ||
function parseUser(result, connector) { | ||
var _a; | ||
const user = result.data.user; | ||
if (!user) | ||
throw new errors_1.ErrorUnexpectedResult('Unable to parse user.'); | ||
return user ? new User_1.default(user, connector) : null; | ||
const allocatedTasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t); | ||
const data = { | ||
...user, | ||
allocatedTasks, | ||
}; | ||
return user ? new User_1.default(data, connector) : null; | ||
} | ||
exports.parseUser = parseUser; | ||
//# sourceMappingURL=users.js.map |
@@ -35,2 +35,8 @@ "use strict"; | ||
available | ||
allocatedTasks { | ||
id | ||
endDate | ||
reallocationTime | ||
status | ||
} | ||
} | ||
@@ -37,0 +43,0 @@ } |
{ | ||
"name": "@p2pmodels/connect-round-robin", | ||
"version": "1.0.0-beta.15", | ||
"version": "1.0.0-beta.16", | ||
"license": "LGPL-3.0-or-later", | ||
@@ -5,0 +5,0 @@ "description": "Aragon connector to access and interact with Round Robin task allocation app", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
634361
1454