@mentio-dev/sdk 0.8.0 → 0.8.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +21 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2519,6 +2519,10 @@ type WebhookChannel = {
2519
2519
  headers: {
2520
2520
  [key: string]: string;
2521
2521
  };
2522
+ /**
2523
+ * The account events this endpoint receives on its own, no rule involved: keyword and wallet state changes. Empty when it receives none; mention and digest deliveries come through rules as before.
2524
+ */
2525
+ events: Array<'keyword.capped' | 'keyword.paused_for_balance' | 'keyword.resumed' | 'wallet.low' | 'wallet.paused' | 'wallet.resumed'>;
2522
2526
  /**
2523
2527
  * Only on creation and rotation. Signs every request: X-Mentions-Signature-V2 is v2= plus the hex HMAC-SHA256 of "<X-Mentions-Timestamp>.<raw body>" (reject a timestamp older than a few minutes); X-Mentions-Signature, the hex HMAC-SHA256 of the raw body alone, stays for older verifiers.
2524
2528
  */
@@ -2611,6 +2615,10 @@ type CreateWebhookChannel = {
2611
2615
  headers?: {
2612
2616
  [key: string]: string;
2613
2617
  };
2618
+ /**
2619
+ * Account events to receive at this endpoint (keyword and wallet state changes), on top of whatever rules send here. Omit for none.
2620
+ */
2621
+ events?: Array<'keyword.capped' | 'keyword.paused_for_balance' | 'keyword.resumed' | 'wallet.low' | 'wallet.paused' | 'wallet.resumed'>;
2614
2622
  };
2615
2623
  type GetHealthData = {
2616
2624
  body?: never;
@@ -6743,6 +6751,10 @@ type UpdateChannelData = {
6743
6751
  headers?: {
6744
6752
  [key: string]: string;
6745
6753
  };
6754
+ /**
6755
+ * Webhooks only; replaces the whole set of account events the endpoint receives. An empty list unsubscribes it from all of them.
6756
+ */
6757
+ events?: Array<'keyword.capped' | 'keyword.paused_for_balance' | 'keyword.resumed' | 'wallet.low' | 'wallet.paused' | 'wallet.resumed'>;
6746
6758
  };
6747
6759
  path: {
6748
6760
  /**
@@ -6869,7 +6881,14 @@ type ListChannelDeliveriesResponses = {
6869
6881
  * Delivery id (dlv_...), also the webhook payload id.
6870
6882
  */
6871
6883
  id: string;
6872
- kind: 'mention' | 'digest';
6884
+ /**
6885
+ * mention: an instant rule's delivery. digest: a daily or weekly summary. event: an account event the channel subscribed to.
6886
+ */
6887
+ kind: 'mention' | 'digest' | 'event';
6888
+ /**
6889
+ * The event name the payload carried: the rule's (mention.matched unless it set one, digest for a summary) or the account event's.
6890
+ */
6891
+ event: string;
6873
6892
  status: 'pending' | 'delivered' | 'failed';
6874
6893
  attempts: number;
6875
6894
  /**
@@ -6885,7 +6904,7 @@ type ListChannelDeliveriesResponses = {
6885
6904
  */
6886
6905
  createdAt: string;
6887
6906
  /**
6888
- * The alert that produced it; name only, since alerts can be deleted.
6907
+ * The alert that produced it; name only, since alerts can be deleted. name is null for an account event, which no rule produces.
6889
6908
  */
6890
6909
  alert: {
6891
6910
  name: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mentio-dev/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "TypeScript SDK for the Mentio API, generated from its OpenAPI document.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.mentio.dev/sdks",