@foru-ms/sdk 1.3.1 → 1.3.2
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/README.md +6 -3
- package/dist/types.d.ts +3 -3
- package/package.json +1 -1
- package/src/types.ts +3 -3
package/README.md
CHANGED
|
@@ -304,7 +304,7 @@ Check the `/examples` directory for detailed examples:
|
|
|
304
304
|
* `list(params?: { userId?: string; status?: string; filter?: 'newest' | 'oldest'; cursor?: string; limit?: number })`: List notifications for a user. `limit` controls page size (1-50, default: 15).
|
|
305
305
|
* `create(payload: { threadId?: string; postId?: string; privateMessageId?: string; notifierId?: string; notifiedId: string; type: string; description?: string; extendedData?: Record<string, any> })`: Create a notification manually.
|
|
306
306
|
* `retrieve(id: string, userId?: string)`: Get a notification by ID.
|
|
307
|
-
* `update(id: string, payload: { userId?: string; status
|
|
307
|
+
* `update(id: string, payload: { userId?: string; status?: string })`: Update a notification's status.
|
|
308
308
|
* `delete(id: string, userId?: string)`: Delete a notification.
|
|
309
309
|
* `markAllAsRead(userId?: string, status?: string)`: Bulk update status for all of a user's notifications. Default status is `'read'`.
|
|
310
310
|
|
|
@@ -352,8 +352,8 @@ Check the `/examples` directory for detailed examples:
|
|
|
352
352
|
* `create(payload: { reporterId?: string; reportedId?: string; threadId?: string; postId?: string; privateMessageId?: string; type?: string; description?: string; extendedData?: Record<string, any> })`: Submit a new report.
|
|
353
353
|
* `retrieve(id: string)`: Get a report by ID.
|
|
354
354
|
* `update(id: string, payload: { threadId?: string; postId?: string; privateMessageId?: string; reportedId?: string; reporterId?: string; type?: string; description?: string; status?: string; extendedData?: Record<string, any> })`: Update report details (full update).
|
|
355
|
-
* `updateStatus(id: string, status
|
|
356
|
-
* `batchUpdate(payload: { reportIds: string[]; status
|
|
355
|
+
* `updateStatus(id: string, status?: string)`: Update status of a report (partial update).
|
|
356
|
+
* `batchUpdate(payload: { reportIds: string[]; status?: string })`: Bulk update status for multiple reports.
|
|
357
357
|
* `delete(id: string)`: Delete a report.
|
|
358
358
|
|
|
359
359
|
### Roles (`client.roles`)
|
|
@@ -553,6 +553,9 @@ We welcome contributions! Please see our contributing guidelines for more inform
|
|
|
553
553
|
|
|
554
554
|
## Changelog
|
|
555
555
|
|
|
556
|
+
### v1.3.2
|
|
557
|
+
- Fixed issue with optional parameters not being optional in typescript
|
|
558
|
+
|
|
556
559
|
### v1.3.1
|
|
557
560
|
- Updated Notifications, PrivateMessages, Reports to use `status` (string) instead of `read` (boolean)
|
|
558
561
|
|
package/dist/types.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export interface Notification {
|
|
|
160
160
|
notifiedId: string;
|
|
161
161
|
type: string;
|
|
162
162
|
description?: string;
|
|
163
|
-
status
|
|
163
|
+
status?: string;
|
|
164
164
|
createdAt: string;
|
|
165
165
|
extendedData?: Record<string, any>;
|
|
166
166
|
post?: Post;
|
|
@@ -237,7 +237,7 @@ export interface PrivateMessage {
|
|
|
237
237
|
recipientId: string;
|
|
238
238
|
title?: string;
|
|
239
239
|
body: string;
|
|
240
|
-
status
|
|
240
|
+
status?: string;
|
|
241
241
|
parentId?: string;
|
|
242
242
|
children?: PrivateMessage[];
|
|
243
243
|
sender?: User;
|
|
@@ -260,7 +260,7 @@ export interface Report {
|
|
|
260
260
|
privateMessageId?: string;
|
|
261
261
|
type: string;
|
|
262
262
|
description?: string;
|
|
263
|
-
status
|
|
263
|
+
status?: string;
|
|
264
264
|
createdAt: string;
|
|
265
265
|
post?: Post;
|
|
266
266
|
thread?: Thread;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -181,7 +181,7 @@ export interface Notification {
|
|
|
181
181
|
notifiedId: string;
|
|
182
182
|
type: string;
|
|
183
183
|
description?: string;
|
|
184
|
-
status
|
|
184
|
+
status?: string;
|
|
185
185
|
createdAt: string;
|
|
186
186
|
extendedData?: Record<string, any>;
|
|
187
187
|
post?: Post;
|
|
@@ -264,7 +264,7 @@ export interface PrivateMessage {
|
|
|
264
264
|
recipientId: string;
|
|
265
265
|
title?: string;
|
|
266
266
|
body: string;
|
|
267
|
-
status
|
|
267
|
+
status?: string;
|
|
268
268
|
parentId?: string;
|
|
269
269
|
children?: PrivateMessage[];
|
|
270
270
|
sender?: User;
|
|
@@ -289,7 +289,7 @@ export interface Report {
|
|
|
289
289
|
privateMessageId?: string;
|
|
290
290
|
type: string;
|
|
291
291
|
description?: string;
|
|
292
|
-
status
|
|
292
|
+
status?: string;
|
|
293
293
|
createdAt: string;
|
|
294
294
|
post?: Post;
|
|
295
295
|
thread?: Thread;
|