@23blocks/block-authentication 6.3.5 → 6.4.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/dist/index.esm.js +120 -120
- package/dist/src/lib/services/api-keys.service.d.ts +11 -8
- package/dist/src/lib/services/api-keys.service.d.ts.map +1 -1
- package/dist/src/lib/services/apps.service.d.ts +12 -12
- package/dist/src/lib/services/apps.service.d.ts.map +1 -1
- package/dist/src/lib/services/auth.service.d.ts +70 -20
- package/dist/src/lib/services/auth.service.d.ts.map +1 -1
- package/dist/src/lib/services/avatars.service.d.ts +23 -9
- package/dist/src/lib/services/avatars.service.d.ts.map +1 -1
- package/dist/src/lib/services/geography.service.d.ts +14 -14
- package/dist/src/lib/services/geography.service.d.ts.map +1 -1
- package/dist/src/lib/services/guests.service.d.ts +17 -17
- package/dist/src/lib/services/guests.service.d.ts.map +1 -1
- package/dist/src/lib/services/jwks.service.d.ts +1 -1
- package/dist/src/lib/services/mfa.service.d.ts +19 -6
- package/dist/src/lib/services/mfa.service.d.ts.map +1 -1
- package/dist/src/lib/services/oauth.service.d.ts +30 -11
- package/dist/src/lib/services/oauth.service.d.ts.map +1 -1
- package/dist/src/lib/services/oidc.service.d.ts +1 -1
- package/dist/src/lib/services/permissions.service.d.ts +4 -4
- package/dist/src/lib/services/permissions.service.d.ts.map +1 -1
- package/dist/src/lib/services/roles.service.d.ts +9 -9
- package/dist/src/lib/services/roles.service.d.ts.map +1 -1
- package/dist/src/lib/services/subscriptions.service.d.ts +10 -10
- package/dist/src/lib/services/subscriptions.service.d.ts.map +1 -1
- package/dist/src/lib/services/tenants.service.d.ts +1 -1
- package/dist/src/lib/services/users.service.d.ts +111 -44
- package/dist/src/lib/services/users.service.d.ts.map +1 -1
- package/dist/src/lib/types/auth.d.ts +22 -3
- package/dist/src/lib/types/auth.d.ts.map +1 -1
- package/dist/src/lib/types/user.d.ts +27 -2
- package/dist/src/lib/types/user.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,9 @@ export interface AppsService {
|
|
|
10
10
|
*/
|
|
11
11
|
list(params?: ListParams): Promise<PageResult<App>>;
|
|
12
12
|
/**
|
|
13
|
-
* Get an app by ID
|
|
13
|
+
* Get an app by unique ID
|
|
14
14
|
*/
|
|
15
|
-
get(
|
|
15
|
+
get(uniqueId: string): Promise<App>;
|
|
16
16
|
/**
|
|
17
17
|
* Create a new app
|
|
18
18
|
*/
|
|
@@ -20,15 +20,15 @@ export interface AppsService {
|
|
|
20
20
|
/**
|
|
21
21
|
* Update an app
|
|
22
22
|
*/
|
|
23
|
-
update(
|
|
23
|
+
update(uniqueId: string, request: UpdateAppRequest): Promise<App>;
|
|
24
24
|
/**
|
|
25
25
|
* Delete an app
|
|
26
26
|
*/
|
|
27
|
-
delete(
|
|
27
|
+
delete(uniqueId: string): Promise<void>;
|
|
28
28
|
/**
|
|
29
29
|
* Regenerate webhook secret
|
|
30
30
|
*/
|
|
31
|
-
regenerateWebhookSecret(
|
|
31
|
+
regenerateWebhookSecret(uniqueId: string): Promise<App>;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Blocks service interface
|
|
@@ -37,19 +37,19 @@ export interface BlocksService {
|
|
|
37
37
|
/**
|
|
38
38
|
* List blocks for a company
|
|
39
39
|
*/
|
|
40
|
-
list(
|
|
40
|
+
list(companyUniqueId: string, params?: ListParams): Promise<PageResult<Block>>;
|
|
41
41
|
/**
|
|
42
|
-
* Get a block by ID
|
|
42
|
+
* Get a block by unique ID
|
|
43
43
|
*/
|
|
44
|
-
get(
|
|
44
|
+
get(uniqueId: string): Promise<Block>;
|
|
45
45
|
/**
|
|
46
46
|
* Add a block to a company
|
|
47
47
|
*/
|
|
48
|
-
add(
|
|
48
|
+
add(companyUniqueId: string, blockCode: string): Promise<Block>;
|
|
49
49
|
/**
|
|
50
50
|
* Remove a block from a company
|
|
51
51
|
*/
|
|
52
|
-
remove(
|
|
52
|
+
remove(uniqueId: string): Promise<void>;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Services registry service interface
|
|
@@ -60,9 +60,9 @@ export interface ServicesRegistryService {
|
|
|
60
60
|
*/
|
|
61
61
|
list(params?: ListParams): Promise<PageResult<Service>>;
|
|
62
62
|
/**
|
|
63
|
-
* Get a service by ID
|
|
63
|
+
* Get a service by unique ID
|
|
64
64
|
*/
|
|
65
|
-
get(
|
|
65
|
+
get(uniqueId: string): Promise<Service>;
|
|
66
66
|
/**
|
|
67
67
|
* Get a service by code
|
|
68
68
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/apps.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAEpD;;OAEG;IACH,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"apps.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/apps.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEjG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;GAE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C,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACnC;AAqCD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,WAAW,CAiEb;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,aAAa,CA8Bf;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,uBAAuB,CA2BzB"}
|
|
@@ -2,83 +2,133 @@ import type { Transport } from '@23blocks/contracts';
|
|
|
2
2
|
import type { SignInRequest, SignInResponse, SignUpRequest, SignUpResponse, PasswordResetRequest, PasswordUpdateRequest, TokenValidationResponse, RefreshTokenRequest, RefreshTokenResponse, MagicLinkRequest, MagicLinkVerifyRequest, InvitationRequest, AcceptInvitationRequest, ResendConfirmationRequest, ValidateEmailRequest, ValidateEmailResponse, ValidateDocumentRequest, ValidateDocumentResponse, ResendInvitationRequest, AccountRecoveryRequest, AccountRecoveryResponse, CompleteRecoveryRequest, User } from '../types/index.js';
|
|
3
3
|
import type { AuthenticationBlockConfig } from '../authentication.block.js';
|
|
4
4
|
/**
|
|
5
|
-
* Authentication service
|
|
5
|
+
* Authentication service - handles sign in, sign up, sign out, password management,
|
|
6
|
+
* magic links, invitations, email confirmation, and account recovery.
|
|
6
7
|
*/
|
|
7
8
|
export interface AuthService {
|
|
8
9
|
/**
|
|
9
|
-
* Sign in with email and password
|
|
10
|
+
* Sign in with email and password.
|
|
11
|
+
*
|
|
12
|
+
* @returns SignInResponse containing `user` (with role/avatar/profile if included),
|
|
13
|
+
* `accessToken`, optional `refreshToken`, `tokenType`, and `expiresIn`.
|
|
14
|
+
* @example
|
|
15
|
+
* const { user, accessToken } = await auth.auth.signIn({
|
|
16
|
+
* email: 'user@example.com',
|
|
17
|
+
* password: 'password',
|
|
18
|
+
* });
|
|
10
19
|
*/
|
|
11
20
|
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
12
21
|
/**
|
|
13
|
-
* Sign up a new user
|
|
22
|
+
* Sign up a new user.
|
|
23
|
+
*
|
|
24
|
+
* @returns SignUpResponse containing `user`, optional `accessToken` (may be absent
|
|
25
|
+
* if email confirmation is required), and optional `message`.
|
|
26
|
+
* @note If email confirmation is enabled, `accessToken` will be undefined until confirmed.
|
|
14
27
|
*/
|
|
15
28
|
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
16
29
|
/**
|
|
17
|
-
* Sign out the current user
|
|
30
|
+
* Sign out the current user. Invalidates the current session server-side.
|
|
18
31
|
*/
|
|
19
32
|
signOut(): Promise<void>;
|
|
20
33
|
/**
|
|
21
|
-
* Validate the current token and get user info
|
|
34
|
+
* Validate the current token and get basic user info.
|
|
35
|
+
*
|
|
36
|
+
* @returns TokenValidationResponse with `user` (without relationships) and `valid: true`.
|
|
37
|
+
* @note Unlike `getCurrentUser()`, this does NOT include role, avatar, or profile relationships.
|
|
38
|
+
* Use this for lightweight token checks; use `getCurrentUser()` for full user data.
|
|
22
39
|
*/
|
|
23
40
|
validateToken(): Promise<TokenValidationResponse>;
|
|
24
41
|
/**
|
|
25
|
-
* Get the current authenticated user
|
|
42
|
+
* Get the current authenticated user with all relationships pre-loaded.
|
|
43
|
+
*
|
|
44
|
+
* @returns User with `role`, `avatar`, and `profile` relationships populated.
|
|
45
|
+
* Access profile data via `user.profile?.firstName`, role via `user.role?.name`.
|
|
46
|
+
* @example
|
|
47
|
+
* const user = await auth.auth.getCurrentUser();
|
|
48
|
+
* console.log(user.profile?.firstName); // 'Jane'
|
|
49
|
+
* console.log(user.role?.name); // 'admin'
|
|
50
|
+
* console.log(user.avatar?.url); // 'https://...'
|
|
26
51
|
*/
|
|
27
52
|
getCurrentUser(): Promise<User>;
|
|
28
53
|
/**
|
|
29
|
-
* Request a password reset email
|
|
54
|
+
* Request a password reset email. Sends an email with a reset link.
|
|
55
|
+
*
|
|
56
|
+
* @param request - Contains `email` and optional `redirectUrl` for the reset page.
|
|
30
57
|
*/
|
|
31
58
|
requestPasswordReset(request: PasswordResetRequest): Promise<void>;
|
|
32
59
|
/**
|
|
33
|
-
* Update password
|
|
60
|
+
* Update password using either a reset token or the current password.
|
|
61
|
+
*
|
|
62
|
+
* @param request - Provide `resetPasswordToken` for reset flow, or `currentPassword` for change flow.
|
|
34
63
|
*/
|
|
35
64
|
updatePassword(request: PasswordUpdateRequest): Promise<void>;
|
|
36
65
|
/**
|
|
37
|
-
* Refresh the access token
|
|
66
|
+
* Refresh the access token using a refresh token.
|
|
67
|
+
*
|
|
68
|
+
* @returns RefreshTokenResponse with new `accessToken`, optional new `refreshToken`,
|
|
69
|
+
* `tokenType`, and `expiresIn`.
|
|
38
70
|
*/
|
|
39
71
|
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
40
72
|
/**
|
|
41
|
-
* Request a magic link for passwordless login
|
|
73
|
+
* Request a magic link for passwordless login. Sends an email with a login link.
|
|
42
74
|
*/
|
|
43
75
|
requestMagicLink(request: MagicLinkRequest): Promise<void>;
|
|
44
76
|
/**
|
|
45
|
-
* Verify a magic link token
|
|
77
|
+
* Verify a magic link token and sign in.
|
|
78
|
+
*
|
|
79
|
+
* @returns SignInResponse with `user`, `accessToken`, optional `refreshToken`.
|
|
46
80
|
*/
|
|
47
81
|
verifyMagicLink(request: MagicLinkVerifyRequest): Promise<SignInResponse>;
|
|
48
82
|
/**
|
|
49
|
-
* Send an invitation to a new user
|
|
83
|
+
* Send an invitation email to a new user.
|
|
84
|
+
*
|
|
85
|
+
* @param request - Contains `email`, optional `roleId`, and optional `redirectUrl`.
|
|
50
86
|
*/
|
|
51
87
|
sendInvitation(request: InvitationRequest): Promise<void>;
|
|
52
88
|
/**
|
|
53
|
-
* Accept an invitation
|
|
89
|
+
* Accept an invitation and create the user's account.
|
|
90
|
+
*
|
|
91
|
+
* @returns SignInResponse with the new `user`, `accessToken`, optional `refreshToken`.
|
|
54
92
|
*/
|
|
55
93
|
acceptInvitation(request: AcceptInvitationRequest): Promise<SignInResponse>;
|
|
56
94
|
/**
|
|
57
|
-
* Confirm email
|
|
95
|
+
* Confirm email address using a confirmation token (from the confirmation email link).
|
|
96
|
+
*
|
|
97
|
+
* @returns The confirmed User.
|
|
58
98
|
*/
|
|
59
99
|
confirmEmail(token: string): Promise<User>;
|
|
60
100
|
/**
|
|
61
|
-
* Resend confirmation email
|
|
101
|
+
* Resend the confirmation email for an unconfirmed user.
|
|
62
102
|
*/
|
|
63
103
|
resendConfirmation(request: ResendConfirmationRequest): Promise<void>;
|
|
64
104
|
/**
|
|
65
|
-
* Validate email before registration
|
|
105
|
+
* Validate an email before registration. Checks format, existence, and account status.
|
|
106
|
+
*
|
|
107
|
+
* @returns ValidateEmailResponse with `exists`, `wellFormed`, `canRecover`, `accountStatus`.
|
|
66
108
|
*/
|
|
67
109
|
validateEmail(request: ValidateEmailRequest): Promise<ValidateEmailResponse>;
|
|
68
110
|
/**
|
|
69
|
-
* Validate document before registration
|
|
111
|
+
* Validate a document (e.g., ID number) before registration. Checks existence and account status.
|
|
112
|
+
*
|
|
113
|
+
* @returns ValidateDocumentResponse with `exists`, `canRecover`, `maskedEmail`, `accountStatus`.
|
|
70
114
|
*/
|
|
71
115
|
validateDocument(request: ValidateDocumentRequest): Promise<ValidateDocumentResponse>;
|
|
72
116
|
/**
|
|
73
|
-
* Resend invitation email
|
|
117
|
+
* Resend an invitation email to a previously invited user.
|
|
118
|
+
*
|
|
119
|
+
* @returns The User whose invitation was resent.
|
|
74
120
|
*/
|
|
75
121
|
resendInvitation(request: ResendInvitationRequest): Promise<User>;
|
|
76
122
|
/**
|
|
77
|
-
* Request account recovery
|
|
123
|
+
* Request account recovery for a deleted/deactivated account. Sends a recovery email.
|
|
124
|
+
*
|
|
125
|
+
* @returns AccountRecoveryResponse with `success` and `message`.
|
|
78
126
|
*/
|
|
79
127
|
requestAccountRecovery(request: AccountRecoveryRequest): Promise<AccountRecoveryResponse>;
|
|
80
128
|
/**
|
|
81
|
-
* Complete account recovery
|
|
129
|
+
* Complete account recovery by setting a new password with the recovery token.
|
|
130
|
+
*
|
|
131
|
+
* @returns The recovered User.
|
|
82
132
|
*/
|
|
83
133
|
completeAccountRecovery(request: CompleteRecoveryRequest): Promise<User>;
|
|
84
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,IAAI,EACL,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E
|
|
1
|
+
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,qBAAqB,E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,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE5E;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE7E;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEtF;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;;;OAIG;IACH,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE1F;;;;OAIG;IACH,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,WAAW,CAuRb"}
|
|
@@ -2,39 +2,53 @@ import type { Transport, PageResult } from '@23blocks/contracts';
|
|
|
2
2
|
import type { UserAvatarFull, CreateAvatarRequest, AvatarPresignResponse, MultipartPresignRequest, MultipartPresignResponse, MultipartCompleteRequest, MultipartCompleteResponse } from '../types/index.js';
|
|
3
3
|
import type { ListParams } from '@23blocks/contracts';
|
|
4
4
|
/**
|
|
5
|
-
* Avatars
|
|
5
|
+
* Avatars service - manage user profile images with direct S3 upload support.
|
|
6
6
|
*/
|
|
7
7
|
export interface AvatarsService {
|
|
8
8
|
/**
|
|
9
|
-
* List avatars for a user
|
|
9
|
+
* List avatars for a user.
|
|
10
|
+
*
|
|
11
|
+
* @returns Paginated list of UserAvatarFull objects with `url`, `thumbnail`, `fileType`, etc.
|
|
10
12
|
*/
|
|
11
13
|
list(userUniqueId: string, params?: ListParams): Promise<PageResult<UserAvatarFull>>;
|
|
12
14
|
/**
|
|
13
|
-
* Get a
|
|
15
|
+
* Get the avatar for a user.
|
|
16
|
+
*
|
|
17
|
+
* @returns UserAvatarFull with `url`, `thumbnail`, `fileSize`, `fileType`.
|
|
14
18
|
*/
|
|
15
19
|
get(userUniqueId: string): Promise<UserAvatarFull>;
|
|
16
20
|
/**
|
|
17
|
-
* Create
|
|
21
|
+
* Create or replace a user's avatar using a URL (not direct upload).
|
|
22
|
+
*
|
|
23
|
+
* @returns The created UserAvatarFull.
|
|
18
24
|
*/
|
|
19
25
|
create(userUniqueId: string, request: CreateAvatarRequest): Promise<UserAvatarFull>;
|
|
20
26
|
/**
|
|
21
|
-
* Update
|
|
27
|
+
* Update avatar metadata.
|
|
28
|
+
*
|
|
29
|
+
* @returns The updated UserAvatarFull.
|
|
22
30
|
*/
|
|
23
31
|
update(userUniqueId: string, request: Partial<CreateAvatarRequest>): Promise<UserAvatarFull>;
|
|
24
32
|
/**
|
|
25
|
-
* Delete
|
|
33
|
+
* Delete a user's avatar.
|
|
26
34
|
*/
|
|
27
35
|
delete(userUniqueId: string): Promise<void>;
|
|
28
36
|
/**
|
|
29
|
-
* Get presigned URL for direct upload
|
|
37
|
+
* Get a presigned URL for direct-to-S3 avatar upload (single part).
|
|
38
|
+
*
|
|
39
|
+
* @returns AvatarPresignResponse with `uploadUrl` (PUT to S3), `publicUrl`, and `key`.
|
|
30
40
|
*/
|
|
31
41
|
presignUpload(userUniqueId: string, filename: string): Promise<AvatarPresignResponse>;
|
|
32
42
|
/**
|
|
33
|
-
* Get presigned URLs for multipart upload
|
|
43
|
+
* Get presigned URLs for multipart upload (large files).
|
|
44
|
+
*
|
|
45
|
+
* @returns MultipartPresignResponse with `uploadId`, `key`, and `parts[]` (each with `partNumber` and `uploadUrl`).
|
|
34
46
|
*/
|
|
35
47
|
multipartPresign(userUniqueId: string, request: MultipartPresignRequest): Promise<MultipartPresignResponse>;
|
|
36
48
|
/**
|
|
37
|
-
* Complete a multipart upload
|
|
49
|
+
* Complete a multipart upload after all parts have been uploaded.
|
|
50
|
+
*
|
|
51
|
+
* @returns MultipartCompleteResponse with `publicUrl` and `fileName`.
|
|
38
52
|
*/
|
|
39
53
|
multipartComplete(userUniqueId: string, request: MultipartCompleteRequest): Promise<MultipartCompleteResponse>;
|
|
40
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatars.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/avatars.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA0BtD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B
|
|
1
|
+
{"version":3,"file":"avatars.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/avatars.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA0BtD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;IAErF;;;;OAIG;IACH,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEnD;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEpF;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE7F;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C;;;;OAIG;IACH,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEtF;;;;OAIG;IACH,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAE5G;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CAChH;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,cAAc,CAgHzE"}
|
|
@@ -10,9 +10,9 @@ export interface CountriesService {
|
|
|
10
10
|
*/
|
|
11
11
|
list(params?: ListParams): Promise<PageResult<Country>>;
|
|
12
12
|
/**
|
|
13
|
-
* Get a country by ID
|
|
13
|
+
* Get a country by unique ID
|
|
14
14
|
*/
|
|
15
|
-
get(
|
|
15
|
+
get(uniqueId: string): Promise<Country>;
|
|
16
16
|
/**
|
|
17
17
|
* Get a country by ISO code
|
|
18
18
|
*/
|
|
@@ -31,13 +31,13 @@ export interface StatesService {
|
|
|
31
31
|
*/
|
|
32
32
|
list(params?: ListParams): Promise<PageResult<State>>;
|
|
33
33
|
/**
|
|
34
|
-
* Get a state by ID
|
|
34
|
+
* Get a state by unique ID
|
|
35
35
|
*/
|
|
36
|
-
get(
|
|
36
|
+
get(uniqueId: string): Promise<State>;
|
|
37
37
|
/**
|
|
38
38
|
* Get states for a country
|
|
39
39
|
*/
|
|
40
|
-
forCountry(
|
|
40
|
+
forCountry(countryUniqueId: string): Promise<State[]>;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Counties service interface
|
|
@@ -48,13 +48,13 @@ export interface CountiesService {
|
|
|
48
48
|
*/
|
|
49
49
|
list(params?: ListParams): Promise<PageResult<County>>;
|
|
50
50
|
/**
|
|
51
|
-
* Get a county by ID
|
|
51
|
+
* Get a county by unique ID
|
|
52
52
|
*/
|
|
53
|
-
get(
|
|
53
|
+
get(uniqueId: string): Promise<County>;
|
|
54
54
|
/**
|
|
55
55
|
* Get counties for a state
|
|
56
56
|
*/
|
|
57
|
-
forState(
|
|
57
|
+
forState(stateUniqueId: string): Promise<County[]>;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Cities service interface
|
|
@@ -65,17 +65,17 @@ export interface CitiesService {
|
|
|
65
65
|
*/
|
|
66
66
|
list(params?: ListParams): Promise<PageResult<City>>;
|
|
67
67
|
/**
|
|
68
|
-
* Get a city by ID
|
|
68
|
+
* Get a city by unique ID
|
|
69
69
|
*/
|
|
70
|
-
get(
|
|
70
|
+
get(uniqueId: string): Promise<City>;
|
|
71
71
|
/**
|
|
72
72
|
* Get cities for a state
|
|
73
73
|
*/
|
|
74
|
-
forState(
|
|
74
|
+
forState(stateUniqueId: string): Promise<City[]>;
|
|
75
75
|
/**
|
|
76
76
|
* Get cities for a county
|
|
77
77
|
*/
|
|
78
|
-
forCounty(
|
|
78
|
+
forCounty(countyUniqueId: string): Promise<City[]>;
|
|
79
79
|
/**
|
|
80
80
|
* Search cities by name
|
|
81
81
|
*/
|
|
@@ -90,9 +90,9 @@ export interface CurrenciesService {
|
|
|
90
90
|
*/
|
|
91
91
|
list(params?: ListParams): Promise<PageResult<Currency>>;
|
|
92
92
|
/**
|
|
93
|
-
* Get a currency by ID
|
|
93
|
+
* Get a currency by unique ID
|
|
94
94
|
*/
|
|
95
|
-
get(
|
|
95
|
+
get(uniqueId: string): Promise<Currency>;
|
|
96
96
|
/**
|
|
97
97
|
* Get a currency by code
|
|
98
98
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geography.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/geography.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAExD;;OAEG;IACH,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"geography.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/geography.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQhF,OAAO,KAA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;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,iBAAiB,CA6BnB"}
|
|
@@ -10,9 +10,9 @@ export interface GuestsService {
|
|
|
10
10
|
*/
|
|
11
11
|
list(params?: ListParams): Promise<PageResult<Guest>>;
|
|
12
12
|
/**
|
|
13
|
-
* Get a guest by ID
|
|
13
|
+
* Get a guest by unique ID
|
|
14
14
|
*/
|
|
15
|
-
get(
|
|
15
|
+
get(uniqueId: string): Promise<Guest>;
|
|
16
16
|
/**
|
|
17
17
|
* Track a guest visit
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ export interface GuestsService {
|
|
|
20
20
|
/**
|
|
21
21
|
* Convert guest to user (registration)
|
|
22
22
|
*/
|
|
23
|
-
convert(
|
|
23
|
+
convert(uniqueId: string): Promise<Guest>;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Magic links service interface
|
|
@@ -31,9 +31,9 @@ export interface MagicLinksService {
|
|
|
31
31
|
*/
|
|
32
32
|
list(params?: ListParams): Promise<PageResult<MagicLink>>;
|
|
33
33
|
/**
|
|
34
|
-
* Get a magic link by ID
|
|
34
|
+
* Get a magic link by unique ID
|
|
35
35
|
*/
|
|
36
|
-
get(
|
|
36
|
+
get(uniqueId: string): Promise<MagicLink>;
|
|
37
37
|
/**
|
|
38
38
|
* Create a magic link
|
|
39
39
|
*/
|
|
@@ -45,7 +45,7 @@ export interface MagicLinksService {
|
|
|
45
45
|
/**
|
|
46
46
|
* Expire a magic link
|
|
47
47
|
*/
|
|
48
|
-
expire(
|
|
48
|
+
expire(uniqueId: string): Promise<MagicLink>;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Refresh tokens service interface
|
|
@@ -56,13 +56,13 @@ export interface RefreshTokensService {
|
|
|
56
56
|
*/
|
|
57
57
|
list(params?: ListParams): Promise<PageResult<RefreshToken>>;
|
|
58
58
|
/**
|
|
59
|
-
* Get a refresh token by ID
|
|
59
|
+
* Get a refresh token by unique ID
|
|
60
60
|
*/
|
|
61
|
-
get(
|
|
61
|
+
get(uniqueId: string): Promise<RefreshToken>;
|
|
62
62
|
/**
|
|
63
63
|
* Revoke a refresh token
|
|
64
64
|
*/
|
|
65
|
-
revoke(
|
|
65
|
+
revoke(uniqueId: string): Promise<RefreshToken>;
|
|
66
66
|
/**
|
|
67
67
|
* Revoke all refresh tokens for current user
|
|
68
68
|
*/
|
|
@@ -81,9 +81,9 @@ export interface UserDevicesService {
|
|
|
81
81
|
*/
|
|
82
82
|
list(params?: ListParams): Promise<PageResult<UserDevice>>;
|
|
83
83
|
/**
|
|
84
|
-
* Get a device by ID
|
|
84
|
+
* Get a device by unique ID
|
|
85
85
|
*/
|
|
86
|
-
get(
|
|
86
|
+
get(uniqueId: string): Promise<UserDevice>;
|
|
87
87
|
/**
|
|
88
88
|
* Register a new device
|
|
89
89
|
*/
|
|
@@ -91,15 +91,15 @@ export interface UserDevicesService {
|
|
|
91
91
|
/**
|
|
92
92
|
* Update device settings
|
|
93
93
|
*/
|
|
94
|
-
update(
|
|
94
|
+
update(uniqueId: string, request: Partial<RegisterDeviceRequest>): Promise<UserDevice>;
|
|
95
95
|
/**
|
|
96
96
|
* Unregister a device
|
|
97
97
|
*/
|
|
98
|
-
unregister(
|
|
98
|
+
unregister(uniqueId: string): Promise<void>;
|
|
99
99
|
/**
|
|
100
100
|
* Set default device
|
|
101
101
|
*/
|
|
102
|
-
setDefault(
|
|
102
|
+
setDefault(uniqueId: string): Promise<UserDevice>;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Tenant users service interface
|
|
@@ -127,9 +127,9 @@ export interface MailTemplatesService {
|
|
|
127
127
|
*/
|
|
128
128
|
list(params?: ListParams): Promise<PageResult<MailTemplate>>;
|
|
129
129
|
/**
|
|
130
|
-
* Get a mail template by ID
|
|
130
|
+
* Get a mail template by unique ID
|
|
131
131
|
*/
|
|
132
|
-
get(
|
|
132
|
+
get(uniqueId: string): Promise<MailTemplate>;
|
|
133
133
|
/**
|
|
134
134
|
* Get a mail template by event name
|
|
135
135
|
*/
|
|
@@ -137,7 +137,7 @@ export interface MailTemplatesService {
|
|
|
137
137
|
/**
|
|
138
138
|
* Update a mail template
|
|
139
139
|
*/
|
|
140
|
-
update(
|
|
140
|
+
update(uniqueId: string, template: Partial<MailTemplate>): Promise<MailTemplate>;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Create the guests service
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guests.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/guests.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtD;;OAEG;IACH,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"guests.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/guests.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG7E,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EAAE,yBAAyB,EA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AAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAClF;AAqCD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,aAAa,CA2Bf;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,iBAAiB,CA+CnB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,oBAAoB,CAgCtB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CA8DpB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CAwBpB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,oBAAoB,CA6CtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { JsonWebKey, JwksResponse, RsaKey, CreateRsaKeyRequest, RotateRsaKeyRequest } from '../types/jwks.js';
|
|
3
3
|
/**
|
|
4
|
-
* JWKS
|
|
4
|
+
* JWKS service - retrieve public JSON Web Keys for JWT verification.
|
|
5
5
|
*/
|
|
6
6
|
export interface JwksService {
|
|
7
7
|
/**
|
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import type { Transport } from '@23blocks/contracts';
|
|
2
2
|
import type { MfaSetupResponseFull, MfaEnableRequest, MfaDisableRequest, MfaVerifyRequestFull, MfaStatusResponse, MfaVerificationResponse, MfaOperationResponse } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
|
-
* MFA
|
|
4
|
+
* MFA (Multi-Factor Authentication) service - setup, enable, disable, and verify TOTP-based MFA.
|
|
5
5
|
*/
|
|
6
6
|
export interface MfaService {
|
|
7
7
|
/**
|
|
8
|
-
* Setup MFA for a user
|
|
8
|
+
* Setup MFA for a user. Generates a TOTP secret and QR code URI.
|
|
9
|
+
*
|
|
10
|
+
* @param userUniqueId - The user's UUID.
|
|
11
|
+
* @param regenerate - If true, regenerates the secret even if one exists.
|
|
12
|
+
* @returns MfaSetupResponseFull with `secret`, `qrCodeUri`, `backupCodes`, and `testCode`.
|
|
9
13
|
*/
|
|
10
14
|
setup(userUniqueId: string, regenerate?: boolean): Promise<MfaSetupResponseFull>;
|
|
11
15
|
/**
|
|
12
|
-
* Enable MFA after setup
|
|
16
|
+
* Enable MFA after setup. Requires a valid TOTP code to confirm the user has configured their authenticator.
|
|
17
|
+
*
|
|
18
|
+
* @returns MfaOperationResponse with `enabled: true` and a confirmation `message`.
|
|
13
19
|
*/
|
|
14
20
|
enable(userUniqueId: string, request: MfaEnableRequest): Promise<MfaOperationResponse>;
|
|
15
21
|
/**
|
|
16
|
-
* Disable MFA
|
|
22
|
+
* Disable MFA. Requires the user's password for security verification.
|
|
23
|
+
*
|
|
24
|
+
* @returns MfaOperationResponse with `enabled: false` and a confirmation `message`.
|
|
17
25
|
*/
|
|
18
26
|
disable(userUniqueId: string, request: MfaDisableRequest): Promise<MfaOperationResponse>;
|
|
19
27
|
/**
|
|
20
|
-
* Verify
|
|
28
|
+
* Verify a TOTP code or backup code during sign-in.
|
|
29
|
+
*
|
|
30
|
+
* @param request - Provide either `code` (TOTP) or `backupCode`.
|
|
31
|
+
* @returns MfaVerificationResponse with `valid` and `message`.
|
|
21
32
|
*/
|
|
22
33
|
verify(userUniqueId: string, request: MfaVerifyRequestFull): Promise<MfaVerificationResponse>;
|
|
23
34
|
/**
|
|
24
|
-
* Get MFA status for a user
|
|
35
|
+
* Get the MFA status for a user.
|
|
36
|
+
*
|
|
37
|
+
* @returns MfaStatusResponse with `enabled`, `setupRequired`, `backupCodesRemaining`, `lastUsedAt`.
|
|
25
38
|
*/
|
|
26
39
|
status(userUniqueId: string): Promise<MfaStatusResponse>;
|
|
27
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfa.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/mfa.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB
|
|
1
|
+
{"version":3,"file":"mfa.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/mfa.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjF;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEvF;;;;OAIG;IACH,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEzF;;;;;OAKG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE9F;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAwGjE"}
|