Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infrastructure/w3id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
44 changes: 44 additions & 0 deletions infrastructure/w3id/src/logs/storage/storage-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* SPECIFICATION
*
* Baseline Storage Specification, used for storing and managing logs
*/

export declare class StorageSpec<T, K> {
/**
* Build a new storage driver
*
* @param {...any[]} props
* @returns Promise<StorageSpec>
*/

// biome-ignore lint: lint/suspicious/noExplicitAny
public static build<T, K>(...props: any[]): Promise<StorageSpec<T, K>>;

/**
* Create a new entry in the storage
*
* @param body
* @returns Promise<K>
*/

public create(body: T): Promise<K>;

/**
* Find one entry in the storage using partial of K
*
* @param {Partial<K>} options
* @returns Promise<K>
*/

public findOne(options: Partial<K>): Promise<K>;

/**
* Find many entities in the storage using partial of K
*
* @param {Partial<K>} options
* @returns Promise<K[]>
*/

public findMany(options: Partial<K>): Promise<K[]>;
}
Empty file.
6 changes: 3 additions & 3 deletions infrastructure/w3id/src/utils/uuid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}