@progalaxyelabs/ngx-stonescriptphp-client 1.16.0 → 1.17.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/index.d.ts
CHANGED
|
@@ -109,13 +109,6 @@ declare class MyEnvironmentModel {
|
|
|
109
109
|
* Used for multi-tenant authentication.
|
|
110
110
|
*/
|
|
111
111
|
platformCode: string;
|
|
112
|
-
/**
|
|
113
|
-
* Platform's own API base URL.
|
|
114
|
-
* Used for routes that go through the platform API proxy (e.g. register-tenant).
|
|
115
|
-
* Falls back to apiServer.host if not set.
|
|
116
|
-
* @example '//api.medstoreapp.in'
|
|
117
|
-
*/
|
|
118
|
-
apiUrl?: string;
|
|
119
112
|
apiServer: {
|
|
120
113
|
host: string;
|
|
121
114
|
};
|
|
@@ -127,6 +120,14 @@ declare class MyEnvironmentModel {
|
|
|
127
120
|
filesServer?: {
|
|
128
121
|
host: string;
|
|
129
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Chat service server configuration.
|
|
125
|
+
* Used by Angular portals to establish authenticated WebSocket connections.
|
|
126
|
+
* @example { host: 'wss://chat.progalaxyelabs.com' }
|
|
127
|
+
*/
|
|
128
|
+
chatServer?: {
|
|
129
|
+
host: string;
|
|
130
|
+
};
|
|
130
131
|
/**
|
|
131
132
|
* Authentication configuration.
|
|
132
133
|
* @default { mode: 'cookie', refreshEndpoint: '/auth/refresh', useCsrf: true }
|
|
@@ -226,15 +227,6 @@ interface TenantMembership {
|
|
|
226
227
|
status: string;
|
|
227
228
|
last_accessed?: string;
|
|
228
229
|
}
|
|
229
|
-
interface RegisterTenantData {
|
|
230
|
-
tenantName: string;
|
|
231
|
-
displayName?: string;
|
|
232
|
-
email?: string;
|
|
233
|
-
password?: string;
|
|
234
|
-
provider: string;
|
|
235
|
-
role?: string;
|
|
236
|
-
countryCode?: string;
|
|
237
|
-
}
|
|
238
230
|
/**
|
|
239
231
|
* Auth plugin interface — implement this to support any auth backend.
|
|
240
232
|
*
|
|
@@ -293,8 +285,6 @@ interface AuthPlugin {
|
|
|
293
285
|
selectTenant?(tenantId: string, accessToken: string): Promise<AuthResult>;
|
|
294
286
|
/** List tenant memberships for the authenticated user */
|
|
295
287
|
getTenantMemberships?(accessToken: string): Promise<TenantMembership[]>;
|
|
296
|
-
/** Register a new tenant (organization) */
|
|
297
|
-
registerTenant?(data: RegisterTenantData): Promise<AuthResult>;
|
|
298
288
|
/** Check if a tenant slug is available */
|
|
299
289
|
checkTenantSlugAvailable?(slug: string): Promise<{
|
|
300
290
|
available: boolean;
|
|
@@ -302,15 +292,11 @@ interface AuthPlugin {
|
|
|
302
292
|
}>;
|
|
303
293
|
/** Check onboarding status for a user identity */
|
|
304
294
|
checkOnboardingStatus?(identityId: string, platformCode?: string): Promise<any>;
|
|
305
|
-
/** Complete tenant onboarding (create tenant with country + org name) */
|
|
306
|
-
completeTenantOnboarding?(countryCode: string, tenantName: string, accessToken: string): Promise<any>;
|
|
307
295
|
/** Check if user email exists */
|
|
308
296
|
checkEmail?(email: string): Promise<{
|
|
309
297
|
exists: boolean;
|
|
310
298
|
user?: any;
|
|
311
299
|
}>;
|
|
312
|
-
/** Provision a new tenant for an authenticated user (post-onboarding) */
|
|
313
|
-
provisionTenant?(storeName: string, countryCode: string, accessToken: string): Promise<any>;
|
|
314
300
|
switchServer?(serverName: string): void;
|
|
315
301
|
getAvailableServers?(): string[];
|
|
316
302
|
getActiveServer?(): string | null;
|
|
@@ -374,11 +360,6 @@ interface StoneScriptPHPAuthConfig {
|
|
|
374
360
|
* Defaults: mode='cookie', refreshEndpoint='/auth/refresh', useCsrf=true
|
|
375
361
|
*/
|
|
376
362
|
auth?: Pick<AuthConfig, 'mode' | 'refreshEndpoint' | 'useCsrf' | 'csrfTokenCookieName' | 'csrfHeaderName'>;
|
|
377
|
-
/**
|
|
378
|
-
* Platform's own API URL for register-tenant proxy route.
|
|
379
|
-
* Falls back to host if not set.
|
|
380
|
-
*/
|
|
381
|
-
apiUrl?: string;
|
|
382
363
|
}
|
|
383
364
|
/**
|
|
384
365
|
* Built-in auth plugin for StoneScriptPHP backends.
|
|
@@ -409,7 +390,6 @@ declare class StoneScriptPHPAuth implements AuthPlugin {
|
|
|
409
390
|
private hashUUID;
|
|
410
391
|
private getCsrfToken;
|
|
411
392
|
private getAccountsUrl;
|
|
412
|
-
private getPlatformApiUrl;
|
|
413
393
|
private getDefaultServer;
|
|
414
394
|
private restoreActiveServer;
|
|
415
395
|
switchServer(serverName: string): void;
|
|
@@ -426,15 +406,11 @@ declare class StoneScriptPHPAuth implements AuthPlugin {
|
|
|
426
406
|
loginWithProvider(provider: string): Promise<AuthResult>;
|
|
427
407
|
selectTenant(tenantId: string, accessToken: string): Promise<AuthResult>;
|
|
428
408
|
getTenantMemberships(accessToken: string): Promise<TenantMembership[]>;
|
|
429
|
-
registerTenant(data: RegisterTenantData): Promise<AuthResult>;
|
|
430
|
-
private registerTenantWithOAuth;
|
|
431
409
|
checkTenantSlugAvailable(slug: string): Promise<{
|
|
432
410
|
available: boolean;
|
|
433
411
|
suggestion?: string;
|
|
434
412
|
}>;
|
|
435
413
|
checkOnboardingStatus(identityId: string, platformCode?: string): Promise<any>;
|
|
436
|
-
completeTenantOnboarding(countryCode: string, tenantName: string, accessToken: string): Promise<any>;
|
|
437
|
-
provisionTenant(storeName: string, countryCode: string, accessToken: string): Promise<any>;
|
|
438
414
|
checkEmail(email: string): Promise<{
|
|
439
415
|
exists: boolean;
|
|
440
416
|
user?: any;
|
|
@@ -549,15 +525,6 @@ declare class AuthService {
|
|
|
549
525
|
refresh(): Promise<boolean>;
|
|
550
526
|
isAuthenticated(): boolean;
|
|
551
527
|
getCurrentUser(): User | null;
|
|
552
|
-
registerTenant(data: {
|
|
553
|
-
tenantName: string;
|
|
554
|
-
displayName?: string;
|
|
555
|
-
email?: string;
|
|
556
|
-
password?: string;
|
|
557
|
-
provider: AuthProvider;
|
|
558
|
-
role?: string;
|
|
559
|
-
countryCode?: string;
|
|
560
|
-
}): Promise<AuthResult>;
|
|
561
528
|
getTenantMemberships(serverName?: string): Promise<{
|
|
562
529
|
memberships: TenantMembership[];
|
|
563
530
|
}>;
|
|
@@ -571,8 +538,6 @@ declare class AuthService {
|
|
|
571
538
|
suggestion?: string;
|
|
572
539
|
}>;
|
|
573
540
|
checkOnboardingStatus(identityId: string, serverName?: string): Promise<any>;
|
|
574
|
-
provisionTenant(storeName: string, countryCode?: string): Promise<any>;
|
|
575
|
-
completeTenantOnboarding(countryCode: string, tenantName: string, serverName?: string): Promise<any>;
|
|
576
541
|
getAvailableAuthServers(): string[];
|
|
577
542
|
getActiveAuthServer(): string | null;
|
|
578
543
|
switchAuthServer(serverName: string): void;
|
|
@@ -999,6 +964,14 @@ interface TenantCreatedEvent {
|
|
|
999
964
|
display_name: string;
|
|
1000
965
|
};
|
|
1001
966
|
}
|
|
967
|
+
interface TenantRegisterRequestEvent {
|
|
968
|
+
tenantName: string;
|
|
969
|
+
tenantSlug: string;
|
|
970
|
+
displayName?: string;
|
|
971
|
+
email?: string;
|
|
972
|
+
password?: string;
|
|
973
|
+
provider: string;
|
|
974
|
+
}
|
|
1002
975
|
declare class TenantRegisterComponent implements OnInit {
|
|
1003
976
|
private auth;
|
|
1004
977
|
private providerRegistry;
|
|
@@ -1020,6 +993,7 @@ declare class TenantRegisterComponent implements OnInit {
|
|
|
1020
993
|
loginLinkText: string;
|
|
1021
994
|
loginLinkAction: string;
|
|
1022
995
|
tenantCreated: EventEmitter<TenantCreatedEvent>;
|
|
996
|
+
registerRequested: EventEmitter<TenantRegisterRequestEvent>;
|
|
1023
997
|
navigateToLogin: EventEmitter<void>;
|
|
1024
998
|
tenantName: string;
|
|
1025
999
|
tenantSlug: string;
|
|
@@ -1049,11 +1023,19 @@ declare class TenantRegisterComponent implements OnInit {
|
|
|
1049
1023
|
checkSlugAvailability(): Promise<void>;
|
|
1050
1024
|
toggleAuthMethod(event: Event): void;
|
|
1051
1025
|
isFormValid(): boolean;
|
|
1052
|
-
onOAuthRegister(provider: AuthProvider):
|
|
1053
|
-
onRegister():
|
|
1026
|
+
onOAuthRegister(provider: AuthProvider): void;
|
|
1027
|
+
onRegister(): void;
|
|
1028
|
+
/** Call from consuming component after handling registerRequested to show loading state */
|
|
1029
|
+
setLoading(loading: boolean, text?: string): void;
|
|
1030
|
+
/** Call from consuming component to show success/error after handling registerRequested */
|
|
1031
|
+
setResult(result: {
|
|
1032
|
+
success: boolean;
|
|
1033
|
+
message?: string;
|
|
1034
|
+
user?: any;
|
|
1035
|
+
}): void;
|
|
1054
1036
|
onLoginClick(event: Event): void;
|
|
1055
1037
|
static ɵfac: i0.ɵɵFactoryDeclaration<TenantRegisterComponent, never>;
|
|
1056
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TenantRegisterComponent, "lib-tenant-register", never, { "title": { "alias": "title"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "requireTenantName": { "alias": "requireTenantName"; "required": false; }; "tenantSectionTitle": { "alias": "tenantSectionTitle"; "required": false; }; "tenantNameLabel": { "alias": "tenantNameLabel"; "required": false; }; "tenantNamePlaceholder": { "alias": "tenantNamePlaceholder"; "required": false; }; "tenantSlugLabel": { "alias": "tenantSlugLabel"; "required": false; }; "tenantSlugPlaceholder": { "alias": "tenantSlugPlaceholder"; "required": false; }; "urlPreviewEnabled": { "alias": "urlPreviewEnabled"; "required": false; }; "urlPreviewPrefix": { "alias": "urlPreviewPrefix"; "required": false; }; "userSectionTitle": { "alias": "userSectionTitle"; "required": false; }; "oauthDescription": { "alias": "oauthDescription"; "required": false; }; "ownershipTitle": { "alias": "ownershipTitle"; "required": false; }; "ownershipMessage": { "alias": "ownershipMessage"; "required": false; }; "submitButtonText": { "alias": "submitButtonText"; "required": false; }; "loginLinkText": { "alias": "loginLinkText"; "required": false; }; "loginLinkAction": { "alias": "loginLinkAction"; "required": false; }; }, { "tenantCreated": "tenantCreated"; "navigateToLogin": "navigateToLogin"; }, never, never, true, never>;
|
|
1038
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TenantRegisterComponent, "lib-tenant-register", never, { "title": { "alias": "title"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "requireTenantName": { "alias": "requireTenantName"; "required": false; }; "tenantSectionTitle": { "alias": "tenantSectionTitle"; "required": false; }; "tenantNameLabel": { "alias": "tenantNameLabel"; "required": false; }; "tenantNamePlaceholder": { "alias": "tenantNamePlaceholder"; "required": false; }; "tenantSlugLabel": { "alias": "tenantSlugLabel"; "required": false; }; "tenantSlugPlaceholder": { "alias": "tenantSlugPlaceholder"; "required": false; }; "urlPreviewEnabled": { "alias": "urlPreviewEnabled"; "required": false; }; "urlPreviewPrefix": { "alias": "urlPreviewPrefix"; "required": false; }; "userSectionTitle": { "alias": "userSectionTitle"; "required": false; }; "oauthDescription": { "alias": "oauthDescription"; "required": false; }; "ownershipTitle": { "alias": "ownershipTitle"; "required": false; }; "ownershipMessage": { "alias": "ownershipMessage"; "required": false; }; "submitButtonText": { "alias": "submitButtonText"; "required": false; }; "loginLinkText": { "alias": "loginLinkText"; "required": false; }; "loginLinkAction": { "alias": "loginLinkAction"; "required": false; }; }, { "tenantCreated": "tenantCreated"; "registerRequested": "registerRequested"; "navigateToLogin": "navigateToLogin"; }, never, never, true, never>;
|
|
1057
1039
|
}
|
|
1058
1040
|
|
|
1059
1041
|
/**
|
|
@@ -1133,4 +1115,4 @@ declare class TenantRegisterDialogComponent {
|
|
|
1133
1115
|
}
|
|
1134
1116
|
|
|
1135
1117
|
export { AUTH_PLUGIN, ApiConnectionService, ApiResponse, AuthPageComponent, AuthService, CsrfService, DbService, FilesService, LoginDialogComponent, MyEnvironmentModel, ProviderRegistryService, RegisterComponent, SigninStatusService, StoneScriptPHPAuth, TenantLoginComponent, TenantLoginDialogComponent, TenantRegisterComponent, TenantRegisterDialogComponent, TokenService, VerifyStatus, provideNgxStoneScriptPhpClient };
|
|
1136
|
-
export type { AuthConfig, AuthMode, AuthPlugin, AuthProvider, AuthResponseMap, AuthResult, AuthServerConfig, BuiltInProvider, FileDeleteResponse, FileListResponse, FileMetadata, FileUploadResponse, FileUploadResult, OAuthProviderConfig, OnboardingNeededEvent,
|
|
1118
|
+
export type { AuthConfig, AuthMode, AuthPlugin, AuthProvider, AuthResponseMap, AuthResult, AuthServerConfig, BuiltInProvider, FileDeleteResponse, FileListResponse, FileMetadata, FileUploadResponse, FileUploadResult, OAuthProviderConfig, OnboardingNeededEvent, StoneScriptPHPAuthConfig, TenantCreatedEvent, TenantMembership, TenantRegisterRequestEvent, TenantSelectedEvent, User };
|