@nomalism-com/types 1.3.22 → 1.3.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/index.js +1279 -1221
- package/dist/main.d.ts +7 -8
- package/dist/modules/document/order/interfaces.d.ts +9 -39
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +5 -2
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +4 -1
- package/dist/modules/document/purchase/interfaces.d.ts +7 -0
- package/dist/modules/integration/patchNotes/interfaces.d.ts +47 -0
- package/dist/modules/integration/projectInfo/interfaces.d.ts +25 -2
- package/dist/modules/llm/llm/interfaces.d.ts +19 -0
- package/dist/modules/llm/llm/route.schema.d.ts +2 -0
- package/dist/modules/stock/accountCode/interface.d.ts +11 -0
- package/dist/modules/stock/accountCode/route.schema.d.ts +2 -0
- package/dist/modules/stock/chat/interfaces.d.ts +22 -3
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +55 -0
- package/dist/modules/stock/dashboard/interface.d.ts +18 -11
- package/dist/modules/stock/gmails/interface.d.ts +1 -37
- package/dist/modules/supply/documentHeader/interfaces.d.ts +4 -2
- package/dist/modules/supply/documentLine/interfaces.d.ts +7 -1
- package/dist/modules/supply/documentType/interfaces.d.ts +3 -0
- package/dist/modules/ui/portal/interface.d.ts +16 -2
- package/dist/modules/ui/portal/route.schema.d.ts +1 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +20 -9
- package/dist/modules/user/clients/interface.d.ts +2 -1
- package/dist/modules/user/persona/interface.d.ts +8 -10
- package/dist/modules/user/providers/interface.d.ts +3 -0
- package/dist/modules/user/sessions/interface.d.ts +1 -2
- package/dist/shared/entities/integration.d.ts +41 -1
- package/dist/shared/entities/stock.d.ts +24 -0
- package/dist/shared/entities/user.d.ts +3 -0
- package/dist/shared/interface.d.ts +23 -8
- package/package.json +8 -8
- package/dist/modules/stock/gmails/route.schema.d.ts +0 -2
- package/dist/modules/user/groupPermissions/interface.d.ts +0 -25
- package/dist/modules/user/groupPermissions/route.schema.d.ts +0 -2
- package/dist/modules/user/permissions/interface.d.ts +0 -25
- package/dist/modules/user/permissions/route.schema.d.ts +0 -2
- package/dist/modules/user/userPermissions/interface.d.ts +0 -23
- package/dist/modules/user/userPermissions/route.schema.d.ts +0 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ChatSubscriber } from './../../../shared/entities/user';
|
|
1
|
+
import { ChatSubscriber, Persona } from './../../../shared/entities/user';
|
|
2
2
|
import * as IShared from '../../../shared/interface';
|
|
3
|
+
import { IChatType } from '../../stock/chat/interfaces';
|
|
3
4
|
export type Entity = ChatSubscriber;
|
|
4
5
|
export declare const Route = "chat_subscriber";
|
|
5
6
|
export declare const UpperName = "ChatSubscriber";
|
|
@@ -13,15 +14,25 @@ export interface IFindRequest {
|
|
|
13
14
|
owner_id: string;
|
|
14
15
|
document_header_id: string;
|
|
15
16
|
}
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
17
|
+
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | 'document_header_id'>;
|
|
18
|
+
export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
19
|
+
subscriptions: {
|
|
20
|
+
id: string;
|
|
21
|
+
document_header_id: string;
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone'> {
|
|
25
|
+
contact: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface IFindChatSubscriberResponse {
|
|
28
|
+
personas: IFindChatSubscriberPersona[];
|
|
29
|
+
chat_type: IChatType;
|
|
30
|
+
}
|
|
22
31
|
export interface IRepository {
|
|
23
|
-
createOrUpdate(data: ICreateOrUpdateRequest): Promise<
|
|
24
|
-
|
|
32
|
+
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
33
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
|
|
34
|
+
findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
|
|
35
|
+
clientWebAppFindByOwner(selector: IFindRequest): Promise<IFindChatSubscriberResponse>;
|
|
25
36
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
26
37
|
}
|
|
27
38
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -39,6 +39,7 @@ export interface ICreateRequest {
|
|
|
39
39
|
user_id?: string;
|
|
40
40
|
main_persona: ICreateMainPersona;
|
|
41
41
|
deferred_payment?: boolean;
|
|
42
|
+
is_donation_eligible?: boolean;
|
|
42
43
|
default_discount?: number;
|
|
43
44
|
exemption_reason_id?: string | null;
|
|
44
45
|
newsletter?: boolean;
|
|
@@ -69,6 +70,7 @@ export interface IUpdateRequest {
|
|
|
69
70
|
default_delivery_method_id?: string | null;
|
|
70
71
|
default_vehicle_id?: string | null;
|
|
71
72
|
deferred_payment?: boolean;
|
|
73
|
+
is_donation_eligible?: boolean;
|
|
72
74
|
}
|
|
73
75
|
export interface IRepository {
|
|
74
76
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
@@ -78,7 +80,6 @@ export interface IRepository {
|
|
|
78
80
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
79
81
|
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
80
82
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
81
|
-
createOrUpdate(data: ICreateRequest): Promise<IFindResponse>;
|
|
82
83
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
83
84
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
84
85
|
}
|
|
@@ -15,6 +15,7 @@ export interface IFindByOwnerIdResponse extends IEntityExtended {
|
|
|
15
15
|
contact: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface ICreateRequest {
|
|
18
|
+
external: boolean;
|
|
18
19
|
name: string | null;
|
|
19
20
|
nif: string | null;
|
|
20
21
|
street: string | null;
|
|
@@ -33,6 +34,7 @@ export interface ICreateRequest {
|
|
|
33
34
|
contact?: boolean;
|
|
34
35
|
}
|
|
35
36
|
export interface IUpdateRequest {
|
|
37
|
+
external?: boolean;
|
|
36
38
|
name?: string | null;
|
|
37
39
|
nif?: string | null;
|
|
38
40
|
street?: string | null;
|
|
@@ -62,20 +64,17 @@ export interface IFindRequest {
|
|
|
62
64
|
}
|
|
63
65
|
export interface IFindResponse {
|
|
64
66
|
persona_id: string;
|
|
65
|
-
persona_name: string;
|
|
67
|
+
persona_name: string | null;
|
|
66
68
|
persona_nif: string | null;
|
|
67
|
-
persona_street: string;
|
|
68
|
-
persona_postal_code: string;
|
|
69
|
-
persona_locality: string;
|
|
70
|
-
persona_country_id: string;
|
|
69
|
+
persona_street: string | null;
|
|
70
|
+
persona_postal_code: string | null;
|
|
71
|
+
persona_locality: string | null;
|
|
72
|
+
persona_country_id: string | null;
|
|
71
73
|
}
|
|
72
74
|
export interface IDeletePersonaRequest {
|
|
73
75
|
id: string;
|
|
74
76
|
new_main_persona_id?: string;
|
|
75
77
|
}
|
|
76
|
-
export interface IFindContactPersonaByOwnerId extends Pick<Persona, 'id' | 'name' | 'email' | 'telephone'> {
|
|
77
|
-
chat_type: IChatType;
|
|
78
|
-
}
|
|
79
78
|
export interface IFindByEmailRequest {
|
|
80
79
|
email: string;
|
|
81
80
|
}
|
|
@@ -124,12 +123,11 @@ export interface IFindForGmailResponse {
|
|
|
124
123
|
export interface IRepository {
|
|
125
124
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
126
125
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
127
|
-
findContactPersonaByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindContactPersonaByOwnerId>;
|
|
128
126
|
create(data: ICreateRequest): Promise<IEntityExtended>;
|
|
129
127
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityExtended | null>;
|
|
130
128
|
deleteOne(params: IDeletePersonaRequest): Promise<IEntityExtended | null>;
|
|
131
129
|
findByBasic(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
132
|
-
|
|
130
|
+
findForBillOfLading(data: IFindRequest): Promise<IFindResponse[]>;
|
|
133
131
|
findByEmail(data: IFindByEmailRequest): Promise<IFindByEmailResponse[]>;
|
|
134
132
|
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
135
133
|
findForGmail(data: IFindForGmailRequest): Promise<IFindForGmailResponse | null>;
|
|
@@ -40,6 +40,7 @@ export interface ICreateRequest {
|
|
|
40
40
|
inactive?: boolean;
|
|
41
41
|
default_discount?: number;
|
|
42
42
|
exemption_reason_id?: string | null;
|
|
43
|
+
default_account_code?: string | null;
|
|
43
44
|
main_persona: ICreateMainPersona;
|
|
44
45
|
provider_type_id?: string | null;
|
|
45
46
|
country_id?: string | null;
|
|
@@ -66,6 +67,8 @@ export interface IUpdateRequest {
|
|
|
66
67
|
default_maturity_date_id?: string;
|
|
67
68
|
default_delivery_method_id?: string;
|
|
68
69
|
default_vehicle_id?: string | null;
|
|
70
|
+
exemption_reason_id?: string | null;
|
|
71
|
+
default_account_code?: string | null;
|
|
69
72
|
}
|
|
70
73
|
export interface IFindByNumberRequest {
|
|
71
74
|
number: number;
|
|
@@ -4,10 +4,9 @@ export interface ICreateRequest {
|
|
|
4
4
|
password: string;
|
|
5
5
|
}
|
|
6
6
|
export interface ICreateResponse {
|
|
7
|
-
access_token: string;
|
|
8
7
|
user: Users.IFindByAccountResponse;
|
|
8
|
+
access_token: string;
|
|
9
9
|
refresh_token: string;
|
|
10
|
-
roles: string[];
|
|
11
10
|
expiresInToken: number;
|
|
12
11
|
expiresInRefreshToken: number;
|
|
13
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProjectInfoType } from '../../modules/integration/projectInfo/interfaces';
|
|
1
|
+
import type { IProjectInfoType, IBudgetOptionsType, IProjectInfoOriginType } from '../../modules/integration/projectInfo/interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* Model Observation
|
|
4
4
|
*
|
|
@@ -59,9 +59,14 @@ export type ProjectInfo = {
|
|
|
59
59
|
name: string;
|
|
60
60
|
email: string;
|
|
61
61
|
telephone: string;
|
|
62
|
+
address: string | null;
|
|
63
|
+
budget_options: IBudgetOptionsType;
|
|
62
64
|
description: string;
|
|
63
65
|
document_header_id: string;
|
|
64
66
|
email_log: string;
|
|
67
|
+
origin: IProjectInfoOriginType;
|
|
68
|
+
persona_id: string | null;
|
|
69
|
+
client_id: string | null;
|
|
65
70
|
created_at: Date;
|
|
66
71
|
updated_at: Date;
|
|
67
72
|
};
|
|
@@ -126,3 +131,38 @@ export type EmailVerification = {
|
|
|
126
131
|
updated_by: string;
|
|
127
132
|
updated_at: Date;
|
|
128
133
|
};
|
|
134
|
+
/**
|
|
135
|
+
* Model PatchNotes
|
|
136
|
+
*
|
|
137
|
+
*/
|
|
138
|
+
export type PatchNotes = {
|
|
139
|
+
id: number;
|
|
140
|
+
service: string;
|
|
141
|
+
container: string | null;
|
|
142
|
+
version: string;
|
|
143
|
+
deploy_ref: string;
|
|
144
|
+
environment: string | null;
|
|
145
|
+
commit_sha: string;
|
|
146
|
+
commit_short_sha: string | null;
|
|
147
|
+
commit_title: string;
|
|
148
|
+
commit_message: string;
|
|
149
|
+
commit_timestamp: string;
|
|
150
|
+
project_id: number;
|
|
151
|
+
project_path: string;
|
|
152
|
+
project_url: string;
|
|
153
|
+
pipeline_id: number;
|
|
154
|
+
pipeline_iid: number | null;
|
|
155
|
+
pipeline_source: string;
|
|
156
|
+
pipeline_url: string;
|
|
157
|
+
job_id: number | null;
|
|
158
|
+
job_name: string | null;
|
|
159
|
+
job_url: string | null;
|
|
160
|
+
merge_request_iid: number | null;
|
|
161
|
+
mergeRequest_id: number | null;
|
|
162
|
+
mr_source_branch: string | null;
|
|
163
|
+
mr_target_branch: string | null;
|
|
164
|
+
changes: unknown;
|
|
165
|
+
raw: unknown;
|
|
166
|
+
created_at: string;
|
|
167
|
+
updated_at: string;
|
|
168
|
+
};
|
|
@@ -12,6 +12,17 @@ import { IProductSheetState } from '../../modules/stock/productGoogleSheets/inte
|
|
|
12
12
|
import { ITaskStatusDataType } from '../../modules/stock/task/interface';
|
|
13
13
|
import type { IRsaHashData, ITaxEntry } from '../../modules/supply/documentHeader/interfaces';
|
|
14
14
|
import type { ProjectInfo } from './integration';
|
|
15
|
+
import { IEstadoEncomenda } from '../../modules/stock/conferirEncomenda/interface';
|
|
16
|
+
import { IMotivosDeEsperaData } from '../../modules/document/order/interfaces';
|
|
17
|
+
/**
|
|
18
|
+
* Model AccountCode
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export type AccountCode = {
|
|
22
|
+
id: string;
|
|
23
|
+
code: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
15
26
|
/**
|
|
16
27
|
* Model Chat
|
|
17
28
|
*
|
|
@@ -264,6 +275,7 @@ export type DocumentHeader = {
|
|
|
264
275
|
owner_id: string;
|
|
265
276
|
owner_number: number;
|
|
266
277
|
owner_name: string | null;
|
|
278
|
+
account_code: string | null;
|
|
267
279
|
billing_persona_id: string | null;
|
|
268
280
|
billing_persona_nif: string | null;
|
|
269
281
|
billing_persona_name: string | null;
|
|
@@ -1030,3 +1042,15 @@ export type GoogleSheetPool = {
|
|
|
1030
1042
|
id: string;
|
|
1031
1043
|
sheet_id: string;
|
|
1032
1044
|
};
|
|
1045
|
+
/**
|
|
1046
|
+
* Model ConferirEncomenda
|
|
1047
|
+
*
|
|
1048
|
+
*/
|
|
1049
|
+
export type ConferirEncomenda = {
|
|
1050
|
+
id: string;
|
|
1051
|
+
document_line_id: string;
|
|
1052
|
+
data: IMotivosDeEsperaData;
|
|
1053
|
+
value: IEstadoEncomenda;
|
|
1054
|
+
created_at: Date;
|
|
1055
|
+
created_by: string;
|
|
1056
|
+
};
|
|
@@ -103,6 +103,7 @@ export type Providers = {
|
|
|
103
103
|
default_delivery_method_id: string | null;
|
|
104
104
|
default_vehicle_id: string | null;
|
|
105
105
|
default_discount: number;
|
|
106
|
+
default_account_code: string | null;
|
|
106
107
|
created_at: Date;
|
|
107
108
|
updated_at: Date;
|
|
108
109
|
created_by: string;
|
|
@@ -172,6 +173,7 @@ export type Clients = {
|
|
|
172
173
|
default_delivery_method_id: string | null;
|
|
173
174
|
default_vehicle_id: string | null;
|
|
174
175
|
deferred_payment: boolean;
|
|
176
|
+
is_donation_eligible: boolean;
|
|
175
177
|
origin_id: string | null;
|
|
176
178
|
created_at: Date;
|
|
177
179
|
updated_at: Date;
|
|
@@ -461,6 +463,7 @@ export type Tenant = {
|
|
|
461
463
|
*/
|
|
462
464
|
export type Persona = {
|
|
463
465
|
id: string;
|
|
466
|
+
external: boolean;
|
|
464
467
|
name: string | null;
|
|
465
468
|
nif: string | null;
|
|
466
469
|
telephone: string | null;
|
|
@@ -7,6 +7,7 @@ import type { IScheduleType } from '../modules/supply/schedule/interface';
|
|
|
7
7
|
import type { IWarningType } from '../modules/supply/documentHeader/interfaces';
|
|
8
8
|
import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPostgresBackup, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from '../modules/view/adminPanel/interfaces';
|
|
9
9
|
import type * as ErrorLog from '../modules/view/errorLog/interfaces';
|
|
10
|
+
import type * as ChatSubscriber from '../modules/user/chatSubscribers/interfaces';
|
|
10
11
|
import type { File } from './entities/stock';
|
|
11
12
|
import type { ProjectInfo } from './entities/integration';
|
|
12
13
|
import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
|
|
@@ -150,6 +151,7 @@ export declare enum IBrokerTopic {
|
|
|
150
151
|
retry_errored_emails = "retry_errored_emails",
|
|
151
152
|
send_errored_emails_summary = "send_errored_emails_summary",
|
|
152
153
|
warning_email = "warning_email",
|
|
154
|
+
espera_devolver_catalogo_email = "espera_devolver_catalogo_email",
|
|
153
155
|
verification_email = "verification_email",
|
|
154
156
|
dispatch_chat_message = "dispatch_chat_message",
|
|
155
157
|
perform_task = "perform_task",
|
|
@@ -174,7 +176,8 @@ export declare enum IBrokerTopic {
|
|
|
174
176
|
googlesheet_task_log = "googlesheet_task_log",
|
|
175
177
|
googlesheet_stock_log = "googlesheet_stock_log",
|
|
176
178
|
googlesheet_encomenda_log = "googlesheet_encomenda_log",
|
|
177
|
-
log_google_api_request = "log_google_api_request"
|
|
179
|
+
log_google_api_request = "log_google_api_request",
|
|
180
|
+
send_espera_info_cliente_messages = "send_espera_info_cliente_messages"
|
|
178
181
|
}
|
|
179
182
|
export type IBrokerTopicPayload = {
|
|
180
183
|
[IBrokerTopic.create]: Record<string, unknown>;
|
|
@@ -267,18 +270,21 @@ export type IBrokerTopicPayload = {
|
|
|
267
270
|
state: string;
|
|
268
271
|
}[];
|
|
269
272
|
};
|
|
273
|
+
[IBrokerTopic.espera_devolver_catalogo_email]: {
|
|
274
|
+
owner_id: string;
|
|
275
|
+
document_header_id: string;
|
|
276
|
+
chat_id: string;
|
|
277
|
+
email: string;
|
|
278
|
+
name: string | null;
|
|
279
|
+
subject: string;
|
|
280
|
+
message: string;
|
|
281
|
+
};
|
|
270
282
|
[IBrokerTopic.retry_errored_emails]: Record<string, never>;
|
|
271
283
|
[IBrokerTopic.send_errored_emails_summary]: {
|
|
272
284
|
warningErrors: string[];
|
|
273
285
|
};
|
|
274
286
|
[IBrokerTopic.dispatch_chat_message]: {
|
|
275
|
-
to: [
|
|
276
|
-
{
|
|
277
|
-
email: string;
|
|
278
|
-
name: string;
|
|
279
|
-
phone_number: string | null;
|
|
280
|
-
}
|
|
281
|
-
];
|
|
287
|
+
to: [Pick<ChatSubscriber.IFindByOwnerResponse, 'email' | 'name' | 'telephone'>];
|
|
282
288
|
reply_url: string;
|
|
283
289
|
owner_id: string;
|
|
284
290
|
document_header_id: string | null;
|
|
@@ -346,6 +352,15 @@ export type IBrokerTopicPayload = {
|
|
|
346
352
|
[IBrokerTopic.googlesheet_stock_log]: IStock;
|
|
347
353
|
[IBrokerTopic.googlesheet_encomenda_log]: IEncomenda;
|
|
348
354
|
[IBrokerTopic.log_google_api_request]: ILogGoogleApiRequest;
|
|
355
|
+
[IBrokerTopic.send_espera_info_cliente_messages]: {
|
|
356
|
+
owner_id: string;
|
|
357
|
+
document_header_id: string;
|
|
358
|
+
chat_id: string;
|
|
359
|
+
email: string;
|
|
360
|
+
name: string | null;
|
|
361
|
+
subject: string;
|
|
362
|
+
message: string;
|
|
363
|
+
};
|
|
349
364
|
};
|
|
350
365
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
351
366
|
topic: T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.25",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"joi": "^18.0.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@swc/core": "^1.15.
|
|
30
|
-
"@types/node": "^24.10.
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
32
|
-
"@typescript-eslint/parser": "^8.
|
|
33
|
-
"eslint": "^9.39.
|
|
29
|
+
"@swc/core": "^1.15.11",
|
|
30
|
+
"@types/node": "^24.10.10",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
32
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
33
|
+
"eslint": "^9.39.2",
|
|
34
34
|
"eslint-config-prettier": "^10.1.8",
|
|
35
35
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
36
|
-
"eslint-plugin-prettier": "^5.5.
|
|
37
|
-
"prettier": "^3.
|
|
36
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
37
|
+
"prettier": "^3.8.1",
|
|
38
38
|
"tsup": "^8.5.1"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { GroupPermissions } from '../../../shared/entities/user';
|
|
3
|
-
export type Entity = GroupPermissions;
|
|
4
|
-
export declare const Route = "group_permissions";
|
|
5
|
-
export declare const UpperName = "GroupPermissions";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
export interface ICreateRequest {
|
|
8
|
-
code: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IUpdateRequest {
|
|
12
|
-
code: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IRepository {
|
|
16
|
-
findByCode(code: string): Promise<Entity | null>;
|
|
17
|
-
findById(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
18
|
-
changeEnable(selector: IShared.IFindByIdNumberRequest): Promise<boolean>;
|
|
19
|
-
find(): Promise<Entity[]>;
|
|
20
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
22
|
-
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
23
|
-
}
|
|
24
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
-
export type IApi = Omit<IRepository, 'findByCode' | 'findById' | 'changeEnable'>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { Permissions } from '../../../shared/entities/user';
|
|
3
|
-
export type Entity = Permissions;
|
|
4
|
-
export declare const Route = "permission";
|
|
5
|
-
export declare const UpperName = "Permissions";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
export interface ICreateRequest {
|
|
8
|
-
code: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IUpdateRequest {
|
|
12
|
-
code: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IRepository {
|
|
16
|
-
findById(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
17
|
-
findByCode(code: string): Promise<Entity | null>;
|
|
18
|
-
changeEnable(selector: IShared.IFindByIdNumberRequest): Promise<boolean>;
|
|
19
|
-
find(): Promise<Entity[]>;
|
|
20
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
22
|
-
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
23
|
-
}
|
|
24
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
-
export type IApi = Omit<IRepository, 'findById' | 'findByCode' | 'changeEnable'>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { UserPermissions, GroupPermissions, Permissions } from '../../../shared/entities/user';
|
|
3
|
-
export type Entity = UserPermissions;
|
|
4
|
-
export declare const Route = "user_permissions";
|
|
5
|
-
export declare const UpperName = "UserPermissions";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
|
-
interface IFindDetailedResponse extends Entity {
|
|
8
|
-
group_permission: GroupPermissions;
|
|
9
|
-
permission: Permissions;
|
|
10
|
-
}
|
|
11
|
-
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
12
|
-
export interface ICreateRequest {
|
|
13
|
-
user_id: string;
|
|
14
|
-
permission_id: number;
|
|
15
|
-
group_id: number;
|
|
16
|
-
}
|
|
17
|
-
export interface IRepository {
|
|
18
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
19
|
-
create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
|
|
20
|
-
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
21
|
-
}
|
|
22
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
23
|
-
export {};
|