@cstar.help/js 0.15.1 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +478 -7
- package/dist/index.d.cts +129 -6
- package/dist/index.d.ts +129 -6
- package/dist/index.js +475 -6
- package/dist/webhook/index.d.cts +21 -1
- package/dist/webhook/index.d.ts +21 -1
- package/dist/webhook/node.d.cts +21 -1
- package/dist/webhook/node.d.ts +21 -1
- package/package.json +1 -1
package/dist/webhook/node.d.cts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/** Every webhook event type cStar can dispatch. */
|
|
2
|
-
type WebhookEventType = 'article.created' | 'article.deleted' | 'article.published' | 'article.updated' | 'boss.damaged' | 'boss.defeated' | 'boss.spawned' | 'community_post.commented' | 'community_post.created' | 'community_post.deleted' | 'community_post.status_changed' | 'community_post.updated' | 'community_post.voted' | 'customer.created' | 'customer.deleted' | 'customer.updated' | 'customer_group.created' | 'customer_group.deleted' | 'customer_group.updated' | 'player.achievement_unlocked' | 'player.level_up' | 'player.quest_completed' | 'player.streak_milestone' | 'player.xp_gained' | 'social.high_five_sent' | 'social.one_up_sent' | 'survey.submitted' | 'ticket.assigned' | 'ticket.closed' | 'ticket.created' | 'ticket.deleted' | 'ticket.message_added' | 'ticket.updated';
|
|
2
|
+
type WebhookEventType = 'agent.preferences_updated' | 'article.created' | 'article.deleted' | 'article.published' | 'article.updated' | 'boss.damaged' | 'boss.defeated' | 'boss.spawned' | 'community_post.commented' | 'community_post.created' | 'community_post.deleted' | 'community_post.status_changed' | 'community_post.updated' | 'community_post.voted' | 'customer.created' | 'customer.deleted' | 'customer.updated' | 'customer_group.created' | 'customer_group.deleted' | 'customer_group.updated' | 'player.achievement_unlocked' | 'player.level_up' | 'player.quest_completed' | 'player.streak_milestone' | 'player.xp_gained' | 'social.high_five_sent' | 'social.one_up_sent' | 'survey.submitted' | 'team.preferences_updated' | 'ticket.assigned' | 'ticket.closed' | 'ticket.created' | 'ticket.deleted' | 'ticket.message_added' | 'ticket.updated';
|
|
3
|
+
/** Payload for `agent.preferences_updated` events. */
|
|
4
|
+
interface AgentPreferencesUpdatedPayload {
|
|
5
|
+
team_id: string;
|
|
6
|
+
member_id: string;
|
|
7
|
+
agent_id: string;
|
|
8
|
+
changed: Array<string>;
|
|
9
|
+
preferences: {
|
|
10
|
+
boringMode: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
3
13
|
/** Payload for `article.created` events. */
|
|
4
14
|
interface ArticleCreatedPayload {
|
|
5
15
|
article: {
|
|
@@ -274,6 +284,14 @@ interface SurveySubmittedPayload {
|
|
|
274
284
|
email: string;
|
|
275
285
|
};
|
|
276
286
|
}
|
|
287
|
+
/** Payload for `team.preferences_updated` events. */
|
|
288
|
+
interface TeamPreferencesUpdatedPayload {
|
|
289
|
+
team_id: string;
|
|
290
|
+
changed: Array<string>;
|
|
291
|
+
preferences: {
|
|
292
|
+
bossBattlesEnabled: boolean;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
277
295
|
/** Payload for `ticket.assigned` events. */
|
|
278
296
|
interface TicketAssignedPayload {
|
|
279
297
|
ticket: {
|
|
@@ -364,6 +382,7 @@ interface TicketUpdatedPayload {
|
|
|
364
382
|
}
|
|
365
383
|
/** Maps each event type to its payload interface — used internally for the discriminated union. */
|
|
366
384
|
interface WebhookEventDataMap {
|
|
385
|
+
'agent.preferences_updated': AgentPreferencesUpdatedPayload;
|
|
367
386
|
'article.created': ArticleCreatedPayload;
|
|
368
387
|
'article.deleted': ArticleDeletedPayload;
|
|
369
388
|
'article.published': ArticlePublishedPayload;
|
|
@@ -391,6 +410,7 @@ interface WebhookEventDataMap {
|
|
|
391
410
|
'social.high_five_sent': SocialHighFiveSentPayload;
|
|
392
411
|
'social.one_up_sent': SocialOneUpSentPayload;
|
|
393
412
|
'survey.submitted': SurveySubmittedPayload;
|
|
413
|
+
'team.preferences_updated': TeamPreferencesUpdatedPayload;
|
|
394
414
|
'ticket.assigned': TicketAssignedPayload;
|
|
395
415
|
'ticket.closed': TicketClosedPayload;
|
|
396
416
|
'ticket.created': TicketCreatedPayload;
|
package/dist/webhook/node.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/** Every webhook event type cStar can dispatch. */
|
|
2
|
-
type WebhookEventType = 'article.created' | 'article.deleted' | 'article.published' | 'article.updated' | 'boss.damaged' | 'boss.defeated' | 'boss.spawned' | 'community_post.commented' | 'community_post.created' | 'community_post.deleted' | 'community_post.status_changed' | 'community_post.updated' | 'community_post.voted' | 'customer.created' | 'customer.deleted' | 'customer.updated' | 'customer_group.created' | 'customer_group.deleted' | 'customer_group.updated' | 'player.achievement_unlocked' | 'player.level_up' | 'player.quest_completed' | 'player.streak_milestone' | 'player.xp_gained' | 'social.high_five_sent' | 'social.one_up_sent' | 'survey.submitted' | 'ticket.assigned' | 'ticket.closed' | 'ticket.created' | 'ticket.deleted' | 'ticket.message_added' | 'ticket.updated';
|
|
2
|
+
type WebhookEventType = 'agent.preferences_updated' | 'article.created' | 'article.deleted' | 'article.published' | 'article.updated' | 'boss.damaged' | 'boss.defeated' | 'boss.spawned' | 'community_post.commented' | 'community_post.created' | 'community_post.deleted' | 'community_post.status_changed' | 'community_post.updated' | 'community_post.voted' | 'customer.created' | 'customer.deleted' | 'customer.updated' | 'customer_group.created' | 'customer_group.deleted' | 'customer_group.updated' | 'player.achievement_unlocked' | 'player.level_up' | 'player.quest_completed' | 'player.streak_milestone' | 'player.xp_gained' | 'social.high_five_sent' | 'social.one_up_sent' | 'survey.submitted' | 'team.preferences_updated' | 'ticket.assigned' | 'ticket.closed' | 'ticket.created' | 'ticket.deleted' | 'ticket.message_added' | 'ticket.updated';
|
|
3
|
+
/** Payload for `agent.preferences_updated` events. */
|
|
4
|
+
interface AgentPreferencesUpdatedPayload {
|
|
5
|
+
team_id: string;
|
|
6
|
+
member_id: string;
|
|
7
|
+
agent_id: string;
|
|
8
|
+
changed: Array<string>;
|
|
9
|
+
preferences: {
|
|
10
|
+
boringMode: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
3
13
|
/** Payload for `article.created` events. */
|
|
4
14
|
interface ArticleCreatedPayload {
|
|
5
15
|
article: {
|
|
@@ -274,6 +284,14 @@ interface SurveySubmittedPayload {
|
|
|
274
284
|
email: string;
|
|
275
285
|
};
|
|
276
286
|
}
|
|
287
|
+
/** Payload for `team.preferences_updated` events. */
|
|
288
|
+
interface TeamPreferencesUpdatedPayload {
|
|
289
|
+
team_id: string;
|
|
290
|
+
changed: Array<string>;
|
|
291
|
+
preferences: {
|
|
292
|
+
bossBattlesEnabled: boolean;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
277
295
|
/** Payload for `ticket.assigned` events. */
|
|
278
296
|
interface TicketAssignedPayload {
|
|
279
297
|
ticket: {
|
|
@@ -364,6 +382,7 @@ interface TicketUpdatedPayload {
|
|
|
364
382
|
}
|
|
365
383
|
/** Maps each event type to its payload interface — used internally for the discriminated union. */
|
|
366
384
|
interface WebhookEventDataMap {
|
|
385
|
+
'agent.preferences_updated': AgentPreferencesUpdatedPayload;
|
|
367
386
|
'article.created': ArticleCreatedPayload;
|
|
368
387
|
'article.deleted': ArticleDeletedPayload;
|
|
369
388
|
'article.published': ArticlePublishedPayload;
|
|
@@ -391,6 +410,7 @@ interface WebhookEventDataMap {
|
|
|
391
410
|
'social.high_five_sent': SocialHighFiveSentPayload;
|
|
392
411
|
'social.one_up_sent': SocialOneUpSentPayload;
|
|
393
412
|
'survey.submitted': SurveySubmittedPayload;
|
|
413
|
+
'team.preferences_updated': TeamPreferencesUpdatedPayload;
|
|
394
414
|
'ticket.assigned': TicketAssignedPayload;
|
|
395
415
|
'ticket.closed': TicketClosedPayload;
|
|
396
416
|
'ticket.created': TicketCreatedPayload;
|