@saritasa/crm-delmar-core-sdk 0.2.112 → 0.2.115
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/README.md +2 -2
- package/api/branches-api.service.d.ts +24 -1
- package/api/branches-api.serviceInterface.d.ts +16 -0
- package/fesm2022/saritasa-crm-delmar-core-sdk.mjs +57 -0
- package/fesm2022/saritasa-crm-delmar-core-sdk.mjs.map +1 -1
- package/model/branch-metrics.dto.d.ts +31 -0
- package/model/branch-user-metrics.dto.d.ts +36 -0
- package/model/models.d.ts +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { HttpClient, HttpResponse, HttpEvent, HttpContext } from "@angular/common/http";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { BranchDto } from "../model/branch.dto";
|
|
4
|
+
import { BranchMetricsDto } from "../model/branch-metrics.dto";
|
|
4
5
|
import { PaginatedBranchListDto } from "../model/paginated-branch-list.dto";
|
|
5
6
|
import { PaginatedBranchUserStatsListDto } from "../model/paginated-branch-user-stats-list.dto";
|
|
6
7
|
import { Configuration } from "../configuration";
|
|
7
8
|
import { BaseService } from "../api.base.service";
|
|
8
|
-
import { BranchesApiServiceInterface, BranchesChangeActiveStatusCreateRequestParams, BranchesCreateRequestParams, BranchesListRequestParams, BranchesRetrieveRequestParams, BranchesUpdateRequestParams, BranchesUsersStatsListRequestParams } from "./branches-api.serviceInterface";
|
|
9
|
+
import { BranchesApiServiceInterface, BranchesChangeActiveStatusCreateRequestParams, BranchesCreateRequestParams, BranchesListRequestParams, BranchesMetricsListRequestParams, BranchesRetrieveRequestParams, BranchesUpdateRequestParams, BranchesUsersStatsListRequestParams } from "./branches-api.serviceInterface";
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class BranchesApiService extends BaseService implements BranchesApiServiceInterface {
|
|
11
12
|
protected httpClient: HttpClient;
|
|
@@ -76,6 +77,28 @@ export declare class BranchesApiService extends BaseService implements BranchesA
|
|
|
76
77
|
context?: HttpContext;
|
|
77
78
|
transferCache?: boolean;
|
|
78
79
|
}): Observable<HttpEvent<PaginatedBranchListDto>>;
|
|
80
|
+
/**
|
|
81
|
+
* Get branches with metrics.
|
|
82
|
+
* @endpoint get /api/v1/branches/metrics/
|
|
83
|
+
* @param requestParameters
|
|
84
|
+
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
85
|
+
* @param reportProgress flag to report request and response progress.
|
|
86
|
+
*/
|
|
87
|
+
branchesMetricsList(requestParameters: BranchesMetricsListRequestParams, observe?: "body", reportProgress?: boolean, options?: {
|
|
88
|
+
httpHeaderAccept?: "application/json";
|
|
89
|
+
context?: HttpContext;
|
|
90
|
+
transferCache?: boolean;
|
|
91
|
+
}): Observable<Array<BranchMetricsDto>>;
|
|
92
|
+
branchesMetricsList(requestParameters: BranchesMetricsListRequestParams, observe?: "response", reportProgress?: boolean, options?: {
|
|
93
|
+
httpHeaderAccept?: "application/json";
|
|
94
|
+
context?: HttpContext;
|
|
95
|
+
transferCache?: boolean;
|
|
96
|
+
}): Observable<HttpResponse<Array<BranchMetricsDto>>>;
|
|
97
|
+
branchesMetricsList(requestParameters: BranchesMetricsListRequestParams, observe?: "events", reportProgress?: boolean, options?: {
|
|
98
|
+
httpHeaderAccept?: "application/json";
|
|
99
|
+
context?: HttpContext;
|
|
100
|
+
transferCache?: boolean;
|
|
101
|
+
}): Observable<HttpEvent<Array<BranchMetricsDto>>>;
|
|
79
102
|
/**
|
|
80
103
|
* ViewSet for viewing branches.
|
|
81
104
|
* @endpoint get /api/v1/branches/{id}/
|
|
@@ -11,6 +11,7 @@ import { HttpHeaders } from "@angular/common/http";
|
|
|
11
11
|
import { Observable } from "rxjs";
|
|
12
12
|
import { BranchChangeStateRequestDto } from "../model/models";
|
|
13
13
|
import { BranchDto } from "../model/models";
|
|
14
|
+
import { BranchMetricsDto } from "../model/models";
|
|
14
15
|
import { BranchRequestDto } from "../model/models";
|
|
15
16
|
import { PaginatedBranchListDto } from "../model/models";
|
|
16
17
|
import { PaginatedBranchUserStatsListDto } from "../model/models";
|
|
@@ -35,6 +36,14 @@ export interface BranchesListRequestParams {
|
|
|
35
36
|
ordering?: string;
|
|
36
37
|
search?: string;
|
|
37
38
|
}
|
|
39
|
+
export interface BranchesMetricsListRequestParams {
|
|
40
|
+
period: string;
|
|
41
|
+
id?: number;
|
|
42
|
+
idIn?: Array<number>;
|
|
43
|
+
ordering?: string;
|
|
44
|
+
search?: string;
|
|
45
|
+
usersOrdering?: string;
|
|
46
|
+
}
|
|
38
47
|
export interface BranchesRetrieveRequestParams {
|
|
39
48
|
id: number;
|
|
40
49
|
}
|
|
@@ -88,6 +97,13 @@ export interface BranchesApiServiceInterface {
|
|
|
88
97
|
* @param requestParameters
|
|
89
98
|
*/
|
|
90
99
|
branchesList(requestParameters: BranchesListRequestParams, extraHttpRequestParams?: any): Observable<PaginatedBranchListDto>;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* Get branches with metrics.
|
|
103
|
+
* @endpoint get /api/v1/branches/metrics/
|
|
104
|
+
* @param requestParameters
|
|
105
|
+
*/
|
|
106
|
+
branchesMetricsList(requestParameters: BranchesMetricsListRequestParams, extraHttpRequestParams?: any): Observable<Array<BranchMetricsDto>>;
|
|
91
107
|
/**
|
|
92
108
|
*
|
|
93
109
|
* ViewSet for viewing branches.
|
|
@@ -731,6 +731,63 @@ class BranchesApiService extends BaseService {
|
|
|
731
731
|
reportProgress: reportProgress,
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
|
+
branchesMetricsList(requestParameters, observe = "body", reportProgress = false, options) {
|
|
735
|
+
const period = requestParameters?.period;
|
|
736
|
+
if (period === null || period === undefined) {
|
|
737
|
+
throw new Error("Required parameter period was null or undefined when calling branchesMetricsList.");
|
|
738
|
+
}
|
|
739
|
+
const id = requestParameters?.id;
|
|
740
|
+
const idIn = requestParameters?.idIn;
|
|
741
|
+
const ordering = requestParameters?.ordering;
|
|
742
|
+
const search = requestParameters?.search;
|
|
743
|
+
const usersOrdering = requestParameters?.usersOrdering;
|
|
744
|
+
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
745
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, id, "id");
|
|
746
|
+
if (idIn) {
|
|
747
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, [...idIn].join(COLLECTION_FORMATS["csv"]), "id__in");
|
|
748
|
+
}
|
|
749
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, ordering, "ordering");
|
|
750
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, period, "period");
|
|
751
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, search, "search");
|
|
752
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, usersOrdering, "users_ordering");
|
|
753
|
+
let localVarHeaders = this.defaultHeaders;
|
|
754
|
+
// authentication (cookieAuth) required
|
|
755
|
+
// authentication (jwtAuth) required
|
|
756
|
+
localVarHeaders = this.configuration.addCredentialToHeaders("jwtAuth", "Authorization", localVarHeaders, "Bearer ");
|
|
757
|
+
const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ??
|
|
758
|
+
this.configuration.selectHeaderAccept(["application/json"]);
|
|
759
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
760
|
+
localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
|
|
761
|
+
}
|
|
762
|
+
const localVarHttpContext = options?.context ?? new HttpContext();
|
|
763
|
+
const localVarTransferCache = options?.transferCache ?? true;
|
|
764
|
+
let responseType_ = "json";
|
|
765
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
766
|
+
if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
|
|
767
|
+
responseType_ = "text";
|
|
768
|
+
}
|
|
769
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
770
|
+
responseType_ = "json";
|
|
771
|
+
}
|
|
772
|
+
else {
|
|
773
|
+
responseType_ = "blob";
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
let localVarPath = `/api/v1/branches/metrics/`;
|
|
777
|
+
const { basePath, withCredentials } = this.configuration;
|
|
778
|
+
return this.httpClient.request("get", `${basePath}${localVarPath}`, {
|
|
779
|
+
context: localVarHttpContext,
|
|
780
|
+
params: localVarQueryParameters,
|
|
781
|
+
responseType: responseType_,
|
|
782
|
+
...(withCredentials ? { withCredentials } : {}),
|
|
783
|
+
headers: localVarHeaders,
|
|
784
|
+
observe: observe,
|
|
785
|
+
...(localVarTransferCache !== undefined
|
|
786
|
+
? { transferCache: localVarTransferCache }
|
|
787
|
+
: {}),
|
|
788
|
+
reportProgress: reportProgress,
|
|
789
|
+
});
|
|
790
|
+
}
|
|
734
791
|
branchesRetrieve(requestParameters, observe = "body", reportProgress = false, options) {
|
|
735
792
|
const id = requestParameters?.id;
|
|
736
793
|
if (id === null || id === undefined) {
|