1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 05:30:01 +00:00

Renaming events to achievements and moving examples

This commit is contained in:
Tom
2025-03-12 15:39:58 -04:00
parent 27c5f0b543
commit 7b6504df44
7 changed files with 13 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
import { BehaviorSubject, ReplaySubject, bufferCount, concat, first, firstValueFrom } from "rxjs";
import { validate } from "./event-processor";
import { ItemCreatedProgressEvent } from "./example-achievements";
import { itemAdded$, itemUpdated$ } from "./example-events";
import { validate } from "./achievement-processor";
import { ItemCreatedProgressEvent } from "./examples/example-achievements";
import { itemAdded$, itemUpdated$ } from "./examples/example-events";
import {
ItemCreatedAchievement,
ItemCreatedProgress,
@@ -10,7 +10,7 @@ import {
ItemCreatedValidator,
TotallyAttachedAchievement,
TotallyAttachedValidator,
} from "./example-validators";
} from "./examples/example-validators";
import { AchievementEvent } from "./types";
describe("event-processor", () => {

View File

@@ -1,7 +1,7 @@
import { UserId } from "../../types/guid";
import { UserId } from "../../../types/guid";
import { AchievementProgressEvent } from "../types";
import { ItemCreatedProgress } from "./example-validators";
import { AchievementProgressEvent } from "./types";
const ItemCreatedProgressEvent: AchievementProgressEvent = {
"@timestamp": Date.now(),

View File

@@ -1,8 +1,7 @@
import { Observable, of } from "rxjs";
import { UserId } from "../../types/guid";
import { UserActionEvent } from "./types";
import { UserId } from "../../../types/guid";
import { UserActionEvent } from "../types";
const itemAdded$: Observable<UserActionEvent> = of({
"@timestamp": Date.now(),

View File

@@ -1,6 +1,6 @@
import { Type } from "./data";
import { earnedEvent, progressEvent } from "./events";
import { AchievementId, MetricId, AchievementValidator } from "./types";
import { earnedEvent, progressEvent } from "../achievement-events";
import { Type } from "../data";
import { AchievementId, MetricId, AchievementValidator } from "../types";
const ItemCreatedProgress = "item-quantity" as MetricId;

View File

@@ -1,5 +1,5 @@
import { ItemCreatedProgressEvent } from "./example-achievements";
import { ItemCreatedProgress } from "./example-validators";
import { ItemCreatedProgressEvent } from "./examples/example-achievements";
import { ItemCreatedProgress } from "./examples/example-validators";
import { mapProgressByName } from "./util";
describe("mapProgressByName", () => {