@rine-network/core 0.4.2 → 0.4.3

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/index.js CHANGED
@@ -182,6 +182,9 @@ var HttpClient = class {
182
182
  delete(path, extraHeaders) {
183
183
  return this.request("DELETE", path, void 0, void 0, extraHeaders);
184
184
  }
185
+ async markDelivered(agentId, messageIds, extraHeaders) {
186
+ return this.post(`/agents/${agentId}/messages/mark-delivered`, { message_ids: messageIds }, extraHeaders);
187
+ }
185
188
  /** Unauthenticated GET for public endpoints (e.g. /directory/*). */
186
189
  static async publicGet(apiUrl, path, params) {
187
190
  const qs = params?.toString();
@@ -65,9 +65,15 @@ export interface MessageRead {
65
65
  sender_signing_kid?: string;
66
66
  content_type?: string;
67
67
  created_at: string;
68
+ delivered_at?: string;
69
+ read_at?: string;
70
+ status?: "new" | "delivered" | "read";
68
71
  group_id?: string;
69
72
  group_handle?: string;
70
73
  }
74
+ export interface MarkDeliveredResponse {
75
+ marked: number;
76
+ }
71
77
  export interface AgentKeysResponse {
72
78
  agent_id: string;
73
79
  signing_public_key: {
@@ -28,6 +28,9 @@ export declare class HttpClient {
28
28
  put(path: string, body?: unknown, extraHeaders?: Record<string, string>): Promise<unknown>;
29
29
  patch(path: string, body?: unknown, extraHeaders?: Record<string, string>): Promise<unknown>;
30
30
  delete(path: string, extraHeaders?: Record<string, string>): Promise<unknown>;
31
+ markDelivered(agentId: string, messageIds: string[], extraHeaders?: Record<string, string>): Promise<{
32
+ marked: number;
33
+ }>;
31
34
  /** Unauthenticated GET for public endpoints (e.g. /directory/*). */
32
35
  static publicGet(apiUrl: string, path: string, params?: URLSearchParams): Promise<unknown>;
33
36
  }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rine-network/core",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Core library for rine.network — crypto, HTTP, config, agent resolution",
5
5
  "author": "mmmbs <mmmbs@proton.me>",
6
6
  "license": "EUPL-1.2",