This commit is contained in:
2026-03-29 10:26:38 -05:00
parent 05d4f6e78b
commit b1c99893a6
1628 changed files with 67782 additions and 60143 deletions

View File

@@ -1,24 +1,24 @@
import { IdentificationResult, Language } from '../types';
import { backendApiClient } from './backend/backendApiClient';
import { createIdempotencyKey } from '../utils/idempotency';
interface IdentifyOptions {
idempotencyKey?: string;
}
export const PlantRecognitionService = {
identify: async (
imageUri: string,
lang: Language = 'de',
options: IdentifyOptions = {},
): Promise<IdentificationResult> => {
const idempotencyKey = options.idempotencyKey || createIdempotencyKey('scan');
const response = await backendApiClient.scanPlant({
idempotencyKey,
imageUri,
language: lang,
});
return response.result;
},
};
import { IdentificationResult, Language } from '../types';
import { backendApiClient } from './backend/backendApiClient';
import { createIdempotencyKey } from '../utils/idempotency';
interface IdentifyOptions {
idempotencyKey?: string;
}
export const PlantRecognitionService = {
identify: async (
imageUri: string,
lang: Language = 'de',
options: IdentifyOptions = {},
): Promise<IdentificationResult> => {
const idempotencyKey = options.idempotencyKey || createIdempotencyKey('scan');
const response = await backendApiClient.scanPlant({
idempotencyKey,
imageUri,
language: lang,
});
return response.result;
},
};