@progalaxyelabs/ngx-stonescriptphp-client 1.14.0 → 1.16.0
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
|
@@ -185,8 +185,8 @@ declare class MyEnvironmentModel {
|
|
|
185
185
|
|
|
186
186
|
declare const AUTH_PLUGIN: InjectionToken<AuthPlugin>;
|
|
187
187
|
interface User {
|
|
188
|
-
user_id
|
|
189
|
-
id
|
|
188
|
+
user_id?: number;
|
|
189
|
+
id?: string;
|
|
190
190
|
email: string;
|
|
191
191
|
display_name: string;
|
|
192
192
|
photo_url?: string;
|
|
@@ -201,6 +201,22 @@ interface AuthResult {
|
|
|
201
201
|
/** Set by the plugin for body mode — AuthService stores it in TokenService */
|
|
202
202
|
refreshToken?: string;
|
|
203
203
|
needsVerification?: boolean;
|
|
204
|
+
/** Membership returned directly by the login response (avoids extra API call) */
|
|
205
|
+
membership?: TenantMembership;
|
|
206
|
+
/** True when the user is new (has identity but no tenant membership) */
|
|
207
|
+
isNewIdentity?: boolean;
|
|
208
|
+
/** Auth method used (e.g., 'oauth', 'emailPassword') */
|
|
209
|
+
authMethod?: string;
|
|
210
|
+
/** OAuth provider used (e.g., 'google') */
|
|
211
|
+
oauthProvider?: string;
|
|
212
|
+
/** Identity info for new users (used with isNewIdentity) */
|
|
213
|
+
identity?: {
|
|
214
|
+
email: string;
|
|
215
|
+
display_name?: string;
|
|
216
|
+
picture?: string;
|
|
217
|
+
};
|
|
218
|
+
/** Multiple tenant memberships for tenant selection flow */
|
|
219
|
+
memberships?: TenantMembership[];
|
|
204
220
|
}
|
|
205
221
|
interface TenantMembership {
|
|
206
222
|
tenant_id: string;
|
|
@@ -293,6 +309,8 @@ interface AuthPlugin {
|
|
|
293
309
|
exists: boolean;
|
|
294
310
|
user?: any;
|
|
295
311
|
}>;
|
|
312
|
+
/** Provision a new tenant for an authenticated user (post-onboarding) */
|
|
313
|
+
provisionTenant?(storeName: string, countryCode: string, accessToken: string): Promise<any>;
|
|
296
314
|
switchServer?(serverName: string): void;
|
|
297
315
|
getAvailableServers?(): string[];
|
|
298
316
|
getActiveServer?(): string | null;
|
|
@@ -385,6 +403,7 @@ declare class StoneScriptPHPAuth implements AuthPlugin {
|
|
|
385
403
|
private resolveAccessToken;
|
|
386
404
|
private resolveRefreshToken;
|
|
387
405
|
private resolveUser;
|
|
406
|
+
private resolveMembership;
|
|
388
407
|
private resolveErrorMessage;
|
|
389
408
|
private normalizeUser;
|
|
390
409
|
private hashUUID;
|
|
@@ -415,6 +434,7 @@ declare class StoneScriptPHPAuth implements AuthPlugin {
|
|
|
415
434
|
}>;
|
|
416
435
|
checkOnboardingStatus(identityId: string, platformCode?: string): Promise<any>;
|
|
417
436
|
completeTenantOnboarding(countryCode: string, tenantName: string, accessToken: string): Promise<any>;
|
|
437
|
+
provisionTenant(storeName: string, countryCode: string, accessToken: string): Promise<any>;
|
|
418
438
|
checkEmail(email: string): Promise<{
|
|
419
439
|
exists: boolean;
|
|
420
440
|
user?: any;
|
|
@@ -551,6 +571,7 @@ declare class AuthService {
|
|
|
551
571
|
suggestion?: string;
|
|
552
572
|
}>;
|
|
553
573
|
checkOnboardingStatus(identityId: string, serverName?: string): Promise<any>;
|
|
574
|
+
provisionTenant(storeName: string, countryCode?: string): Promise<any>;
|
|
554
575
|
completeTenantOnboarding(countryCode: string, tenantName: string, serverName?: string): Promise<any>;
|
|
555
576
|
getAvailableAuthServers(): string[];
|
|
556
577
|
getActiveAuthServer(): string | null;
|
|
@@ -836,6 +857,16 @@ interface TenantSelectedEvent {
|
|
|
836
857
|
tenantSlug: string;
|
|
837
858
|
role: string;
|
|
838
859
|
}
|
|
860
|
+
interface OnboardingNeededEvent {
|
|
861
|
+
auth_method: string;
|
|
862
|
+
oauth_provider?: string;
|
|
863
|
+
is_new_identity: boolean;
|
|
864
|
+
identity: {
|
|
865
|
+
email: string;
|
|
866
|
+
display_name?: string;
|
|
867
|
+
picture?: string;
|
|
868
|
+
};
|
|
869
|
+
}
|
|
839
870
|
declare class TenantLoginComponent implements OnInit {
|
|
840
871
|
private auth;
|
|
841
872
|
private providerRegistry;
|
|
@@ -853,6 +884,7 @@ declare class TenantLoginComponent implements OnInit {
|
|
|
853
884
|
createTenantLinkText: string;
|
|
854
885
|
createTenantLinkAction: string;
|
|
855
886
|
tenantSelected: EventEmitter<TenantSelectedEvent>;
|
|
887
|
+
needsOnboarding: EventEmitter<OnboardingNeededEvent>;
|
|
856
888
|
createTenant: EventEmitter<void>;
|
|
857
889
|
email: string;
|
|
858
890
|
password: string;
|
|
@@ -875,7 +907,7 @@ declare class TenantLoginComponent implements OnInit {
|
|
|
875
907
|
toggleAuthMethod(event: Event): void;
|
|
876
908
|
onEmailLogin(): Promise<void>;
|
|
877
909
|
onOAuthLogin(provider: AuthProvider): Promise<void>;
|
|
878
|
-
handlePostAuthFlow(): Promise<void>;
|
|
910
|
+
handlePostAuthFlow(loginResult?: AuthResult): Promise<void>;
|
|
879
911
|
selectTenantItem(tenantId: string): void;
|
|
880
912
|
onContinueWithTenant(): Promise<void>;
|
|
881
913
|
selectAndContinue(membership: TenantMembership): Promise<void>;
|
|
@@ -883,7 +915,7 @@ declare class TenantLoginComponent implements OnInit {
|
|
|
883
915
|
formatLastAccessed(dateStr: string): string;
|
|
884
916
|
onCreateTenantClick(event: Event): void;
|
|
885
917
|
static ɵfac: i0.ɵɵFactoryDeclaration<TenantLoginComponent, never>;
|
|
886
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TenantLoginComponent, "lib-tenant-login", never, { "title": { "alias": "title"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "showTenantSelector": { "alias": "showTenantSelector"; "required": false; }; "autoSelectSingleTenant": { "alias": "autoSelectSingleTenant"; "required": false; }; "prefillEmail": { "alias": "prefillEmail"; "required": false; }; "allowTenantCreation": { "alias": "allowTenantCreation"; "required": false; }; "tenantSelectorTitle": { "alias": "tenantSelectorTitle"; "required": false; }; "tenantSelectorDescription": { "alias": "tenantSelectorDescription"; "required": false; }; "continueButtonText": { "alias": "continueButtonText"; "required": false; }; "registerLinkText": { "alias": "registerLinkText"; "required": false; }; "registerLinkAction": { "alias": "registerLinkAction"; "required": false; }; "createTenantLinkText": { "alias": "createTenantLinkText"; "required": false; }; "createTenantLinkAction": { "alias": "createTenantLinkAction"; "required": false; }; }, { "tenantSelected": "tenantSelected"; "createTenant": "createTenant"; }, never, never, true, never>;
|
|
918
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TenantLoginComponent, "lib-tenant-login", never, { "title": { "alias": "title"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "showTenantSelector": { "alias": "showTenantSelector"; "required": false; }; "autoSelectSingleTenant": { "alias": "autoSelectSingleTenant"; "required": false; }; "prefillEmail": { "alias": "prefillEmail"; "required": false; }; "allowTenantCreation": { "alias": "allowTenantCreation"; "required": false; }; "tenantSelectorTitle": { "alias": "tenantSelectorTitle"; "required": false; }; "tenantSelectorDescription": { "alias": "tenantSelectorDescription"; "required": false; }; "continueButtonText": { "alias": "continueButtonText"; "required": false; }; "registerLinkText": { "alias": "registerLinkText"; "required": false; }; "registerLinkAction": { "alias": "registerLinkAction"; "required": false; }; "createTenantLinkText": { "alias": "createTenantLinkText"; "required": false; }; "createTenantLinkAction": { "alias": "createTenantLinkAction"; "required": false; }; }, { "tenantSelected": "tenantSelected"; "needsOnboarding": "needsOnboarding"; "createTenant": "createTenant"; }, never, never, true, never>;
|
|
887
919
|
}
|
|
888
920
|
|
|
889
921
|
declare class AuthPageComponent implements OnInit {
|
|
@@ -962,7 +994,7 @@ declare class RegisterComponent {
|
|
|
962
994
|
|
|
963
995
|
interface TenantCreatedEvent {
|
|
964
996
|
user: {
|
|
965
|
-
id
|
|
997
|
+
id?: string;
|
|
966
998
|
email: string;
|
|
967
999
|
display_name: string;
|
|
968
1000
|
};
|
|
@@ -1101,4 +1133,4 @@ declare class TenantRegisterDialogComponent {
|
|
|
1101
1133
|
}
|
|
1102
1134
|
|
|
1103
1135
|
export { AUTH_PLUGIN, ApiConnectionService, ApiResponse, AuthPageComponent, AuthService, CsrfService, DbService, FilesService, LoginDialogComponent, MyEnvironmentModel, ProviderRegistryService, RegisterComponent, SigninStatusService, StoneScriptPHPAuth, TenantLoginComponent, TenantLoginDialogComponent, TenantRegisterComponent, TenantRegisterDialogComponent, TokenService, VerifyStatus, provideNgxStoneScriptPhpClient };
|
|
1104
|
-
export type { AuthConfig, AuthMode, AuthPlugin, AuthProvider, AuthResponseMap, AuthResult, AuthServerConfig, BuiltInProvider, FileDeleteResponse, FileListResponse, FileMetadata, FileUploadResponse, FileUploadResult, OAuthProviderConfig, RegisterTenantData, StoneScriptPHPAuthConfig, TenantCreatedEvent, TenantMembership, TenantSelectedEvent, User };
|
|
1136
|
+
export type { AuthConfig, AuthMode, AuthPlugin, AuthProvider, AuthResponseMap, AuthResult, AuthServerConfig, BuiltInProvider, FileDeleteResponse, FileListResponse, FileMetadata, FileUploadResponse, FileUploadResult, OAuthProviderConfig, OnboardingNeededEvent, RegisterTenantData, StoneScriptPHPAuthConfig, TenantCreatedEvent, TenantMembership, TenantSelectedEvent, User };
|