resurgence-data 1.0.1 → 1.0.3

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,20 @@
1
+ export interface AuthenticationBillerRole {
2
+ userId: string;
3
+ authenticationId: string;
4
+ billerId: string;
5
+ role: string;
6
+ }
7
+ export interface LoggedInUser {
8
+ firstName: string;
9
+ lastName: string;
10
+ emaiLAddress: string;
11
+ phoneNumber: string;
12
+ merchantRoles: AuthenticationBillerRole[];
13
+ }
14
+ export interface ResetPasswordEmailRequest {
15
+ firstName: string;
16
+ emailAddress: string;
17
+ actionUrl: string;
18
+ }
19
+ export interface NewUserEmailRequest extends ResetPasswordEmailRequest {
20
+ }
@@ -0,0 +1,37 @@
1
+ export declare class SignUpDTO {
2
+ firstName: string;
3
+ lastName: string;
4
+ emailAddress: string;
5
+ phoneNumber: string;
6
+ }
7
+ export declare class LoginRequestDTO {
8
+ emailAddress: string;
9
+ password: string;
10
+ }
11
+ export declare class RecoverAccountDTO {
12
+ emailAddress: string;
13
+ }
14
+ export declare class SendInviteDTO {
15
+ billerId: string;
16
+ emailAddress: string;
17
+ role: string;
18
+ }
19
+ export declare class ActivationRequestDTO {
20
+ token: string;
21
+ password: string;
22
+ passwordConfirm?: string;
23
+ }
24
+ export declare class UpdateAuthenticationDTO {
25
+ userId: string;
26
+ active?: boolean;
27
+ role?: string;
28
+ }
29
+ export declare class TwoFactorAuthRequestDTO {
30
+ emailAddress: string;
31
+ token: string;
32
+ }
33
+ export declare class LoginResponseDTO {
34
+ twoFactorEnabled: boolean;
35
+ message?: string;
36
+ token?: string;
37
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./authentication.data";
2
+ export * from "./authentication.dto";
3
+ export * from "./invite.dto";
File without changes
@@ -0,0 +1,15 @@
1
+ export declare class InviteRequestDTO {
2
+ firstName: string;
3
+ lastName: string;
4
+ emailAddress: string;
5
+ role: string;
6
+ billerId: string;
7
+ userId: string;
8
+ }
9
+ export declare class AcceptInviteInviteDTO {
10
+ token: string;
11
+ password: string;
12
+ }
13
+ export declare class RevokeInviteDTO {
14
+ id: string;
15
+ }
@@ -0,0 +1,7 @@
1
+ import { Exception } from './exception';
2
+ export declare class InvalidCredentialsException extends Exception {
3
+ }
4
+ export declare class InvalidUserException extends Exception {
5
+ }
6
+ export declare class InactiveUserException extends Exception {
7
+ }
@@ -0,0 +1,5 @@
1
+ import { Exception } from './exception';
2
+ export declare class InvalidAuthorizationException extends Exception {
3
+ }
4
+ export declare class ExpiredAuthorizationException extends Exception {
5
+ }
@@ -0,0 +1,3 @@
1
+ import { Exception } from "./exception";
2
+ export declare class InvalidPayloadException extends Exception {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { Exception } from "./exception";
2
+ export declare class DatabaseProcessException extends Exception {
3
+ }
@@ -0,0 +1,6 @@
1
+ import { ErrorContent } from "../types/error.type";
2
+ export declare class Exception extends Error {
3
+ description?: string;
4
+ status: number | 500;
5
+ constructor(errorContent?: ErrorContent);
6
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./resource.exception";
2
+ export * from "./exception";
3
+ export * from "./authentication.exception";
4
+ export * from "./authorization.exception";
5
+ export * from "./database.exception";
@@ -0,0 +1,9 @@
1
+ import { Exception } from "./exception";
2
+ export declare class ResourceNotFoundException extends Exception {
3
+ }
4
+ export declare class ResourceExistsException extends Exception {
5
+ }
6
+ export declare class UnauthorizedResourceActionException extends Exception {
7
+ }
8
+ export declare class ExpiredResourceException extends Exception {
9
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./authentication";
2
+ export * from "./response";
3
+ export * from "./exception";
@@ -0,0 +1 @@
1
+ export * from "./response.dto";
@@ -0,0 +1,6 @@
1
+ export interface GeneralResponseDTO {
2
+ message: string;
3
+ }
4
+ export interface LoginResponse {
5
+ token: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ export declare const accountTypes: string[];
2
+ export declare const InviteStatuses: string[];
@@ -0,0 +1,5 @@
1
+ export interface ErrorContent {
2
+ message: string;
3
+ status?: number;
4
+ description: string;
5
+ }
@@ -0,0 +1 @@
1
+ export * from "./user";
@@ -0,0 +1,13 @@
1
+ export declare class CreateUserDTO {
2
+ firstName: string;
3
+ lastName: string;
4
+ emailAddress: string;
5
+ phoneNumber: string;
6
+ businessName: string;
7
+ avatarUrl?: string;
8
+ corporate?: boolean;
9
+ accountType: string;
10
+ }
11
+ export declare class UpdateUserDTO extends CreateUserDTO {
12
+ id: string;
13
+ }
@@ -0,0 +1,2 @@
1
+ import { ValidationOptions } from "class-validator";
2
+ export declare function isSameAs(property: string, validationOptions: ValidationOptions): (object: Object, propertyName: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resurgence-data",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "DTOs and shareable resources",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",