@anonfly/sdk 1.0.0 → 1.0.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 +96 -6
- package/dist/core/transport/HttpClient.d.ts +2 -2
- package/dist/core/transport/HttpClient.d.ts.map +1 -1
- package/dist/core/transport/WebSocketClient.d.ts +2 -0
- package/dist/core/transport/WebSocketClient.d.ts.map +1 -1
- package/dist/index.cjs +14 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/resources/AdminResource.d.ts +1 -1
- package/dist/resources/AdminResource.d.ts.map +1 -1
- package/dist/resources/AdminResource.test.d.ts +2 -0
- package/dist/resources/AdminResource.test.d.ts.map +1 -0
- package/dist/resources/AuthResource.d.ts +1 -1
- package/dist/resources/AuthResource.d.ts.map +1 -1
- package/dist/resources/MessagesResource.d.ts +1 -1
- package/dist/resources/MessagesResource.d.ts.map +1 -1
- package/dist/resources/RoomsResource.d.ts +1 -1
- package/dist/resources/RoomsResource.d.ts.map +1 -1
- package/dist/resources/RoomsResource.test.d.ts +2 -0
- package/dist/resources/RoomsResource.test.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="../../docs/images/logo.png" width="96" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# @anonfly/sdk
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@anonfly/sdk)
|
|
8
|
+
[](https://www.npmjs.com/package/@anonfly/sdk)
|
|
9
|
+
|
|
10
|
+
The core logic for the Anonfly messaging platform. This package provides a low-level, headless SDK for interacting with the Anonfly API and WebSocket services.
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **🛡️ Industrial-grade Transport:** Powerful `HttpClient` with middleware support.
|
|
15
|
+
- **⚡ Real-time Engine:** Robust `WebSocketClient` with automatic reconnection.
|
|
16
|
+
- **🔄 Resilience:** Built-in `retryMiddleware` with exponential backoff.
|
|
17
|
+
- **📦 Resource-based API:** Clean access to `rooms`, `messages`, `auth`, and `admin` logic.
|
|
18
|
+
- **✨ Pure TypeScript:** Zero-dependency core logic with full type-safety.
|
|
4
19
|
|
|
5
20
|
## Installation
|
|
6
21
|
|
|
@@ -8,12 +23,87 @@ Core SDK logic for the Anonfly service.
|
|
|
8
23
|
npm install @anonfly/sdk
|
|
9
24
|
```
|
|
10
25
|
|
|
11
|
-
##
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Basic Initialization
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { Anonfly } from '@anonfly/sdk';
|
|
32
|
+
|
|
33
|
+
const anonfly = new Anonfly({
|
|
34
|
+
apiKey: 'YOUR_API_KEY',
|
|
35
|
+
baseUrl: 'https://api.anonfly.com/v1',
|
|
36
|
+
wsUrl: 'wss://api.anonfly.com', // Optional for real-time
|
|
37
|
+
retries: 3, // Optional: defaults to built-in retry logic
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Use resources
|
|
41
|
+
const rooms = await anonfly.rooms.list();
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Working with Resources
|
|
45
|
+
|
|
46
|
+
The SDK is organized into logical resources:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// Authentication
|
|
50
|
+
const session = await anonfly.auth.login(credentials);
|
|
51
|
+
|
|
52
|
+
// Message Management
|
|
53
|
+
const message = await anonfly.messages.send(roomId, {
|
|
54
|
+
content: "Hello World",
|
|
55
|
+
type: "text",
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Room Management
|
|
59
|
+
const room = await anonfly.rooms.create({ name: "General" });
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Advanced: Custom Middleware
|
|
63
|
+
|
|
64
|
+
You can extend the `HttpClient` with custom middleware:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
anonfly.http.use(async (request, next) => {
|
|
68
|
+
console.log(`Starting request to ${request.url}`);
|
|
69
|
+
const response = await next(request);
|
|
70
|
+
console.log(`Finished request with status ${response.status}`);
|
|
71
|
+
return response;
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Real-time with WebSockets
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
if (anonfly.ws) {
|
|
79
|
+
anonfly.ws.subscribe('message:new', (data) => {
|
|
80
|
+
console.log('New message received:', data);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
anonfly.ws.connect();
|
|
84
|
+
}
|
|
85
|
+
```
|
|
12
86
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
87
|
+
## Recipes
|
|
88
|
+
|
|
89
|
+
### Handling Connection Drops
|
|
90
|
+
|
|
91
|
+
The SDK automatically handles reconnections if configured, but you can also listen to events:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
anonfly.ws?.on('close', () => {
|
|
95
|
+
console.warn('Connection lost. Cleaning up UI state...');
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## TypeScript Usage
|
|
100
|
+
|
|
101
|
+
`@anonfly/sdk` is written 100% in TypeScript. All types are exported from the main entry point:
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { AnonflyConfig, Room, Message } from '@anonfly/sdk';
|
|
105
|
+
```
|
|
16
106
|
|
|
17
107
|
## License
|
|
18
108
|
|
|
19
|
-
MIT
|
|
109
|
+
[MIT](../../LICENSE)
|
|
@@ -5,8 +5,8 @@ export interface HttpClientConfig {
|
|
|
5
5
|
headers?: Record<string, string>;
|
|
6
6
|
}
|
|
7
7
|
export declare class HttpClient {
|
|
8
|
-
private config;
|
|
9
|
-
private middlewares;
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly middlewares;
|
|
10
10
|
constructor(config: HttpClientConfig);
|
|
11
11
|
use(middleware: Middleware): void;
|
|
12
12
|
request(path: string, options?: RequestInit): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/core/transport/HttpClient.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAErF,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,qBAAa,UAAU;IAGP,OAAO,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/core/transport/HttpClient.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAErF,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,qBAAa,UAAU;IAGP,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;gBAEnB,MAAM,EAAE,gBAAgB;IAErD,GAAG,CAAC,UAAU,EAAE,UAAU;IAIpB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,GAAG,CAAC;IA6CpE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;IAIvC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW;IAQpD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW;IAQnD,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW;IAQrD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;IAIpC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;CAqDzH"}
|
|
@@ -13,6 +13,8 @@ export declare class WebSocketClient extends EventEmitter {
|
|
|
13
13
|
connect(): void;
|
|
14
14
|
private reconnect;
|
|
15
15
|
send(data: any): void;
|
|
16
|
+
subscribe(topic: string, handler: (data: any) => void): void;
|
|
17
|
+
unsubscribe(topic: string, handler: (data: any) => void): void;
|
|
16
18
|
disconnect(): void;
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=WebSocketClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketClient.d.ts","sourceRoot":"","sources":["../../../src/core/transport/WebSocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,eAAgB,SAAQ,YAAY;IAIjC,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,UAAU,CAAK;gBAEH,MAAM,EAAE,QAAQ;IAIpC,OAAO;
|
|
1
|
+
{"version":3,"file":"WebSocketClient.d.ts","sourceRoot":"","sources":["../../../src/core/transport/WebSocketClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,eAAgB,SAAQ,YAAY;IAIjC,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,UAAU,CAAK;gBAEH,MAAM,EAAE,QAAQ;IAIpC,OAAO;IAoCP,OAAO,CAAC,SAAS;IAMjB,IAAI,CAAC,IAAI,EAAE,GAAG;IAQd,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;IAIrD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI;IAIvD,UAAU;CAMb"}
|
package/dist/index.cjs
CHANGED
|
@@ -192,7 +192,7 @@ var HttpClient = class {
|
|
|
192
192
|
const data = line.slice(6);
|
|
193
193
|
try {
|
|
194
194
|
onMessage(JSON.parse(data));
|
|
195
|
-
} catch
|
|
195
|
+
} catch {
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -225,6 +225,11 @@ var WebSocketClient = class extends import_events.EventEmitter {
|
|
|
225
225
|
try {
|
|
226
226
|
const message = JSON.parse(data.toString());
|
|
227
227
|
this.emit("message", message);
|
|
228
|
+
if (message.topic) {
|
|
229
|
+
this.emit(message.topic, message);
|
|
230
|
+
} else if (message.chatroomId) {
|
|
231
|
+
this.emit(`room:${message.chatroomId}`, message);
|
|
232
|
+
}
|
|
228
233
|
} catch {
|
|
229
234
|
this.emit("message", data.toString());
|
|
230
235
|
}
|
|
@@ -251,6 +256,12 @@ var WebSocketClient = class extends import_events.EventEmitter {
|
|
|
251
256
|
throw new Error("WebSocket is not connected");
|
|
252
257
|
}
|
|
253
258
|
}
|
|
259
|
+
subscribe(topic, handler) {
|
|
260
|
+
this.on(topic, handler);
|
|
261
|
+
}
|
|
262
|
+
unsubscribe(topic, handler) {
|
|
263
|
+
this.off(topic, handler);
|
|
264
|
+
}
|
|
254
265
|
disconnect() {
|
|
255
266
|
if (this.ws) {
|
|
256
267
|
this.ws.close();
|
|
@@ -308,7 +319,8 @@ var RoomsResource = class {
|
|
|
308
319
|
return response.data;
|
|
309
320
|
}
|
|
310
321
|
subscribeToPublicList(onUpdate, region) {
|
|
311
|
-
const
|
|
322
|
+
const regionParam = region ? `®ion=${region}` : "";
|
|
323
|
+
const path = `/chatrooms?sse=true${regionParam}`;
|
|
312
324
|
return this.http.subscribeSSE(path, onUpdate);
|
|
313
325
|
}
|
|
314
326
|
subscribeToRoomDetails(id, onUpdate) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,OAAO;IAIJ,OAAO,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,OAAO;IAIJ,OAAO,CAAC,QAAQ,CAAC,MAAM;IAH5B,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,CAAC,EAAE,eAAe,CAAC;gBAEC,MAAM,EAAE,aAAa;IAoBlD,IAAW,KAAK,kBAEf;IAED,IAAW,QAAQ,qBAElB;IAED,IAAW,IAAI,iBAEd;IAED,IAAW,KAAK,kBAEf;CACJ"}
|
package/dist/index.js
CHANGED
|
@@ -155,7 +155,7 @@ var HttpClient = class {
|
|
|
155
155
|
const data = line.slice(6);
|
|
156
156
|
try {
|
|
157
157
|
onMessage(JSON.parse(data));
|
|
158
|
-
} catch
|
|
158
|
+
} catch {
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -188,6 +188,11 @@ var WebSocketClient = class extends EventEmitter {
|
|
|
188
188
|
try {
|
|
189
189
|
const message = JSON.parse(data.toString());
|
|
190
190
|
this.emit("message", message);
|
|
191
|
+
if (message.topic) {
|
|
192
|
+
this.emit(message.topic, message);
|
|
193
|
+
} else if (message.chatroomId) {
|
|
194
|
+
this.emit(`room:${message.chatroomId}`, message);
|
|
195
|
+
}
|
|
191
196
|
} catch {
|
|
192
197
|
this.emit("message", data.toString());
|
|
193
198
|
}
|
|
@@ -214,6 +219,12 @@ var WebSocketClient = class extends EventEmitter {
|
|
|
214
219
|
throw new Error("WebSocket is not connected");
|
|
215
220
|
}
|
|
216
221
|
}
|
|
222
|
+
subscribe(topic, handler) {
|
|
223
|
+
this.on(topic, handler);
|
|
224
|
+
}
|
|
225
|
+
unsubscribe(topic, handler) {
|
|
226
|
+
this.off(topic, handler);
|
|
227
|
+
}
|
|
217
228
|
disconnect() {
|
|
218
229
|
if (this.ws) {
|
|
219
230
|
this.ws.close();
|
|
@@ -271,7 +282,8 @@ var RoomsResource = class {
|
|
|
271
282
|
return response.data;
|
|
272
283
|
}
|
|
273
284
|
subscribeToPublicList(onUpdate, region) {
|
|
274
|
-
const
|
|
285
|
+
const regionParam = region ? `®ion=${region}` : "";
|
|
286
|
+
const path = `/chatrooms?sse=true${regionParam}`;
|
|
275
287
|
return this.http.subscribeSSE(path, onUpdate);
|
|
276
288
|
}
|
|
277
289
|
subscribeToRoomDetails(id, onUpdate) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '../core/transport/HttpClient.js';
|
|
2
2
|
import { ApiKey } from '../types/index.js';
|
|
3
3
|
export declare class AdminResource {
|
|
4
|
-
private http;
|
|
4
|
+
private readonly http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
6
|
listKeys(): Promise<ApiKey[]>;
|
|
7
7
|
createKey(name: string): Promise<ApiKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminResource.d.ts","sourceRoot":"","sources":["../../src/resources/AdminResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,qBAAa,aAAa;IACV,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"AdminResource.d.ts","sourceRoot":"","sources":["../../src/resources/AdminResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,qBAAa,aAAa;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEvC,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI7B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIxC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminResource.test.d.ts","sourceRoot":"","sources":["../../src/resources/AdminResource.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthResource.d.ts","sourceRoot":"","sources":["../../src/resources/AuthResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACL;AAED,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,qBAAa,YAAY;IACT,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"AuthResource.d.ts","sourceRoot":"","sources":["../../src/resources/AuthResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACL;AAED,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,qBAAa,YAAY;IACT,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEvC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAK1D,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IAKxD,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CAInD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '../core/transport/HttpClient.js';
|
|
2
2
|
import { Message } from '../types/index.js';
|
|
3
3
|
export declare class MessagesResource {
|
|
4
|
-
private http;
|
|
4
|
+
private readonly http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
6
|
list(roomId: string, options?: {
|
|
7
7
|
limit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagesResource.d.ts","sourceRoot":"","sources":["../../src/resources/MessagesResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,gBAAgB;IACb,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"MessagesResource.d.ts","sourceRoot":"","sources":["../../src/resources/MessagesResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEvC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAOvF,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAIhE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '../core/transport/HttpClient.js';
|
|
2
2
|
import { Room, RoomDetails } from '../types/index.js';
|
|
3
3
|
export declare class RoomsResource {
|
|
4
|
-
private http;
|
|
4
|
+
private readonly http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
6
|
list(region?: string): Promise<Room[]>;
|
|
7
7
|
create(data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomsResource.d.ts","sourceRoot":"","sources":["../../src/resources/RoomsResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtD,qBAAa,aAAa;IACV,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"RoomsResource.d.ts","sourceRoot":"","sources":["../../src/resources/RoomsResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtD,qBAAa,aAAa;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEvC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAOtC,MAAM,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/G,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKrC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAKlF,qBAAqB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IAM9F,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;CAGpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoomsResource.test.d.ts","sourceRoot":"","sources":["../../src/resources/RoomsResource.test.ts"],"names":[],"mappings":""}
|