Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit c446fd7

Browse files
authored
feat: Add event_id to event response, move seamapi-types to prod dependencies (#87)
1 parent d5046c9 commit c446fd7

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

docs/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ ___
332332

333333
#### Defined in
334334

335-
[src/types/models.ts:189](https://github.com/seamapi/javascript/blob/main/src/types/models.ts#L189)
335+
[src/types/models.ts:190](https://github.com/seamapi/javascript/blob/main/src/types/models.ts#L190)
336336

337337
___
338338

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"ora": "5.4.1",
4646
"p-retry": "4.6.1",
4747
"prompts": "2.4.2",
48+
"seamapi-types": "1.11.0",
4849
"svix": "0.54.2",
4950
"typed-emitter": "2.1.0",
5051
"yargs": "17.3.1"
@@ -83,7 +84,6 @@
8384
"pkg": "5.5.2",
8485
"playwright": "1.19.2",
8586
"prettier": "2.5.1",
86-
"seamapi-types": "1.3.10",
8787
"semantic-release": "19.0.2",
8888
"testcontainers": "8.4.0",
8989
"ts-json-schema-generator": "0.98.0",

src/types/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export interface Webhook {
182182
type Flatten<EventType extends SeamEvent["event_type"]> =
183183
EventType extends SeamEvent["event_type"]
184184
? {
185+
event_id: string
185186
event_type: EventType
186187
} & Extract<SeamEvent, { event_type: EventType }>["payload"]
187188
: never

tests/webhooks.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test.skip("webhook payload is correctly verified", async (t) => {
3939
)
4040

4141
t.is(callback.event_type, "access_code.created")
42-
t.is(callback.data.device_id, seed.devices.augustLock.id1)
42+
t.is((callback.data as any).device_id, seed.devices.augustLock.id1)
4343
// Check types
4444
t.true(
4545
callback.event_type === "access_code.created" &&

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5094,10 +5094,10 @@ safe-stable-stringify@^2.3.1:
50945094
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
50955095
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
50965096

5097-
seamapi-types@1.3.10:
5098-
version "1.3.10"
5099-
resolved "https://registry.yarnpkg.com/seamapi-types/-/seamapi-types-1.3.10.tgz#d90dcb140872226301bbff428e2d34b31ca174ec"
5100-
integrity sha512-OEZGrwp1A3oz60AbDrfvRIlz3SrURJZeY5jH4SiYG5mjKnoRdchkAjo7uCZOPrldadch2wiAojWD+qp2UOGdnA==
5097+
seamapi-types@1.11.0:
5098+
version "1.11.0"
5099+
resolved "https://registry.yarnpkg.com/seamapi-types/-/seamapi-types-1.11.0.tgz#ed62fcf9173bb8f540036b999b3ce7e0275affac"
5100+
integrity sha512-bo4bVjc3tbnS1jl8S/KGbfgS4bbrOhDTaORW0Cg6eLcd+3iDmwvatAPYFBmNNekj2IOcMKhMMrqbpldC4d8jGA==
51015101

51025102
51035103
version "19.0.2"

0 commit comments

Comments
 (0)