@ecodrix/erix-api 1.0.6 → 1.0.7
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/cli.js +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/ts/browser/index.global.js +1 -1
- package/dist/ts/browser/index.global.js.map +1 -1
- package/dist/ts/cjs/index.cjs +1 -1
- package/dist/ts/cjs/index.cjs.map +1 -1
- package/dist/ts/cjs/index.d.cts +7 -3
- package/dist/ts/esm/index.d.ts +7 -3
- package/dist/ts/esm/index.js +1 -1
- package/dist/ts/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/resources/notifications.ts +12 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodrix/erix-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"author": "ECODrIx Team <contact@ecodrix.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Official Isomorphic SDK for the ECODrIx platform. Native support for WhatsApp, CRM, Storage, and Meetings across TS, JS, Python, and Java.",
|
|
@@ -122,32 +122,37 @@ export class Notifications extends APIResource {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// --- CRM Notifications (Alerts) ---
|
|
125
|
+
// Backend routes mounted at /api/crm — see crm.router.ts + notification.routes.ts
|
|
125
126
|
|
|
126
127
|
/**
|
|
127
|
-
* List
|
|
128
|
+
* List unread CRM notifications/alerts for the current tenant.
|
|
129
|
+
* Maps to: GET /api/crm/notifications
|
|
128
130
|
*/
|
|
129
131
|
async listAlerts<T = any>(params?: { limit?: number; unreadOnly?: boolean }) {
|
|
130
|
-
return this.get<T>("/api/
|
|
132
|
+
return this.get<T>("/api/crm/notifications", { params } as any);
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
136
|
* Dismiss a specific notification alert.
|
|
137
|
+
* Maps to: PATCH /api/crm/notifications/:id/dismiss
|
|
135
138
|
*/
|
|
136
139
|
async dismissAlert<T = any>(notificationId: string) {
|
|
137
|
-
return this.patch<T>(`/api/
|
|
140
|
+
return this.patch<T>(`/api/crm/notifications/${notificationId}/dismiss`);
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
|
-
* Clear (dismiss) all notifications for the current
|
|
144
|
+
* Clear (dismiss) all notifications for the current tenant.
|
|
145
|
+
* Maps to: DELETE /api/crm/notifications/clear-all
|
|
142
146
|
*/
|
|
143
147
|
async clearAllAlerts<T = any>() {
|
|
144
|
-
return this.deleteRequest<T>("/api/
|
|
148
|
+
return this.deleteRequest<T>("/api/crm/notifications/clear-all");
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
/**
|
|
148
|
-
* Retry an action from a notification (e.g. failed send).
|
|
152
|
+
* Retry an action from a notification (e.g. failed automation send).
|
|
153
|
+
* Maps to: POST /api/crm/notifications/:id/retry
|
|
149
154
|
*/
|
|
150
155
|
async retryAction<T = any>(notificationId: string) {
|
|
151
|
-
return this.post<T>(`/api/
|
|
156
|
+
return this.post<T>(`/api/crm/notifications/${notificationId}/retry`, {});
|
|
152
157
|
}
|
|
153
158
|
}
|