2020-08-25 23:26:15 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// User postgres queries
|
2020-07-17 13:24:20 +03:00
|
|
|
import createUser from "~/node_common/data/methods/create-user";
|
|
|
|
import updateUserById from "~/node_common/data/methods/update-user-by-id";
|
|
|
|
import deleteUserByUsername from "~/node_common/data/methods/delete-user-by-username";
|
|
|
|
import getUserByUsername from "~/node_common/data/methods/get-user-by-username";
|
2020-07-22 13:51:40 +03:00
|
|
|
import getUserById from "~/node_common/data/methods/get-user-by-id";
|
2020-07-17 13:24:20 +03:00
|
|
|
|
2020-09-21 06:58:15 +03:00
|
|
|
//NOTE(martina):
|
|
|
|
// Pending user upload queries
|
|
|
|
import getPendingDataForUserId from "~/node_common/data/methods/get-pending-data-for-user-id";
|
2020-10-21 23:06:44 +03:00
|
|
|
import deletePendingDataByUserId from "~/node_common/data/methods/delete-pending-data-by-user-id";
|
2020-09-21 06:58:15 +03:00
|
|
|
import createPendingData from "~/node_common/data/methods/create-pending-data";
|
|
|
|
|
2020-08-25 23:26:15 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// Slate postgres queries
|
2020-07-25 03:16:35 +03:00
|
|
|
import createSlate from "~/node_common/data/methods/create-slate";
|
|
|
|
import getSlateByName from "~/node_common/data/methods/get-slate-by-name";
|
|
|
|
import getSlateById from "~/node_common/data/methods/get-slate-by-id";
|
2020-07-27 04:51:51 +03:00
|
|
|
import getSlatesByUserId from "~/node_common/data/methods/get-slates-by-user-id";
|
2020-07-25 03:16:35 +03:00
|
|
|
import updateSlateById from "~/node_common/data/methods/update-slate-by-id";
|
2020-08-03 01:06:46 +03:00
|
|
|
import deleteSlatesForUserId from "~/node_common/data/methods/delete-slates-for-user-id";
|
2020-08-07 05:17:49 +03:00
|
|
|
import deleteSlateById from "~/node_common/data/methods/delete-slate-by-id";
|
2020-10-21 23:06:44 +03:00
|
|
|
import deleteRepostsByCid from "~/node_common/data/methods/delete-reposts-by-cid";
|
2020-07-25 03:16:35 +03:00
|
|
|
|
2020-08-25 23:26:15 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// API postgres queries
|
2020-07-28 09:54:15 +03:00
|
|
|
import createAPIKeyForUserId from "~/node_common/data/methods/create-api-key-for-user-id";
|
|
|
|
import deleteAPIKeyById from "~/node_common/data/methods/delete-api-key-by-id";
|
|
|
|
import deleteAPIKeysForUserId from "~/node_common/data/methods/delete-api-keys-for-user-id";
|
|
|
|
import getAPIKey from "~/node_common/data/methods/get-api-key";
|
2020-07-29 02:08:38 +03:00
|
|
|
import getAPIKeyByKey from "~/node_common/data/methods/get-api-key-by-key";
|
2020-07-28 09:54:15 +03:00
|
|
|
import getAPIKeysByUserId from "~/node_common/data/methods/get-api-keys-by-user-id";
|
|
|
|
|
2020-08-25 23:26:15 +03:00
|
|
|
// NOTE(jim):
|
2020-08-26 00:23:45 +03:00
|
|
|
// Subscription postgres queries
|
2020-08-25 23:26:15 +03:00
|
|
|
import createSubscription from "~/node_common/data/methods/create-subscription";
|
2020-08-26 00:23:45 +03:00
|
|
|
import getSubscriptionById from "~/node_common/data/methods/get-subscription-by-id";
|
|
|
|
import getSubscriptionsByUserId from "~/node_common/data/methods/get-subscriptions-by-user-id";
|
|
|
|
import getSubscriptionsToUserId from "~/node_common/data/methods/get-subscriptions-to-user-id";
|
|
|
|
import getSubscriptionsToSlateId from "~/node_common/data/methods/get-subscriptions-to-slate-id";
|
2020-09-07 01:30:33 +03:00
|
|
|
import getSubscribersByUserId from "~/node_common/data/methods/get-subscribers-by-user-id";
|
2020-08-25 23:26:15 +03:00
|
|
|
import deleteSubscriptionById from "~/node_common/data/methods/delete-subscription-by-id";
|
|
|
|
|
2020-08-26 00:23:45 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// Trust postgres queries
|
|
|
|
import createTrustedRelationship from "~/node_common/data/methods/create-trusted-relationship";
|
2020-08-26 06:13:06 +03:00
|
|
|
import updateTrustedRelationshipById from "~/node_common/data/methods/update-trusted-relationship-by-id";
|
2020-08-26 00:26:03 +03:00
|
|
|
import getTrustedRelationshipsByUserId from "~/node_common/data/methods/get-trusted-relationships-by-user-id";
|
2020-08-26 13:03:39 +03:00
|
|
|
import getPendingTrustedRelationshipsByUserId from "~/node_common/data/methods/get-pending-trusted-relationships-by-user-id";
|
2020-08-26 00:23:45 +03:00
|
|
|
import getTrustedRelationshipByUserIds from "~/node_common/data/methods/get-trusted-relationship-by-ids";
|
|
|
|
import getTrustedRelationshipById from "~/node_common/data/methods/get-trusted-relationship-by-id";
|
|
|
|
import deleteTrustedRelationshipById from "~/node_common/data/methods/delete-trusted-relationship-by-id";
|
|
|
|
|
|
|
|
// NOTE(jim):
|
|
|
|
// Activity postgres queries
|
|
|
|
import createActivity from "~/node_common/data/methods/create-activity";
|
|
|
|
import getActivityForUserId from "~/node_common/data/methods/get-activity-for-user-id";
|
|
|
|
import getActivityForSlateId from "~/node_common/data/methods/get-activity-for-slate-id";
|
|
|
|
import getActivityById from "~/node_common/data/methods/get-activity-by-id";
|
|
|
|
import deleteActivityById from "~/node_common/data/methods/delete-activity-by-id";
|
|
|
|
|
2020-08-26 04:27:05 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// Search postgres queries
|
|
|
|
import querySlates from "~/node_common/data/methods/query-slates";
|
|
|
|
import queryUsers from "~/node_common/data/methods/query-users";
|
2020-08-28 01:05:20 +03:00
|
|
|
import getEverySlate from "~/node_common/data/methods/get-every-slate";
|
|
|
|
import getEveryUser from "~/node_common/data/methods/get-every-user";
|
2020-08-26 04:27:05 +03:00
|
|
|
|
2020-10-19 19:47:45 +03:00
|
|
|
// NOTE(jim):
|
|
|
|
// Deals
|
|
|
|
import getAllDeals from "~/node_common/data/methods/get-all-deals";
|
|
|
|
|
2020-07-22 13:51:40 +03:00
|
|
|
export {
|
2020-10-19 19:47:45 +03:00
|
|
|
getAllDeals,
|
2020-07-25 03:16:35 +03:00
|
|
|
// NOTE(jim): User operations.
|
2020-07-22 13:51:40 +03:00
|
|
|
createUser,
|
|
|
|
updateUserById,
|
|
|
|
deleteUserByUsername,
|
|
|
|
getUserByUsername,
|
|
|
|
getUserById,
|
2020-09-21 06:58:15 +03:00
|
|
|
// NOTE(martina): Pending user upload operations
|
|
|
|
getPendingDataForUserId,
|
2020-10-21 23:06:44 +03:00
|
|
|
deletePendingDataByUserId,
|
2020-09-21 06:58:15 +03:00
|
|
|
createPendingData,
|
2020-07-25 03:16:35 +03:00
|
|
|
// NOTE(jim): Slate operations.
|
|
|
|
createSlate,
|
|
|
|
getSlateByName,
|
|
|
|
getSlateById,
|
2020-07-27 04:51:51 +03:00
|
|
|
getSlatesByUserId,
|
2020-07-25 03:16:35 +03:00
|
|
|
updateSlateById,
|
2020-08-03 01:06:46 +03:00
|
|
|
deleteSlatesForUserId,
|
2020-08-07 05:17:49 +03:00
|
|
|
deleteSlateById,
|
2020-10-21 23:06:44 +03:00
|
|
|
deleteRepostsByCid,
|
2020-07-28 09:54:15 +03:00
|
|
|
// NOTE(jim): API key operations,
|
|
|
|
createAPIKeyForUserId,
|
|
|
|
deleteAPIKeyById,
|
|
|
|
deleteAPIKeysForUserId,
|
|
|
|
getAPIKey,
|
2020-07-29 02:08:38 +03:00
|
|
|
getAPIKeyByKey,
|
2020-07-28 09:54:15 +03:00
|
|
|
getAPIKeysByUserId,
|
2020-08-25 23:26:15 +03:00
|
|
|
// NOTE(jim): Subscription operations,
|
2020-08-26 00:23:45 +03:00
|
|
|
createSubscription,
|
|
|
|
getSubscriptionById,
|
2020-08-25 23:26:15 +03:00
|
|
|
getSubscriptionsByUserId,
|
2020-08-26 00:23:45 +03:00
|
|
|
getSubscriptionsToSlateId,
|
|
|
|
getSubscriptionsToUserId,
|
2020-09-07 01:30:33 +03:00
|
|
|
getSubscribersByUserId,
|
2020-08-26 00:23:45 +03:00
|
|
|
deleteSubscriptionById,
|
|
|
|
// NOTE(jim): Trust operations
|
|
|
|
createTrustedRelationship,
|
2020-08-26 06:13:06 +03:00
|
|
|
updateTrustedRelationshipById,
|
2020-08-26 13:03:39 +03:00
|
|
|
getPendingTrustedRelationshipsByUserId,
|
2020-08-26 00:23:45 +03:00
|
|
|
getTrustedRelationshipsByUserId,
|
|
|
|
getTrustedRelationshipByUserIds,
|
|
|
|
getTrustedRelationshipById,
|
|
|
|
deleteTrustedRelationshipById,
|
|
|
|
// NOTE(jim): Activity operations
|
|
|
|
createActivity,
|
|
|
|
getActivityForUserId,
|
|
|
|
getActivityForSlateId,
|
|
|
|
getActivityById,
|
|
|
|
deleteActivityById,
|
2020-08-26 04:27:05 +03:00
|
|
|
// NOTE(jim): Search
|
|
|
|
queryUsers,
|
|
|
|
querySlates,
|
2020-08-28 01:05:20 +03:00
|
|
|
getEverySlate,
|
|
|
|
getEveryUser,
|
2020-07-22 13:51:40 +03:00
|
|
|
};
|