@telos-dev-team/dealernode-permissions 1.1.45 → 1.1.47
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/dist/permissions.d.ts
CHANGED
|
@@ -153,6 +153,11 @@ export declare const PERMISSIONS: {
|
|
|
153
153
|
readonly VIEW: "arbitration.operations.view";
|
|
154
154
|
readonly MANAGE: "arbitration.operations.manage";
|
|
155
155
|
};
|
|
156
|
+
readonly FILES: {
|
|
157
|
+
readonly UPLOAD: "arbitration.files.upload";
|
|
158
|
+
readonly DOWNLOAD: "arbitration.files.download";
|
|
159
|
+
readonly DELETE: "arbitration.files.delete";
|
|
160
|
+
};
|
|
156
161
|
};
|
|
157
162
|
readonly ARBITRATION_ISSUE_TYPE: {
|
|
158
163
|
readonly OPERATIONS: {
|
package/dist/permissions.js
CHANGED
|
@@ -183,6 +183,11 @@ exports.PERMISSIONS = {
|
|
|
183
183
|
VIEW: "arbitration.operations.view",
|
|
184
184
|
MANAGE: "arbitration.operations.manage",
|
|
185
185
|
},
|
|
186
|
+
FILES: {
|
|
187
|
+
UPLOAD: "arbitration.files.upload",
|
|
188
|
+
DOWNLOAD: "arbitration.files.download",
|
|
189
|
+
DELETE: "arbitration.files.delete",
|
|
190
|
+
},
|
|
186
191
|
},
|
|
187
192
|
// ============================================
|
|
188
193
|
// ARBITRATION ISSUE TYPE
|
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;
|
package/src/permissions.ts
CHANGED
|
@@ -188,6 +188,11 @@ export const PERMISSIONS = {
|
|
|
188
188
|
VIEW: "arbitration.operations.view",
|
|
189
189
|
MANAGE: "arbitration.operations.manage",
|
|
190
190
|
},
|
|
191
|
+
FILES: {
|
|
192
|
+
UPLOAD: "arbitration.files.upload",
|
|
193
|
+
DOWNLOAD: "arbitration.files.download",
|
|
194
|
+
DELETE: "arbitration.files.delete",
|
|
195
|
+
},
|
|
191
196
|
},
|
|
192
197
|
|
|
193
198
|
// ============================================
|