feat(gitea): add domain model classes, helpers, and refactor GiteaClient internals; expand README with usage and docs
This commit is contained in:
18
ts/gitea.classes.secret.ts
Normal file
18
ts/gitea.classes.secret.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { IGiteaSecret } from './gitea.interfaces.js';
|
||||
|
||||
export class GiteaSecret {
|
||||
public readonly name: string;
|
||||
public readonly createdAt: string;
|
||||
|
||||
constructor(raw: IGiteaSecret) {
|
||||
this.name = raw.name || '';
|
||||
this.createdAt = raw.created_at || '';
|
||||
}
|
||||
|
||||
toJSON(): IGiteaSecret {
|
||||
return {
|
||||
name: this.name,
|
||||
created_at: this.createdAt,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user