@nomalism-com/types 0.49.42 → 0.50.1
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 +654 -844
- package/dist/index.js +652 -832
- package/dist/main.d.ts +3 -13
- package/dist/modules/document/NRCL/interface.d.ts +0 -2
- package/dist/modules/document/billOfLading/interfaces.d.ts +9 -0
- package/dist/modules/document/materialEntrance/interfaces.d.ts +0 -6
- package/dist/modules/document/order/interfaces.d.ts +0 -14
- package/dist/modules/document/providerCreditNoteFromReturn/interfaces.d.ts +1 -1
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +1 -1
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +1 -1
- 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/observation/interfaces.d.ts +2 -7
- 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/chat/interfaces.d.ts +0 -1
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +0 -3
- 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 +2 -50
- package/dist/modules/stock/mobilePrint/interface.d.ts +0 -2
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +33 -8
- package/dist/modules/stock/productImage/interface.d.ts +2 -19
- package/dist/modules/stock/promotion/interface.d.ts +0 -39
- 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/saft/interfaces.d.ts +60 -0
- package/dist/modules/stock/stockMovement/interface.d.ts +5 -6
- 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 +0 -88
- package/dist/modules/supply/documentHeader/interfaces.d.ts +78 -1
- 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 -8
- package/dist/modules/supply/documentType/interfaces.d.ts +12 -2
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +2 -0
- package/dist/modules/supply/externalDocumentType/interface.d.ts +0 -7
- package/dist/modules/supply/payment/interface.d.ts +0 -5
- package/dist/modules/supply/paymentBatch/interface.d.ts +0 -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/ui/storeOperatorSaftLock/interface.d.ts +9 -0
- package/dist/modules/ui/tenantSaftLock/interface.d.ts +10 -0
- package/dist/modules/user/bankData/interface.d.ts +0 -9
- package/dist/modules/user/clientType/interface.d.ts +0 -16
- package/dist/modules/user/clients/interface.d.ts +1 -7
- package/dist/modules/user/commissioner/interface.d.ts +0 -12
- package/dist/modules/user/country/interface.d.ts +0 -14
- 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 +4 -15
- package/dist/modules/user/persona/interface.d.ts +1 -4
- package/dist/modules/user/providerType/interface.d.ts +0 -13
- package/dist/modules/user/providers/interface.d.ts +0 -8
- 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/sessions/interface.d.ts +1 -0
- package/dist/modules/user/shippings/interface.d.ts +0 -8
- package/dist/modules/user/storeOperator/interface.d.ts +1 -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 +2 -29
- 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/integration.d.ts +0 -13
- package/dist/shared/entities/stock.d.ts +18 -31
- package/dist/shared/entities/user.d.ts +2 -17
- package/dist/shared/errors/integrationErrors.d.ts +0 -8
- package/dist/shared/errors/stockErrors.d.ts +0 -8
- package/dist/shared/interface.d.ts +2 -34
- package/package.json +2 -2
- package/dist/modules/integration/observationType/interfaces.d.ts +0 -25
- package/dist/modules/stock/typeOfLocation/interface.d.ts +0 -30
- package/dist/modules/user/userPositions/interface.d.ts +0 -28
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
import { ExternalDocumentType } from "../../../shared/entities/stock";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
2
|
export type Entity = ExternalDocumentType;
|
|
4
|
-
export declare const Route = "external_document_type";
|
|
5
|
-
export interface IRepository {
|
|
6
|
-
find(): Promise<Entity[]>;
|
|
7
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
8
|
-
}
|
|
9
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -5,8 +5,6 @@ import * as IUser from "../../user/users/interface";
|
|
|
5
5
|
export type Entity = Payment;
|
|
6
6
|
export declare const Route = "payment";
|
|
7
7
|
export type IEntityExtended = Entity;
|
|
8
|
-
export type IFindByIdResponse = Omit<IEntityExtended, "">;
|
|
9
|
-
export type IFindByOwnerIdResponse = Omit<IEntityExtended, "">;
|
|
10
8
|
export type IFindRequest = Record<string, unknown>;
|
|
11
9
|
export type IFindResponse = Omit<IEntityExtended, "">;
|
|
12
10
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
@@ -50,9 +48,6 @@ export interface IUnpaidPurchasesResponse extends Pick<Entity, "date" | "debit"
|
|
|
50
48
|
internal_regularization?: boolean;
|
|
51
49
|
}
|
|
52
50
|
export interface IRepository {
|
|
53
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
54
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
55
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
56
51
|
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
57
52
|
findSettledMaterialEntrance(params: IUnpaidPurchasesRequest): Promise<IUnpaidPurchasesResponse[]>;
|
|
58
53
|
findSettledMaterialEntranceByDate(params: IUnpaidByDatePurchasesRequest): Promise<IUnpaidPurchasesResponse[]>;
|
|
@@ -4,7 +4,6 @@ import * as DocumentLine from "../documentLine/interfaces";
|
|
|
4
4
|
import { IProductState } from "./../../stock/productGoogleSheets/interface";
|
|
5
5
|
export type Entity = PreSale;
|
|
6
6
|
export declare const Route = "pre_sale";
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
7
|
export type IFindResponse = Entity;
|
|
9
8
|
export interface IFindResponseWithCount extends Entity {
|
|
10
9
|
count_products: number;
|
|
@@ -2,7 +2,6 @@ import { PreSaleProduct } from "../../../shared/entities/stock";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = PreSaleProduct;
|
|
4
4
|
export declare const Route = "pre_sale_product";
|
|
5
|
-
export type IFindRequest = Record<string, unknown>;
|
|
6
5
|
export type IFindResponse = Entity;
|
|
7
6
|
export interface IRepository {
|
|
8
7
|
find(user_id: string): Promise<PreSaleProduct[]>;
|
|
@@ -10,7 +10,6 @@ export declare const ScheduleTypeEnum: {
|
|
|
10
10
|
retryErroredEmails: "retryErroredEmails";
|
|
11
11
|
};
|
|
12
12
|
export type IScheduleType = (typeof ScheduleTypeEnum)[keyof typeof ScheduleTypeEnum];
|
|
13
|
-
export declare const scheduleTypes: string[];
|
|
14
13
|
export declare const ScheduleTypeLabel: Record<IScheduleType, string>;
|
|
15
14
|
export interface IRunImmediatelyRequest {
|
|
16
15
|
scheduleType: IScheduleType;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Language
|
|
1
|
+
import { Language } from "../../../shared/entities/tickets";
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
import { IChannel } from "../channel/interfaces";
|
|
4
|
-
export type Entity = Tickets;
|
|
5
4
|
export declare const Route = "tickets";
|
|
6
5
|
export interface ILastTicketCalledToday {
|
|
7
6
|
language: Language;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { SidemenuHightlight } from "../../../shared/entities/stock";
|
|
2
1
|
import * as IShared from "../../../shared/interface";
|
|
3
2
|
import type { IDocumentTypeUserType } from "../../supply/documentType/interfaces";
|
|
4
3
|
export declare const Route = "sidemenu_highlight";
|
|
5
|
-
export type Entity = SidemenuHightlight;
|
|
6
4
|
export interface IHighlightItem {
|
|
7
5
|
user_type: IDocumentTypeUserType;
|
|
8
6
|
state: string;
|
|
@@ -10,25 +8,16 @@ export interface IHighlightItem {
|
|
|
10
8
|
export declare const highlightValueSeparator = "|:|";
|
|
11
9
|
/** Serialize / parse helpers for the composite "user_type|:|state" value. */
|
|
12
10
|
export declare const buildHighlightValue: (item: IHighlightItem) => string;
|
|
13
|
-
export declare const parseHighlightValue: (value: string) => IHighlightItem | null;
|
|
14
11
|
export interface IFindResponseItem {
|
|
15
12
|
store_operator_id: string;
|
|
16
13
|
values: string[];
|
|
17
14
|
}
|
|
18
|
-
export interface IFindByStoreOperatorIdRequest {
|
|
19
|
-
store_operator_id: string;
|
|
20
|
-
}
|
|
21
|
-
export interface IFindByStoreOperatorIdResponse {
|
|
22
|
-
store_operator_id: string;
|
|
23
|
-
values: string[];
|
|
24
|
-
}
|
|
25
15
|
export interface ISetStoreOperatorHighlightsRequest {
|
|
26
16
|
store_operator_id: string;
|
|
27
17
|
values: string[];
|
|
28
18
|
}
|
|
29
19
|
export interface IRepository {
|
|
30
20
|
find(): Promise<IFindResponseItem[]>;
|
|
31
|
-
findByStoreOperatorId(selector: IFindByStoreOperatorIdRequest): Promise<IFindByStoreOperatorIdResponse>;
|
|
32
21
|
setStoreOperatorHighlights(data: ISetStoreOperatorHighlightsRequest): Promise<void>;
|
|
33
22
|
}
|
|
34
23
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as IShared from "../../../shared/interface";
|
|
2
|
+
export declare const Route = "store_operator_saft_lock";
|
|
3
|
+
export interface IFindResponseItem {
|
|
4
|
+
store_operator_id: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IRepository {
|
|
7
|
+
find(): Promise<IFindResponseItem[]>;
|
|
8
|
+
}
|
|
9
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as IShared from "../../../shared/interface";
|
|
2
|
+
export declare const Route = "tenant_saft_lock";
|
|
3
|
+
/** Ponto 35 — há documentos certificados: NIF e zona fiscal da empresa deixam de poder mudar. */
|
|
4
|
+
export interface IFindResponse {
|
|
5
|
+
has_certified_documents: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface IRepository {
|
|
8
|
+
find(): Promise<IFindResponse>;
|
|
9
|
+
}
|
|
10
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -6,13 +6,7 @@ interface IFindDetailedResponse extends Entity {
|
|
|
6
6
|
swift: Swift | null;
|
|
7
7
|
country: Country;
|
|
8
8
|
}
|
|
9
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "swift" | "country">;
|
|
10
9
|
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "">;
|
|
11
|
-
export type IFindRequest = Record<string, unknown>;
|
|
12
|
-
export type IFindResponse = Omit<IFindDetailedResponse, "swift" | "country">;
|
|
13
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
14
|
-
}
|
|
15
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "swift" | "country">>;
|
|
16
10
|
export interface ICreateRequest {
|
|
17
11
|
provider_id?: string | null;
|
|
18
12
|
client_id?: string | null;
|
|
@@ -28,10 +22,7 @@ export interface IUpdateRequest {
|
|
|
28
22
|
country_id?: string;
|
|
29
23
|
}
|
|
30
24
|
export interface IRepository {
|
|
31
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
32
25
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
33
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
34
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
35
26
|
create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
|
|
36
27
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
37
28
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
@@ -2,27 +2,11 @@ import { ClientType } from "../../../shared/entities/user";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = ClientType;
|
|
4
4
|
export declare const Route = "client_type";
|
|
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
5
|
export interface ICreateRequest {
|
|
13
6
|
name: string;
|
|
14
7
|
}
|
|
15
|
-
export interface IUpdateRequest {
|
|
16
|
-
name?: string;
|
|
17
|
-
}
|
|
18
8
|
export interface IRepository {
|
|
19
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
20
9
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
22
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
23
10
|
create(data: ICreateRequest): Promise<Entity>;
|
|
24
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
25
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
26
11
|
}
|
|
27
12
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
28
|
-
export {};
|
|
@@ -19,15 +19,13 @@ interface IFindDetailedResponse extends Entity {
|
|
|
19
19
|
default_vehicle: Vehicles | null;
|
|
20
20
|
}
|
|
21
21
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
22
|
-
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "user" | "main_persona" | "client_type" | "segments_area" | "country" | "language" | "default_payment_method" | "default_maturity_date" | "default_delivery_method" | "default_vehicle">;
|
|
23
22
|
export interface IFindByQueryRequest {
|
|
24
23
|
number?: number[];
|
|
25
24
|
id?: string[];
|
|
26
25
|
nif?: string | null;
|
|
27
26
|
}
|
|
28
27
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
29
|
-
export type
|
|
30
|
-
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
|
|
28
|
+
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone"> & Partial<Pick<Persona, "street" | "locality" | "postal_code" | "country_id" | "vat_taxpayer">>;
|
|
31
29
|
export interface ICreateRequest {
|
|
32
30
|
user_id?: string;
|
|
33
31
|
main_persona: ICreateMainPersona;
|
|
@@ -66,14 +64,10 @@ export interface IUpdateRequest {
|
|
|
66
64
|
}
|
|
67
65
|
export interface IRepository {
|
|
68
66
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
69
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
70
67
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
71
68
|
findByQuery(params: IFindByQueryRequest): Promise<IFindResponse[]>;
|
|
72
|
-
find(): Promise<IFindResponse[]>;
|
|
73
|
-
findPaginated(selector: IShared.IPaginationRequest): Promise<IFindWithPaginationResponse>;
|
|
74
69
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
75
70
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
76
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
77
71
|
}
|
|
78
72
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
79
73
|
export {};
|
|
@@ -16,13 +16,7 @@ interface IFindDetailedResponse extends Entity {
|
|
|
16
16
|
default_delivery_method: DeliveryMethods | null;
|
|
17
17
|
default_vehicle: Vehicles | null;
|
|
18
18
|
}
|
|
19
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
20
|
-
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "user" | "main_persona" | "country" | "language" | "default_payment_method" | "default_maturity_date" | "default_delivery_method" | "default_vehicle">;
|
|
21
|
-
export type IFindRequest = Record<string, unknown>;
|
|
22
19
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
23
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
24
|
-
}
|
|
25
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
26
20
|
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
|
|
27
21
|
export interface ICreateRequest {
|
|
28
22
|
user_id: string;
|
|
@@ -47,14 +41,8 @@ export interface IUpdateRequest {
|
|
|
47
41
|
default_vehicle_id?: string | null;
|
|
48
42
|
}
|
|
49
43
|
export interface IRepository {
|
|
50
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
51
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
52
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
53
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
54
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
55
44
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
56
45
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
57
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
58
46
|
}
|
|
59
47
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
60
48
|
export {};
|
|
@@ -8,28 +8,14 @@ export type IFindRequest = {
|
|
|
8
8
|
name?: string;
|
|
9
9
|
};
|
|
10
10
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
11
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
12
|
-
}
|
|
13
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
14
11
|
export interface ICreateRequest {
|
|
15
12
|
name: string;
|
|
16
13
|
alpha2: string;
|
|
17
|
-
external_id: string;
|
|
18
|
-
}
|
|
19
|
-
export interface IUpdateRequest {
|
|
20
|
-
name?: string;
|
|
21
|
-
alpha2?: string;
|
|
22
|
-
external_id?: string;
|
|
23
14
|
}
|
|
24
15
|
export interface IRepository {
|
|
25
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
26
16
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
27
|
-
findByAlpha2(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
28
17
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
29
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
30
18
|
create(data: ICreateRequest): Promise<Entity>;
|
|
31
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
32
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
33
19
|
}
|
|
34
20
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
35
21
|
export {};
|
|
@@ -14,7 +14,6 @@ export interface IRepository {
|
|
|
14
14
|
create(data: ICreateRequest): Promise<Entity>;
|
|
15
15
|
find(): Promise<Entity[]>;
|
|
16
16
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
17
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
18
17
|
update(selector: IShared.IFindByIdRequest, body: IUpdateRequest): Promise<Entity | null>;
|
|
19
18
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
20
19
|
}
|
|
@@ -13,8 +13,5 @@ export interface IFindOneRequest {
|
|
|
13
13
|
}
|
|
14
14
|
export interface IRepository {
|
|
15
15
|
list(user_id: string): Promise<Entity[]>;
|
|
16
|
-
findByUrl(params: IFindOneRequest): Promise<boolean>;
|
|
17
|
-
create(data: ICreateRequest): Promise<Entity>;
|
|
18
|
-
deleteOne(params: IDeleteRequest): Promise<Entity | null>;
|
|
19
16
|
}
|
|
20
17
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -6,26 +6,17 @@ type IFindDetailedResponse = Entity;
|
|
|
6
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
7
|
export type IFindRequest = Record<string, unknown>;
|
|
8
8
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
12
9
|
export interface ICreateRequest {
|
|
13
10
|
name: string;
|
|
14
11
|
native_name: string;
|
|
15
12
|
iso_code: string;
|
|
16
13
|
short_list: boolean;
|
|
17
14
|
}
|
|
18
|
-
export interface IUpdateRequest {
|
|
19
|
-
name?: string;
|
|
20
|
-
}
|
|
21
15
|
export interface IRepository {
|
|
22
16
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
23
17
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
24
18
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
25
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
26
19
|
create(data: ICreateRequest): Promise<Entity>;
|
|
27
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
28
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
29
20
|
}
|
|
30
21
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
31
22
|
export {};
|
|
@@ -13,7 +13,6 @@ export interface IUpdateRequest {
|
|
|
13
13
|
days?: number;
|
|
14
14
|
}
|
|
15
15
|
export interface IRepository {
|
|
16
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
17
16
|
find(): Promise<Entity[]>;
|
|
18
17
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
19
18
|
create(data: ICreateRequest): Promise<Entity>;
|
|
@@ -2,19 +2,12 @@ import { PaymentMethods } from "../../../shared/entities/user";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = PaymentMethods;
|
|
4
4
|
export declare const Route = "payment_methods";
|
|
5
|
+
/** Meios de pagamento SAF-T (PaymentMechanism) usados pela aplicação. */
|
|
5
6
|
export declare const PaymentMethodsSaftCodeEnum: {
|
|
6
7
|
CC: "CC";
|
|
7
|
-
CD: "CD";
|
|
8
|
-
CH: "CH";
|
|
9
|
-
CI: "CI";
|
|
10
|
-
CO: "CO";
|
|
11
|
-
CS: "CS";
|
|
12
|
-
DE: "DE";
|
|
13
|
-
LC: "LC";
|
|
14
8
|
MB: "MB";
|
|
15
9
|
NU: "NU";
|
|
16
10
|
OU: "OU";
|
|
17
|
-
PR: "PR";
|
|
18
11
|
TB: "TB";
|
|
19
12
|
TR: "TR";
|
|
20
13
|
};
|
|
@@ -22,22 +15,18 @@ export type IPaymentMethodsSaftCodeEnum = (typeof PaymentMethodsSaftCodeEnum)[ke
|
|
|
22
15
|
export interface ICreateRequest {
|
|
23
16
|
payment_method_id?: number | null;
|
|
24
17
|
name: string;
|
|
25
|
-
is_numerary: boolean;
|
|
26
|
-
is_mb: boolean;
|
|
27
|
-
is_credit: boolean;
|
|
28
18
|
hidden: boolean | null;
|
|
29
19
|
saft_code: IPaymentMethodsSaftCodeEnum;
|
|
20
|
+
incluir_no_apuro_caixa: boolean;
|
|
30
21
|
}
|
|
31
22
|
export interface IUpdateRequest {
|
|
32
23
|
payment_method_id?: number | null;
|
|
33
24
|
name?: string;
|
|
34
|
-
is_numerary?: boolean;
|
|
35
|
-
is_mb?: boolean;
|
|
36
|
-
is_credit?: boolean;
|
|
37
25
|
hidden?: boolean | null;
|
|
26
|
+
saft_code?: IPaymentMethodsSaftCodeEnum;
|
|
27
|
+
incluir_no_apuro_caixa?: boolean;
|
|
38
28
|
}
|
|
39
29
|
export interface IRepository {
|
|
40
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
41
30
|
find(): Promise<Entity[]>;
|
|
42
31
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
43
32
|
create(data: ICreateRequest): Promise<Entity>;
|
|
@@ -96,6 +96,7 @@ export interface IFindByEmailResponse {
|
|
|
96
96
|
}
|
|
97
97
|
export interface IFindClientOrProviderRequest {
|
|
98
98
|
nif?: string | null;
|
|
99
|
+
country_id?: string | null;
|
|
99
100
|
email?: string | null;
|
|
100
101
|
telephone?: string | null;
|
|
101
102
|
user_type: "client" | "provider";
|
|
@@ -161,9 +162,6 @@ export interface IDuplicatedGroupResponse {
|
|
|
161
162
|
data?: IDuplicatedGroupData;
|
|
162
163
|
members: IDuplicatedGroupMember[];
|
|
163
164
|
}
|
|
164
|
-
export interface IResolveDuplicatedGroupRequest {
|
|
165
|
-
target_client_id: string;
|
|
166
|
-
}
|
|
167
165
|
export interface IExecuteMergeDuplicatedGroupRequest {
|
|
168
166
|
target_client_id: string;
|
|
169
167
|
source_client_ids: string[];
|
|
@@ -189,7 +187,6 @@ export interface IRepository {
|
|
|
189
187
|
publicUpdate(selector: IShared.IFindByIdRequest, data: IPublicUpdateRequest): Promise<void>;
|
|
190
188
|
findDuplicateds(): Promise<IDuplicatedGroupResponse[]>;
|
|
191
189
|
refreshDuplicateds(): Promise<void>;
|
|
192
|
-
resolveDuplicateds(selector: IShared.IFindByIdRequest, data: IResolveDuplicatedGroupRequest): Promise<void>;
|
|
193
190
|
executeMergeDuplicateds(selector: IShared.IFindByIdRequest, data: IExecuteMergeDuplicatedGroupRequest): Promise<IExecuteMergeDuplicatedGroupResponse>;
|
|
194
191
|
}
|
|
195
192
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -3,26 +3,13 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = ProviderType;
|
|
4
4
|
export declare const Route = "provider_type";
|
|
5
5
|
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
6
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
12
7
|
export interface ICreateRequest {
|
|
13
8
|
name: string;
|
|
14
9
|
}
|
|
15
|
-
export interface IUpdateRequest {
|
|
16
|
-
name?: string;
|
|
17
|
-
}
|
|
18
10
|
export interface IRepository {
|
|
19
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
20
11
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
22
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
23
12
|
create(data: ICreateRequest): Promise<Entity>;
|
|
24
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
25
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
26
13
|
}
|
|
27
14
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
28
15
|
export {};
|
|
@@ -20,14 +20,11 @@ interface IFindDetailedResponse extends Entity {
|
|
|
20
20
|
default_vehicle: Vehicles | null;
|
|
21
21
|
}
|
|
22
22
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
23
|
-
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "user" | "main_persona" | "country" | "language" | "support_language" | "provider_type" | "default_payment_method" | "default_maturity_date" | "default_delivery_method" | "default_vehicle">;
|
|
24
23
|
export interface IFindByQueryRequest {
|
|
25
24
|
number?: number[];
|
|
26
25
|
id?: string[];
|
|
27
26
|
}
|
|
28
27
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
29
|
-
export type IFindPaginatedRequest = IShared.IPaginationRequest;
|
|
30
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
31
28
|
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
|
|
32
29
|
export interface ICreateRequest {
|
|
33
30
|
user_id?: string;
|
|
@@ -72,15 +69,10 @@ export interface IFindByNumberResponse extends Pick<DocumentHeader, "owner_id" |
|
|
|
72
69
|
}
|
|
73
70
|
export interface IRepository {
|
|
74
71
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
75
|
-
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
76
72
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
77
|
-
findMinifiedManufacturer(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
78
73
|
findByQuery(params: IFindByQueryRequest): Promise<IFindResponse[]>;
|
|
79
|
-
find(): Promise<IFindResponse[]>;
|
|
80
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
81
74
|
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
82
75
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
83
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
84
76
|
findByNumber(selector: IFindByNumberRequest): Promise<IFindByNumberResponse | null>;
|
|
85
77
|
}
|
|
86
78
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -2,13 +2,7 @@ import { PurchaseConditions } from "../../../shared/entities/user";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = PurchaseConditions;
|
|
4
4
|
export declare const Route = "purchase_conditions";
|
|
5
|
-
export type IFindByIdResponse = Omit<Entity, "product_category">;
|
|
6
5
|
export type IFindByOwnerIdResponse = Omit<Entity, "">;
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
|
-
export type IFindResponse = Omit<Entity, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<Entity, "">>;
|
|
12
6
|
export interface ICreateRequest {
|
|
13
7
|
provider_id: string;
|
|
14
8
|
discount: string;
|
|
@@ -21,10 +15,7 @@ export interface IUpdateRequest {
|
|
|
21
15
|
minimum_quantity?: string;
|
|
22
16
|
}
|
|
23
17
|
export interface IRepository {
|
|
24
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
25
18
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
26
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
27
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
28
19
|
create(data: ICreateRequest): Promise<Entity>;
|
|
29
20
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
30
21
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
@@ -8,9 +8,7 @@ export declare const ReasonForExemptionTypeEnum: {
|
|
|
8
8
|
tenant: "tenant";
|
|
9
9
|
};
|
|
10
10
|
export type IReasonForExemptionType = (typeof ReasonForExemptionTypeEnum)[keyof typeof ReasonForExemptionTypeEnum];
|
|
11
|
-
export declare const reasonForExemptionTypes: string[];
|
|
12
11
|
type IFindDetailedResponse = Entity;
|
|
13
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
14
12
|
export type IFindRequest = Record<string, unknown>;
|
|
15
13
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
16
14
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
@@ -31,7 +29,6 @@ export interface IUpdateRequest {
|
|
|
31
29
|
external_id?: string;
|
|
32
30
|
}
|
|
33
31
|
export interface IRepository {
|
|
34
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
35
32
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
36
33
|
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
37
34
|
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
@@ -2,29 +2,12 @@ import { SegmentsArea } from "../../../shared/entities/user";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = SegmentsArea;
|
|
4
4
|
export declare const Route = "segments_area";
|
|
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
5
|
export interface ICreateRequest {
|
|
13
6
|
type: string;
|
|
14
7
|
name: string;
|
|
15
8
|
}
|
|
16
|
-
export interface IUpdateRequest {
|
|
17
|
-
type?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
}
|
|
20
9
|
export interface IRepository {
|
|
21
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
22
10
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
23
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
24
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
25
11
|
create(data: ICreateRequest): Promise<Entity>;
|
|
26
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
27
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
12
|
}
|
|
29
13
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
30
|
-
export {};
|
|
@@ -3,13 +3,8 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = Shippings;
|
|
4
4
|
export declare const Route = "shippings";
|
|
5
5
|
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
6
|
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, "">;
|
|
8
|
-
export type IFindRequest = Record<string, unknown>;
|
|
9
7
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
10
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
11
|
-
}
|
|
12
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
13
8
|
export interface ICreateRequest {
|
|
14
9
|
provider_id: string;
|
|
15
10
|
type: string;
|
|
@@ -24,10 +19,7 @@ export interface IUpdateRequest {
|
|
|
24
19
|
unit?: string;
|
|
25
20
|
}
|
|
26
21
|
export interface IRepository {
|
|
27
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
28
22
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
29
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
30
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
31
23
|
create(data: ICreateRequest): Promise<Entity>;
|
|
32
24
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
33
25
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
@@ -7,6 +7,7 @@ export interface IFindResponse extends Pick<Entity, "id" | "number" | "pin" | "i
|
|
|
7
7
|
user: Pick<Users, "id">;
|
|
8
8
|
main_persona: Pick<Persona, "id" | "name" | "email">;
|
|
9
9
|
sidemenu_highlights: string[];
|
|
10
|
+
has_saft_document: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface ICreateRequest {
|
|
12
13
|
main_persona_name: string;
|
|
@@ -32,12 +33,10 @@ export interface IUpdateOwnPinRequest {
|
|
|
32
33
|
pin: string;
|
|
33
34
|
}
|
|
34
35
|
export interface IRepository {
|
|
35
|
-
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
36
36
|
find(): Promise<IFindResponse[]>;
|
|
37
37
|
findPaginated(selector: IFindPaginatedRequest): Promise<IShared.IPaginationResponse<IFindResponse>>;
|
|
38
38
|
create(data: ICreateRequest): Promise<string>;
|
|
39
39
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
40
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
41
40
|
updatePassword(selector: IShared.IFindByIdRequest, data: IUpdatePasswordRequest): Promise<void>;
|
|
42
41
|
updateOwnPin(data: IUpdateOwnPinRequest): Promise<void>;
|
|
43
42
|
}
|
|
@@ -3,12 +3,7 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = Swift;
|
|
4
4
|
export declare const Route = "swift";
|
|
5
5
|
type IFindDetailedResponse = Entity;
|
|
6
|
-
export type IFindByIdResponse = Omit<IFindDetailedResponse, "">;
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
6
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
9
|
-
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
10
|
-
}
|
|
11
|
-
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
12
7
|
export interface ICreateRequest {
|
|
13
8
|
bank: string;
|
|
14
9
|
city: string;
|
|
@@ -16,21 +11,9 @@ export interface ICreateRequest {
|
|
|
16
11
|
code: string;
|
|
17
12
|
country_id: string;
|
|
18
13
|
}
|
|
19
|
-
export interface IUpdateRequest {
|
|
20
|
-
bank?: string;
|
|
21
|
-
city?: string;
|
|
22
|
-
branch?: string | null;
|
|
23
|
-
code?: string;
|
|
24
|
-
country_id?: string;
|
|
25
|
-
}
|
|
26
14
|
export interface IRepository {
|
|
27
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
28
15
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
29
|
-
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
30
|
-
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
31
16
|
create(data: ICreateRequest): Promise<Entity>;
|
|
32
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
33
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
34
17
|
}
|
|
35
18
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
36
19
|
export {};
|