Skip to content

Commit b266775

Browse files
feat: Store and return a sha256 checksum for uploaded extensions
1 parent 482f920 commit b266775

4 files changed

Lines changed: 29 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 125
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-bd00e13bd6d37c150009e612ebeb6ef03d050610f80aaed517e283812c7b9ba9.yml
3-
openapi_spec_hash: 08c7c031877d6b882ff291b389937028
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e123113e7c86e8a61c763f0078adec5b0a7df621f2c31824e8f553331cf7a624.yml
3+
openapi_spec_hash: 940fb94967b6cb5e13daef6161d3abbf
44
config_hash: 06186eb40e0058a2a87ac251fc07415d

src/kernel/types/extension_get_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ class ExtensionGetResponse(BaseModel):
2020
size_bytes: int
2121
"""Size of the extension archive in bytes"""
2222

23+
checksum: Optional[str] = None
24+
"""
25+
SHA-256 checksum, encoded as lowercase hexadecimal, of the exact uploaded
26+
extension archive bytes. This is not a normalized checksum of the extension
27+
contents; archive metadata, file ordering, and compression can change the
28+
checksum for otherwise identical contents. Omitted for legacy rows and
29+
server-repackaged Chrome Web Store extensions.
30+
"""
31+
2332
last_used_at: Optional[datetime] = None
2433
"""Timestamp when the extension was last used"""
2534

src/kernel/types/extension_list_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ class ExtensionListResponse(BaseModel):
2020
size_bytes: int
2121
"""Size of the extension archive in bytes"""
2222

23+
checksum: Optional[str] = None
24+
"""
25+
SHA-256 checksum, encoded as lowercase hexadecimal, of the exact uploaded
26+
extension archive bytes. This is not a normalized checksum of the extension
27+
contents; archive metadata, file ordering, and compression can change the
28+
checksum for otherwise identical contents. Omitted for legacy rows and
29+
server-repackaged Chrome Web Store extensions.
30+
"""
31+
2332
last_used_at: Optional[datetime] = None
2433
"""Timestamp when the extension was last used"""
2534

src/kernel/types/extension_upload_response.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ class ExtensionUploadResponse(BaseModel):
2020
size_bytes: int
2121
"""Size of the extension archive in bytes"""
2222

23+
checksum: Optional[str] = None
24+
"""
25+
SHA-256 checksum, encoded as lowercase hexadecimal, of the exact uploaded
26+
extension archive bytes. This is not a normalized checksum of the extension
27+
contents; archive metadata, file ordering, and compression can change the
28+
checksum for otherwise identical contents. Omitted for legacy rows and
29+
server-repackaged Chrome Web Store extensions.
30+
"""
31+
2332
last_used_at: Optional[datetime] = None
2433
"""Timestamp when the extension was last used"""
2534

0 commit comments

Comments
 (0)