@kernhq/module-inventory 0.2.0 → 0.3.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.
Files changed (193) hide show
  1. package/README.md +104 -25
  2. package/dist/contract/capabilities.d.ts +4 -4
  3. package/dist/contract/capabilities.d.ts.map +1 -1
  4. package/dist/contract/capabilities.js +51 -9
  5. package/dist/contract/capabilities.js.map +1 -1
  6. package/dist/contract/events.d.ts +43 -0
  7. package/dist/contract/events.d.ts.map +1 -1
  8. package/dist/contract/events.js +40 -0
  9. package/dist/contract/events.js.map +1 -1
  10. package/dist/contract/index.d.ts +1 -0
  11. package/dist/contract/index.d.ts.map +1 -1
  12. package/dist/contract/index.js +1 -0
  13. package/dist/contract/index.js.map +1 -1
  14. package/dist/contract/models.d.ts +322 -0
  15. package/dist/contract/models.d.ts.map +1 -1
  16. package/dist/contract/models.js +213 -0
  17. package/dist/contract/models.js.map +1 -1
  18. package/dist/contract/notifications.d.ts +24 -0
  19. package/dist/contract/notifications.d.ts.map +1 -0
  20. package/dist/contract/notifications.js +72 -0
  21. package/dist/contract/notifications.js.map +1 -0
  22. package/dist/contract/permissions.d.ts +52 -2
  23. package/dist/contract/permissions.d.ts.map +1 -1
  24. package/dist/contract/permissions.js +55 -2
  25. package/dist/contract/permissions.js.map +1 -1
  26. package/dist/contract/router.d.ts +1052 -0
  27. package/dist/contract/router.d.ts.map +1 -1
  28. package/dist/contract/router.js +225 -1
  29. package/dist/contract/router.js.map +1 -1
  30. package/dist/contract/settings.d.ts +2 -0
  31. package/dist/contract/settings.d.ts.map +1 -1
  32. package/dist/contract/settings.js +24 -4
  33. package/dist/contract/settings.js.map +1 -1
  34. package/dist/server/index.d.ts +8 -4
  35. package/dist/server/index.d.ts.map +1 -1
  36. package/dist/server/index.js +289 -5
  37. package/dist/server/index.js.map +1 -1
  38. package/dist/server/jobs.d.ts +48 -0
  39. package/dist/server/jobs.d.ts.map +1 -0
  40. package/dist/server/jobs.js +358 -0
  41. package/dist/server/jobs.js.map +1 -0
  42. package/dist/server/router.d.ts +1337 -0
  43. package/dist/server/router.d.ts.map +1 -1
  44. package/dist/server/router.js +363 -7
  45. package/dist/server/router.js.map +1 -1
  46. package/dist/server/schema.d.ts +134 -1
  47. package/dist/server/schema.d.ts.map +1 -1
  48. package/dist/server/schema.js +158 -4
  49. package/dist/server/schema.js.map +1 -1
  50. package/dist/server/services/assets.d.ts +69 -3
  51. package/dist/server/services/assets.d.ts.map +1 -1
  52. package/dist/server/services/assets.js +199 -31
  53. package/dist/server/services/assets.js.map +1 -1
  54. package/dist/server/services/attachments.d.ts +80 -0
  55. package/dist/server/services/attachments.d.ts.map +1 -0
  56. package/dist/server/services/attachments.js +182 -0
  57. package/dist/server/services/attachments.js.map +1 -0
  58. package/dist/server/services/audience.d.ts +15 -0
  59. package/dist/server/services/audience.d.ts.map +1 -0
  60. package/dist/server/services/audience.js +64 -0
  61. package/dist/server/services/audience.js.map +1 -0
  62. package/dist/server/services/categories.d.ts +57 -0
  63. package/dist/server/services/categories.d.ts.map +1 -0
  64. package/dist/server/services/categories.js +124 -0
  65. package/dist/server/services/categories.js.map +1 -0
  66. package/dist/server/services/cursor.d.ts +68 -0
  67. package/dist/server/services/cursor.d.ts.map +1 -0
  68. package/dist/server/services/cursor.js +39 -0
  69. package/dist/server/services/cursor.js.map +1 -0
  70. package/dist/server/services/custody.d.ts +175 -0
  71. package/dist/server/services/custody.d.ts.map +1 -0
  72. package/dist/server/services/custody.js +367 -0
  73. package/dist/server/services/custody.js.map +1 -0
  74. package/dist/server/services/db-errors.d.ts +7 -0
  75. package/dist/server/services/db-errors.d.ts.map +1 -0
  76. package/dist/server/services/db-errors.js +32 -0
  77. package/dist/server/services/db-errors.js.map +1 -0
  78. package/dist/server/services/index.d.ts +16 -0
  79. package/dist/server/services/index.d.ts.map +1 -1
  80. package/dist/server/services/index.js +25 -1
  81. package/dist/server/services/index.js.map +1 -1
  82. package/dist/server/services/members.d.ts +27 -0
  83. package/dist/server/services/members.d.ts.map +1 -0
  84. package/dist/server/services/members.js +39 -0
  85. package/dist/server/services/members.js.map +1 -0
  86. package/dist/server/services/notify.d.ts +43 -1
  87. package/dist/server/services/notify.d.ts.map +1 -1
  88. package/dist/server/services/notify.js +47 -5
  89. package/dist/server/services/notify.js.map +1 -1
  90. package/dist/server/services/offboarding.d.ts +70 -0
  91. package/dist/server/services/offboarding.d.ts.map +1 -0
  92. package/dist/server/services/offboarding.js +116 -0
  93. package/dist/server/services/offboarding.js.map +1 -0
  94. package/dist/server/services/repairs.d.ts +204 -0
  95. package/dist/server/services/repairs.d.ts.map +1 -0
  96. package/dist/server/services/repairs.js +476 -0
  97. package/dist/server/services/repairs.js.map +1 -0
  98. package/dist/server/services/search.d.ts +85 -0
  99. package/dist/server/services/search.d.ts.map +1 -0
  100. package/dist/server/services/search.js +142 -0
  101. package/dist/server/services/search.js.map +1 -0
  102. package/dist/server/services/stats.d.ts +42 -0
  103. package/dist/server/services/stats.d.ts.map +1 -0
  104. package/dist/server/services/stats.js +80 -0
  105. package/dist/server/services/stats.js.map +1 -0
  106. package/dist/server/services/status.d.ts +102 -0
  107. package/dist/server/services/status.d.ts.map +1 -0
  108. package/dist/server/services/status.js +71 -0
  109. package/dist/server/services/status.js.map +1 -0
  110. package/migrations/0002_custody_and_categories.sql +23 -0
  111. package/migrations/0003_repairs.sql +23 -0
  112. package/migrations/0004_platform_surfaces.sql +51 -0
  113. package/migrations/0005_repair_dates.sql +35 -0
  114. package/migrations/0006_workspace_registry_read.sql +50 -0
  115. package/migrations/0007_history_sequence.sql +83 -0
  116. package/migrations/meta/0002_snapshot.json +1054 -0
  117. package/migrations/meta/0003_snapshot.json +1070 -0
  118. package/migrations/meta/0004_snapshot.json +1130 -0
  119. package/migrations/meta/0005_snapshot.json +1135 -0
  120. package/migrations/meta/_journal.json +42 -0
  121. package/package.json +1 -1
  122. package/src/client/api-instance.ts +27 -2
  123. package/src/client/bidi.test.ts +148 -0
  124. package/src/client/bidi.ts +85 -0
  125. package/src/client/components/AssetDetailPanel.svelte +614 -0
  126. package/src/client/components/AssetFormDialog.svelte +71 -22
  127. package/src/client/components/AssetPhoto.svelte +178 -0
  128. package/src/client/components/AttachmentsSection.svelte +327 -0
  129. package/src/client/components/CustodyDialog.svelte +201 -0
  130. package/src/client/components/RepairDialog.svelte +271 -0
  131. package/src/client/components/RepairsSection.svelte +318 -0
  132. package/src/client/components/Timeline.svelte +347 -0
  133. package/src/client/components/TimelineText.svelte +124 -0
  134. package/src/client/core-api.ts +71 -0
  135. package/src/client/custody.test.ts +31 -0
  136. package/src/client/custody.ts +34 -0
  137. package/src/client/errors.test.ts +365 -0
  138. package/src/client/errors.ts +201 -0
  139. package/src/client/links.test.ts +74 -0
  140. package/src/client/links.ts +44 -0
  141. package/src/client/members.test.ts +132 -0
  142. package/src/client/members.ts +116 -0
  143. package/src/client/messages.test.ts +127 -0
  144. package/src/client/messages.ts +1043 -18
  145. package/src/client/mock.test.ts +395 -1
  146. package/src/client/mock.ts +1066 -79
  147. package/src/client/module.ts +54 -0
  148. package/src/client/pages/AssetsPage.svelte +317 -45
  149. package/src/client/permissions.ts +7 -0
  150. package/src/client/price.test.ts +151 -3
  151. package/src/client/price.ts +155 -11
  152. package/src/client/query.ts +36 -0
  153. package/src/client/repairs.test.ts +38 -0
  154. package/src/client/repairs.ts +38 -0
  155. package/src/client/settings/CategoriesSettings.svelte +421 -0
  156. package/src/client/settings/GeneralSettings.svelte +0 -0
  157. package/src/client/status.ts +29 -0
  158. package/src/client/timeline.test.ts +175 -0
  159. package/src/client/timeline.ts +206 -0
  160. package/src/client/widgets/OverviewWidget.svelte +127 -26
  161. package/src/client/widgets/RepairsWidget.svelte +124 -0
  162. package/src/contract/capabilities.ts +53 -9
  163. package/src/contract/events.ts +49 -0
  164. package/src/contract/index.ts +1 -0
  165. package/src/contract/models.ts +237 -0
  166. package/src/contract/notifications.ts +73 -0
  167. package/src/contract/permissions.ts +55 -2
  168. package/src/contract/router.ts +255 -1
  169. package/src/contract/settings.ts +24 -4
  170. package/src/module.test.ts +194 -4
  171. package/src/server/index.ts +311 -4
  172. package/src/server/inventory.int.test.ts +3573 -18
  173. package/src/server/jobs.ts +444 -0
  174. package/src/server/migrations.test.ts +113 -0
  175. package/src/server/router.ts +462 -6
  176. package/src/server/schema.ts +160 -3
  177. package/src/server/services/assets.ts +214 -54
  178. package/src/server/services/attachments.ts +215 -0
  179. package/src/server/services/audience.ts +77 -0
  180. package/src/server/services/categories.ts +136 -0
  181. package/src/server/services/cursor.ts +104 -0
  182. package/src/server/services/custody.ts +471 -0
  183. package/src/server/services/db-errors.ts +42 -0
  184. package/src/server/services/index.ts +34 -1
  185. package/src/server/services/members.ts +54 -0
  186. package/src/server/services/notify.ts +52 -7
  187. package/src/server/services/offboarding.ts +150 -0
  188. package/src/server/services/repairs.ts +567 -0
  189. package/src/server/services/search.ts +166 -0
  190. package/src/server/services/stats.ts +88 -0
  191. package/src/server/services/status.test.ts +34 -0
  192. package/src/server/services/status.ts +143 -0
  193. package/src/client/settings/core-api.ts +0 -32
@@ -0,0 +1,72 @@
1
+ /**
2
+ * What Inventory will interrupt somebody about.
3
+ *
4
+ * Four things, and each of them changes what somebody has to *do*. That is the test: a rename, a new
5
+ * category, an item coming back — those are facts a screen shows when somebody looks, and a
6
+ * notification type nobody wants is a notification type everybody switches off along with the one
7
+ * that mattered.
8
+ *
9
+ * A type declared here and never sent is the same lie as a permission nothing checks. Each of these
10
+ * names its sender, and every one of them exists:
11
+ *
12
+ * - `custody.assigned` — `CustodyService`, on `assign` and `transfer`.
13
+ * - `warranty.expiring` — the `warranty-sweep` job, once per asset.
14
+ * - `repair.overdue` — the `repair-overdue` job, once per repair.
15
+ * - `custody.return_due` — the offboarding subscription, when HR says somebody has left or core says
16
+ * they have been removed from the workspace.
17
+ *
18
+ * The keys keep their `inventory.custody.*` spelling rather than being renamed to
19
+ * `inventory.asset.*`: a notification type is the key a person's own preferences are stored under,
20
+ * so renaming one silently resets everybody who had switched it off.
21
+ */
22
+ export const inventoryNotificationTypes = [
23
+ {
24
+ /**
25
+ * Everybody who has ever found a laptop on their desk with no idea it was now theirs is the
26
+ * reason this is `urgent` and reaches email — an asset register that records a handover the
27
+ * recipient never learns about has recorded an argument for later.
28
+ */
29
+ type: 'inventory.custody.assigned',
30
+ label: 'An item was handed to you',
31
+ description: 'Somebody made you the holder of an asset in the register.',
32
+ defaults: { inapp: true, push: true, email: true },
33
+ urgent: true,
34
+ },
35
+ {
36
+ /**
37
+ * Not urgent, and email is off by default. A warranty running out in a month is a thing to plan
38
+ * for, not a thing to stop for — and it arrives on a schedule rather than because somebody did
39
+ * something, which is exactly the kind of message that trains people to ignore the rest.
40
+ */
41
+ type: 'inventory.warranty.expiring',
42
+ label: 'A warranty is about to run out',
43
+ description: "An item's warranty expires soon. Sent once per item, to whoever is holding it.",
44
+ defaults: { inapp: true, push: false, email: false },
45
+ urgent: false,
46
+ },
47
+ {
48
+ /**
49
+ * Push, because this one is an action somebody has to take — ring the repairer — and nobody
50
+ * goes looking for it. Still not urgent: a laptop that has been away a fortnight can wait until
51
+ * the phone is picked up.
52
+ */
53
+ type: 'inventory.repair.overdue',
54
+ label: 'A repair has been away too long',
55
+ description: 'An item sent for repair has not been logged as returned. Sent once per repair.',
56
+ defaults: { inapp: true, push: true, email: false },
57
+ urgent: false,
58
+ },
59
+ {
60
+ /**
61
+ * Somebody is leaving and still has company property. Email, because it is a list of things to
62
+ * collect from a person who may not be at their desk much longer, and an in-app badge nobody
63
+ * opens until Monday is how a laptop leaves the building.
64
+ */
65
+ type: 'inventory.custody.return_due',
66
+ label: 'Somebody leaving still holds company property',
67
+ description: 'A member has left, or is leaving, and items are still recorded as theirs.',
68
+ defaults: { inapp: true, push: true, email: true },
69
+ urgent: true,
70
+ },
71
+ ];
72
+ //# sourceMappingURL=notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../src/contract/notifications.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE;QACE;;;;WAIG;QACH,IAAI,EAAE,4BAA4B;QAClC,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,2DAA2D;QACxE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;QAClD,MAAM,EAAE,IAAI;KACb;IACD;QACE;;;;WAIG;QACH,IAAI,EAAE,6BAA6B;QACnC,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,gFAAgF;QAC7F,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;QACpD,MAAM,EAAE,KAAK;KACd;IACD;QACE;;;;WAIG;QACH,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,iCAAiC;QACxC,WAAW,EAAE,gFAAgF;QAC7F,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;QACnD,MAAM,EAAE,KAAK;KACd;IACD;QACE;;;;WAIG;QACH,IAAI,EAAE,8BAA8B;QACpC,KAAK,EAAE,+CAA+C;QACtD,WAAW,EAAE,2EAA2E;QACxF,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;QAClD,MAAM,EAAE,IAAI;KACb;CACF,CAAA"}
@@ -3,8 +3,19 @@
3
3
  * it by default. A workspace can add or remove any of them afterwards with a custom role.
4
4
  *
5
5
  * A key with nothing checking it is a role editor full of switches that do nothing, so these arrive
6
- * with the procedures that enforce them — `custody.manage`, `repair.manage`, `category.manage`,
7
- * `field.manage`, `value.view` and the stock and purchasing keys with their own phases.
6
+ * with the procedures that enforce them — `field.manage` and the stock and purchasing keys with
7
+ * their own phases.
8
+ *
9
+ * **Reading custody is `asset.view`, and that is a decision rather than an omission.** Who holds an
10
+ * item looks like a privacy question, and it is not one here: `custodianUserId` and `custodySince`
11
+ * are fields of `Asset`, returned by `assets.list` and `assets.get` under `asset.view` since the
12
+ * module existed, and `assets.list` has always taken a `custodianUserId` filter. A separate
13
+ * `custody.view` would be a lock on a door beside an open window — it would refuse the timeline
14
+ * while the row above it named the same person. "Who has the projector" is also the question an
15
+ * asset register exists to answer; a company where a member cannot find that out asks in chat
16
+ * instead, which is worse for whoever is holding it. A workspace that disagrees takes
17
+ * `inventory.asset.view` off `guest`, which is one switch and already there. Writing custody is
18
+ * `custody.manage`, because handing an item over makes somebody answerable for it.
8
19
  */
9
20
  export declare const inventoryPermissions: readonly [{
10
21
  readonly key: "inventory.asset.view";
@@ -18,5 +29,44 @@ export declare const inventoryPermissions: readonly [{
18
29
  readonly scope: "workspace";
19
30
  readonly defaultRoles: ["owner", "admin", "member"];
20
31
  readonly dangerous: false;
32
+ }, {
33
+ /**
34
+ * Not `asset.manage`: correcting a serial number and making a colleague answerable for a
35
+ * £2,000 laptop are different acts, and plenty of workspaces want the first from everybody and
36
+ * the second from the office manager. Held by `member` by default all the same — an office
37
+ * where only an admin may hand over a charger keeps its register by not using it.
38
+ */
39
+ readonly key: "inventory.custody.manage";
40
+ readonly label: "Hand assets over and take them back";
41
+ readonly scope: "workspace";
42
+ readonly defaultRoles: ["owner", "admin", "member"];
43
+ readonly dangerous: false;
44
+ }, {
45
+ /**
46
+ * Sending an item away and recording what it cost, held by `member` for the same reason
47
+ * `custody.manage` is: the person who notices a broken screen is the person who should be able
48
+ * to log it, and an office where only an admin may do that keeps its repair record by not
49
+ * keeping one. Reading repairs rides `asset.view` — "where is the projector" is the question
50
+ * the register exists to answer, and a repair is one of the two answers.
51
+ *
52
+ * Not folded into `asset.manage`: correcting a serial number and committing the company to a
53
+ * £400 screen replacement are different acts, and the money is why.
54
+ */
55
+ readonly key: "inventory.repair.manage";
56
+ readonly label: "Log repairs";
57
+ readonly scope: "workspace";
58
+ readonly defaultRoles: ["owner", "admin", "member"];
59
+ readonly dangerous: false;
60
+ }, {
61
+ /**
62
+ * Categories are workspace configuration — one list everybody's assets are filed against — so
63
+ * this sits with the people who set the workspace up rather than with everybody who may edit an
64
+ * asset. Reading them rides `asset.view`, because the picker on the asset form needs them.
65
+ */
66
+ readonly key: "inventory.category.manage";
67
+ readonly label: "Manage asset categories";
68
+ readonly scope: "workspace";
69
+ readonly defaultRoles: ["owner", "admin"];
70
+ readonly dangerous: false;
21
71
  }];
22
72
  //# sourceMappingURL=permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/contract/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAe/B,CAAA"}
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/contract/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;IAgB7B;;;;;OAKG;;;;;;;IAQH;;;;;;;;;OASG;;;;;;;IAQH;;;;OAIG;;;;;;EAOL,CAAA"}
@@ -4,8 +4,19 @@ import { definePermissions } from '@kernhq/contracts';
4
4
  * it by default. A workspace can add or remove any of them afterwards with a custom role.
5
5
  *
6
6
  * A key with nothing checking it is a role editor full of switches that do nothing, so these arrive
7
- * with the procedures that enforce them — `custody.manage`, `repair.manage`, `category.manage`,
8
- * `field.manage`, `value.view` and the stock and purchasing keys with their own phases.
7
+ * with the procedures that enforce them — `field.manage` and the stock and purchasing keys with
8
+ * their own phases.
9
+ *
10
+ * **Reading custody is `asset.view`, and that is a decision rather than an omission.** Who holds an
11
+ * item looks like a privacy question, and it is not one here: `custodianUserId` and `custodySince`
12
+ * are fields of `Asset`, returned by `assets.list` and `assets.get` under `asset.view` since the
13
+ * module existed, and `assets.list` has always taken a `custodianUserId` filter. A separate
14
+ * `custody.view` would be a lock on a door beside an open window — it would refuse the timeline
15
+ * while the row above it named the same person. "Who has the projector" is also the question an
16
+ * asset register exists to answer; a company where a member cannot find that out asks in chat
17
+ * instead, which is worse for whoever is holding it. A workspace that disagrees takes
18
+ * `inventory.asset.view` off `guest`, which is one switch and already there. Writing custody is
19
+ * `custody.manage`, because handing an item over makes somebody answerable for it.
9
20
  */
10
21
  export const inventoryPermissions = definePermissions([
11
22
  {
@@ -22,5 +33,47 @@ export const inventoryPermissions = definePermissions([
22
33
  defaultRoles: ['owner', 'admin', 'member'],
23
34
  dangerous: false,
24
35
  },
36
+ {
37
+ /**
38
+ * Not `asset.manage`: correcting a serial number and making a colleague answerable for a
39
+ * £2,000 laptop are different acts, and plenty of workspaces want the first from everybody and
40
+ * the second from the office manager. Held by `member` by default all the same — an office
41
+ * where only an admin may hand over a charger keeps its register by not using it.
42
+ */
43
+ key: 'inventory.custody.manage',
44
+ label: 'Hand assets over and take them back',
45
+ scope: 'workspace',
46
+ defaultRoles: ['owner', 'admin', 'member'],
47
+ dangerous: false,
48
+ },
49
+ {
50
+ /**
51
+ * Sending an item away and recording what it cost, held by `member` for the same reason
52
+ * `custody.manage` is: the person who notices a broken screen is the person who should be able
53
+ * to log it, and an office where only an admin may do that keeps its repair record by not
54
+ * keeping one. Reading repairs rides `asset.view` — "where is the projector" is the question
55
+ * the register exists to answer, and a repair is one of the two answers.
56
+ *
57
+ * Not folded into `asset.manage`: correcting a serial number and committing the company to a
58
+ * £400 screen replacement are different acts, and the money is why.
59
+ */
60
+ key: 'inventory.repair.manage',
61
+ label: 'Log repairs',
62
+ scope: 'workspace',
63
+ defaultRoles: ['owner', 'admin', 'member'],
64
+ dangerous: false,
65
+ },
66
+ {
67
+ /**
68
+ * Categories are workspace configuration — one list everybody's assets are filed against — so
69
+ * this sits with the people who set the workspace up rather than with everybody who may edit an
70
+ * asset. Reading them rides `asset.view`, because the picker on the asset form needs them.
71
+ */
72
+ key: 'inventory.category.manage',
73
+ label: 'Manage asset categories',
74
+ scope: 'workspace',
75
+ defaultRoles: ['owner', 'admin'],
76
+ dangerous: false,
77
+ },
25
78
  ]);
26
79
  //# sourceMappingURL=permissions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/contract/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACpD;QACE,GAAG,EAAE,sBAAsB;QAC3B,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;QACnD,SAAS,EAAE,KAAK;KACjB;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC1C,SAAS,EAAE,KAAK;KACjB;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/contract/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACpD;QACE,GAAG,EAAE,sBAAsB;QAC3B,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;QACnD,SAAS,EAAE,KAAK;KACjB;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC1C,SAAS,EAAE,KAAK;KACjB;IACD;QACE;;;;;WAKG;QACH,GAAG,EAAE,0BAA0B;QAC/B,KAAK,EAAE,qCAAqC;QAC5C,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC1C,SAAS,EAAE,KAAK;KACjB;IACD;QACE;;;;;;;;;WASG;QACH,GAAG,EAAE,yBAAyB;QAC9B,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC1C,SAAS,EAAE,KAAK;KACjB;IACD;QACE;;;;WAIG;QACH,GAAG,EAAE,2BAA2B;QAChC,KAAK,EAAE,yBAAyB;QAChC,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAChC,SAAS,EAAE,KAAK;KACjB;CACF,CAAC,CAAA"}