diff --git a/infrastructure/w3id/package.json b/infrastructure/w3id/package.json index 5d1709ee..8c415e51 100644 --- a/infrastructure/w3id/package.json +++ b/infrastructure/w3id/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "vitest", "dev": "tsc --watch", - "check-format": "prettier --check \"src/**/*.ts\"", + "check-format": "npx @biomejs/biome format ./src", "format": "npx @biomejs/biome format --write ./src", "lint": "npx @biomejs/biome lint --write ./src", "check": "npx @biomejs/biome check --write ./src", diff --git a/infrastructure/w3id/src/logs/storage/storage-spec.ts b/infrastructure/w3id/src/logs/storage/storage-spec.ts new file mode 100644 index 00000000..ab66f9d7 --- /dev/null +++ b/infrastructure/w3id/src/logs/storage/storage-spec.ts @@ -0,0 +1,44 @@ +/** + * SPECIFICATION + * + * Baseline Storage Specification, used for storing and managing logs + */ + +export declare class StorageSpec { + /** + * Build a new storage driver + * + * @param {...any[]} props + * @returns Promise + */ + + // biome-ignore lint: lint/suspicious/noExplicitAny + public static build(...props: any[]): Promise>; + + /** + * Create a new entry in the storage + * + * @param body + * @returns Promise + */ + + public create(body: T): Promise; + + /** + * Find one entry in the storage using partial of K + * + * @param {Partial} options + * @returns Promise + */ + + public findOne(options: Partial): Promise; + + /** + * Find many entities in the storage using partial of K + * + * @param {Partial} options + * @returns Promise + */ + + public findMany(options: Partial): Promise; +} diff --git a/infrastructure/w3id/src/logs/store.ts b/infrastructure/w3id/src/logs/store.ts new file mode 100644 index 00000000..e69de29b diff --git a/infrastructure/w3id/src/utils/uuid.ts b/infrastructure/w3id/src/utils/uuid.ts index f3c663f3..1ffc1ae1 100644 --- a/infrastructure/w3id/src/utils/uuid.ts +++ b/infrastructure/w3id/src/utils/uuid.ts @@ -10,8 +10,8 @@ import { v4 as uuidv4, v5 as uuidv5 } from "uuid"; */ export function generateUuid( - entropy: string, - namespace: string = uuidv4(), + entropy: string, + namespace: string = uuidv4(), ): string { - return uuidv5(entropy, namespace); + return uuidv5(entropy, namespace); }