Skip to content

Commit 9a52533

Browse files
committed
💥 drop support for API Builder
1 parent 6529ce4 commit 9a52533

16 files changed

+17
-831
lines changed

bin/MindeeCLICommand.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ private function handleCustomOrGeneratedProduct(
441441
PredictMethodOptions $predictMethodOptions,
442442
string $product
443443
): bool {
444-
if (in_array($product, ["custom", "generated"])) {
444+
if ($product == "generated") {
445445
$accountName = $input->getOption('account_name');
446446
$endpointName = $input->getOption('endpoint_name');
447447
$endpointVersion = $input->getOption('endpoint_version') ?? '1';
@@ -459,7 +459,6 @@ private function handleCustomOrGeneratedProduct(
459459
"<comment>No version provided for \"$endpointName\", version 1 will be used by default.</comment>"
460460
);
461461
}
462-
463462
$endpoint = $client->createEndpoint($endpointName, $accountName, $endpointVersion);
464463
$predictMethodOptions->setEndpoint($endpoint);
465464
}

bin/MindeeCLIDocuments.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ public static function getSpecs(): array
2020
false,
2121
true
2222
),
23-
"custom" => new DocumentCommandConfig(
24-
"Custom document type from API builder",
25-
\Mindee\Product\Custom\CustomV1::class,
26-
true,
27-
false
28-
),
2923
"barcode-reader" => new DocumentCommandConfig(
3024
"Barcode Reader",
3125
\Mindee\Product\BarcodeReader\BarcodeReaderV1::class,

docs/code_samples/custom_v1.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
//
4+
// DEPRECATED API
5+
// Support removed in version 2.0.
6+
// Use only with version 1.x of the library.
7+
//
8+
39
use Mindee\Client;
410
use Mindee\Product\Custom\CustomV1;
511
use Mindee\Input\PredictMethodOptions;

src/Parsing/Custom/ClassificationField.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Parsing/Custom/CustomLine.php

Lines changed: 0 additions & 226 deletions
This file was deleted.

src/Parsing/Custom/ListField.php

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)