Skip to content

Commit 3c0daec

Browse files
committed
feat: Support responses and webhooks and update docs
1 parent 1caa69d commit 3c0daec

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,22 @@ Client returns the following properties:
7272
- `teams`
7373
- `workspaces`
7474
- `themes`
75+
- `responses`
76+
- `webhooks`
7577

7678
Each one of them encapsulates the operations related to it (like listing, updating, deleting the resource).
7779

7880
### Forms
7981

80-
#### `forms.list({ page: 1, page_size: 10, search: '' })`
82+
#### `forms.list({ page: 1, page_size = 10, search = '' })`
8183
- Get a list of your typeforms
8284
- Returns a list of typeform with the payload [refenced here](https://developer.typeform.com/create/reference/retrieve-forms/).
8385

8486
#### `forms.get({ uid })`
8587
- Get a typeform by UID
8688
- Returns a typeform with the payload [refenced here](https://developer.typeform.com/create/reference/retrieve-form/).
8789

88-
#### `forms.update({ uid, data = {}, override: false })`
90+
#### `forms.update({ uid, data = {}, override = false })`
8991
- Get a typeform by UID
9092
- Returns a typeform with the payload [refenced here](https://developer.typeform.com/create/reference/retrieve-form/).
9193

@@ -182,6 +184,39 @@ Each one of them encapsulates the operations related to it (like listing, updati
182184
- `members`: `string` or an `array` and should be the email fo the user
183185
- Removing multiple members at once is possible using an array of emails
184186

187+
### Responses
188+
189+
#### `responses.list({ uid, page_size, since, until, after, before, completed, sort, query, fields })`
190+
- List responses from the given ID
191+
- `uid`: typeform UID
192+
- For parameter details check [the documentation](https://developer.typeform.com/responses/reference/retrieve-responses/)
193+
194+
## Webhooks
195+
196+
#### `webhook.get({ uid, tag })`
197+
- Get detailf for a webhook with the given tag
198+
- `uid`: typeform UID
199+
- `tag`: tag of the webhook created
200+
201+
#### `webhook.create({ uid, tag, url, enable = false })`
202+
- Create a webhook with the given tag
203+
- `uid`: typeform UID
204+
- `tag`: (string) tag of the webhook, how are you going to identify it
205+
- `url`: (string) url of the service you want to notify
206+
- `enable`: (bool)
207+
208+
#### `webhook.update({ uid, tag, url, enable = false })`
209+
- Update a webhook with the given tag
210+
- `uid`: typeform UID
211+
- `tag`: (string) tag of the webhook, how are you going to identify it
212+
- `url`: (string) url of the service you want to notify
213+
- `enable`: (bool)
214+
215+
#### `webhook.delete({ uid, tag })`
216+
- Delete for a webhook with the given tag
217+
- `uid`: typeform UID
218+
- `tag`: (string) tag of the webhook
219+
185220
## Examples
186221

187222
##### Update specific typeform property, as [referenced here](https://developer.typeform.com/create/reference/update-form-patch/)
@@ -254,7 +289,6 @@ The theme property applies a `theme` to the form. If you don't specify a value f
254289

255290
```
256291

257-
258292
### Testing
259293

260294
The project has implemeted unit and integration tests.

src/webhooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const webhooks = http => ({
2-
list: args => getWebhook(http, args),
2+
get: args => getWebhook(http, args),
33
create: args => createWebhook(http, args),
44
update: args => updateWebhook(http, args),
55
delete: args => deleteWebhook(http, args)

0 commit comments

Comments
 (0)