Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@p2pmodels/connect-round-robin

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@p2pmodels/connect-round-robin - npm Package Compare versions

Comparing version 1.0.0-beta.16 to 1.0.0-beta.17

1

dist/cjs/models/User.d.ts

@@ -9,4 +9,5 @@ import { IRoundRobinConnector, UserData, TaskData } from '../types';

readonly allocatedTasks: TaskData[];
readonly acceptedTasks: TaskData[];
constructor(data: UserData, connector: IRoundRobinConnector);
}
//# sourceMappingURL=User.d.ts.map

3

dist/cjs/models/User.js

@@ -12,3 +12,2 @@ "use strict";

class User {
// readonly acceptedTasks: TaskData[]
// readonly rejectedTasks: TaskData[]

@@ -23,3 +22,3 @@ constructor(data, connector) {

this.allocatedTasks = data.allocatedTasks;
// this.acceptedTasks = data.acceptedTasks
this.acceptedTasks = data.acceptedTasks;
// this.rejectedTasks = data.rejectedTasks

@@ -26,0 +25,0 @@ }

@@ -9,2 +9,3 @@ "use strict";

const User_1 = __importDefault(require("../../models/User"));
const types_1 = require("../../types");
function parseUser(result, connector) {

@@ -15,6 +16,9 @@ var _a;

throw new errors_1.ErrorUnexpectedResult('Unable to parse user.');
const allocatedTasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t);
const tasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t);
const allocatedTasks = tasks.filter((t) => t.status === types_1.ASSIGNED_STATUS);
const acceptedTasks = tasks.filter((t) => t.status === types_1.ACCEPTED_STATUS);
const data = {
...user,
allocatedTasks,
acceptedTasks,
};

@@ -21,0 +25,0 @@ return user ? new User_1.default(data, connector) : null;

@@ -10,2 +10,4 @@ import Config from './models/Config';

export declare const ALL_TASK_STATUSES: number[];
export declare const ASSIGNED_STATUS = "Assigned";
export declare const ACCEPTED_STATUS = "Accepted";
export interface ConfigData {

@@ -12,0 +14,0 @@ id: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ALL_TASK_STATUSES = void 0;
exports.ACCEPTED_STATUS = exports.ASSIGNED_STATUS = exports.ALL_TASK_STATUSES = void 0;
exports.ALL_TASK_STATUSES = [0, 1, 2, 3, 4, 5];
exports.ASSIGNED_STATUS = 'Assigned';
exports.ACCEPTED_STATUS = 'Accepted';
//# sourceMappingURL=types.js.map

@@ -9,4 +9,5 @@ import { IRoundRobinConnector, UserData, TaskData } from '../types';

readonly allocatedTasks: TaskData[];
readonly acceptedTasks: TaskData[];
constructor(data: UserData, connector: IRoundRobinConnector);
}
//# sourceMappingURL=User.d.ts.map

@@ -12,3 +12,2 @@ "use strict";

class User {
// readonly acceptedTasks: TaskData[]
// readonly rejectedTasks: TaskData[]

@@ -23,3 +22,3 @@ constructor(data, connector) {

this.allocatedTasks = data.allocatedTasks;
// this.acceptedTasks = data.acceptedTasks
this.acceptedTasks = data.acceptedTasks;
// this.rejectedTasks = data.rejectedTasks

@@ -26,0 +25,0 @@ }

@@ -9,2 +9,3 @@ "use strict";

const User_1 = __importDefault(require("../../models/User"));
const types_1 = require("../../types");
function parseUser(result, connector) {

@@ -15,6 +16,9 @@ var _a;

throw new errors_1.ErrorUnexpectedResult('Unable to parse user.');
const allocatedTasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t);
const tasks = (_a = user.allocatedTasks) === null || _a === void 0 ? void 0 : _a.map((t) => t);
const allocatedTasks = tasks.filter((t) => t.status === types_1.ASSIGNED_STATUS);
const acceptedTasks = tasks.filter((t) => t.status === types_1.ACCEPTED_STATUS);
const data = {
...user,
allocatedTasks,
acceptedTasks,
};

@@ -21,0 +25,0 @@ return user ? new User_1.default(data, connector) : null;

@@ -10,2 +10,4 @@ import Config from './models/Config';

export declare const ALL_TASK_STATUSES: number[];
export declare const ASSIGNED_STATUS = "Assigned";
export declare const ACCEPTED_STATUS = "Accepted";
export interface ConfigData {

@@ -12,0 +14,0 @@ id: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ALL_TASK_STATUSES = void 0;
exports.ACCEPTED_STATUS = exports.ASSIGNED_STATUS = exports.ALL_TASK_STATUSES = void 0;
exports.ALL_TASK_STATUSES = [0, 1, 2, 3, 4, 5];
exports.ASSIGNED_STATUS = 'Assigned';
exports.ACCEPTED_STATUS = 'Accepted';
//# sourceMappingURL=types.js.map
{
"name": "@p2pmodels/connect-round-robin",
"version": "1.0.0-beta.16",
"version": "1.0.0-beta.17",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc