@acorex/connectivity 20.2.0-next.0 → 20.2.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
1
+ import { AXM_AUTH_CONFIG_TOKEN } from '@acorex/modules/auth';
2
+ import { PkceUtil } from '@acorex/platform/auth';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, Injectable, NgModule } from '@angular/core';
5
+ import { CommonModule } from '@angular/common';
6
+
7
+ class AXCExternalAuthorizationService {
8
+ constructor() {
9
+ this.configs = inject(AXM_AUTH_CONFIG_TOKEN);
10
+ }
11
+ async signin(providerName) {
12
+ // Get provider configuration (optional, for validation)
13
+ const providerConfig = this.configs?.externalProviders?.[providerName];
14
+ if (!providerConfig) {
15
+ throw new Error(`Provider '${providerName}' is not configured`);
16
+ }
17
+ // Get application configuration for OIDC
18
+ const clientId = this.configs?.authConfig?.clientId || 'spa-client';
19
+ const redirectUri = encodeURIComponent(`${window.location.origin}/auth/axp-oauth-callback`);
20
+ const authorizeUrl = `${this.configs?.authConfig?.issuer}/connect/authorize`;
21
+ // Centralized PKCE code verifier logic
22
+ const codeVerifier = PkceUtil.generateRandomString(128);
23
+ localStorage.setItem('pkce_code_verifier', codeVerifier);
24
+ const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);
25
+ // Build the authorization URL according to the required format
26
+ const authUrl = `${authorizeUrl}` +
27
+ `?response_type=code` +
28
+ `&client_id=${clientId}` +
29
+ `&redirect_uri=${redirectUri}` +
30
+ `&scope=openid profile email` +
31
+ `&code_challenge=${codeChallenge}` +
32
+ `&code_challenge_method=S256` +
33
+ `&prompt=login` +
34
+ `&acr_values=${providerName}`;
35
+ console.log('Redirecting to:', authUrl);
36
+ // Use window.location.assign to redirect
37
+ window.location.assign(authUrl);
38
+ }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCExternalAuthorizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
40
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCExternalAuthorizationService }); }
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCExternalAuthorizationService, decorators: [{
43
+ type: Injectable
44
+ }] });
45
+
46
+ class AXCUtilsModule {
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
48
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: AXCUtilsModule, imports: [CommonModule] }); }
49
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCUtilsModule, providers: [AXCExternalAuthorizationService], imports: [CommonModule] }); }
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AXCUtilsModule, decorators: [{
52
+ type: NgModule,
53
+ args: [{
54
+ imports: [CommonModule],
55
+ providers: [AXCExternalAuthorizationService],
56
+ }]
57
+ }] });
58
+
59
+ /**
60
+ * Generated bundle index. Do not edit.
61
+ */
62
+
63
+ export { AXCExternalAuthorizationService, AXCUtilsModule };
64
+ //# sourceMappingURL=acorex-connectivity-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-connectivity-utils.mjs","sources":["../tmp-esm2022/utils/lib/external-authorization.service.js","../tmp-esm2022/utils/lib/utils.module.js","../tmp-esm2022/utils/acorex-connectivity-utils.js"],"sourcesContent":["import { AXM_AUTH_CONFIG_TOKEN } from '@acorex/modules/auth';\nimport { PkceUtil } from '@acorex/platform/auth';\nimport { inject, Injectable } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class AXCExternalAuthorizationService {\n constructor() {\n this.configs = inject(AXM_AUTH_CONFIG_TOKEN);\n }\n async signin(providerName) {\n // Get provider configuration (optional, for validation)\n const providerConfig = this.configs?.externalProviders?.[providerName];\n if (!providerConfig) {\n throw new Error(`Provider '${providerName}' is not configured`);\n }\n // Get application configuration for OIDC\n const clientId = this.configs?.authConfig?.clientId || 'spa-client';\n const redirectUri = encodeURIComponent(`${window.location.origin}/auth/axp-oauth-callback`);\n const authorizeUrl = `${this.configs?.authConfig?.issuer}/connect/authorize`;\n // Centralized PKCE code verifier logic\n const codeVerifier = PkceUtil.generateRandomString(128);\n localStorage.setItem('pkce_code_verifier', codeVerifier);\n const codeChallenge = await PkceUtil.generateCodeChallenge(codeVerifier);\n // Build the authorization URL according to the required format\n const authUrl = `${authorizeUrl}` +\n `?response_type=code` +\n `&client_id=${clientId}` +\n `&redirect_uri=${redirectUri}` +\n `&scope=openid profile email` +\n `&code_challenge=${codeChallenge}` +\n `&code_challenge_method=S256` +\n `&prompt=login` +\n `&acr_values=${providerName}`;\n console.log('Redirecting to:', authUrl);\n // Use window.location.assign to redirect\n window.location.assign(authUrl);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCExternalAuthorizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCExternalAuthorizationService }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCExternalAuthorizationService, decorators: [{\n type: Injectable\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZXJuYWwtYXV0aG9yaXphdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4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JpbmcoMTI4KTtcbiAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgncGtjZV9jb2RlX3ZlcmlmaWVyJywgY29kZVZlcmlmaWVyKTtcbiAgICBjb25zdCBjb2RlQ2hhbGxlbmdlID0gYXdhaXQgUGtjZVV0aWwuZ2VuZXJhdGVDb2RlQ2hhbGxlbmdlKGNvZGVWZXJpZmllcik7XG5cbiAgICAvLyBCdWlsZCB0aGUgYXV0aG9yaXphdGlvbiBVUkwgYWNjb3JkaW5nIHRvIHRoZSByZXF1aXJlZCBmb3JtYXRcbiAgICBjb25zdCBhdXRoVXJsID1cbiAgICAgIGAke2F1dGhvcml6ZVVybH1gICtcbiAgICAgIGA/cmVzcG9uc2VfdHlwZT1jb2RlYCArXG4gICAgICBgJmNsaWVudF9pZD0ke2NsaWVudElkfWAgK1xuICAgICAgYCZyZWRpcmVjdF91cmk9JHtyZWRpcmVjdFVyaX1gICtcbiAgICAgIGAmc2NvcGU9b3BlbmlkIHByb2ZpbGUgZW1haWxgICtcbiAgICAgIGAmY29kZV9jaGFsbGVuZ2U9JHtjb2RlQ2hhbGxlbmdlfWAgK1xuICAgICAgYCZjb2RlX2NoYWxsZW5nZV9tZXRob2Q9UzI1NmAgK1xuICAgICAgYCZwcm9tcHQ9bG9naW5gICtcbiAgICAgIGAmYWNyX3ZhbHVlcz0ke3Byb3ZpZGVyTmFtZX1gO1xuXG4gICAgY29uc29sZS5sb2coJ1JlZGlyZWN0aW5nIHRvOicsIGF1dGhVcmwpO1xuXG4gICAgLy8gVXNlIHdpbmRvdy5sb2NhdGlvbi5hc3NpZ24gdG8gcmVkaXJlY3RcbiAgICB3aW5kb3cubG9jYXRpb24uYXNzaWduKGF1dGhVcmwpO1xuICB9XG59XG4iXX0=","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXCExternalAuthorizationService } from './external-authorization.service';\nimport * as i0 from \"@angular/core\";\nexport class AXCUtilsModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCUtilsModule, imports: [CommonModule] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCUtilsModule, providers: [AXCExternalAuthorizationService], imports: [CommonModule] }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: AXCUtilsModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n providers: [AXCExternalAuthorizationService],\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb25uZWN0aXZpdHkvdXRpbHMvc3JjL2xpYi91dGlscy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLCtCQUErQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7O0FBTW5GLE1BQU0sT0FBTyxjQUFjOzhHQUFkLGNBQWM7K0dBQWQsY0FBYyxZQUhmLFlBQVk7K0dBR1gsY0FBYyxhQUZkLENBQUMsK0JBQStCLENBQUMsWUFEbEMsWUFBWTs7MkZBR1gsY0FBYztrQkFKMUIsUUFBUTttQkFBQztvQkFDUixPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7b0JBQ3ZCLFNBQVMsRUFBRSxDQUFDLCtCQUErQixDQUFDO2lCQUM3QyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgQVhDRXh0ZXJuYWxBdXRob3JpemF0aW9uU2VydmljZSB9IGZyb20gJy4vZXh0ZXJuYWwtYXV0aG9yaXphdGlvbi5zZXJ2aWNlJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZV0sXG4gIHByb3ZpZGVyczogW0FYQ0V4dGVybmFsQXV0aG9yaXphdGlvblNlcnZpY2VdLFxufSlcbmV4cG9ydCBjbGFzcyBBWENVdGlsc01vZHVsZSB7fVxuIl19","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvbm5lY3Rpdml0eS11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29ubmVjdGl2aXR5L3V0aWxzL3NyYy9hY29yZXgtY29ubmVjdGl2aXR5LXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19"],"names":[],"mappings":";;;;;;AAIO,MAAM,+BAA+B,CAAC;AAC7C,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACpD;AACA,IAAI,M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AAY,CAAC,EAAE,CAAC,CAAC;AAC1J,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,mBAAmB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,+BAA+B,CAAC,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AACxM;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;AACxH,YAAY,IAAI,EAAE,QAAQ;AAC1B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,OAAO,EAAE,CAAC,YAAY,CAAC;AAC3C,oBAAoB,SAAS,EAAE,CAAC,+BAA+B,CAAC;AAChE,iBAAiB;AACjB,SAAS,CAAC,EAAE,CAAC;;ACfb;AACA;AACA;;;;"}
package/mock/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { AXPDataSeeder, AXPEntityStorageService, AXPEntityDefinitionRegistryService } from '@acorex/platform/layout/entity';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injector } from '@angular/core';
4
- import { AXPLockService, AXPLockRequest, AXPLockInfo, AXPUnLockRequest, AXPLockGetInfoRequest, AXPReportCategory, AXPReportDefinition, AXPExecutionReportCommand, AXPLayoutExecutionContext, AXPExecutionReportCommandResult } from '@acorex/platform/common';
4
+ import { AXPLockService, AXPLockRequest, AXPLockInfo, AXPUnLockRequest, AXPLockGetInfoRequest, AXPFileStorageService, AXPFileStorageCreateRequest, AXPFileStorageInfo, AXPFileStorageUpdateRequest, AXPFileStorageFindRequest, AXPReportCategory, AXPReportDefinition, AXPExecutionReportCommand, AXPLayoutExecutionContext, AXPExecutionReportCommandResult } from '@acorex/platform/common';
5
5
  import { AXMCommonDashboardEntityModel } from '@acorex/modules/dashboard-management';
6
6
  import Dexie from 'dexie';
7
- import * as i1$1 from '@acorex/platform/auth';
8
- import { AXPSessionService, AXPBaseCredentials, AXPAuthStrategy, AXPSignInResult, AXPSessionContext, AXPRefreshTokenResult } from '@acorex/platform/auth';
7
+ import * as _acorex_platform_auth from '@acorex/platform/auth';
8
+ import { AXPSessionService, AXPAuthStrategy, AXPBaseCredentials, AXPSessionContext, AXPSignInResult } from '@acorex/platform/auth';
9
9
  import { AXPQueryRequest, AXPPagedListResult, AXPAppStartUpService } from '@acorex/platform/core';
10
+ import { AXMAuthConfigs } from '@acorex/modules/auth';
11
+ import { Router } from '@angular/router';
10
12
  import * as i1 from '@acorex/platform/runtime';
11
13
  import { AXMTextTemplateManagementTemplateEntityModel } from '@acorex/modules/text-template-management';
12
14
 
@@ -140,6 +142,23 @@ declare class AXCLockService implements AXPLockService {
140
142
  static ɵprov: i0.ɵɵInjectableDeclaration<AXCLockService>;
141
143
  }
142
144
 
145
+ declare class AXCFileStorageService implements AXPFileStorageService {
146
+ private fileService;
147
+ private mapToFileStorageInfo;
148
+ save(request: AXPFileStorageCreateRequest): Promise<AXPFileStorageInfo>;
149
+ commit(fileId: string): Promise<void>;
150
+ markForDeletion(fileId: string): Promise<void>;
151
+ update(request: AXPFileStorageUpdateRequest): Promise<AXPFileStorageInfo>;
152
+ find(request: AXPFileStorageFindRequest): Promise<AXPFileStorageInfo[]>;
153
+ getInfo(fileId: string): Promise<AXPFileStorageInfo>;
154
+ remove(fileId: string): Promise<void>;
155
+ private cleanupTemporaryFiles;
156
+ private cleanupMarkedFiles;
157
+ constructor();
158
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCFileStorageService, never>;
159
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCFileStorageService>;
160
+ }
161
+
143
162
  declare class AXCContactManagementMockModule {
144
163
  static ɵfac: i0.ɵɵFactoryDeclaration<AXCContactManagementMockModule, never>;
145
164
  static ɵmod: i0.ɵɵNgModuleDeclaration<AXCContactManagementMockModule, never, never, never>;
@@ -158,6 +177,7 @@ declare class AXPMessageDataSeeder implements AXPDataSeeder {
158
177
  private storageService;
159
178
  private chatService;
160
179
  private commentService;
180
+ private realtimeService;
161
181
  private aiResponderService;
162
182
  private usersService;
163
183
  private sessionService;
@@ -261,6 +281,24 @@ declare class AXCLogManagementMockModule {
261
281
  static ɵinj: i0.ɵɵInjectorDeclaration<AXCLogManagementMockModule>;
262
282
  }
263
283
 
284
+ declare class MOCKGoogleStrategy extends AXPAuthStrategy {
285
+ tenantLoader: _acorex_platform_auth.AXPTenantLoader;
286
+ protected configs: AXMAuthConfigs;
287
+ private externalAuthorizationService;
288
+ applicationLoader: _acorex_platform_auth.AXPApplicationLoader;
289
+ router: Router;
290
+ constructor();
291
+ get name(): string;
292
+ signin(credentials: AXPBaseCredentials): Promise<void>;
293
+ signout(): Promise<void>;
294
+ refreshToken(context: AXPSessionContext): Promise<AXPSignInResult>;
295
+ updateToken(params: {
296
+ [key: string]: any;
297
+ }): Promise<AXPSignInResult>;
298
+ static ɵfac: i0.ɵɵFactoryDeclaration<MOCKGoogleStrategy, never>;
299
+ static ɵprov: i0.ɵɵInjectableDeclaration<MOCKGoogleStrategy>;
300
+ }
301
+
264
302
  declare class AXCFOrganizationManagementMockModule {
265
303
  static ɵfac: i0.ɵɵFactoryDeclaration<AXCFOrganizationManagementMockModule, never>;
266
304
  static ɵmod: i0.ɵɵNgModuleDeclaration<AXCFOrganizationManagementMockModule, never, never, never>;
@@ -297,12 +335,6 @@ declare class AXCSchedulerJobManagementMockModule {
297
335
  static ɵinj: i0.ɵɵInjectorDeclaration<AXCSchedulerJobManagementMockModule>;
298
336
  }
299
337
 
300
- declare class AXCNotificationManagementMockModule {
301
- static ɵfac: i0.ɵɵFactoryDeclaration<AXCNotificationManagementMockModule, never>;
302
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXCNotificationManagementMockModule, never, never, never>;
303
- static ɵinj: i0.ɵɵInjectorDeclaration<AXCNotificationManagementMockModule>;
304
- }
305
-
306
338
  declare class AXCTrainingManagementMockModule {
307
339
  static ɵfac: i0.ɵɵFactoryDeclaration<AXCTrainingManagementMockModule, never>;
308
340
  static ɵmod: i0.ɵɵNgModuleDeclaration<AXCTrainingManagementMockModule, never, never, never>;
@@ -321,10 +353,16 @@ declare class AXMCalendarManagementMockModule {
321
353
  static ɵinj: i0.ɵɵInjectorDeclaration<AXMCalendarManagementMockModule>;
322
354
  }
323
355
 
356
+ declare class AXCNotificationManagementMockModule {
357
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCNotificationManagementMockModule, never>;
358
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXCNotificationManagementMockModule, never, never, never>;
359
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXCNotificationManagementMockModule>;
360
+ }
361
+
324
362
  declare class AXCMockModule {
325
363
  constructor(appInitService: AXPAppStartUpService, injector: Injector);
326
364
  static ɵfac: i0.ɵɵFactoryDeclaration<AXCMockModule, never>;
327
- static ɵmod: i0.ɵɵNgModuleDeclaration<AXCMockModule, never, [typeof i1$1.AXPAuthModule, typeof AXCCommonMockModule, typeof AXCFormTemplateManagementMockModule, typeof AXCFOrganizationManagementMockModule, typeof AXCReportManagementMockModule, typeof AXCContactManagementMockModule, typeof AXCDashboardManagementMockModule, typeof AXCConversationMockModule, typeof AXCAuthMockModule, typeof AXCPlatformManagementMockModule, typeof AXCTextTemplateManagementMockModule, typeof AXCSecurityManagementMockModule, typeof AXCSchedulerJobManagementMockModule, typeof AXCNotificationManagementMockModule, typeof AXCApplicationManagementMockModule, typeof AXCTrainingManagementMockModule, typeof AXCProjectManagementMockModule, typeof AXCDocumentManagementMockModule, typeof AXCIssueManagementMockModule, typeof AXCLogManagementMockModule, typeof AXMCalendarManagementMockModule, typeof AXCDataManagementMockModule], never>;
365
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXCMockModule, never, [typeof _acorex_platform_auth.AXPAuthModule, typeof AXCCommonMockModule, typeof AXCFormTemplateManagementMockModule, typeof AXCFOrganizationManagementMockModule, typeof AXCReportManagementMockModule, typeof AXCContactManagementMockModule, typeof AXCDashboardManagementMockModule, typeof AXCConversationMockModule, typeof AXCAuthMockModule, typeof AXCPlatformManagementMockModule, typeof AXCTextTemplateManagementMockModule, typeof AXCSecurityManagementMockModule, typeof AXCSchedulerJobManagementMockModule, typeof AXCApplicationManagementMockModule, typeof AXCTrainingManagementMockModule, typeof AXCProjectManagementMockModule, typeof AXCDocumentManagementMockModule, typeof AXCIssueManagementMockModule, typeof AXCLogManagementMockModule, typeof AXMCalendarManagementMockModule, typeof AXCDataManagementMockModule, typeof AXCNotificationManagementMockModule], never>;
328
366
  static ɵinj: i0.ɵɵInjectorDeclaration<AXCMockModule>;
329
367
  }
330
368
 
@@ -332,17 +370,59 @@ interface MockUserPassCredentials extends AXPBaseCredentials {
332
370
  username: string;
333
371
  password: string;
334
372
  }
335
- declare class MOCKStrategy implements AXPAuthStrategy {
373
+ declare class MOCKStrategy extends AXPAuthStrategy {
374
+ tenantLoader: _acorex_platform_auth.AXPTenantLoader;
375
+ applicationLoader: _acorex_platform_auth.AXPApplicationLoader;
376
+ router: Router;
336
377
  constructor();
337
378
  private entityRegistery;
338
379
  get name(): string;
339
380
  signin(credentials: MockUserPassCredentials): Promise<AXPSignInResult>;
340
381
  signout(): Promise<void>;
341
- refreshToken(context: AXPSessionContext): Promise<AXPRefreshTokenResult>;
382
+ refreshToken(context: AXPSessionContext): Promise<AXPSignInResult>;
383
+ updateToken(params: {
384
+ [key: string]: any;
385
+ }): Promise<AXPSignInResult>;
342
386
  static ɵfac: i0.ɵɵFactoryDeclaration<MOCKStrategy, never>;
343
387
  static ɵprov: i0.ɵɵInjectableDeclaration<MOCKStrategy>;
344
388
  }
345
389
 
390
+ declare class AXCAppTermDataSeeder implements AXPDataSeeder {
391
+ private storageService;
392
+ seed(): Promise<void>;
393
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCAppTermDataSeeder, never>;
394
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCAppTermDataSeeder>;
395
+ }
396
+
397
+ declare class AXCAppVersionDataSeeder implements AXPDataSeeder {
398
+ private storageService;
399
+ seed(): Promise<void>;
400
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCAppVersionDataSeeder, never>;
401
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCAppVersionDataSeeder>;
402
+ }
403
+
404
+ declare class AXCGlobalVariablesDataSeeder implements AXPDataSeeder {
405
+ private storageService;
406
+ seed(): Promise<void>;
407
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCGlobalVariablesDataSeeder, never>;
408
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCGlobalVariablesDataSeeder>;
409
+ }
410
+
411
+ declare const GLOBAL_VARIABLES: {
412
+ id: string;
413
+ name: string;
414
+ title: string;
415
+ dataType: string;
416
+ value: string;
417
+ }[];
418
+
419
+ declare class AXCMetaDataDefinitionDataSeeder implements AXPDataSeeder {
420
+ private storageService;
421
+ seed(): Promise<void>;
422
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCMetaDataDefinitionDataSeeder, never>;
423
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCMetaDataDefinitionDataSeeder>;
424
+ }
425
+
346
426
  declare const REPORT_CATEGORIES: AXPReportCategory[];
347
427
  declare const REPORT_DEFINITIONS: AXPReportDefinition[];
348
428
  declare const CATEGORY_REPORT_MAPPING: Map<string, AXPReportDefinition[]>;
@@ -428,5 +508,5 @@ declare const TEXT_TEMPLATE_CATEGORY: {
428
508
  }[];
429
509
  declare const TEXT_TEMPLATES: AXMTextTemplateManagementTemplateEntityModel[];
430
510
 
431
- export { APPLICATIONS, APPLICATIONS_MODULES, AXCApplicationManagementMockModule, AXCApplicationTemplateDataSeeder, AXCAuthMockModule, AXCCommonMockModule, AXCContactManagementMockModule, AXCConversationMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDocumentManagementMockModule, AXCFOrganizationManagementMockModule, AXCFormTemplateManagementMockModule, AXCIssueManagementMockModule, AXCLockService, AXCLogManagementMockModule, AXCMockModule, AXCNotificationManagementMockModule, AXCProjectManagementMockModule, AXCReportManagementMockModule, AXCSchedulerJobDataSeeder, AXCSchedulerJobManagementMockModule, AXCSecurityManagementMockModule, AXCTextTemplateCategoryDataSeeder, AXCTextTemplateDataSeeder, AXCTextTemplateManagementMockModule, AXCTrainingManagementMockModule, AXMAiResponderService, AXMReportExecuteCommand, AXPDashboardDataSeeder, AXPDexieEntityStorageService, AXPMessageDataSeeder, AXPReportManagementDataSeeder, AXPRoomDataSeeder, AXPSecurityManagementRoleDataSeeder, AXPSecurityManagementUserDataSeeder, CATEGORY_REPORT_MAPPING, DASHBOARDS, EDITIONS, ENTITIES, FEATURES, MOCKStrategy, MODULES, PERMISSIONS, PROPERTIES, REPORT_CATEGORIES, REPORT_DEFINITIONS, TEXT_TEMPLATES, TEXT_TEMPLATE_CATEGORY, generateRandomDashboard };
511
+ export { APPLICATIONS, APPLICATIONS_MODULES, AXCAppTermDataSeeder, AXCAppVersionDataSeeder, AXCApplicationManagementMockModule, AXCApplicationTemplateDataSeeder, AXCAuthMockModule, AXCCommonMockModule, AXCContactManagementMockModule, AXCConversationMockModule, AXCDashboardManagementMockModule, AXCDataManagementMockModule, AXCDocumentManagementMockModule, AXCFOrganizationManagementMockModule, AXCFileStorageService, AXCFormTemplateManagementMockModule, AXCGlobalVariablesDataSeeder, AXCIssueManagementMockModule, AXCLockService, AXCLogManagementMockModule, AXCMetaDataDefinitionDataSeeder, AXCMockModule, AXCNotificationManagementMockModule, AXCPlatformManagementMockModule, AXCProjectManagementMockModule, AXCReportManagementMockModule, AXCSchedulerJobDataSeeder, AXCSchedulerJobManagementMockModule, AXCSecurityManagementMockModule, AXCTextTemplateCategoryDataSeeder, AXCTextTemplateDataSeeder, AXCTextTemplateManagementMockModule, AXCTrainingManagementMockModule, AXMAiResponderService, AXMReportExecuteCommand, AXPDashboardDataSeeder, AXPDexieEntityStorageService, AXPMessageDataSeeder, AXPReportManagementDataSeeder, AXPRoomDataSeeder, AXPSecurityManagementRoleDataSeeder, AXPSecurityManagementUserDataSeeder, CATEGORY_REPORT_MAPPING, DASHBOARDS, EDITIONS, ENTITIES, FEATURES, GLOBAL_VARIABLES, MOCKGoogleStrategy, MOCKStrategy, MODULES, PERMISSIONS, PROPERTIES, REPORT_CATEGORIES, REPORT_DEFINITIONS, TEXT_TEMPLATES, TEXT_TEMPLATE_CATEGORY, generateRandomDashboard };
432
512
  export type { MockUserPassCredentials };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/connectivity",
3
- "version": "20.2.0-next.0",
3
+ "version": "20.2.0-next.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
@@ -16,13 +16,17 @@
16
16
  "types": "./index.d.ts",
17
17
  "default": "./fesm2022/acorex-connectivity.mjs"
18
18
  },
19
- "./api": {
20
- "types": "./api/index.d.ts",
21
- "default": "./fesm2022/acorex-connectivity-api.mjs"
22
- },
23
19
  "./mock": {
24
20
  "types": "./mock/index.d.ts",
25
21
  "default": "./fesm2022/acorex-connectivity-mock.mjs"
22
+ },
23
+ "./utils": {
24
+ "types": "./utils/index.d.ts",
25
+ "default": "./fesm2022/acorex-connectivity-utils.mjs"
26
+ },
27
+ "./api": {
28
+ "types": "./api/index.d.ts",
29
+ "default": "./fesm2022/acorex-connectivity-api.mjs"
26
30
  }
27
31
  },
28
32
  "dependencies": {
@@ -0,0 +1,3 @@
1
+ # @acorex/connectivity/utils
2
+
3
+ Secondary entry point of `@acorex/connectivity`. It can be used by importing from `@acorex/connectivity/utils`.
@@ -0,0 +1,17 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@angular/common';
3
+
4
+ declare class AXCExternalAuthorizationService {
5
+ private configs;
6
+ signin(providerName: string): Promise<void>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCExternalAuthorizationService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCExternalAuthorizationService>;
9
+ }
10
+
11
+ declare class AXCUtilsModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCUtilsModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXCUtilsModule, never, [typeof i1.CommonModule], never>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXCUtilsModule>;
15
+ }
16
+
17
+ export { AXCExternalAuthorizationService, AXCUtilsModule };