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:
@@ -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", () => {
|
||||
@@ -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(),
|
||||
@@ -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(),
|
||||
@@ -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;
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user