Browse Source

Move almost all interfaces to endorserServer.ts

similarify-search
Matthew Raymer 1 year ago
parent
commit
cef346e487
  1. 50
      src/libs/endorserServer.ts
  2. 15
      src/views/AccountViewView.vue
  3. 22
      src/views/DiscoverView.vue
  4. 8
      src/views/NewEditProjectView.vue
  5. 22
      src/views/ProjectsView.vue
  6. 5
      src/views/StatisticsView.vue

50
src/libs/endorserServer.ts

@ -197,3 +197,53 @@ export function isNumeric(str: string): boolean {
export function numberOrZero(str: string): number {
return isNumeric(str) ? +str : 0;
}
export interface ErrorResponse {
error?: {
message?: string;
};
}
export interface RateLimits {
doneClaimsThisWeek: string;
doneRegistrationsThisMonth: string;
maxClaimsPerWeek: string;
maxRegistrationsPerMonth: string;
nextMonthBeginDateTime: string;
nextWeekBeginDateTime: string;
}
/**
* Represents data about a project
**/
export interface ProjectData {
/**
* Name of the project
**/
name: string;
/**
* Description of the project
**/
description: string;
/**
* URL referencing information about the project
**/
handleId: string;
/**
* The Identier of the project
**/
rowid: string;
}
export interface VerifiableCredential {
"@context": string;
"@type": string;
name: string;
description: string;
identifier?: string;
}
export interface WorldProperties {
startTime?: string;
endTime?: string;
}

15
src/views/AccountViewView.vue

@ -303,21 +303,6 @@ import QuickNav from "@/components/QuickNav";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
interface RateLimits {
doneClaimsThisWeek: string;
doneRegistrationsThisMonth: string;
maxClaimsPerWeek: string;
maxRegistrationsPerMonth: string;
nextMonthBeginDateTime: string;
nextWeekBeginDateTime: string;
}
interface ErrorResponse {
error?: {
message?: string;
};
}
@Component({ components: { AlertMessage, QuickNav } })
export default class AccountViewView extends Vue {
Constants = AppString;

22
src/views/DiscoverView.vue

@ -109,28 +109,6 @@ import { accessToken } from "@/libs/crypto";
import AlertMessage from "@/components/AlertMessage";
import QuickNav from "@/components/QuickNav";
/**
* Represents data about a project
**/
interface ProjectData {
/**
* Name of the project
**/
name: string;
/**
* Description of the project
**/
description: string;
/**
* URL referencing information about the project
**/
handleId: string;
/**
* The Identier of the project
**/
rowid: string;
}
@Component({
components: { AlertMessage, QuickNav },
})

8
src/views/NewEditProjectView.vue

@ -83,14 +83,6 @@ import { useAppStore } from "@/store/app";
import { IIdentifier } from "@veramo/core";
import AlertMessage from "@/components/AlertMessage";
interface VerifiableCredential {
"@context": string;
"@type": string;
name: string;
description: string;
identifier?: string;
}
@Component({
components: { AlertMessage },
})

22
src/views/ProjectsView.vue

@ -83,28 +83,6 @@ import InfiniteScroll from "@/components/InfiniteScroll";
import AlertMessage from "@/components/AlertMessage";
import QuickNav from "@/components/QuickNav";
/**
* Represents data about a project
**/
interface ProjectData {
/**
* Name of the project
**/
name: string;
/**
* Description of the project
**/
description: string;
/**
* URL referencing information about the project
**/
handleId: string;
/**
* The Identier of the project
**/
rowid: string;
}
@Component({
components: { InfiniteScroll, AlertMessage, QuickNav },
})

5
src/views/StatisticsView.vue

@ -47,11 +47,6 @@ import { World } from "@/components/World/World.js";
import AlertMessage from "@/components/AlertMessage";
import QuickNav from "@/components/QuickNav";
interface WorldProperties {
startTime?: string;
endTime?: string;
}
@Component({ components: { AlertMessage, World, QuickNav } })
export default class StatisticsView extends Vue {
world: World;

Loading…
Cancel
Save