@experteam-mx/ngx-services 20.1.10 → 20.1.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.
|
@@ -1890,6 +1890,24 @@ class ApiCompaniesService {
|
|
|
1890
1890
|
return this.http.post(`${this.url}/workflow-configs/batch`, body)
|
|
1891
1891
|
.pipe(map(({ data }) => data));
|
|
1892
1892
|
}
|
|
1893
|
+
/**
|
|
1894
|
+
* Retrieves a list of companies based on the provided query parameters.
|
|
1895
|
+
* @param params - The query parameters to filter and paginate the companies list
|
|
1896
|
+
* @returns An Observable that emits the companies data
|
|
1897
|
+
*/
|
|
1898
|
+
getCompanies(params) {
|
|
1899
|
+
return this.http.get(`${this.url}/companies`, { params })
|
|
1900
|
+
.pipe(map(({ data }) => data));
|
|
1901
|
+
}
|
|
1902
|
+
/**
|
|
1903
|
+
* Retrieves a company by its ID.
|
|
1904
|
+
* @param id - The unique identifier of the company to retrieve.
|
|
1905
|
+
* @returns An Observable that emits the company data.
|
|
1906
|
+
*/
|
|
1907
|
+
getCompany(id) {
|
|
1908
|
+
return this.http.get(`${this.url}/companies/${id}`)
|
|
1909
|
+
.pipe(map(({ data }) => data));
|
|
1910
|
+
}
|
|
1893
1911
|
/**
|
|
1894
1912
|
* Sends a POST request to create a new company and returns the created company's details.
|
|
1895
1913
|
*
|
|
@@ -4378,6 +4396,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4378
4396
|
}]
|
|
4379
4397
|
}] });
|
|
4380
4398
|
|
|
4399
|
+
class ApiSurveysService {
|
|
4400
|
+
environments = inject(ENVIRONMENT_TOKEN);
|
|
4401
|
+
http = inject(HttpClient);
|
|
4402
|
+
/**
|
|
4403
|
+
* Base URL for surveys API endpoints.
|
|
4404
|
+
* @returns The configured surveys API URL or an empty string.
|
|
4405
|
+
*/
|
|
4406
|
+
get url() {
|
|
4407
|
+
return this.environments.apiSurveysUrl ?? '';
|
|
4408
|
+
}
|
|
4409
|
+
/**
|
|
4410
|
+
* Retrieves surveys list based on query parameters.
|
|
4411
|
+
* @param params Query parameters used to filter, paginate, or sort surveys.
|
|
4412
|
+
* @returns Observable stream with surveys response data.
|
|
4413
|
+
*/
|
|
4414
|
+
getSurveys(params) {
|
|
4415
|
+
return this.http.get(`${this.url}/surveys`, { params })
|
|
4416
|
+
.pipe(map(({ data }) => data));
|
|
4417
|
+
}
|
|
4418
|
+
/**
|
|
4419
|
+
* Creates a new survey.
|
|
4420
|
+
* @param body Survey payload to create.
|
|
4421
|
+
* @returns Observable stream with created survey data.
|
|
4422
|
+
*/
|
|
4423
|
+
postSurvey(body) {
|
|
4424
|
+
return this.http.post(`${this.url}/surveys`, body)
|
|
4425
|
+
.pipe(map(({ data }) => data));
|
|
4426
|
+
}
|
|
4427
|
+
/**
|
|
4428
|
+
* Replaces an existing survey by id.
|
|
4429
|
+
* @param id Survey identifier.
|
|
4430
|
+
* @param body Survey payload used to replace the resource.
|
|
4431
|
+
* @returns Observable stream with updated survey data.
|
|
4432
|
+
*/
|
|
4433
|
+
putSurvey(id, body) {
|
|
4434
|
+
return this.http.put(`${this.url}/surveys/${id}`, body)
|
|
4435
|
+
.pipe(map(({ data }) => data));
|
|
4436
|
+
}
|
|
4437
|
+
/**
|
|
4438
|
+
* Partially updates an existing survey by id.
|
|
4439
|
+
* @param id Survey identifier.
|
|
4440
|
+
* @param body Partial survey payload with fields to update.
|
|
4441
|
+
* @returns Observable stream with updated survey data.
|
|
4442
|
+
*/
|
|
4443
|
+
patchSurvey(id, body) {
|
|
4444
|
+
return this.http.patch(`${this.url}/surveys/${id}`, body)
|
|
4445
|
+
.pipe(map(({ data }) => data));
|
|
4446
|
+
}
|
|
4447
|
+
/**
|
|
4448
|
+
* Retrieves the questions for a survey.
|
|
4449
|
+
* @param id Survey identifier.
|
|
4450
|
+
* @param params Query parameters used to filter, paginate, or sort questions.
|
|
4451
|
+
* @returns Observable stream with survey questions response data.
|
|
4452
|
+
*/
|
|
4453
|
+
getSurveyQuestions(id, params) {
|
|
4454
|
+
return this.http.get(`${this.url}/surveys/${id}/questions`, { params })
|
|
4455
|
+
.pipe(map(({ data }) => data));
|
|
4456
|
+
}
|
|
4457
|
+
/**
|
|
4458
|
+
* Creates a new question for a survey.
|
|
4459
|
+
* @param surveyId Parent survey identifier.
|
|
4460
|
+
* @param body Survey question payload to create.
|
|
4461
|
+
* @returns Observable stream with created survey question data.
|
|
4462
|
+
*/
|
|
4463
|
+
postSurveyQuestion(surveyId, body) {
|
|
4464
|
+
return this.http.post(`${this.url}/surveys/${surveyId}/questions`, body)
|
|
4465
|
+
.pipe(map(({ data }) => data));
|
|
4466
|
+
}
|
|
4467
|
+
/**
|
|
4468
|
+
* Replaces an existing survey question by id.
|
|
4469
|
+
* @param questionId Survey question identifier.
|
|
4470
|
+
* @param body Survey question payload used to replace the resource.
|
|
4471
|
+
* @returns Observable stream with updated survey question data.
|
|
4472
|
+
*/
|
|
4473
|
+
putSurveyQuestion(questionId, body) {
|
|
4474
|
+
return this.http.put(`${this.url}/questions/${questionId}`, body)
|
|
4475
|
+
.pipe(map(({ data }) => data));
|
|
4476
|
+
}
|
|
4477
|
+
/**
|
|
4478
|
+
* Partially updates an existing survey question by id.
|
|
4479
|
+
* @param questionId Survey question identifier.
|
|
4480
|
+
* @param body Partial survey question payload with fields to update.
|
|
4481
|
+
* @returns Observable stream with updated survey question data.
|
|
4482
|
+
*/
|
|
4483
|
+
patchSurveyQuestion(questionId, body) {
|
|
4484
|
+
return this.http.patch(`${this.url}/questions/${questionId}`, body)
|
|
4485
|
+
.pipe(map(({ data }) => data));
|
|
4486
|
+
}
|
|
4487
|
+
/**
|
|
4488
|
+
* Retrieves the available question types.
|
|
4489
|
+
* @param params Query parameters used to filter, paginate, or sort question types.
|
|
4490
|
+
* @returns Observable stream with question types response data.
|
|
4491
|
+
*/
|
|
4492
|
+
getQuestionTypes(params) {
|
|
4493
|
+
return this.http.get(`${this.url}/question-types`, { params })
|
|
4494
|
+
.pipe(map(({ data }) => data));
|
|
4495
|
+
}
|
|
4496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSurveysService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4497
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSurveysService, providedIn: 'root' });
|
|
4498
|
+
}
|
|
4499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ApiSurveysService, decorators: [{
|
|
4500
|
+
type: Injectable,
|
|
4501
|
+
args: [{
|
|
4502
|
+
providedIn: 'root'
|
|
4503
|
+
}]
|
|
4504
|
+
}] });
|
|
4505
|
+
|
|
4381
4506
|
var ViewSectionOption;
|
|
4382
4507
|
(function (ViewSectionOption) {
|
|
4383
4508
|
ViewSectionOption["SHIPMENT"] = "shipment";
|
|
@@ -4831,5 +4956,5 @@ const xmlHeaders = (format = 'object') => {
|
|
|
4831
4956
|
* Generated bundle index. Do not edit.
|
|
4832
4957
|
*/
|
|
4833
4958
|
|
|
4834
|
-
export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
|
|
4959
|
+
export { AlphaNumeric, ApiBillingDOService, ApiBillingGtService, ApiBillingMxService, ApiBillingPaService, ApiBillingSvService, ApiCashOperationsService, ApiCatalogsService, ApiCompaniesService, ApiCompositionService, ApiCustomsService, ApiDiscountsService, ApiEToolsAutoBillingService, ApiEventsService, ApiExternalOperationsService, ApiInventoriesService, ApiInvoicesService, ApiNotificationsService, ApiOpenItemsService, ApiQuoteService, ApiReportsService, ApiSecurityService, ApiServicesService, ApiShipmentsService, ApiSuppliesService, ApiSurveysService, CryptoService, DefaultValueType, ENVIRONMENT_TOKEN, Event, NgxServicesModule, OperationModuleStatus, ViewSectionOption, WebSocketsService, apiHeadersInterceptor, apiKeyInterceptor, apiTokenInterceptor, base64PdfToUrl, downloadBase64Pdf, httpCachingInterceptor, httpParams, pdfHeaders, provideNgxServices, queryString, xmlHeaders };
|
|
4835
4960
|
//# sourceMappingURL=experteam-mx-ngx-services.mjs.map
|