Skip to content

Commit e708fb3

Browse files
committed
Release v0.8.2
1 parent e54c26c commit e708fb3

15 files changed

Lines changed: 149 additions & 14 deletions

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## Version 0.8.2
4+
5+
* **`orderBy` support added to `filterNotifications`**:
6+
* Added optional `orderBy` contract to service/backend filtering flow with date-based fields: `sendAfter`, `sentAt`, `readAt`, `createdAt`, `updatedAt`.
7+
* Added explicit ordering direction support: `asc` and `desc`.
8+
* Added/extended backend filter capability keys for ordering: `orderBy.sendAfter`, `orderBy.sentAt`, `orderBy.readAt`, `orderBy.createdAt`, `orderBy.updatedAt`.
9+
* Updated service-level capability merge behavior coverage for multi-backend reads (`defaults + backend overrides`).
10+
* **Backend behavior**:
11+
* Prisma backend supports all `orderBy.*` fields.
12+
* Medplum backend supports ordering by `sendAfter`, `sentAt`, `createdAt`, `updatedAt`; `orderBy.readAt` is unsupported and reported as `false`.
13+
* **Documentation updates**:
14+
* Added README section describing `filterNotifications(..., orderBy)`, `NotificationOrderBy` shape, and capability discovery with `getBackendSupportedFilterCapabilities()`.
15+
316
## Version 0.8.1
417

518
* **Multi-backend support added to VintaSend**:

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,57 @@ const backendStats = await vintasend.getBackendSyncStats();
159159
- Additional backend replication failures are logged and do not fail the primary operation.
160160
- This keeps primary workflows available while still enabling redundancy.
161161

162+
## Filtering and Ordering Notifications
163+
164+
Use `filterNotifications` to query notifications with pagination and optional ordering.
165+
166+
```typescript
167+
const notifications = await vintasend.filterNotifications(
168+
{
169+
status: 'PENDING_SEND',
170+
},
171+
1,
172+
25,
173+
{
174+
field: 'createdAt',
175+
direction: 'desc',
176+
},
177+
);
178+
```
179+
180+
### `orderBy` shape
181+
182+
```typescript
183+
type NotificationOrderBy = {
184+
field: 'sendAfter' | 'sentAt' | 'readAt' | 'createdAt' | 'updatedAt';
185+
direction: 'asc' | 'desc';
186+
};
187+
```
188+
189+
Examples:
190+
- `{ field: 'createdAt', direction: 'desc' }`
191+
- `{ field: 'sendAfter', direction: 'asc' }`
192+
193+
### Checking backend support
194+
195+
Use `getBackendSupportedFilterCapabilities()` to detect support gaps per backend.
196+
197+
```typescript
198+
const capabilities = await vintasend.getBackendSupportedFilterCapabilities();
199+
200+
if (!capabilities['orderBy.readAt']) {
201+
// Fallback to another ordering field
202+
}
203+
```
204+
205+
When using multiple backends, you can check capabilities for a specific backend identifier:
206+
207+
```typescript
208+
const replicaCapabilities = await vintasend.getBackendSupportedFilterCapabilities('replica-backend');
209+
```
210+
211+
`vintasend-medplum` currently does not support `orderBy.readAt`, and reports `orderBy.readAt: false`.
212+
162213
## Attachment Support
163214

164215
VintaSend supports file attachments for notifications with an extensible architecture that allows you to choose your preferred storage backend.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vintasend",
3-
"version": "0.8.1",
3+
"version": "0.8.2",
44
"main": "dist/index.js",
55
"files": [
66
"dist"

src/implementations/vintasend-pug

0 commit comments

Comments
 (0)