Skip to content

Commit c165efa

Browse files
feat(api): manual updates
1 parent fc02d7d commit c165efa

File tree

5 files changed

+3
-76
lines changed

5 files changed

+3
-76
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-3d7da4b8ef2ed30aa32c4fb3e98e498e67402e91aaa5fd4c628fc080bfe82ea1.yml
33
openapi_spec_hash: aaa50fcbccec6f2cf1165f34bc6ac886
4-
config_hash: af15f7df8a4590c14cdce4460983aba6
4+
config_hash: 84bf9f929b0248a6cdf2d526331ed8eb

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
"lint": "./scripts/lint",
2727
"fix": "./scripts/format"
2828
},
29-
"dependencies": {
30-
"standardwebhooks": "^1.0.0"
31-
},
29+
"dependencies": {},
3230
"devDependencies": {
3331
"@arethetypeswrong/cli": "^0.17.0",
3432
"@swc/core": "^1.3.102",

src/resources/webhooks.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,13 @@
22

33
import { APIResource } from '../core/resource';
44
import * as FilesAPI from './files/files';
5-
import { Webhook } from 'standardwebhooks';
65

76
export class Webhooks extends APIResource {
87
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent {
98
return JSON.parse(body) as UnsafeUnwrapWebhookEvent;
109
}
1110

12-
unwrap(
13-
body: string,
14-
{ headers, key }: { headers: Record<string, string>; key?: string },
15-
): UnwrapWebhookEvent {
16-
if (headers !== undefined) {
17-
const keyStr: string | null = key === undefined ? this._client.privateAPIKey : key;
18-
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
19-
const wh = new Webhook(keyStr);
20-
wh.verify(body, headers);
21-
}
11+
unwrap(body: string): UnwrapWebhookEvent {
2212
return JSON.parse(body) as UnwrapWebhookEvent;
2313
}
2414
}

tests/api-resources/webhooks.test.ts

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

yarn.lock

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,6 @@
743743
dependencies:
744744
"@sinonjs/commons" "^3.0.0"
745745

746-
"@stablelib/base64@^1.0.0":
747-
version "1.0.1"
748-
resolved "https://registry.yarnpkg.com/@stablelib/base64/-/base64-1.0.1.tgz#bdfc1c6d3a62d7a3b7bbc65b6cce1bb4561641be"
749-
integrity sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==
750-
751746
752747
version "1.4.16"
753748
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.16.tgz#2cd45d709ce76d448d96bf8d0006849541436611"
@@ -1723,11 +1718,6 @@ fast-levenshtein@^2.0.6:
17231718
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
17241719
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
17251720

1726-
fast-sha256@^1.3.0:
1727-
version "1.3.0"
1728-
resolved "https://registry.yarnpkg.com/fast-sha256/-/fast-sha256-1.3.0.tgz#7916ba2054eeb255982608cccd0f6660c79b7ae6"
1729-
integrity sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==
1730-
17311721
fastq@^1.6.0:
17321722
version "1.17.1"
17331723
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47"
@@ -3111,14 +3101,6 @@ stack-utils@^2.0.3:
31113101
dependencies:
31123102
escape-string-regexp "^2.0.0"
31133103

3114-
standardwebhooks@^1.0.0:
3115-
version "1.0.0"
3116-
resolved "https://registry.yarnpkg.com/standardwebhooks/-/standardwebhooks-1.0.0.tgz#5faa23ceacbf9accd344361101d9e3033b64324f"
3117-
integrity sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==
3118-
dependencies:
3119-
"@stablelib/base64" "^1.0.0"
3120-
fast-sha256 "^1.3.0"
3121-
31223104
string-length@^4.0.1:
31233105
version "4.0.2"
31243106
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"

0 commit comments

Comments
 (0)