@abyss-project/main 1.0.17 → 1.0.19
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/api/auth.api.d.ts +3 -1
- package/dist/api/auth.api.js +9 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/token-history.admin.api.d.ts +4 -0
- package/dist/api/token-history.admin.api.js +18 -0
- package/dist/translate/en.translate.d.ts +14 -0
- package/dist/translate/en.translate.js +14 -0
- package/dist/translate/fr.translate.d.ts +14 -0
- package/dist/translate/fr.translate.js +14 -0
- package/dist/types/enum/token-type.enum.d.ts +2 -1
- package/dist/types/enum/token-type.enum.js +1 -0
- package/dist/types/enum/user-ticket-category.enum.d.ts +1 -0
- package/dist/types/enum/user-ticket-category.enum.js +1 -0
- package/dist/types/interface/api/index.d.ts +2 -0
- package/dist/types/interface/api/index.js +2 -0
- package/dist/types/interface/api/requests/auth.request.d.ts +7 -0
- package/dist/types/interface/api/requests/token-history.admin.request.d.ts +11 -0
- package/dist/types/interface/api/requests/token-history.admin.request.js +2 -0
- package/dist/types/interface/api/responses/auth.response.d.ts +8 -0
- package/dist/types/interface/api/responses/token-history.admin.response.d.ts +12 -0
- package/dist/types/interface/api/responses/token-history.admin.response.js +2 -0
- package/dist/types/interface/models/token-history.model.d.ts +6 -0
- package/dist/types/session.d.ts +4 -0
- package/dist/types/utils/email.utils.d.ts +1 -0
- package/dist/types/utils/email.utils.js +8 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.js +1 -0
- package/package.json +1 -1
package/dist/api/auth.api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ILoginAuthBody, ILoginAuthResponse, IRefreshAuthResponse, ISignupAuthBody, ISignupAuthResponse, IOAuthAuthBody, IOAuthAuthResponse, ISendEmailVerificationAuthBody, ISendEmailVerificationAuthResponse, IVerifyEmailAuthQuery, IVerifyEmailAuthResponse, ISendEmailResetPasswordAuthBody, ISendEmailResetPasswordAuthResponse, IResetPasswordAuthBody, IResetPasswordAuthQuery, IResetPasswordAuthResponse, IActivateServiceAuthQuery, IActivateServiceAuthResponse } from '../types';
|
|
1
|
+
import { ILoginAuthBody, ILoginAuthResponse, IRefreshAuthResponse, ISignupAuthBody, ISignupAuthResponse, IOAuthAuthBody, IOAuthAuthResponse, ISendEmailVerificationAuthBody, ISendEmailVerificationAuthResponse, IVerifyEmailAuthQuery, IVerifyEmailAuthResponse, ISendEmailResetPasswordAuthBody, ISendEmailResetPasswordAuthResponse, IResetPasswordAuthBody, IResetPasswordAuthQuery, IResetPasswordAuthResponse, IActivateServiceAuthQuery, IActivateServiceAuthResponse, IGetEmailVerificationCodeAuthBody, IGetEmailVerificationCodeAuthResponse, IGetEmailVerificationTokenAuthResponse, IGetEmailVerificationTokenAuthBody } from '../types';
|
|
2
2
|
export declare const login: (body: ILoginAuthBody) => Promise<ILoginAuthResponse>;
|
|
3
3
|
export declare const refresh: () => Promise<IRefreshAuthResponse>;
|
|
4
4
|
export declare const register: (body: ISignupAuthBody) => Promise<ISignupAuthResponse>;
|
|
@@ -8,3 +8,5 @@ export declare const verifyEmail: (query: IVerifyEmailAuthQuery) => Promise<IVer
|
|
|
8
8
|
export declare const sendEmailResetPassword: (body: ISendEmailResetPasswordAuthBody) => Promise<ISendEmailResetPasswordAuthResponse>;
|
|
9
9
|
export declare const resetPassword: (body: IResetPasswordAuthBody, query: IResetPasswordAuthQuery) => Promise<IResetPasswordAuthResponse>;
|
|
10
10
|
export declare const activateService: (query: IActivateServiceAuthQuery) => Promise<IActivateServiceAuthResponse>;
|
|
11
|
+
export declare const getEmailVerificationCode: (body: IGetEmailVerificationCodeAuthBody) => Promise<IGetEmailVerificationCodeAuthResponse>;
|
|
12
|
+
export declare const getEmailVerificationToken: (body: IGetEmailVerificationTokenAuthBody) => Promise<IGetEmailVerificationTokenAuthResponse>;
|
package/dist/api/auth.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.activateService = exports.resetPassword = exports.sendEmailResetPassword = exports.verifyEmail = exports.sendVerificationEmail = exports.oauth = exports.register = exports.refresh = exports.login = void 0;
|
|
3
|
+
exports.getEmailVerificationToken = exports.getEmailVerificationCode = exports.activateService = exports.resetPassword = exports.sendEmailResetPassword = exports.verifyEmail = exports.sendVerificationEmail = exports.oauth = exports.register = exports.refresh = exports.login = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const login = async (body) => {
|
|
6
6
|
const response = await __1.AbyssCore.axios.post('auth/login', body);
|
|
@@ -55,3 +55,11 @@ const activateService = async (query) => {
|
|
|
55
55
|
return (await __1.AbyssCore.axios.post('auth/activate-service', {}, { params: query })).data;
|
|
56
56
|
};
|
|
57
57
|
exports.activateService = activateService;
|
|
58
|
+
const getEmailVerificationCode = async (body) => {
|
|
59
|
+
return await __1.AbyssCore.axios.post('auth/email-verification/get-code', body);
|
|
60
|
+
};
|
|
61
|
+
exports.getEmailVerificationCode = getEmailVerificationCode;
|
|
62
|
+
const getEmailVerificationToken = async (body) => {
|
|
63
|
+
return (await __1.AbyssCore.axios.post('auth/email-verification/get-token', body)).data;
|
|
64
|
+
};
|
|
65
|
+
exports.getEmailVerificationToken = getEmailVerificationToken;
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -37,3 +37,4 @@ __exportStar(require("./project-access.admin.api"), exports);
|
|
|
37
37
|
__exportStar(require("./project-access.api"), exports);
|
|
38
38
|
__exportStar(require("./billing.api"), exports);
|
|
39
39
|
__exportStar(require("./newsletter.admin.api"), exports);
|
|
40
|
+
__exportStar(require("./token-history.admin.api"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IGetByTokenTokenHistoryAdminParams, IGetByTokenTokenHistoryAdminResponse, IGetTokenHistoryAdminParams, IGetTokenHistoryAdminResponse, IPaginateTokenHistoryAdminQuery, IPaginateTokenHistoryAdminResponse } from '../types';
|
|
2
|
+
export declare const getTokenHistoryAdmin: (params: IGetTokenHistoryAdminParams) => Promise<IGetTokenHistoryAdminResponse>;
|
|
3
|
+
export declare const getByTokenTokenHistoryAdmin: (params: IGetByTokenTokenHistoryAdminParams) => Promise<IGetByTokenTokenHistoryAdminResponse>;
|
|
4
|
+
export declare const paginateTokenHistoryAdmin: (query: IPaginateTokenHistoryAdminQuery) => Promise<IPaginateTokenHistoryAdminResponse>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateTokenHistoryAdmin = exports.getByTokenTokenHistoryAdmin = exports.getTokenHistoryAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getTokenHistoryAdmin = async (params) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.get(`token-history/admin/${params.tokenHistoryId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getTokenHistoryAdmin = getTokenHistoryAdmin;
|
|
9
|
+
const getByTokenTokenHistoryAdmin = async (params) => {
|
|
10
|
+
return (await __1.AbyssCore.axios.get(`token-history/admin/token/${params.token}`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.getByTokenTokenHistoryAdmin = getByTokenTokenHistoryAdmin;
|
|
13
|
+
const paginateTokenHistoryAdmin = async (query) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.get(`token-history/admin/paginate`, {
|
|
15
|
+
params: query,
|
|
16
|
+
})).data;
|
|
17
|
+
};
|
|
18
|
+
exports.paginateTokenHistoryAdmin = paginateTokenHistoryAdmin;
|
|
@@ -178,5 +178,19 @@ export declare const enTranslation: {
|
|
|
178
178
|
content: string;
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
|
+
ABYSS_FORM: {
|
|
182
|
+
FORM_SUBMISSION_COMPLETED: {
|
|
183
|
+
title: string;
|
|
184
|
+
content: string;
|
|
185
|
+
};
|
|
186
|
+
FORM_WEBHOOK_UNDELIVERABLE: {
|
|
187
|
+
title: string;
|
|
188
|
+
content: string;
|
|
189
|
+
};
|
|
190
|
+
FORM_WEBHOOK_UNDELIVERABLE_DISABLE: {
|
|
191
|
+
title: string;
|
|
192
|
+
content: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
181
195
|
};
|
|
182
196
|
};
|
|
@@ -182,5 +182,19 @@ exports.enTranslation = {
|
|
|
182
182
|
content: 'A new post has been published in the project "{projectName}"',
|
|
183
183
|
},
|
|
184
184
|
},
|
|
185
|
+
[types_1.AbyssService.ABYSS_FORM]: {
|
|
186
|
+
[types_1.UserNotificationContentType.FORM_SUBMISSION_COMPLETED]: {
|
|
187
|
+
title: 'New Form Submission',
|
|
188
|
+
content: 'A new submission has been made for form "{formTitle}"',
|
|
189
|
+
},
|
|
190
|
+
[types_1.UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE]: {
|
|
191
|
+
title: 'Webhook Failure',
|
|
192
|
+
content: 'An error occurred on the webhook "{formWebhookName}" of the form "{formTitle}" ({totalFailureInRow} consecutive failures)',
|
|
193
|
+
},
|
|
194
|
+
[types_1.UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE_DISABLE]: {
|
|
195
|
+
title: 'Webhook Disabled',
|
|
196
|
+
content: `The webhook {formWebhookName} of the form "{formTitle}" has been disabled due to multiple errors`,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
185
199
|
},
|
|
186
200
|
};
|
|
@@ -178,5 +178,19 @@ export declare const frTranslation: {
|
|
|
178
178
|
content: string;
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
|
+
ABYSS_FORM: {
|
|
182
|
+
FORM_SUBMISSION_COMPLETED: {
|
|
183
|
+
title: string;
|
|
184
|
+
content: string;
|
|
185
|
+
};
|
|
186
|
+
FORM_WEBHOOK_UNDELIVERABLE: {
|
|
187
|
+
title: string;
|
|
188
|
+
content: string;
|
|
189
|
+
};
|
|
190
|
+
FORM_WEBHOOK_UNDELIVERABLE_DISABLE: {
|
|
191
|
+
title: string;
|
|
192
|
+
content: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
181
195
|
};
|
|
182
196
|
};
|
|
@@ -182,5 +182,19 @@ exports.frTranslation = {
|
|
|
182
182
|
content: 'Un nouveau post a été publié dans le projet "{projectName}"',
|
|
183
183
|
},
|
|
184
184
|
},
|
|
185
|
+
[types_1.AbyssService.ABYSS_FORM]: {
|
|
186
|
+
[types_1.UserNotificationContentType.FORM_SUBMISSION_COMPLETED]: {
|
|
187
|
+
title: 'Nouvelle soumission de formulaire',
|
|
188
|
+
content: 'Une nouvelle soumission a été faite pour le formulaire "{formTitle}"',
|
|
189
|
+
},
|
|
190
|
+
[types_1.UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE]: {
|
|
191
|
+
title: 'Echec de Webhook',
|
|
192
|
+
content: 'Une erreur est survenue sur le Webhook "{formWebhookName}" du formulaire "{formTitle}" ({totalFailureInRow} échec(s) consécutifs)',
|
|
193
|
+
},
|
|
194
|
+
[types_1.UserNotificationContentType.FORM_WEBHOOK_UNDELIVERABLE_DISABLE]: {
|
|
195
|
+
title: 'Désactivation du Webhook',
|
|
196
|
+
content: `Le Webhook {formWebhookName} du formulaire "{formTitle}" a été désactivé pour cause d'erreurs multiples`,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
185
199
|
},
|
|
186
200
|
};
|
|
@@ -6,4 +6,5 @@ var TokenType;
|
|
|
6
6
|
TokenType["EMAIL_VERIFICATION"] = "EMAIL_VERIFICATION";
|
|
7
7
|
TokenType["PASSWORD_RESET"] = "PASSWORD_RESET";
|
|
8
8
|
TokenType["USER_INVITATION"] = "USER_INVITATION";
|
|
9
|
+
TokenType["PUBLIC_EMAIL_VERIFICATION"] = "PUBLIC_EMAIL_VERIFICATION";
|
|
9
10
|
})(TokenType || (exports.TokenType = TokenType = {}));
|
|
@@ -9,5 +9,6 @@ var UserTicketCategory;
|
|
|
9
9
|
UserTicketCategory["PARTNERSHIP"] = "PARTNERSHIP";
|
|
10
10
|
UserTicketCategory["PROJECT_FINANCING"] = "PROJECT_PARTNERSHIP";
|
|
11
11
|
UserTicketCategory["ACCOUNT_MANAGEMENT"] = "ACCOUNT_MANAGEMENT";
|
|
12
|
+
UserTicketCategory["REPORT"] = "REPORT";
|
|
12
13
|
UserTicketCategory["OTHER"] = "OTHER";
|
|
13
14
|
})(UserTicketCategory || (exports.UserTicketCategory = UserTicketCategory = {}));
|
|
@@ -23,6 +23,7 @@ export * from './requests/project-access.admin.request';
|
|
|
23
23
|
export * from './requests/project-access.request';
|
|
24
24
|
export * from './requests/billing.request';
|
|
25
25
|
export * from './requests/newsletter.admin.request';
|
|
26
|
+
export * from './requests/token-history.admin.request';
|
|
26
27
|
export * from './responses/auth.response';
|
|
27
28
|
export * from './responses/user.response';
|
|
28
29
|
export * from './responses/user.admin.response';
|
|
@@ -46,3 +47,4 @@ export * from './responses/project-access.admin.response';
|
|
|
46
47
|
export * from './responses/project-access.response';
|
|
47
48
|
export * from './responses/billing.response';
|
|
48
49
|
export * from './responses/newsletter.admin.response';
|
|
50
|
+
export * from './responses/token-history.admin.response';
|
|
@@ -39,6 +39,7 @@ __exportStar(require("./requests/project-access.admin.request"), exports);
|
|
|
39
39
|
__exportStar(require("./requests/project-access.request"), exports);
|
|
40
40
|
__exportStar(require("./requests/billing.request"), exports);
|
|
41
41
|
__exportStar(require("./requests/newsletter.admin.request"), exports);
|
|
42
|
+
__exportStar(require("./requests/token-history.admin.request"), exports);
|
|
42
43
|
__exportStar(require("./responses/auth.response"), exports);
|
|
43
44
|
__exportStar(require("./responses/user.response"), exports);
|
|
44
45
|
__exportStar(require("./responses/user.admin.response"), exports);
|
|
@@ -62,3 +63,4 @@ __exportStar(require("./responses/project-access.admin.response"), exports);
|
|
|
62
63
|
__exportStar(require("./responses/project-access.response"), exports);
|
|
63
64
|
__exportStar(require("./responses/billing.response"), exports);
|
|
64
65
|
__exportStar(require("./responses/newsletter.admin.response"), exports);
|
|
66
|
+
__exportStar(require("./responses/token-history.admin.response"), exports);
|
|
@@ -38,3 +38,10 @@ export interface IResetPasswordAuthBody {
|
|
|
38
38
|
export interface IActivateServiceAuthQuery {
|
|
39
39
|
service: Omit<AbyssService, AbyssService.ABYSS | AbyssService.ABYSS_MONITOR | AbyssService.ABYSS_STORAGE>;
|
|
40
40
|
}
|
|
41
|
+
export interface IGetEmailVerificationCodeAuthBody {
|
|
42
|
+
email: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IGetEmailVerificationTokenAuthBody {
|
|
45
|
+
email: string;
|
|
46
|
+
code: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QueryPaginate } from '..';
|
|
2
|
+
import { TokenType } from '../../../enum';
|
|
3
|
+
export interface IGetTokenHistoryAdminParams {
|
|
4
|
+
tokenHistoryId: string;
|
|
5
|
+
}
|
|
6
|
+
export type IPaginateTokenHistoryAdminQuery = {
|
|
7
|
+
type?: TokenType[];
|
|
8
|
+
} & QueryPaginate;
|
|
9
|
+
export interface IGetByTokenTokenHistoryAdminParams {
|
|
10
|
+
token: string;
|
|
11
|
+
}
|
|
@@ -40,3 +40,11 @@ export interface IActivateServiceAuthData {
|
|
|
40
40
|
isNewActivation: boolean;
|
|
41
41
|
}
|
|
42
42
|
export type IActivateServiceAuthResponse = IResponse<IActivateServiceAuthData>;
|
|
43
|
+
export interface IGetEmailVerificationCodeAuthData {
|
|
44
|
+
}
|
|
45
|
+
export type IGetEmailVerificationCodeAuthResponse = IResponse<IGetEmailVerificationCodeAuthData>;
|
|
46
|
+
export interface IGetEmailVerificationTokenAuthData {
|
|
47
|
+
token: string;
|
|
48
|
+
email: string;
|
|
49
|
+
}
|
|
50
|
+
export type IGetEmailVerificationTokenAuthResponse = IResponse<IGetEmailVerificationTokenAuthData>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BasePaginate, IResponse, ITokenHistory } from '../..';
|
|
2
|
+
export interface IGetTokenHistoryAdminData {
|
|
3
|
+
tokenHistory: ITokenHistory;
|
|
4
|
+
decodedToken: unknown | null;
|
|
5
|
+
}
|
|
6
|
+
export type IGetTokenHistoryAdminResponse = IResponse<IGetTokenHistoryAdminData>;
|
|
7
|
+
export type IPaginateTokenHistoryAdminResponse = IResponse<BasePaginate<ITokenHistory>>;
|
|
8
|
+
export interface IGetByTokenTokenHistoryAdminData {
|
|
9
|
+
tokenHistory: ITokenHistory;
|
|
10
|
+
decodedToken: unknown | null;
|
|
11
|
+
}
|
|
12
|
+
export type IGetByTokenTokenHistoryAdminResponse = IResponse<IGetByTokenTokenHistoryAdminData>;
|
|
@@ -12,11 +12,13 @@ export type TokenHistoryMetadataUserInvitationInternal = {
|
|
|
12
12
|
projectInvitation?: TokenHistoryMetadataProject & TokenHistoryMetadataExtendsUserInvitation;
|
|
13
13
|
cloudInvitation?: TokenHistoryMetadataCloud & TokenHistoryMetadataExtendsUserInvitation;
|
|
14
14
|
eventInvitation?: TokenHistoryMetadataEvent & TokenHistoryMetadataExtendsUserInvitation;
|
|
15
|
+
publicMailVerification?: TokenHistoryMetadataPublicEmailVerification;
|
|
15
16
|
};
|
|
16
17
|
export type TokenHistoryMetadataUserInvitation = {
|
|
17
18
|
projectInvitation?: TokenHistoryMetadataProject;
|
|
18
19
|
cloudInvitation?: TokenHistoryMetadataCloud;
|
|
19
20
|
eventInvitation?: TokenHistoryMetadataEvent;
|
|
21
|
+
publicMailVerification?: TokenHistoryMetadataPublicEmailVerification;
|
|
20
22
|
};
|
|
21
23
|
export type TokenHistoryMetadataProject = {
|
|
22
24
|
projectId: string;
|
|
@@ -42,3 +44,7 @@ export type TokenHistoryMetadataEvent = {
|
|
|
42
44
|
export type TokenHistoryMetadataExtendsUserInvitation = {
|
|
43
45
|
inviterId: string;
|
|
44
46
|
};
|
|
47
|
+
export type TokenHistoryMetadataPublicEmailVerification = {
|
|
48
|
+
email: string;
|
|
49
|
+
code: string;
|
|
50
|
+
};
|
package/dist/types/session.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sanitizeEmail: (email: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sanitizeEmail = void 0;
|
|
4
|
+
const sanitizeEmail = (email) => {
|
|
5
|
+
const sanitizedEmail = email.split('+')[0] + '@' + email.split('@')[1];
|
|
6
|
+
return sanitizedEmail.trim().toLowerCase();
|
|
7
|
+
};
|
|
8
|
+
exports.sanitizeEmail = sanitizeEmail;
|
|
@@ -19,3 +19,4 @@ __exportStar(require("./require-one.util"), exports);
|
|
|
19
19
|
__exportStar(require("./convert-query.util"), exports);
|
|
20
20
|
__exportStar(require("./notifications.type-util"), exports);
|
|
21
21
|
__exportStar(require("./billing.util"), exports);
|
|
22
|
+
__exportStar(require("./email.utils"), exports);
|