forked from jsnbuchanan/crowd-funder-for-time-pwa
- Add explicit Router type imports across views - Replace $router type casting with proper typing - Use $router.back() instead of $router.go(-1) for consistency - Add proper route and router typings to components - Clean up router navigation methods - Fix router push/back method calls This commit improves type safety and consistency in router usage across the application's view components.
69 lines
2.0 KiB
TypeScript
69 lines
2.0 KiB
TypeScript
import { GenericVerifiableCredential } from "./common";
|
|
|
|
export interface AgreeVerifiableCredential {
|
|
"@context": string;
|
|
"@type": string;
|
|
object: Record<string, unknown>;
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id4
|
|
export interface GiveVerifiableCredential extends GenericVerifiableCredential {
|
|
"@context"?: string;
|
|
"@type": "GiveAction";
|
|
agent?: { identifier: string };
|
|
description?: string;
|
|
fulfills?: { "@type": string; identifier?: string; lastClaimId?: string }[];
|
|
identifier?: string;
|
|
image?: string;
|
|
object?: { amountOfThisGood: number; unitCode: string };
|
|
provider?: GenericVerifiableCredential;
|
|
recipient?: { identifier: string };
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id8
|
|
export interface OfferVerifiableCredential extends GenericVerifiableCredential {
|
|
"@context"?: string;
|
|
"@type": "Offer";
|
|
description?: string;
|
|
includesObject?: { amountOfThisGood: number; unitCode: string };
|
|
itemOffered?: {
|
|
description?: string;
|
|
isPartOf?: {
|
|
identifier?: string;
|
|
lastClaimId?: string;
|
|
"@type"?: string;
|
|
name?: string;
|
|
};
|
|
};
|
|
offeredBy?: { identifier: string };
|
|
recipient?: { identifier: string };
|
|
validThrough?: string;
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id7
|
|
export interface PlanVerifiableCredential extends GenericVerifiableCredential {
|
|
"@context": "https://schema.org";
|
|
"@type": "PlanAction";
|
|
name: string;
|
|
agent?: { identifier: string };
|
|
description?: string;
|
|
identifier?: string;
|
|
lastClaimId?: string;
|
|
location?: {
|
|
geo: { "@type": "GeoCoordinates"; latitude: number; longitude: number };
|
|
};
|
|
}
|
|
|
|
// AKA Registration & RegisterAction
|
|
export interface RegisterVerifiableCredential {
|
|
"@context": string;
|
|
"@type": "RegisterAction";
|
|
agent: { identifier: string };
|
|
identifier?: string;
|
|
object: string;
|
|
participant?: { identifier: string };
|
|
}
|