@abraca/nuxt 2.5.0 → 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.
- package/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/ACodeEditor.d.vue.ts +1 -1
- package/dist/runtime/components/ACodeEditor.vue.d.ts +1 -1
- package/dist/runtime/components/AConnectServerModal.d.vue.ts +2 -2
- package/dist/runtime/components/AConnectServerModal.vue.d.ts +2 -2
- package/dist/runtime/components/ADocumentTree.d.vue.ts +1 -1
- package/dist/runtime/components/ADocumentTree.vue.d.ts +1 -1
- package/dist/runtime/components/AEditor.d.vue.ts +7 -7
- package/dist/runtime/components/AEditor.vue.d.ts +7 -7
- package/dist/runtime/components/AEmailVerifyConfirmModal.d.vue.ts +2 -2
- package/dist/runtime/components/AEmailVerifyConfirmModal.vue.d.ts +2 -2
- package/dist/runtime/components/AIdentityModal.d.vue.ts +2 -2
- package/dist/runtime/components/AIdentityModal.vue.d.ts +2 -2
- package/dist/runtime/components/AMnemonicLoginModal.d.vue.ts +2 -2
- package/dist/runtime/components/AMnemonicLoginModal.vue.d.ts +2 -2
- package/dist/runtime/components/APasswordChangeModal.d.vue.ts +3 -3
- package/dist/runtime/components/APasswordChangeModal.vue.d.ts +3 -3
- package/dist/runtime/components/APasswordLoginModal.d.vue.ts +4 -4
- package/dist/runtime/components/APasswordLoginModal.vue.d.ts +4 -4
- package/dist/runtime/components/APasswordRegisterModal.d.vue.ts +3 -3
- package/dist/runtime/components/APasswordRegisterModal.vue.d.ts +3 -3
- package/dist/runtime/components/APasswordResetConfirmModal.d.vue.ts +3 -3
- package/dist/runtime/components/APasswordResetConfirmModal.vue.d.ts +3 -3
- package/dist/runtime/components/APasswordResetRequestModal.d.vue.ts +2 -2
- package/dist/runtime/components/APasswordResetRequestModal.vue.d.ts +2 -2
- package/dist/runtime/components/ASetPasswordCard.d.vue.ts +1 -1
- package/dist/runtime/components/ASetPasswordCard.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AArea.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AArea.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ACalendar.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ACalendar.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AFileUpload.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AFileUpload.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AInput.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AInput.vue.d.ts +1 -1
- package/dist/runtime/components/aware/AScroll.d.vue.ts +1 -1
- package/dist/runtime/components/aware/AScroll.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ASlider.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ASlider.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ATable.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ATable.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ATabs.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ATabs.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ATextarea.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ATextarea.vue.d.ts +1 -1
- package/dist/runtime/components/aware/ATree.d.vue.ts +1 -1
- package/dist/runtime/components/aware/ATree.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsNavigation.d.vue.ts +1 -1
- package/dist/runtime/components/docs/ADocsNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +4 -4
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +4 -4
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +2 -2
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +2 -2
- package/dist/runtime/components/docs/ADocsToc.d.vue.ts +1 -1
- package/dist/runtime/components/docs/ADocsToc.vue.d.ts +1 -1
- package/dist/runtime/components/editor/AColorPalettePopover.d.vue.ts +2 -2
- package/dist/runtime/components/editor/AColorPalettePopover.vue.d.ts +2 -2
- package/dist/runtime/components/editor/AIconPickerPopover.d.vue.ts +2 -2
- package/dist/runtime/components/editor/AIconPickerPopover.vue.d.ts +2 -2
- package/dist/runtime/components/editor/ALocationPickerPopover.d.vue.ts +2 -2
- package/dist/runtime/components/editor/ALocationPickerPopover.vue.d.ts +2 -2
- package/dist/runtime/components/registry/APluginCapabilityDialog.d.vue.ts +4 -4
- package/dist/runtime/components/registry/APluginCapabilityDialog.vue.d.ts +4 -4
- package/dist/runtime/components/renderers/AProseRenderer.d.vue.ts +4 -4
- package/dist/runtime/components/renderers/AProseRenderer.vue.d.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsCell.d.vue.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsCell.vue.d.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.d.vue.ts +2 -2
- package/dist/runtime/components/renderers/sheets/ASheetsGrid.vue.d.ts +2 -2
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.d.vue.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsMobileActionBar.vue.d.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.d.vue.ts +4 -4
- package/dist/runtime/components/renderers/sheets/ASheetsToolbar.vue.d.ts +4 -4
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +1 -1
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +1 -1
- package/dist/runtime/components/shell/AUserProfilePopover.d.vue.ts +1 -1
- package/dist/runtime/components/shell/AUserProfilePopover.vue.d.ts +1 -1
- package/dist/runtime/components/shell/AWelcomeScreen.d.vue.ts +3 -3
- package/dist/runtime/components/shell/AWelcomeScreen.vue.d.ts +3 -3
- package/dist/runtime/composables/useAbraAdmin.d.ts +42 -0
- package/dist/runtime/composables/useAbraAdmin.js +53 -0
- package/dist/runtime/server/api/_abracadabra/spaces.get.d.ts +1 -1
- package/dist/runtime/server/plugins/abracadabra-service.js +1 -0
- package/dist/types.d.mts +1 -1
- package/package.json +1 -1
|
@@ -6,19 +6,19 @@ 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;
|
|
13
11
|
paste: () => any;
|
|
12
|
+
clear: () => any;
|
|
13
|
+
edit: () => any;
|
|
14
14
|
toggleBold: () => any;
|
|
15
15
|
toggleItalic: () => 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;
|
|
21
19
|
onPaste?: (() => any) | undefined;
|
|
20
|
+
onClear?: (() => any) | undefined;
|
|
21
|
+
onEdit?: (() => any) | undefined;
|
|
22
22
|
onToggleBold?: (() => any) | undefined;
|
|
23
23
|
onToggleItalic?: (() => any) | undefined;
|
|
24
24
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -18,27 +18,27 @@ type __VLS_Props = {
|
|
|
18
18
|
labels?: Partial<AbracadabraLocale['renderers']['sheets']>;
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
toggleBold: () => any;
|
|
22
|
+
toggleItalic: () => any;
|
|
21
23
|
addColumn: () => any;
|
|
22
24
|
addRow: () => any;
|
|
23
25
|
"update:editValue": (value: string) => any;
|
|
24
26
|
commitFormulaBar: () => any;
|
|
25
27
|
cancelFormulaBar: () => any;
|
|
26
28
|
startEditFromBar: () => any;
|
|
27
|
-
toggleBold: () => any;
|
|
28
|
-
toggleItalic: () => any;
|
|
29
29
|
setTextColor: (color: string | undefined) => any;
|
|
30
30
|
setBgColor: (color: string | undefined) => any;
|
|
31
31
|
setAlign: (align: string) => any;
|
|
32
32
|
setNumberFormat: (format: string | undefined) => any;
|
|
33
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onToggleBold?: (() => any) | undefined;
|
|
35
|
+
onToggleItalic?: (() => any) | undefined;
|
|
34
36
|
onAddColumn?: (() => any) | undefined;
|
|
35
37
|
onAddRow?: (() => any) | undefined;
|
|
36
38
|
"onUpdate:editValue"?: ((value: string) => any) | undefined;
|
|
37
39
|
onCommitFormulaBar?: (() => any) | undefined;
|
|
38
40
|
onCancelFormulaBar?: (() => any) | undefined;
|
|
39
41
|
onStartEditFromBar?: (() => any) | undefined;
|
|
40
|
-
onToggleBold?: (() => any) | undefined;
|
|
41
|
-
onToggleItalic?: (() => any) | undefined;
|
|
42
42
|
onSetTextColor?: ((color: string | undefined) => any) | undefined;
|
|
43
43
|
onSetBgColor?: ((color: string | undefined) => any) | undefined;
|
|
44
44
|
onSetAlign?: ((align: string) => any) | undefined;
|
|
@@ -18,27 +18,27 @@ type __VLS_Props = {
|
|
|
18
18
|
labels?: Partial<AbracadabraLocale['renderers']['sheets']>;
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
toggleBold: () => any;
|
|
22
|
+
toggleItalic: () => any;
|
|
21
23
|
addColumn: () => any;
|
|
22
24
|
addRow: () => any;
|
|
23
25
|
"update:editValue": (value: string) => any;
|
|
24
26
|
commitFormulaBar: () => any;
|
|
25
27
|
cancelFormulaBar: () => any;
|
|
26
28
|
startEditFromBar: () => any;
|
|
27
|
-
toggleBold: () => any;
|
|
28
|
-
toggleItalic: () => any;
|
|
29
29
|
setTextColor: (color: string | undefined) => any;
|
|
30
30
|
setBgColor: (color: string | undefined) => any;
|
|
31
31
|
setAlign: (align: string) => any;
|
|
32
32
|
setNumberFormat: (format: string | undefined) => any;
|
|
33
33
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
+
onToggleBold?: (() => any) | undefined;
|
|
35
|
+
onToggleItalic?: (() => any) | undefined;
|
|
34
36
|
onAddColumn?: (() => any) | undefined;
|
|
35
37
|
onAddRow?: (() => any) | undefined;
|
|
36
38
|
"onUpdate:editValue"?: ((value: string) => any) | undefined;
|
|
37
39
|
onCommitFormulaBar?: (() => any) | undefined;
|
|
38
40
|
onCancelFormulaBar?: (() => any) | undefined;
|
|
39
41
|
onStartEditFromBar?: (() => any) | undefined;
|
|
40
|
-
onToggleBold?: (() => any) | undefined;
|
|
41
|
-
onToggleItalic?: (() => any) | undefined;
|
|
42
42
|
onSetTextColor?: ((color: string | undefined) => any) | undefined;
|
|
43
43
|
onSetBgColor?: ((color: string | undefined) => any) | undefined;
|
|
44
44
|
onSetAlign?: ((align: string) => any) | undefined;
|
|
@@ -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;
|
|
@@ -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<
|
|
1
|
+
declare const _default: import("h3").EventHandler<Omit<import("h3").EventHandlerRequest, "body">, Promise<unknown[] | never[]>>;
|
|
2
2
|
export default _default;
|
|
@@ -83,6 +83,7 @@ async function loadOrCreateAutoIdentity(opts) {
|
|
|
83
83
|
return identity;
|
|
84
84
|
}
|
|
85
85
|
export default defineNitroPlugin(async (nitroApp) => {
|
|
86
|
+
if (import.meta.prerender) return;
|
|
86
87
|
const config = useRuntimeConfig();
|
|
87
88
|
const abraConfig = config.abracadabra;
|
|
88
89
|
const storage = useStorage();
|
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
|
|