@experteam-mx/ngx-services 18.4.1 → 18.4.3
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/esm2022/lib/apis/api-billing-do.service.mjs +41 -0
- package/esm2022/lib/apis/api-billing-mx.service.mjs +62 -0
- package/esm2022/lib/apis/api-companies.service.mjs +20 -21
- package/esm2022/lib/apis/api-external-pickups.service.mjs +74 -0
- package/esm2022/lib/apis/api-invoices.service.mjs +78 -8
- package/esm2022/lib/apis/api-open-items.service.mjs +62 -0
- package/esm2022/lib/apis/api-reports.service.mjs +47 -1
- package/esm2022/lib/apis/api-security.service.mjs +88 -49
- package/esm2022/lib/apis/api-shipments.service.mjs +12 -2
- package/esm2022/lib/apis/models/api-billing.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-billing.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-companies.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-external-pickups.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-invoices.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-invoices.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-open-items.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-open-items.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-reports.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-reports.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-security.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-security.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-shipments.types.mjs +1 -1
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/lib/websockets/web-sockets.service.mjs +115 -0
- package/esm2022/public-api.mjs +11 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +643 -143
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-billing-do.service.d.ts +24 -0
- package/lib/apis/api-billing-mx.service.d.ts +39 -0
- package/lib/apis/api-companies.service.d.ts +9 -9
- package/lib/apis/api-external-pickups.service.d.ts +46 -0
- package/lib/apis/api-invoices.service.d.ts +59 -9
- package/lib/apis/api-open-items.service.d.ts +41 -0
- package/lib/apis/api-reports.service.d.ts +24 -1
- package/lib/apis/api-security.service.d.ts +64 -32
- package/lib/apis/api-shipments.service.d.ts +10 -3
- package/lib/apis/models/api-billing.interfaces.d.ts +41 -0
- package/lib/apis/models/api-billing.types.d.ts +17 -0
- package/lib/apis/models/api-catalog.interfaces.d.ts +6 -0
- package/lib/apis/models/api-companies.types.d.ts +7 -13
- package/lib/apis/models/api-external-pickups.types.d.ts +31 -0
- package/lib/apis/models/api-invoices.interfaces.d.ts +35 -1
- package/lib/apis/models/api-invoices.types.d.ts +57 -5
- package/lib/apis/models/api-open-items.interfaces.d.ts +32 -0
- package/lib/apis/models/api-open-items.types.d.ts +58 -0
- package/lib/apis/models/api-reports.interfaces.d.ts +149 -0
- package/lib/apis/models/api-reports.types.d.ts +13 -4
- package/lib/apis/models/api-security.interfaces.d.ts +2 -6
- package/lib/apis/models/api-security.types.d.ts +41 -11
- package/lib/apis/models/api-shipments.types.d.ts +41 -0
- package/lib/ngx-services.models.d.ts +11 -0
- package/lib/websockets/web-sockets.service.d.ts +49 -0
- package/package.json +11 -2
- package/public-api.d.ts +9 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Document } from './api-invoices.interfaces';
|
|
2
|
-
|
|
1
|
+
import { Customer, CustomerType, Document } from './api-invoices.interfaces';
|
|
2
|
+
import { CustomerCountryDocumentType } from './api-billing.interfaces';
|
|
3
|
+
export interface OperationAccountPaymentIn {
|
|
3
4
|
document_type_range_id: number | null;
|
|
4
5
|
document_number: string | null;
|
|
5
6
|
observation: string | null;
|
|
@@ -24,11 +25,11 @@ export type AccountPayment = {
|
|
|
24
25
|
status?: boolean;
|
|
25
26
|
details?: {};
|
|
26
27
|
};
|
|
27
|
-
export interface
|
|
28
|
+
export interface OperationAccountPaymentOut {
|
|
28
29
|
document: Document;
|
|
29
30
|
transaction_id: string;
|
|
30
31
|
}
|
|
31
|
-
export type
|
|
32
|
+
export type PrintCollectionReceiptOut = {
|
|
32
33
|
collection_receipt: string;
|
|
33
34
|
};
|
|
34
35
|
export type CancelPaymentReceiptIn = {
|
|
@@ -36,9 +37,60 @@ export type CancelPaymentReceiptIn = {
|
|
|
36
37
|
is_canceled_invoice: boolean;
|
|
37
38
|
cancellation_reason_id: number;
|
|
38
39
|
};
|
|
39
|
-
export type
|
|
40
|
+
export type OperationCancelBillingIn = {
|
|
40
41
|
invoiceId: number;
|
|
41
42
|
cancellation_reason_id: number;
|
|
42
43
|
cancel_payment: boolean;
|
|
43
44
|
send_shipments: boolean;
|
|
44
45
|
};
|
|
46
|
+
export type OperationDocumentIn = {
|
|
47
|
+
country_document_type_id: number;
|
|
48
|
+
customer: {
|
|
49
|
+
company_name: string;
|
|
50
|
+
full_name: string;
|
|
51
|
+
email: string;
|
|
52
|
+
phone_code: string;
|
|
53
|
+
phone_number: string;
|
|
54
|
+
address_line1: string;
|
|
55
|
+
address_line2: string;
|
|
56
|
+
address_line3: string;
|
|
57
|
+
identification_number: string;
|
|
58
|
+
identification_type_id: number;
|
|
59
|
+
postal_code: string;
|
|
60
|
+
state: string;
|
|
61
|
+
county_name: string;
|
|
62
|
+
city_name: string;
|
|
63
|
+
country_id: number;
|
|
64
|
+
extra_fields: {
|
|
65
|
+
[key: string]: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
document_extra_fields: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export type OperationDocumentOut = {
|
|
73
|
+
document: Document;
|
|
74
|
+
};
|
|
75
|
+
export type InvoiceTypeCustomParamsIn = {
|
|
76
|
+
identificationNumber: string;
|
|
77
|
+
identificationTypeid: number;
|
|
78
|
+
};
|
|
79
|
+
export type OperationPrintDocumentOut = {
|
|
80
|
+
document: string;
|
|
81
|
+
};
|
|
82
|
+
export type CustomerTypesOut = {
|
|
83
|
+
customer_types: CustomerType[];
|
|
84
|
+
total: number;
|
|
85
|
+
};
|
|
86
|
+
export type CustomersOut = {
|
|
87
|
+
customers: Customer[];
|
|
88
|
+
};
|
|
89
|
+
export type OperationShipmentExternalOut = {
|
|
90
|
+
document: Document;
|
|
91
|
+
};
|
|
92
|
+
export type OperationShipmentExternalIn = {};
|
|
93
|
+
export type CustomerDocumentTypesOut = {
|
|
94
|
+
customer_country_document_types: CustomerCountryDocumentType[];
|
|
95
|
+
total: number;
|
|
96
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CustomerOpenItem, CustomerOtherInvoice, OpenItems, OtherInvoices, PaymentDetail } from './api-open-items.types';
|
|
2
|
+
export interface OpenItem {
|
|
3
|
+
id: number;
|
|
4
|
+
invoice_number: string;
|
|
5
|
+
shipment_tracking_number: string;
|
|
6
|
+
invoice_issue_datetime: Date | string;
|
|
7
|
+
invoice_expiration_datetime: Date | string;
|
|
8
|
+
customer_identification_number: string;
|
|
9
|
+
customer_company_name: string;
|
|
10
|
+
account: string;
|
|
11
|
+
country_reference_currency_id: number;
|
|
12
|
+
pending_value: number;
|
|
13
|
+
payed_value: number;
|
|
14
|
+
is_cash: boolean;
|
|
15
|
+
status: string;
|
|
16
|
+
origin: string;
|
|
17
|
+
user_id: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface OpenItemIn {
|
|
20
|
+
payments: PaymentDetail[];
|
|
21
|
+
customer: CustomerOpenItem | CustomerOtherInvoice;
|
|
22
|
+
document_type_range_id: number;
|
|
23
|
+
document_number: string;
|
|
24
|
+
observation: string;
|
|
25
|
+
document_date: Date;
|
|
26
|
+
}
|
|
27
|
+
export interface PaymentOpenItemIn extends OpenItemIn {
|
|
28
|
+
open_items: OpenItems[];
|
|
29
|
+
}
|
|
30
|
+
export interface OtherInvoiceIn extends OpenItemIn {
|
|
31
|
+
other_invoices: OtherInvoices[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { OpenItem } from './api-open-items.interfaces';
|
|
2
|
+
import { Document } from './api-invoices.interfaces';
|
|
3
|
+
export type CustomerOpenItem = {
|
|
4
|
+
company_name: string;
|
|
5
|
+
full_name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone_code: string;
|
|
8
|
+
phone_number: string;
|
|
9
|
+
address_line1: string;
|
|
10
|
+
address_line2: string;
|
|
11
|
+
address_line3: string;
|
|
12
|
+
identification_number: string;
|
|
13
|
+
identification_type_id: number;
|
|
14
|
+
postal_code: string;
|
|
15
|
+
state: string;
|
|
16
|
+
county_name: string;
|
|
17
|
+
city_name: string;
|
|
18
|
+
country_id: number;
|
|
19
|
+
};
|
|
20
|
+
export type CustomerOtherInvoice = {
|
|
21
|
+
identification_number: string;
|
|
22
|
+
company_name: string;
|
|
23
|
+
full_name: string;
|
|
24
|
+
account_number: string;
|
|
25
|
+
country_id: number;
|
|
26
|
+
};
|
|
27
|
+
export type OpenItems = {
|
|
28
|
+
id: string;
|
|
29
|
+
payed_value: number;
|
|
30
|
+
};
|
|
31
|
+
export type OpenItemsOut = {
|
|
32
|
+
open_items: OpenItem[];
|
|
33
|
+
total: number;
|
|
34
|
+
};
|
|
35
|
+
export type OtherInvoices = {
|
|
36
|
+
invoice_number: string;
|
|
37
|
+
shipment_tracking_number: string;
|
|
38
|
+
invoice_issue_datetime: string;
|
|
39
|
+
pending_value: number;
|
|
40
|
+
customer_identification_number: string;
|
|
41
|
+
};
|
|
42
|
+
export type PaymentDetail = {
|
|
43
|
+
amount: number;
|
|
44
|
+
received: number;
|
|
45
|
+
country_reference_currency_id: number;
|
|
46
|
+
exchange: string | number;
|
|
47
|
+
country_payment_type_id: number;
|
|
48
|
+
due_date: string;
|
|
49
|
+
details: {
|
|
50
|
+
[key: string]: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export type PaymentOut = {
|
|
54
|
+
document: Document;
|
|
55
|
+
};
|
|
56
|
+
export type OtherInvoiceOut = {
|
|
57
|
+
document: Document;
|
|
58
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LaravelModel, Translations } from './api.models';
|
|
2
|
+
import { DocumentPayment } from './api-invoices.interfaces';
|
|
2
3
|
export interface CollectionPayment extends LaravelModel {
|
|
3
4
|
_id: number;
|
|
4
5
|
country_code: string;
|
|
@@ -45,3 +46,151 @@ export interface DocumentCategory extends LaravelModel {
|
|
|
45
46
|
updated_at: string;
|
|
46
47
|
translations: Translations;
|
|
47
48
|
}
|
|
49
|
+
export interface Shipment {
|
|
50
|
+
id: number;
|
|
51
|
+
document_id: number;
|
|
52
|
+
shipment_scope_name: string;
|
|
53
|
+
is_document: boolean;
|
|
54
|
+
origin_service_area_code: string;
|
|
55
|
+
origin_facility_code: string;
|
|
56
|
+
destination_facility_code: string;
|
|
57
|
+
destination_service_area_code: string;
|
|
58
|
+
shipment_pieces_tracking_numbers: string[];
|
|
59
|
+
shipment_tracking_number: string;
|
|
60
|
+
shipper_full_name: string;
|
|
61
|
+
shipper_company_name: string;
|
|
62
|
+
shipper_email: string;
|
|
63
|
+
shipper_phone_number: string;
|
|
64
|
+
shipper_phone_code: string;
|
|
65
|
+
shipper_full_phone_number: string;
|
|
66
|
+
shipper_address_line1: string;
|
|
67
|
+
shipper_address_line2: string;
|
|
68
|
+
shipper_city_name: string;
|
|
69
|
+
shipper_state_name: string;
|
|
70
|
+
shipper_state_code: string;
|
|
71
|
+
shipper_postal_code: string;
|
|
72
|
+
receiver_full_name: string;
|
|
73
|
+
receiver_company_name: string;
|
|
74
|
+
receiver_address_line1: string;
|
|
75
|
+
receiver_address_line2: string;
|
|
76
|
+
receiver_city_name: string;
|
|
77
|
+
receiver_state_name: string;
|
|
78
|
+
receiver_state_code: string;
|
|
79
|
+
receiver_postal_code: string;
|
|
80
|
+
shipper_account: string;
|
|
81
|
+
promotion_code: string;
|
|
82
|
+
customer_identification_type_id: number;
|
|
83
|
+
customer_identification_number: string;
|
|
84
|
+
customer_email: string;
|
|
85
|
+
customer_full_phone_number: string;
|
|
86
|
+
price_override_approver_id: number;
|
|
87
|
+
price_override_reason_id: number;
|
|
88
|
+
price_override_approver_name: string;
|
|
89
|
+
price_override_reason_name: string;
|
|
90
|
+
is_proforma: boolean;
|
|
91
|
+
is_kiosk: boolean;
|
|
92
|
+
to_landing: boolean;
|
|
93
|
+
is_price_override: boolean;
|
|
94
|
+
is_promotion_code: boolean;
|
|
95
|
+
is_retail_rate: boolean;
|
|
96
|
+
payment_type_1: string;
|
|
97
|
+
payment_code_1: string;
|
|
98
|
+
amount_1: number;
|
|
99
|
+
reference_1: string;
|
|
100
|
+
payment_type_2: string;
|
|
101
|
+
payment_code_2: string;
|
|
102
|
+
amount_2: number;
|
|
103
|
+
reference_2: string;
|
|
104
|
+
document_payments?: DocumentPayment[];
|
|
105
|
+
location_id: number;
|
|
106
|
+
installation_id: number;
|
|
107
|
+
user_id: number;
|
|
108
|
+
user_username: string;
|
|
109
|
+
company_id: number;
|
|
110
|
+
country_id: number;
|
|
111
|
+
company_country_id: number;
|
|
112
|
+
country_name: string;
|
|
113
|
+
company_name: string;
|
|
114
|
+
country_code: string;
|
|
115
|
+
location_name: string;
|
|
116
|
+
location_facility_code: string;
|
|
117
|
+
installation_number: number;
|
|
118
|
+
product_global_code: string;
|
|
119
|
+
product_local_code: string;
|
|
120
|
+
shipment_gmt_offset: string;
|
|
121
|
+
shipment_pieces_number: number;
|
|
122
|
+
shipment_bill_weight: number;
|
|
123
|
+
total_published_value: number;
|
|
124
|
+
total_partner_account_value: number;
|
|
125
|
+
question_id: number;
|
|
126
|
+
question_description: string;
|
|
127
|
+
question_type: string;
|
|
128
|
+
amount_collected: number;
|
|
129
|
+
shipment_value: number;
|
|
130
|
+
declared_value: number;
|
|
131
|
+
insured_value: number;
|
|
132
|
+
shipment_status_id: number;
|
|
133
|
+
transaction_id: string;
|
|
134
|
+
shipment_type: string;
|
|
135
|
+
ein_number: string;
|
|
136
|
+
itn_number: string;
|
|
137
|
+
created_at: string;
|
|
138
|
+
updated_at: string;
|
|
139
|
+
retail_rate_adjustment: number;
|
|
140
|
+
shipment_status_code: string;
|
|
141
|
+
shipment_status_description: string;
|
|
142
|
+
shipment_status_translations: {
|
|
143
|
+
description: {
|
|
144
|
+
[key: string]: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
authorization_numbers: string[];
|
|
148
|
+
is_term_condition: boolean;
|
|
149
|
+
is_marketing_consent: boolean;
|
|
150
|
+
is_manual: boolean;
|
|
151
|
+
commercial_invoice: boolean;
|
|
152
|
+
shipment_id: number;
|
|
153
|
+
date: string;
|
|
154
|
+
date_og: string;
|
|
155
|
+
invoice_document_id?: number | null;
|
|
156
|
+
currency_code: string | null;
|
|
157
|
+
send_to_api_inventories: boolean;
|
|
158
|
+
selected?: boolean;
|
|
159
|
+
delivery_date_time: string;
|
|
160
|
+
product_subtotal: number;
|
|
161
|
+
product_tax: number;
|
|
162
|
+
product_total: number;
|
|
163
|
+
product_taxes: {
|
|
164
|
+
code: string;
|
|
165
|
+
percent: number;
|
|
166
|
+
base_amount: number;
|
|
167
|
+
amount: number;
|
|
168
|
+
}[];
|
|
169
|
+
shipment_company_country_extra_charges: {
|
|
170
|
+
_id: number;
|
|
171
|
+
subtotal: number;
|
|
172
|
+
tax: number;
|
|
173
|
+
total: number;
|
|
174
|
+
extra_charge_id: number;
|
|
175
|
+
taxes: {
|
|
176
|
+
code: string;
|
|
177
|
+
percent: number;
|
|
178
|
+
base_amount: number;
|
|
179
|
+
amount: number;
|
|
180
|
+
}[];
|
|
181
|
+
created_at: string;
|
|
182
|
+
updated_at: string;
|
|
183
|
+
global_service_code: string;
|
|
184
|
+
local_service_code: string;
|
|
185
|
+
global_service_name: string;
|
|
186
|
+
local_service_name: string;
|
|
187
|
+
is_discount: false;
|
|
188
|
+
}[];
|
|
189
|
+
additional_documents: {
|
|
190
|
+
country_id: number;
|
|
191
|
+
include_indemnity_letter: boolean;
|
|
192
|
+
include_pdf: boolean;
|
|
193
|
+
shipment_content_type_id: number;
|
|
194
|
+
shipment_scope_id: number;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface CollectionPaymentsOut extends LaravelModel {
|
|
1
|
+
import { CollectionPayment, Shipment } from './api-reports.interfaces';
|
|
2
|
+
export type CollectionPaymentsOut = {
|
|
4
3
|
collection_payments: CollectionPayment[];
|
|
5
4
|
total: number;
|
|
6
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type ShipmentsReportOut = {
|
|
7
|
+
shipments: Shipment[];
|
|
8
|
+
total: number;
|
|
9
|
+
};
|
|
10
|
+
export type ExistPendingPaymentsIn = {
|
|
11
|
+
installation_id: number;
|
|
12
|
+
};
|
|
13
|
+
export type ExistPendingInvoicesIn = {
|
|
14
|
+
installation_id: number;
|
|
15
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LaravelModel } from './api.models';
|
|
2
|
-
import { Language } from './api-catalog.interfaces';
|
|
3
2
|
import { Pivot } from './api-security.types';
|
|
4
3
|
export interface Session extends LaravelModel {
|
|
5
4
|
name: string;
|
|
@@ -43,15 +42,12 @@ export interface Permission extends LaravelModel {
|
|
|
43
42
|
export interface User extends LaravelModel {
|
|
44
43
|
name: string;
|
|
45
44
|
username: string;
|
|
46
|
-
email: string;
|
|
47
45
|
model_type: string;
|
|
48
46
|
model_id: number;
|
|
49
47
|
auth_type: string;
|
|
50
48
|
language_id: number;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
session: Session;
|
|
54
|
-
language: Language;
|
|
49
|
+
email: string;
|
|
50
|
+
roles: Role[];
|
|
55
51
|
}
|
|
56
52
|
export interface Module extends LaravelModel {
|
|
57
53
|
name: string;
|
|
@@ -1,27 +1,57 @@
|
|
|
1
|
-
import { Module, Role, RoleType, Session, User } from './api-security.interfaces';
|
|
2
|
-
export type
|
|
1
|
+
import { Module, Permission, Role, RoleType, Session, User } from './api-security.interfaces';
|
|
2
|
+
export type AuthLoginIn = {
|
|
3
3
|
username: string;
|
|
4
4
|
password: string;
|
|
5
|
-
role?:
|
|
5
|
+
role?: number;
|
|
6
|
+
system_name?: string;
|
|
6
7
|
};
|
|
7
|
-
export type
|
|
8
|
+
export type AuthLoginOut = {
|
|
8
9
|
access_token: string;
|
|
9
10
|
token_type: string;
|
|
10
11
|
expires_in: number;
|
|
11
12
|
};
|
|
12
|
-
export type
|
|
13
|
+
export type AuthUserLoginIn = {
|
|
14
|
+
username: string;
|
|
15
|
+
};
|
|
16
|
+
export type SessionIn = {
|
|
13
17
|
modelType: string;
|
|
14
18
|
modelId: number;
|
|
15
19
|
token?: string;
|
|
16
20
|
};
|
|
17
|
-
export type
|
|
21
|
+
export type SessionOut = {
|
|
18
22
|
session: Session;
|
|
19
23
|
};
|
|
24
|
+
export type PutUsersIn = {
|
|
25
|
+
user: User;
|
|
26
|
+
};
|
|
27
|
+
export type PutUsersOut = {
|
|
28
|
+
user: User;
|
|
29
|
+
};
|
|
20
30
|
export type GetUserOut = {
|
|
21
31
|
user: User;
|
|
22
32
|
};
|
|
23
|
-
export
|
|
24
|
-
|
|
33
|
+
export type GetUsersOut = {
|
|
34
|
+
users: User[];
|
|
35
|
+
total: number;
|
|
36
|
+
};
|
|
37
|
+
export type AuthMeOut = {
|
|
38
|
+
user: {
|
|
39
|
+
id: number;
|
|
40
|
+
name: string;
|
|
41
|
+
username: string;
|
|
42
|
+
model_type: string;
|
|
43
|
+
model_id: number;
|
|
44
|
+
is_active: boolean;
|
|
45
|
+
created_at: string;
|
|
46
|
+
updated_at: string;
|
|
47
|
+
auth_type: string;
|
|
48
|
+
language_id: number;
|
|
49
|
+
email: string;
|
|
50
|
+
role: Role;
|
|
51
|
+
permissions: Permission[];
|
|
52
|
+
session: Session | null;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
25
55
|
export type ChangeLanguageIn = {
|
|
26
56
|
languageId: number;
|
|
27
57
|
};
|
|
@@ -36,10 +66,10 @@ export type Pivot = {
|
|
|
36
66
|
module_id: string;
|
|
37
67
|
permission_id: string;
|
|
38
68
|
};
|
|
39
|
-
export type
|
|
69
|
+
export type RoleOut = {
|
|
40
70
|
role: Role;
|
|
41
71
|
};
|
|
42
|
-
export type
|
|
72
|
+
export type RoleIn = {
|
|
43
73
|
name: string;
|
|
44
74
|
role_type_id: number;
|
|
45
75
|
company_country_id: number;
|
|
@@ -51,7 +81,7 @@ export type RoleTypesOut = {
|
|
|
51
81
|
role_types: RoleType[];
|
|
52
82
|
total: number;
|
|
53
83
|
};
|
|
54
|
-
export type
|
|
84
|
+
export type ModulesOut = {
|
|
55
85
|
modules: Module[];
|
|
56
86
|
total: number;
|
|
57
87
|
};
|
|
@@ -30,3 +30,44 @@ export type ValidateAccountOut = {
|
|
|
30
30
|
account: AccountResponse;
|
|
31
31
|
transactionId: string;
|
|
32
32
|
};
|
|
33
|
+
export type ManifestMultipleIn = {
|
|
34
|
+
shipmentIds: number[];
|
|
35
|
+
customer: {
|
|
36
|
+
companyName: string;
|
|
37
|
+
fullName: string;
|
|
38
|
+
email: string;
|
|
39
|
+
phoneCode: string;
|
|
40
|
+
phoneNumber: string;
|
|
41
|
+
addressLine1: string;
|
|
42
|
+
addressLine2?: string;
|
|
43
|
+
addressLine3?: string;
|
|
44
|
+
identificationNumber?: string;
|
|
45
|
+
identificationTypeId?: number;
|
|
46
|
+
countryCode: string;
|
|
47
|
+
stateCode?: string;
|
|
48
|
+
postalCode?: string;
|
|
49
|
+
cityName?: string;
|
|
50
|
+
countyName?: string;
|
|
51
|
+
};
|
|
52
|
+
paymentDetails: {
|
|
53
|
+
totalAmount: number;
|
|
54
|
+
payments: {
|
|
55
|
+
amount: number;
|
|
56
|
+
received: number;
|
|
57
|
+
countryReferenceCurrencyId: number;
|
|
58
|
+
exchange: number;
|
|
59
|
+
countryPaymentTypeId: number;
|
|
60
|
+
dueDate: string;
|
|
61
|
+
details: Record<string, string>;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
priceOverrideApproverId: number | null;
|
|
65
|
+
priceOverrideReasonId: number | null;
|
|
66
|
+
isPendingInvoice?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type ManifestMultipleOut = {
|
|
69
|
+
shipmentManifests: {
|
|
70
|
+
documentId: number;
|
|
71
|
+
};
|
|
72
|
+
transactionId: string;
|
|
73
|
+
};
|
|
@@ -15,8 +15,13 @@ import { InjectionToken } from '@angular/core';
|
|
|
15
15
|
* - secretKey: A secret key used for authentication or other secure operations.
|
|
16
16
|
*/
|
|
17
17
|
export type Environment = {
|
|
18
|
+
apiBillingDO?: string;
|
|
19
|
+
apiBillingMX?: string;
|
|
18
20
|
apiCompaniesUrl?: string;
|
|
21
|
+
apiExternalOperationsKey?: string;
|
|
22
|
+
apiExternalOperationsUrl?: string;
|
|
19
23
|
apiInvoicesUrl?: string;
|
|
24
|
+
apiOpenItemsUrl?: string;
|
|
20
25
|
apiReportsUrl?: string;
|
|
21
26
|
apiSecurityUrl?: string;
|
|
22
27
|
apiShipmentUrl?: string;
|
|
@@ -24,6 +29,12 @@ export type Environment = {
|
|
|
24
29
|
cacheTtl?: number;
|
|
25
30
|
printUrl?: string;
|
|
26
31
|
secretKey: string;
|
|
32
|
+
sockets?: {
|
|
33
|
+
app_key: string;
|
|
34
|
+
debug?: boolean;
|
|
35
|
+
port: number;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
27
38
|
};
|
|
28
39
|
/**
|
|
29
40
|
* Injection token used to inject environment configurations.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Channel } from 'pusher-js';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Environment } from '../ngx-services.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WebSocketsService {
|
|
6
|
+
private environments;
|
|
7
|
+
private pusher;
|
|
8
|
+
constructor(environments: Environment);
|
|
9
|
+
/**
|
|
10
|
+
* Publishes an event to the specified channel with the given data.
|
|
11
|
+
*
|
|
12
|
+
* @param {Channel} channel - The channel instance where the event will be published.
|
|
13
|
+
* @param {string} eventName - The name of the event to be published.
|
|
14
|
+
* @param {T} data - The payload data to be sent with the event.
|
|
15
|
+
* @return {Promise<boolean>} A promise that resolves to a boolean indicating
|
|
16
|
+
* whether the event was successfully triggered on the channel.
|
|
17
|
+
*/
|
|
18
|
+
pub<T>(channel: Channel, eventName: string, data: T): Promise<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribes to a specified channel, retrying multiple times upon failure.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} channelName - The name of the channel to be subscribed to.
|
|
23
|
+
* @return {Promise<Channel>} A promise that resolves to the subscribed channel object if successful.
|
|
24
|
+
* @throws {Error} If the subscription fails after the maximum number of retry attempts.
|
|
25
|
+
*/
|
|
26
|
+
channelSub(channelName: string): Promise<Channel>;
|
|
27
|
+
/**
|
|
28
|
+
* Binds an event listener to a specified event on a given channel using Pusher or a Channel object,
|
|
29
|
+
* and returns an Observable that emits event data of type T.
|
|
30
|
+
*
|
|
31
|
+
* @param {Channel|string} channel - The channel to bind the event to. It can be a Channel object or a string representing the channel name.
|
|
32
|
+
* @param {string} event - The name of the event to bind to the channel.
|
|
33
|
+
* @return {Observable<T>} An Observable that emits data of type T when the specified event is triggered.
|
|
34
|
+
*/
|
|
35
|
+
eventBind<T>(channel: Channel | string, event: string): Observable<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Unbinds an event from the specified channel and returns an observable
|
|
38
|
+
* that emits data when the event callback is triggered.
|
|
39
|
+
*
|
|
40
|
+
* @param {Channel} channel - The channel object from which the event should be unbound.
|
|
41
|
+
* @param {string} event - The name of the event to unbind.
|
|
42
|
+
* @return {Observable<T>} An observable that emits data from the unbound event callback.
|
|
43
|
+
*/
|
|
44
|
+
eventUnbind<T>(channel: Channel, event: string): Observable<unknown>;
|
|
45
|
+
private connect;
|
|
46
|
+
private wait;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebSocketsService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebSocketsService>;
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@experteam-mx/ngx-services",
|
|
3
|
-
"version": "18.4.
|
|
3
|
+
"version": "18.4.3",
|
|
4
4
|
"description": "Angular common services for Experteam apps",
|
|
5
5
|
"author": "Experteam Cía. Ltda.",
|
|
6
6
|
"keywords": [
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
{
|
|
23
23
|
"name": "Byron Bladimir Taco Taco",
|
|
24
24
|
"email": "metal82fest@hotmail.com"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Gianni Santucci",
|
|
28
|
+
"email": "gianni.d.santucci@gmail.com"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Jefferson Morocho",
|
|
32
|
+
"email": "morochoji5@hotmail.com"
|
|
25
33
|
}
|
|
26
34
|
],
|
|
27
35
|
"repository": {
|
|
@@ -35,7 +43,8 @@
|
|
|
35
43
|
"peerDependencies": {
|
|
36
44
|
"@angular/common": "^18.2.0",
|
|
37
45
|
"@angular/core": "^18.2.0",
|
|
38
|
-
"ngx-cookie-service": "^18.0.0"
|
|
46
|
+
"ngx-cookie-service": "^18.0.0",
|
|
47
|
+
"pusher-js": "^7.5.0"
|
|
39
48
|
},
|
|
40
49
|
"sideEffects": false,
|
|
41
50
|
"module": "fesm2022/experteam-mx-ngx-services.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
export * from './lib/ngx-services.models';
|
|
2
2
|
export * from './lib/ngx-services.module';
|
|
3
|
+
export * from './lib/apis/api-billing-do.service';
|
|
4
|
+
export * from './lib/apis/api-billing-mx.service';
|
|
3
5
|
export * from './lib/apis/api-companies.service';
|
|
6
|
+
export * from './lib/apis/api-external-pickups.service';
|
|
4
7
|
export * from './lib/apis/api-invoices.service';
|
|
8
|
+
export * from './lib/apis/api-open-items.service';
|
|
5
9
|
export * from './lib/apis/api-reports.service';
|
|
6
10
|
export * from './lib/apis/api-security.service';
|
|
7
11
|
export * from './lib/apis/api-shipments.service';
|
|
12
|
+
export * from './lib/apis/models/api-billing.types';
|
|
8
13
|
export * from './lib/apis/models/api-companies.interfaces';
|
|
9
14
|
export * from './lib/apis/models/api-companies.types';
|
|
15
|
+
export * from './lib/apis/models/api-external-pickups.types';
|
|
10
16
|
export * from './lib/apis/models/api-invoices.interfaces';
|
|
11
17
|
export * from './lib/apis/models/api-invoices.types';
|
|
18
|
+
export * from './lib/apis/models/api-open-items.interfaces';
|
|
19
|
+
export * from './lib/apis/models/api-open-items.types';
|
|
12
20
|
export * from './lib/apis/models/api-reports.interfaces';
|
|
13
21
|
export * from './lib/apis/models/api-security.interfaces';
|
|
14
22
|
export * from './lib/apis/models/api-security.types';
|
|
15
23
|
export * from './lib/apis/models/api-shipments.types';
|
|
16
24
|
export * from './lib/apis/models/api.models';
|
|
25
|
+
export * from './lib/websockets/web-sockets.service';
|
|
17
26
|
export * from './lib/cypher/crypto.service';
|
|
18
27
|
export * from './lib/interceptors/api-headers.interceptor';
|
|
19
28
|
export * from './lib/interceptors/api-token.interceptor';
|