@rocketlink/crm-model 1.0.183 → 1.0.185
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/dist/dtos/common/base.request.dto.d.ts +2 -2
- package/dist/dtos/common/base.request.dto.d.ts.map +1 -1
- package/dist/dtos/common/paginated.response.dto.d.ts +2 -2
- package/dist/dtos/common/paginated.response.dto.d.ts.map +1 -1
- package/dist/dtos/csv.response.dto.d.ts +0 -1
- package/dist/dtos/csv.response.dto.d.ts.map +1 -1
- package/dist/dtos/event.request.dto.d.ts +2 -0
- package/dist/dtos/event.request.dto.d.ts.map +1 -1
- package/dist/dtos/job.request.dto.d.ts +0 -2
- package/dist/dtos/job.request.dto.d.ts.map +1 -1
- package/dist/dtos/order.request.dto.d.ts +1 -1
- package/dist/dtos/order.request.dto.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/model/transaction.model.d.ts +1 -1
- package/dist/model/transaction.model.js +1 -1
- package/dist/util/dateUtil.d.ts +5 -5
- package/dist/util/dateUtil.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dtos/common/base.request.dto.ts +2 -2
- package/src/dtos/common/paginated.response.dto.ts +2 -2
- package/src/dtos/csv.response.dto.ts +0 -1
- package/src/dtos/event.request.dto.ts +2 -0
- package/src/dtos/job.request.dto.ts +0 -2
- package/src/dtos/order.request.dto.ts +6 -6
- package/src/index.ts +0 -2
- package/src/model/transaction.model.ts +1 -1
- package/src/util/dateUtil.ts +5 -5
- package/dist/dtos/dashboard.resposnse.dto.d.ts +0 -69
- package/dist/dtos/dashboard.resposnse.dto.d.ts.map +0 -1
- package/dist/dtos/dashboard.resposnse.dto.js +0 -2
- package/dist/util/normalizeUtil.d.ts +0 -5
- package/dist/util/normalizeUtil.d.ts.map +0 -1
- package/dist/util/normalizeUtil.js +0 -41
- package/src/dtos/dashboard.resposnse.dto.ts +0 -74
- package/src/util/normalizeUtil.ts +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.request.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/common/base.request.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"base.request.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/common/base.request.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface PaginatedResponse<M> {
|
|
2
|
-
|
|
2
|
+
results: M[];
|
|
3
3
|
pagination?: Pagination;
|
|
4
4
|
}
|
|
5
5
|
export interface Pagination {
|
|
6
6
|
page: number;
|
|
7
7
|
pageSize: number;
|
|
8
|
-
|
|
8
|
+
total: number;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=paginated.response.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginated.response.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/common/paginated.response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,
|
|
1
|
+
{"version":3,"file":"paginated.response.dto.d.ts","sourceRoot":"","sources":["../../../src/dtos/common/paginated.response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csv.response.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/csv.response.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,MAAM,WAAW,YAAa,SAAQ,iBAAiB,CAAC,GAAG,CAAC;CAC3D;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"csv.response.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/csv.response.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,MAAM,WAAW,YAAa,SAAQ,iBAAiB,CAAC,GAAG,CAAC;CAC3D;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/event.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"event.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/event.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/job.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"job.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/job.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/order.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,EAAE,
|
|
1
|
+
{"version":3,"file":"order.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/order.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,SAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAS,CAAC,EAAC,MAAM,CAAC;IAClB,aAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,9 @@ export * from './util/constants';
|
|
|
2
2
|
export * from './util/dateUtil';
|
|
3
3
|
export { isDateString, dateToString, stringToDate, getCurrentDateCompacted, FORMATS } from './util/dateUtil';
|
|
4
4
|
export * from './util/numberUtils';
|
|
5
|
-
export * from './util/normalizeUtil';
|
|
6
5
|
export * from './dtos/common/base.request.dto';
|
|
7
6
|
export * from './dtos/common/paginated.request.dto';
|
|
8
7
|
export * from './dtos/common/paginated.response.dto';
|
|
9
|
-
export * from './dtos/dashboard.resposnse.dto';
|
|
10
8
|
export * from './dtos/campaign.request.dto';
|
|
11
9
|
export * from './dtos/category.request.dto';
|
|
12
10
|
export * from './dtos/csv.request.dto';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC7G,cAAc,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts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oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAG/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qDAAqD,CAAC;AACpE,cAAc,kDAAkD,CAAC;AAGjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wDAAwD,CAAC;AAGvE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,12 +25,10 @@ Object.defineProperty(exports, "stringToDate", { enumerable: true, get: function
|
|
|
25
25
|
Object.defineProperty(exports, "getCurrentDateCompacted", { enumerable: true, get: function () { return dateUtil_1.getCurrentDateCompacted; } });
|
|
26
26
|
Object.defineProperty(exports, "FORMATS", { enumerable: true, get: function () { return dateUtil_1.FORMATS; } });
|
|
27
27
|
__exportStar(require("./util/numberUtils"), exports);
|
|
28
|
-
__exportStar(require("./util/normalizeUtil"), exports);
|
|
29
28
|
// Export all DTOs
|
|
30
29
|
__exportStar(require("./dtos/common/base.request.dto"), exports);
|
|
31
30
|
__exportStar(require("./dtos/common/paginated.request.dto"), exports);
|
|
32
31
|
__exportStar(require("./dtos/common/paginated.response.dto"), exports);
|
|
33
|
-
__exportStar(require("./dtos/dashboard.resposnse.dto"), exports);
|
|
34
32
|
__exportStar(require("./dtos/campaign.request.dto"), exports);
|
|
35
33
|
__exportStar(require("./dtos/category.request.dto"), exports);
|
|
36
34
|
__exportStar(require("./dtos/csv.request.dto"), exports);
|
|
@@ -9,7 +9,7 @@ export declare const TRANSACTION_STATUS: {
|
|
|
9
9
|
export type TRANSACTION_STATUS = (typeof TRANSACTION_STATUS)[keyof typeof TRANSACTION_STATUS];
|
|
10
10
|
export declare const APP_TRANSACTION_TYPE: {
|
|
11
11
|
INITIAL: string;
|
|
12
|
-
|
|
12
|
+
REBILL: string;
|
|
13
13
|
STEPDOWN: string;
|
|
14
14
|
};
|
|
15
15
|
export type APP_TRANSACTION_TYPE = (typeof APP_TRANSACTION_TYPE)[keyof typeof APP_TRANSACTION_TYPE];
|
package/dist/util/dateUtil.d.ts
CHANGED
|
@@ -11,11 +11,11 @@ export declare const INTERVAL_UNIT: {
|
|
|
11
11
|
readonly MONTHS: "MONTHS";
|
|
12
12
|
};
|
|
13
13
|
export type INTERVAL_UNIT = (typeof INTERVAL_UNIT)[keyof typeof INTERVAL_UNIT];
|
|
14
|
-
export declare function dateToString(date?: Date
|
|
15
|
-
export declare function dateToYYYYMMDD(date?: Date
|
|
16
|
-
export declare function dateToTZ(date?: Date
|
|
17
|
-
export declare function dateToMinutes(date?: Date
|
|
18
|
-
export declare function dateToMinutesSeconds(date?: Date
|
|
14
|
+
export declare function dateToString(date?: Date, formatString?: string): string;
|
|
15
|
+
export declare function dateToYYYYMMDD(date?: Date): string;
|
|
16
|
+
export declare function dateToTZ(date?: Date): string;
|
|
17
|
+
export declare function dateToMinutes(date?: Date): string;
|
|
18
|
+
export declare function dateToMinutesSeconds(date?: Date): string;
|
|
19
19
|
export declare function getCurrentDateCompacted(): string;
|
|
20
20
|
export declare function isDateString(value: string): boolean;
|
|
21
21
|
export declare function stringToDate(value: string): Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtil.d.ts","sourceRoot":"","sources":["../../src/util/dateUtil.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;;;;;CAOV,CAAC;AAEX,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AACX,MAAM,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CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAKD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAK5D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAKnE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,GAAE,MAAyB,GAAG,MAAM,CAIhH;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,GAAE,MAAyB,GAAG,MAAM,CAIvH;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAKhE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,CAUrF;AAMD,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,EACvC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAgDR"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { PaginatedRequest } from "./common/paginated.request.dto";
|
|
2
2
|
|
|
3
3
|
export interface OrdersRequest extends PaginatedRequest {
|
|
4
|
-
id
|
|
5
|
-
paymentId?: number;
|
|
6
|
-
leadId?: number;
|
|
4
|
+
id: number;
|
|
5
|
+
paymentId ?: number;
|
|
6
|
+
leadId ?: number;
|
|
7
7
|
leadFirstName?: string
|
|
8
8
|
leadEmail?: string
|
|
9
9
|
amount?: string
|
|
10
|
-
status?: string;
|
|
10
|
+
status ?: string;
|
|
11
11
|
statuses?: string[];
|
|
12
|
-
leadName?:
|
|
13
|
-
paymentMethod?: string;
|
|
12
|
+
leadName ?:string;
|
|
13
|
+
paymentMethod ?: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface OrderItemsRequest extends PaginatedRequest {
|
package/src/index.ts
CHANGED
|
@@ -3,13 +3,11 @@ export * from './util/constants';
|
|
|
3
3
|
export * from './util/dateUtil';
|
|
4
4
|
export { isDateString, dateToString, stringToDate, getCurrentDateCompacted, FORMATS } from './util/dateUtil';
|
|
5
5
|
export * from './util/numberUtils';
|
|
6
|
-
export * from './util/normalizeUtil';
|
|
7
6
|
|
|
8
7
|
// Export all DTOs
|
|
9
8
|
export * from './dtos/common/base.request.dto';
|
|
10
9
|
export * from './dtos/common/paginated.request.dto';
|
|
11
10
|
export * from './dtos/common/paginated.response.dto';
|
|
12
|
-
export * from './dtos/dashboard.resposnse.dto';
|
|
13
11
|
export * from './dtos/campaign.request.dto';
|
|
14
12
|
export * from './dtos/category.request.dto';
|
|
15
13
|
export * from './dtos/csv.request.dto';
|
|
@@ -11,7 +11,7 @@ export type TRANSACTION_STATUS = (typeof TRANSACTION_STATUS)[keyof typeof TRANSA
|
|
|
11
11
|
|
|
12
12
|
export const APP_TRANSACTION_TYPE = {
|
|
13
13
|
INITIAL: "INITIAL",
|
|
14
|
-
|
|
14
|
+
REBILL: "REBILL",
|
|
15
15
|
STEPDOWN: "STEPDOWN",
|
|
16
16
|
};
|
|
17
17
|
export type APP_TRANSACTION_TYPE = (typeof APP_TRANSACTION_TYPE)[keyof typeof APP_TRANSACTION_TYPE];
|
package/src/util/dateUtil.ts
CHANGED
|
@@ -18,26 +18,26 @@ export type INTERVAL_UNIT = (typeof INTERVAL_UNIT)[keyof typeof INTERVAL_UNIT];
|
|
|
18
18
|
// ============================================
|
|
19
19
|
// Date → String formatted conversions
|
|
20
20
|
// ============================================
|
|
21
|
-
export function dateToString(date?: Date
|
|
21
|
+
export function dateToString(date?: Date, formatString: string = FORMATS.ISO_DATE): string {
|
|
22
22
|
if (!date || !isValid(date)) {
|
|
23
23
|
return undefined!;
|
|
24
24
|
}
|
|
25
25
|
return format(date, formatString);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export function dateToYYYYMMDD(date?: Date
|
|
28
|
+
export function dateToYYYYMMDD(date?: Date): string {
|
|
29
29
|
return dateToString(date, FORMATS.COMPACT_DATETIME);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export function dateToTZ(date?: Date
|
|
32
|
+
export function dateToTZ(date?: Date): string {
|
|
33
33
|
return dateToString(date, FORMATS.ISO_DATE_TIME_TZ);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function dateToMinutes(date?: Date
|
|
36
|
+
export function dateToMinutes(date?: Date): string {
|
|
37
37
|
return dateToString(date, FORMATS.ISO_DATE_TIME_MINUTES);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export function dateToMinutesSeconds(date?: Date
|
|
40
|
+
export function dateToMinutesSeconds(date?: Date): string {
|
|
41
41
|
return dateToString(date, FORMATS.ISO_DATE_TIME_SECONDS);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export interface DashboardCardsData {
|
|
2
|
-
totalCsvUpload?: {
|
|
3
|
-
currentMonth: number;
|
|
4
|
-
previousMonth: number;
|
|
5
|
-
percentageGrowth: number;
|
|
6
|
-
};
|
|
7
|
-
subscriptions?: {
|
|
8
|
-
currentMonth: number;
|
|
9
|
-
previousMonth: number;
|
|
10
|
-
percentageGrowth: number;
|
|
11
|
-
};
|
|
12
|
-
totalCustomers?: {
|
|
13
|
-
currentMonth: number;
|
|
14
|
-
previousMonth: number;
|
|
15
|
-
percentageGrowth: number;
|
|
16
|
-
};
|
|
17
|
-
totalTransaction?: {
|
|
18
|
-
currentMonth: number;
|
|
19
|
-
previousMonth: number;
|
|
20
|
-
percentageGrowth: number;
|
|
21
|
-
};
|
|
22
|
-
totalActiveCampaign?: {
|
|
23
|
-
currentMonth: number;
|
|
24
|
-
previousMonth: number;
|
|
25
|
-
percentageGrowth: number;
|
|
26
|
-
};
|
|
27
|
-
leads?: {
|
|
28
|
-
currentMonth: number;
|
|
29
|
-
previousMonth: number;
|
|
30
|
-
percentageGrowth: number;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface StatsVisitsRegistrationsCustomersData {
|
|
34
|
-
[key: string]: {
|
|
35
|
-
leads: number;
|
|
36
|
-
customers: number;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export interface StatsOffersVisitsData {
|
|
40
|
-
[key: string]: {
|
|
41
|
-
visits: number;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export interface CampaignStatisticsData {
|
|
45
|
-
totalLeads: number;
|
|
46
|
-
campaigns: {
|
|
47
|
-
[campaignName: string]: {
|
|
48
|
-
leads: number;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export interface StatsVisitsCustomersData {
|
|
53
|
-
[key: string]: {
|
|
54
|
-
visits?: number;
|
|
55
|
-
customers?: number;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface StatsPaymentsData {
|
|
59
|
-
[key: string]: {
|
|
60
|
-
trialPayments: number;
|
|
61
|
-
payments: number;
|
|
62
|
-
refundAndChargeback: number;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export interface CampaignStatisticsResponse {
|
|
66
|
-
data: StatsOffersVisitsData;
|
|
67
|
-
totalLeads?: number;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=dashboard.resposnse.dto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.resposnse.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/dashboard.resposnse.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE;QACf,YAAY,EAAE,M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QACf,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,aAAa,EAAE,MAAM,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,mBAAmB,EAAE,MAAM,CAAA;KAC5B,CAAA;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function normalizeString(value: string | undefined | null): string | undefined;
|
|
2
|
-
export declare function normalizeDate(value: Date | undefined | null): Date | undefined;
|
|
3
|
-
export declare function normalizeNumber(value: string | undefined | null): number | undefined;
|
|
4
|
-
export declare function normalizeDateToString(value: Date | string | undefined | null, formatString?: string): string;
|
|
5
|
-
//# sourceMappingURL=normalizeUtil.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeUtil.d.ts","sourceRoot":"","sources":["../../src/util/normalizeUtil.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAEpF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAE9E;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAKpF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAuB5G"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeString = normalizeString;
|
|
4
|
-
exports.normalizeDate = normalizeDate;
|
|
5
|
-
exports.normalizeNumber = normalizeNumber;
|
|
6
|
-
exports.normalizeDateToString = normalizeDateToString;
|
|
7
|
-
const dateUtil_1 = require("./dateUtil");
|
|
8
|
-
const date_fns_1 = require("date-fns");
|
|
9
|
-
function normalizeString(value) {
|
|
10
|
-
return value || undefined;
|
|
11
|
-
}
|
|
12
|
-
function normalizeDate(value) {
|
|
13
|
-
return value === null ? undefined : value;
|
|
14
|
-
}
|
|
15
|
-
function normalizeNumber(value) {
|
|
16
|
-
if (!isNaN(Number(value))) {
|
|
17
|
-
return Number(value);
|
|
18
|
-
}
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
function normalizeDateToString(value, formatString) {
|
|
22
|
-
if (!value) {
|
|
23
|
-
return '';
|
|
24
|
-
}
|
|
25
|
-
if (value instanceof Date) {
|
|
26
|
-
if (!(0, date_fns_1.isValid)(value)) {
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
return (0, dateUtil_1.dateToString)(value, formatString);
|
|
30
|
-
}
|
|
31
|
-
// If it's already a string, try to parse it as a Date
|
|
32
|
-
if (typeof value === 'string') {
|
|
33
|
-
const date = new Date(value);
|
|
34
|
-
if ((0, date_fns_1.isValid)(date)) {
|
|
35
|
-
return (0, dateUtil_1.dateToString)(date, formatString);
|
|
36
|
-
}
|
|
37
|
-
// If parsing fails, return the string as-is (assuming it's already formatted)
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
return '';
|
|
41
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export interface DashboardCardsData {
|
|
2
|
-
totalCsvUpload?: {
|
|
3
|
-
currentMonth: number
|
|
4
|
-
previousMonth: number
|
|
5
|
-
percentageGrowth: number
|
|
6
|
-
}
|
|
7
|
-
subscriptions?: {
|
|
8
|
-
currentMonth: number
|
|
9
|
-
previousMonth: number
|
|
10
|
-
percentageGrowth: number
|
|
11
|
-
}
|
|
12
|
-
totalCustomers?: {
|
|
13
|
-
currentMonth: number
|
|
14
|
-
previousMonth: number
|
|
15
|
-
percentageGrowth: number
|
|
16
|
-
}
|
|
17
|
-
totalTransaction?: {
|
|
18
|
-
currentMonth: number
|
|
19
|
-
previousMonth: number
|
|
20
|
-
percentageGrowth: number
|
|
21
|
-
}
|
|
22
|
-
totalActiveCampaign?: {
|
|
23
|
-
currentMonth: number
|
|
24
|
-
previousMonth: number
|
|
25
|
-
percentageGrowth: number
|
|
26
|
-
}
|
|
27
|
-
leads?: {
|
|
28
|
-
currentMonth: number
|
|
29
|
-
previousMonth: number
|
|
30
|
-
percentageGrowth: number
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface StatsVisitsRegistrationsCustomersData {
|
|
35
|
-
[key: string]: {
|
|
36
|
-
leads: number
|
|
37
|
-
customers: number
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface StatsOffersVisitsData {
|
|
42
|
-
[key: string]: {
|
|
43
|
-
visits: number
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface CampaignStatisticsData {
|
|
48
|
-
totalLeads: number
|
|
49
|
-
campaigns: {
|
|
50
|
-
[campaignName: string]: {
|
|
51
|
-
leads: number
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface StatsVisitsCustomersData {
|
|
57
|
-
[key: string]: {
|
|
58
|
-
visits?: number
|
|
59
|
-
customers?: number
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface StatsPaymentsData {
|
|
64
|
-
[key: string]: {
|
|
65
|
-
trialPayments: number
|
|
66
|
-
payments: number
|
|
67
|
-
refundAndChargeback: number
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface CampaignStatisticsResponse {
|
|
72
|
-
data: StatsOffersVisitsData
|
|
73
|
-
totalLeads?: number
|
|
74
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { dateToString } from './dateUtil'
|
|
2
|
-
import { isValid } from 'date-fns'
|
|
3
|
-
|
|
4
|
-
export function normalizeString(value: string | undefined | null): string | undefined {
|
|
5
|
-
return value || undefined
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function normalizeDate(value: Date | undefined | null): Date | undefined {
|
|
9
|
-
return value === null ? undefined : value
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function normalizeNumber(value: string | undefined | null): number | undefined {
|
|
13
|
-
if (!isNaN(Number(value))) {
|
|
14
|
-
return Number(value)
|
|
15
|
-
}
|
|
16
|
-
return undefined
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function normalizeDateToString(value: Date | string | undefined | null, formatString?: string): string {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return ''
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (value instanceof Date) {
|
|
25
|
-
if (!isValid(value)) {
|
|
26
|
-
return ''
|
|
27
|
-
}
|
|
28
|
-
return dateToString(value, formatString)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// If it's already a string, try to parse it as a Date
|
|
32
|
-
if (typeof value === 'string') {
|
|
33
|
-
const date = new Date(value)
|
|
34
|
-
if (isValid(date)) {
|
|
35
|
-
return dateToString(date, formatString)
|
|
36
|
-
}
|
|
37
|
-
// If parsing fails, return the string as-is (assuming it's already formatted)
|
|
38
|
-
return value
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return ''
|
|
42
|
-
}
|