Commit 9ae9985
refactor: adopt AutoSDK-generated helpers (issues #332-#337 closed)
All six AutoSDK generator improvements filed yesterday shipped in
autosdk.cli 0.30.2-dev.59. Switching to the generated runtime lets us
delete five hand-written shim files (~250 LOC) while gaining additional
typed exception variants, idempotency-key on every mutating op, and
RFC-5988 Link-header pagination — none of which we had hand-rolled.
generate.sh — added flags:
--generate-http-exception-hierarchy (issue #332)
--generate-idempotency-helpers
--idempotency-header-name x-idempotency-key (issue #333)
--generate-retry-handler (issue #335)
--generate-pageable-helpers (issue #334 — AutoSDKPager.NextUrlAsync + EnsureSameOrigin)
--generate-multipart-upload-helpers (issue #336 — AutoSDKUploadFile)
Deleted (now redundant with generated equivalents):
FirecrawlExceptions.cs → AuthenticationException / PaymentRequiredException
/ RateLimitException (with RetryAfter) /
ServerException now generated, plus more
(AuthorizationException 403, NotFoundException 404,
RequestTimeoutException 408, ConflictException 409,
ValidationException 422).
FirecrawlClient.Exceptions.cs → ApiException.Create() routes every error
response to the typed subclass automatically;
no ProcessResponse partial wiring needed.
FirecrawlExceptionMapper.cs → ApiException.TryParseRetryAfter is now a
public static helper inside the generated
ApiException type.
IdempotencyKeyExtensions.cs → every POST/PATCH/DELETE op now takes a
string? idempotencyKey parameter directly.
PaginationHelper.cs → AutoSDKPager.EnsureSameOrigin replaces it;
pagination helpers now delegate to it.
Refactored:
V2/ParseFile.cs → thin compatibility shim around
AutoSDKUploadFile.From{Bytes,Path,Stream}.
Drops the duplicated MIME-type table — now
uses AutoSDKMimeTypeGuesser which covers
more types (audio/video/archives).
V2/V2Client.cs → ParseAsync accepts AutoSDKUploadFile +
uses ToHttpContent("file"); error path uses
ApiException.Create for typed exceptions;
monitor PaginateAsync uses
AutoSDKPager.EnsureSameOrigin.
CrawlClient.Paginate.cs → uses AutoSDKPager.EnsureSameOrigin + raises
typed exceptions via ApiException.Create.
ScrapingClient.PaginateBatch.cs → same.
Filed AutoSDK #349 for a generator XML-doc bug in
AutoSDKUploadFile.g.cs (cref uses C# keyword 'byte' instead of 'Byte',
causing CS1584/CS1658/CS0419 under GenerateDocumentationFile=true).
Worked around with CS1584/CS1658/CS0419 in <NoWarn>.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cbabfd0 commit 9ae9985
63 files changed
Lines changed: 2145 additions & 1030 deletions
File tree
- src/libs/Firecrawl
- Generated
- V2
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
28 | 45 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments