@cosmicdrift/kumiko-bundled-features 0.244.0 → 0.246.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/package.json +9 -9
- package/src/auth-mfa-user-data/hooks.ts +2 -1
- package/src/custom-fields/lib/define-or-resurrect.ts +2 -2
- package/src/folders/__tests__/folders-parent-visibility.integration.test.ts +238 -0
- package/src/folders/__tests__/folders.integration.test.ts +96 -36
- package/src/folders/changes.json +9 -1
- package/src/folders/handlers/clear-folder.write.ts +24 -0
- package/src/folders/handlers/set-folder.write.ts +24 -0
- package/src/folders-user-data/__tests__/hooks.integration.test.ts +30 -6
- package/src/notes-history/__tests__/add-note-author-name-kms.integration.test.ts +30 -5
- package/src/notes-history/__tests__/notes-history-ownership.integration.test.ts +144 -14
- package/src/notes-history/__tests__/notes-history-parent-visibility.integration.test.ts +225 -0
- package/src/notes-history/__tests__/notes-history.integration.test.ts +71 -28
- package/src/notes-history/changes.json +7 -0
- package/src/notes-history/feature.ts +34 -6
- package/src/notes-history/handlers/add-note.write.ts +27 -1
- package/src/notes-history-user-data/__tests__/hooks.integration.test.ts +29 -3
- package/src/shared/assert-erased.ts +15 -0
- package/src/shared/has-where-rule.ts +5 -8
- package/src/shared/index.ts +2 -0
- package/src/shared/parent-visibility.ts +48 -0
- package/src/tags/__tests__/tags-ownership.test.ts +6 -7
- package/src/tags/__tests__/tags-parent-visibility.integration.test.ts +219 -0
- package/src/tags/__tests__/tags.integration.test.ts +112 -38
- package/src/tags/changes.json +9 -1
- package/src/tags/feature.ts +3 -2
- package/src/tags/handlers/assign-tag.write.ts +24 -0
- package/src/tags/handlers/remove-tag.write.ts +24 -0
- package/src/user-data-rights-defaults/hooks/config-value.userdata-hook.ts +2 -1
- package/src/user-data-rights-defaults/hooks/file-ref.userdata-hook.ts +2 -1
- package/src/user-data-rights-defaults/hooks/notification-preference.userdata-hook.ts +2 -1
- package/src/user-data-rights-defaults/hooks/tenant-invitation.userdata-hook.ts +2 -2
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
fileRefEntity,
|
|
19
19
|
fileRefsTable,
|
|
20
20
|
} from "@cosmicdrift/kumiko-framework/files";
|
|
21
|
+
import { assertErased } from "../../shared";
|
|
21
22
|
|
|
22
23
|
// Forget writes go through the executor (events), not deleteMany/updateMany:
|
|
23
24
|
// a projection rebuild replays the events, so the erasure survives. Eventless
|
|
@@ -258,6 +259,6 @@ export const fileRefDeleteHook: UserDataDeleteHook = async (ctx, strategy) => {
|
|
|
258
259
|
for (const row of rows) {
|
|
259
260
|
const id = row["id"]; // @cast-boundary db-row
|
|
260
261
|
if (typeof id !== "string") continue;
|
|
261
|
-
await crud.forget({ id }, systemUser, tdb);
|
|
262
|
+
assertErased(await crud.forget({ id }, systemUser, tdb), "fileRef", id);
|
|
262
263
|
}
|
|
263
264
|
};
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
type UserDataExportHook,
|
|
7
7
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
8
8
|
import { notificationPreferenceEntity, notificationPreferencesTable } from "../../delivery";
|
|
9
|
+
import { assertErased } from "../../shared";
|
|
9
10
|
import { featureMounted } from "./feature-mounted";
|
|
10
11
|
|
|
11
12
|
// userData-Hooks for delivery's notification-preference rows. Event-sourced
|
|
@@ -49,6 +50,6 @@ export const notificationPreferenceDeleteHook: UserDataDeleteHook = async (ctx)
|
|
|
49
50
|
for (const row of rows) {
|
|
50
51
|
const id = row["id"]; // @cast-boundary db-row
|
|
51
52
|
if (typeof id !== "string") continue;
|
|
52
|
-
await crud.forget({ id }, systemUser, tdb);
|
|
53
|
+
assertErased(await crud.forget({ id }, systemUser, tdb), "notification-preference", id);
|
|
53
54
|
}
|
|
54
55
|
};
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type UserDataExportHook,
|
|
7
7
|
type UserDataHookCtx,
|
|
8
8
|
} from "@cosmicdrift/kumiko-framework/engine";
|
|
9
|
-
import { decryptStoredPii, mapWithConcurrency } from "../../shared";
|
|
9
|
+
import { assertErased, decryptStoredPii, mapWithConcurrency } from "../../shared";
|
|
10
10
|
import { tenantInvitationEntity, tenantInvitationsTable } from "../../tenant";
|
|
11
11
|
import { userTable } from "../../user";
|
|
12
12
|
import { featureMounted } from "./feature-mounted";
|
|
@@ -100,7 +100,7 @@ export const tenantInvitationDeleteHook: UserDataDeleteHook = async (ctx, strate
|
|
|
100
100
|
const id = row["id"]; // @cast-boundary db-row
|
|
101
101
|
if (typeof id !== "string") continue;
|
|
102
102
|
if (strategy === "delete") {
|
|
103
|
-
await crud.forget({ id }, systemUser, tdb);
|
|
103
|
+
assertErased(await crud.forget({ id }, systemUser, tdb), "tenant-invitation", id);
|
|
104
104
|
} else {
|
|
105
105
|
// Row-id in the pseudonym keeps the (tenantId, email) unique index
|
|
106
106
|
// collision-free when a user has invitations in several states.
|