@mercurjs/dashboard-sdk 2.3.6-canary.3 → 2.3.6-canary.5
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/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BuiltMercurConfig, M as MercurConfig, P as PERMISSION_RIGHT_RANK, a as Permission, b as PermissionKey, c as
|
|
1
|
+
export { B as BuiltMercurConfig, M as MercurConfig, P as PERMISSION_RIGHT_RANK, a as Permission, b as PermissionKey, c as PermissionKeys, d as PermissionMap, e as PermissionRight, f as PermissionsContextValue, R as RouteConfig, g as RouteHandle, h as buildPermission, p as parsePermission, s as satisfiesPermission } from './types-Cziny1v0.cjs';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BuiltMercurConfig, M as MercurConfig, P as PERMISSION_RIGHT_RANK, a as Permission, b as PermissionKey, c as
|
|
1
|
+
export { B as BuiltMercurConfig, M as MercurConfig, P as PERMISSION_RIGHT_RANK, a as Permission, b as PermissionKey, c as PermissionKeys, d as PermissionMap, e as PermissionRight, f as PermissionsContextValue, R as RouteConfig, g as RouteHandle, h as buildPermission, p as parsePermission, s as satisfiesPermission } from './types-Cziny1v0.js';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -8,7 +8,70 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
8
8
|
* (`packages/core/src/permissions/definitions`). Rights nest:
|
|
9
9
|
* `manage` implies `edit`, `edit` implies `view`.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Registry of permission keys. Plugins add their own keys through declaration
|
|
13
|
+
* merging:
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* declare module "@mercurjs/dashboard-sdk" {
|
|
17
|
+
* interface PermissionKeys {
|
|
18
|
+
* messaging: true
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
interface PermissionKeys {
|
|
23
|
+
"sellers": true;
|
|
24
|
+
"sellers.approval": true;
|
|
25
|
+
"sellers.premium": true;
|
|
26
|
+
"members": true;
|
|
27
|
+
"members.invites": true;
|
|
28
|
+
"roles": true;
|
|
29
|
+
"roles.owner": true;
|
|
30
|
+
"orders": true;
|
|
31
|
+
"orders.refunds": true;
|
|
32
|
+
"orders.returns": true;
|
|
33
|
+
"orders.edits": true;
|
|
34
|
+
"order_groups": true;
|
|
35
|
+
"payments": true;
|
|
36
|
+
"customers": true;
|
|
37
|
+
"customer_groups": true;
|
|
38
|
+
"products": true;
|
|
39
|
+
"products.review": true;
|
|
40
|
+
"product_changes": true;
|
|
41
|
+
"product_categories": true;
|
|
42
|
+
"product_collections": true;
|
|
43
|
+
"product_types": true;
|
|
44
|
+
"product_tags": true;
|
|
45
|
+
"product_attributes": true;
|
|
46
|
+
"offers": true;
|
|
47
|
+
"inventory_items": true;
|
|
48
|
+
"reservations": true;
|
|
49
|
+
"stock_locations": true;
|
|
50
|
+
"price_lists": true;
|
|
51
|
+
"price_preferences": true;
|
|
52
|
+
"promotions": true;
|
|
53
|
+
"campaigns": true;
|
|
54
|
+
"commission_rates": true;
|
|
55
|
+
"commission_lines": true;
|
|
56
|
+
"payouts": true;
|
|
57
|
+
"payout_accounts": true;
|
|
58
|
+
"shipping_profiles": true;
|
|
59
|
+
"shipping_options": true;
|
|
60
|
+
"fulfillment_sets": true;
|
|
61
|
+
"regions": true;
|
|
62
|
+
"tax_regions": true;
|
|
63
|
+
"store": true;
|
|
64
|
+
"sales_channels": true;
|
|
65
|
+
"return_reasons": true;
|
|
66
|
+
"refund_reasons": true;
|
|
67
|
+
"users": true;
|
|
68
|
+
"api_keys": true;
|
|
69
|
+
"translations": true;
|
|
70
|
+
"notifications": true;
|
|
71
|
+
"workflow_executions": true;
|
|
72
|
+
"reviews": true;
|
|
73
|
+
}
|
|
74
|
+
type PermissionKey = Extract<keyof PermissionKeys, string>;
|
|
12
75
|
type PermissionRight = "view" | "edit" | "manage";
|
|
13
76
|
type Permission = `${PermissionKey}:${PermissionRight}`;
|
|
14
77
|
/** Effective rights of the acting user, as returned by `fields=+permissions`. */
|
|
@@ -123,4 +186,4 @@ type RouteHandle = {
|
|
|
123
186
|
breadcrumb?: (match: never) => ReactNode;
|
|
124
187
|
};
|
|
125
188
|
|
|
126
|
-
export { type BuiltMercurConfig as B, type MercurConfig as M, PERMISSION_RIGHT_RANK as P, type RouteConfig as R, type Permission as a, type PermissionKey as b, type
|
|
189
|
+
export { type BuiltMercurConfig as B, type MercurConfig as M, PERMISSION_RIGHT_RANK as P, type RouteConfig as R, type Permission as a, type PermissionKey as b, type PermissionKeys as c, type PermissionMap as d, type PermissionRight as e, type PermissionsContextValue as f, type RouteHandle as g, buildPermission as h, parsePermission as p, satisfiesPermission as s };
|
|
@@ -8,7 +8,70 @@ import { ComponentType, ReactNode } from 'react';
|
|
|
8
8
|
* (`packages/core/src/permissions/definitions`). Rights nest:
|
|
9
9
|
* `manage` implies `edit`, `edit` implies `view`.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Registry of permission keys. Plugins add their own keys through declaration
|
|
13
|
+
* merging:
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* declare module "@mercurjs/dashboard-sdk" {
|
|
17
|
+
* interface PermissionKeys {
|
|
18
|
+
* messaging: true
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
interface PermissionKeys {
|
|
23
|
+
"sellers": true;
|
|
24
|
+
"sellers.approval": true;
|
|
25
|
+
"sellers.premium": true;
|
|
26
|
+
"members": true;
|
|
27
|
+
"members.invites": true;
|
|
28
|
+
"roles": true;
|
|
29
|
+
"roles.owner": true;
|
|
30
|
+
"orders": true;
|
|
31
|
+
"orders.refunds": true;
|
|
32
|
+
"orders.returns": true;
|
|
33
|
+
"orders.edits": true;
|
|
34
|
+
"order_groups": true;
|
|
35
|
+
"payments": true;
|
|
36
|
+
"customers": true;
|
|
37
|
+
"customer_groups": true;
|
|
38
|
+
"products": true;
|
|
39
|
+
"products.review": true;
|
|
40
|
+
"product_changes": true;
|
|
41
|
+
"product_categories": true;
|
|
42
|
+
"product_collections": true;
|
|
43
|
+
"product_types": true;
|
|
44
|
+
"product_tags": true;
|
|
45
|
+
"product_attributes": true;
|
|
46
|
+
"offers": true;
|
|
47
|
+
"inventory_items": true;
|
|
48
|
+
"reservations": true;
|
|
49
|
+
"stock_locations": true;
|
|
50
|
+
"price_lists": true;
|
|
51
|
+
"price_preferences": true;
|
|
52
|
+
"promotions": true;
|
|
53
|
+
"campaigns": true;
|
|
54
|
+
"commission_rates": true;
|
|
55
|
+
"commission_lines": true;
|
|
56
|
+
"payouts": true;
|
|
57
|
+
"payout_accounts": true;
|
|
58
|
+
"shipping_profiles": true;
|
|
59
|
+
"shipping_options": true;
|
|
60
|
+
"fulfillment_sets": true;
|
|
61
|
+
"regions": true;
|
|
62
|
+
"tax_regions": true;
|
|
63
|
+
"store": true;
|
|
64
|
+
"sales_channels": true;
|
|
65
|
+
"return_reasons": true;
|
|
66
|
+
"refund_reasons": true;
|
|
67
|
+
"users": true;
|
|
68
|
+
"api_keys": true;
|
|
69
|
+
"translations": true;
|
|
70
|
+
"notifications": true;
|
|
71
|
+
"workflow_executions": true;
|
|
72
|
+
"reviews": true;
|
|
73
|
+
}
|
|
74
|
+
type PermissionKey = Extract<keyof PermissionKeys, string>;
|
|
12
75
|
type PermissionRight = "view" | "edit" | "manage";
|
|
13
76
|
type Permission = `${PermissionKey}:${PermissionRight}`;
|
|
14
77
|
/** Effective rights of the acting user, as returned by `fields=+permissions`. */
|
|
@@ -123,4 +186,4 @@ type RouteHandle = {
|
|
|
123
186
|
breadcrumb?: (match: never) => ReactNode;
|
|
124
187
|
};
|
|
125
188
|
|
|
126
|
-
export { type BuiltMercurConfig as B, type MercurConfig as M, PERMISSION_RIGHT_RANK as P, type RouteConfig as R, type Permission as a, type PermissionKey as b, type
|
|
189
|
+
export { type BuiltMercurConfig as B, type MercurConfig as M, PERMISSION_RIGHT_RANK as P, type RouteConfig as R, type Permission as a, type PermissionKey as b, type PermissionKeys as c, type PermissionMap as d, type PermissionRight as e, type PermissionsContextValue as f, type RouteHandle as g, buildPermission as h, parsePermission as p, satisfiesPermission as s };
|
package/dist/vite.d.cts
CHANGED
package/dist/vite.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercurjs/dashboard-sdk",
|
|
3
|
-
"version": "2.3.6-canary.
|
|
3
|
+
"version": "2.3.6-canary.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mercurjs/mercur",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "tsup --watch",
|
|
33
33
|
"build": "tsup",
|
|
34
|
+
"test:types": "tsc -p src/__tests__/types",
|
|
34
35
|
"lint": "oxlint --max-warnings 0"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|