Merge pull request #1715 from automatisch/AUT-698

refactor: rewrite usePaddleInfo and usePaymentPlans with RQ
This commit is contained in:
Ali BARIN
2024-03-13 09:20:39 +01:00
committed by GitHub
10 changed files with 59 additions and 78 deletions

View File

@@ -1,10 +0,0 @@
import appConfig from '../../config/app.js';
import Billing from '../../helpers/billing/index.ee.js';
const getPaddleInfo = async () => {
if (!appConfig.isCloud) return;
return Billing.paddleInfo;
};
export default getPaddleInfo;

View File

@@ -1,10 +0,0 @@
import appConfig from '../../config/app.js';
import Billing from '../../helpers/billing/index.ee.js';
const getPaymentPlans = async () => {
if (!appConfig.isCloud) return;
return Billing.paddlePlans;
};
export default getPaymentPlans;

View File

@@ -11,8 +11,6 @@ import getFlow from './queries/get-flow.js';
import getFlows from './queries/get-flows.js';
import getInvoices from './queries/get-invoices.ee.js';
import getNotifications from './queries/get-notifications.js';
import getPaddleInfo from './queries/get-paddle-info.ee.js';
import getPaymentPlans from './queries/get-payment-plans.ee.js';
import getPermissionCatalog from './queries/get-permission-catalog.ee.js';
import getRole from './queries/get-role.ee.js';
import getRoles from './queries/get-roles.ee.js';
@@ -41,8 +39,6 @@ const queryResolvers = {
getFlows,
getInvoices,
getNotifications,
getPaddleInfo,
getPaymentPlans,
getPermissionCatalog,
getRole,
getRoles,

View File

@@ -27,8 +27,6 @@ type Query {
getCurrentUser: User
getConfig(keys: [String]): JSONObject
getInvoices: [Invoice]
getPaddleInfo: GetPaddleInfo
getPaymentPlans: [PaymentPlan]
getPermissionCatalog: PermissionCatalog
getRole(id: String!): Role
getRoles: [Role]
@@ -660,11 +658,6 @@ type Usage {
task: Int
}
type GetPaddleInfo {
sandbox: Boolean
vendorId: Int
}
type Invoice {
id: Int
amount: Float
@@ -673,13 +666,6 @@ type Invoice {
receipt_url: String
}
type PaymentPlan {
name: String
limit: String
price: String
productId: String
}
type ListSamlAuthProvider {
id: String
name: String