@experteam-mx/ngx-services 18.7.11 → 18.7.12
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-services.service.mjs +93 -0
- package/esm2022/lib/apis/api-supplies.service.mjs +83 -0
- package/esm2022/lib/apis/models/api-companies.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-companies.types.mjs +1 -1
- package/esm2022/lib/apis/models/api-composition.interfaces.mjs +1 -1
- package/esm2022/lib/apis/models/api-services.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-services.types.mjs +2 -0
- package/esm2022/lib/apis/models/api-supplies.interfaces.mjs +2 -0
- package/esm2022/lib/apis/models/api-supplies.types.mjs +2 -0
- package/esm2022/lib/ngx-services.models.mjs +1 -1
- package/esm2022/public-api.mjs +7 -1
- package/fesm2022/experteam-mx-ngx-services.mjs +169 -1
- package/fesm2022/experteam-mx-ngx-services.mjs.map +1 -1
- package/lib/apis/api-services.service.d.ts +61 -0
- package/lib/apis/api-supplies.service.d.ts +55 -0
- package/lib/apis/models/api-companies.interfaces.d.ts +0 -19
- package/lib/apis/models/api-companies.types.d.ts +3 -2
- package/lib/apis/models/api-composition.interfaces.d.ts +1 -18
- package/lib/apis/models/api-services.interfaces.d.ts +43 -0
- package/lib/apis/models/api-services.types.d.ts +57 -0
- package/lib/apis/models/api-supplies.interfaces.d.ts +20 -0
- package/lib/apis/models/api-supplies.types.d.ts +26 -0
- package/lib/ngx-services.models.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
|
@@ -3156,6 +3156,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3156
3156
|
args: ['env']
|
|
3157
3157
|
}] }, { type: i1$1.CookieService }, { type: i1.HttpClient }] });
|
|
3158
3158
|
|
|
3159
|
+
class ApiServicesService {
|
|
3160
|
+
environments;
|
|
3161
|
+
http;
|
|
3162
|
+
constructor(environments, http) {
|
|
3163
|
+
this.environments = environments;
|
|
3164
|
+
this.http = http;
|
|
3165
|
+
}
|
|
3166
|
+
/**
|
|
3167
|
+
* Retrieves the URL for the services API from the environment settings.
|
|
3168
|
+
* If the URL is not defined, an empty string is returned.
|
|
3169
|
+
*
|
|
3170
|
+
* @return {string} The API Services URL or an empty string if not defined.
|
|
3171
|
+
*/
|
|
3172
|
+
get url() {
|
|
3173
|
+
return this.environments.apiServicesUrl ?? '';
|
|
3174
|
+
}
|
|
3175
|
+
/**
|
|
3176
|
+
* Retrieves service areas based on the provided query parameters.
|
|
3177
|
+
*
|
|
3178
|
+
* @param {ServiceAreaIn} body - The query parameters used to filter and retrieve service areas.
|
|
3179
|
+
* @return {Observable<NotificationsOut>} An observable that emits the fetched service areas.
|
|
3180
|
+
*/
|
|
3181
|
+
postServiceAreas(body) {
|
|
3182
|
+
return this.http.post(`${this.url}/service-areas`, body)
|
|
3183
|
+
.pipe(map(({ data }) => data));
|
|
3184
|
+
}
|
|
3185
|
+
/**
|
|
3186
|
+
* Validate facility values based on the provided parameter.
|
|
3187
|
+
*
|
|
3188
|
+
* @param {ValidateFacilityIn} body - The facility data to be sent in the request body
|
|
3189
|
+
* @return {Observable<ValidateFacilityOut>} An observable emitting the response containing the facility validated output data.
|
|
3190
|
+
*/
|
|
3191
|
+
postValidateFacility(body) {
|
|
3192
|
+
return this.http.post(`${this.url}/facilities`, body)
|
|
3193
|
+
.pipe(map(({ data }) => data));
|
|
3194
|
+
}
|
|
3195
|
+
/**
|
|
3196
|
+
* Create an email resource.
|
|
3197
|
+
*
|
|
3198
|
+
* @param {EmailErrorIn} body - The email data to be sent in the request body
|
|
3199
|
+
* @return {Observable<{}>} An observable emitting the response data.
|
|
3200
|
+
*/
|
|
3201
|
+
postEmailError(body) {
|
|
3202
|
+
return this.http.post(`${this.url}/emails/error`, body)
|
|
3203
|
+
.pipe(map(({ data }) => data));
|
|
3204
|
+
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Sends a promotion request to the server using the provided body.
|
|
3207
|
+
*
|
|
3208
|
+
* @param {PromotionIn} body - The promotion data to be sent in the request body.
|
|
3209
|
+
* @return {Observable<PromotionOut>} An observable emitting the response containing the promotion output data.
|
|
3210
|
+
*/
|
|
3211
|
+
postPromotion(body) {
|
|
3212
|
+
return this.http.post(`${this.url}/promotions`, body)
|
|
3213
|
+
.pipe(map(({ data }) => data));
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* Validate NIP account value based on the provided parameter.
|
|
3217
|
+
*
|
|
3218
|
+
* @param {ValidateNIPIn} body - The NIP account data to be sent in the request body
|
|
3219
|
+
* @return {Observable<ValidateNIPOut>} An observable emitting the response containing the NIP account validated data.
|
|
3220
|
+
*/
|
|
3221
|
+
postValidateNIP(body) {
|
|
3222
|
+
return this.http.post(`${this.url}/accounts/nip`, body)
|
|
3223
|
+
.pipe(map(({ data }) => data));
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* Validate BR Identification value based on the provided parameter.
|
|
3227
|
+
*
|
|
3228
|
+
* @param {ValidateIdentificationBRIn} body - The BR Identification data to be sent in the request body
|
|
3229
|
+
* @return {Observable<ValidateIdentificationBROut>} An observable emitting the response containing the BR Identification validated data.
|
|
3230
|
+
*/
|
|
3231
|
+
postValidateIdentificationBR(body) {
|
|
3232
|
+
return this.http.post(`${this.url}/identifications/br-validation`, body)
|
|
3233
|
+
.pipe(map(({ data }) => data));
|
|
3234
|
+
}
|
|
3235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3236
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, providedIn: 'root' });
|
|
3237
|
+
}
|
|
3238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiServicesService, decorators: [{
|
|
3239
|
+
type: Injectable,
|
|
3240
|
+
args: [{
|
|
3241
|
+
providedIn: 'root'
|
|
3242
|
+
}]
|
|
3243
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3244
|
+
type: Inject,
|
|
3245
|
+
args: ['env']
|
|
3246
|
+
}] }, { type: i1.HttpClient }] });
|
|
3247
|
+
|
|
3159
3248
|
class ApiShipmentsService {
|
|
3160
3249
|
environments;
|
|
3161
3250
|
http;
|
|
@@ -3228,6 +3317,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3228
3317
|
args: ['env']
|
|
3229
3318
|
}] }, { type: i1.HttpClient }] });
|
|
3230
3319
|
|
|
3320
|
+
class ApiSuppliesService {
|
|
3321
|
+
environments;
|
|
3322
|
+
http;
|
|
3323
|
+
constructor(environments, http) {
|
|
3324
|
+
this.environments = environments;
|
|
3325
|
+
this.http = http;
|
|
3326
|
+
}
|
|
3327
|
+
/**
|
|
3328
|
+
* Retrieves the URL for the API supplies endpoint.
|
|
3329
|
+
*
|
|
3330
|
+
* @return {string} The API supplies URL or an empty string if not defined.
|
|
3331
|
+
*/
|
|
3332
|
+
get url() {
|
|
3333
|
+
return this.environments.apiSuppliesUrl ?? '';
|
|
3334
|
+
}
|
|
3335
|
+
/**
|
|
3336
|
+
* Fetches a list of supplies based on the provided query parameters.
|
|
3337
|
+
*
|
|
3338
|
+
* @param {QueryParams} params - The query parameters to filter the supplies.
|
|
3339
|
+
* @return {Observable<SuppliesOut>} An observable containing the list of supplies.
|
|
3340
|
+
*/
|
|
3341
|
+
getSupplies(params) {
|
|
3342
|
+
return this.http.get(`${this.url}/supplies`, { params })
|
|
3343
|
+
.pipe(map(({ data }) => data));
|
|
3344
|
+
}
|
|
3345
|
+
/**
|
|
3346
|
+
* Retrieves the supply details for a given supply ID.
|
|
3347
|
+
*
|
|
3348
|
+
* @param {number} id - The unique identifier of the supply to retrieve.
|
|
3349
|
+
* @return {Observable<SupplyOut>} An observable containing the supply details.
|
|
3350
|
+
*/
|
|
3351
|
+
getSupply(id) {
|
|
3352
|
+
return this.http.get(`${this.url}/supplies/${id}`)
|
|
3353
|
+
.pipe(map(({ data }) => data));
|
|
3354
|
+
}
|
|
3355
|
+
/**
|
|
3356
|
+
* Sends a supply object to the server and returns the created or updated supply information.
|
|
3357
|
+
*
|
|
3358
|
+
* @param {SupplyIn} body - The supply information to be sent to the server.
|
|
3359
|
+
* @return {Observable<SupplyOut>} An observable containing the response with the supply data.
|
|
3360
|
+
*/
|
|
3361
|
+
postSupply(body) {
|
|
3362
|
+
return this.http.post(`${this.url}/supplies`, body)
|
|
3363
|
+
.pipe(map(({ data }) => data));
|
|
3364
|
+
}
|
|
3365
|
+
/**
|
|
3366
|
+
* Updates an existing supply with the provided data.
|
|
3367
|
+
*
|
|
3368
|
+
* @param {number} id - The unique identifier of the supply to update.
|
|
3369
|
+
* @param {SupplyIn} body - The data to update the supply with.
|
|
3370
|
+
* @return {Observable<SupplyOut>} An observable containing the updated supply information.
|
|
3371
|
+
*/
|
|
3372
|
+
putSupply(id, body) {
|
|
3373
|
+
return this.http.put(`${this.url}/supplies/${id}`, body)
|
|
3374
|
+
.pipe(map(({ data }) => data));
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Fetches the supply types based on the provided query parameters.
|
|
3378
|
+
*
|
|
3379
|
+
* @param {QueryParams} params - The query parameters to filter the supply types.
|
|
3380
|
+
* @return {Observable<SupplyTypesOut>} An Observable that emits the supply types data.
|
|
3381
|
+
*/
|
|
3382
|
+
getSupplyTypes(params) {
|
|
3383
|
+
return this.http.get(`${this.url}/supply-types`, { params })
|
|
3384
|
+
.pipe(map(({ data }) => data));
|
|
3385
|
+
}
|
|
3386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, deps: [{ token: 'env' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3387
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, providedIn: 'root' });
|
|
3388
|
+
}
|
|
3389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ApiSuppliesService, decorators: [{
|
|
3390
|
+
type: Injectable,
|
|
3391
|
+
args: [{
|
|
3392
|
+
providedIn: 'root'
|
|
3393
|
+
}]
|
|
3394
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3395
|
+
type: Inject,
|
|
3396
|
+
args: ['env']
|
|
3397
|
+
}] }, { type: i1.HttpClient }] });
|
|
3398
|
+
|
|
3231
3399
|
var Event;
|
|
3232
3400
|
(function (Event) {
|
|
3233
3401
|
Event["damage"] = "damage";
|
|
@@ -3606,5 +3774,5 @@ const xmlHeaders = (format = 'object') => {
|
|
|
3606
3774
|
* Generated bundle index. Do not edit.
|
|
3607
3775
|
*/
|
|
3608
3776
|
|
|
3609
|
-
export { AlphaNumeric, ApiBillingDOService, ApiBillingMxService, ApiBillingPaService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiShipmentsService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
|
|
3777
|
+
export { AlphaNumeric, ApiBillingDOService, ApiBillingMxService, ApiBillingPaService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiExternalPickupsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, WebSocketsService, apiHeadersInterceptor, apiTokenInterceptor, httpCachingInterceptor, httpParams, pdfHeaders, queryString, xmlHeaders };
|
|
3610
3778
|
//# sourceMappingURL=experteam-mx-ngx-services.mjs.map
|