@bett3r-dev/pv3-types 1.0.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/build/authentication.d.ts +261 -0
- package/build/authentication.d.ts.map +1 -0
- package/build/authentication.js +108 -0
- package/build/authentication.js.map +1 -0
- package/build/cache.d.ts +101 -0
- package/build/cache.d.ts.map +1 -0
- package/build/cache.js +3 -0
- package/build/cache.js.map +1 -0
- package/build/clusterAdministration.d.ts +642 -0
- package/build/clusterAdministration.d.ts.map +1 -0
- package/build/clusterAdministration.js +177 -0
- package/build/clusterAdministration.js.map +1 -0
- package/build/configuration.d.ts +66 -0
- package/build/configuration.d.ts.map +1 -0
- package/build/configuration.js +3 -0
- package/build/configuration.js.map +1 -0
- package/build/database.d.ts +120 -0
- package/build/database.d.ts.map +1 -0
- package/build/database.js +41 -0
- package/build/database.js.map +1 -0
- package/build/endpoints.d.ts +183 -0
- package/build/endpoints.d.ts.map +1 -0
- package/build/endpoints.js +78 -0
- package/build/endpoints.js.map +1 -0
- package/build/evenstore.d.ts +26 -0
- package/build/evenstore.d.ts.map +1 -0
- package/build/evenstore.js +12 -0
- package/build/evenstore.js.map +1 -0
- package/build/eventsourcing/aggregateBuilder.d.ts +10 -0
- package/build/eventsourcing/aggregateBuilder.d.ts.map +1 -0
- package/build/eventsourcing/aggregateBuilder.js +3 -0
- package/build/eventsourcing/aggregateBuilder.js.map +1 -0
- package/build/eventsourcing/commandBuilder.d.ts +58 -0
- package/build/eventsourcing/commandBuilder.d.ts.map +1 -0
- package/build/eventsourcing/commandBuilder.js +6 -0
- package/build/eventsourcing/commandBuilder.js.map +1 -0
- package/build/eventsourcing/commandHandlers.d.ts +104 -0
- package/build/eventsourcing/commandHandlers.d.ts.map +1 -0
- package/build/eventsourcing/commandHandlers.js +28 -0
- package/build/eventsourcing/commandHandlers.js.map +1 -0
- package/build/eventsourcing/eventHandlers.d.ts +102 -0
- package/build/eventsourcing/eventHandlers.d.ts.map +1 -0
- package/build/eventsourcing/eventHandlers.js +33 -0
- package/build/eventsourcing/eventHandlers.js.map +1 -0
- package/build/eventsourcing/eventHandlersBuilder.d.ts +36 -0
- package/build/eventsourcing/eventHandlersBuilder.d.ts.map +1 -0
- package/build/eventsourcing/eventHandlersBuilder.js +13 -0
- package/build/eventsourcing/eventHandlersBuilder.js.map +1 -0
- package/build/eventsourcing/externalSystemBuilder.d.ts +14 -0
- package/build/eventsourcing/externalSystemBuilder.d.ts.map +1 -0
- package/build/eventsourcing/externalSystemBuilder.js +3 -0
- package/build/eventsourcing/externalSystemBuilder.js.map +1 -0
- package/build/eventsourcing/index.d.ts +386 -0
- package/build/eventsourcing/index.d.ts.map +1 -0
- package/build/eventsourcing/index.js +47 -0
- package/build/eventsourcing/index.js.map +1 -0
- package/build/eventsourcing/invariants.d.ts +19 -0
- package/build/eventsourcing/invariants.d.ts.map +1 -0
- package/build/eventsourcing/invariants.js +3 -0
- package/build/eventsourcing/invariants.js.map +1 -0
- package/build/eventsourcing/utils.d.ts +4 -0
- package/build/eventsourcing/utils.d.ts.map +1 -0
- package/build/eventsourcing/utils.js +3 -0
- package/build/eventsourcing/utils.js.map +1 -0
- package/build/index.d.ts +16 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +32 -0
- package/build/index.js.map +1 -0
- package/build/infrastructure.d.ts +40 -0
- package/build/infrastructure.d.ts.map +1 -0
- package/build/infrastructure.js +11 -0
- package/build/infrastructure.js.map +1 -0
- package/build/logger.d.ts +32 -0
- package/build/logger.d.ts.map +1 -0
- package/build/logger.js +29 -0
- package/build/logger.js.map +1 -0
- package/build/outboxManager.d.ts +38 -0
- package/build/outboxManager.d.ts.map +1 -0
- package/build/outboxManager.js +21 -0
- package/build/outboxManager.js.map +1 -0
- package/build/ports.d.ts +39 -0
- package/build/ports.d.ts.map +1 -0
- package/build/ports.js +3 -0
- package/build/ports.js.map +1 -0
- package/build/routesAuth.d.ts +58 -0
- package/build/routesAuth.d.ts.map +1 -0
- package/build/routesAuth.js +37 -0
- package/build/routesAuth.js.map +1 -0
- package/build/typedEventEmitter.d.ts +23 -0
- package/build/typedEventEmitter.d.ts.map +1 -0
- package/build/typedEventEmitter.js +55 -0
- package/build/typedEventEmitter.js.map +1 -0
- package/build/validation.d.ts +64 -0
- package/build/validation.d.ts.map +1 -0
- package/build/validation.js +57 -0
- package/build/validation.js.map +1 -0
- package/package.json +15 -0
- package/src/authentication.ts +273 -0
- package/src/cache.ts +109 -0
- package/src/clusterAdministration.ts +216 -0
- package/src/configuration.ts +71 -0
- package/src/database.ts +157 -0
- package/src/endpoints.ts +198 -0
- package/src/evenstore.ts +27 -0
- package/src/eventsourcing/aggregateBuilder.ts +11 -0
- package/src/eventsourcing/commandBuilder.ts +64 -0
- package/src/eventsourcing/commandHandlers.ts +137 -0
- package/src/eventsourcing/eventHandlers.ts +118 -0
- package/src/eventsourcing/eventHandlersBuilder.ts +42 -0
- package/src/eventsourcing/externalSystemBuilder.ts +20 -0
- package/src/eventsourcing/index.ts +111 -0
- package/src/eventsourcing/invariants.ts +27 -0
- package/src/eventsourcing/utils.ts +4 -0
- package/src/index.ts +15 -0
- package/src/infrastructure.ts +41 -0
- package/src/logger.ts +45 -0
- package/src/outboxManager.ts +36 -0
- package/src/ports.ts +42 -0
- package/src/routesAuth.ts +58 -0
- package/src/typedEventEmitter.ts +73 -0
- package/src/validation.ts +89 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/// <reference types="ramda/node_modules/ts-toolbelt" />
|
|
2
|
+
import { RoutesAuthManagerType } from './routesAuth';
|
|
3
|
+
import { ClusterRoutesConfigType } from './clusterAdministration';
|
|
4
|
+
import { AdapterBase, PortEmitter } from './ports';
|
|
5
|
+
import { Ports } from './ports';
|
|
6
|
+
/**
|
|
7
|
+
* @category Schemas
|
|
8
|
+
*/
|
|
9
|
+
export declare const AuthenticationIdSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
10
|
+
id: string;
|
|
11
|
+
}, true>;
|
|
12
|
+
/**
|
|
13
|
+
* @category Schemas
|
|
14
|
+
*/
|
|
15
|
+
export declare const AuthenticationEmailSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
16
|
+
email: string;
|
|
17
|
+
}, true>;
|
|
18
|
+
export type AuthenticationEmail = typeof AuthenticationEmailSchema.type;
|
|
19
|
+
/**
|
|
20
|
+
* @category Schemas
|
|
21
|
+
*/
|
|
22
|
+
export declare const AuthenticationPasswordSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
23
|
+
password: string;
|
|
24
|
+
}, true>;
|
|
25
|
+
export type AuthenticationPassword = typeof AuthenticationPasswordSchema.type;
|
|
26
|
+
/**
|
|
27
|
+
* @category Schemas
|
|
28
|
+
*/
|
|
29
|
+
export declare const AuthenticationRoleSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
30
|
+
role: string;
|
|
31
|
+
}, true>;
|
|
32
|
+
/**
|
|
33
|
+
* @category Schemas
|
|
34
|
+
*/
|
|
35
|
+
export declare const AuthenticationRolesSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
36
|
+
roles: string[];
|
|
37
|
+
}, true>;
|
|
38
|
+
export type AuthenticationRolesType = typeof AuthenticationRolesSchema.type;
|
|
39
|
+
/**
|
|
40
|
+
* @category Schemas
|
|
41
|
+
*/
|
|
42
|
+
export declare const AuthenticationProviderIdSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
43
|
+
providerId: string;
|
|
44
|
+
providerName: string;
|
|
45
|
+
}, true>;
|
|
46
|
+
export type AuthenticationProviderId = typeof AuthenticationProviderIdSchema.type;
|
|
47
|
+
/**
|
|
48
|
+
* @category Schemas
|
|
49
|
+
*/
|
|
50
|
+
export declare const AuthenticationProviderUserSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
51
|
+
email: string;
|
|
52
|
+
providerId: string;
|
|
53
|
+
providerName: string;
|
|
54
|
+
}, true>;
|
|
55
|
+
/**
|
|
56
|
+
* @category Schemas
|
|
57
|
+
*/
|
|
58
|
+
export declare const UserLoginSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
59
|
+
email: string;
|
|
60
|
+
password: string;
|
|
61
|
+
}, true>;
|
|
62
|
+
export type UserLogin = typeof UserLoginSchema.type;
|
|
63
|
+
/**
|
|
64
|
+
* @category Schemas
|
|
65
|
+
*/
|
|
66
|
+
export declare const AuthenticationRegistrationSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
67
|
+
email: string;
|
|
68
|
+
password: string;
|
|
69
|
+
roles: string[];
|
|
70
|
+
}, true>;
|
|
71
|
+
export type AuthenticationRegistrationType = typeof AuthenticationRegistrationSchema.type;
|
|
72
|
+
/**
|
|
73
|
+
* @category Schemas
|
|
74
|
+
*/
|
|
75
|
+
export declare const AuthenticationCustomAttributesSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
76
|
+
attributes?: {} | undefined;
|
|
77
|
+
}, true>;
|
|
78
|
+
export type AuthenticationCustomAttributesType = typeof AuthenticationCustomAttributesSchema.type;
|
|
79
|
+
/**
|
|
80
|
+
* @category Schemas
|
|
81
|
+
*/
|
|
82
|
+
export declare const AuthenticationUserSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
83
|
+
id: string;
|
|
84
|
+
email: string;
|
|
85
|
+
roles: string[];
|
|
86
|
+
attributes?: {} | undefined;
|
|
87
|
+
}, true>;
|
|
88
|
+
export type AuthenticationUser = typeof AuthenticationUserSchema.type;
|
|
89
|
+
/**
|
|
90
|
+
* @category Schemas
|
|
91
|
+
*/
|
|
92
|
+
export declare const AuthenticationCreateUserCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
93
|
+
id: string;
|
|
94
|
+
email: string;
|
|
95
|
+
roles: string[];
|
|
96
|
+
attributes?: {} | undefined;
|
|
97
|
+
password: string;
|
|
98
|
+
}, true>;
|
|
99
|
+
export type AuthenticationCreateUserCommand = typeof AuthenticationCreateUserCommandSchema.type;
|
|
100
|
+
export declare const AuthenticationUpdateUserCommandSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
101
|
+
email?: string | undefined;
|
|
102
|
+
attributes?: import("Object/Optional").OptionalDeep<{} | undefined>;
|
|
103
|
+
providerId: string;
|
|
104
|
+
}, true>;
|
|
105
|
+
export type AuthenticationUpdateUserCommand = typeof AuthenticationUpdateUserCommandSchema.type;
|
|
106
|
+
/**
|
|
107
|
+
* @category Schemas
|
|
108
|
+
*/
|
|
109
|
+
export declare const AuthenticationResponseSchema: import("@bett3r-dev/jsonschema-definer").ObjectSchema<{
|
|
110
|
+
roles: string[];
|
|
111
|
+
expires_in: number;
|
|
112
|
+
refresh_expires_in: number;
|
|
113
|
+
'not-before-policy': number;
|
|
114
|
+
access_token: string;
|
|
115
|
+
refresh_token: string;
|
|
116
|
+
token_type: string;
|
|
117
|
+
session_state: string;
|
|
118
|
+
scope: string;
|
|
119
|
+
}, true>;
|
|
120
|
+
export type AuthenticationResponseType = typeof AuthenticationResponseSchema.type;
|
|
121
|
+
/**
|
|
122
|
+
* Logs a user in the Application.
|
|
123
|
+
* @category Authentication Port
|
|
124
|
+
* @param email Email of the user
|
|
125
|
+
* @param password Password of the user
|
|
126
|
+
*/
|
|
127
|
+
export declare function loginUser(email: string, password: string): Promise<AuthenticationResponseType>;
|
|
128
|
+
/**
|
|
129
|
+
* Inits the Recover Password process for the user with the given email.
|
|
130
|
+
* @category Authentication Port
|
|
131
|
+
* @param email Email of the user
|
|
132
|
+
*/
|
|
133
|
+
export declare function recoverPassword(email: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Marks the user email address as validated.
|
|
136
|
+
* @category Authentication Port
|
|
137
|
+
* @param email Email of the user
|
|
138
|
+
*/
|
|
139
|
+
export declare function verifyEmail(email: string): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Logs out a user from the application
|
|
142
|
+
* @category Authentication Port
|
|
143
|
+
* @param token Session Token to mark as logged out
|
|
144
|
+
*/
|
|
145
|
+
export declare function logoutUser(token: string): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Refreshes the user sesssion given the refresh token.
|
|
148
|
+
* @category Authentication Port
|
|
149
|
+
* @param refreshToken Session Refresh Token
|
|
150
|
+
*/
|
|
151
|
+
export declare function refreshToken(refreshToken: string): Promise<AuthenticationResponseType>;
|
|
152
|
+
/**
|
|
153
|
+
* Changes the password of the user
|
|
154
|
+
* @category Authentication Port
|
|
155
|
+
* @param email User Email Address
|
|
156
|
+
* @param password New Password for the User
|
|
157
|
+
*/
|
|
158
|
+
export declare function resetPassword(email: string, password: string): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Creates a new Role in the Application in the Authentication Provider
|
|
161
|
+
* @category Authentication Port
|
|
162
|
+
* @param name The name of the Role To Create
|
|
163
|
+
*/
|
|
164
|
+
export declare function createRole(name: string): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* Fetches from the Authentication Provider the list of existing Roles for the given tenant or the default one.
|
|
167
|
+
* @category Authentication Port
|
|
168
|
+
* @param tenant [Optional] The tenant for the role list to be retrieved
|
|
169
|
+
*/
|
|
170
|
+
export declare function getRoles(tenant?: string): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Deletes a Role from the Authentication Provider.
|
|
173
|
+
* @category Authentication Port
|
|
174
|
+
* @param name The name of the Role to Delete
|
|
175
|
+
*/
|
|
176
|
+
export declare function deleteRole(name: string): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Creates a new User in the Authentication Provider
|
|
179
|
+
* @category Authentication Port
|
|
180
|
+
* @param id Application Id of the User to create
|
|
181
|
+
* @param email The Email address of the user
|
|
182
|
+
* @param roles The roles to create the user with
|
|
183
|
+
* @param attributes Additional Attributes to add to the auth token
|
|
184
|
+
*/
|
|
185
|
+
export declare function createUser(id: string, email: string, password: string, roles: string[], attributes?: Record<string, any>): Promise<string>;
|
|
186
|
+
/**
|
|
187
|
+
* Creates a new User in the Authentication Provider
|
|
188
|
+
* @category Authentication Port
|
|
189
|
+
* @param id Provider Id of the User to create
|
|
190
|
+
* @param email The Email address of the user
|
|
191
|
+
* @param attributes Additional Attributes to add to the auth token
|
|
192
|
+
*/
|
|
193
|
+
export declare function updateUser(providerId: string, email?: string, attributes?: Record<string, any>): Promise<string>;
|
|
194
|
+
/**
|
|
195
|
+
* Assigns a list of roles to a given user
|
|
196
|
+
* @category Authentication Port
|
|
197
|
+
* @param email The User Email Address
|
|
198
|
+
* @param roles The Roles to assign to the user
|
|
199
|
+
*/
|
|
200
|
+
export declare function assignUserRoles(email: string, roles: string[]): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Removes a list of roles from a given user
|
|
203
|
+
* @category Authentication Port
|
|
204
|
+
* @param email The User Email Address
|
|
205
|
+
* @param roles The roles to remove from the user
|
|
206
|
+
*/
|
|
207
|
+
export declare function removeUserRoles(email: string, roles: string[]): Promise<void>;
|
|
208
|
+
/**
|
|
209
|
+
* Performs the Authorization process for a request to a resource given the user Access Token.
|
|
210
|
+
* This function is the response of the `authorizeRequest` curried execution.
|
|
211
|
+
* @param accessToken JWT Access Token of the request
|
|
212
|
+
* @param method The HTTP method accessing the resource
|
|
213
|
+
* @param uri The resource uri
|
|
214
|
+
* @see {@link authorizeRequest}
|
|
215
|
+
*/
|
|
216
|
+
export declare function authorizeRequestFunction(accessToken: string, method: string, uri: string): Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Curried function that will receive the routeManager as parameter and
|
|
219
|
+
* return another function with the actual authorization functionality
|
|
220
|
+
* @category Authentication Port
|
|
221
|
+
* @param routeManager The route manager to use to perform the authorization process of the resource requested.
|
|
222
|
+
* @see {@link authorizeRequestFunction}
|
|
223
|
+
*/
|
|
224
|
+
export declare function authorizeRequest(routeManager: RoutesAuthManagerType): typeof authorizeRequestFunction;
|
|
225
|
+
/**
|
|
226
|
+
* @category Main Types
|
|
227
|
+
*/
|
|
228
|
+
export type AuthenticationType = {
|
|
229
|
+
name: string;
|
|
230
|
+
loginUser: typeof loginUser;
|
|
231
|
+
recoverPassword: typeof recoverPassword;
|
|
232
|
+
verifyEmail: typeof verifyEmail;
|
|
233
|
+
logoutUser: typeof logoutUser;
|
|
234
|
+
refreshToken: typeof refreshToken;
|
|
235
|
+
resetPassword: typeof resetPassword;
|
|
236
|
+
createRole: typeof createRole;
|
|
237
|
+
getRoles: typeof getRoles;
|
|
238
|
+
deleteRole: typeof deleteRole;
|
|
239
|
+
createUser: typeof createUser;
|
|
240
|
+
updateUser: typeof updateUser;
|
|
241
|
+
assignUserRoles: typeof assignUserRoles;
|
|
242
|
+
removeUserRoles: typeof removeUserRoles;
|
|
243
|
+
authorizeRequest: typeof authorizeRequest;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* @category Main Types
|
|
247
|
+
*/
|
|
248
|
+
export type AuthenticationPort = PortEmitter & AuthenticationType & {
|
|
249
|
+
RouteManager: (ports: Pick<Ports, 'database' | 'eventstore'>, config: ClusterRoutesConfigType, eventstore?: Ports['eventstore']) => RoutesAuthManagerType;
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Defines the concrete implementation for the Authentication Port.
|
|
253
|
+
*
|
|
254
|
+
* __start__ Stablishes the connection with the Authentication Provider with a Service Account with administrative
|
|
255
|
+
* Priviledges that will effect all the operations.
|
|
256
|
+
*
|
|
257
|
+
* __stop__ Disconnects the Service Account from the Authentication Provider
|
|
258
|
+
* @category Main Types
|
|
259
|
+
*/
|
|
260
|
+
export type AuthenticationAdapter = AuthenticationType & AdapterBase;
|
|
261
|
+
//# sourceMappingURL=authentication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../src/authentication.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,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AAO,wBAAwB,CAAA;AAEjH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,SAAS,CAAA;IAC3B,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,WAAW,EAAE,OAAO,WAAW,CAAA;IAC/B,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,YAAY,EAAE,OAAO,YAAY,CAAA;IACjC,aAAa,EAAE,OAAO,aAAa,CAAA;IACnC,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,QAAQ,EAAE,OAAO,QAAQ,CAAA;IACzB,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,UAAU,EAAE,OAAO,UAAU,CAAA;IAC7B,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,eAAe,EAAE,OAAO,eAAe,CAAA;IACvC,gBAAgB,EAAE,OAAO,gBAAgB,CAAA;CAC1C,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,kBAAkB,GAAG;IAClE,YAAY,EAAE,CAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,GAAC,YAAY,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,qBAAqB,CAAA;CACzJ,CAAC;AAEF;;;;;;;;EAQE;AACF,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG,WAAW,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.AuthenticationResponseSchema = exports.AuthenticationUpdateUserCommandSchema = exports.AuthenticationCreateUserCommandSchema = exports.AuthenticationUserSchema = exports.AuthenticationCustomAttributesSchema = exports.AuthenticationRegistrationSchema = exports.UserLoginSchema = exports.AuthenticationProviderUserSchema = exports.AuthenticationProviderIdSchema = exports.AuthenticationRolesSchema = exports.AuthenticationRoleSchema = exports.AuthenticationPasswordSchema = exports.AuthenticationEmailSchema = exports.AuthenticationIdSchema = void 0;
|
|
27
|
+
const jsonschema_definer_1 = __importStar(require("@bett3r-dev/jsonschema-definer"));
|
|
28
|
+
//*******************************************
|
|
29
|
+
// Schemas
|
|
30
|
+
//*******************************************
|
|
31
|
+
/**
|
|
32
|
+
* @category Schemas
|
|
33
|
+
*/
|
|
34
|
+
exports.AuthenticationIdSchema = jsonschema_definer_1.default.shape({
|
|
35
|
+
id: jsonschema_definer_1.default.string()
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* @category Schemas
|
|
39
|
+
*/
|
|
40
|
+
exports.AuthenticationEmailSchema = jsonschema_definer_1.default.shape({
|
|
41
|
+
email: jsonschema_definer_1.default.string().format('email')
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* @category Schemas
|
|
45
|
+
*/
|
|
46
|
+
exports.AuthenticationPasswordSchema = jsonschema_definer_1.default.shape({
|
|
47
|
+
password: jsonschema_definer_1.default.string()
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* @category Schemas
|
|
51
|
+
*/
|
|
52
|
+
exports.AuthenticationRoleSchema = jsonschema_definer_1.default.shape({
|
|
53
|
+
role: jsonschema_definer_1.default.string(),
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @category Schemas
|
|
57
|
+
*/
|
|
58
|
+
exports.AuthenticationRolesSchema = jsonschema_definer_1.default.shape({
|
|
59
|
+
roles: jsonschema_definer_1.default.array().items(jsonschema_definer_1.default.string()),
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* @category Schemas
|
|
63
|
+
*/
|
|
64
|
+
exports.AuthenticationProviderIdSchema = jsonschema_definer_1.default.shape({
|
|
65
|
+
providerId: jsonschema_definer_1.default.string(),
|
|
66
|
+
providerName: jsonschema_definer_1.default.string(),
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* @category Schemas
|
|
70
|
+
*/
|
|
71
|
+
exports.AuthenticationProviderUserSchema = (0, jsonschema_definer_1.mergeSchemas)(exports.AuthenticationEmailSchema, exports.AuthenticationProviderIdSchema);
|
|
72
|
+
/**
|
|
73
|
+
* @category Schemas
|
|
74
|
+
*/
|
|
75
|
+
exports.UserLoginSchema = (0, jsonschema_definer_1.mergeSchemas)(exports.AuthenticationEmailSchema, exports.AuthenticationPasswordSchema);
|
|
76
|
+
/**
|
|
77
|
+
* @category Schemas
|
|
78
|
+
*/
|
|
79
|
+
exports.AuthenticationRegistrationSchema = (0, jsonschema_definer_1.mergeSchemas)(exports.UserLoginSchema, exports.AuthenticationRolesSchema);
|
|
80
|
+
/**
|
|
81
|
+
* @category Schemas
|
|
82
|
+
*/
|
|
83
|
+
exports.AuthenticationCustomAttributesSchema = jsonschema_definer_1.default.shape({
|
|
84
|
+
attributes: jsonschema_definer_1.default.shape({}).additionalProperties(true).optional()
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* @category Schemas
|
|
88
|
+
*/
|
|
89
|
+
exports.AuthenticationUserSchema = (0, jsonschema_definer_1.mergeMultipleSchemas)(exports.AuthenticationIdSchema, exports.AuthenticationEmailSchema, exports.AuthenticationRolesSchema, exports.AuthenticationCustomAttributesSchema);
|
|
90
|
+
/**
|
|
91
|
+
* @category Schemas
|
|
92
|
+
*/
|
|
93
|
+
exports.AuthenticationCreateUserCommandSchema = (0, jsonschema_definer_1.mergeSchemas)(exports.AuthenticationUserSchema, exports.AuthenticationPasswordSchema);
|
|
94
|
+
exports.AuthenticationUpdateUserCommandSchema = (0, jsonschema_definer_1.mergeSchemas)((0, jsonschema_definer_1.omitFromSchema)(exports.AuthenticationCreateUserCommandSchema, ['password', 'id', 'roles']).partial(), jsonschema_definer_1.default.shape({ providerId: jsonschema_definer_1.default.string() }));
|
|
95
|
+
/**
|
|
96
|
+
* @category Schemas
|
|
97
|
+
*/
|
|
98
|
+
exports.AuthenticationResponseSchema = (0, jsonschema_definer_1.mergeSchemas)(exports.AuthenticationRolesSchema, jsonschema_definer_1.default.shape({
|
|
99
|
+
'expires_in': jsonschema_definer_1.default.number(),
|
|
100
|
+
'refresh_expires_in': jsonschema_definer_1.default.number(),
|
|
101
|
+
'not-before-policy': jsonschema_definer_1.default.number(),
|
|
102
|
+
'access_token': jsonschema_definer_1.default.string(),
|
|
103
|
+
'refresh_token': jsonschema_definer_1.default.string(),
|
|
104
|
+
'token_type': jsonschema_definer_1.default.string(),
|
|
105
|
+
'session_state': jsonschema_definer_1.default.string(),
|
|
106
|
+
'scope': jsonschema_definer_1.default.string(),
|
|
107
|
+
}));
|
|
108
|
+
//# sourceMappingURL=authentication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.js","sourceRoot":"","sources":["../src/authentication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAuG;AAMvG,6CAA6C;AAC7C,UAAU;AACV,6CAA6C;AAC7C;;GAEG;AACU,QAAA,sBAAsB,GAAG,4BAAC,CAAC,KAAK,CAAC;IAC5C,EAAE,EAAE,4BAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAC;AACH;;GAEG;AACU,QAAA,yBAAyB,GAAG,4BAAC,CAAC,KAAK,CAAC;IAC/C,KAAK,EAAE,4BAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAE,OAAO,CAAE;CACpC,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,4BAA4B,GAAG,4BAAC,CAAC,KAAK,CAAC;IAClD,QAAQ,EAAE,4BAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,wBAAwB,GAAG,4BAAC,CAAC,KAAK,CAAC;IAC9C,IAAI,EAAE,4BAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,yBAAyB,GAAG,4BAAC,CAAC,KAAK,CAAC;IAC/C,KAAK,EAAE,4BAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAE,4BAAC,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,8BAA8B,GAAG,4BAAC,CAAC,KAAK,CAAC;IACpD,UAAU,EAAE,4BAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,4BAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAGH;;GAEG;AACU,QAAA,gCAAgC,GAAG,IAAA,iCAAY,EAAE,iCAAyB,EAAE,sCAA8B,CAAE,CAAC;AAE1H;;GAEG;AACU,QAAA,eAAe,GA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,4BAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC,CAAC"}
|
package/build/cache.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { AdapterBase, PortEmitter } from './ports';
|
|
2
|
+
/**
|
|
3
|
+
* @category Main Types
|
|
4
|
+
*/
|
|
5
|
+
export type CacheAdapter<T = any> = CacheType & AdapterBase<T> & {
|
|
6
|
+
flushAll: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @category Main Types
|
|
10
|
+
*/
|
|
11
|
+
export type CachePort = PortEmitter & CacheType;
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare function set<T extends Record<string, any>>(key: string): (value: T, expirationSeconds?: number | boolean) => Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Stores a key value pair in cache
|
|
18
|
+
* @category Cache Port
|
|
19
|
+
* @param key The key to store in cache
|
|
20
|
+
* @param value The value to store in the key. Bear in mind that the value will be JSON stringified
|
|
21
|
+
* @param expirationSeconds TTL for the cache, in case of `false` passed, the cache would not expire
|
|
22
|
+
*/
|
|
23
|
+
export declare function set<T>(key: string, value: T, expirationSeconds?: number | false): Promise<T>;
|
|
24
|
+
/**
|
|
25
|
+
* @category Cache Port
|
|
26
|
+
* @param key
|
|
27
|
+
*/
|
|
28
|
+
export declare function get<T>(key: string): Promise<T>;
|
|
29
|
+
/**
|
|
30
|
+
* @category Cache Port
|
|
31
|
+
* @param key
|
|
32
|
+
*/
|
|
33
|
+
export declare function remove(key: string): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* @category Cache Port
|
|
36
|
+
* @param key
|
|
37
|
+
* @param value
|
|
38
|
+
*/
|
|
39
|
+
export declare function incrementBy(key: string, value: number): Promise<number>;
|
|
40
|
+
/**
|
|
41
|
+
* @category Cache Port
|
|
42
|
+
* @param function
|
|
43
|
+
*/
|
|
44
|
+
export declare function memoize<F extends Function>(func: F, expirationSeconds?: number | false): F;
|
|
45
|
+
/**
|
|
46
|
+
* @category Cache Port
|
|
47
|
+
* @param pattern
|
|
48
|
+
*/
|
|
49
|
+
export declare function keys(pattern: string): Promise<string[]>;
|
|
50
|
+
/**
|
|
51
|
+
* HEXISTS
|
|
52
|
+
* @category Cache Port
|
|
53
|
+
* */
|
|
54
|
+
export declare function hashExists(key: string, hash: string): Promise<boolean>;
|
|
55
|
+
/** HGET */
|
|
56
|
+
export declare function hashGet<T>(key: string, hash: string): Promise<T>;
|
|
57
|
+
/**
|
|
58
|
+
* HGExTALL
|
|
59
|
+
* It will always return a Record<string, string>, further coerce of types must be implemented by client
|
|
60
|
+
* @category Cache Port
|
|
61
|
+
*/
|
|
62
|
+
export declare function hashGetAll(key: string): Promise<Record<string, string>>;
|
|
63
|
+
/**
|
|
64
|
+
* HSET
|
|
65
|
+
* @category Cache Port
|
|
66
|
+
* */
|
|
67
|
+
export declare function hashSet<T>(key: string, hash: string, value: T): Promise<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* HSETNX
|
|
70
|
+
* @category Cache Port
|
|
71
|
+
* */
|
|
72
|
+
export declare function hashSetIfNotExists<T>(key: string, hash: string, value: T): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* HINCRBY
|
|
75
|
+
* @category Cache Port
|
|
76
|
+
* */
|
|
77
|
+
export declare function hashIncrementBy(key: string, hash: string, value: number): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* HDEL
|
|
80
|
+
* @category Cache Port
|
|
81
|
+
* */
|
|
82
|
+
export declare function hashDel(key: string, hash: string): Promise<boolean>;
|
|
83
|
+
/**
|
|
84
|
+
* @category Main Types
|
|
85
|
+
*/
|
|
86
|
+
export type CacheType = {
|
|
87
|
+
set: typeof set;
|
|
88
|
+
get: typeof get;
|
|
89
|
+
keys: typeof keys;
|
|
90
|
+
memoize: typeof memoize;
|
|
91
|
+
remove: typeof remove;
|
|
92
|
+
incrementBy: typeof incrementBy;
|
|
93
|
+
hashExists: typeof hashExists;
|
|
94
|
+
hashGet: typeof hashGet;
|
|
95
|
+
hashGetAll: typeof hashGetAll;
|
|
96
|
+
hashSet: typeof hashSet;
|
|
97
|
+
hashSetIfNotExists: typeof hashSetIfNotExists;
|
|
98
|
+
hashIncrementBy: typeof hashIncrementBy;
|
|
99
|
+
hashDel: typeof hashDel;
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,GAAG,IAAI,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG;IAC/D,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAG,GAAG,EAAE,MAAM,GAAK,CAAE,KAAK,EAAE,CAAC,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,KAAM,OAAO,CAAC,CAAC,CAAC,CAAA;AAC5I;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAG,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,KAAK,GAAI,OAAO,CAAC,CAAC,CAAC,CAAA;AACvG;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAG,GAAG,EAAE,MAAM,GAAI,OAAO,CAAC,CAAC,CAAC,CAAA;AAC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