@p2pmodels/connect-round-robin
Advanced tools
Comparing version 1.0.0-beta.13 to 1.0.0-beta.14
@@ -17,3 +17,3 @@ import { Address, SubscriptionHandler } from '@aragon/connect-core'; | ||
}): Promise<Task[]>; | ||
onTasksForUser(userId: string, statuses: number[], { first, skip }: { | ||
onTasksForUser(userId: string, statuses: number[] | undefined, { first, skip }: { | ||
first?: number | undefined; | ||
@@ -20,0 +20,0 @@ skip?: number | undefined; |
@@ -17,2 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const types_1 = require("../types"); | ||
class RoundRobin { | ||
@@ -40,3 +41,3 @@ constructor(connector, address) { | ||
} | ||
onTasksForUser(userId, statuses, { first = 1000, skip = 0 } = {}, callback) { | ||
onTasksForUser(userId, statuses = types_1.ALL_TASK_STATUSES, { first = 1000, skip = 0 } = {}, callback) { | ||
return __classPrivateFieldGet(this, _connector).onTasksForUser(__classPrivateFieldGet(this, _address), userId, statuses, first, skip, callback); | ||
@@ -43,0 +44,0 @@ } |
@@ -83,3 +83,3 @@ "use strict"; | ||
console.log(statuses); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, statuses, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
} | ||
@@ -86,0 +86,0 @@ async rejectedTasksForUser(appAddress, userId |
@@ -17,6 +17,5 @@ "use strict"; | ||
exports.USER_TASKS_BY_STATUS = (type) => graphql_tag_1.default ` | ||
${type} Tasks($appAddress: string!, $userId: ID!, $statuses: [Int]!, $first: Int!, $skip: Int!) { | ||
${type} Tasks($appAddress: string!, $userId: ID!, $first: Int!, $skip: Int!) { | ||
tasks(where: { | ||
appAddress: $appAddress, | ||
statusInt_in: $statuses, | ||
assignee: $userId | ||
@@ -27,5 +26,19 @@ }, first: $first, skip: $skip) { | ||
reallocationTime | ||
status | ||
} | ||
} | ||
`; | ||
// export const USER_TASKS_BY_STATUS = (type: string) => gql` | ||
// ${type} Tasks($appAddress: string!, $userId: ID!, $statuses: [Int]!, $first: Int!, $skip: Int!) { | ||
// tasks(where: { | ||
// appAddress: $appAddress, | ||
// statusInt_in: $statuses, | ||
// assignee: $userId | ||
// }, first: $first, skip: $skip) { | ||
// id | ||
// endDate | ||
// reallocationTime | ||
// } | ||
// } | ||
// ` | ||
exports.USER = (type) => graphql_tag_1.default ` | ||
@@ -32,0 +45,0 @@ ${type} User($id: String!) { |
@@ -17,3 +17,3 @@ import { Address, SubscriptionHandler } from '@aragon/connect-core'; | ||
}): Promise<Task[]>; | ||
onTasksForUser(userId: string, statuses: number[], { first, skip }: { | ||
onTasksForUser(userId: string, statuses: number[] | undefined, { first, skip }: { | ||
first?: number | undefined; | ||
@@ -20,0 +20,0 @@ skip?: number | undefined; |
@@ -17,2 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const types_1 = require("../types"); | ||
class RoundRobin { | ||
@@ -40,3 +41,3 @@ constructor(connector, address) { | ||
} | ||
onTasksForUser(userId, statuses, { first = 1000, skip = 0 } = {}, callback) { | ||
onTasksForUser(userId, statuses = types_1.ALL_TASK_STATUSES, { first = 1000, skip = 0 } = {}, callback) { | ||
return __classPrivateFieldGet(this, _connector).onTasksForUser(__classPrivateFieldGet(this, _address), userId, statuses, first, skip, callback); | ||
@@ -43,0 +44,0 @@ } |
@@ -83,3 +83,3 @@ "use strict"; | ||
console.log(statuses); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, statuses, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
return __classPrivateFieldGet(this, _gql).subscribeToQueryWithParser(queries.USER_TASKS_BY_STATUS('subscription'), { appAddress, userId: id, first, skip }, callback, (result) => parsers_1.parseTasks(result, this)); | ||
} | ||
@@ -86,0 +86,0 @@ async rejectedTasksForUser(appAddress, userId |
@@ -17,6 +17,5 @@ "use strict"; | ||
exports.USER_TASKS_BY_STATUS = (type) => graphql_tag_1.default ` | ||
${type} Tasks($appAddress: string!, $userId: ID!, $statuses: [Int]!, $first: Int!, $skip: Int!) { | ||
${type} Tasks($appAddress: string!, $userId: ID!, $first: Int!, $skip: Int!) { | ||
tasks(where: { | ||
appAddress: $appAddress, | ||
statusInt_in: $statuses, | ||
assignee: $userId | ||
@@ -27,5 +26,19 @@ }, first: $first, skip: $skip) { | ||
reallocationTime | ||
status | ||
} | ||
} | ||
`; | ||
// export const USER_TASKS_BY_STATUS = (type: string) => gql` | ||
// ${type} Tasks($appAddress: string!, $userId: ID!, $statuses: [Int]!, $first: Int!, $skip: Int!) { | ||
// tasks(where: { | ||
// appAddress: $appAddress, | ||
// statusInt_in: $statuses, | ||
// assignee: $userId | ||
// }, first: $first, skip: $skip) { | ||
// id | ||
// endDate | ||
// reallocationTime | ||
// } | ||
// } | ||
// ` | ||
exports.USER = (type) => graphql_tag_1.default ` | ||
@@ -32,0 +45,0 @@ ${type} User($id: String!) { |
{ | ||
"name": "@p2pmodels/connect-round-robin", | ||
"version": "1.0.0-beta.13", | ||
"version": "1.0.0-beta.14", | ||
"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
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
634771
1460