Not a Plant Fehlermeldung
This commit is contained in:
@@ -31,35 +31,35 @@ export interface EntitlementState {
|
||||
renewsAt: string | null;
|
||||
}
|
||||
|
||||
export interface BillingSummary {
|
||||
entitlement: EntitlementState;
|
||||
credits: CreditState;
|
||||
availableProducts: PurchaseProductId[];
|
||||
}
|
||||
|
||||
export interface RevenueCatEntitlementInfo {
|
||||
productIdentifier?: string;
|
||||
expirationDate?: string | null;
|
||||
expiresDate?: string | null;
|
||||
}
|
||||
|
||||
export interface RevenueCatNonSubscriptionTransaction {
|
||||
productIdentifier?: string;
|
||||
transactionIdentifier?: string;
|
||||
transactionId?: string;
|
||||
purchaseDate?: string | null;
|
||||
}
|
||||
|
||||
export interface RevenueCatCustomerInfo {
|
||||
appUserId?: string | null;
|
||||
originalAppUserId?: string | null;
|
||||
entitlements: {
|
||||
active: Record<string, RevenueCatEntitlementInfo>;
|
||||
};
|
||||
nonSubscriptions?: Record<string, RevenueCatNonSubscriptionTransaction[]>;
|
||||
allPurchasedProductIdentifiers?: string[];
|
||||
latestExpirationDate?: string | null;
|
||||
}
|
||||
export interface BillingSummary {
|
||||
entitlement: EntitlementState;
|
||||
credits: CreditState;
|
||||
availableProducts: PurchaseProductId[];
|
||||
}
|
||||
|
||||
export interface RevenueCatEntitlementInfo {
|
||||
productIdentifier?: string;
|
||||
expirationDate?: string | null;
|
||||
expiresDate?: string | null;
|
||||
}
|
||||
|
||||
export interface RevenueCatNonSubscriptionTransaction {
|
||||
productIdentifier?: string;
|
||||
transactionIdentifier?: string;
|
||||
transactionId?: string;
|
||||
purchaseDate?: string | null;
|
||||
}
|
||||
|
||||
export interface RevenueCatCustomerInfo {
|
||||
appUserId?: string | null;
|
||||
originalAppUserId?: string | null;
|
||||
entitlements: {
|
||||
active: Record<string, RevenueCatEntitlementInfo>;
|
||||
};
|
||||
nonSubscriptions?: Record<string, RevenueCatNonSubscriptionTransaction[]>;
|
||||
allPurchasedProductIdentifiers?: string[];
|
||||
latestExpirationDate?: string | null;
|
||||
}
|
||||
|
||||
export interface ScanPlantRequest {
|
||||
userId: string;
|
||||
@@ -112,16 +112,16 @@ export interface HealthCheckResponse {
|
||||
billing: BillingSummary;
|
||||
}
|
||||
|
||||
export interface ServiceHealthResponse {
|
||||
ok: boolean;
|
||||
uptimeSec: number;
|
||||
timestamp: string;
|
||||
openAiConfigured: boolean;
|
||||
dbReady?: boolean;
|
||||
dbPath?: string;
|
||||
scanModel?: string;
|
||||
healthModel?: string;
|
||||
}
|
||||
export interface ServiceHealthResponse {
|
||||
ok: boolean;
|
||||
uptimeSec: number;
|
||||
timestamp: string;
|
||||
openAiConfigured: boolean;
|
||||
dbReady?: boolean;
|
||||
dbPath?: string;
|
||||
scanModel?: string;
|
||||
healthModel?: string;
|
||||
}
|
||||
|
||||
export interface SimulatePurchaseRequest {
|
||||
userId: string;
|
||||
@@ -143,21 +143,21 @@ export interface SimulateWebhookRequest {
|
||||
};
|
||||
}
|
||||
|
||||
export interface SimulateWebhookResponse {
|
||||
event: SimulatedWebhookEvent;
|
||||
billing: BillingSummary;
|
||||
}
|
||||
|
||||
export type RevenueCatSyncSource =
|
||||
| 'app_init'
|
||||
| 'subscription_purchase'
|
||||
| 'topup_purchase'
|
||||
| 'restore';
|
||||
|
||||
export interface SyncRevenueCatStateResponse {
|
||||
billing: BillingSummary;
|
||||
syncedAt: string;
|
||||
}
|
||||
export interface SimulateWebhookResponse {
|
||||
event: SimulatedWebhookEvent;
|
||||
billing: BillingSummary;
|
||||
}
|
||||
|
||||
export type RevenueCatSyncSource =
|
||||
| 'app_init'
|
||||
| 'subscription_purchase'
|
||||
| 'topup_purchase'
|
||||
| 'restore';
|
||||
|
||||
export interface SyncRevenueCatStateResponse {
|
||||
billing: BillingSummary;
|
||||
syncedAt: string;
|
||||
}
|
||||
|
||||
export type BackendErrorCode =
|
||||
| 'INSUFFICIENT_CREDITS'
|
||||
@@ -165,7 +165,8 @@ export type BackendErrorCode =
|
||||
| 'TIMEOUT'
|
||||
| 'NETWORK_ERROR'
|
||||
| 'PROVIDER_ERROR'
|
||||
| 'BAD_REQUEST';
|
||||
| 'BAD_REQUEST'
|
||||
| 'NOT_A_PLANT';
|
||||
|
||||
export class BackendApiError extends Error {
|
||||
public readonly code: BackendErrorCode;
|
||||
|
||||
Reference in New Issue
Block a user