@experteam-mx/ngx-services 20.0.0-beta.4 → 20.0.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.
Files changed (170) hide show
  1. package/README.md +24 -24
  2. package/esm2022/experteam-mx-ngx-services.mjs +5 -0
  3. package/esm2022/lib/apis/api-billing-do.service.mjs +41 -0
  4. package/esm2022/lib/apis/api-billing-gt.service.mjs +61 -0
  5. package/esm2022/lib/apis/api-billing-mx.service.mjs +62 -0
  6. package/esm2022/lib/apis/api-billing-pa.service.mjs +105 -0
  7. package/esm2022/lib/apis/api-billing-sv.service.mjs +83 -0
  8. package/esm2022/lib/apis/api-cash-operations.service.mjs +93 -0
  9. package/esm2022/lib/apis/api-catalogs.service.mjs +626 -0
  10. package/esm2022/lib/apis/api-companies.service.mjs +1031 -0
  11. package/esm2022/lib/apis/api-composition.service.mjs +55 -0
  12. package/esm2022/lib/apis/api-customs.service.mjs +157 -0
  13. package/esm2022/lib/apis/api-discounts.service.mjs +243 -0
  14. package/esm2022/lib/apis/api-e-tools-auto-billing.service.mjs +75 -0
  15. package/esm2022/lib/apis/api-events.service.mjs +53 -0
  16. package/esm2022/lib/apis/api-external-pickups.service.mjs +74 -0
  17. package/esm2022/lib/apis/api-inventories.service.mjs +208 -0
  18. package/esm2022/lib/apis/api-invoices.service.mjs +398 -0
  19. package/esm2022/lib/apis/api-notifications.service.mjs +104 -0
  20. package/esm2022/lib/apis/api-open-items.service.mjs +62 -0
  21. package/esm2022/lib/apis/api-reports.service.mjs +172 -0
  22. package/esm2022/lib/apis/api-security.service.mjs +245 -0
  23. package/esm2022/lib/apis/api-services.service.mjs +93 -0
  24. package/esm2022/lib/apis/api-shipments.service.mjs +116 -0
  25. package/esm2022/lib/apis/api-supplies.service.mjs +133 -0
  26. package/esm2022/lib/apis/models/api-billing-do.interfaces.mjs +2 -0
  27. package/esm2022/lib/apis/models/api-billing-do.types.mjs +2 -0
  28. package/esm2022/lib/apis/models/api-billing-mx.interfaces.mjs +2 -0
  29. package/esm2022/lib/apis/models/api-billing-mx.types.mjs +2 -0
  30. package/esm2022/lib/apis/models/api-billing-pa.interfaces.mjs +2 -0
  31. package/esm2022/lib/apis/models/api-billing-pa.types.mjs +2 -0
  32. package/esm2022/lib/apis/models/api-billing-sv.interfaces.mjs +2 -0
  33. package/esm2022/lib/apis/models/api-billing-sv.types.mjs +2 -0
  34. package/esm2022/lib/apis/models/api-billing.models.mjs +2 -0
  35. package/esm2022/lib/apis/models/api-cash-operations.interfaces.mjs +2 -0
  36. package/esm2022/lib/apis/models/api-cash-operations.types.mjs +2 -0
  37. package/esm2022/lib/apis/models/api-catalog.enum.mjs +9 -0
  38. package/esm2022/lib/apis/models/api-catalog.interfaces.mjs +2 -0
  39. package/esm2022/lib/apis/models/api-catalog.types.mjs +2 -0
  40. package/esm2022/lib/apis/models/api-companies.interfaces.mjs +2 -0
  41. package/esm2022/lib/apis/models/api-companies.types.mjs +2 -0
  42. package/esm2022/lib/apis/models/api-composition.interfaces.mjs +2 -0
  43. package/esm2022/lib/apis/models/api-composition.types.mjs +2 -0
  44. package/esm2022/lib/apis/models/api-customs.interfaces.mjs +2 -0
  45. package/esm2022/lib/apis/models/api-customs.types.mjs +2 -0
  46. package/esm2022/lib/apis/models/api-discounts.interfaces.mjs +2 -0
  47. package/esm2022/lib/apis/models/api-discounts.types.mjs +2 -0
  48. package/esm2022/lib/apis/models/api-e-tools-auto-billing.interfaces.mjs +2 -0
  49. package/esm2022/lib/apis/models/api-e-tools-auto-billing.types.mjs +2 -0
  50. package/esm2022/lib/apis/models/api-events.enum.mjs +7 -0
  51. package/esm2022/lib/apis/models/api-events.interfaces.mjs +2 -0
  52. package/esm2022/lib/apis/models/api-events.types.mjs +2 -0
  53. package/esm2022/lib/apis/models/api-external-pickups.types.mjs +2 -0
  54. package/esm2022/lib/apis/models/api-inventories.enum.mjs +22 -0
  55. package/esm2022/lib/apis/models/api-inventories.interfaces.mjs +2 -0
  56. package/esm2022/lib/apis/models/api-inventories.types.mjs +2 -0
  57. package/esm2022/lib/apis/models/api-invoices.interfaces.mjs +2 -0
  58. package/esm2022/lib/apis/models/api-invoices.types.mjs +2 -0
  59. package/esm2022/lib/apis/models/api-notifications.interfaces.mjs +2 -0
  60. package/esm2022/lib/apis/models/api-notifications.types.mjs +2 -0
  61. package/esm2022/lib/apis/models/api-open-items.interfaces.mjs +2 -0
  62. package/esm2022/lib/apis/models/api-open-items.types.mjs +2 -0
  63. package/esm2022/lib/apis/models/api-reports.interfaces.mjs +2 -0
  64. package/esm2022/lib/apis/models/api-reports.types.mjs +2 -0
  65. package/esm2022/lib/apis/models/api-security.interfaces.mjs +2 -0
  66. package/esm2022/lib/apis/models/api-security.types.mjs +2 -0
  67. package/esm2022/lib/apis/models/api-services.interfaces.mjs +2 -0
  68. package/esm2022/lib/apis/models/api-services.types.mjs +2 -0
  69. package/esm2022/lib/apis/models/api-shipments.enums.mjs +8 -0
  70. package/esm2022/lib/apis/models/api-shipments.interfaces.mjs +2 -0
  71. package/esm2022/lib/apis/models/api-shipments.types.mjs +2 -0
  72. package/esm2022/lib/apis/models/api-supplies.interfaces.mjs +2 -0
  73. package/esm2022/lib/apis/models/api-supplies.types.mjs +2 -0
  74. package/esm2022/lib/apis/models/api.models.mjs +2 -0
  75. package/esm2022/lib/cypher/crypto.service.mjs +93 -0
  76. package/esm2022/lib/helpers/files.mjs +9 -0
  77. package/esm2022/lib/helpers/http.mjs +66 -0
  78. package/esm2022/lib/interceptors/api-headers.interceptor.mjs +24 -0
  79. package/esm2022/lib/interceptors/api-token.interceptor.mjs +28 -0
  80. package/esm2022/lib/interceptors/http-caching.interceptor.mjs +37 -0
  81. package/esm2022/lib/ngx-services.models.mjs +11 -0
  82. package/esm2022/lib/ngx-services.module.mjs +33 -0
  83. package/esm2022/lib/websockets/web-sockets.service.mjs +115 -0
  84. package/esm2022/public-api.mjs +90 -0
  85. package/fesm2022/experteam-mx-ngx-services.mjs +126 -5
  86. package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
  87. package/index.d.ts +287 -4
  88. package/lib/apis/api-billing-do.service.d.ts +24 -0
  89. package/lib/apis/api-billing-gt.service.d.ts +38 -0
  90. package/lib/apis/api-billing-mx.service.d.ts +39 -0
  91. package/lib/apis/api-billing-pa.service.d.ts +68 -0
  92. package/lib/apis/api-billing-sv.service.d.ts +55 -0
  93. package/lib/apis/api-cash-operations.service.d.ts +62 -0
  94. package/lib/apis/api-catalogs.service.d.ts +458 -0
  95. package/lib/apis/api-companies.service.d.ts +714 -0
  96. package/lib/apis/api-composition.service.d.ts +35 -0
  97. package/lib/apis/api-customs.service.d.ts +110 -0
  98. package/lib/apis/api-discounts.service.d.ts +167 -0
  99. package/lib/apis/api-e-tools-auto-billing.service.d.ts +49 -0
  100. package/lib/apis/api-events.service.d.ts +33 -0
  101. package/lib/apis/api-external-pickups.service.d.ts +46 -0
  102. package/lib/apis/api-inventories.service.d.ts +145 -0
  103. package/lib/apis/api-invoices.service.d.ts +280 -0
  104. package/lib/apis/api-notifications.service.d.ts +70 -0
  105. package/lib/apis/api-open-items.service.d.ts +41 -0
  106. package/lib/apis/api-reports.service.d.ts +120 -0
  107. package/lib/apis/api-security.service.d.ts +162 -0
  108. package/lib/apis/api-services.service.d.ts +61 -0
  109. package/lib/apis/api-shipments.service.d.ts +77 -0
  110. package/lib/apis/api-supplies.service.d.ts +93 -0
  111. package/lib/apis/models/api-billing-do.interfaces.d.ts +6 -0
  112. package/lib/apis/models/api-billing-do.types.d.ts +5 -0
  113. package/lib/apis/models/api-billing-mx.interfaces.d.ts +21 -0
  114. package/lib/apis/models/api-billing-mx.types.d.ts +13 -0
  115. package/lib/apis/models/api-billing-pa.interfaces.d.ts +26 -0
  116. package/lib/apis/models/api-billing-pa.types.d.ts +16 -0
  117. package/lib/apis/models/api-billing-sv.interfaces.d.ts +22 -0
  118. package/lib/apis/models/api-billing-sv.types.d.ts +21 -0
  119. package/lib/apis/models/api-billing.models.d.ts +27 -0
  120. package/lib/apis/models/api-cash-operations.interfaces.d.ts +40 -0
  121. package/lib/apis/models/api-cash-operations.types.d.ts +30 -0
  122. package/lib/apis/models/api-catalog.enum.d.ts +7 -0
  123. package/lib/apis/models/api-catalog.interfaces.d.ts +219 -0
  124. package/lib/apis/models/api-catalog.types.d.ts +217 -0
  125. package/lib/apis/models/api-companies.interfaces.d.ts +341 -0
  126. package/lib/apis/models/api-companies.types.d.ts +457 -0
  127. package/lib/apis/models/api-composition.interfaces.d.ts +272 -0
  128. package/lib/apis/models/api-composition.types.d.ts +9 -0
  129. package/lib/apis/models/api-customs.interfaces.d.ts +125 -0
  130. package/lib/apis/models/api-customs.types.d.ts +90 -0
  131. package/lib/apis/models/api-discounts.interfaces.d.ts +78 -0
  132. package/lib/apis/models/api-discounts.types.d.ts +89 -0
  133. package/lib/apis/models/api-e-tools-auto-billing.interfaces.d.ts +45 -0
  134. package/lib/apis/models/api-e-tools-auto-billing.types.d.ts +30 -0
  135. package/lib/apis/models/api-events.enum.d.ts +5 -0
  136. package/lib/apis/models/api-events.interfaces.d.ts +21 -0
  137. package/lib/apis/models/api-events.types.d.ts +14 -0
  138. package/lib/apis/models/api-external-pickups.types.d.ts +31 -0
  139. package/lib/apis/models/api-inventories.enum.d.ts +18 -0
  140. package/lib/apis/models/api-inventories.interfaces.d.ts +40 -0
  141. package/lib/apis/models/api-inventories.types.d.ts +62 -0
  142. package/lib/apis/models/api-invoices.interfaces.d.ts +267 -0
  143. package/lib/apis/models/api-invoices.types.d.ts +195 -0
  144. package/lib/apis/models/api-notifications.interfaces.d.ts +36 -0
  145. package/lib/apis/models/api-notifications.types.d.ts +34 -0
  146. package/lib/apis/models/api-open-items.interfaces.d.ts +32 -0
  147. package/lib/apis/models/api-open-items.types.d.ts +58 -0
  148. package/lib/apis/models/api-reports.interfaces.d.ts +342 -0
  149. package/lib/apis/models/api-reports.types.d.ts +59 -0
  150. package/lib/apis/models/api-security.interfaces.d.ts +68 -0
  151. package/lib/apis/models/api-security.types.d.ts +72 -0
  152. package/lib/apis/models/api-services.interfaces.d.ts +43 -0
  153. package/lib/apis/models/api-services.types.d.ts +57 -0
  154. package/lib/apis/models/api-shipments.enums.d.ts +6 -0
  155. package/lib/apis/models/api-shipments.interfaces.d.ts +41 -0
  156. package/lib/apis/models/api-shipments.types.d.ts +121 -0
  157. package/lib/apis/models/api-supplies.interfaces.d.ts +40 -0
  158. package/lib/apis/models/api-supplies.types.d.ts +50 -0
  159. package/lib/apis/models/api.models.d.ts +36 -0
  160. package/lib/cypher/crypto.service.d.ts +15 -0
  161. package/lib/helpers/files.d.ts +2 -0
  162. package/lib/helpers/http.d.ts +38 -0
  163. package/lib/interceptors/api-headers.interceptor.d.ts +12 -0
  164. package/lib/interceptors/api-token.interceptor.d.ts +11 -0
  165. package/lib/interceptors/http-caching.interceptor.d.ts +12 -0
  166. package/lib/ngx-services.models.d.ts +62 -0
  167. package/lib/ngx-services.module.d.ts +16 -0
  168. package/lib/websockets/web-sockets.service.d.ts +49 -0
  169. package/package.json +1 -1
  170. package/public-api.d.ts +80 -0
@@ -0,0 +1,162 @@
1
+ import { QueryParams } from './models/api.models';
2
+ import { AuthLoginIn, AuthLoginOut, AuthMeOut, AuthUserLoginIn, ChangeLanguageIn, GetUserOut, GetUsersOut, ModulesOut, PutUsersIn, PutUsersOut, RoleIn, RoleOut, RolesOut, RoleTypesOut, SessionIn, SessionOut } from './models/api-security.types';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import { Environment } from '../ngx-services.models';
5
+ import { Observable } from 'rxjs';
6
+ import { CookieService } from 'ngx-cookie-service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class ApiSecurityService {
9
+ private environments;
10
+ private cookie;
11
+ private http;
12
+ constructor(environments: Environment, cookie: CookieService, http: HttpClient);
13
+ /**
14
+ * Retrieves the API security URL from the environments configuration.
15
+ *
16
+ * @return {string} The API security URL.
17
+ */
18
+ get url(): string;
19
+ /**
20
+ * Handles the login authentication request by sending the login data to the authentication endpoint.
21
+ *
22
+ * @param {AuthLoginIn} body The payload containing login credentials.
23
+ * @return {Observable<AuthLoginOut>} An observable emitting the authentication response data.
24
+ */
25
+ postAuthLogin(body: AuthLoginIn): Observable<AuthLoginOut>;
26
+ /**
27
+ * Handles the user login process by sending user credentials to the authentication endpoint.
28
+ *
29
+ * @param {AuthUserLoginIn} body - The request payload containing user login details such as username and password.
30
+ * @return {Observable<AuthLoginOut>} An observable that emits the authenticated user's login data upon successful login.
31
+ */
32
+ postAuthUserLogin(body: AuthUserLoginIn): Observable<AuthLoginOut>;
33
+ /**
34
+ * Logs out the current user by making a POST request to the logout endpoint.
35
+ *
36
+ * This method deletes all cookies after a successful logout.
37
+ *
38
+ * @return {Observable<{}>} An observable that emits the server's response to the logout request.
39
+ */
40
+ postAuthLogout(): Observable<{}>;
41
+ /**
42
+ * Creates a new session for a specified model.
43
+ *
44
+ * @param {Object} params - The parameters for creating the session.
45
+ * @param {string} params.modelType - The type of the model.
46
+ * @param {string} params.modelId - The ID of the model.
47
+ * @param {string} [params.token] - Optional authorization token.
48
+ *
49
+ * @return {Observable<SessionOut>} An observable containing the created session details.
50
+ */
51
+ postSession({ modelType, modelId, token, }: SessionIn): Observable<SessionOut>;
52
+ /**
53
+ * Fetches the authenticated user's information.
54
+ * Sends a GET request to the endpoint '/auth/me' to retrieve information
55
+ * about the currently authenticated user.
56
+ *
57
+ * @return {Observable<AuthMeOut>} An observable that emits the authenticated user's data.
58
+ */
59
+ getAuthMe(): Observable<AuthMeOut>;
60
+ /**
61
+ * Fetches the authenticated user's details from the server.
62
+ *
63
+ * @param token The JWT token used for authorization.
64
+ * @return An Observable that emits the user's details encapsulated in a MeOut object.
65
+ */
66
+ getOtherMe(token: string): Observable<AuthMeOut>;
67
+ /**
68
+ * Fetches a user by their unique ID.
69
+ *
70
+ * @param {number} id - The unique identifier of the user to be fetched.
71
+ * @return {Observable<GetUserOut>} An observable containing the user information.
72
+ */
73
+ getUser(id: number): Observable<GetUserOut>;
74
+ /**
75
+ * Fetches a list of users from the server based on the specified query parameters.
76
+ *
77
+ * @param {QueryParams} params - The query parameters to filter the list of users.
78
+ * @return {Observable<GetUsersOut>} An observable that emits the list of users retrieved from the server.
79
+ */
80
+ getUsers(params: QueryParams): Observable<GetUsersOut>;
81
+ /**
82
+ * Updates the information of a specified user on the server.
83
+ *
84
+ * @param {Object} params - The parameter object.
85
+ * @param {Object} params.user - The user object containing updated data.
86
+ * @param {string} params.user.id - The unique identifier of the user to be updated.
87
+ *
88
+ * @return {void} This method does not return a value.
89
+ */
90
+ putUsers({ user }: PutUsersIn): Observable<PutUsersOut>;
91
+ /**
92
+ * Changes the language for the authenticated user.
93
+ *
94
+ * @param {Object} params - The input parameters for changing the language.
95
+ * @param {string} params.languageId - The ID of the new language to be set.
96
+ * @return {Observable<ApiSuccess<AuthMeOut>>} An observable that emits the result of the language change request.
97
+ */
98
+ putChangeLanguage({ languageId }: ChangeLanguageIn): Observable<AuthMeOut>;
99
+ /**
100
+ * Retrieves a list of roles with their permissions.
101
+ *
102
+ * @param {QueryParams} params - The query parameters to filter the roles.
103
+ * @returns {Observable<RoleIn[]>} An observable that emits an array of role permissions.
104
+ */
105
+ getRoles(params: QueryParams): Observable<RolesOut>;
106
+ /**
107
+ * Retrieves roles by the specified ID.
108
+ *
109
+ * @param id - The ID of the role to retrieve.
110
+ * @returns An Observable that emits the role data.
111
+ */
112
+ getRole(id: number): Observable<RoleOut>;
113
+ /**
114
+ * Creates a new role with the specified permissions.
115
+ *
116
+ * @param {RoleIn} body - The permissions and details for the new role.
117
+ * @returns {Observable<RoleOut>} An observable containing the created role's permissions.
118
+ */
119
+ postRole(body: RoleIn): Observable<RoleOut>;
120
+ /**
121
+ * Updates the permissions of a specific role.
122
+ *
123
+ * @param id - The unique identifier of the role to update.
124
+ * @param body - The new permissions to assign to the role.
125
+ * @returns An Observable that emits the updated module permissions.
126
+ */
127
+ putRole(id: number, body: RoleIn): Observable<RoleOut>;
128
+ /**
129
+ * Deletes the permissions associated with a specific role.
130
+ *
131
+ * @param {number} id - The unique identifier of the role whose permissions are to be deleted.
132
+ * @returns {Observable<{}>} An observable that emits the result of the delete operation.
133
+ */
134
+ deleteRole(id: number): Observable<{}>;
135
+ /**
136
+ * Retrieves the role types from the API.
137
+ *
138
+ * @param {QueryParams} params - The query parameters to be sent with the request.
139
+ * @returns {Observable<RoleTypesOut>} An observable containing the role types output.
140
+ */
141
+ getRoleTypes(params: QueryParams): Observable<RoleTypesOut>;
142
+ /**
143
+ * Retrieves a list of modules and permissions
144
+ *
145
+ * @param queryParams - The query parameters to filter the modules.
146
+ * @returns Observable<ModulesOut[]> - An observable that emits an array of modules and permissions.
147
+ */
148
+ getModules(queryParams: QueryParams): Observable<ModulesOut>;
149
+ /**
150
+ * Retrieves a list of modules and permissions
151
+ *
152
+ * @param params.token - Custom token for authorization.
153
+ * @param params.queryParams - The query parameters to filter the modules.
154
+ * @returns Observable<ModulesOut[]> - An observable that emits an array of modules and permissions.
155
+ */
156
+ getModulesByToken(params: {
157
+ token: string;
158
+ queryParams: QueryParams;
159
+ }): Observable<ModulesOut>;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiSecurityService, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiSecurityService>;
162
+ }
@@ -0,0 +1,61 @@
1
+ import { Environment } from '../ngx-services.models';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Observable } from 'rxjs';
4
+ import { ValidateFacilityIn, ValidateFacilityOut, ServiceAreasOut, EmailErrorIn, PromotionIn, PromotionOut, ValidateNIPOut, ValidateNIPIn, ValidateIdentificationBROut, ValidateIdentificationBRIn, ServiceAreaIn } from './models/api-services.types';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ApiServicesService {
7
+ private environments;
8
+ private http;
9
+ constructor(environments: Environment, http: HttpClient);
10
+ /**
11
+ * Retrieves the URL for the services API from the environment settings.
12
+ * If the URL is not defined, an empty string is returned.
13
+ *
14
+ * @return {string} The API Services URL or an empty string if not defined.
15
+ */
16
+ get url(): string;
17
+ /**
18
+ * Retrieves service areas based on the provided query parameters.
19
+ *
20
+ * @param {ServiceAreaIn} body - The query parameters used to filter and retrieve service areas.
21
+ * @return {Observable<NotificationsOut>} An observable that emits the fetched service areas.
22
+ */
23
+ postServiceAreas(body: ServiceAreaIn): Observable<ServiceAreasOut>;
24
+ /**
25
+ * Validate facility values based on the provided parameter.
26
+ *
27
+ * @param {ValidateFacilityIn} body - The facility data to be sent in the request body
28
+ * @return {Observable<ValidateFacilityOut>} An observable emitting the response containing the facility validated output data.
29
+ */
30
+ postValidateFacility(body: ValidateFacilityIn): Observable<ValidateFacilityOut>;
31
+ /**
32
+ * Create an email resource.
33
+ *
34
+ * @param {EmailErrorIn} body - The email data to be sent in the request body
35
+ * @return {Observable<{}>} An observable emitting the response data.
36
+ */
37
+ postEmailError(body: EmailErrorIn): Observable<{}>;
38
+ /**
39
+ * Sends a promotion request to the server using the provided body.
40
+ *
41
+ * @param {PromotionIn} body - The promotion data to be sent in the request body.
42
+ * @return {Observable<PromotionOut>} An observable emitting the response containing the promotion output data.
43
+ */
44
+ postPromotion(body: PromotionIn): Observable<PromotionOut>;
45
+ /**
46
+ * Validate NIP account value based on the provided parameter.
47
+ *
48
+ * @param {ValidateNIPIn} body - The NIP account data to be sent in the request body
49
+ * @return {Observable<ValidateNIPOut>} An observable emitting the response containing the NIP account validated data.
50
+ */
51
+ postValidateNIP(body: ValidateNIPIn): Observable<ValidateNIPOut>;
52
+ /**
53
+ * Validate BR Identification value based on the provided parameter.
54
+ *
55
+ * @param {ValidateIdentificationBRIn} body - The BR Identification data to be sent in the request body
56
+ * @return {Observable<ValidateIdentificationBROut>} An observable emitting the response containing the BR Identification validated data.
57
+ */
58
+ postValidateIdentificationBR(body: ValidateIdentificationBRIn): Observable<ValidateIdentificationBROut>;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiServicesService, never>;
60
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiServicesService>;
61
+ }
@@ -0,0 +1,77 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Environment } from '../ngx-services.models';
4
+ import { EmbassyShipmentIn, EmbassyShipmentOut, EmbassyShipmentsOut, ExportTypesOut, ManifestMultipleIn, ManifestMultipleOut, ShipmentCancellationIn, ShipmentCancellationOut, ShipmentEmployeeCustomer, ValidateAccountIn, ValidateAccountOut } from './models/api-shipments.types';
5
+ import { QueryParams } from './models/api.models';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiShipmentsService {
8
+ private environments;
9
+ private http;
10
+ constructor(environments: Environment, http: HttpClient);
11
+ /**
12
+ * Retrieves the URL for the shipments API from the environment configurations.
13
+ *
14
+ * @return {string} The URL of the shipments API.
15
+ */
16
+ get url(): string;
17
+ /**
18
+ * Retrieves the parameter values based on the provided parameter names.
19
+ *
20
+ * @param {ValidateAccountIn} body - An object of parameter names for which the values need to be fetched.
21
+ * @return {Observable<ValidateAccountIn>} An observable that emits the fetched parameter values
22
+ * @param body
23
+ */
24
+ postValidateAccount(body: ValidateAccountIn): Observable<ValidateAccountOut>;
25
+ /**
26
+ * Sends a POST request to the shipments manifest endpoint with the provided body.
27
+ *
28
+ * @param body - The request payload of type `ManifestMultipleIn`.
29
+ * @returns An observable that emits the response data of type `ManifestMultipleOut`.
30
+ */
31
+ postManifestMultiple(body: ManifestMultipleIn): Observable<ManifestMultipleOut>;
32
+ /**
33
+ * Validates and obtains the number of shipments allowed by an employee customer
34
+ *
35
+ * @return {Observable<ShipmentEmployeeCustomer>} An observable containing the shipments allowed by an employee
36
+ * @param id
37
+ */
38
+ getEmployeeCustomer(id: number): Observable<ShipmentEmployeeCustomer>;
39
+ /**
40
+ * Cancels a specific shipment by providing its ID and a reason for cancellation.
41
+ * Sends a PATCH request to update the shipment's cancellation status with the specified reason.
42
+ *
43
+ * @param {Object} param0 - The input object containing shipment cancellation details.
44
+ * @param {string} param0.shipmentId - The unique identifier of the shipment to be canceled.
45
+ * @param {string} param0.reasonId - The unique identifier of the reason for cancellation.
46
+ * @return {Observable<ShipmentCancellationOut>} An observable emitting the result of the cancellation operation.
47
+ */
48
+ patchShipmentsCancellation({ shipmentId, reasonId }: ShipmentCancellationIn): Observable<ShipmentCancellationOut>;
49
+ /**
50
+ * Fetches a list of export types based on the provided query parameters.
51
+ *
52
+ * @param {QueryParams} params - The query parameters to filter the export types.
53
+ * @return {Observable<ExportTypesOut>} An observable containing the list of export types.
54
+ */
55
+ getExportTypes(params: QueryParams): Observable<ExportTypesOut>;
56
+ /**
57
+ * Retrieves a paginated list of embassy shipments
58
+ * @param {QueryParams} params - Query parameters for filtering and pagination
59
+ * @returns {Observable<EmbassyShipmentsOut>} Observable containing the list of shipments and pagination metadata
60
+ */
61
+ getEmbassyShipments(params: QueryParams): Observable<EmbassyShipmentsOut>;
62
+ /**
63
+ * Creates a new embassy shipment
64
+ * @param {EmbassyShipmentIn} body - The shipment data to create
65
+ * @returns {Observable<EmbassyShipmentOut>} Observable containing the created shipment with its assigned ID
66
+ */
67
+ postEmbassyShipments(body: EmbassyShipmentIn): Observable<EmbassyShipmentOut>;
68
+ /**
69
+ * Updates an existing embassy shipment
70
+ * @param {number} id - The unique identifier of the shipment to update
71
+ * @param {EmbassyShipmentIn} body - The updated shipment data
72
+ * @returns {Observable<EmbassyShipmentOut>} Observable containing the updated shipment
73
+ */
74
+ putEmbassyShipments(id: number, body: EmbassyShipmentIn): Observable<EmbassyShipmentOut>;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiShipmentsService, never>;
76
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiShipmentsService>;
77
+ }
@@ -0,0 +1,93 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Environment } from '../ngx-services.models';
3
+ import { Observable } from 'rxjs';
4
+ import { QueryParams } from './models/api.models';
5
+ import { SuppliesOut, SupplyIn, SupplyLocationIn, SupplyLocationOut, SupplyLocationsOut, SupplyLocationTransactionIn, SupplyLocationTransactionOut, SupplyOut, SupplyTransactionTypesOut, SupplyTypesOut } from './models/api-supplies.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ApiSuppliesService {
8
+ private environments;
9
+ private http;
10
+ constructor(environments: Environment, http: HttpClient);
11
+ /**
12
+ * Retrieves the URL for the API supplies endpoint.
13
+ *
14
+ * @return {string} The API supplies URL or an empty string if not defined.
15
+ */
16
+ get url(): string;
17
+ /**
18
+ * Fetches a list of supplies based on the provided query parameters.
19
+ *
20
+ * @param {QueryParams} params - The query parameters to filter the supplies.
21
+ * @return {Observable<SuppliesOut>} An observable containing the list of supplies.
22
+ */
23
+ getSupplies(params: QueryParams): Observable<SuppliesOut>;
24
+ /**
25
+ * Retrieves the supply details for a given supply ID.
26
+ *
27
+ * @param {number} id - The unique identifier of the supply to retrieve.
28
+ * @return {Observable<SupplyOut>} An observable containing the supply details.
29
+ */
30
+ getSupply(id: number): Observable<SupplyOut>;
31
+ /**
32
+ * Sends a supply object to the server and returns the created or updated supply information.
33
+ *
34
+ * @param {SupplyIn} body - The supply information to be sent to the server.
35
+ * @return {Observable<SupplyOut>} An observable containing the response with the supply data.
36
+ */
37
+ postSupply(body: SupplyIn): Observable<SupplyOut>;
38
+ /**
39
+ * Updates an existing supply with the provided data.
40
+ *
41
+ * @param {number} id - The unique identifier of the supply to update.
42
+ * @param {SupplyIn} body - The data to update the supply with.
43
+ * @return {Observable<SupplyOut>} An observable containing the updated supply information.
44
+ */
45
+ putSupply(id: number, body: SupplyIn): Observable<SupplyOut>;
46
+ /**
47
+ * Fetches the supply types based on the provided query parameters.
48
+ *
49
+ * @param {QueryParams} params - The query parameters to filter the supply types.
50
+ * @return {Observable<SupplyTypesOut>} An Observable that emits the supply types data.
51
+ */
52
+ getSupplyTypes(params: QueryParams): Observable<SupplyTypesOut>;
53
+ /**
54
+ * Creates a new supply location.
55
+ *
56
+ * @param {SupplyLocationIn} body - The supply location data to create.
57
+ * @return {Observable<SupplyLocationOut>} An Observable that emits the created supply location data.
58
+ */
59
+ postSupplyLocations(body: SupplyLocationIn): Observable<SupplyLocationOut>;
60
+ /**
61
+ * Fetches the supply locations based on the provided query parameters.
62
+ *
63
+ * @param {QueryParams} params - The query parameters to filter the supply locations.
64
+ * @return {Observable<SupplyLocationsOut>} An Observable that emits the supply locations data.
65
+ */
66
+ getSupplyLocations(params: QueryParams): Observable<SupplyLocationsOut>;
67
+ /**
68
+ * Creates a new supply location transaction.
69
+ *
70
+ * @param {SupplyLocationTransactionIn} body - The transaction data to create.
71
+ * @return {Observable<SupplyLocationTransactionOut>} An Observable that emits the created transaction data.
72
+ */
73
+ postSupplyLocationTransaction(body: SupplyLocationTransactionIn): Observable<SupplyLocationTransactionOut>;
74
+ /**
75
+ * Fetches the supply transaction types based on the provided query parameters.
76
+ *
77
+ * @param {QueryParams} params - The query parameters to filter the transaction types.
78
+ * @return {Observable<SupplyTransactionTypesOut>} An Observable that emits the supply transaction types data.
79
+ */
80
+ getSupplyTransactionTypes(params: QueryParams): Observable<SupplyTransactionTypesOut>;
81
+ /**
82
+ * Exports the supply locations to an Excel file.
83
+ *
84
+ * @param {QueryParams} params - The query parameters to filter the data before export.
85
+ * @return {Observable<{ mime_type: string; base64: string }>} An Observable that emits the exported file's MIME type and Base64 content.
86
+ */
87
+ getSupplyLocationsExportToExcel(params: QueryParams): Observable<{
88
+ mime_type: string;
89
+ base64: string;
90
+ }>;
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApiSuppliesService, never>;
92
+ static ɵprov: i0.ɵɵInjectableDeclaration<ApiSuppliesService>;
93
+ }
@@ -0,0 +1,6 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface IncomeType extends LaravelModel {
3
+ code: string;
4
+ name: string;
5
+ billing_code: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { IncomeType } from './api-billing-do.interfaces';
2
+ export type IncomeTypesOut = {
3
+ income_types: IncomeType[];
4
+ total: number;
5
+ };
@@ -0,0 +1,21 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface CFDI extends LaravelModel {
3
+ code: string;
4
+ description: string;
5
+ fiscal_regimen_receptor: string;
6
+ moral_person: string;
7
+ physical_person: string;
8
+ }
9
+ export interface FiscalRegimen extends LaravelModel {
10
+ code: string;
11
+ description: string;
12
+ moral_person: string;
13
+ physical_person: string;
14
+ }
15
+ export interface PostalCodeBillings extends LaravelModel {
16
+ city: string;
17
+ municipality: string;
18
+ state: string;
19
+ suburb: string;
20
+ postal_code_number: string;
21
+ }
@@ -0,0 +1,13 @@
1
+ import { CFDI, FiscalRegimen, PostalCodeBillings } from './api-billing-mx.interfaces';
2
+ export type FiscalRegimensAcceptedOut = {
3
+ total: number;
4
+ cfdi_use: CFDI[];
5
+ };
6
+ export type FiscalRegimensOut = {
7
+ total: number;
8
+ fiscal_regimen: FiscalRegimen[];
9
+ };
10
+ export type PostalCodesOut = {
11
+ postal_code: PostalCodeBillings[];
12
+ total: number;
13
+ };
@@ -0,0 +1,26 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface BillingPaCustomer {
3
+ document_id: number;
4
+ name: string;
5
+ number: string;
6
+ type_ruc: number;
7
+ type_ruc_code: string;
8
+ verification_code: string;
9
+ type_rec: string;
10
+ identification_type_id: number;
11
+ }
12
+ export interface District extends LaravelModel {
13
+ code: string;
14
+ name: string;
15
+ province_id: number;
16
+ }
17
+ export interface Parish extends LaravelModel {
18
+ code: string;
19
+ name: string;
20
+ district_id: number;
21
+ province_id: number;
22
+ }
23
+ export interface Province extends LaravelModel {
24
+ code: string;
25
+ name: string;
26
+ }
@@ -0,0 +1,16 @@
1
+ import { BillingPaCustomer, District, Parish, Province } from './api-billing-pa.interfaces';
2
+ export type DistrictsOut = {
3
+ total: number;
4
+ districts: District[];
5
+ };
6
+ export type BillingPaCustomerOut = {
7
+ customer: BillingPaCustomer;
8
+ };
9
+ export type ParishesOut = {
10
+ total: number;
11
+ parishes: Parish[];
12
+ };
13
+ export type ProvincesOut = {
14
+ total: number;
15
+ provinces: Province[];
16
+ };
@@ -0,0 +1,22 @@
1
+ import { LaravelModel } from './api.models';
2
+ export interface PersonType extends LaravelModel {
3
+ code: string;
4
+ name: string;
5
+ }
6
+ export interface EconomicActivity extends LaravelModel {
7
+ code: string;
8
+ name: string;
9
+ }
10
+ export interface EstablishmentType extends LaravelModel {
11
+ code: string;
12
+ name: string;
13
+ }
14
+ export interface Department extends LaravelModel {
15
+ code: string;
16
+ name: string;
17
+ }
18
+ export interface Municipality extends LaravelModel {
19
+ code: string;
20
+ name: string;
21
+ department_code: string;
22
+ }
@@ -0,0 +1,21 @@
1
+ import { Department, EconomicActivity, EstablishmentType, Municipality, PersonType } from './api-billing-sv.interfaces';
2
+ export type EconomicActivitiesOut = {
3
+ economic_activities: EconomicActivity[];
4
+ total: number;
5
+ };
6
+ export type PersonTypesOut = {
7
+ person_types: PersonType[];
8
+ total: number;
9
+ };
10
+ export type EstablishmentTypesOut = {
11
+ establishment_types: EstablishmentType[];
12
+ total: number;
13
+ };
14
+ export type DepartmentsOut = {
15
+ departments: Department[];
16
+ total: number;
17
+ };
18
+ export type MunicipalitiesOut = {
19
+ municipalities: Municipality[];
20
+ total: number;
21
+ };
@@ -0,0 +1,27 @@
1
+ import { Observable } from 'rxjs';
2
+ import { QueryParams } from './api.models';
3
+ import { DistrictsOut, ParishesOut, ProvincesOut } from './api-billing-pa.types';
4
+ export interface ApiBillingConfigurable {
5
+ getConfigs(): Observable<BillingConfigsOut>;
6
+ getConfig(id: number): Observable<BillingConfigOut>;
7
+ postConfigs(body: BillingConfigIn): Observable<BillingConfigOut>;
8
+ getDistricts?(params: QueryParams): Observable<DistrictsOut>;
9
+ getParishes?(params: QueryParams): Observable<ParishesOut>;
10
+ getProvinces?(params: QueryParams): Observable<ProvincesOut>;
11
+ }
12
+ export type BillingConfig = {
13
+ label: string;
14
+ field: string;
15
+ is_required: boolean;
16
+ type?: string;
17
+ };
18
+ export type BillingConfigsOut = {
19
+ configurations: BillingConfig[];
20
+ total: number;
21
+ };
22
+ export type BillingConfigIn = {
23
+ [key: string]: string | number;
24
+ };
25
+ export type BillingConfigOut = {
26
+ [key: string]: [key: string | number][];
27
+ };
@@ -0,0 +1,40 @@
1
+ import { ActiveLessSymfonyModel, SymfonyModel } from './api.models';
2
+ export interface InstallationCountryReferenceCurrency extends ActiveLessSymfonyModel {
3
+ installationId?: number;
4
+ countryReferenceCurrencyId: number;
5
+ minCashValue?: number;
6
+ maxCashValue?: number;
7
+ }
8
+ export interface CashValueSummary {
9
+ countryReferenceCurrencyId: number;
10
+ currencyCode: string;
11
+ balanceInitial: number;
12
+ transfers: number;
13
+ payments: number;
14
+ totalBalance: number;
15
+ minCashValue: number;
16
+ maxAmount: number;
17
+ }
18
+ export interface OpeningTransference extends ActiveLessSymfonyModel {
19
+ openingId: number;
20
+ openingReferenceId: number;
21
+ transferenceTypeId: number;
22
+ userId: number;
23
+ amount: number;
24
+ countryReferenceCurrencyId: number;
25
+ transferenceCode: string;
26
+ receiptNumber: string;
27
+ userName: string | null;
28
+ userUsername: string | null;
29
+ currencyCode: string | null;
30
+ maxCashExceeded: boolean;
31
+ transferenceType: TransferenceType;
32
+ }
33
+ export interface ReceiptFile {
34
+ format: string;
35
+ base64: string;
36
+ }
37
+ export interface TransferenceType extends SymfonyModel {
38
+ code: string;
39
+ name: string;
40
+ }
@@ -0,0 +1,30 @@
1
+ import { CashValueSummary, InstallationCountryReferenceCurrency, OpeningTransference, ReceiptFile } from './api-cash-operations.interfaces';
2
+ export type InstallationCountryReferenceCurrenciesOut = {
3
+ total: number;
4
+ installationCountryReferenceCurrencies: InstallationCountryReferenceCurrency[];
5
+ };
6
+ export type InstallationCountryReferenceCurrencyIn = {
7
+ installationId?: number;
8
+ countryReferenceCurrencyId: number;
9
+ minCashValue?: number;
10
+ maxCashValue?: number;
11
+ };
12
+ export type InstallationCountryReferenceCurrencyOut = {
13
+ installationCountryReferenceCurrencies: InstallationCountryReferenceCurrency;
14
+ };
15
+ export type CashValueSummaryOut = {
16
+ total: number;
17
+ cashValueSummary: CashValueSummary[];
18
+ };
19
+ export type OpeningTransferenceIn = {
20
+ openingId: number;
21
+ amount: number;
22
+ countryReferenceCurrencyId: number;
23
+ transferenceTypeCode: string;
24
+ };
25
+ export type OpeningTransferenceOut = {
26
+ openingTransference: OpeningTransference;
27
+ };
28
+ export type ReceiptFileOut = {
29
+ receipt: ReceiptFile;
30
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum ViewSectionOption {
2
+ SHIPMENT = "shipment",
3
+ PICKUP = "pickup",
4
+ EMPLOYEE_DHL = "employee_dhl",
5
+ BILLING = "billing",
6
+ CUSTOMER_RESTRICTION = "customer_restriction"
7
+ }