Skip to content

Commit f31fe17

Browse files
committed
chore: Expose webhooks to main object
1 parent c8ab1e2 commit f31fe17

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/typeform.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { teams } from './teams'
55
import { themes } from './themes'
66
import { workspaces } from './workspaces'
77
import { responses } from './responses'
8+
import { webhooks } from './webhooks'
89

910
export const createClient = (args = {}) => {
1011
if (args.token === undefined) {
@@ -19,7 +20,8 @@ export const createClient = (args = {}) => {
1920
teams: teams(http),
2021
themes: themes(http),
2122
workspaces: workspaces(http),
22-
responses: responses(http)
23+
responses: responses(http),
24+
webhooks: webhooks(http)
2325
}
2426
}
2527

src/webhooks.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
export const webhooks = http => ({
2-
list: args => getResponses(http, args)
2+
list: args => getWebhook(http, args),
3+
create: args => createWebhook(http, args),
4+
update: args => updateWebhook(http, args),
5+
delete: args => deleteWebhook(http, args)
36
})
47

58
export const getWebhook = (http, { uid, tag }) => {

0 commit comments

Comments
 (0)