@telos-dev-team/dealernode-permissions 1.1.45 → 1.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,6 +63,21 @@ export declare const BACKOFFICE_PERMISSIONS: {
|
|
|
63
63
|
readonly VIEW: "backoffice.dealer_roles.view";
|
|
64
64
|
readonly MANAGE: "backoffice.dealer_roles.manage";
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
|
|
68
|
+
* global charge provider, dealer subscriptions, cards and invoices. Not
|
|
69
|
+
* PAYMENTS, which is what a dealer charges its own buyers.
|
|
70
|
+
*/
|
|
71
|
+
readonly BILLING: {
|
|
72
|
+
readonly VIEW: "backoffice.billing.view";
|
|
73
|
+
readonly MANAGE: "backoffice.billing.manage";
|
|
74
|
+
/**
|
|
75
|
+
* Load and change the platform's merchant credentials on each charge
|
|
76
|
+
* provider. Separate from MANAGE because these keys move money: whoever
|
|
77
|
+
* manages plans and subscriptions doesn't need to be able to change them.
|
|
78
|
+
*/
|
|
79
|
+
readonly CREDENTIALS: "backoffice.billing.credentials";
|
|
80
|
+
};
|
|
66
81
|
};
|
|
67
82
|
export type BackofficePermission = typeof BACKOFFICE_PERMISSIONS;
|
|
68
83
|
/**
|
|
@@ -82,10 +97,10 @@ export type BackofficePermissionId = Leaves<BackofficePermission>;
|
|
|
82
97
|
*/
|
|
83
98
|
export declare const BACKOFFICE_PERMISSION_PRESETS: {
|
|
84
99
|
/** Every `*.view` permission, nothing else. */
|
|
85
|
-
readonly READ_ONLY: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[];
|
|
100
|
+
readonly READ_ONLY: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[];
|
|
86
101
|
/** Read-only plus the two areas support routinely needs to act on. */
|
|
87
|
-
readonly SUPPORT: readonly [...("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[], "backoffice.dealers.manage", "backoffice.dealer_resources.manage"];
|
|
102
|
+
readonly SUPPORT: readonly [...("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[], "backoffice.dealers.manage", "backoffice.dealer_resources.manage"];
|
|
88
103
|
/** Every backoffice permission. */
|
|
89
|
-
readonly ADMIN: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[];
|
|
104
|
+
readonly ADMIN: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[];
|
|
90
105
|
};
|
|
91
106
|
export {};
|
|
@@ -66,6 +66,21 @@ exports.BACKOFFICE_PERMISSIONS = {
|
|
|
66
66
|
VIEW: "backoffice.dealer_roles.view",
|
|
67
67
|
MANAGE: "backoffice.dealer_roles.manage",
|
|
68
68
|
},
|
|
69
|
+
/**
|
|
70
|
+
* Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
|
|
71
|
+
* global charge provider, dealer subscriptions, cards and invoices. Not
|
|
72
|
+
* PAYMENTS, which is what a dealer charges its own buyers.
|
|
73
|
+
*/
|
|
74
|
+
BILLING: {
|
|
75
|
+
VIEW: "backoffice.billing.view",
|
|
76
|
+
MANAGE: "backoffice.billing.manage",
|
|
77
|
+
/**
|
|
78
|
+
* Load and change the platform's merchant credentials on each charge
|
|
79
|
+
* provider. Separate from MANAGE because these keys move money: whoever
|
|
80
|
+
* manages plans and subscriptions doesn't need to be able to change them.
|
|
81
|
+
*/
|
|
82
|
+
CREDENTIALS: "backoffice.billing.credentials",
|
|
83
|
+
},
|
|
69
84
|
};
|
|
70
85
|
function flatten(node) {
|
|
71
86
|
const values = [];
|
package/package.json
CHANGED
|
@@ -63,6 +63,21 @@ export const BACKOFFICE_PERMISSIONS = {
|
|
|
63
63
|
VIEW: "backoffice.dealer_roles.view",
|
|
64
64
|
MANAGE: "backoffice.dealer_roles.manage",
|
|
65
65
|
},
|
|
66
|
+
/**
|
|
67
|
+
* Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
|
|
68
|
+
* global charge provider, dealer subscriptions, cards and invoices. Not
|
|
69
|
+
* PAYMENTS, which is what a dealer charges its own buyers.
|
|
70
|
+
*/
|
|
71
|
+
BILLING: {
|
|
72
|
+
VIEW: "backoffice.billing.view",
|
|
73
|
+
MANAGE: "backoffice.billing.manage",
|
|
74
|
+
/**
|
|
75
|
+
* Load and change the platform's merchant credentials on each charge
|
|
76
|
+
* provider. Separate from MANAGE because these keys move money: whoever
|
|
77
|
+
* manages plans and subscriptions doesn't need to be able to change them.
|
|
78
|
+
*/
|
|
79
|
+
CREDENTIALS: "backoffice.billing.credentials",
|
|
80
|
+
},
|
|
66
81
|
} as const;
|
|
67
82
|
|
|
68
83
|
export type BackofficePermission = typeof BACKOFFICE_PERMISSIONS;
|