@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.
@@ -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,2 @@
1
+ export { AppDownloadDaily } from './app-download-daily.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ import { AppDownloadDaily } from "./app-download-daily.entity.js";
2
+ export {
3
+ AppDownloadDaily
4
+ };
@@ -0,0 +1,4 @@
1
+ export declare enum DownloadMetric {
2
+ DOWNLOADS = "downloads"
3
+ }
4
+ //# sourceMappingURL=metric.enum.d.ts.map
@@ -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,7 @@
1
+ var DownloadMetric = /* @__PURE__ */ ((DownloadMetric2) => {
2
+ DownloadMetric2["DOWNLOADS"] = "downloads";
3
+ return DownloadMetric2;
4
+ })(DownloadMetric || {});
5
+ export {
6
+ DownloadMetric
7
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum DownloadPlatform {
2
+ ANDROID = "android",
3
+ IOS = "ios"
4
+ }
5
+ //# sourceMappingURL=platform.enum.d.ts.map
@@ -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,8 @@
1
+ var DownloadPlatform = /* @__PURE__ */ ((DownloadPlatform2) => {
2
+ DownloadPlatform2["ANDROID"] = "android";
3
+ DownloadPlatform2["IOS"] = "ios";
4
+ return DownloadPlatform2;
5
+ })(DownloadPlatform || {});
6
+ export {
7
+ DownloadPlatform
8
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum DownloadSource {
2
+ GA4 = "ga4",
3
+ APPSTORE = "appstore"
4
+ }
5
+ //# sourceMappingURL=source.enum.d.ts.map
@@ -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,8 @@
1
+ var DownloadSource = /* @__PURE__ */ ((DownloadSource2) => {
2
+ DownloadSource2["GA4"] = "ga4";
3
+ DownloadSource2["APPSTORE"] = "appstore";
4
+ return DownloadSource2;
5
+ })(DownloadSource || {});
6
+ export {
7
+ DownloadSource
8
+ };
@@ -0,0 +1,5 @@
1
+ export * from './app-downloads';
2
+ export { DownloadMetric } from './enums/metric.enum';
3
+ export { DownloadPlatform } from './enums/platform.enum';
4
+ export { DownloadSource } from './enums/source.enum';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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
@@ -8,4 +8,5 @@ export * from './notifications';
8
8
  export * from './players';
9
9
  export * from './teams';
10
10
  export { DATABASE_ENTITIES } from './database-entities';
11
+ export * from './backoffice';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -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
@@ -8,6 +8,7 @@ export * from "./notifications/index.js";
8
8
  export * from "./players/index.js";
9
9
  export * from "./teams/index.js";
10
10
  import { DATABASE_ENTITIES } from "./database-entities/index.js";
11
+ export * from "./backoffice/index.js";
11
12
  export {
12
13
  DATABASE_ENTITIES
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.59",
3
+ "version": "1.4.61",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",