@acorex-platform/extension-rtc-livekit-client 0.0.21

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.
@@ -0,0 +1,183 @@
1
+ import { runtimeCommandSuccessObject, AXP_INTEGRATION_CONNECTION_STATUS, AXP_INTEGRATION_AUTH_METHOD_TYPE } from '@acorex-platform/framework-shared/core';
2
+ import { AXMIntegrationConnectionManager, hasConfiguredIntegrationCredentials, AXP_INTEGRATION_CREDENTIAL_MASK, isMaskedIntegrationCredential, toSafeIntegrationConnectionDto } from '@acorex-platform/module-integration-management-client';
3
+ import { AXPLayoutBuilderService, resolveLayoutBuilderDialogResult } from '@acorex-platform/framework-client/layout/builder';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, Injectable } from '@angular/core';
6
+ import { trim } from 'lodash-es';
7
+ import { RootConfig } from '@acorex-platform/extension-rtc-livekit-client/contracts';
8
+
9
+ //#region ----- Connect LiveKit -----
10
+ class ConnectLiveKitCommand {
11
+ constructor() {
12
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
13
+ this.connectionManager = inject(AXMIntegrationConnectionManager);
14
+ }
15
+ async execute(input = {}) {
16
+ try {
17
+ const providerId = input.providerId ?? RootConfig.integration.providerId;
18
+ const connectionScope = input.connectionScope ?? 'tenant';
19
+ const I18N = `@${RootConfig.config.i18n}:integration.connect`;
20
+ const existing = await this.connectionManager.findByUniqueKey({
21
+ providerId,
22
+ connectionScope,
23
+ connectionKey: 'default',
24
+ });
25
+ const isReconfigure = hasConfiguredIntegrationCredentials(existing);
26
+ const existingConfig = (existing?.config ?? {});
27
+ const form = await this.openConnectDialog({
28
+ i18nPrefix: I18N,
29
+ isReconfigure,
30
+ displayName: existing?.displayName ?? 'LiveKit',
31
+ serverUrl: trim(existing?.instanceUrl ?? existingConfig.serverUrl ?? ''),
32
+ apiKey: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',
33
+ apiSecret: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',
34
+ });
35
+ if (!form) {
36
+ return runtimeCommandSuccessObject({ outcome: 'cancelled' });
37
+ }
38
+ const serverUrl = trim(form.serverUrl);
39
+ let apiKey = trim(form.apiKey);
40
+ let apiSecret = trim(form.apiSecret);
41
+ if (isMaskedIntegrationCredential(apiKey) && existing) {
42
+ apiKey = trim(existingConfig.apiKey ?? '');
43
+ }
44
+ if (isMaskedIntegrationCredential(apiSecret) && existing) {
45
+ apiSecret = trim(existingConfig.apiSecret ?? '');
46
+ }
47
+ if (!serverUrl) {
48
+ return {
49
+ success: false,
50
+ message: { text: `${I18N}.api-token-dialog.messages.server-url-required` },
51
+ };
52
+ }
53
+ if (!apiKey) {
54
+ return {
55
+ success: false,
56
+ message: { text: `${I18N}.api-token-dialog.messages.api-key-required` },
57
+ };
58
+ }
59
+ if (!apiSecret) {
60
+ return {
61
+ success: false,
62
+ message: { text: `${I18N}.api-token-dialog.messages.api-secret-required` },
63
+ };
64
+ }
65
+ const connection = await this.connectionManager.upsertConnection({
66
+ providerId,
67
+ authMethodType: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,
68
+ connectionScope,
69
+ connectionKey: 'default',
70
+ displayName: trim(form.displayName) || 'LiveKit',
71
+ instanceUrl: serverUrl,
72
+ externalAccountName: serverUrl,
73
+ config: {
74
+ serverUrl,
75
+ apiKey,
76
+ apiSecret,
77
+ },
78
+ status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,
79
+ isRevoked: false,
80
+ isDisabled: false,
81
+ });
82
+ return runtimeCommandSuccessObject({
83
+ outcome: 'connected',
84
+ connection: toSafeIntegrationConnectionDto(connection),
85
+ });
86
+ }
87
+ catch (error) {
88
+ const message = error instanceof Error ? error.message : 'Failed to connect LiveKit.';
89
+ return { success: false, message: { text: message } };
90
+ }
91
+ }
92
+ async openConnectDialog(input) {
93
+ const result = await this.layoutBuilder
94
+ .create()
95
+ .dialog((dialog) => {
96
+ dialog
97
+ .setTitle(input.isReconfigure
98
+ ? `${input.i18nPrefix}.api-token-dialog.configure-title`
99
+ : `${input.i18nPrefix}.api-token-dialog.title`)
100
+ .setSize('md')
101
+ .setCloseButton(true)
102
+ .setContext({
103
+ displayName: input.displayName,
104
+ serverUrl: input.serverUrl,
105
+ apiKey: input.apiKey,
106
+ apiSecret: input.apiSecret,
107
+ })
108
+ .content((flex) => {
109
+ flex
110
+ .setDirection('column')
111
+ .setGap('12px')
112
+ .customWidget('text-block-layout', {
113
+ content: `${input.i18nPrefix}.api-token-dialog.instructions`,
114
+ })
115
+ .formField(`${input.i18nPrefix}.api-token-dialog.fields.display-name`, (field) => {
116
+ field.path('displayName');
117
+ field.textBox({
118
+ placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.display-name`,
119
+ });
120
+ })
121
+ .formField(`${input.i18nPrefix}.api-token-dialog.fields.server-url`, (field) => {
122
+ field.path('serverUrl');
123
+ field.textBox({
124
+ placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.server-url`,
125
+ validations: [{ rule: 'required' }],
126
+ });
127
+ })
128
+ .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-key`, (field) => {
129
+ field.path('apiKey');
130
+ field.passwordBox({
131
+ placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-key`,
132
+ revealToggle: true,
133
+ validations: [{ rule: 'required' }],
134
+ });
135
+ })
136
+ .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-secret`, (field) => {
137
+ field.path('apiSecret');
138
+ field.passwordBox({
139
+ placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-secret`,
140
+ revealToggle: true,
141
+ validations: [{ rule: 'required' }],
142
+ });
143
+ });
144
+ })
145
+ .setActions((actions) => {
146
+ actions
147
+ .cancel('@general:actions.cancel.title')
148
+ .submit(`${input.i18nPrefix}.api-token-dialog.actions.save`);
149
+ })
150
+ .onAction(async (ref) => {
151
+ if (ref.action() === 'cancel') {
152
+ return null;
153
+ }
154
+ const ctx = ref.context();
155
+ const displayName = trim(ctx.displayName ?? '');
156
+ const serverUrl = trim(ctx.serverUrl ?? '');
157
+ const apiKey = trim(ctx.apiKey ?? '');
158
+ const apiSecret = trim(ctx.apiSecret ?? '');
159
+ if (!serverUrl) {
160
+ throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.server-url-required`);
161
+ }
162
+ if (!apiKey) {
163
+ throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.api-key-required`);
164
+ }
165
+ if (!apiSecret) {
166
+ throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.api-secret-required`);
167
+ }
168
+ return { displayName, serverUrl, apiKey, apiSecret };
169
+ });
170
+ })
171
+ .show();
172
+ return resolveLayoutBuilderDialogResult(result);
173
+ }
174
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectLiveKitCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
175
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectLiveKitCommand, providedIn: 'root' }); }
176
+ }
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ConnectLiveKitCommand, decorators: [{
178
+ type: Injectable,
179
+ args: [{ providedIn: 'root' }]
180
+ }] });
181
+
182
+ export { ConnectLiveKitCommand };
183
+ //# sourceMappingURL=acorex-platform-extension-rtc-livekit-client-connect-livekit.command-DnA5yOH-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-rtc-livekit-client-connect-livekit.command-DnA5yOH-.mjs","sources":["../../../../libs/extensions/rtc/livekit/client/src/lib/features/connect/connect-livekit.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CONNECTION_STATUS,\n runtimeCommandSuccessObject,\n type AXPIntegrationConnectionScope,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXMIntegrationConnectionManager,\n AXP_INTEGRATION_CREDENTIAL_MASK,\n hasConfiguredIntegrationCredentials,\n isMaskedIntegrationCredential,\n toSafeIntegrationConnectionDto,\n type ConnectCommandResult,\n} from '@acorex-platform/module-integration-management-client';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n type AXPDialogRef,\n type IActionBuilder,\n type IDialogBuilder,\n type IFlexContainerBuilder,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { Injectable, inject } from '@angular/core';\nimport { trim } from 'lodash-es';\nimport {\n RootConfig,\n type AXELiveKitConnectionConfig,\n} from '@acorex-platform/extension-rtc-livekit-client/contracts';\n\nexport interface ConnectLiveKitCommandInput {\n providerId?: string;\n connectionScope?: AXPIntegrationConnectionScope;\n}\n\ninterface LiveKitConnectFormResult {\n displayName: string;\n serverUrl: string;\n apiKey: string;\n apiSecret: string;\n}\n\n//#region ----- Connect LiveKit -----\n\n@Injectable({ providedIn: 'root' })\nexport class ConnectLiveKitCommand implements AXPCommand<ConnectLiveKitCommandInput, ConnectCommandResult> {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly connectionManager = inject(AXMIntegrationConnectionManager);\n\n async execute(input: ConnectLiveKitCommandInput = {}): AXPCommandExecuteResultPromise<ConnectCommandResult> {\n try {\n const providerId = input.providerId ?? RootConfig.integration.providerId;\n const connectionScope = input.connectionScope ?? 'tenant';\n const I18N = `@${RootConfig.config.i18n}:integration.connect`;\n const existing = await this.connectionManager.findByUniqueKey({\n providerId,\n connectionScope,\n connectionKey: 'default',\n });\n const isReconfigure = hasConfiguredIntegrationCredentials(existing);\n const existingConfig = (existing?.config ?? {}) as AXELiveKitConnectionConfig;\n\n const form = await this.openConnectDialog({\n i18nPrefix: I18N,\n isReconfigure,\n displayName: existing?.displayName ?? 'LiveKit',\n serverUrl: trim(existing?.instanceUrl ?? existingConfig.serverUrl ?? ''),\n apiKey: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',\n apiSecret: isReconfigure ? AXP_INTEGRATION_CREDENTIAL_MASK : '',\n });\n\n if (!form) {\n return runtimeCommandSuccessObject({ outcome: 'cancelled' });\n }\n\n const serverUrl = trim(form.serverUrl);\n let apiKey = trim(form.apiKey);\n let apiSecret = trim(form.apiSecret);\n\n if (isMaskedIntegrationCredential(apiKey) && existing) {\n apiKey = trim(existingConfig.apiKey ?? '');\n }\n if (isMaskedIntegrationCredential(apiSecret) && existing) {\n apiSecret = trim(existingConfig.apiSecret ?? '');\n }\n\n if (!serverUrl) {\n return {\n success: false,\n message: { text: `${I18N}.api-token-dialog.messages.server-url-required` },\n };\n }\n if (!apiKey) {\n return {\n success: false,\n message: { text: `${I18N}.api-token-dialog.messages.api-key-required` },\n };\n }\n if (!apiSecret) {\n return {\n success: false,\n message: { text: `${I18N}.api-token-dialog.messages.api-secret-required` },\n };\n }\n\n const connection = await this.connectionManager.upsertConnection({\n providerId,\n authMethodType: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n connectionScope,\n connectionKey: 'default',\n displayName: trim(form.displayName) || 'LiveKit',\n instanceUrl: serverUrl,\n externalAccountName: serverUrl,\n config: {\n serverUrl,\n apiKey,\n apiSecret,\n } satisfies AXELiveKitConnectionConfig,\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\n isRevoked: false,\n isDisabled: false,\n });\n\n return runtimeCommandSuccessObject({\n outcome: 'connected',\n connection: toSafeIntegrationConnectionDto(connection),\n });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to connect LiveKit.';\n return { success: false, message: { text: message } };\n }\n }\n\n private async openConnectDialog(input: {\n i18nPrefix: string;\n isReconfigure: boolean;\n displayName: string;\n serverUrl: string;\n apiKey: string;\n apiSecret: string;\n }): Promise<LiveKitConnectFormResult | null> {\n const result = await this.layoutBuilder\n .create()\n .dialog<LiveKitConnectFormResult | null>((dialog: IDialogBuilder<LiveKitConnectFormResult | null>) => {\n dialog\n .setTitle(\n input.isReconfigure\n ? `${input.i18nPrefix}.api-token-dialog.configure-title`\n : `${input.i18nPrefix}.api-token-dialog.title`,\n )\n .setSize('md')\n .setCloseButton(true)\n .setContext({\n displayName: input.displayName,\n serverUrl: input.serverUrl,\n apiKey: input.apiKey,\n apiSecret: input.apiSecret,\n })\n .content((flex: IFlexContainerBuilder) => {\n flex\n .setDirection('column')\n .setGap('12px')\n .customWidget('text-block-layout', {\n content: `${input.i18nPrefix}.api-token-dialog.instructions`,\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.display-name`, (field) => {\n field.path('displayName');\n field.textBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.display-name`,\n });\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.server-url`, (field) => {\n field.path('serverUrl');\n field.textBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.server-url`,\n validations: [{ rule: 'required' }],\n });\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-key`, (field) => {\n field.path('apiKey');\n field.passwordBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-key`,\n revealToggle: true,\n validations: [{ rule: 'required' }],\n });\n })\n .formField(`${input.i18nPrefix}.api-token-dialog.fields.api-secret`, (field) => {\n field.path('apiSecret');\n field.passwordBox({\n placeholder: `${input.i18nPrefix}.api-token-dialog.placeholders.api-secret`,\n revealToggle: true,\n validations: [{ rule: 'required' }],\n });\n });\n })\n .setActions((actions: IActionBuilder) => {\n actions\n .cancel('@general:actions.cancel.title')\n .submit(`${input.i18nPrefix}.api-token-dialog.actions.save`);\n })\n .onAction(async (ref: AXPDialogRef) => {\n if (ref.action() === 'cancel') {\n return null;\n }\n const ctx = ref.context() as Partial<LiveKitConnectFormResult>;\n const displayName = trim(ctx.displayName ?? '');\n const serverUrl = trim(ctx.serverUrl ?? '');\n const apiKey = trim(ctx.apiKey ?? '');\n const apiSecret = trim(ctx.apiSecret ?? '');\n\n if (!serverUrl) {\n throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.server-url-required`);\n }\n if (!apiKey) {\n throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.api-key-required`);\n }\n if (!apiSecret) {\n throw new Error(`${input.i18nPrefix}.api-token-dialog.messages.api-secret-required`);\n }\n\n return { displayName, serverUrl, apiKey, apiSecret };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<LiveKitConnectFormResult>(result);\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AA0CA;MAGa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,+BAA+B,CAAC;AAoL7E,IAAA;AAlLC,IAAA,MAAM,OAAO,CAAC,KAAA,GAAoC,EAAE,EAAA;AAClD,QAAA,IAAI;YACF,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,UAAU,CAAC,WAAW,CAAC,UAAU;AACxE,YAAA,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,QAAQ;YACzD,MAAM,IAAI,GAAG,CAAA,CAAA,EAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,oBAAA,CAAsB;YAC7D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC;gBAC5D,UAAU;gBACV,eAAe;AACf,gBAAA,aAAa,EAAE,SAAS;AACzB,aAAA,CAAC;AACF,YAAA,MAAM,aAAa,GAAG,mCAAmC,CAAC,QAAQ,CAAC;YACnE,MAAM,cAAc,IAAI,QAAQ,EAAE,MAAM,IAAI,EAAE,CAA+B;AAE7E,YAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC;AACxC,gBAAA,UAAU,EAAE,IAAI;gBAChB,aAAa;AACb,gB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AI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;gBAE3C,IAAI,CAAC,SAAS,EAAE;oBACd,MAAM,IAAI,KAAK,CAAC,CAAA,EAAG,KAAK,CAAC,UAAU,CAAA,8CAAA,CAAgD,CAAC;gBACtF;gBACA,IAAI,CAAC,MAAM,EAAE;oBACX,MAAM,IAAI,KAAK,CAAC,CAAA,EAAG,KAAK,CAAC,UAAU,CAAA,2CAAA,CAA6C,CAAC;gBACnF;gBACA,IAAI,CAAC,SAAS,EAAE;oBACd,MAAM,IAAI,KAAK,CAAC,CAAA,EAAG,KAAK,CAAC,UAAU,CAAA,8CAAA,CAAgD,CAAC;gBACtF;gBAEA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;AACtD,YAAA,CAAC,CAAC;AACN,QAAA,CAAC;AACA,aAAA,IAAI,EAAE;AAET,QAAA,OAAO,gCAAgC,CAA2B,MAAM,CAAC;IAC3E;8GArLW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -0,0 +1,64 @@
1
+ //#region ----- LiveKit extension config -----
2
+ const config = {
3
+ i18n: 'extensions-livekit',
4
+ };
5
+ const MODULE_NAME = 'LiveKitExtension';
6
+ const RootConfig = {
7
+ config,
8
+ module: {
9
+ name: MODULE_NAME,
10
+ title: `@${config.i18n}:integration.display-name`,
11
+ icon: 'fa-light fa-video',
12
+ },
13
+ integration: {
14
+ providerId: 'livekit',
15
+ },
16
+ };
17
+ //#endregion
18
+
19
+ //#region ----- LiveKit platform env keys -----
20
+ /** Root `.env` / profile overlay keys for platform LiveKit credentials. */
21
+ const AXE_LIVEKIT_ENV_KEYS = {
22
+ Url: 'LIVEKIT_URL',
23
+ ApiKey: 'LIVEKIT_API_KEY',
24
+ ApiSecret: 'LIVEKIT_API_SECRET',
25
+ /** Optional TURN host override when LIVEKIT_URL is localhost (default 127.0.0.1). */
26
+ TurnHost: 'LIVEKIT_TURN_HOST',
27
+ /** When true, production stack includes coturn + LiveKit turn_servers (set false for local dev). */
28
+ TurnEnabled: 'LIVEKIT_TURN_ENABLED',
29
+ /** @deprecated Use LIVEKIT_TURN_ENABLED. */
30
+ DockerRtc: 'LIVEKIT_DOCKER_RTC',
31
+ /** Browser-reachable IP for docker LiveKit/coturn ICE (compose reads root `.env`). */
32
+ NodeIp: 'LIVEKIT_NODE_IP',
33
+ };
34
+ //#endregion
35
+
36
+ //#region ----- LiveKit query keys -----
37
+ const AXELiveKitQueryKeys = {
38
+ IsConfigured: 'LiveKitExtension:Config:IsConfigured',
39
+ };
40
+ //#endregion
41
+
42
+ //#region ----- LiveKit command keys -----
43
+ var AXELiveKitCommandKeys;
44
+ (function (AXELiveKitCommandKeys) {
45
+ AXELiveKitCommandKeys["ConnectionConnect"] = "LiveKitExtension:Command:Connection.Connect";
46
+ })(AXELiveKitCommandKeys || (AXELiveKitCommandKeys = {}));
47
+ //#endregion
48
+
49
+ //#region ----- LiveKit tenant connection config -----
50
+ //#endregion
51
+
52
+ //#region ----- LiveKit extension settings -----
53
+ var AXELiveKitSettingKeys;
54
+ (function (AXELiveKitSettingKeys) {
55
+ AXELiveKitSettingKeys["ConnectionPanel"] = "LiveKitExtension:Setting:ConnectionPanel";
56
+ })(AXELiveKitSettingKeys || (AXELiveKitSettingKeys = {}));
57
+ //#endregion
58
+
59
+ /**
60
+ * Generated bundle index. Do not edit.
61
+ */
62
+
63
+ export { AXELiveKitCommandKeys, AXELiveKitQueryKeys, AXELiveKitSettingKeys, AXE_LIVEKIT_ENV_KEYS, RootConfig };
64
+ //# sourceMappingURL=acorex-platform-extension-rtc-livekit-client-contracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-rtc-livekit-client-contracts.mjs","sources":["../../../../libs/extensions/rtc/livekit/contracts/src/root-config.ts","../../../../libs/extensions/rtc/livekit/contracts/src/env.keys.ts","../../../../libs/extensions/rtc/livekit/contracts/src/query.keys.ts","../../../../libs/extensions/rtc/livekit/contracts/src/commands.keys.ts","../../../../libs/extensions/rtc/livekit/contracts/src/connection.types.ts","../../../../libs/extensions/rtc/livekit/contracts/src/settings.keys.ts","../../../../libs/extensions/rtc/livekit/contracts/src/acorex-platform-extension-rtc-livekit-client-contracts.ts"],"sourcesContent":["//#region ----- LiveKit extension config -----\n\nconst config = {\n i18n: 'extensions-livekit',\n};\n\nconst MODULE_NAME = 'LiveKitExtension';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-video',\n },\n integration: {\n providerId: 'livekit',\n },\n};\n\n//#endregion\n","//#region ----- LiveKit platform env keys -----\n\n/** Root `.env` / profile overlay keys for platform LiveKit credentials. */\nexport const AXE_LIVEKIT_ENV_KEYS = {\n Url: 'LIVEKIT_URL',\n ApiKey: 'LIVEKIT_API_KEY',\n ApiSecret: 'LIVEKIT_API_SECRET',\n /** Optional TURN host override when LIVEKIT_URL is localhost (default 127.0.0.1). */\n TurnHost: 'LIVEKIT_TURN_HOST',\n /** When true, production stack includes coturn + LiveKit turn_servers (set false for local dev). */\n TurnEnabled: 'LIVEKIT_TURN_ENABLED',\n /** @deprecated Use LIVEKIT_TURN_ENABLED. */\n DockerRtc: 'LIVEKIT_DOCKER_RTC',\n /** Browser-reachable IP for docker LiveKit/coturn ICE (compose reads root `.env`). */\n NodeIp: 'LIVEKIT_NODE_IP',\n} as const;\n\nexport type AXELiveKitEnvKey = (typeof AXE_LIVEKIT_ENV_KEYS)[keyof typeof AXE_LIVEKIT_ENV_KEYS];\n\nexport interface AXELiveKitPlatformConfig {\n url: string;\n apiKey: string;\n apiSecret: string;\n}\n\n//#endregion\n","//#region ----- LiveKit query keys -----\n\nexport const AXELiveKitQueryKeys = {\n IsConfigured: 'LiveKitExtension:Config:IsConfigured',\n} as const;\n\n//#endregion\n","//#region ----- LiveKit command keys -----\n\nexport enum AXELiveKitCommandKeys {\n ConnectionConnect = 'LiveKitExtension:Command:Connection.Connect',\n}\n\n//#endregion\n","//#region ----- LiveKit tenant connection config -----\n\n/** Stored on IntegrationManagement connection `config` for server-side token generation. */\nexport interface AXELiveKitConnectionConfig {\n apiKey?: string;\n apiSecret?: string;\n /** Duplicate of `instanceUrl` when stored in config for masked reconfigure flows. */\n serverUrl?: string;\n}\n\n//#endregion\n","//#region ----- LiveKit extension settings -----\n\nexport enum AXELiveKitSettingKeys {\n ConnectionPanel = 'LiveKitExtension:Setting:ConnectionPanel',\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,oBAAoB;CAC3B;AAED,MAAM,WAAW,GAAG,kBAAkB;AAE/B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,yBAAA,CAA2B;AACjD,QAAA,IAAI,EAAE,mBAAmB;AAC1B,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,UAAU,EAAE,SAAS;AACtB,KAAA;;AAGH;;ACpBA;AAEA;AACO,MAAM,oBAAoB,GAAG;AAClC,IAAA,GAAG,EAAE,aAAa;AAClB,IAAA,MAAM,EAAE,iBAAiB;AACzB,IAAA,SAAS,EAAE,oBAAoB;;AAE/B,IAAA,QAAQ,EAAE,mBAAmB;;AAE7B,IAAA,WAAW,EAAE,sBAAsB;;AAEnC,IAAA,SAAS,EAAE,oBAAoB;;AAE/B,IAAA,MAAM,EAAE,iBAAiB;;AAW3B;;ACzBA;AAEO,MAAM,mBAAmB,GAAG;AACjC,IAAA,YAAY,EAAE,sCAAsC;;AAGtD;;ACNA;IAEY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,mBAAA,CAAA,GAAA,6CAAiE;AACnE,CAAC,EAFW,qBAAqB,KAArB,qBAAqB,GAAA,EAAA,CAAA,CAAA;AAIjC;;ACNA;AAUA;;ACVA;IAEY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,iBAAA,CAAA,GAAA,0CAA4D;AAC9D,CAAC,EAFW,qBAAqB,KAArB,qBAAqB,GAAA,EAAA,CAAA,CAAA;AAIjC;;ACNA;;AAEG;;;;"}
@@ -0,0 +1,215 @@
1
+ import { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';
2
+ import { AXP_INTEGRATION_RUNTIME_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_INTEGRATION_PROVIDER } from '@acorex-platform/framework-client/common';
3
+ import { AXP_LOGO_PROVIDER, AXP_MODULE_MANIFEST_PROVIDER } from '@acorex-platform/framework-client/core';
4
+ import { provideCommandSetups } from '@acorex-platform/framework-client/runtime';
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, NgModule } from '@angular/core';
7
+ import { RootConfig, AXELiveKitCommandKeys, AXELiveKitSettingKeys } from '@acorex-platform/extension-rtc-livekit-client/contracts';
8
+ import { AXPWidgetsList, AXP_INTEGRATION_AUTH_METHOD_TYPE, AXP_INTEGRATION_CONNECTION_SCOPE, AXP_INTEGRATION_CONNECTION_STATUS } from '@acorex-platform/framework-shared/core';
9
+ import { AXE_RTC_DOMAIN_ID } from '@acorex-platform/extension-rtc-core-client/contracts';
10
+ import { trim, defaultTo } from 'lodash-es';
11
+
12
+ //#region ---- LiveKit logo registry key ----
13
+ const axpLiveKitLogoKey = 'livekit';
14
+ /** Mark artwork (64×64); consuming apps copy to `assets/images/brand/integrations/`. */
15
+ const AXE_LIVEKIT_MARK_SRC = 'assets/images/brand/integrations/livekit-mark.svg';
16
+ /** Source mark dimensions (64×64). */
17
+ const AXE_LIVEKIT_MARK_ASPECT = 1;
18
+ //#endregion
19
+
20
+ const liveKitLogoProvider = {
21
+ key: axpLiveKitLogoKey,
22
+ resolve: async (request) => ({
23
+ kind: 'image',
24
+ src: AXE_LIVEKIT_MARK_SRC,
25
+ height: request.size,
26
+ width: Math.round(request.size * AXE_LIVEKIT_MARK_ASPECT),
27
+ }),
28
+ };
29
+ const AXE_LIVEKIT_LOGO_PROVIDER = {
30
+ provide: AXP_LOGO_PROVIDER,
31
+ useValue: liveKitLogoProvider,
32
+ multi: true,
33
+ };
34
+
35
+ class AXELiveKitIntegrationProvider {
36
+ async provide(context) {
37
+ const I18N = `@${RootConfig.config.i18n}:integration`;
38
+ context.register({
39
+ id: RootConfig.integration.providerId,
40
+ domainId: AXE_RTC_DOMAIN_ID,
41
+ module: RootConfig.module.name,
42
+ displayName: `${I18N}.display-name`,
43
+ description: `${I18N}.description`,
44
+ icon: RootConfig.module.icon,
45
+ logoKey: axpLiveKitLogoKey,
46
+ connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],
47
+ allowMultipleConnections: false,
48
+ defaultConnectionKey: 'default',
49
+ connectCommandKey: AXELiveKitCommandKeys.ConnectionConnect,
50
+ authMethods: [
51
+ {
52
+ type: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,
53
+ label: `${I18N}.auth.api-token.label`,
54
+ instructions: `${I18N}.auth.api-token.instructions`,
55
+ supportsValidation: true,
56
+ fields: [
57
+ {
58
+ type: AXPWidgetsList.Editors.TextBox,
59
+ path: 'serverUrl',
60
+ options: { placeholder: `${I18N}.auth.api-token.server-url.placeholder` },
61
+ },
62
+ {
63
+ type: AXPWidgetsList.Editors.PasswordBox,
64
+ path: 'apiKey',
65
+ options: { placeholder: `${I18N}.auth.api-token.api-key.placeholder` },
66
+ },
67
+ {
68
+ type: AXPWidgetsList.Editors.PasswordBox,
69
+ path: 'apiSecret',
70
+ options: { placeholder: `${I18N}.auth.api-token.api-secret.placeholder` },
71
+ },
72
+ ],
73
+ },
74
+ ],
75
+ });
76
+ }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
78
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationProvider }); }
79
+ }
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationProvider, decorators: [{
81
+ type: Injectable
82
+ }] });
83
+
84
+ class AXELiveKitIntegrationRuntimeProvider {
85
+ constructor() {
86
+ this.providerId = RootConfig.integration.providerId;
87
+ }
88
+ async getHooks() {
89
+ return {
90
+ validateConnection: (ctx) => this.validateConnection(ctx),
91
+ };
92
+ }
93
+ async validateConnection(ctx) {
94
+ const config = (ctx.config ?? {});
95
+ const serverUrl = trim(defaultTo(ctx.instanceUrl ?? config.serverUrl, ''));
96
+ const apiKey = trim(defaultTo(config.apiKey, ''));
97
+ const apiSecret = trim(defaultTo(config.apiSecret, ''));
98
+ if (!serverUrl || !apiKey || !apiSecret) {
99
+ return {
100
+ valid: false,
101
+ status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,
102
+ errorMessage: '@extensions-livekit:integration.validation.incomplete-credentials',
103
+ };
104
+ }
105
+ return {
106
+ valid: true,
107
+ status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,
108
+ externalAccountName: serverUrl,
109
+ };
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationRuntimeProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationRuntimeProvider }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitIntegrationRuntimeProvider, decorators: [{
115
+ type: Injectable
116
+ }] });
117
+ const provideLiveKitIntegrationRuntimeProvider = {
118
+ provide: AXP_INTEGRATION_RUNTIME_PROVIDER,
119
+ useClass: AXELiveKitIntegrationRuntimeProvider,
120
+ multi: true,
121
+ };
122
+
123
+ const LiveKitExtensionManifest = {
124
+ name: RootConfig.module.name,
125
+ version: '1.0.0',
126
+ title: RootConfig.module.title,
127
+ icon: RootConfig.module.icon,
128
+ i18n: RootConfig.config.i18n,
129
+ type: 'integration',
130
+ domain: 'rtc',
131
+ dependencies: ['RtcExtension'],
132
+ };
133
+
134
+ const INTEGRATIONS_SETTINGS_GROUP = 'integrations';
135
+ const I18N = `@${RootConfig.config.i18n}:settings.tenant-integration`;
136
+ //#region ----- LiveKit settings provider -----
137
+ class AXELiveKitSettingsProvider {
138
+ async provide(context) {
139
+ if (!context.hasGroup(INTEGRATIONS_SETTINGS_GROUP)) {
140
+ return;
141
+ }
142
+ const integrations = context.group(INTEGRATIONS_SETTINGS_GROUP);
143
+ if (!integrations) {
144
+ return;
145
+ }
146
+ integrations
147
+ .addSection('livekit', `${I18N}.section-title`, `${I18N}.section-description`)
148
+ .addSetting({
149
+ key: AXELiveKitSettingKeys.ConnectionPanel,
150
+ title: `${I18N}.connection-title`,
151
+ scope: 'T',
152
+ overridableAt: [],
153
+ isInherited: false,
154
+ widget: {
155
+ type: AXPWidgetsList.Advanced.IntegrationConnectionsPanel,
156
+ layout: { stacked: true },
157
+ options: {
158
+ providerId: RootConfig.integration.providerId,
159
+ connectionScope: 'tenant',
160
+ },
161
+ },
162
+ description: `${I18N}.connection-description`,
163
+ })
164
+ .endSection();
165
+ }
166
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitSettingsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
167
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitSettingsProvider }); }
168
+ }
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitSettingsProvider, decorators: [{
170
+ type: Injectable
171
+ }] });
172
+
173
+ class AXELiveKitExtensionModule {
174
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
175
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitExtensionModule, imports: [AXMIntegrationManagementModule] }); }
176
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitExtensionModule, providers: [
177
+ AXE_LIVEKIT_LOGO_PROVIDER,
178
+ { provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: LiveKitExtensionManifest, multi: true },
179
+ { provide: AXP_SETTING_DEFINITION_PROVIDER, useClass: AXELiveKitSettingsProvider, multi: true },
180
+ { provide: AXP_INTEGRATION_PROVIDER, useClass: AXELiveKitIntegrationProvider, multi: true },
181
+ provideLiveKitIntegrationRuntimeProvider,
182
+ provideCommandSetups([
183
+ {
184
+ key: AXELiveKitCommandKeys.ConnectionConnect,
185
+ command: () => import('./acorex-platform-extension-rtc-livekit-client-connect-livekit.command-DnA5yOH-.mjs').then((c) => c.ConnectLiveKitCommand),
186
+ },
187
+ ]),
188
+ ], imports: [AXMIntegrationManagementModule] }); }
189
+ }
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXELiveKitExtensionModule, decorators: [{
191
+ type: NgModule,
192
+ args: [{
193
+ imports: [AXMIntegrationManagementModule],
194
+ providers: [
195
+ AXE_LIVEKIT_LOGO_PROVIDER,
196
+ { provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: LiveKitExtensionManifest, multi: true },
197
+ { provide: AXP_SETTING_DEFINITION_PROVIDER, useClass: AXELiveKitSettingsProvider, multi: true },
198
+ { provide: AXP_INTEGRATION_PROVIDER, useClass: AXELiveKitIntegrationProvider, multi: true },
199
+ provideLiveKitIntegrationRuntimeProvider,
200
+ provideCommandSetups([
201
+ {
202
+ key: AXELiveKitCommandKeys.ConnectionConnect,
203
+ command: () => import('./acorex-platform-extension-rtc-livekit-client-connect-livekit.command-DnA5yOH-.mjs').then((c) => c.ConnectLiveKitCommand),
204
+ },
205
+ ]),
206
+ ],
207
+ }]
208
+ }] });
209
+
210
+ /**
211
+ * Generated bundle index. Do not edit.
212
+ */
213
+
214
+ export { AXELiveKitExtensionModule, AXE_LIVEKIT_LOGO_PROVIDER, AXE_LIVEKIT_MARK_ASPECT, AXE_LIVEKIT_MARK_SRC, axpLiveKitLogoKey };
215
+ //# sourceMappingURL=acorex-platform-extension-rtc-livekit-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-extension-rtc-livekit-client.mjs","sources":["../../../../libs/extensions/rtc/livekit/client/src/lib/brand/livekit-logo-key.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/brand/livekit-logo.provider.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/integration/livekit.integration.provider.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/integration/livekit.integration-runtime.provider.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/manifest.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/settings/livekit-settings.provider.ts","../../../../libs/extensions/rtc/livekit/client/src/lib/livekit-extension.module.ts","../../../../libs/extensions/rtc/livekit/client/src/acorex-platform-extension-rtc-livekit-client.ts"],"sourcesContent":["//#region ---- LiveKit logo registry key ----\n\nexport const axpLiveKitLogoKey = 'livekit' as const;\n\n/** Mark artwork (64×64); consuming apps copy to `assets/images/brand/integrations/`. */\nexport const AXE_LIVEKIT_MARK_SRC = 'assets/images/brand/integrations/livekit-mark.svg';\n\n/** Source mark dimensions (64×64). */\nexport const AXE_LIVEKIT_MARK_ASPECT = 1;\n\n//#endregion\n","import {\n AXP_LOGO_PROVIDER,\n type AXPLogoProvider,\n type AXPLogoRequest,\n type AXPLogoView,\n} from '@acorex-platform/framework-client/core';\nimport {\n AXE_LIVEKIT_MARK_ASPECT,\n AXE_LIVEKIT_MARK_SRC,\n axpLiveKitLogoKey,\n} from './livekit-logo-key';\n\nconst liveKitLogoProvider: AXPLogoProvider = {\n key: axpLiveKitLogoKey,\n resolve: async (request: AXPLogoRequest): Promise<AXPLogoView> => ({\n kind: 'image',\n src: AXE_LIVEKIT_MARK_SRC,\n height: request.size,\n width: Math.round(request.size * AXE_LIVEKIT_MARK_ASPECT),\n }),\n};\n\nexport const AXE_LIVEKIT_LOGO_PROVIDER = {\n provide: AXP_LOGO_PROVIDER,\n useValue: liveKitLogoProvider,\n multi: true,\n} as const;\n","import {\n AXP_INTEGRATION_AUTH_METHOD_TYPE,\n AXP_INTEGRATION_CONNECTION_SCOPE,\n AXPWidgetsList,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPIntegrationProvider, AXPIntegrationProviderContext } from '@acorex-platform/framework-client/common';\nimport { Injectable } from '@angular/core';\nimport { AXE_RTC_DOMAIN_ID } from '@acorex-platform/extension-rtc-core-client/contracts';\nimport { AXELiveKitCommandKeys, RootConfig } from '@acorex-platform/extension-rtc-livekit-client/contracts';\nimport { axpLiveKitLogoKey } from '../brand/livekit-logo-key';\n\n@Injectable()\nexport class AXELiveKitIntegrationProvider implements AXPIntegrationProvider {\n async provide(context: AXPIntegrationProviderContext): Promise<void> {\n const I18N = `@${RootConfig.config.i18n}:integration`;\n\n context.register({\n id: RootConfig.integration.providerId,\n domainId: AXE_RTC_DOMAIN_ID,\n module: RootConfig.module.name,\n displayName: `${I18N}.display-name`,\n description: `${I18N}.description`,\n icon: RootConfig.module.icon,\n logoKey: axpLiveKitLogoKey,\n connectionScopes: [AXP_INTEGRATION_CONNECTION_SCOPE.Tenant],\n allowMultipleConnections: false,\n defaultConnectionKey: 'default',\n connectCommandKey: AXELiveKitCommandKeys.ConnectionConnect,\n authMethods: [\n {\n type: AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken,\n label: `${I18N}.auth.api-token.label`,\n instructions: `${I18N}.auth.api-token.instructions`,\n supportsValidation: true,\n fields: [\n {\n type: AXPWidgetsList.Editors.TextBox,\n path: 'serverUrl',\n options: { placeholder: `${I18N}.auth.api-token.server-url.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'apiKey',\n options: { placeholder: `${I18N}.auth.api-token.api-key.placeholder` },\n },\n {\n type: AXPWidgetsList.Editors.PasswordBox,\n path: 'apiSecret',\n options: { placeholder: `${I18N}.auth.api-token.api-secret.placeholder` },\n },\n ],\n },\n ],\n });\n }\n}\n","import {\r\n AXP_INTEGRATION_CONNECTION_STATUS,\r\n type AXPIntegrationProviderRuntimeHooks,\r\n type AXPIntegrationRuntimeContext,\r\n type AXPIntegrationValidationResult,\r\n} from '@acorex-platform/framework-shared/core';\r\nimport {\r\n AXP_INTEGRATION_RUNTIME_PROVIDER,\r\n type AXPIntegrationRuntimeProvider,\r\n} from '@acorex-platform/framework-client/common';\r\nimport { Injectable } from '@angular/core';\r\nimport { defaultTo, trim } from 'lodash-es';\r\nimport { RootConfig, type AXELiveKitConnectionConfig } from '@acorex-platform/extension-rtc-livekit-client/contracts';\r\n\r\n@Injectable()\r\nexport class AXELiveKitIntegrationRuntimeProvider implements AXPIntegrationRuntimeProvider {\r\n readonly providerId = RootConfig.integration.providerId;\r\n\r\n async getHooks(): Promise<AXPIntegrationProviderRuntimeHooks> {\r\n return {\r\n validateConnection: (ctx) => this.validateConnection(ctx),\r\n };\r\n }\r\n\r\n private async validateConnection(ctx: AXPIntegrationRuntimeContext): Promise<AXPIntegrationValidationResult> {\r\n const config = (ctx.config ?? {}) as AXELiveKitConnectionConfig;\r\n const serverUrl = trim(defaultTo(ctx.instanceUrl ?? config.serverUrl, ''));\r\n const apiKey = trim(defaultTo(config.apiKey, ''));\r\n const apiSecret = trim(defaultTo(config.apiSecret, ''));\r\n\r\n if (!serverUrl || !apiKey || !apiSecret) {\r\n return {\r\n valid: false,\r\n status: AXP_INTEGRATION_CONNECTION_STATUS.Invalid,\r\n errorMessage: '@extensions-livekit:integration.validation.incomplete-credentials',\r\n };\r\n }\r\n\r\n return {\r\n valid: true,\r\n status: AXP_INTEGRATION_CONNECTION_STATUS.Connected,\r\n externalAccountName: serverUrl,\r\n };\r\n }\r\n}\r\n\r\nexport const provideLiveKitIntegrationRuntimeProvider = {\r\n provide: AXP_INTEGRATION_RUNTIME_PROVIDER,\r\n useClass: AXELiveKitIntegrationRuntimeProvider,\r\n multi: true,\r\n};\r\n","import { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/extension-rtc-livekit-client/contracts';\n\nexport const LiveKitExtensionManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'integration',\n domain: 'rtc',\n dependencies: ['RtcExtension'],\n};\n","import {\n AXPSettingDefinitionProvider,\n AXPSettingDefinitionProviderContext,\n} from '@acorex-platform/framework-client/common';\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport { Injectable } from '@angular/core';\nimport { AXELiveKitSettingKeys, RootConfig } from '@acorex-platform/extension-rtc-livekit-client/contracts';\n\nconst INTEGRATIONS_SETTINGS_GROUP = 'integrations';\nconst I18N = `@${RootConfig.config.i18n}:settings.tenant-integration`;\n\n//#region ----- LiveKit settings provider -----\n\n@Injectable()\nexport class AXELiveKitSettingsProvider implements AXPSettingDefinitionProvider {\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n if (!context.hasGroup(INTEGRATIONS_SETTINGS_GROUP)) {\n return;\n }\n\n const integrations = context.group(INTEGRATIONS_SETTINGS_GROUP);\n if (!integrations) {\n return;\n }\n\n integrations\n .addSection('livekit', `${I18N}.section-title`, `${I18N}.section-description`)\n .addSetting({\n key: AXELiveKitSettingKeys.ConnectionPanel,\n title: `${I18N}.connection-title`,\n scope: 'T',\n overridableAt: [],\n isInherited: false,\n widget: {\n type: AXPWidgetsList.Advanced.IntegrationConnectionsPanel,\n layout: { stacked: true },\n options: {\n providerId: RootConfig.integration.providerId,\n connectionScope: 'tenant',\n },\n },\n description: `${I18N}.connection-description`,\n })\n .endSection();\n }\n}\n\n//#endregion\n","import { AXMIntegrationManagementModule } from '@acorex-platform/module-integration-management-client';\nimport {\n AXP_INTEGRATION_PROVIDER,\n AXP_SETTING_DEFINITION_PROVIDER,\n} from '@acorex-platform/framework-client/common';\nimport { AXP_MODULE_MANIFEST_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { NgModule } from '@angular/core';\nimport { AXELiveKitCommandKeys } from '@acorex-platform/extension-rtc-livekit-client/contracts';\nimport { AXE_LIVEKIT_LOGO_PROVIDER } from './brand/livekit-logo.provider';\nimport { AXELiveKitIntegrationProvider } from './integration/livekit.integration.provider';\nimport { provideLiveKitIntegrationRuntimeProvider } from './integration/livekit.integration-runtime.provider';\nimport { LiveKitExtensionManifest } from './manifest';\nimport { AXELiveKitSettingsProvider } from './settings/livekit-settings.provider';\n\n@NgModule({\n imports: [AXMIntegrationManagementModule],\n providers: [\n AXE_LIVEKIT_LOGO_PROVIDER,\n { provide: AXP_MODULE_MANIFEST_PROVIDER, useValue: LiveKitExtensionManifest, multi: true },\n { provide: AXP_SETTING_DEFINITION_PROVIDER, useClass: AXELiveKitSettingsProvider, multi: true },\n { provide: AXP_INTEGRATION_PROVIDER, useClass: AXELiveKitIntegrationProvider, multi: true },\n provideLiveKitIntegrationRuntimeProvider,\n provideCommandSetups([\n {\n key: AXELiveKitCommandKeys.ConnectionConnect,\n command: () => import('./features/connect/connect-livekit.command').then((c) => c.ConnectLiveKitCommand),\n },\n ]),\n ],\n})\nexport class AXELiveKitExtensionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AAEO,MAAM,iBAAiB,GAAG;AAEjC;AACO,MAAM,oBAAoB,GAAG;AAEpC;AACO,MAAM,uBAAuB,GAAG;AAEvC;;ACEA,MAAM,mBAAmB,GAAoB;AAC3C,IAAA,GAAG,EAAE,iBAAiB;AACtB,IAAA,OAAO,EAAE,OAAO,OAAuB,MAA4B;AACjE,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,GAAG,EAAE,oBAAoB;QACzB,MAAM,EAAE,OAAO,CAAC,IAAI;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,GAAG,uBAAuB,CAAC;KAC1D,CAAC;CACH;AAEM,MAAM,yBAAyB,GAAG;AACvC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,KAAK,EAAE,IAAI;;;MCbA,6BAA6B,CAAA;IACxC,MAAM,OAAO,CAAC,OAAsC,EAAA;QAClD,MAAM,IAAI,GAAG,CAAA,CAAA,EAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,YAAA,CAAc;QAErD,OAAO,CAAC,QAAQ,CAAC;AACf,YAAA,EAAE,EAAE,UAAU,CAAC,WAAW,CAAC,UAAU;AACrC,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,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC;AACzG,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;AC9BD;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/extension-rtc-livekit-client",
3
+ "version": "0.0.21",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-extension-rtc-livekit-client.mjs",
13
+ "typings": "types/acorex-platform-extension-rtc-livekit-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-extension-rtc-livekit-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-extension-rtc-livekit-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-extension-rtc-livekit-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-extension-rtc-livekit-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }
@@ -0,0 +1,57 @@
1
+ declare const RootConfig: {
2
+ config: {
3
+ i18n: string;
4
+ };
5
+ module: {
6
+ name: string;
7
+ title: string;
8
+ icon: string;
9
+ };
10
+ integration: {
11
+ providerId: string;
12
+ };
13
+ };
14
+
15
+ /** Root `.env` / profile overlay keys for platform LiveKit credentials. */
16
+ declare const AXE_LIVEKIT_ENV_KEYS: {
17
+ readonly Url: "LIVEKIT_URL";
18
+ readonly ApiKey: "LIVEKIT_API_KEY";
19
+ readonly ApiSecret: "LIVEKIT_API_SECRET";
20
+ /** Optional TURN host override when LIVEKIT_URL is localhost (default 127.0.0.1). */
21
+ readonly TurnHost: "LIVEKIT_TURN_HOST";
22
+ /** When true, production stack includes coturn + LiveKit turn_servers (set false for local dev). */
23
+ readonly TurnEnabled: "LIVEKIT_TURN_ENABLED";
24
+ /** @deprecated Use LIVEKIT_TURN_ENABLED. */
25
+ readonly DockerRtc: "LIVEKIT_DOCKER_RTC";
26
+ /** Browser-reachable IP for docker LiveKit/coturn ICE (compose reads root `.env`). */
27
+ readonly NodeIp: "LIVEKIT_NODE_IP";
28
+ };
29
+ type AXELiveKitEnvKey = (typeof AXE_LIVEKIT_ENV_KEYS)[keyof typeof AXE_LIVEKIT_ENV_KEYS];
30
+ interface AXELiveKitPlatformConfig {
31
+ url: string;
32
+ apiKey: string;
33
+ apiSecret: string;
34
+ }
35
+
36
+ declare const AXELiveKitQueryKeys: {
37
+ readonly IsConfigured: "LiveKitExtension:Config:IsConfigured";
38
+ };
39
+
40
+ declare enum AXELiveKitCommandKeys {
41
+ ConnectionConnect = "LiveKitExtension:Command:Connection.Connect"
42
+ }
43
+
44
+ /** Stored on IntegrationManagement connection `config` for server-side token generation. */
45
+ interface AXELiveKitConnectionConfig {
46
+ apiKey?: string;
47
+ apiSecret?: string;
48
+ /** Duplicate of `instanceUrl` when stored in config for masked reconfigure flows. */
49
+ serverUrl?: string;
50
+ }
51
+
52
+ declare enum AXELiveKitSettingKeys {
53
+ ConnectionPanel = "LiveKitExtension:Setting:ConnectionPanel"
54
+ }
55
+
56
+ export { AXELiveKitCommandKeys, AXELiveKitQueryKeys, AXELiveKitSettingKeys, AXE_LIVEKIT_ENV_KEYS, RootConfig };
57
+ export type { AXELiveKitConnectionConfig, AXELiveKitEnvKey, AXELiveKitPlatformConfig };
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@acorex-platform/module-integration-management-client';
3
+ import { AXPLogoProvider } from '@acorex-platform/framework-client/core';
4
+
5
+ declare class AXELiveKitExtensionModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXELiveKitExtensionModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXELiveKitExtensionModule, never, [typeof i1.AXMIntegrationManagementModule], never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXELiveKitExtensionModule>;
9
+ }
10
+
11
+ declare const axpLiveKitLogoKey: "livekit";
12
+ /** Mark artwork (64×64); consuming apps copy to `assets/images/brand/integrations/`. */
13
+ declare const AXE_LIVEKIT_MARK_SRC = "assets/images/brand/integrations/livekit-mark.svg";
14
+ /** Source mark dimensions (64×64). */
15
+ declare const AXE_LIVEKIT_MARK_ASPECT = 1;
16
+
17
+ declare const AXE_LIVEKIT_LOGO_PROVIDER: {
18
+ readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
19
+ readonly useValue: AXPLogoProvider;
20
+ readonly multi: true;
21
+ };
22
+
23
+ export { AXELiveKitExtensionModule, AXE_LIVEKIT_LOGO_PROVIDER, AXE_LIVEKIT_MARK_ASPECT, AXE_LIVEKIT_MARK_SRC, axpLiveKitLogoKey };