@digibuffer/access 0.1.0 → 0.2.0
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.
- package/catalog.js +12 -0
- package/index.d.ts +5 -2
- package/package.json +1 -1
package/catalog.js
CHANGED
|
@@ -13,6 +13,9 @@ export const apps = Object.freeze({
|
|
|
13
13
|
knowledgehub: "KnowledgeHub",
|
|
14
14
|
digimail: "DigiMail",
|
|
15
15
|
digimarket: "DigiMarket",
|
|
16
|
+
digisender: "DigiSender",
|
|
17
|
+
preview: "Cloud Preview",
|
|
18
|
+
agentworkflows: "Agent Workflows",
|
|
16
19
|
});
|
|
17
20
|
|
|
18
21
|
/** @type {Readonly<Record<string, { app: keyof typeof apps; label: string; description: string; scope: "company" | "product" }>>} */
|
|
@@ -35,6 +38,15 @@ export const catalog = Object.freeze({
|
|
|
35
38
|
|
|
36
39
|
"digimarket.leads.view": { app: "digimarket", scope: "product", label: "See leads", description: "Leads, events and call tasks." },
|
|
37
40
|
"digimarket.rules.manage": { app: "digimarket", scope: "product", label: "Manage event rules", description: "Event rules, event keys and Notify support team." },
|
|
41
|
+
|
|
42
|
+
"digisender.use": { app: "digisender", scope: "company", label: "Use DigiSender", description: "Sign in and send: campaigns, templates, contacts." },
|
|
43
|
+
"digisender.admin": { app: "digisender", scope: "company", label: "DigiSender admin", description: "Sending domains, providers, API keys and settings." },
|
|
44
|
+
|
|
45
|
+
"preview.use": { app: "preview", scope: "company", label: "Use Cloud Preview", description: "Sign in; previews of the Workflow projects they're on." },
|
|
46
|
+
"preview.admin": { app: "preview", scope: "company", label: "Cloud Preview admin", description: "Every project's previews, servers, registries and placement." },
|
|
47
|
+
|
|
48
|
+
"agentworkflows.use": { app: "agentworkflows", scope: "company", label: "Use Agent Workflows", description: "Sign in and build and run their own workflows." },
|
|
49
|
+
"agentworkflows.admin": { app: "agentworkflows", scope: "company", label: "Agent Workflows admin", description: "Shared MCP servers, models, API keys and everyone's runs." },
|
|
38
50
|
});
|
|
39
51
|
|
|
40
52
|
export const isPermission = (name) => typeof name === "string" && Object.prototype.hasOwnProperty.call(catalog, name);
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export type AppKey = "billing" | "supportdesk" | "digichat" | "knowledgehub" | "digimail" | "digimarket";
|
|
1
|
+
export type AppKey = "billing" | "supportdesk" | "digichat" | "knowledgehub" | "digimail" | "digimarket" | "digisender" | "preview" | "agentworkflows";
|
|
2
2
|
export type Permission =
|
|
3
3
|
| "billing.customers.view" | "billing.refunds.request" | "billing.refunds.approve" | "billing.catalog.manage" | "billing.revenue.view"
|
|
4
4
|
| "supportdesk.agent" | "supportdesk.manage"
|
|
5
5
|
| "digichat.admin" | "digichat.channels.create"
|
|
6
6
|
| "knowledgehub.admin"
|
|
7
7
|
| "digimail.admin"
|
|
8
|
-
| "digimarket.leads.view" | "digimarket.rules.manage"
|
|
8
|
+
| "digimarket.leads.view" | "digimarket.rules.manage"
|
|
9
|
+
| "digisender.use" | "digisender.admin"
|
|
10
|
+
| "preview.use" | "preview.admin"
|
|
11
|
+
| "agentworkflows.use" | "agentworkflows.admin";
|
|
9
12
|
|
|
10
13
|
export interface PermissionInfo { app: AppKey; label: string; description: string; scope: "company" | "product" }
|
|
11
14
|
/** Permission → products ("*" for all) */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digibuffer/access",
|
|
3
3
|
"description": "DigiBuffer staff permissions: the catalog every app shares and the can() check. Holds no secrets and no list of who has what.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": ["index.js", "index.d.ts", "catalog.js", "README.md"],
|
|
7
7
|
"exports": {
|