@natrave/shared-entities 1.4.59 → 1.4.61
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/backoffice/app-downloads/app-download-daily.entity.d.ts +10 -0
- package/dist/backoffice/app-downloads/app-download-daily.entity.d.ts.map +1 -0
- package/dist/backoffice/app-downloads/app-download-daily.entity.js +74 -0
- package/dist/backoffice/app-downloads/index.d.ts +2 -0
- package/dist/backoffice/app-downloads/index.d.ts.map +1 -0
- package/dist/backoffice/app-downloads/index.js +4 -0
- package/dist/backoffice/enums/metric.enum.d.ts +4 -0
- package/dist/backoffice/enums/metric.enum.d.ts.map +1 -0
- package/dist/backoffice/enums/metric.enum.js +7 -0
- package/dist/backoffice/enums/platform.enum.d.ts +5 -0
- package/dist/backoffice/enums/platform.enum.d.ts.map +1 -0
- package/dist/backoffice/enums/platform.enum.js +8 -0
- package/dist/backoffice/enums/source.enum.d.ts +5 -0
- package/dist/backoffice/enums/source.enum.d.ts.map +1 -0
- package/dist/backoffice/enums/source.enum.js +8 -0
- package/dist/backoffice/index.d.ts +5 -0
- package/dist/backoffice/index.d.ts.map +1 -0
- package/dist/backoffice/index.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DownloadMetric, DownloadPlatform, DownloadSource } from '..';
|
|
2
|
+
export declare class AppDownloadDaily {
|
|
3
|
+
day: string;
|
|
4
|
+
platform: DownloadPlatform;
|
|
5
|
+
metric: DownloadMetric;
|
|
6
|
+
value: number;
|
|
7
|
+
source: DownloadSource;
|
|
8
|
+
fetchedAt: Date;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=app-download-daily.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-download-daily.entity.d.ts","sourceRoot":"","sources":["../../../src/backoffice/app-downloads/app-download-daily.entity.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAYtE,qBAGa,gBAAgB;IAM3B,GAAG,EAAE,MAAM,CAAC;IAQZ,QAAQ,EAAE,gBAAgB,CAAC;IAS3B,MAAM,EAAE,cAAc,CAAC;IAQvB,KAAK,EAAE,MAAM,CAAC;IAQd,MAAM,EAAE,cAAc,CAAC;IAQvB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { Column, Entity, Index, PrimaryColumn } from "typeorm";
|
|
12
|
+
import { DownloadMetric, DownloadPlatform, DownloadSource } from "..";
|
|
13
|
+
const BigIntToNumber = {
|
|
14
|
+
to: (value) => value,
|
|
15
|
+
from: (value) => value ? Number(value) : 0
|
|
16
|
+
};
|
|
17
|
+
let AppDownloadDaily = class {
|
|
18
|
+
};
|
|
19
|
+
__decorateClass([
|
|
20
|
+
PrimaryColumn({
|
|
21
|
+
name: "day",
|
|
22
|
+
type: "date",
|
|
23
|
+
comment: "Dia (UTC) do agregado."
|
|
24
|
+
})
|
|
25
|
+
], AppDownloadDaily.prototype, "day", 2);
|
|
26
|
+
__decorateClass([
|
|
27
|
+
PrimaryColumn({
|
|
28
|
+
name: "platform",
|
|
29
|
+
type: "enum",
|
|
30
|
+
enum: DownloadPlatform,
|
|
31
|
+
comment: "Plataforma do app."
|
|
32
|
+
})
|
|
33
|
+
], AppDownloadDaily.prototype, "platform", 2);
|
|
34
|
+
__decorateClass([
|
|
35
|
+
PrimaryColumn({
|
|
36
|
+
name: "metric",
|
|
37
|
+
type: "enum",
|
|
38
|
+
enum: DownloadMetric,
|
|
39
|
+
default: DownloadMetric.DOWNLOADS,
|
|
40
|
+
comment: "Nome da m\xE9trica agregada."
|
|
41
|
+
})
|
|
42
|
+
], AppDownloadDaily.prototype, "metric", 2);
|
|
43
|
+
__decorateClass([
|
|
44
|
+
Column({
|
|
45
|
+
name: "value",
|
|
46
|
+
type: "bigint",
|
|
47
|
+
transformer: BigIntToNumber,
|
|
48
|
+
comment: "Valor agregado di\xE1rio da m\xE9trica."
|
|
49
|
+
})
|
|
50
|
+
], AppDownloadDaily.prototype, "value", 2);
|
|
51
|
+
__decorateClass([
|
|
52
|
+
Column({
|
|
53
|
+
name: "source",
|
|
54
|
+
type: "enum",
|
|
55
|
+
enum: DownloadSource,
|
|
56
|
+
comment: "Origem do dado (GA4 ou App Store Connect)."
|
|
57
|
+
})
|
|
58
|
+
], AppDownloadDaily.prototype, "source", 2);
|
|
59
|
+
__decorateClass([
|
|
60
|
+
Column({
|
|
61
|
+
name: "fetched_at",
|
|
62
|
+
type: "timestamptz",
|
|
63
|
+
default: () => "now()",
|
|
64
|
+
comment: "Momento em que o valor foi coletado/atualizado."
|
|
65
|
+
})
|
|
66
|
+
], AppDownloadDaily.prototype, "fetchedAt", 2);
|
|
67
|
+
AppDownloadDaily = __decorateClass([
|
|
68
|
+
Entity("downloads_daily"),
|
|
69
|
+
Index(["day"]),
|
|
70
|
+
Index(["platform", "day"])
|
|
71
|
+
], AppDownloadDaily);
|
|
72
|
+
export {
|
|
73
|
+
AppDownloadDaily
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backoffice/app-downloads/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric.enum.d.ts","sourceRoot":"","sources":["../../../src/backoffice/enums/metric.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,SAAS,cAAc;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.enum.d.ts","sourceRoot":"","sources":["../../../src/backoffice/enums/platform.enum.ts"],"names":[],"mappings":"AAGA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.enum.d.ts","sourceRoot":"","sources":["../../../src/backoffice/enums/source.enum.ts"],"names":[],"mappings":"AAGA,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backoffice/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./app-downloads/index.js";
|
|
2
|
+
import { DownloadMetric } from "./enums/metric.enum.js";
|
|
3
|
+
import { DownloadPlatform } from "./enums/platform.enum.js";
|
|
4
|
+
import { DownloadSource } from "./enums/source.enum.js";
|
|
5
|
+
export {
|
|
6
|
+
DownloadMetric,
|
|
7
|
+
DownloadPlatform,
|
|
8
|
+
DownloadSource
|
|
9
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAE3B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAE1B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED