@abyss-project/main 1.0.23 → 1.0.25
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/project.api.d.ts +3 -1
- package/dist/api/project.api.js +9 -1
- package/dist/index.js +2 -2
- package/dist/types/enum/abyss-application-event.enum.d.ts +3 -0
- package/dist/types/enum/abyss-application-event.enum.js +7 -0
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/project-application-access-permission.enum.d.ts +4 -0
- package/dist/types/enum/project-application-access-permission.enum.js +4 -0
- package/dist/types/enum/project-status.enum.d.ts +5 -0
- package/dist/types/enum/project-status.enum.js +9 -0
- package/dist/types/enum/subscription-level.enum.d.ts +1 -0
- package/dist/types/enum/subscription-level.enum.js +3 -0
- package/dist/types/enum/user-credit-purchase-currency.enum.d.ts +5 -0
- package/dist/types/enum/user-credit-purchase-currency.enum.js +5 -0
- package/dist/types/interface/api/requests/project.request.d.ts +12 -1
- package/dist/types/interface/api/requests/user.request.d.ts +2 -1
- package/dist/types/interface/api/responses/project.response.d.ts +13 -1
- package/dist/types/interface/models/project.model.d.ts +4 -0
- package/dist/types/interface/models/user.model.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICreateProjectBody, ICreateProjectResponse, ICreateSubscriptionProjectBody, ICreateSubscriptionProjectParams, ICreateSubscriptionProjectResponse, IDeleteProjectQuery, IDeleteProjectParams, IDeleteProjectResponse, IGetMetricsProjectParams, IGetMetricsProjectResponse, IGetProjectParams, IGetProjectResponse, ILeaveProjectParams, ILeaveProjectResponse, IListProjectResponse, IPaginateProjectQuery, IPaginateProjectResponse, IPaginateTransactionProjectParams, IPaginateTransactionProjectQuery, IPaginateTransactionProjectResponse, IRenewSubscriptionProjectParams, IRenewSubscriptionProjectResponse, ISetOwnershipProjectBody, ISetOwnershipProjectParams, ISetOwnershipProjectResponse, IUpdateProjectBody, IUpdateProjectParams, IUpdateProjectResponse, IUpdateSubscriptionProjectBody, IUpdateSubscriptionProjectParams, IUpdateSubscriptionProjectResponse } from '../types';
|
|
1
|
+
import { ICreateProjectBody, ICreateProjectResponse, ICreateSubscriptionProjectBody, ICreateSubscriptionProjectParams, ICreateSubscriptionProjectResponse, IDeleteProjectQuery, IDeleteProjectParams, IDeleteProjectResponse, IGetMetricsProjectParams, IGetMetricsProjectResponse, IGetProjectParams, IGetProjectResponse, ILeaveProjectParams, ILeaveProjectResponse, IListProjectResponse, IPaginateProjectQuery, IPaginateProjectResponse, IPaginateTransactionProjectParams, IPaginateTransactionProjectQuery, IPaginateTransactionProjectResponse, IRenewSubscriptionProjectParams, IRenewSubscriptionProjectResponse, ISetOwnershipProjectBody, ISetOwnershipProjectParams, ISetOwnershipProjectResponse, IUpdateProjectBody, IUpdateProjectParams, IUpdateProjectResponse, IUpdateSubscriptionProjectBody, IUpdateSubscriptionProjectParams, IUpdateSubscriptionProjectResponse, IPictureProjectResponse, IPictureProjectParams, IImportPictureFromCollectionProjectResponse, IImportPictureFromCollectionProjectBody, IImportPictureFromCollectionProjectParams } from '../types';
|
|
2
2
|
export declare const getProject: (params: IGetProjectParams) => Promise<IGetProjectResponse>;
|
|
3
3
|
export declare const getMetricsProject: (params: IGetMetricsProjectParams) => Promise<IGetMetricsProjectResponse>;
|
|
4
4
|
export declare const paginateProject: (query: IPaginateProjectQuery) => Promise<IPaginateProjectResponse>;
|
|
@@ -12,3 +12,5 @@ export declare const createSubscriptionProject: (params: ICreateSubscriptionProj
|
|
|
12
12
|
export declare const renewSubscriptionProject: (params: IRenewSubscriptionProjectParams) => Promise<IRenewSubscriptionProjectResponse>;
|
|
13
13
|
export declare const updateSubscriptionProject: (params: IUpdateSubscriptionProjectParams, body: IUpdateSubscriptionProjectBody) => Promise<IUpdateSubscriptionProjectResponse>;
|
|
14
14
|
export declare const setOwnershipProject: (params: ISetOwnershipProjectParams, body: ISetOwnershipProjectBody) => Promise<ISetOwnershipProjectResponse>;
|
|
15
|
+
export declare const pictureProject: (params: IPictureProjectParams) => Promise<IPictureProjectResponse>;
|
|
16
|
+
export declare const importProfilePictureFromCollectionProject: (params: IImportPictureFromCollectionProjectParams, body: IImportPictureFromCollectionProjectBody) => Promise<IImportPictureFromCollectionProjectResponse>;
|
package/dist/api/project.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setOwnershipProject = exports.updateSubscriptionProject = exports.renewSubscriptionProject = exports.createSubscriptionProject = exports.leaveProject = exports.createProject = exports.updateProject = exports.deleteProject = exports.listProject = exports.paginateTransactionProject = exports.paginateProject = exports.getMetricsProject = exports.getProject = void 0;
|
|
3
|
+
exports.importProfilePictureFromCollectionProject = exports.pictureProject = exports.setOwnershipProject = exports.updateSubscriptionProject = exports.renewSubscriptionProject = exports.createSubscriptionProject = exports.leaveProject = exports.createProject = exports.updateProject = exports.deleteProject = exports.listProject = exports.paginateTransactionProject = exports.paginateProject = exports.getMetricsProject = exports.getProject = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const getProject = async (params) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.get(`project/${params.projectId}`)).data;
|
|
@@ -60,3 +60,11 @@ const setOwnershipProject = async (params, body) => {
|
|
|
60
60
|
return (await __1.AbyssCore.axios.post(`project/${params.projectId}/set-ownership`, body)).data;
|
|
61
61
|
};
|
|
62
62
|
exports.setOwnershipProject = setOwnershipProject;
|
|
63
|
+
const pictureProject = async (params) => {
|
|
64
|
+
return (await __1.AbyssCore.axios.post(`project/${params.projectId}/picture`)).data;
|
|
65
|
+
};
|
|
66
|
+
exports.pictureProject = pictureProject;
|
|
67
|
+
const importProfilePictureFromCollectionProject = async (params, body) => {
|
|
68
|
+
return (await __1.AbyssCore.axios.post(`project/${params.projectId}/picture/import-from-collection`, body)).data;
|
|
69
|
+
};
|
|
70
|
+
exports.importProfilePictureFromCollectionProject = importProfilePictureFromCollectionProject;
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ __exportStar(require("./types"), exports);
|
|
|
38
38
|
__exportStar(require("./utils"), exports);
|
|
39
39
|
__exportStar(require("./front"), exports);
|
|
40
40
|
__exportStar(require("./translate"), exports);
|
|
41
|
-
const
|
|
41
|
+
const DEFAULT_BASE_URL = 'https://app-api.abyss-project.fr/api/';
|
|
42
42
|
exports.API_KEY_PROJECT_HEADER = 'abyss-main-project-api-key';
|
|
43
43
|
exports.ADMIN_TOKEN_HEADER = 'abyss-admin-token';
|
|
44
44
|
const NUMBER_RETRY_API = 10;
|
|
@@ -86,6 +86,6 @@ AbyssCore.config = {
|
|
|
86
86
|
apiKeyApplication: '',
|
|
87
87
|
applicationId: '',
|
|
88
88
|
adminToken: '',
|
|
89
|
-
baseURL:
|
|
89
|
+
baseURL: DEFAULT_BASE_URL,
|
|
90
90
|
};
|
|
91
91
|
AbyssCore.axios = axios_1.default.create({ baseURL: _a.config.baseURL });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbyssApplicationEvent = void 0;
|
|
4
|
+
var AbyssApplicationEvent;
|
|
5
|
+
(function (AbyssApplicationEvent) {
|
|
6
|
+
AbyssApplicationEvent["SYSTEM_STARTUP_API_STARTUP"] = "system-startup.api.startup";
|
|
7
|
+
})(AbyssApplicationEvent || (exports.AbyssApplicationEvent = AbyssApplicationEvent = {}));
|
|
@@ -16,3 +16,5 @@ export * from './project-application-access-permission.enum';
|
|
|
16
16
|
export * from './billing-product.enum';
|
|
17
17
|
export * from './subscription-level.enum';
|
|
18
18
|
export * from './newsletter-type.enum';
|
|
19
|
+
export * from './project-status.enum';
|
|
20
|
+
export * from './abyss-application-event.enum';
|
package/dist/types/enum/index.js
CHANGED
|
@@ -32,3 +32,5 @@ __exportStar(require("./project-application-access-permission.enum"), exports);
|
|
|
32
32
|
__exportStar(require("./billing-product.enum"), exports);
|
|
33
33
|
__exportStar(require("./subscription-level.enum"), exports);
|
|
34
34
|
__exportStar(require("./newsletter-type.enum"), exports);
|
|
35
|
+
__exportStar(require("./project-status.enum"), exports);
|
|
36
|
+
__exportStar(require("./abyss-application-event.enum"), exports);
|
|
@@ -15,6 +15,10 @@ export declare enum ProjectApplicationAccessPermission {
|
|
|
15
15
|
MONITOR_STORE_UPDATE = "MONITOR_STORE_UPDATE",
|
|
16
16
|
MONITOR_STORE_DELETE = "MONITOR_STORE_DELETE",
|
|
17
17
|
MONITOR_STORE_CREATE = "MONITOR_STORE_CREATE",
|
|
18
|
+
MONITOR_EVENT_READ = "MONITOR_EVENT_READ",
|
|
19
|
+
MONITOR_EVENT_UPDATE = "MONITOR_EVENT_UPDATE",
|
|
20
|
+
MONITOR_EVENT_DELETE = "MONITOR_EVENT_DELETE",
|
|
21
|
+
MONITOR_EVENT_CREATE = "MONITOR_EVENT_CREATE",
|
|
18
22
|
STORAGE_FULL_ACCESS = "STORAGE_FULL_ACCESS",
|
|
19
23
|
STORAGE_READ = "STORAGE_READ",
|
|
20
24
|
STORAGE_FILE_READ = "STORAGE_FILE_READ",
|
|
@@ -19,6 +19,10 @@ var ProjectApplicationAccessPermission;
|
|
|
19
19
|
ProjectApplicationAccessPermission["MONITOR_STORE_UPDATE"] = "MONITOR_STORE_UPDATE";
|
|
20
20
|
ProjectApplicationAccessPermission["MONITOR_STORE_DELETE"] = "MONITOR_STORE_DELETE";
|
|
21
21
|
ProjectApplicationAccessPermission["MONITOR_STORE_CREATE"] = "MONITOR_STORE_CREATE";
|
|
22
|
+
ProjectApplicationAccessPermission["MONITOR_EVENT_READ"] = "MONITOR_EVENT_READ";
|
|
23
|
+
ProjectApplicationAccessPermission["MONITOR_EVENT_UPDATE"] = "MONITOR_EVENT_UPDATE";
|
|
24
|
+
ProjectApplicationAccessPermission["MONITOR_EVENT_DELETE"] = "MONITOR_EVENT_DELETE";
|
|
25
|
+
ProjectApplicationAccessPermission["MONITOR_EVENT_CREATE"] = "MONITOR_EVENT_CREATE";
|
|
22
26
|
ProjectApplicationAccessPermission["STORAGE_FULL_ACCESS"] = "STORAGE_FULL_ACCESS";
|
|
23
27
|
ProjectApplicationAccessPermission["STORAGE_READ"] = "STORAGE_READ";
|
|
24
28
|
ProjectApplicationAccessPermission["STORAGE_FILE_READ"] = "STORAGE_FILE_READ";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectStatus = void 0;
|
|
4
|
+
var ProjectStatus;
|
|
5
|
+
(function (ProjectStatus) {
|
|
6
|
+
ProjectStatus["ACTIVE"] = "ACTIVE";
|
|
7
|
+
ProjectStatus["INACTIVE"] = "INACTIVE";
|
|
8
|
+
ProjectStatus["ARCHIVED"] = "ARCHIVED";
|
|
9
|
+
})(ProjectStatus || (exports.ProjectStatus = ProjectStatus = {}));
|
|
@@ -112,6 +112,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
112
112
|
logHistoryDays: 3,
|
|
113
113
|
statsHistoryDays: 3,
|
|
114
114
|
maxStoreEntry: 10,
|
|
115
|
+
eventPublishLimitPerDay: 100,
|
|
115
116
|
},
|
|
116
117
|
ABYSS_FORM: {
|
|
117
118
|
maxDocumentPerForm: 10,
|
|
@@ -135,6 +136,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
135
136
|
logHistoryDays: 7,
|
|
136
137
|
statsHistoryDays: 7,
|
|
137
138
|
maxStoreEntry: 100,
|
|
139
|
+
eventPublishLimitPerDay: 1000,
|
|
138
140
|
},
|
|
139
141
|
ABYSS_FORM: {
|
|
140
142
|
maxDocumentPerForm: 50,
|
|
@@ -158,6 +160,7 @@ exports.PROJECT_SUBSCRIPTION_CONFIG = {
|
|
|
158
160
|
logHistoryDays: Infinity,
|
|
159
161
|
statsHistoryDays: Infinity,
|
|
160
162
|
maxStoreEntry: 500,
|
|
163
|
+
eventPublishLimitPerDay: 10000,
|
|
161
164
|
},
|
|
162
165
|
ABYSS_FORM: {
|
|
163
166
|
maxDocumentPerForm: 100,
|
|
@@ -4,6 +4,11 @@ exports.UserCreditPurchaseCurrency = void 0;
|
|
|
4
4
|
var UserCreditPurchaseCurrency;
|
|
5
5
|
(function (UserCreditPurchaseCurrency) {
|
|
6
6
|
UserCreditPurchaseCurrency["EUR"] = "EUR";
|
|
7
|
+
UserCreditPurchaseCurrency["USD"] = "USD";
|
|
8
|
+
UserCreditPurchaseCurrency["GBP"] = "GBP";
|
|
9
|
+
UserCreditPurchaseCurrency["JPY"] = "JPY";
|
|
10
|
+
UserCreditPurchaseCurrency["CNY"] = "CNY";
|
|
11
|
+
UserCreditPurchaseCurrency["CHF"] = "CHF";
|
|
7
12
|
UserCreditPurchaseCurrency["UNKNOWN"] = "UNKNOWN";
|
|
8
13
|
UserCreditPurchaseCurrency["OTHER"] = "OTHER";
|
|
9
14
|
})(UserCreditPurchaseCurrency || (exports.UserCreditPurchaseCurrency = UserCreditPurchaseCurrency = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as core from 'express-serve-static-core';
|
|
2
2
|
import { QueryPaginate } from '../type-message/base-paginate';
|
|
3
|
-
import { SubscriptionLevel, UserTransactionType } from '../../../enum';
|
|
3
|
+
import { ProjectStatus, SubscriptionLevel, UserTransactionType } from '../../../enum';
|
|
4
4
|
export interface IGetProjectParams extends core.ParamsDictionary {
|
|
5
5
|
projectId: string;
|
|
6
6
|
}
|
|
@@ -33,6 +33,7 @@ export interface IUpdateProjectParams extends core.ParamsDictionary {
|
|
|
33
33
|
export type IUpdateProjectBody = {
|
|
34
34
|
name?: string;
|
|
35
35
|
description?: string | null;
|
|
36
|
+
status?: ProjectStatus;
|
|
36
37
|
};
|
|
37
38
|
export interface ILeaveProjectParams extends core.ParamsDictionary {
|
|
38
39
|
projectId: string;
|
|
@@ -59,3 +60,13 @@ export interface ISetOwnershipProjectParams extends core.ParamsDictionary {
|
|
|
59
60
|
export interface ISetOwnershipProjectBody {
|
|
60
61
|
userId: string;
|
|
61
62
|
}
|
|
63
|
+
export interface IPictureProjectParams {
|
|
64
|
+
projectId: string;
|
|
65
|
+
}
|
|
66
|
+
export interface IImportPictureFromCollectionProjectParams {
|
|
67
|
+
projectId: string;
|
|
68
|
+
}
|
|
69
|
+
export interface IImportPictureFromCollectionProjectBody {
|
|
70
|
+
source: string;
|
|
71
|
+
elementId: string;
|
|
72
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SubscriptionLevel, UserLanguage } from '../../../enum';
|
|
1
|
+
import { SubscriptionLevel, UserCreditPurchaseCurrency, UserLanguage } from '../../../enum';
|
|
2
2
|
import { TokenHistoryMetadataUserInvitation } from '../../models/token-history.model';
|
|
3
3
|
import { QueryPaginate } from '../type-message/base-paginate';
|
|
4
4
|
import * as core from 'express-serve-static-core';
|
|
@@ -25,6 +25,7 @@ export type IPaginateSponsorUserQuery = {
|
|
|
25
25
|
} & QueryPaginate;
|
|
26
26
|
export interface IUpdateSettingsUserBody {
|
|
27
27
|
language?: UserLanguage;
|
|
28
|
+
currency?: UserCreditPurchaseCurrency;
|
|
28
29
|
}
|
|
29
30
|
export interface ICreateSubscriptionUserBody {
|
|
30
31
|
level: SubscriptionLevel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasePaginate } from '..';
|
|
2
|
-
import { ProjectAccessPermission } from '../../../enum';
|
|
2
|
+
import { AbyssService, ProjectAccessPermission } from '../../../enum';
|
|
3
3
|
import { Overwrite } from '../../../utils';
|
|
4
4
|
import { IProjectAccess } from '../../models/project-access.model';
|
|
5
5
|
import { IProject } from '../../models/project.model';
|
|
@@ -8,6 +8,10 @@ import { IResponse } from '../type-message/response';
|
|
|
8
8
|
export type ProjectWithoutApplication = Overwrite<IProject, {
|
|
9
9
|
application: {
|
|
10
10
|
id: string;
|
|
11
|
+
enabledService: AbyssService[];
|
|
12
|
+
name: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
11
15
|
}[];
|
|
12
16
|
}>;
|
|
13
17
|
export interface IGetProjectData {
|
|
@@ -92,3 +96,11 @@ export interface ISetOwnershipProjectData {
|
|
|
92
96
|
project: IProject;
|
|
93
97
|
}
|
|
94
98
|
export type ISetOwnershipProjectResponse = IResponse<ISetOwnershipProjectData>;
|
|
99
|
+
export interface IPictureProjectData {
|
|
100
|
+
preSignUrl: string;
|
|
101
|
+
}
|
|
102
|
+
export type IPictureProjectResponse = IResponse<IPictureProjectData>;
|
|
103
|
+
export interface IImportPictureFromCollectionProjectData {
|
|
104
|
+
project: IProject;
|
|
105
|
+
}
|
|
106
|
+
export type IImportPictureFromCollectionProjectResponse = IResponse<IImportPictureFromCollectionProjectData>;
|
|
@@ -4,11 +4,15 @@ import { IProjectAccess } from './project-access.model';
|
|
|
4
4
|
import { IApplication } from './application.model';
|
|
5
5
|
import { ISubscription } from './subscription.model';
|
|
6
6
|
import { IUserTransaction } from './user-transaction.model';
|
|
7
|
+
import { ProjectStatus } from '../../enum';
|
|
7
8
|
export interface IProject {
|
|
8
9
|
id?: string;
|
|
9
10
|
name: string;
|
|
10
11
|
description: string | null;
|
|
11
12
|
userId: string;
|
|
13
|
+
pictureId: string | null;
|
|
14
|
+
pictureThumbnailId: string | null;
|
|
15
|
+
status: ProjectStatus;
|
|
12
16
|
updatedAt?: Date;
|
|
13
17
|
createdAt?: Date;
|
|
14
18
|
user?: IUser;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IGiftCodeActivation, IOAuthAccount, IProject, IUserTransaction } from '..';
|
|
2
|
-
import { AbyssService, UserLanguage } from '../../enum';
|
|
2
|
+
import { AbyssService, UserCreditPurchaseCurrency, UserLanguage } from '../../enum';
|
|
3
3
|
import { ISubscription } from './subscription.model';
|
|
4
4
|
import { IUserNotification } from './user-notification.model';
|
|
5
5
|
export interface IUserSetting {
|
|
6
6
|
language?: UserLanguage;
|
|
7
|
+
currency?: UserCreditPurchaseCurrency | null;
|
|
7
8
|
}
|
|
8
9
|
export interface IUser {
|
|
9
10
|
id?: string;
|
|
@@ -22,6 +23,7 @@ export interface IUser {
|
|
|
22
23
|
profilePictureId: string | null;
|
|
23
24
|
profilePictureThumbnailId: string | null;
|
|
24
25
|
joinNewsletterDate: Date | null;
|
|
26
|
+
lastPasswordChangeDate: Date | null;
|
|
25
27
|
updatedAt?: Date;
|
|
26
28
|
createdAt?: Date;
|
|
27
29
|
sponsor?: IUser | null;
|