@abraca/nuxt 2.5.1 → 2.6.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 (85) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/ACodeEditor.d.vue.ts +1 -1
  4. package/dist/runtime/components/ACodeEditor.vue.d.ts +1 -1
  5. package/dist/runtime/components/AConnectServerModal.d.vue.ts +2 -2
  6. package/dist/runtime/components/AConnectServerModal.vue.d.ts +2 -2
  7. package/dist/runtime/components/ADocumentTree.d.vue.ts +1 -1
  8. package/dist/runtime/components/ADocumentTree.vue.d.ts +1 -1
  9. package/dist/runtime/components/AEditor.d.vue.ts +7 -7
  10. package/dist/runtime/components/AEditor.vue.d.ts +7 -7
  11. package/dist/runtime/components/AEmailVerifyConfirmModal.d.vue.ts +2 -2
  12. package/dist/runtime/components/AEmailVerifyConfirmModal.vue.d.ts +2 -2
  13. package/dist/runtime/components/AIdentityModal.d.vue.ts +2 -2
  14. package/dist/runtime/components/AIdentityModal.vue.d.ts +2 -2
  15. package/dist/runtime/components/AMnemonicLoginModal.d.vue.ts +2 -2
  16. package/dist/runtime/components/AMnemonicLoginModal.vue.d.ts +2 -2
  17. package/dist/runtime/components/APasswordChangeModal.d.vue.ts +3 -3
  18. package/dist/runtime/components/APasswordChangeModal.vue.d.ts +3 -3
  19. package/dist/runtime/components/APasswordLoginModal.d.vue.ts +4 -4
  20. package/dist/runtime/components/APasswordLoginModal.vue.d.ts +4 -4
  21. package/dist/runtime/components/APasswordRegisterModal.d.vue.ts +3 -3
  22. package/dist/runtime/components/APasswordRegisterModal.vue.d.ts +3 -3
  23. package/dist/runtime/components/APasswordResetConfirmModal.d.vue.ts +3 -3
  24. package/dist/runtime/components/APasswordResetConfirmModal.vue.d.ts +3 -3
  25. package/dist/runtime/components/APasswordResetRequestModal.d.vue.ts +2 -2
  26. package/dist/runtime/components/APasswordResetRequestModal.vue.d.ts +2 -2
  27. package/dist/runtime/components/ASetPasswordCard.d.vue.ts +1 -1
  28. package/dist/runtime/components/ASetPasswordCard.vue.d.ts +1 -1
  29. package/dist/runtime/components/aware/AArea.d.vue.ts +1 -1
  30. package/dist/runtime/components/aware/AArea.vue.d.ts +1 -1
  31. package/dist/runtime/components/aware/ACalendar.d.vue.ts +1 -1
  32. package/dist/runtime/components/aware/ACalendar.vue.d.ts +1 -1
  33. package/dist/runtime/components/aware/AFileUpload.d.vue.ts +1 -1
  34. package/dist/runtime/components/aware/AFileUpload.vue.d.ts +1 -1
  35. package/dist/runtime/components/aware/AInput.d.vue.ts +1 -1
  36. package/dist/runtime/components/aware/AInput.vue.d.ts +1 -1
  37. package/dist/runtime/components/aware/AScroll.d.vue.ts +1 -1
  38. package/dist/runtime/components/aware/AScroll.vue.d.ts +1 -1
  39. package/dist/runtime/components/aware/ASlider.d.vue.ts +1 -1
  40. package/dist/runtime/components/aware/ASlider.vue.d.ts +1 -1
  41. package/dist/runtime/components/aware/ATable.d.vue.ts +1 -1
  42. package/dist/runtime/components/aware/ATable.vue.d.ts +1 -1
  43. package/dist/runtime/components/aware/ATabs.d.vue.ts +1 -1
  44. package/dist/runtime/components/aware/ATabs.vue.d.ts +1 -1
  45. package/dist/runtime/components/aware/ATextarea.d.vue.ts +1 -1
  46. package/dist/runtime/components/aware/ATextarea.vue.d.ts +1 -1
  47. package/dist/runtime/components/aware/ATree.d.vue.ts +1 -1
  48. package/dist/runtime/components/aware/ATree.vue.d.ts +1 -1
  49. package/dist/runtime/components/docs/ADocsNavigation.d.vue.ts +1 -1
  50. package/dist/runtime/components/docs/ADocsNavigation.vue.d.ts +1 -1
  51. package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +4 -4
  52. package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +4 -4
  53. package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +2 -2
  54. package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +2 -2
  55. package/dist/runtime/components/docs/ADocsToc.d.vue.ts +1 -1
  56. package/dist/runtime/components/docs/ADocsToc.vue.d.ts +1 -1
  57. package/dist/runtime/components/editor/AColorPalettePopover.d.vue.ts +2 -2
  58. package/dist/runtime/components/editor/AColorPalettePopover.vue.d.ts +2 -2
  59. package/dist/runtime/components/editor/AIconPickerPopover.d.vue.ts +2 -2
  60. package/dist/runtime/components/editor/AIconPickerPopover.vue.d.ts +2 -2
  61. package/dist/runtime/components/editor/ALocationPickerPopover.d.vue.ts +2 -2
  62. package/dist/runtime/components/editor/ALocationPickerPopover.vue.d.ts +2 -2
  63. package/dist/runtime/components/registry/APluginCapabilityDialog.d.vue.ts +4 -4
  64. package/dist/runtime/components/registry/APluginCapabilityDialog.vue.d.ts +4 -4
  65. package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +4 -4
  66. package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +4 -4
  67. package/dist/runtime/components/renderers/sheets/ASheetsCell.d.vue.ts +4 -4
  68. package/dist/runtime/components/renderers/sheets/ASheetsCell.vue.d.ts +4 -4
  69. package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +2 -2
  70. package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +2 -2
  71. package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.d.vue.ts +6 -6
  72. package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue.d.ts +6 -6
  73. package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +1 -1
  74. package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +1 -1
  75. package/dist/runtime/components/shell/AUserMenu.d.vue.ts +2 -2
  76. package/dist/runtime/components/shell/AUserMenu.vue.d.ts +2 -2
  77. package/dist/runtime/components/shell/AUserProfilePopover.d.vue.ts +1 -1
  78. package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +1 -1
  79. package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +3 -3
  80. package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +3 -3
  81. package/dist/runtime/composables/useAbraAdmin.d.ts +42 -0
  82. package/dist/runtime/composables/useAbraAdmin.js +53 -0
  83. package/dist/runtime/server/api/_abracadabra/spaces.get.d.ts +1 -1
  84. package/dist/types.d.mts +1 -1
  85. package/package.json +1 -1
@@ -6,21 +6,21 @@ type __VLS_Props = {
6
6
  cellContextItems: any[][];
7
7
  };
8
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- clear: () => any;
10
9
  copy: () => any;
11
- edit: () => any;
12
10
  cut: () => any;
11
+ paste: () => any;
12
+ clear: () => any;
13
+ edit: () => any;
13
14
  toggleBold: () => any;
14
15
  toggleItalic: () => any;
15
- paste: () => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- onClear?: (() => any) | undefined;
18
17
  onCopy?: (() => any) | undefined;
19
- onEdit?: (() => any) | undefined;
20
18
  onCut?: (() => any) | undefined;
19
+ onPaste?: (() => any) | undefined;
20
+ onClear?: (() => any) | undefined;
21
+ onEdit?: (() => any) | undefined;
21
22
  onToggleBold?: (() => any) | undefined;
22
23
  onToggleItalic?: (() => any) | undefined;
23
- onPaste?: (() => any) | undefined;
24
24
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const _default: typeof __VLS_export;
26
26
  export default _default;
@@ -107,8 +107,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
107
107
  "onFork-snapshot"?: ((version: number) => any) | undefined;
108
108
  "onLoad-more-snapshots"?: (() => any) | undefined;
109
109
  }>, {
110
- userName: string;
111
110
  snapshots: SnapshotMeta[];
111
+ userName: string;
112
112
  docMeta: DocPageMeta | null;
113
113
  effectiveRole: string | null;
114
114
  userAvatarStyle: string;
@@ -107,8 +107,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
107
107
  "onFork-snapshot"?: ((version: number) => any) | undefined;
108
108
  "onLoad-more-snapshots"?: (() => any) | undefined;
109
109
  }>, {
110
- userName: string;
111
110
  snapshots: SnapshotMeta[];
111
+ userName: string;
112
112
  docMeta: DocPageMeta | null;
113
113
  effectiveRole: string | null;
114
114
  userAvatarStyle: string;
@@ -14,13 +14,13 @@ type __VLS_Props = {
14
14
  extraItems?: DropdownMenuItem[][];
15
15
  };
16
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ logout: () => any;
17
18
  "open-settings": () => any;
18
19
  "open-account": () => any;
19
- logout: () => any;
20
20
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onLogout?: (() => any) | undefined;
21
22
  "onOpen-settings"?: (() => any) | undefined;
22
23
  "onOpen-account"?: (() => any) | undefined;
23
- onLogout?: (() => any) | undefined;
24
24
  }>, {
25
25
  color: string;
26
26
  collapsed: boolean;
@@ -14,13 +14,13 @@ type __VLS_Props = {
14
14
  extraItems?: DropdownMenuItem[][];
15
15
  };
16
16
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ logout: () => any;
17
18
  "open-settings": () => any;
18
19
  "open-account": () => any;
19
- logout: () => any;
20
20
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ onLogout?: (() => any) | undefined;
21
22
  "onOpen-settings"?: (() => any) | undefined;
22
23
  "onOpen-account"?: (() => any) | undefined;
23
- onLogout?: (() => any) | undefined;
24
24
  }>, {
25
25
  color: string;
26
26
  collapsed: boolean;
@@ -36,10 +36,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
36
36
  color: string;
37
37
  name: string;
38
38
  online: boolean | null;
39
+ currentDocId: string | null;
39
40
  avatarStyle: string;
40
41
  isSelf: boolean;
41
42
  isFollowing: boolean;
42
- currentDocId: string | null;
43
43
  showFollow: boolean;
44
44
  currentDocLabel: string | null;
45
45
  currentDocIcon: string;
@@ -36,10 +36,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
36
36
  color: string;
37
37
  name: string;
38
38
  online: boolean | null;
39
+ currentDocId: string | null;
39
40
  avatarStyle: string;
40
41
  isSelf: boolean;
41
42
  isFollowing: boolean;
42
- currentDocId: string | null;
43
43
  showFollow: boolean;
44
44
  currentDocLabel: string | null;
45
45
  currentDocIcon: string;
@@ -55,8 +55,8 @@ type __VLS_Slots = {} & {
55
55
  logo?: (props: typeof __VLS_78) => any;
56
56
  };
57
57
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
- "update:open": (value: boolean) => any;
59
58
  done: () => any;
59
+ "update:open": (value: boolean) => any;
60
60
  "set-name": (name: string) => any;
61
61
  "set-color": (color: string) => any;
62
62
  "set-neutral": (color: string) => any;
@@ -64,8 +64,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
64
64
  "connect-server": (url: string) => any;
65
65
  "claim-passkey": () => any;
66
66
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
67
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
68
67
  onDone?: (() => any) | undefined;
68
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
69
69
  "onSet-name"?: ((name: string) => any) | undefined;
70
70
  "onSet-color"?: ((color: string) => any) | undefined;
71
71
  "onSet-neutral"?: ((color: string) => any) | undefined;
@@ -74,9 +74,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
74
74
  "onClaim-passkey"?: (() => any) | undefined;
75
75
  }>, {
76
76
  connecting: boolean;
77
- isClaimed: boolean;
78
77
  userName: string;
79
78
  currentColor: string;
79
+ isClaimed: boolean;
80
80
  avatarStyle: string;
81
81
  connectionError: string;
82
82
  colors: string[];
@@ -55,8 +55,8 @@ type __VLS_Slots = {} & {
55
55
  logo?: (props: typeof __VLS_78) => any;
56
56
  };
57
57
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
- "update:open": (value: boolean) => any;
59
58
  done: () => any;
59
+ "update:open": (value: boolean) => any;
60
60
  "set-name": (name: string) => any;
61
61
  "set-color": (color: string) => any;
62
62
  "set-neutral": (color: string) => any;
@@ -64,8 +64,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
64
64
  "connect-server": (url: string) => any;
65
65
  "claim-passkey": () => any;
66
66
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
67
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
68
67
  onDone?: (() => any) | undefined;
68
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
69
69
  "onSet-name"?: ((name: string) => any) | undefined;
70
70
  "onSet-color"?: ((color: string) => any) | undefined;
71
71
  "onSet-neutral"?: ((color: string) => any) | undefined;
@@ -74,9 +74,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
74
74
  "onClaim-passkey"?: (() => any) | undefined;
75
75
  }>, {
76
76
  connecting: boolean;
77
- isClaimed: boolean;
78
77
  userName: string;
79
78
  currentColor: string;
79
+ isClaimed: boolean;
80
80
  avatarStyle: string;
81
81
  connectionError: string;
82
82
  colors: string[];
@@ -22,6 +22,28 @@ export type AdminUserRow = UserProfile & {
22
22
  revoked: boolean;
23
23
  deviceKeys: string[];
24
24
  };
25
+ /** One row from `GET /admin/service-accounts`. */
26
+ export interface AdminServiceAccountRow {
27
+ id: string;
28
+ username: string;
29
+ public_key: string | null;
30
+ revoked: boolean;
31
+ display_name: string | null;
32
+ }
33
+ /**
34
+ * Response from `POST /admin/service-accounts` or its rotate counterpart.
35
+ * `private_key` is present iff the server generated the keypair — never
36
+ * persisted server-side and never retrievable later. Surface it to the
37
+ * operator immediately.
38
+ */
39
+ export interface AdminServiceAccountSecret {
40
+ id: string;
41
+ username?: string;
42
+ public_key: string;
43
+ role?: string;
44
+ /** Base64url-encoded Ed25519 32-byte seed. Shown ONCE. */
45
+ private_key?: string;
46
+ }
25
47
  /** One row from `GET /admin/uploads` (uploads ⨝ documents ⨝ file_blobs). */
26
48
  export interface AdminUploadRow {
27
49
  id: string;
@@ -73,6 +95,16 @@ declare function unlockUser(userId: string): Promise<void>;
73
95
  declare function userDocs(userId: string, opts?: {
74
96
  limit?: number;
75
97
  }): Promise<AdminUserDocRow[]>;
98
+ declare function listServiceAccounts(): Promise<AdminServiceAccountRow[]>;
99
+ declare function createServiceAccount(body: {
100
+ username: string;
101
+ publicKey?: string;
102
+ }): Promise<AdminServiceAccountSecret>;
103
+ declare function rotateServiceAccountKey(userId: string, body?: {
104
+ publicKey?: string;
105
+ }): Promise<AdminServiceAccountSecret>;
106
+ declare function revokeServiceAccount(userId: string): Promise<void>;
107
+ declare function revokeDeviceKey(userId: string, keyId: string): Promise<void>;
76
108
  declare function listUploads(opts?: {
77
109
  q?: string;
78
110
  docId?: string;
@@ -143,6 +175,16 @@ export declare function useAbraAdmin(): {
143
175
  unlockUser: typeof unlockUser;
144
176
  /** GET /admin/users/:id/docs — owned + explicitly-granted docs. */
145
177
  userDocs: typeof userDocs;
178
+ /** GET /admin/service-accounts — Service role only. */
179
+ listServiceAccounts: typeof listServiceAccounts;
180
+ /** POST /admin/service-accounts — Service role only. Private key is shown ONCE. */
181
+ createServiceAccount: typeof createServiceAccount;
182
+ /** POST /admin/service-accounts/:id/rotate-key — Service role only. */
183
+ rotateServiceAccountKey: typeof rotateServiceAccountKey;
184
+ /** DELETE /admin/service-accounts/:id — Service role only. */
185
+ revokeServiceAccount: typeof revokeServiceAccount;
186
+ /** POST /admin/users/:id/device-keys/:key_id/revoke — Service or Admin@root. */
187
+ revokeDeviceKey: typeof revokeDeviceKey;
146
188
  /** GET /admin/uploads — paginated/filterable, with dedup ref counts. */
147
189
  listUploads: typeof listUploads;
148
190
  /** GET /admin/storage/stats. */
@@ -63,6 +63,48 @@ async function userDocs(userId, opts = {}) {
63
63
  const res = await _run("Failed to load user documents", () => client.adminUserDocs(userId, opts));
64
64
  return res?.docs ?? [];
65
65
  }
66
+ async function listServiceAccounts() {
67
+ const { client } = _client();
68
+ const res = await _run(
69
+ "Failed to load service accounts",
70
+ () => client.adminListServiceAccounts()
71
+ );
72
+ return res?.items ?? [];
73
+ }
74
+ async function createServiceAccount(body) {
75
+ const { client } = _client();
76
+ return _run(
77
+ "Failed to create service account",
78
+ () => client.adminCreateServiceAccount({
79
+ username: body.username,
80
+ ...body.publicKey ? { public_key: body.publicKey } : {}
81
+ })
82
+ );
83
+ }
84
+ async function rotateServiceAccountKey(userId, body = {}) {
85
+ const { client } = _client();
86
+ return _run(
87
+ "Failed to rotate service-account key",
88
+ () => client.adminRotateServiceAccountKey(
89
+ userId,
90
+ body.publicKey ? { public_key: body.publicKey } : {}
91
+ )
92
+ );
93
+ }
94
+ async function revokeServiceAccount(userId) {
95
+ const { client } = _client();
96
+ await _run(
97
+ "Failed to revoke service account",
98
+ () => client.adminRevokeServiceAccount(userId)
99
+ );
100
+ }
101
+ async function revokeDeviceKey(userId, keyId) {
102
+ const { client } = _client();
103
+ await _run(
104
+ "Failed to revoke device key",
105
+ () => client.adminRevokeDeviceKey(userId, keyId)
106
+ );
107
+ }
66
108
  async function listUploads(opts = {}) {
67
109
  const { client } = _client();
68
110
  return _run("Failed to load uploads", () => client.adminListUploads(opts));
@@ -174,6 +216,17 @@ export function useAbraAdmin() {
174
216
  unlockUser,
175
217
  /** GET /admin/users/:id/docs — owned + explicitly-granted docs. */
176
218
  userDocs,
219
+ /* Service accounts */
220
+ /** GET /admin/service-accounts — Service role only. */
221
+ listServiceAccounts,
222
+ /** POST /admin/service-accounts — Service role only. Private key is shown ONCE. */
223
+ createServiceAccount,
224
+ /** POST /admin/service-accounts/:id/rotate-key — Service role only. */
225
+ rotateServiceAccountKey,
226
+ /** DELETE /admin/service-accounts/:id — Service role only. */
227
+ revokeServiceAccount,
228
+ /** POST /admin/users/:id/device-keys/:key_id/revoke — Service or Admin@root. */
229
+ revokeDeviceKey,
177
230
  /* Storage & uploads */
178
231
  /** GET /admin/uploads — paginated/filterable, with dedup ref counts. */
179
232
  listUploads,
@@ -1,2 +1,2 @@
1
- declare const _default: import("h3").EventHandler<Omit<import("h3").EventHandlerRequest, "body">, Promise<never[] | unknown[]>>;
1
+ declare const _default: import("h3").EventHandler<Omit<import("h3").EventHandlerRequest, "body">, Promise<unknown[] | never[]>>;
2
2
  export default _default;
package/dist/types.d.mts CHANGED
@@ -18,7 +18,7 @@ export { type ServerTrashEntry } from '../dist/runtime/composables/useServerTras
18
18
 
19
19
  export { type Invite } from '../dist/runtime/composables/useInvites.js'
20
20
 
21
- export { type AdminStorageStats, type AdminUploadList, type AdminUploadRow, type AdminUserDocRow, type AdminUserRow } from '../dist/runtime/composables/useAbraAdmin.js'
21
+ export { type AdminServiceAccountRow, type AdminServiceAccountSecret, type AdminStorageStats, type AdminUploadList, type AdminUploadRow, type AdminUserDocRow, type AdminUserRow } from '../dist/runtime/composables/useAbraAdmin.js'
22
22
 
23
23
  export { type SlugMap, type SlugMapEntry, type buildSlugMap, type isUUID, type slugify } from '../dist/runtime/utils/slugify.js'
24
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abraca/nuxt",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "First-class Nuxt module for the Abracadabra CRDT collaboration platform",
5
5
  "repository": "abracadabra/abracadabra-nuxt",
6
6
  "license": "MIT",