@stacksjs/notifications 0.70.101 → 0.70.102
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/preferences.d.ts +8 -4
- package/package.json +9 -9
package/dist/preferences.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { NotificationChannel } from './index';
|
|
2
|
-
|
|
3
|
-
* Postgres requires `IS NULL`; query builders correctly express that through
|
|
4
|
-
* `whereNull()`, while a bound value remains a normal equality predicate. */
|
|
5
|
-
export declare function wherePreferenceCategory<T extends { where: (column: string, operator: string, value: string) => T whereNull: (column: string) => T }>(query: T, category: string | null): T;
|
|
2
|
+
export declare function wherePreferenceCategory<T extends PreferenceCategoryQuery<T>>(query: T, category: string | null): T;
|
|
6
3
|
/**
|
|
7
4
|
* Load all notification preferences for a user as a Map keyed by channel.
|
|
8
5
|
* Returns `Map<channel, enabled>` — channels with no row recorded are
|
|
@@ -106,5 +103,12 @@ export declare interface NotificationPreferenceRow {
|
|
|
106
103
|
created_at: string
|
|
107
104
|
updated_at: string
|
|
108
105
|
}
|
|
106
|
+
/** Apply the nullable preference category without generating `IS $n` SQL.
|
|
107
|
+
* Postgres requires `IS NULL`; query builders correctly express that through
|
|
108
|
+
* `whereNull()`, while a bound value remains a normal equality predicate. */
|
|
109
|
+
declare interface PreferenceCategoryQuery<T> {
|
|
110
|
+
where: (column: string, operator: string, value: string) => T
|
|
111
|
+
whereNull: (column: string) => T
|
|
112
|
+
}
|
|
109
113
|
/** All channels that can be filtered through preferences. */
|
|
110
114
|
export type PreferenceChannel = NotificationChannel | 'push';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/notifications",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.102",
|
|
6
6
|
"description": "The Stacks notifications integration.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"prepublishOnly": "bun run build"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@stacksjs/chat": "0.70.
|
|
63
|
-
"@stacksjs/cli": "0.70.
|
|
64
|
-
"@stacksjs/config": "0.70.
|
|
62
|
+
"@stacksjs/chat": "0.70.102",
|
|
63
|
+
"@stacksjs/cli": "0.70.102",
|
|
64
|
+
"@stacksjs/config": "0.70.102",
|
|
65
65
|
"better-dx": "^0.2.16",
|
|
66
|
-
"@stacksjs/email": "0.70.
|
|
67
|
-
"@stacksjs/error-handling": "0.70.
|
|
68
|
-
"@stacksjs/push": "0.70.
|
|
69
|
-
"@stacksjs/sms": "0.70.
|
|
70
|
-
"@stacksjs/types": "0.70.
|
|
66
|
+
"@stacksjs/email": "0.70.102",
|
|
67
|
+
"@stacksjs/error-handling": "0.70.102",
|
|
68
|
+
"@stacksjs/push": "0.70.102",
|
|
69
|
+
"@stacksjs/sms": "0.70.102",
|
|
70
|
+
"@stacksjs/types": "0.70.102"
|
|
71
71
|
}
|
|
72
72
|
}
|