Skip to content

Commit ded8d5c

Browse files
committedApr 6, 2025·
feat: telegram integration
1 parent 4e69f28 commit ded8d5c

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
 

‎.changeset/chilled-bats-rhyme.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"submitjson": minor
3+
---
4+
5+
Adds support for the Telegram integration.
6+
7+
New fields `telegramStatus` and `telegramName` were added to the submission response.
8+
9+
Support for new submission options `telegramNotification`, `slackNotification`, and `discordNotification` were added to the client for better control. Endpoints must be connected to the respective service for these properties to work.

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ console.log('Submission', data)
6969
recaptchaToken?: string
7070
turnstileToken?: string
7171
hcaptchaToken?: string
72+
discordNotification?: boolean
73+
slackNotification?: boolean
74+
telegramNotification?: boolean
7275
}
7376

7477
class SubmitJSON {

‎v1.d.ts

+19
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ export interface components {
100100
* @example xxxxxxxxxxxxx
101101
*/
102102
hcaptchaToken?: string
103+
/**
104+
* @description Send a Discord notification. Endpoint must be integrated with Discord. Available on Growth & Pro plans.
105+
* @example false
106+
*/
107+
discordNotification?: boolean
108+
/**
109+
* @description Send a Slack notification. Endpoint must be integrated with Slack. Available on Growth & Pro plans.
110+
* @example false
111+
*/
112+
slackNotification?: boolean
113+
/**
114+
* @description Send a Telegram notification. Endpoint must be connected to Telegram. Available on Growth & Pro plans.
115+
* @example false
116+
*/
117+
telegramNotification?: boolean
103118
}
104119
}
105120
Submission: {
@@ -158,6 +173,10 @@ export interface components {
158173
submissionId?: string
159174
/** @example ping */
160175
submissionSound?: string
176+
/** @example Your Name - @username */
177+
telegramName?: string | null
178+
/** @enum {string|null} */
179+
telegramStatus?: 'pending' | 'success' | 'error' | 'error-char-limit'
161180
/** @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
162181
userId?: string
163182
/** @enum {string|null} */

0 commit comments

Comments
 (0)