@nomalism-com/types 1.3.60 → 1.3.62
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.cjs +630 -745
- package/dist/index.js +556 -661
- package/dist/main.d.ts +2 -12
- package/dist/modules/document/NRCL/interface.d.ts +0 -2
- package/dist/modules/document/materialEntrance/interfaces.d.ts +0 -6
- package/dist/modules/document/order/interfaces.d.ts +0 -14
- package/dist/modules/document/upfrontReturn/interfaces.d.ts +0 -1
- package/dist/modules/documentManagement/multimedia/interfaces.d.ts +0 -3
- package/dist/modules/integration/emailLog/interfaces.d.ts +0 -3
- package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +0 -13
- package/dist/modules/integration/emailVerification/interfaces.d.ts +0 -2
- package/dist/modules/integration/googleFilePermission/interfaces.d.ts +0 -8
- package/dist/modules/integration/patchNotes/interfaces.d.ts +0 -4
- package/dist/modules/integration/projectInfo/interfaces.d.ts +0 -2
- package/dist/modules/integration/settings/interfaces.d.ts +0 -1
- package/dist/modules/llm/llm/interfaces.d.ts +0 -2
- package/dist/modules/print/printer/interfaces.d.ts +0 -1
- package/dist/modules/sms/smsSender/interfaces.d.ts +0 -7
- package/dist/modules/sms/smsTemplate/interfaces.d.ts +0 -9
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +0 -3
- package/dist/modules/stock/displayLabel/interface.d.ts +6 -1
- package/dist/modules/stock/emailAccount/interface.d.ts +0 -1
- package/dist/modules/stock/gmails/interface.d.ts +0 -4
- package/dist/modules/stock/googleSheetPool/interface.d.ts +0 -2
- package/dist/modules/stock/location/interface.d.ts +0 -44
- package/dist/modules/stock/mobilePrint/interface.d.ts +0 -2
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +0 -7
- package/dist/modules/stock/productImage/interface.d.ts +3 -1
- package/dist/modules/stock/productUpdate/interface.d.ts +214 -0
- package/dist/modules/stock/promotion/interface.d.ts +0 -2
- package/dist/modules/stock/queryList/interfaces.d.ts +0 -18
- package/dist/modules/stock/queryParameter/interfaces.d.ts +0 -34
- package/dist/modules/stock/recurrentTasks/interface.d.ts +0 -2
- package/dist/modules/stock/returnReason/interfaces.d.ts +0 -9
- package/dist/modules/stock/stockMovement/interface.d.ts +0 -3
- package/dist/modules/stock/task/interface.d.ts +0 -2
- package/dist/modules/stock/unitOfMeasure/interface.d.ts +0 -9
- package/dist/modules/stock/vatTax/interface.d.ts +0 -9
- package/dist/modules/stock/vatTaxZone/interface.d.ts +0 -9
- package/dist/modules/supply/currentAccount/interface.d.ts +9 -88
- package/dist/modules/supply/documentHeaderHistory/interfaces.d.ts +0 -1
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +0 -2
- package/dist/modules/supply/documentLine/interfaces.d.ts +0 -5
- package/dist/modules/supply/documentSet/interface.d.ts +0 -7
- package/dist/modules/supply/documentType/interfaces.d.ts +0 -2
- package/dist/modules/supply/externalDocumentType/interface.d.ts +0 -7
- package/dist/modules/supply/payment/interface.d.ts +2 -5
- package/dist/modules/supply/paymentBatch/interface.d.ts +2 -2
- package/dist/modules/supply/preSale/interface.d.ts +0 -1
- package/dist/modules/supply/preSaleProduct/interface.d.ts +0 -1
- package/dist/modules/supply/schedule/interface.d.ts +0 -1
- package/dist/modules/tickets/tickets/interfaces.d.ts +1 -2
- package/dist/modules/ui/sidemenuHighlight/interface.d.ts +0 -11
- package/dist/modules/user/bankData/interface.d.ts +0 -9
- package/dist/modules/user/clientType/interface.d.ts +0 -16
- package/dist/modules/user/country/interface.d.ts +0 -12
- package/dist/modules/user/deliveryMethods/interfaces.d.ts +0 -1
- package/dist/modules/user/favorites/interfaces.d.ts +0 -3
- package/dist/modules/user/language/interface.d.ts +0 -9
- package/dist/modules/user/maturityDates/interfaces.d.ts +0 -1
- package/dist/modules/user/paymentMethods/interfaces.d.ts +0 -1
- package/dist/modules/user/providerType/interface.d.ts +0 -13
- package/dist/modules/user/purchaseConditions/interface.d.ts +0 -9
- package/dist/modules/user/reasonForExemption/interface.d.ts +0 -3
- package/dist/modules/user/segmentsArea/interface.d.ts +0 -17
- package/dist/modules/user/shippings/interface.d.ts +0 -8
- package/dist/modules/user/storeOperator/interface.d.ts +0 -2
- package/dist/modules/user/swift/interface.d.ts +0 -17
- package/dist/modules/user/systemModule/interface.d.ts +0 -11
- package/dist/modules/user/timeSheet/interfaces.d.ts +0 -3
- package/dist/modules/user/userTokens/interface.d.ts +0 -6
- package/dist/modules/user/users/interface.d.ts +1 -9
- package/dist/modules/view/adminPanel/interfaces.d.ts +0 -3
- package/dist/modules/view/errorLog/interfaces.d.ts +0 -1
- package/dist/modules/view/webSocket/interfaces.d.ts +0 -1
- package/dist/shared/entities/user.d.ts +0 -14
- package/dist/shared/interface.d.ts +0 -31
- package/package.json +5 -5
- package/dist/modules/document/adiantamento/interfaces.d.ts +0 -24
- package/dist/modules/document/faturaCredito/interfaces.d.ts +0 -26
- package/dist/modules/document/faturaRecibo/interfaces.d.ts +0 -25
- package/dist/modules/document/faturaSimplificada/interfaces.d.ts +0 -24
- package/dist/modules/document/notaCredito/interfaces.d.ts +0 -29
- package/dist/modules/document/notaCreditoAdiantamento/interfaces.d.ts +0 -25
- package/dist/modules/document/productionOrder/interfaces.d.ts +0 -10
- package/dist/modules/document/recibo/interfaces.d.ts +0 -21
- package/dist/modules/integration/observationType/interfaces.d.ts +0 -25
- package/dist/modules/stock/typeOfLocation/interface.d.ts +0 -30
- package/dist/modules/supply/batch/interface.d.ts +0 -0
- package/dist/modules/user/userPositions/interface.d.ts +0 -28
|
@@ -14,28 +14,8 @@ import type { File } from "./entities/stock";
|
|
|
14
14
|
import type { Persona } from "./entities/user";
|
|
15
15
|
type CreatedAt = "created_at";
|
|
16
16
|
type UpdatedAt = "updated_at";
|
|
17
|
-
export interface WithCreatedAt {
|
|
18
|
-
created_at: Date;
|
|
19
|
-
}
|
|
20
|
-
export interface WithUpdatedAt {
|
|
21
|
-
updated_at: Date;
|
|
22
|
-
}
|
|
23
|
-
export interface WithOriginId {
|
|
24
|
-
origin_id: string;
|
|
25
|
-
}
|
|
26
|
-
export type WithTimestamps = WithCreatedAt & WithUpdatedAt;
|
|
27
|
-
export type WithTimestampsOriginID = (WithCreatedAt & WithUpdatedAt) | WithOriginId;
|
|
28
|
-
export type WithoutTimestamps<T> = Omit<T, CreatedAt | UpdatedAt>;
|
|
29
17
|
type CreatedBy = "created_by";
|
|
30
18
|
type UpdatedBy = "updated_by";
|
|
31
|
-
export interface WithCreatedBy {
|
|
32
|
-
created_by?: string | null;
|
|
33
|
-
}
|
|
34
|
-
export interface WithUpdatedBy {
|
|
35
|
-
updated_by?: string | null;
|
|
36
|
-
}
|
|
37
|
-
export type WithUserstamps = WithCreatedBy & WithUpdatedBy;
|
|
38
|
-
export type WithoutUserstamps<T> = Omit<T, CreatedBy | UpdatedBy>;
|
|
39
19
|
export interface IUserToken {
|
|
40
20
|
id: string;
|
|
41
21
|
superuser?: boolean;
|
|
@@ -54,8 +34,6 @@ export interface ICachedUserTokens {
|
|
|
54
34
|
export type IEntityWithUserToken<T> = {
|
|
55
35
|
[K in keyof T]: T[K] extends (...params: infer U) => unknown ? (...params: [...U, IUserToken]) => ReturnType<T[K]> : T[K];
|
|
56
36
|
};
|
|
57
|
-
export type WithStamps = WithTimestamps & WithUserstamps;
|
|
58
|
-
export type WithStampsResponse<T> = T & WithStamps;
|
|
59
37
|
export type WithoutStamps<T> = Omit<T, CreatedAt | UpdatedAt | CreatedBy | UpdatedBy>;
|
|
60
38
|
export interface IPaginationRequest {
|
|
61
39
|
per_page?: number;
|
|
@@ -89,18 +67,12 @@ export interface IFindByOwnerIdRequest {
|
|
|
89
67
|
export interface IFindOptionalByOwnerIdRequest {
|
|
90
68
|
owner_id?: string;
|
|
91
69
|
}
|
|
92
|
-
export interface IUpdateManyResponse {
|
|
93
|
-
count: number;
|
|
94
|
-
}
|
|
95
70
|
export interface ILogGoogleApiRequest {
|
|
96
71
|
type: string;
|
|
97
72
|
method: string;
|
|
98
73
|
info: string;
|
|
99
74
|
error?: string;
|
|
100
75
|
}
|
|
101
|
-
export interface ILastMoloniRequest {
|
|
102
|
-
stamp: string | number;
|
|
103
|
-
}
|
|
104
76
|
export declare const IDataTypeEnum: {
|
|
105
77
|
date: "date";
|
|
106
78
|
datetime: "datetime";
|
|
@@ -120,14 +92,11 @@ export declare const IDataTypeEnum: {
|
|
|
120
92
|
json: "json";
|
|
121
93
|
userstamp: "userstamp";
|
|
122
94
|
};
|
|
123
|
-
export type IDatatype = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
|
|
124
|
-
export declare const dataTypes: string[];
|
|
125
95
|
export declare const IUserSendEmailDocumentTemplateEnum: {
|
|
126
96
|
generic: "generic";
|
|
127
97
|
provider_payment_order: "provider_payment_order";
|
|
128
98
|
};
|
|
129
99
|
export type IUserSendEmailDocumentTemplate = (typeof IUserSendEmailDocumentTemplateEnum)[keyof typeof IUserSendEmailDocumentTemplateEnum];
|
|
130
|
-
export declare const IUserSendEmailDocumentTemplateTypes: string[];
|
|
131
100
|
export declare enum IBrokerTopic {
|
|
132
101
|
tickets_change = "tickets_change",
|
|
133
102
|
push_notification = "push_notification",
|
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.62",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
|
-
"@swc/core": "^1.16.
|
|
28
|
+
"@swc/core": "^1.16.18",
|
|
29
29
|
"@types/node": "^26.6.5",
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^8.62.0",
|
|
31
31
|
"@typescript-eslint/parser": "^8.62.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lint-staged": "^17.6.0",
|
|
38
38
|
"prettier": "^3.9.10",
|
|
39
39
|
"tsup": "^8.5.1",
|
|
40
|
-
"typescript-eslint": "^8.71.
|
|
40
|
+
"typescript-eslint": "^8.71.2"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
60
|
"allowScripts": {
|
|
61
|
-
"esbuild
|
|
62
|
-
"@swc/core
|
|
61
|
+
"esbuild": true,
|
|
62
|
+
"@swc/core": true
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "adiantamento";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
/** exatamente uma proposta */
|
|
14
|
-
from_header: string[];
|
|
15
|
-
payments: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
16
|
-
owner_ref_document?: string | null;
|
|
17
|
-
/** só nas recuperações (ADM / ADD) */
|
|
18
|
-
copy_from_document?: string | null;
|
|
19
|
-
}
|
|
20
|
-
export interface IRepository {
|
|
21
|
-
create(data: ICreateRequest): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
24
|
-
export type IApi = IRepository;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "fatura_credito";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
from_header: string[];
|
|
14
|
-
from_lines: string[];
|
|
15
|
-
/** opcional: a fatura a crédito pode ficar total ou parcialmente em dívida */
|
|
16
|
-
payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
17
|
-
maturity_date_id?: string | null;
|
|
18
|
-
owner_ref_document?: string | null;
|
|
19
|
-
/** só nas recuperações (FTM / FTD) */
|
|
20
|
-
copy_from_document?: string | null;
|
|
21
|
-
}
|
|
22
|
-
export interface IRepository {
|
|
23
|
-
create(data: ICreateRequest): Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
26
|
-
export type IApi = IRepository;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "fatura_recibo";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
from_header: string[];
|
|
14
|
-
from_lines: string[];
|
|
15
|
-
/** obrigatório: a fatura-recibo sai liquidada por inteiro */
|
|
16
|
-
payments: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
17
|
-
owner_ref_document?: string | null;
|
|
18
|
-
/** só nas recuperações (FRM / FRD) */
|
|
19
|
-
copy_from_document?: string | null;
|
|
20
|
-
}
|
|
21
|
-
export interface IRepository {
|
|
22
|
-
create(data: ICreateRequest): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
-
export type IApi = IRepository;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "fatura_simplificada";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
from_header: string[];
|
|
14
|
-
from_lines: string[];
|
|
15
|
-
/** obrigatório: a FS é liquidada no ato */
|
|
16
|
-
payments: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
17
|
-
/** só nas recuperações (FSM / FSD) */
|
|
18
|
-
copy_from_document?: string | null;
|
|
19
|
-
}
|
|
20
|
-
export interface IRepository {
|
|
21
|
-
create(data: ICreateRequest): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
24
|
-
export type IApi = IRepository;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "nota_credito";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
/** as FATURAS a creditar */
|
|
14
|
-
from_header: string[];
|
|
15
|
-
from_lines: string[];
|
|
16
|
-
/** obrigatório (Art. 78.º CIVA) */
|
|
17
|
-
return_reason: string;
|
|
18
|
-
/** true = regulariza em conta corrente, sem pagamentos */
|
|
19
|
-
current_account?: boolean;
|
|
20
|
-
payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
21
|
-
owner_ref_document?: string | null;
|
|
22
|
-
/** só nas recuperações (NCM / NCD) */
|
|
23
|
-
copy_from_document?: string | null;
|
|
24
|
-
}
|
|
25
|
-
export interface IRepository {
|
|
26
|
-
create(data: ICreateRequest): Promise<void>;
|
|
27
|
-
}
|
|
28
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
29
|
-
export type IApi = IRepository;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "nota_credito_adiantamento";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
/** exatamente uma proposta */
|
|
14
|
-
from_header: string[];
|
|
15
|
-
current_account?: boolean;
|
|
16
|
-
payments?: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
17
|
-
owner_ref_document?: string | null;
|
|
18
|
-
/** só nas recuperações (NCADM / NCADD) */
|
|
19
|
-
copy_from_document?: string | null;
|
|
20
|
-
}
|
|
21
|
-
export interface IRepository {
|
|
22
|
-
create(data: ICreateRequest): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
-
export type IApi = IRepository;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
export declare const Route = "production_order";
|
|
3
|
-
export interface ICreateProductionOrderRequest {
|
|
4
|
-
provider_id: string;
|
|
5
|
-
group_id: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IRepository {
|
|
8
|
-
createProductionOrder(data: ICreateProductionOrderRequest): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as IShared from "../../../shared/interface";
|
|
2
|
-
import * as IPayment from "../../supply/payment/interface";
|
|
3
|
-
export declare const Route = "recibo";
|
|
4
|
-
export interface ICreateRequestBase {
|
|
5
|
-
document_type_id: number;
|
|
6
|
-
document_set_id?: string;
|
|
7
|
-
emission_date?: Date;
|
|
8
|
-
external_document_name?: string;
|
|
9
|
-
store_operator_id?: string | null;
|
|
10
|
-
email?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICreateRequest extends ICreateRequestBase {
|
|
13
|
-
/** a FATURA a liquidar */
|
|
14
|
-
from_header: string[];
|
|
15
|
-
payments: IPayment.ICreateForThisDocumentHeaderRequest[];
|
|
16
|
-
}
|
|
17
|
-
export interface IRepository {
|
|
18
|
-
create(data: ICreateRequest): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
21
|
-
export type IApi = IRepository;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ObservationType } from "../../../shared/entities/integration";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
|
-
export type Entity = ObservationType;
|
|
4
|
-
export declare const Route = "observation_type";
|
|
5
|
-
export interface IFindByQueryRequest {
|
|
6
|
-
id?: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ICreateRequest {
|
|
10
|
-
name: string;
|
|
11
|
-
}
|
|
12
|
-
export interface IUpdateRequest {
|
|
13
|
-
name: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IRepository {
|
|
16
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
17
|
-
findByQuery(data: IFindByQueryRequest): Promise<Entity[]>;
|
|
18
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
19
|
-
find(): Promise<ObservationType[]>;
|
|
20
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
21
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
22
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
23
|
-
}
|
|
24
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
-
export type IApi = Omit<IRepository, "findById" | "findByQuery">;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { TypeOfLocation } from "../../../shared/entities/stock";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
|
-
export type Entity = TypeOfLocation;
|
|
4
|
-
export declare const Route = "type_of_location";
|
|
5
|
-
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
|
-
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "">;
|
|
8
|
-
export type IFindRequest = Record<string, unknown>;
|
|
9
|
-
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
10
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
11
|
-
}
|
|
12
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
13
|
-
export interface ICreateRequest {
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IUpdateRequest {
|
|
17
|
-
name?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface IRepository {
|
|
20
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
21
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
22
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
23
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
24
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
25
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
26
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
27
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
|
-
}
|
|
29
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
30
|
-
export {};
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UserPositions } from "../../../shared/entities/user";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
|
-
export type Entity = UserPositions;
|
|
4
|
-
export declare const Route = "user_positions";
|
|
5
|
-
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
|
-
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
12
|
-
export interface ICreateRequest {
|
|
13
|
-
name: string;
|
|
14
|
-
}
|
|
15
|
-
export interface IUpdateRequest {
|
|
16
|
-
name?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface IRepository {
|
|
19
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
20
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
22
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
23
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
24
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
25
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
26
|
-
}
|
|
27
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
28
|
-
export {};
|