@metatell/bot-core 0.0.1
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/CoreServiceFactory.d.ts +25 -0
- package/dist/CoreServiceFactory.d.ts.map +1 -0
- package/dist/CoreServiceFactory.js +102 -0
- package/dist/CoreServiceFactory.js.map +1 -0
- package/dist/ServiceContainer.d.ts +87 -0
- package/dist/ServiceContainer.d.ts.map +1 -0
- package/dist/ServiceContainer.js +119 -0
- package/dist/ServiceContainer.js.map +1 -0
- package/dist/ServiceIdentifier.d.ts +28 -0
- package/dist/ServiceIdentifier.d.ts.map +1 -0
- package/dist/ServiceIdentifier.js +18 -0
- package/dist/ServiceIdentifier.js.map +1 -0
- package/dist/builders/NafMessageBuilder.d.ts +242 -0
- package/dist/builders/NafMessageBuilder.d.ts.map +1 -0
- package/dist/builders/NafMessageBuilder.js +288 -0
- package/dist/builders/NafMessageBuilder.js.map +1 -0
- package/dist/errors/animation-errors.d.ts +41 -0
- package/dist/errors/animation-errors.d.ts.map +1 -0
- package/dist/errors/animation-errors.js +60 -0
- package/dist/errors/animation-errors.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/IAnimationService.d.ts +42 -0
- package/dist/interfaces/IAnimationService.d.ts.map +1 -0
- package/dist/interfaces/IAnimationService.js +5 -0
- package/dist/interfaces/IAnimationService.js.map +1 -0
- package/dist/interfaces/IAppSettings.d.ts +11 -0
- package/dist/interfaces/IAppSettings.d.ts.map +1 -0
- package/dist/interfaces/IAppSettings.js +5 -0
- package/dist/interfaces/IAppSettings.js.map +1 -0
- package/dist/interfaces/IAuthenticationService.d.ts +20 -0
- package/dist/interfaces/IAuthenticationService.d.ts.map +1 -0
- package/dist/interfaces/IAuthenticationService.js +5 -0
- package/dist/interfaces/IAuthenticationService.js.map +1 -0
- package/dist/interfaces/IAvatarController.d.ts +54 -0
- package/dist/interfaces/IAvatarController.d.ts.map +1 -0
- package/dist/interfaces/IAvatarController.js +5 -0
- package/dist/interfaces/IAvatarController.js.map +1 -0
- package/dist/interfaces/IConfigurationProvider.d.ts +39 -0
- package/dist/interfaces/IConfigurationProvider.d.ts.map +1 -0
- package/dist/interfaces/IConfigurationProvider.js +5 -0
- package/dist/interfaces/IConfigurationProvider.js.map +1 -0
- package/dist/interfaces/IConnectionManager.d.ts +23 -0
- package/dist/interfaces/IConnectionManager.d.ts.map +1 -0
- package/dist/interfaces/IConnectionManager.js +5 -0
- package/dist/interfaces/IConnectionManager.js.map +1 -0
- package/dist/interfaces/IEventBus.d.ts +28 -0
- package/dist/interfaces/IEventBus.d.ts.map +1 -0
- package/dist/interfaces/IEventBus.js +31 -0
- package/dist/interfaces/IEventBus.js.map +1 -0
- package/dist/interfaces/IMessageService.d.ts +25 -0
- package/dist/interfaces/IMessageService.d.ts.map +1 -0
- package/dist/interfaces/IMessageService.js +5 -0
- package/dist/interfaces/IMessageService.js.map +1 -0
- package/dist/interfaces/IOrganizationService.d.ts +58 -0
- package/dist/interfaces/IOrganizationService.d.ts.map +1 -0
- package/dist/interfaces/IOrganizationService.js +5 -0
- package/dist/interfaces/IOrganizationService.js.map +1 -0
- package/dist/interfaces/IPresenceManager.d.ts +20 -0
- package/dist/interfaces/IPresenceManager.d.ts.map +1 -0
- package/dist/interfaces/IPresenceManager.js +5 -0
- package/dist/interfaces/IPresenceManager.js.map +1 -0
- package/dist/interfaces/IUserAvatarManager.d.ts +88 -0
- package/dist/interfaces/IUserAvatarManager.d.ts.map +1 -0
- package/dist/interfaces/IUserAvatarManager.js +5 -0
- package/dist/interfaces/IUserAvatarManager.js.map +1 -0
- package/dist/interfaces/IWebSocketConnectionManager.d.ts +14 -0
- package/dist/interfaces/IWebSocketConnectionManager.d.ts.map +1 -0
- package/dist/interfaces/IWebSocketConnectionManager.js +2 -0
- package/dist/interfaces/IWebSocketConnectionManager.js.map +1 -0
- package/dist/logging/LogEventEmitter.d.ts +38 -0
- package/dist/logging/LogEventEmitter.d.ts.map +1 -0
- package/dist/logging/LogEventEmitter.js +54 -0
- package/dist/logging/LogEventEmitter.js.map +1 -0
- package/dist/logging/index.d.ts +22 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +10 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/providers/default.d.ts +22 -0
- package/dist/logging/providers/default.d.ts.map +1 -0
- package/dist/logging/providers/default.js +175 -0
- package/dist/logging/providers/default.js.map +1 -0
- package/dist/logging/spi.d.ts +35 -0
- package/dist/logging/spi.d.ts.map +1 -0
- package/dist/logging/spi.js +25 -0
- package/dist/logging/spi.js.map +1 -0
- package/dist/services/AnimationService.d.ts +38 -0
- package/dist/services/AnimationService.d.ts.map +1 -0
- package/dist/services/AnimationService.js +157 -0
- package/dist/services/AnimationService.js.map +1 -0
- package/dist/services/AppSettings.d.ts +14 -0
- package/dist/services/AppSettings.d.ts.map +1 -0
- package/dist/services/AppSettings.js +48 -0
- package/dist/services/AppSettings.js.map +1 -0
- package/dist/services/AuthenticationService.d.ts +13 -0
- package/dist/services/AuthenticationService.d.ts.map +1 -0
- package/dist/services/AuthenticationService.js +44 -0
- package/dist/services/AuthenticationService.js.map +1 -0
- package/dist/services/AvatarController.d.ts +50 -0
- package/dist/services/AvatarController.d.ts.map +1 -0
- package/dist/services/AvatarController.js +409 -0
- package/dist/services/AvatarController.js.map +1 -0
- package/dist/services/ChannelService.d.ts +19 -0
- package/dist/services/ChannelService.d.ts.map +1 -0
- package/dist/services/ChannelService.js +113 -0
- package/dist/services/ChannelService.js.map +1 -0
- package/dist/services/ConfigurationProvider.d.ts +13 -0
- package/dist/services/ConfigurationProvider.d.ts.map +1 -0
- package/dist/services/ConfigurationProvider.js +49 -0
- package/dist/services/ConfigurationProvider.js.map +1 -0
- package/dist/services/EventBus.d.ts +11 -0
- package/dist/services/EventBus.d.ts.map +1 -0
- package/dist/services/EventBus.js +54 -0
- package/dist/services/EventBus.js.map +1 -0
- package/dist/services/IChannelService.d.ts +57 -0
- package/dist/services/IChannelService.d.ts.map +1 -0
- package/dist/services/IChannelService.js +6 -0
- package/dist/services/IChannelService.js.map +1 -0
- package/dist/services/MessageService.d.ts +23 -0
- package/dist/services/MessageService.d.ts.map +1 -0
- package/dist/services/MessageService.js +141 -0
- package/dist/services/MessageService.js.map +1 -0
- package/dist/services/OrganizationService.d.ts +11 -0
- package/dist/services/OrganizationService.d.ts.map +1 -0
- package/dist/services/OrganizationService.js +121 -0
- package/dist/services/OrganizationService.js.map +1 -0
- package/dist/services/PresenceManager.d.ts +21 -0
- package/dist/services/PresenceManager.d.ts.map +1 -0
- package/dist/services/PresenceManager.js +143 -0
- package/dist/services/PresenceManager.js.map +1 -0
- package/dist/services/UserAvatarManager.d.ts +61 -0
- package/dist/services/UserAvatarManager.d.ts.map +1 -0
- package/dist/services/UserAvatarManager.js +466 -0
- package/dist/services/UserAvatarManager.js.map +1 -0
- package/dist/services/WebSocketConnectionManager.d.ts +26 -0
- package/dist/services/WebSocketConnectionManager.d.ts.map +1 -0
- package/dist/services/WebSocketConnectionManager.js +223 -0
- package/dist/services/WebSocketConnectionManager.js.map +1 -0
- package/dist/services/resolvers/CompositeUserIdResolver.d.ts +20 -0
- package/dist/services/resolvers/CompositeUserIdResolver.d.ts.map +1 -0
- package/dist/services/resolvers/CompositeUserIdResolver.js +46 -0
- package/dist/services/resolvers/CompositeUserIdResolver.js.map +1 -0
- package/dist/services/resolvers/CreatorMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/CreatorMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/CreatorMatchResolver.js +31 -0
- package/dist/services/resolvers/CreatorMatchResolver.js.map +1 -0
- package/dist/services/resolvers/ExactMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/ExactMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/ExactMatchResolver.js +28 -0
- package/dist/services/resolvers/ExactMatchResolver.js.map +1 -0
- package/dist/services/resolvers/IUserIdResolver.d.ts +53 -0
- package/dist/services/resolvers/IUserIdResolver.d.ts.map +1 -0
- package/dist/services/resolvers/IUserIdResolver.js +6 -0
- package/dist/services/resolvers/IUserIdResolver.js.map +1 -0
- package/dist/services/resolvers/OwnerMatchResolver.d.ts +15 -0
- package/dist/services/resolvers/OwnerMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/OwnerMatchResolver.js +31 -0
- package/dist/services/resolvers/OwnerMatchResolver.js.map +1 -0
- package/dist/services/resolvers/PrefixMatchResolver.d.ts +17 -0
- package/dist/services/resolvers/PrefixMatchResolver.d.ts.map +1 -0
- package/dist/services/resolvers/PrefixMatchResolver.js +36 -0
- package/dist/services/resolvers/PrefixMatchResolver.js.map +1 -0
- package/dist/services/resolvers/index.d.ts +10 -0
- package/dist/services/resolvers/index.d.ts.map +1 -0
- package/dist/services/resolvers/index.js +9 -0
- package/dist/services/resolvers/index.js.map +1 -0
- package/dist/types/animation.d.ts +92 -0
- package/dist/types/animation.d.ts.map +1 -0
- package/dist/types/animation.js +31 -0
- package/dist/types/animation.js.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/naf.d.ts +229 -0
- package/dist/types/naf.d.ts.map +1 -0
- package/dist/types/naf.js +93 -0
- package/dist/types/naf.js.map +1 -0
- package/dist/utils/nafParser.d.ts +64 -0
- package/dist/utils/nafParser.d.ts.map +1 -0
- package/dist/utils/nafParser.js +99 -0
- package/dist/utils/nafParser.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Service Factory - SDK Core Services Only
|
|
3
|
+
* This factory only includes core services needed for the SDK, without any application-specific services
|
|
4
|
+
*/
|
|
5
|
+
import type { BotConfiguration } from './interfaces/IConfigurationProvider.js';
|
|
6
|
+
import { ServiceContainer } from './ServiceContainer.js';
|
|
7
|
+
import type { ServiceIdentifier } from './ServiceIdentifier.js';
|
|
8
|
+
/**
|
|
9
|
+
* Core Service Factory - Contains only SDK core services
|
|
10
|
+
* This can be used independently without any application-specific dependencies
|
|
11
|
+
*/
|
|
12
|
+
export declare class CoreServiceFactory {
|
|
13
|
+
protected container: ServiceContainer;
|
|
14
|
+
constructor(config?: BotConfiguration);
|
|
15
|
+
protected registerCoreServices(config?: BotConfiguration): void;
|
|
16
|
+
getContainer(): ServiceContainer;
|
|
17
|
+
/**
|
|
18
|
+
* Get a service from the container
|
|
19
|
+
* @param key Service identifier token or class
|
|
20
|
+
* @returns Service instance
|
|
21
|
+
*/
|
|
22
|
+
getService<T>(key: abstract new (...args: any[]) => ServiceIdentifier<T>): T;
|
|
23
|
+
getService<C extends new (...args: any[]) => any>(key: C): InstanceType<C>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=CoreServiceFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreServiceFactory.d.ts","sourceRoot":"","sources":["../src/CoreServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAU9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAa/D;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,SAAS,CAAC,SAAS,EAAE,gBAAgB,CAAA;gBAEzB,MAAM,CAAC,EAAE,gBAAgB;IAKrC,SAAS,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI;IA0GxD,YAAY,IAAI,gBAAgB;IAIvC;;;;OAIG;IAGI,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC;IAG5E,UAAU,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC;CAMlF"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Service Factory - SDK Core Services Only
|
|
3
|
+
* This factory only includes core services needed for the SDK, without any application-specific services
|
|
4
|
+
*/
|
|
5
|
+
// 型安全な実装のために、インターフェースとトークンの両方をインポート
|
|
6
|
+
import { AnimationService as AnimationServiceToken } from './interfaces/IAnimationService.js';
|
|
7
|
+
import { AppSettings as AppSettingsToken } from './interfaces/IAppSettings.js';
|
|
8
|
+
import { AuthenticationService as AuthenticationServiceToken } from './interfaces/IAuthenticationService.js';
|
|
9
|
+
import { AvatarController as AvatarControllerToken } from './interfaces/IAvatarController.js';
|
|
10
|
+
import { ConfigurationProvider as ConfigurationProviderToken } from './interfaces/IConfigurationProvider.js';
|
|
11
|
+
import { ConnectionManager as ConnectionManagerToken } from './interfaces/IConnectionManager.js';
|
|
12
|
+
import { EventBus as EventBusToken } from './interfaces/IEventBus.js';
|
|
13
|
+
import { MessageService as MessageServiceToken } from './interfaces/IMessageService.js';
|
|
14
|
+
import { OrganizationService as OrganizationServiceToken } from './interfaces/IOrganizationService.js';
|
|
15
|
+
import { PresenceManager as PresenceManagerToken } from './interfaces/IPresenceManager.js';
|
|
16
|
+
import { UserAvatarManager as UserAvatarManagerToken } from './interfaces/IUserAvatarManager.js';
|
|
17
|
+
// Realtime adapters are registered by the consuming package to avoid circular dependencies
|
|
18
|
+
import { getLogger } from './logging/index.js';
|
|
19
|
+
import { ServiceContainer } from './ServiceContainer.js';
|
|
20
|
+
import { AnimationService as AnimationServiceImpl } from './services/AnimationService.js';
|
|
21
|
+
import { AppSettings as AppSettingsImpl } from './services/AppSettings.js';
|
|
22
|
+
import { AuthenticationService as AuthenticationServiceImpl } from './services/AuthenticationService.js';
|
|
23
|
+
import { AvatarController as AvatarControllerImpl } from './services/AvatarController.js';
|
|
24
|
+
import { ConfigurationProvider as ConfigurationProviderImpl } from './services/ConfigurationProvider.js';
|
|
25
|
+
import { EventBus as EventBusImpl } from './services/EventBus.js';
|
|
26
|
+
import { MessageService as MessageServiceImpl } from './services/MessageService.js';
|
|
27
|
+
import { OrganizationService as OrganizationServiceImpl } from './services/OrganizationService.js';
|
|
28
|
+
import { PresenceManager as PresenceManagerImpl } from './services/PresenceManager.js';
|
|
29
|
+
import { UserAvatarManager as UserAvatarManagerImpl } from './services/UserAvatarManager.js';
|
|
30
|
+
import { WebSocketConnectionManager } from './services/WebSocketConnectionManager.js';
|
|
31
|
+
/**
|
|
32
|
+
* Core Service Factory - Contains only SDK core services
|
|
33
|
+
* This can be used independently without any application-specific dependencies
|
|
34
|
+
*/
|
|
35
|
+
export class CoreServiceFactory {
|
|
36
|
+
container;
|
|
37
|
+
constructor(config) {
|
|
38
|
+
this.container = new ServiceContainer();
|
|
39
|
+
this.registerCoreServices(config);
|
|
40
|
+
}
|
|
41
|
+
registerCoreServices(config) {
|
|
42
|
+
// Using fluent API for clean registration
|
|
43
|
+
// Core services registration with type-safe API
|
|
44
|
+
this.container
|
|
45
|
+
.register(AppSettingsToken, () => new AppSettingsImpl(config?.debug || false, config?.debug ? 'debug' : 'info'))
|
|
46
|
+
.register(EventBusToken, () => new EventBusImpl())
|
|
47
|
+
.register(ConfigurationProviderToken, () => new ConfigurationProviderImpl(config || {}));
|
|
48
|
+
// Services with dependencies
|
|
49
|
+
this.container
|
|
50
|
+
.register(AuthenticationServiceToken, (container) => new AuthenticationServiceImpl(container.get(ConfigurationProviderToken)))
|
|
51
|
+
.register(ConnectionManagerToken, (container) => new WebSocketConnectionManager(container.get(EventBusToken), container.get(ConfigurationProviderToken), container.get(AppSettingsToken)))
|
|
52
|
+
.register(MessageServiceToken, (container) => new MessageServiceImpl(container.get(ConnectionManagerToken), container.get(EventBusToken), container.get(AppSettingsToken)));
|
|
53
|
+
// Animation and Avatar services
|
|
54
|
+
this.container
|
|
55
|
+
.register(AnimationServiceToken, (container) => {
|
|
56
|
+
const logger = getLogger('AnimationService');
|
|
57
|
+
const configProvider = container.get(ConfigurationProviderToken);
|
|
58
|
+
const config = configProvider.getConfiguration();
|
|
59
|
+
// 環境に応じてAPI URLを決定
|
|
60
|
+
let apiBaseUrl = config.storageUrl;
|
|
61
|
+
if (!apiBaseUrl) {
|
|
62
|
+
const hubUrl = config.hubUrl;
|
|
63
|
+
try {
|
|
64
|
+
const url = new URL(hubUrl);
|
|
65
|
+
const hostname = url.hostname;
|
|
66
|
+
// メインAPIのURLを決定
|
|
67
|
+
if (hostname.includes('metatell-stg.app') || hostname.includes('-stg.')) {
|
|
68
|
+
// staging環境の場合は管理APIパスを含める
|
|
69
|
+
apiBaseUrl = 'https://metatell-stg.app/api/admin/stg';
|
|
70
|
+
}
|
|
71
|
+
else if (hostname.includes('metatell-dev.app') || hostname.includes('-dev.')) {
|
|
72
|
+
apiBaseUrl = 'https://metatell-dev.app/api/admin/dev';
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
apiBaseUrl = 'https://metatell.app/api/admin/prod';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
apiBaseUrl = 'https://metatell.app/api/admin/prod';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
logger.debug('AnimationService initialized with API URL', { apiBaseUrl });
|
|
83
|
+
return new AnimationServiceImpl(logger, apiBaseUrl);
|
|
84
|
+
})
|
|
85
|
+
.register(AvatarControllerToken, (container) => new AvatarControllerImpl(container.get(MessageServiceToken), container.get(ConfigurationProviderToken), container.get(EventBusToken), container.get(AnimationServiceToken)));
|
|
86
|
+
// Presence and User management services
|
|
87
|
+
this.container
|
|
88
|
+
.register(PresenceManagerToken, (container) => new PresenceManagerImpl(container.get(ConnectionManagerToken), container.get(EventBusToken)))
|
|
89
|
+
.register(UserAvatarManagerToken, (container) => new UserAvatarManagerImpl(container.get(MessageServiceToken), container.get(PresenceManagerToken), container.get(EventBusToken)))
|
|
90
|
+
.register(OrganizationServiceToken, () => new OrganizationServiceImpl());
|
|
91
|
+
// Voice adapters are registered by consuming packages to avoid circular dependencies
|
|
92
|
+
}
|
|
93
|
+
getContainer() {
|
|
94
|
+
return this.container;
|
|
95
|
+
}
|
|
96
|
+
// Implementation
|
|
97
|
+
// biome-ignore lint/suspicious/noExplicitAny: Implementation signature must be broad to cover all overloads
|
|
98
|
+
getService(key) {
|
|
99
|
+
return this.container.get(key);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=CoreServiceFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreServiceFactory.js","sourceRoot":"","sources":["../src/CoreServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oCAAoC;AACpC,OAAO,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,qBAAqB,IAAI,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AAC5G,OAAO,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAE7F,OAAO,EAAE,qBAAqB,IAAI,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AAC5G,OAAO,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAChG,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACvF,OAAO,EAAE,mBAAmB,IAAI,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AACtG,OAAO,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,kC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AAS;aACX,QAAQ,CACP,oBAAoB,EACpB,CAAC,SAAS,EAAE,EAAE,CACZ,IAAI,mBAAmB,CACrB,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,EACrC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAC7B,CACJ;aACA,QAAQ,CACP,sBAAsB,EACtB,CAAC,SAAS,EAAE,EAAE,CACZ,IAAI,qBAAqB,CACvB,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAClC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,EACnC,SAAS,CAAC,GAAG,CAAC,aAAa,CAAC,CAC7B,CACJ;aACA,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAA;QAE1E,qFAAqF;IACvF,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAaD,iBAAiB;IACjB,4GAA4G;IACrG,UAAU,CAAC,GAAQ;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ServiceIdentifier, ServiceKey, ServiceType } from './ServiceIdentifier.js';
|
|
2
|
+
export type { ServiceKey } from './ServiceIdentifier.js';
|
|
3
|
+
type ServiceFactory<T> = (container: ServiceContainer) => T;
|
|
4
|
+
/**
|
|
5
|
+
* Service registration options
|
|
6
|
+
*/
|
|
7
|
+
interface ServiceOptions {
|
|
8
|
+
singleton?: boolean;
|
|
9
|
+
eager?: boolean;
|
|
10
|
+
dispose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Service registration configuration
|
|
14
|
+
*/
|
|
15
|
+
interface ServiceRegistration {
|
|
16
|
+
key: ServiceKey<unknown>;
|
|
17
|
+
factory: ServiceFactory<unknown>;
|
|
18
|
+
options?: ServiceOptions;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Type-safe Service Container for Dependency Injection
|
|
22
|
+
*
|
|
23
|
+
* Features:
|
|
24
|
+
* - Full type safety with TypeScript - no string-based APIs
|
|
25
|
+
* - Automatic type inference using ServiceIdentifier tokens
|
|
26
|
+
* - Support for both interface tokens and concrete classes
|
|
27
|
+
* - Singleton and transient lifetime management
|
|
28
|
+
* - Compile-time type checking for all service registrations and retrievals
|
|
29
|
+
*/
|
|
30
|
+
export declare class ServiceContainer {
|
|
31
|
+
private readonly services;
|
|
32
|
+
private readonly factories;
|
|
33
|
+
private readonly options;
|
|
34
|
+
/**
|
|
35
|
+
* Register a service with the container using type-safe keys
|
|
36
|
+
* @param key Service identifier (interface token or class) - strings are not supported
|
|
37
|
+
* @param factory Factory function to create the service
|
|
38
|
+
* @param options Service registration options
|
|
39
|
+
* @example
|
|
40
|
+
* container.register(MessageService, () => new MessageServiceImpl())
|
|
41
|
+
* container.register(AppSettings, () => new AppSettingsImpl())
|
|
42
|
+
*/
|
|
43
|
+
register<T>(key: ServiceKey<T>, factory: ServiceFactory<ServiceType<T>>, options?: ServiceOptions): this;
|
|
44
|
+
/**
|
|
45
|
+
* Get a service from the container with automatic type inference
|
|
46
|
+
* @param key Service identifier (interface token or class) - strings are not supported
|
|
47
|
+
* @returns Service instance with correct type inferred from the key
|
|
48
|
+
* @throws Error if service is not registered
|
|
49
|
+
* @example
|
|
50
|
+
* const messageService = container.get(MessageService) // Type is inferred as IMessageService
|
|
51
|
+
* const appSettings = container.get(AppSettings) // Type is inferred as IAppSettings
|
|
52
|
+
*/
|
|
53
|
+
get<T>(key: abstract new (...args: any[]) => ServiceIdentifier<T>): T;
|
|
54
|
+
get<C extends new (...args: any[]) => any>(key: C): InstanceType<C>;
|
|
55
|
+
/**
|
|
56
|
+
* Check if a service is registered
|
|
57
|
+
* @param key Service identifier
|
|
58
|
+
* @returns true if the service is registered
|
|
59
|
+
*/
|
|
60
|
+
has<T>(key: ServiceKey<T>): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Clear all singleton instances
|
|
63
|
+
* Useful for testing or resetting the container
|
|
64
|
+
*/
|
|
65
|
+
clear(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Bind a class to itself (syntactic sugar)
|
|
68
|
+
* @param implementation Class constructor
|
|
69
|
+
* @param options Service options
|
|
70
|
+
*/
|
|
71
|
+
bind<T>(implementation: new (...args: unknown[]) => T, options?: ServiceOptions): this;
|
|
72
|
+
/**
|
|
73
|
+
* Register all services at once (bulk registration)
|
|
74
|
+
* @param registrations Array of service registrations
|
|
75
|
+
*/
|
|
76
|
+
registerAll(registrations: ServiceRegistration[]): this;
|
|
77
|
+
/**
|
|
78
|
+
* Create a scoped container (child container)
|
|
79
|
+
* Useful for request-scoped services
|
|
80
|
+
*/
|
|
81
|
+
createScope(): ServiceContainer;
|
|
82
|
+
/**
|
|
83
|
+
* Get service name for error messages
|
|
84
|
+
*/
|
|
85
|
+
private getServiceName;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=ServiceContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceContainer.d.ts","sourceRoot":"","sources":["../src/ServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAExF,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAC,CAAA;AAG3D;;GAEG;AACH,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED;;GAEG;AACH,UAAU,mBAAmB;IAC3B,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IACxB,OAAO,EAAE,c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|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Full type safety with TypeScript - no string-based APIs
|
|
6
|
+
* - Automatic type inference using ServiceIdentifier tokens
|
|
7
|
+
* - Support for both interface tokens and concrete classes
|
|
8
|
+
* - Singleton and transient lifetime management
|
|
9
|
+
* - Compile-time type checking for all service registrations and retrievals
|
|
10
|
+
*/
|
|
11
|
+
export class ServiceContainer {
|
|
12
|
+
services = new Map();
|
|
13
|
+
factories = new Map();
|
|
14
|
+
options = new Map();
|
|
15
|
+
/**
|
|
16
|
+
* Register a service with the container using type-safe keys
|
|
17
|
+
* @param key Service identifier (interface token or class) - strings are not supported
|
|
18
|
+
* @param factory Factory function to create the service
|
|
19
|
+
* @param options Service registration options
|
|
20
|
+
* @example
|
|
21
|
+
* container.register(MessageService, () => new MessageServiceImpl())
|
|
22
|
+
* container.register(AppSettings, () => new AppSettingsImpl())
|
|
23
|
+
*/
|
|
24
|
+
register(key, factory, options = {}) {
|
|
25
|
+
this.factories.set(key, factory);
|
|
26
|
+
this.options.set(key, { singleton: true, ...options });
|
|
27
|
+
return this; // Fluent API
|
|
28
|
+
}
|
|
29
|
+
// Implementation
|
|
30
|
+
// biome-ignore lint/suspicious/noExplicitAny: Implementation signature must be broad to cover all overloads
|
|
31
|
+
get(key) {
|
|
32
|
+
const options = this.options.get(key);
|
|
33
|
+
// Check for singleton instance
|
|
34
|
+
if (options?.singleton && this.services.has(key)) {
|
|
35
|
+
return this.services.get(key);
|
|
36
|
+
}
|
|
37
|
+
// Get factory
|
|
38
|
+
const factory = this.factories.get(key);
|
|
39
|
+
if (!factory) {
|
|
40
|
+
const keyName = this.getServiceName(key);
|
|
41
|
+
throw new Error(`Service "${keyName}" not registered`);
|
|
42
|
+
}
|
|
43
|
+
// Create instance
|
|
44
|
+
const instance = factory(this);
|
|
45
|
+
// Store singleton
|
|
46
|
+
if (options?.singleton) {
|
|
47
|
+
this.services.set(key, instance);
|
|
48
|
+
}
|
|
49
|
+
return instance;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if a service is registered
|
|
53
|
+
* @param key Service identifier
|
|
54
|
+
* @returns true if the service is registered
|
|
55
|
+
*/
|
|
56
|
+
has(key) {
|
|
57
|
+
return this.factories.has(key);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Clear all singleton instances
|
|
61
|
+
* Useful for testing or resetting the container
|
|
62
|
+
*/
|
|
63
|
+
clear() {
|
|
64
|
+
// Call dispose handlers if available
|
|
65
|
+
for (const [key, options] of this.options) {
|
|
66
|
+
if (options.dispose && this.services.has(key)) {
|
|
67
|
+
options.dispose();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
this.services.clear();
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Bind a class to itself (syntactic sugar)
|
|
74
|
+
* @param implementation Class constructor
|
|
75
|
+
* @param options Service options
|
|
76
|
+
*/
|
|
77
|
+
bind(implementation, options) {
|
|
78
|
+
// For concrete classes, T = ServiceType<T>, so we can bypass type checking
|
|
79
|
+
this.factories.set(implementation, () => new implementation());
|
|
80
|
+
this.options.set(implementation, { singleton: true, ...options });
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Register all services at once (bulk registration)
|
|
85
|
+
* @param registrations Array of service registrations
|
|
86
|
+
*/
|
|
87
|
+
registerAll(registrations) {
|
|
88
|
+
for (const reg of registrations) {
|
|
89
|
+
this.register(reg.key, reg.factory, reg.options);
|
|
90
|
+
}
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Create a scoped container (child container)
|
|
95
|
+
* Useful for request-scoped services
|
|
96
|
+
*/
|
|
97
|
+
createScope() {
|
|
98
|
+
const scoped = new ServiceContainer();
|
|
99
|
+
// Copy factories but not singleton instances
|
|
100
|
+
for (const [key, factory] of this.factories) {
|
|
101
|
+
scoped.factories.set(key, factory);
|
|
102
|
+
const options = this.options.get(key);
|
|
103
|
+
if (options) {
|
|
104
|
+
scoped.options.set(key, options);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return scoped;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get service name for error messages
|
|
111
|
+
*/
|
|
112
|
+
getServiceName(key) {
|
|
113
|
+
if (typeof key === 'function') {
|
|
114
|
+
return key.name || 'AnonymousService';
|
|
115
|
+
}
|
|
116
|
+
return 'UnknownService';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=ServiceContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceContainer.js","sourceRoot":"","sources":["../src/ServiceContainer.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;GASG;AACH,MAAM,OAAO,gBAAgB;IACV,QAAQ,GAAG,IAAI,GAAG,EAAwC,CAAA;IAC1D,SAAS,GAAG,IAAI,GAAG,EAAgD,CAAA;IACnE,OAAO,GAAG,IAAI,GAAG,EAAuC,CAAA;IAEzE;;;;;;;;OAQG;IACH,QAAQ,CACN,GAAkB,EAClB,OAAuC,EACvC,UAA0B,EAAE;QAE5B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAA0B,EAAE,OAAkC,CAAC,CAAA;QAClF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAA0B,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;QAC7E,OAAO,IAAI,CAAA,CAAC,aAAa;IAC3B,CAAC;IAiBD,iBAAiB;IACjB,4GAA4G;IAC5G,GAAG,CAAC,GAAQ;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAA0B,CAAC,CAAA;QAE5D,+BAA+B;QAC/B,IAAI,OAAO,EAAE,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAA0B,CAAC,EAAE,CAAC;YACxE,OAAO,IAAI,CAAC,QAA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,GAAG,CAAC,cAAqC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAA;QACxF,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,aAAoC;QAC9C,KAAK,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;QAClD,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,MAAM,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAA;QACrC,6CAA6C;QAC7C,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC5C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAClC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACrC,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAClC,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;OAEG;IACK,cAAc,CAAC,GAAwB;QAC7C,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,OAAO,GAAG,CAAC,IAAI,IAAI,kBAAkB,CAAA;QACvC,CAAC;QACD,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ServiceIdentifier - Type-safe service identification token
|
|
3
|
+
*
|
|
4
|
+
* This abstract class serves as a type token for dependency injection,
|
|
5
|
+
* allowing type-safe service registration and retrieval without strings.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* export interface IMyService { ... }
|
|
10
|
+
* export abstract class MyService extends ServiceIdentifier<IMyService> {}
|
|
11
|
+
* ```
|
|
12
|
+
* @template T - The interface type this identifier represents
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class ServiceIdentifier<T> {
|
|
15
|
+
private readonly _phantom?;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Extracts the service interface type from a ServiceIdentifier
|
|
19
|
+
*/
|
|
20
|
+
export type ServiceType<T> = T extends ServiceIdentifier<infer U> ? U : T;
|
|
21
|
+
/**
|
|
22
|
+
* ServiceKey - Union type for valid service keys
|
|
23
|
+
* Supports both concrete classes and abstract classes (tokens)
|
|
24
|
+
*/
|
|
25
|
+
type ConstructorArgs = any[];
|
|
26
|
+
export type ServiceKey<T> = (new (...args: ConstructorArgs) => T) | (abstract new (...args: ConstructorArgs) => T);
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=ServiceIdentifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceIdentifier.d.ts","sourceRoot":"","sources":["../src/ServiceIdentifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,8BAAsB,iBAAiB,CAAC,CAAC;IAEvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAG;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,iBAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEzE;;;GAGG;AAGH,KAAK,eAAe,GAAG,GAAG,EAAE,CAAA;AAE5B,MAAM,MAAM,UAAU,CAAC,CAAC,IACpB,CAAC,KACC,GAAG,IAAI,EAAE,eAAe,KACrB,CAAC,CAAC,GACP,CAAC,QAAQ,MACP,GAAG,IAAI,EAAE,eAAe,KACrB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ServiceIdentifier - Type-safe service identification token
|
|
3
|
+
*
|
|
4
|
+
* This abstract class serves as a type token for dependency injection,
|
|
5
|
+
* allowing type-safe service registration and retrieval without strings.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* export interface IMyService { ... }
|
|
10
|
+
* export abstract class MyService extends ServiceIdentifier<IMyService> {}
|
|
11
|
+
* ```
|
|
12
|
+
* @template T - The interface type this identifier represents
|
|
13
|
+
*/
|
|
14
|
+
export class ServiceIdentifier {
|
|
15
|
+
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: This field is used for type inference only
|
|
16
|
+
_phantom;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ServiceIdentifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceIdentifier.js","sourceRoot":"","sources":["../src/ServiceIdentifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,iBAAiB;IACrC,wGAAwG;IACvF,QAAQ,CAAI;CAC9B"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NAF Component IDs - Mapping of component types to their numeric IDs
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NafComponentId {
|
|
5
|
+
Position = "0",
|
|
6
|
+
Velocity = "1",
|
|
7
|
+
Scale = "2",
|
|
8
|
+
Avatar = "3",
|
|
9
|
+
HeadRotation = "4",
|
|
10
|
+
LeftHandRotation = "5",
|
|
11
|
+
RightHandRotation = "6",
|
|
12
|
+
LeftHandPosition = "7",
|
|
13
|
+
RightHandPosition = "8",
|
|
14
|
+
HandRaised = "9",
|
|
15
|
+
PinPosition = "10",
|
|
16
|
+
PinScale = "11",
|
|
17
|
+
FaceSnapshotEnabled = "12",
|
|
18
|
+
FaceSnapshot = "13",
|
|
19
|
+
BodyRotation = "14"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* NAF Avatar configuration
|
|
23
|
+
*/
|
|
24
|
+
export interface NafAvatarConfig {
|
|
25
|
+
avatarSrc: string;
|
|
26
|
+
avatarType?: string;
|
|
27
|
+
muted?: boolean;
|
|
28
|
+
isSharingAvatarCamera?: boolean;
|
|
29
|
+
files?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* NAF Message data types
|
|
33
|
+
*/
|
|
34
|
+
export type NafDataType = 'u' | 'um' | 'r';
|
|
35
|
+
/**
|
|
36
|
+
* NAF Message structure
|
|
37
|
+
*/
|
|
38
|
+
export interface NafMessage {
|
|
39
|
+
dataType: NafDataType;
|
|
40
|
+
data: {
|
|
41
|
+
networkId?: string;
|
|
42
|
+
owner?: string;
|
|
43
|
+
creator?: string;
|
|
44
|
+
lastOwnerTime?: number;
|
|
45
|
+
template?: string;
|
|
46
|
+
persistent?: boolean;
|
|
47
|
+
isFirstSync?: boolean;
|
|
48
|
+
forceRender?: boolean;
|
|
49
|
+
megaphone?: boolean;
|
|
50
|
+
temporaryMegaphone?: boolean;
|
|
51
|
+
parent?: unknown;
|
|
52
|
+
components?: Record<string, unknown>;
|
|
53
|
+
d?: Array<{
|
|
54
|
+
networkId: string;
|
|
55
|
+
owner: string;
|
|
56
|
+
creator: string;
|
|
57
|
+
lastOwnerTime: number;
|
|
58
|
+
template: string;
|
|
59
|
+
persistent: boolean;
|
|
60
|
+
parent: unknown;
|
|
61
|
+
components: Record<string, unknown>;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Builder for constructing NAF messages with a fluent API
|
|
67
|
+
*/
|
|
68
|
+
export declare class NafMessageBuilder {
|
|
69
|
+
private dataType;
|
|
70
|
+
private networkId;
|
|
71
|
+
private owner;
|
|
72
|
+
private creator;
|
|
73
|
+
private lastOwnerTime;
|
|
74
|
+
private template;
|
|
75
|
+
private persistent;
|
|
76
|
+
private isFirstSync;
|
|
77
|
+
private forceRender;
|
|
78
|
+
private megaphone;
|
|
79
|
+
private temporaryMegaphone;
|
|
80
|
+
private parent;
|
|
81
|
+
private components;
|
|
82
|
+
private isMultiData;
|
|
83
|
+
constructor();
|
|
84
|
+
/**
|
|
85
|
+
* Set the data type
|
|
86
|
+
*/
|
|
87
|
+
withDataType(type: NafDataType): this;
|
|
88
|
+
/**
|
|
89
|
+
* Set network ID
|
|
90
|
+
*/
|
|
91
|
+
withNetworkId(id: string): this;
|
|
92
|
+
/**
|
|
93
|
+
* Set owner
|
|
94
|
+
*/
|
|
95
|
+
withOwner(owner: string): this;
|
|
96
|
+
/**
|
|
97
|
+
* Set creator
|
|
98
|
+
*/
|
|
99
|
+
withCreator(creator: string): this;
|
|
100
|
+
/**
|
|
101
|
+
* Set last owner time
|
|
102
|
+
*/
|
|
103
|
+
withLastOwnerTime(time?: number): this;
|
|
104
|
+
/**
|
|
105
|
+
* Set template
|
|
106
|
+
*/
|
|
107
|
+
withTemplate(template: string): this;
|
|
108
|
+
/**
|
|
109
|
+
* Set persistent flag
|
|
110
|
+
*/
|
|
111
|
+
withPersistent(persistent: boolean): this;
|
|
112
|
+
/**
|
|
113
|
+
* Set first sync flag (for new users)
|
|
114
|
+
*/
|
|
115
|
+
withFirstSync(isFirstSync: boolean): this;
|
|
116
|
+
/**
|
|
117
|
+
* Set position component
|
|
118
|
+
*/
|
|
119
|
+
withPosition(position: {
|
|
120
|
+
x: number;
|
|
121
|
+
y: number;
|
|
122
|
+
z: number;
|
|
123
|
+
}): this;
|
|
124
|
+
/**
|
|
125
|
+
* Set velocity component
|
|
126
|
+
*/
|
|
127
|
+
withVelocity(velocity: {
|
|
128
|
+
x: number;
|
|
129
|
+
y: number;
|
|
130
|
+
z: number;
|
|
131
|
+
}): this;
|
|
132
|
+
/**
|
|
133
|
+
* Set scale component
|
|
134
|
+
*/
|
|
135
|
+
withScale(scale: {
|
|
136
|
+
x: number;
|
|
137
|
+
y: number;
|
|
138
|
+
z: number;
|
|
139
|
+
}): this;
|
|
140
|
+
/**
|
|
141
|
+
* Set avatar component
|
|
142
|
+
*/
|
|
143
|
+
withAvatar(config: NafAvatarConfig): this;
|
|
144
|
+
/**
|
|
145
|
+
* Set body rotation (euler angles)
|
|
146
|
+
*/
|
|
147
|
+
withBodyRotation(rotation: {
|
|
148
|
+
x: number;
|
|
149
|
+
y: number;
|
|
150
|
+
z: number;
|
|
151
|
+
}): this;
|
|
152
|
+
/**
|
|
153
|
+
* Set head rotation (quaternion)
|
|
154
|
+
*/
|
|
155
|
+
withHeadRotation(rotation: {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
z: number;
|
|
159
|
+
w: number;
|
|
160
|
+
}): this;
|
|
161
|
+
/**
|
|
162
|
+
* Set left hand rotation (quaternion)
|
|
163
|
+
*/
|
|
164
|
+
withLeftHandRotation(rotation: {
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
z: number;
|
|
168
|
+
w: number;
|
|
169
|
+
}): this;
|
|
170
|
+
/**
|
|
171
|
+
* Set right hand rotation (quaternion)
|
|
172
|
+
*/
|
|
173
|
+
withRightHandRotation(rotation: {
|
|
174
|
+
x: number;
|
|
175
|
+
y: number;
|
|
176
|
+
z: number;
|
|
177
|
+
w: number;
|
|
178
|
+
}): this;
|
|
179
|
+
/**
|
|
180
|
+
* Set left hand position
|
|
181
|
+
*/
|
|
182
|
+
withLeftHandPosition(position: {
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
z: number;
|
|
186
|
+
}): this;
|
|
187
|
+
/**
|
|
188
|
+
* Set right hand position
|
|
189
|
+
*/
|
|
190
|
+
withRightHandPosition(position: {
|
|
191
|
+
x: number;
|
|
192
|
+
y: number;
|
|
193
|
+
z: number;
|
|
194
|
+
}): this;
|
|
195
|
+
/**
|
|
196
|
+
* Set hand raised state
|
|
197
|
+
*/
|
|
198
|
+
withHandRaised(raised: boolean): this;
|
|
199
|
+
/**
|
|
200
|
+
* Set pin position
|
|
201
|
+
*/
|
|
202
|
+
withPinPosition(position: {
|
|
203
|
+
x: number;
|
|
204
|
+
y: number;
|
|
205
|
+
z: number;
|
|
206
|
+
}): this;
|
|
207
|
+
/**
|
|
208
|
+
* Set pin scale
|
|
209
|
+
*/
|
|
210
|
+
withPinScale(scale: {
|
|
211
|
+
x: number;
|
|
212
|
+
y: number;
|
|
213
|
+
z: number;
|
|
214
|
+
}): this;
|
|
215
|
+
/**
|
|
216
|
+
* Set face snapshot enabled
|
|
217
|
+
*/
|
|
218
|
+
withFaceSnapshotEnabled(enabled: boolean): this;
|
|
219
|
+
/**
|
|
220
|
+
* Set face snapshot data
|
|
221
|
+
*/
|
|
222
|
+
withFaceSnapshot(data: unknown): this;
|
|
223
|
+
/**
|
|
224
|
+
* Set megaphone state
|
|
225
|
+
*/
|
|
226
|
+
withMegaphone(enabled: boolean): this;
|
|
227
|
+
/**
|
|
228
|
+
* Set temporary megaphone state
|
|
229
|
+
*/
|
|
230
|
+
withTemporaryMegaphone(enabled: boolean): this;
|
|
231
|
+
/**
|
|
232
|
+
* Set custom component by ID
|
|
233
|
+
* Use this for components not covered by specific methods
|
|
234
|
+
*/
|
|
235
|
+
withCustomComponent(componentId: string, value: unknown): this;
|
|
236
|
+
/**
|
|
237
|
+
* Build the NAF message
|
|
238
|
+
* @returns NAF message based on the dataType
|
|
239
|
+
*/
|
|
240
|
+
build(): NafMessage;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=NafMessageBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NafMessageBuilder.d.ts","sourceRoot":"","sources":["../../src/builders/NafMessageBuilder.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc;IACxB,QAAQ,MAAM;IACd,QAAQ,MAAM;IACd,KAAK,MAAM;IACX,MAAM,MAAM;IACZ,YAAY,MAAM;IAClB,gBAAgB,MA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