library.dr-conversion 0.2.6 → 0.2.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/README.md +195 -10
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/root/app-provider.d.ts +41 -0
- package/dist/providers/root/app-provider.d.ts.map +1 -0
- package/dist/providers/root/app-provider.js +161 -0
- package/dist/providers/root/app-provider.js.map +1 -0
- package/dist/providers/root/types.d.ts +4 -0
- package/dist/providers/root/types.d.ts.map +1 -1
- package/dist/providers/root/types.js.map +1 -1
- package/dist/types/platform.d.ts +1 -1
- package/dist/types/platform.d.ts.map +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/library.dr-conversion)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
**Library.DR-Conversion** (v0.2.
|
|
8
|
+
**Library.DR-Conversion** (v0.2.7) is a TypeScript library that provides a unified, platform-agnostic interface for building chat bots that work across multiple platforms like Discord, Root, and potentially others. Write your bot logic once, and deploy it anywhere!
|
|
9
9
|
|
|
10
10
|
## ✨ Features
|
|
11
11
|
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
| Platform | Status | Features |
|
|
25
25
|
|----------|--------|----------|
|
|
26
26
|
| Discord | ✅ Fully Supported | Messages, Embeds, Reactions, Buttons, Slash Commands |
|
|
27
|
-
| Root | ✅ Fully Supported | Messages, Reactions, Pins, Typing Indicators, File Attachments (via `@rootsdk/server-bot` v0.17.0+) |
|
|
27
|
+
| Root (Bot) | ✅ Fully Supported | Messages, Reactions, Pins, Typing Indicators, File Attachments (via `@rootsdk/server-bot` v0.17.0+) |
|
|
28
|
+
| Root (App) | ✅ Fully Supported | Client-side UI, File Uploads, User Profiles, Theme Detection (via `@rootsdk/client-app` v0.17.0+) |
|
|
28
29
|
| Others | 📝 Planned | Open to community contributions |
|
|
29
30
|
|
|
30
31
|
## 🚀 Quick Start
|
|
@@ -208,9 +209,108 @@ await discordBot.connect();
|
|
|
208
209
|
await rootBot.connect();
|
|
209
210
|
```
|
|
210
211
|
|
|
211
|
-
###
|
|
212
|
+
### 🏗️ Understanding Root's Architecture
|
|
212
213
|
|
|
213
|
-
**
|
|
214
|
+
**Root Bots vs Root Apps** - A Critical Distinction:
|
|
215
|
+
|
|
216
|
+
#### Root Bots (What This Library Implements)
|
|
217
|
+
- **Server-Side**: Code runs on your server or Root's cloud infrastructure
|
|
218
|
+
- **Package**: Uses `@rootsdk/server-bot`
|
|
219
|
+
- **Deployment**: One instance per community (automatic)
|
|
220
|
+
- **Capabilities**: Messaging, events, data fetching, server logic
|
|
221
|
+
- **File Uploads**: Can send files with pre-uploaded token URIs
|
|
222
|
+
|
|
223
|
+
#### Root Apps (Client-Side GUI Applications)
|
|
224
|
+
- **Client-Side**: Code is distributed to all community members' devices
|
|
225
|
+
- **Package**: Uses `@rootsdk/client-app`
|
|
226
|
+
- **Deployment**: Code downloaded and installed into members' devices
|
|
227
|
+
- **Capabilities**: Full GUI, runs in app channels (serves index.html)
|
|
228
|
+
- **File Uploads**: Can upload files directly from user devices
|
|
229
|
+
- **✅ NOW SUPPORTED**: Use `platform: 'root-app'` with this library!
|
|
230
|
+
|
|
231
|
+
#### Building Root Apps with This Library
|
|
232
|
+
|
|
233
|
+
You can now create Root Apps (client-side) using the same unified interface:
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
// Root App (client-side GUI application)
|
|
237
|
+
const app = new UnifiedClient({
|
|
238
|
+
platform: 'root-app', // Client-side Root App
|
|
239
|
+
config: {
|
|
240
|
+
appConfig: { /* your app config */ }
|
|
241
|
+
// No token needed - runs in user context!
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
await app.connect();
|
|
246
|
+
|
|
247
|
+
// Access Root App features
|
|
248
|
+
const provider = app.getProvider() as RootAppProvider;
|
|
249
|
+
|
|
250
|
+
// 1. User Profile Management
|
|
251
|
+
const userId = provider.getCurrentUserId();
|
|
252
|
+
const user = await provider.getUser(userId);
|
|
253
|
+
console.log(`Welcome, ${user.displayName}!`);
|
|
254
|
+
|
|
255
|
+
// Get multiple users at once
|
|
256
|
+
const users = await provider.getUsers(['user-id-1', 'user-id-2']);
|
|
257
|
+
|
|
258
|
+
// Show user profile in Root's UI
|
|
259
|
+
provider.showUserProfile(userId); // Opens profile modal
|
|
260
|
+
|
|
261
|
+
// 2. File Upload with Previews
|
|
262
|
+
const tokens = await provider.uploadFiles('imageAll'); // Opens file picker
|
|
263
|
+
tokens.forEach(token => {
|
|
264
|
+
const previewUrl = provider.getUploadPreview(token);
|
|
265
|
+
if (previewUrl) {
|
|
266
|
+
console.log('Image preview:', previewUrl);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
// 3. Theme Detection with Live Updates
|
|
271
|
+
const theme = provider.getTheme(); // 'light' or 'dark'
|
|
272
|
+
|
|
273
|
+
// Listen for theme changes
|
|
274
|
+
provider.onThemeChange((newTheme) => {
|
|
275
|
+
console.log(`Theme changed to: ${newTheme}`);
|
|
276
|
+
// Update your UI styling dynamically
|
|
277
|
+
document.body.className = newTheme === 'dark' ? 'dark-theme' : 'light-theme';
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// 4. Asset URL Conversion
|
|
281
|
+
const imageUrl = provider.imageToUrl(user.avatarUrl, 'medium');
|
|
282
|
+
const assetUrl = provider.assetToUrl('root://asset/some-id');
|
|
283
|
+
|
|
284
|
+
// 5. App Lifecycle Management
|
|
285
|
+
provider.restart('/new-route'); // Navigate to different app route
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Root App Capabilities:**
|
|
289
|
+
- ✅ **User Profiles**: Get single or batch user profiles, show profile UI
|
|
290
|
+
- ✅ **File Uploads**: Upload from user device with preview support
|
|
291
|
+
- ✅ **Theme Detection**: Get theme and listen for live updates
|
|
292
|
+
- ✅ **Asset Conversion**: Convert Root URIs to URLs with resolution control
|
|
293
|
+
- ✅ **Lifecycle Control**: Restart app or navigate to different routes
|
|
294
|
+
|
|
295
|
+
**File Type Options:**
|
|
296
|
+
- `'all'` - All file types
|
|
297
|
+
- `'imageAll'` - All image formats
|
|
298
|
+
- `'text'` - Text files only
|
|
299
|
+
- `'pdf'` - PDF files only
|
|
300
|
+
|
|
301
|
+
See [examples/root-app.ts](examples/root-app.ts) for a complete example with HTML UI integration!
|
|
302
|
+
|
|
303
|
+
#### Why This Matters for File Uploads
|
|
304
|
+
|
|
305
|
+
The **"Hybrid" approach** combines both Root Bot and Root App:
|
|
306
|
+
- **Root App** (client): Handles file upload from user devices → gets token URI
|
|
307
|
+
- **Root Bot** (server): Uses token URI to attach files to messages
|
|
308
|
+
|
|
309
|
+
This architecture is why `@rootsdk/server-bot` doesn't expose upload APIs - uploads happen client-side!
|
|
310
|
+
|
|
311
|
+
### ⚠️ Deployment Considerations for Root Bots
|
|
312
|
+
|
|
313
|
+
**Important:** When deploying a bot to Root's infrastructure, Root automatically clones your server-side code and runs one instance per community. Be mindful of which platforms your code connects to:
|
|
214
314
|
|
|
215
315
|
```typescript
|
|
216
316
|
// ❌ DON'T: This would start BOTH Root and Discord bots when installed to Root
|
|
@@ -722,6 +822,78 @@ new UnifiedClient(options: UnifiedClientConfig)
|
|
|
722
822
|
- `messageDelete` - Emitted on message delete
|
|
723
823
|
- `error` - Emitted on error
|
|
724
824
|
|
|
825
|
+
### RootAppProvider
|
|
826
|
+
|
|
827
|
+
Root App (client-side) specific provider with access to Root's client APIs.
|
|
828
|
+
|
|
829
|
+
#### Properties
|
|
830
|
+
- `platformName: 'root-app'` - Platform identifier
|
|
831
|
+
- `platformVersion: string` - Provider version
|
|
832
|
+
- `currentUserId?: string` - Current user ID (available after connect)
|
|
833
|
+
|
|
834
|
+
#### User Management
|
|
835
|
+
```typescript
|
|
836
|
+
getCurrentUserId(): string | undefined
|
|
837
|
+
// Get the current user's ID
|
|
838
|
+
|
|
839
|
+
getUser(userId: string): Promise<User>
|
|
840
|
+
// Get a single user profile
|
|
841
|
+
|
|
842
|
+
getUsers(userIds: string[]): Promise<User[]>
|
|
843
|
+
// Get multiple user profiles at once
|
|
844
|
+
|
|
845
|
+
showUserProfile(userId: string): void
|
|
846
|
+
// Open user profile in Root's UI (modal/page)
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
#### File Management
|
|
850
|
+
```typescript
|
|
851
|
+
uploadFiles(fileType?: 'all' | 'text' | 'imageAll' | 'pdf'): Promise<string[]>
|
|
852
|
+
// Opens file picker, uploads files, returns token URIs
|
|
853
|
+
// Default: 'all'
|
|
854
|
+
|
|
855
|
+
getUploadPreview(token: string): string | undefined
|
|
856
|
+
// Get preview URL for an upload token (before full upload)
|
|
857
|
+
// Returns URL or undefined if no preview available
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
#### Asset Conversion
|
|
861
|
+
```typescript
|
|
862
|
+
assetToUrl(uri: string | null | undefined): string
|
|
863
|
+
// Convert Root asset URI to full URL
|
|
864
|
+
|
|
865
|
+
imageToUrl(
|
|
866
|
+
uri: string | null | undefined,
|
|
867
|
+
resolution?: 'original' | 'large' | 'medium' | 'small'
|
|
868
|
+
): string
|
|
869
|
+
// Convert Root image URI to URL with specified resolution
|
|
870
|
+
// Default: 'medium'
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
#### Theme Management
|
|
874
|
+
```typescript
|
|
875
|
+
getTheme(): 'light' | 'dark'
|
|
876
|
+
// Get current theme mode
|
|
877
|
+
|
|
878
|
+
onThemeChange(callback: (theme: 'light' | 'dark') => void): void
|
|
879
|
+
// Register callback for theme changes
|
|
880
|
+
// Called immediately when theme updates
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
#### Lifecycle Control
|
|
884
|
+
```typescript
|
|
885
|
+
restart(relativeUrl?: string): void
|
|
886
|
+
// Restart app or navigate to different route
|
|
887
|
+
// Example: restart('/settings')
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
#### Events
|
|
891
|
+
- `ready` - Emitted when app is initialized
|
|
892
|
+
- `themeChange` - Emitted when theme updates (via generic event system)
|
|
893
|
+
- `error` - Emitted on error
|
|
894
|
+
|
|
895
|
+
See [examples/root-app.ts](examples/root-app.ts) for complete usage examples.
|
|
896
|
+
|
|
725
897
|
### Types
|
|
726
898
|
|
|
727
899
|
See [src/types/](src/types/) for complete type definitions.
|
|
@@ -865,9 +1037,9 @@ Areas where we'd love help:
|
|
|
865
1037
|
|
|
866
1038
|
### Root File Upload Architecture
|
|
867
1039
|
|
|
868
|
-
Root uses a **client-server split architecture** for file uploads:
|
|
1040
|
+
Root uses a **client-server split architecture** for file uploads. This design reflects Root's distinction between **Root Apps** (client-side) and **Root Bots** (server-side):
|
|
869
1041
|
|
|
870
|
-
**Client-Side (Upload):**
|
|
1042
|
+
**Client-Side (Upload):** _(Root Apps or custom client code)_
|
|
871
1043
|
1. Client requests upload token from Root API (via `@rootsdk/client-app`)
|
|
872
1044
|
2. Client uploads file directly to Root's storage using the token
|
|
873
1045
|
3. Client receives a token URI after successful upload
|
|
@@ -886,14 +1058,27 @@ const message = await rootClient.sendMessageWithAttachments(
|
|
|
886
1058
|
- Security: Clients upload directly to storage (no server bottleneck)
|
|
887
1059
|
- Scalability: Distributed upload load across clients
|
|
888
1060
|
- Bandwidth: Server doesn't proxy large files
|
|
1061
|
+
- Architecture: Reflects Root's separation of Apps (client-side) and Bots (server-side)
|
|
889
1062
|
- The `@rootsdk/server-bot` package intentionally does not expose upload token generation
|
|
890
1063
|
|
|
891
1064
|
**Implementation Options:**
|
|
892
|
-
1. **Hybrid Bot**: Use `@rootsdk/client-app` alongside server-bot for full file support
|
|
893
|
-
2. **Pure Server Bot**: Accept pre-uploaded token URIs from your application's client
|
|
894
|
-
3. **Custom Integration**: Integrate with Root's upload API directly
|
|
895
1065
|
|
|
896
|
-
|
|
1066
|
+
1. **Root App + Root Bot (Hybrid)**: Build both a Root App and Root Bot
|
|
1067
|
+
- Root App (client-side): Handles file uploads from user devices, gets token URIs
|
|
1068
|
+
- Root Bot (server-side): Uses token URIs to attach files to messages
|
|
1069
|
+
- Best for: Full-featured bots with rich file support
|
|
1070
|
+
|
|
1071
|
+
2. **Pure Root Bot**: Accept token URIs from external sources
|
|
1072
|
+
- Your web/mobile app uploads files and passes token URIs to bot
|
|
1073
|
+
- Bot uses `sendMessageWithAttachments(channelId, content, tokenUris)`
|
|
1074
|
+
- Best for: Bots integrated with existing applications
|
|
1075
|
+
|
|
1076
|
+
3. **Custom Integration**: Direct Root API integration
|
|
1077
|
+
- Implement file upload flow yourself
|
|
1078
|
+
- Generate tokens and upload files via Root's storage API
|
|
1079
|
+
- Best for: Advanced use cases with specific requirements
|
|
1080
|
+
|
|
1081
|
+
For most use cases, option #2 (Pure Root Bot accepting token URIs) is the recommended approach.
|
|
897
1082
|
|
|
898
1083
|
### Known Issues
|
|
899
1084
|
- Some test files have module resolution issues (3/52 test suites)
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { PlatformProvider, PlatformType, Message, User, Channel, Guild, MessageOptions } from './types';
|
|
3
3
|
import { DiscordConfig } from './providers/discord/types';
|
|
4
|
-
import { RootConfig } from './providers/root/types';
|
|
4
|
+
import { RootConfig, RootAppConfig } from './providers/root/types';
|
|
5
5
|
import { LogLevel } from './utils/logger';
|
|
6
6
|
export interface UnifiedClientConfig {
|
|
7
7
|
platform: PlatformType;
|
|
8
|
-
config: DiscordConfig | RootConfig;
|
|
8
|
+
config: DiscordConfig | RootConfig | RootAppConfig;
|
|
9
9
|
logLevel?: LogLevel;
|
|
10
10
|
}
|
|
11
11
|
export declare class UnifiedClient extends EventEmitter {
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAqB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK7D,MAAM,WAAW,mBAAmB;IAElC,QAAQ,EAAE,YAAY,CAAC;IAGvB,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,aAAa,CAAC;IAGnD,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAuBD,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,MAAM,CAA6C;gBAE/C,OAAO,EAAE,mBAAmB;IAuBxC,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,oBAAoB;IAkCtB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAYxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASjC,OAAO,CAAC,sBAAsB;IA8B9B,IAAI,WAAW,IAAI,OAAO,CAEzB;IA0BK,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAWlF,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IASpF,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlE,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAStC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAS/C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAS/C,IAAI,YAAY,IAAI,MAAM,CAEzB;IAKD,IAAI,eAAe,IAAI,MAAM,CAE5B;IAMD,WAAW,IAAI,gBAAgB;IAQ/B,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAGnC"}
|
package/dist/client.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.UnifiedClient = void 0;
|
|
|
4
4
|
const events_1 = require("events");
|
|
5
5
|
const provider_1 = require("./providers/discord/provider");
|
|
6
6
|
const provider_2 = require("./providers/root/provider");
|
|
7
|
+
const app_provider_1 = require("./providers/root/app-provider");
|
|
7
8
|
const errors_1 = require("./utils/errors");
|
|
8
9
|
const logger_1 = require("./utils/logger");
|
|
9
10
|
class UnifiedClient extends events_1.EventEmitter {
|
|
@@ -25,6 +26,8 @@ class UnifiedClient extends events_1.EventEmitter {
|
|
|
25
26
|
return new provider_1.DiscordProvider(config);
|
|
26
27
|
case 'root':
|
|
27
28
|
return new provider_2.RootProvider(config);
|
|
29
|
+
case 'root-app':
|
|
30
|
+
return new app_provider_1.RootAppProvider(config);
|
|
28
31
|
default:
|
|
29
32
|
throw new errors_1.UnsupportedPlatformError(platform);
|
|
30
33
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAKA,mCAAsC;AAUtC,2DAA+D;AAE/D,wDAAyD;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAKA,mCAAsC;AAUtC,2DAA+D;AAE/D,wDAAyD;AACzD,gEAAgE;AAEhE,2CAA0D;AAC1D,2CAA6D;AAqC7D,MAAa,aAAc,SAAQ,qBAAY;IAM7C,YAAY,OAA4B;QACtC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAG7B,IAAI,CAAC,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAC1B,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;QAGD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAGtE,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAE5B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClF,CAAC;IAKO,cAAc,CAAC,QAAsB,EAAE,MAAkD;QAC/F,QAAQ,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/B,KAAK,SAAS;gBACZ,OAAO,IAAI,0BAAe,CAAC,MAAuB,CAAC,CAAC;YAEtD,KAAK,MAAM;g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IAOD,KAAK,CAAC,aAAa,CAAC,SAAiB,EAAE,SAAiB;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC;IASD,KAAK,CAAC,OAAO,CAAC,MAAc;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAOD,KAAK,CAAC,UAAU,CAAC,SAAiB;QAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAOD,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAOD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;IACpC,CAAC;IAKD,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IACvC,CAAC;IAMD,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAMD,WAAW,CAAC,KAAe;QACzB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AArPD,sCAqPC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export { BaseProvider } from './providers/base';
|
|
|
7
7
|
export { DiscordProvider } from './providers/discord/provider';
|
|
8
8
|
export { DiscordConfig } from './providers/discord/types';
|
|
9
9
|
export { RootProvider } from './providers/root/provider';
|
|
10
|
-
export {
|
|
10
|
+
export { RootAppProvider } from './providers/root/app-provider';
|
|
11
|
+
export { RootConfig, RootAppConfig } from './providers/root/types';
|
|
11
12
|
export { Logger, LogLevel, getLogger } from './utils/logger';
|
|
12
13
|
export * from './utils/errors';
|
|
13
14
|
export { EventEmitter } from 'events';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG9D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG9D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGnE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC7D,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.EventEmitter = exports.getLogger = exports.LogLevel = exports.Logger = exports.RootProvider = exports.DiscordProvider = exports.BaseProvider = exports.UnifiedClient = void 0;
|
|
17
|
+
exports.EventEmitter = exports.getLogger = exports.LogLevel = exports.Logger = exports.RootAppProvider = exports.RootProvider = exports.DiscordProvider = exports.BaseProvider = exports.UnifiedClient = void 0;
|
|
18
18
|
var client_1 = require("./client");
|
|
19
19
|
Object.defineProperty(exports, "UnifiedClient", { enumerable: true, get: function () { return client_1.UnifiedClient; } });
|
|
20
20
|
__exportStar(require("./types/common"), exports);
|
|
@@ -27,6 +27,8 @@ var provider_1 = require("./providers/discord/provider");
|
|
|
27
27
|
Object.defineProperty(exports, "DiscordProvider", { enumerable: true, get: function () { return provider_1.DiscordProvider; } });
|
|
28
28
|
var provider_2 = require("./providers/root/provider");
|
|
29
29
|
Object.defineProperty(exports, "RootProvider", { enumerable: true, get: function () { return provider_2.RootProvider; } });
|
|
30
|
+
var app_provider_1 = require("./providers/root/app-provider");
|
|
31
|
+
Object.defineProperty(exports, "RootAppProvider", { enumerable: true, get: function () { return app_provider_1.RootAppProvider; } });
|
|
30
32
|
var logger_1 = require("./utils/logger");
|
|
31
33
|
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
|
|
32
34
|
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_1.LogLevel; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,mCAA8D;AAArD,uGAAA,aAAa,OAAA;AAGtB,iDAA+B;AAC/B,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAG/B,yCAAgD;AAAvC,oGAAA,YAAY,OAAA;AACrB,yDAA+D;AAAtD,2GAAA,eAAe,OAAA;AAExB,sDAAyD;AAAhD,wGAAA,YAAY,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,mCAA8D;AAArD,uGAAA,aAAa,OAAA;AAGtB,iDAA+B;AAC/B,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAG/B,yCAAgD;AAAvC,oGAAA,YAAY,OAAA;AACrB,yDAA+D;AAAtD,2GAAA,eAAe,OAAA;AAExB,sDAAyD;AAAhD,wGAAA,YAAY,OAAA;AACrB,8DAAgE;AAAvD,+GAAA,eAAe,OAAA;AAIxB,yCAA6D;AAApD,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,mGAAA,SAAS,OAAA;AACpC,iDAA+B;AAG/B,iCAAsC;AAA7B,sGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseProvider } from '../base';
|
|
2
|
+
import { Message, User, Channel, Guild } from '../../types/common';
|
|
3
|
+
import { MessageOptions } from '../../types/embeds';
|
|
4
|
+
import { RootAppConfig } from './types';
|
|
5
|
+
export declare class RootAppProvider extends BaseProvider {
|
|
6
|
+
private client;
|
|
7
|
+
readonly platformName = "root-app";
|
|
8
|
+
readonly platformVersion = "1.0.0";
|
|
9
|
+
private currentUserId?;
|
|
10
|
+
private themeChangeCallback?;
|
|
11
|
+
constructor(config: RootAppConfig);
|
|
12
|
+
getCurrentUserId(): string | undefined;
|
|
13
|
+
private setupEventListeners;
|
|
14
|
+
onThemeChange(callback: (theme: 'light' | 'dark') => void): void;
|
|
15
|
+
connect(): Promise<void>;
|
|
16
|
+
disconnect(): Promise<void>;
|
|
17
|
+
uploadFiles(fileType?: 'all' | 'text' | 'imageAll' | 'pdf'): Promise<string[]>;
|
|
18
|
+
getUser(userId: string): Promise<User>;
|
|
19
|
+
getUsers(userIds: string[]): Promise<User[]>;
|
|
20
|
+
showUserProfile(userId: string): void;
|
|
21
|
+
getTheme(): 'light' | 'dark';
|
|
22
|
+
assetToUrl(uri: string | null | undefined): string;
|
|
23
|
+
imageToUrl(uri: string | null | undefined, resolution?: 'original' | 'large' | 'medium' | 'small'): string;
|
|
24
|
+
getUploadPreview(token: string): string | undefined;
|
|
25
|
+
restart(relativeUrl?: string): void;
|
|
26
|
+
sendMessage(_channelId: string, _options: string | MessageOptions): Promise<Message>;
|
|
27
|
+
editMessage(_messageId: string, _channelId: string, _content: string): Promise<Message>;
|
|
28
|
+
deleteMessage(_messageId: string, _channelId: string): Promise<void>;
|
|
29
|
+
getChannel(_channelId: string): Promise<Channel>;
|
|
30
|
+
getGuild(_guildId: string): Promise<Guild>;
|
|
31
|
+
reactToMessage(_messageId: string, _channelId: string, _emoji: string): Promise<void>;
|
|
32
|
+
removeReaction(_messageId: string, _channelId: string, _emoji: string): Promise<void>;
|
|
33
|
+
pinMessage(_messageId: string, _channelId: string): Promise<void>;
|
|
34
|
+
unpinMessage(_messageId: string, _channelId: string): Promise<void>;
|
|
35
|
+
sendTyping(_channelId: string): Promise<void>;
|
|
36
|
+
convertMessage(_platformMessage: unknown): Message;
|
|
37
|
+
convertUser(_platformUser: unknown): User;
|
|
38
|
+
convertChannel(_platformChannel: unknown): Channel;
|
|
39
|
+
convertGuild(_platformGuild: unknown): Guild;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=app-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-provider.d.ts","sourceRoot":"","sources":["../../../src/providers/root/app-provider.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EA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;CAG7C"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RootAppProvider = void 0;
|
|
4
|
+
const client_app_1 = require("@rootsdk/client-app");
|
|
5
|
+
const base_1 = require("../base");
|
|
6
|
+
const errors_1 = require("../../utils/errors");
|
|
7
|
+
class RootAppProvider extends base_1.BaseProvider {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
const configWithToken = { ...config, token: config.token || '' };
|
|
10
|
+
super(configWithToken);
|
|
11
|
+
this.platformName = 'root-app';
|
|
12
|
+
this.platformVersion = '1.0.0';
|
|
13
|
+
this.initLogger();
|
|
14
|
+
this.client = client_app_1.rootClient;
|
|
15
|
+
this.logger.info('Root App provider initialized with @rootsdk/client-app');
|
|
16
|
+
this.logger.info('Note: This is for client-side Root Apps. For server-side bots, use platform: "root"');
|
|
17
|
+
this.setupEventListeners();
|
|
18
|
+
}
|
|
19
|
+
getCurrentUserId() {
|
|
20
|
+
return this.currentUserId;
|
|
21
|
+
}
|
|
22
|
+
setupEventListeners() {
|
|
23
|
+
this.client.theme.on('theme.update', (theme) => {
|
|
24
|
+
this.logger.debug(`Theme updated: ${theme}`);
|
|
25
|
+
if (this.themeChangeCallback) {
|
|
26
|
+
this.themeChangeCallback(theme);
|
|
27
|
+
}
|
|
28
|
+
this.emitGenericEvent('themeChange', { theme });
|
|
29
|
+
});
|
|
30
|
+
this.logger.info('Root App event listeners configured');
|
|
31
|
+
}
|
|
32
|
+
onThemeChange(callback) {
|
|
33
|
+
this.themeChangeCallback = callback;
|
|
34
|
+
}
|
|
35
|
+
connect() {
|
|
36
|
+
try {
|
|
37
|
+
this.logger.info('Initializing Root App...');
|
|
38
|
+
try {
|
|
39
|
+
this.currentUserId = this.client.users.getCurrentUserId();
|
|
40
|
+
this.logger.info(`Root App initialized for user: ${this.currentUserId}`);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
this.logger.warn('Could not get current user ID:', error);
|
|
44
|
+
}
|
|
45
|
+
this._isConnected = true;
|
|
46
|
+
this.emitGenericEvent('ready', { userId: this.currentUserId });
|
|
47
|
+
this.logger.info('Root App ready');
|
|
48
|
+
return Promise.resolve();
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
this._isConnected = false;
|
|
52
|
+
throw new errors_1.AuthenticationError('root-app', error.message);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
disconnect() {
|
|
56
|
+
this.logger.info('Disconnecting Root App...');
|
|
57
|
+
this._isConnected = false;
|
|
58
|
+
this.logger.info('Root App disconnected');
|
|
59
|
+
return Promise.resolve();
|
|
60
|
+
}
|
|
61
|
+
async uploadFiles(fileType = 'all') {
|
|
62
|
+
this.logger.info('Requesting file upload via Root App...');
|
|
63
|
+
const response = await this.client.assets.fileUpload({
|
|
64
|
+
fileType
|
|
65
|
+
});
|
|
66
|
+
this.logger.info(`File(s) uploaded, received ${response.tokens.length} token(s)`);
|
|
67
|
+
return response.tokens;
|
|
68
|
+
}
|
|
69
|
+
async getUser(userId) {
|
|
70
|
+
this.logger.debug(`Fetching user profile: ${userId}`);
|
|
71
|
+
const profile = await this.client.users.getUserProfile(userId);
|
|
72
|
+
return {
|
|
73
|
+
id: profile.id,
|
|
74
|
+
username: profile.nickname || profile.id,
|
|
75
|
+
displayName: profile.nickname,
|
|
76
|
+
avatarUrl: profile.profilePictureUri
|
|
77
|
+
? this.client.assets.toImageUrl(profile.profilePictureUri, 'medium')
|
|
78
|
+
: undefined,
|
|
79
|
+
bot: false,
|
|
80
|
+
platform: 'root-app'
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
async getUsers(userIds) {
|
|
84
|
+
this.logger.debug(`Fetching ${userIds.length} user profiles`);
|
|
85
|
+
const profiles = await this.client.users.getUserProfiles(userIds);
|
|
86
|
+
return profiles.map(profile => ({
|
|
87
|
+
id: profile.id,
|
|
88
|
+
username: profile.nickname || profile.id,
|
|
89
|
+
displayName: profile.nickname,
|
|
90
|
+
avatarUrl: profile.profilePictureUri
|
|
91
|
+
? this.client.assets.toImageUrl(profile.profilePictureUri, 'medium')
|
|
92
|
+
: undefined,
|
|
93
|
+
bot: false,
|
|
94
|
+
platform: 'root-app'
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
showUserProfile(userId) {
|
|
98
|
+
this.logger.debug(`Opening user profile: ${userId}`);
|
|
99
|
+
this.client.users.showUserProfile(userId);
|
|
100
|
+
}
|
|
101
|
+
getTheme() {
|
|
102
|
+
return this.client.theme.getTheme();
|
|
103
|
+
}
|
|
104
|
+
assetToUrl(uri) {
|
|
105
|
+
return this.client.assets.toUrl(uri);
|
|
106
|
+
}
|
|
107
|
+
imageToUrl(uri, resolution = 'medium') {
|
|
108
|
+
return this.client.assets.toImageUrl(uri, resolution);
|
|
109
|
+
}
|
|
110
|
+
getUploadPreview(token) {
|
|
111
|
+
return this.client.assets.toUploadImagePreview(token);
|
|
112
|
+
}
|
|
113
|
+
restart(relativeUrl) {
|
|
114
|
+
this.logger.info(`Restarting app${relativeUrl ? ` at ${relativeUrl}` : ''}...`);
|
|
115
|
+
this.client.lifecycle.restart(relativeUrl);
|
|
116
|
+
}
|
|
117
|
+
sendMessage(_channelId, _options) {
|
|
118
|
+
throw new Error('sendMessage is not supported in Root Apps. Use Root Bot (platform: "root") for messaging.');
|
|
119
|
+
}
|
|
120
|
+
editMessage(_messageId, _channelId, _content) {
|
|
121
|
+
throw new Error('editMessage is not supported in Root Apps. Use Root Bot (platform: "root") for messaging.');
|
|
122
|
+
}
|
|
123
|
+
deleteMessage(_messageId, _channelId) {
|
|
124
|
+
throw new Error('deleteMessage is not supported in Root Apps. Use Root Bot (platform: "root") for messaging.');
|
|
125
|
+
}
|
|
126
|
+
getChannel(_channelId) {
|
|
127
|
+
throw new Error('getChannel is not supported in Root Apps. Use Root Bot (platform: "root") for channel operations.');
|
|
128
|
+
}
|
|
129
|
+
getGuild(_guildId) {
|
|
130
|
+
throw new Error('getGuild is not supported in Root Apps. Use Root Bot (platform: "root") for community operations.');
|
|
131
|
+
}
|
|
132
|
+
reactToMessage(_messageId, _channelId, _emoji) {
|
|
133
|
+
throw new Error('reactToMessage is not supported in Root Apps. Use Root Bot (platform: "root") for reactions.');
|
|
134
|
+
}
|
|
135
|
+
removeReaction(_messageId, _channelId, _emoji) {
|
|
136
|
+
throw new Error('removeReaction is not supported in Root Apps. Use Root Bot (platform: "root") for reactions.');
|
|
137
|
+
}
|
|
138
|
+
pinMessage(_messageId, _channelId) {
|
|
139
|
+
throw new Error('pinMessage is not supported in Root Apps. Use Root Bot (platform: "root") for message pinning.');
|
|
140
|
+
}
|
|
141
|
+
unpinMessage(_messageId, _channelId) {
|
|
142
|
+
throw new Error('unpinMessage is not supported in Root Apps. Use Root Bot (platform: "root") for message pinning.');
|
|
143
|
+
}
|
|
144
|
+
sendTyping(_channelId) {
|
|
145
|
+
throw new Error('sendTyping is not supported in Root Apps. Use Root Bot (platform: "root") for typing indicators.');
|
|
146
|
+
}
|
|
147
|
+
convertMessage(_platformMessage) {
|
|
148
|
+
throw new Error('convertMessage is not applicable for Root Apps.');
|
|
149
|
+
}
|
|
150
|
+
convertUser(_platformUser) {
|
|
151
|
+
throw new Error('convertUser is not applicable for Root Apps.');
|
|
152
|
+
}
|
|
153
|
+
convertChannel(_platformChannel) {
|
|
154
|
+
throw new Error('convertChannel is not applicable for Root Apps.');
|
|
155
|
+
}
|
|
156
|
+
convertGuild(_platformGuild) {
|
|
157
|
+
throw new Error('convertGuild is not applicable for Root Apps.');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
exports.RootAppProvider = RootAppProvider;
|
|
161
|
+
//# sourceMappingURL=app-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-provider.js","sourceRoot":"","sources":["../../../src/providers/root/app-provider.ts"],"names":[],"mappings":";;;AAkBA,oDAA6D;AAC7D,kCAAuC;AAK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}
|
|
@@ -9,6 +9,10 @@ export interface RootConfig extends PlatformConfig {
|
|
|
9
9
|
maxReconnectAttempts?: number;
|
|
10
10
|
debug?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export interface RootAppConfig extends Omit<PlatformConfig, 'token'> {
|
|
13
|
+
appConfig?: Record<string, unknown>;
|
|
14
|
+
token?: string;
|
|
15
|
+
}
|
|
12
16
|
export interface RootMessage {
|
|
13
17
|
id: string;
|
|
14
18
|
content: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/root/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAK5E,MAAM,WAAW,UAAW,SAAQ,cAAc;IAEhD,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAG9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAKD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,SA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AKD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,aAAa,CAAC;IAClB,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAKD,eAAO,MAAM,kBAAkB;6BACJ,MAAM;4BACP,MAAM,aAAa,MAAM;6BACxB,MAAM,aAAa,MAAM;+BACvB,MAAM,aAAa,MAAM;6BAC3B,MAAM;4BACP,MAAM;sBACZ,MAAM;;gCAEI,MAAM;uCACC,MAAM;6BAChB,MAAM,UAAU,MAAM;6BACtB,MAAM,aAAa,MAAM,SAAS,MAAM;gCAErC,MAAM,aAAa,MAAM,SAAS,MAAM;CAErE,CAAC;AAKF,eAAO,MAAM,iBAAiB,EAAE,oBAY/B,CAAC;AAKF,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,UAAU,CAOnD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/providers/root/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/providers/root/types.ts"],"names":[],"mappings":";;;AAkNA,IAAY,aAqBX;AArBD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,wCAAuB,CAAA;IACvB,gCAAe,CAAA;IACf,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,kDAAiC,CAAA;IACjC,4CAA2B,CAAA;IAC3B,8CAA6B,CAAA;IAC7B,gDAA+B,CAAA;IAC/B,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,oDAAmC,CAAA;IACnC,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,sDAAqC,CAAA;AACvC,CAAC,EArBW,aAAa,6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AE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,aAAa,EAAE,IAAI;IACnB,gBAAgB,EAAE,IAAI;IACtB,mBAAmB,EAAE,EAAE;IACvB,iBAAiB,EAAE,EAAE;CACtB,CAAC;AAKW,QAAA,mBAAmB,GAAwB;IACtD,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE,2BAA2B;IAClC,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,oBAAoB,EAAE,CAAC;IACvB,KAAK,EAAE,KAAK;CACb,CAAA"}
|
package/dist/types/platform.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface PlatformConfig {
|
|
|
23
23
|
preventAutoStart?: boolean;
|
|
24
24
|
[key: string]: unknown;
|
|
25
25
|
}
|
|
26
|
-
export type PlatformType = 'discord' | 'root';
|
|
26
|
+
export type PlatformType = 'discord' | 'root' | 'root-app';
|
|
27
27
|
export interface PlatformCapabilities {
|
|
28
28
|
embeds: boolean;
|
|
29
29
|
buttons: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/types/platform.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK1C,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IAIpD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAKzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAQ5B,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IASnF,WAAW,CAAC,SAAS,EA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GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAK3D,MAAM,WAAW,oBAAoB;IAEnC,MAAM,EAAE,OAAO,CAAC;IAGhB,OAAO,EAAE,OAAO,CAAC;IAGjB,WAAW,EAAE,OAAO,CAAC;IAGrB,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,EAAE,OAAO,CAAC;IAGrB,OAAO,EAAE,OAAO,CAAC;IAGjB,KAAK,EAAE,OAAO,CAAC;IAGf,aAAa,EAAE,OAAO,CAAC;IAGvB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "library.dr-conversion",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Unified interface for building multi-platform chat bots (Discord, Root, and more)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"example:simple": "ts-node examples/simple-bot.ts",
|
|
22
22
|
"example:discord": "ts-node examples/discord-bot.ts",
|
|
23
|
+
"example:root": "ts-node examples/root-bot.ts",
|
|
24
|
+
"example:root-app": "ts-node examples/root-app.ts",
|
|
23
25
|
"example:advanced": "ts-node examples/advanced-bot.ts"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|