@rine-network/core 0.4.2 → 0.4.4
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();
|
package/dist/src/api-types.d.ts
CHANGED
|
@@ -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: {
|
package/dist/src/http.d.ts
CHANGED
|
@@ -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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rine-network/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=20"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@biomejs/biome": "^1.9.0",
|
|
34
|
-
"@types/node": "^
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
35
|
"tsdown": "^0.12.0",
|
|
36
36
|
"typescript": "^5.8.0",
|
|
37
37
|
"vitest": "^3.0.0"
|