@natrave/shared-entities 6.2.0 → 7.1.0

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.
Files changed (46) hide show
  1. package/dist/billing/billing-prices/billing-price.entity.d.ts +29 -0
  2. package/dist/billing/billing-prices/billing-price.entity.d.ts.map +1 -0
  3. package/dist/billing/billing-prices/billing-price.entity.js +170 -0
  4. package/dist/billing/billing-prices/enums/billing-scheme.enum.d.ts +5 -0
  5. package/dist/billing/billing-prices/enums/billing-scheme.enum.d.ts.map +1 -0
  6. package/dist/billing/billing-prices/enums/billing-scheme.enum.js +8 -0
  7. package/dist/billing/billing-prices/enums/pricing-model.enum.d.ts +6 -0
  8. package/dist/billing/billing-prices/enums/pricing-model.enum.d.ts.map +1 -0
  9. package/dist/billing/billing-prices/enums/pricing-model.enum.js +9 -0
  10. package/dist/billing/billing-prices/enums/recurring-interval.enum.d.ts +5 -0
  11. package/dist/billing/billing-prices/enums/recurring-interval.enum.d.ts.map +1 -0
  12. package/dist/billing/billing-prices/enums/recurring-interval.enum.js +8 -0
  13. package/dist/billing/billing-prices/enums/tiers-mode.enum.d.ts +5 -0
  14. package/dist/billing/billing-prices/enums/tiers-mode.enum.d.ts.map +1 -0
  15. package/dist/billing/billing-prices/enums/tiers-mode.enum.js +8 -0
  16. package/dist/billing/billing-prices/index.d.ts +6 -0
  17. package/dist/billing/billing-prices/index.d.ts.map +1 -0
  18. package/dist/billing/billing-prices/index.js +5 -0
  19. package/dist/billing/billing-products/billing-product.entity.d.ts +12 -0
  20. package/dist/billing/billing-products/billing-product.entity.d.ts.map +1 -0
  21. package/dist/billing/billing-products/billing-product.entity.js +83 -0
  22. package/dist/billing/billing-products/enums/billing-product-code.constant.d.ts +6 -0
  23. package/dist/billing/billing-products/enums/billing-product-code.constant.d.ts.map +1 -0
  24. package/dist/billing/billing-products/enums/billing-product-code.constant.js +13 -0
  25. package/dist/billing/billing-products/index.d.ts +3 -0
  26. package/dist/billing/billing-products/index.d.ts.map +1 -0
  27. package/dist/billing/billing-products/index.js +2 -0
  28. package/dist/billing/index.d.ts +3 -0
  29. package/dist/billing/index.d.ts.map +1 -0
  30. package/dist/billing/index.js +2 -0
  31. package/dist/database-entities/index.d.ts +2 -1
  32. package/dist/database-entities/index.d.ts.map +1 -1
  33. package/dist/database-entities/index.js +3 -0
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/tournaments/tournaments/index.d.ts +0 -1
  38. package/dist/tournaments/tournaments/index.d.ts.map +1 -1
  39. package/dist/tournaments/tournaments/index.js +0 -2
  40. package/dist/tournaments/tournaments/tournament.entity.d.ts +1 -5
  41. package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
  42. package/dist/tournaments/tournaments/tournament.entity.js +0 -23
  43. package/package.json +1 -1
  44. package/dist/tournaments/tournaments/enums/tournament-publication-status.enum.d.ts +0 -8
  45. package/dist/tournaments/tournaments/enums/tournament-publication-status.enum.d.ts.map +0 -1
  46. package/dist/tournaments/tournaments/enums/tournament-publication-status.enum.js +0 -11
@@ -0,0 +1,29 @@
1
+ import { BillingProduct } from '../billing-products';
2
+ import { BillingScheme } from './enums/billing-scheme.enum';
3
+ import { PricingModel } from './enums/pricing-model.enum';
4
+ import { RecurringInterval } from './enums/recurring-interval.enum';
5
+ import { TiersMode } from './enums/tiers-mode.enum';
6
+ export interface BillingPriceTier {
7
+ upTo: number | null;
8
+ unitAmount: number;
9
+ }
10
+ export declare class BillingPrice {
11
+ id: string;
12
+ productId: string;
13
+ nickname: string | null;
14
+ amount: number;
15
+ currency: string;
16
+ billingScheme: BillingScheme;
17
+ recurringInterval: RecurringInterval | null;
18
+ pricingModel: PricingModel;
19
+ tiers: BillingPriceTier[] | null;
20
+ tiersMode: TiersMode | null;
21
+ trialPeriodDays: number;
22
+ validFrom: Date;
23
+ validUntil: Date | null;
24
+ isActive: boolean;
25
+ createdAt: Date;
26
+ updatedAt: Date;
27
+ product: BillingProduct;
28
+ }
29
+ //# sourceMappingURL=billing-price.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-price.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-prices/billing-price.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAapD,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAiBD,qBAOa,YAAY;IAIvB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,MAAM,CAAC;IAQlB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAMxB,MAAM,EAAE,MAAM,CAAC;IAQf,QAAQ,EAAE,MAAM,CAAC;IASjB,aAAa,EAAE,aAAa,CAAC;IAU7B,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAU5C,YAAY,EAAE,YAAY,CAAC;IAO3B,KAAK,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IAUjC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAQ5B,eAAe,EAAE,MAAM,CAAC;IAQxB,SAAS,EAAE,IAAI,CAAC;IAQhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,QAAQ,EAAE,OAAO,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAYhB,OAAO,EAAE,cAAc,CAAC;CACzB"}
@@ -0,0 +1,170 @@
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 {
12
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ Index,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { BillingProduct } from "../billing-products/index.js";
22
+ import { BillingScheme } from "./enums/billing-scheme.enum.js";
23
+ import { PricingModel } from "./enums/pricing-model.enum.js";
24
+ import { RecurringInterval } from "./enums/recurring-interval.enum.js";
25
+ import { TiersMode } from "./enums/tiers-mode.enum.js";
26
+ let BillingPrice = class {
27
+ };
28
+ __decorateClass([
29
+ PrimaryGeneratedColumn("uuid", {
30
+ comment: "Identificador \xFAnico do pre\xE7o."
31
+ })
32
+ ], BillingPrice.prototype, "id", 2);
33
+ __decorateClass([
34
+ Column({
35
+ name: "product_id",
36
+ type: "uuid",
37
+ comment: "Identificador do produto ao qual o pre\xE7o pertence."
38
+ })
39
+ ], BillingPrice.prototype, "productId", 2);
40
+ __decorateClass([
41
+ Column({
42
+ type: "varchar",
43
+ length: 100,
44
+ nullable: true,
45
+ comment: 'R\xF3tulo interno do pre\xE7o (ex.: "lan\xE7amento 2026"). N\xE3o exibido ao cliente.'
46
+ })
47
+ ], BillingPrice.prototype, "nickname", 2);
48
+ __decorateClass([
49
+ Column({
50
+ type: "int",
51
+ comment: "Valor do pre\xE7o em centavos. Vale 0 quando o modelo \xE9 TIERED (o valor est\xE1 em tiers)."
52
+ })
53
+ ], BillingPrice.prototype, "amount", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "char",
57
+ length: 3,
58
+ default: "BRL",
59
+ comment: "Moeda do pre\xE7o no padr\xE3o ISO 4217 (ex.: BRL)."
60
+ })
61
+ ], BillingPrice.prototype, "currency", 2);
62
+ __decorateClass([
63
+ Column({
64
+ name: "billing_scheme",
65
+ type: "enum",
66
+ enum: BillingScheme,
67
+ enumName: "billing_prices_billing_scheme_enum",
68
+ comment: "Esquema de cobran\xE7a: \xFAnica (one_time) ou recorrente (recurring)."
69
+ })
70
+ ], BillingPrice.prototype, "billingScheme", 2);
71
+ __decorateClass([
72
+ Column({
73
+ name: "recurring_interval",
74
+ type: "enum",
75
+ enum: RecurringInterval,
76
+ enumName: "billing_prices_recurring_interval_enum",
77
+ nullable: true,
78
+ comment: "Intervalo de recorr\xEAncia (month/year). Nulo quando a cobran\xE7a \xE9 \xFAnica."
79
+ })
80
+ ], BillingPrice.prototype, "recurringInterval", 2);
81
+ __decorateClass([
82
+ Column({
83
+ name: "pricing_model",
84
+ type: "enum",
85
+ enum: PricingModel,
86
+ enumName: "billing_prices_pricing_model_enum",
87
+ default: PricingModel.FLAT,
88
+ comment: "Modelo de precifica\xE7\xE3o: valor fixo, por unidade ou por faixas."
89
+ })
90
+ ], BillingPrice.prototype, "pricingModel", 2);
91
+ __decorateClass([
92
+ Column({
93
+ type: "jsonb",
94
+ nullable: true,
95
+ comment: "Faixas de pre\xE7o quando o modelo \xE9 TIERED (array de { upTo, unitAmount })."
96
+ })
97
+ ], BillingPrice.prototype, "tiers", 2);
98
+ __decorateClass([
99
+ Column({
100
+ name: "tiers_mode",
101
+ type: "enum",
102
+ enum: TiersMode,
103
+ enumName: "billing_prices_tiers_mode_enum",
104
+ nullable: true,
105
+ comment: "Sem\xE2ntica das faixas (graduated/volume). Nulo quando o modelo n\xE3o \xE9 TIERED."
106
+ })
107
+ ], BillingPrice.prototype, "tiersMode", 2);
108
+ __decorateClass([
109
+ Column({
110
+ name: "trial_period_days",
111
+ type: "int",
112
+ default: 0,
113
+ comment: "Dura\xE7\xE3o do trial gratuito em dias. 0 = sem trial."
114
+ })
115
+ ], BillingPrice.prototype, "trialPeriodDays", 2);
116
+ __decorateClass([
117
+ Column({
118
+ name: "valid_from",
119
+ type: "timestamptz",
120
+ default: () => "now()",
121
+ comment: "In\xEDcio da vig\xEAncia do pre\xE7o."
122
+ })
123
+ ], BillingPrice.prototype, "validFrom", 2);
124
+ __decorateClass([
125
+ Column({
126
+ name: "valid_until",
127
+ type: "timestamptz",
128
+ nullable: true,
129
+ comment: "Fim da vig\xEAncia do pre\xE7o. Nulo enquanto vigente."
130
+ })
131
+ ], BillingPrice.prototype, "validUntil", 2);
132
+ __decorateClass([
133
+ Column({
134
+ name: "is_active",
135
+ type: "boolean",
136
+ default: true,
137
+ comment: "Indica se o pre\xE7o est\xE1 ativo. Permite desativa\xE7\xE3o imediata (kill switch)."
138
+ })
139
+ ], BillingPrice.prototype, "isActive", 2);
140
+ __decorateClass([
141
+ CreateDateColumn({
142
+ name: "created_at",
143
+ type: "timestamptz",
144
+ comment: "Data de cria\xE7\xE3o do registro."
145
+ })
146
+ ], BillingPrice.prototype, "createdAt", 2);
147
+ __decorateClass([
148
+ UpdateDateColumn({
149
+ name: "updated_at",
150
+ type: "timestamptz",
151
+ comment: "Data da \xFAltima atualiza\xE7\xE3o do registro."
152
+ })
153
+ ], BillingPrice.prototype, "updatedAt", 2);
154
+ __decorateClass([
155
+ ManyToOne(() => BillingProduct, (product) => product.prices, {
156
+ onDelete: "RESTRICT"
157
+ }),
158
+ JoinColumn({ name: "product_id" })
159
+ ], BillingPrice.prototype, "product", 2);
160
+ BillingPrice = __decorateClass([
161
+ Entity("billing_prices"),
162
+ Index("idx_billing_prices_product", ["productId"]),
163
+ Index("idx_billing_prices_product_valid_from", ["productId", "validFrom"]),
164
+ Index("idx_billing_prices_current", ["productId"], {
165
+ where: '"valid_until" IS NULL AND "is_active" = true'
166
+ })
167
+ ], BillingPrice);
168
+ export {
169
+ BillingPrice
170
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum BillingScheme {
2
+ ONE_TIME = "one_time",
3
+ RECURRING = "recurring"
4
+ }
5
+ //# sourceMappingURL=billing-scheme.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-scheme.enum.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-prices/enums/billing-scheme.enum.ts"],"names":[],"mappings":"AAWA,oBAAY,aAAa;IAIvB,QAAQ,aAAa;IAKrB,SAAS,cAAc;CACxB"}
@@ -0,0 +1,8 @@
1
+ var BillingScheme = /* @__PURE__ */ ((BillingScheme2) => {
2
+ BillingScheme2["ONE_TIME"] = "one_time";
3
+ BillingScheme2["RECURRING"] = "recurring";
4
+ return BillingScheme2;
5
+ })(BillingScheme || {});
6
+ export {
7
+ BillingScheme
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum PricingModel {
2
+ FLAT = "flat",
3
+ PER_UNIT = "per_unit",
4
+ TIERED = "tiered"
5
+ }
6
+ //# sourceMappingURL=pricing-model.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing-model.enum.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-prices/enums/pricing-model.enum.ts"],"names":[],"mappings":"AAYA,oBAAY,YAAY;IAItB,IAAI,SAAS;IAKb,QAAQ,aAAa;IAKrB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,9 @@
1
+ var PricingModel = /* @__PURE__ */ ((PricingModel2) => {
2
+ PricingModel2["FLAT"] = "flat";
3
+ PricingModel2["PER_UNIT"] = "per_unit";
4
+ PricingModel2["TIERED"] = "tiered";
5
+ return PricingModel2;
6
+ })(PricingModel || {});
7
+ export {
8
+ PricingModel
9
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum RecurringInterval {
2
+ MONTH = "month",
3
+ YEAR = "year"
4
+ }
5
+ //# sourceMappingURL=recurring-interval.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recurring-interval.enum.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-prices/enums/recurring-interval.enum.ts"],"names":[],"mappings":"AASA,oBAAY,iBAAiB;IAI3B,KAAK,UAAU;IAKf,IAAI,SAAS;CACd"}
@@ -0,0 +1,8 @@
1
+ var RecurringInterval = /* @__PURE__ */ ((RecurringInterval2) => {
2
+ RecurringInterval2["MONTH"] = "month";
3
+ RecurringInterval2["YEAR"] = "year";
4
+ return RecurringInterval2;
5
+ })(RecurringInterval || {});
6
+ export {
7
+ RecurringInterval
8
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum TiersMode {
2
+ GRADUATED = "graduated",
3
+ VOLUME = "volume"
4
+ }
5
+ //# sourceMappingURL=tiers-mode.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tiers-mode.enum.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-prices/enums/tiers-mode.enum.ts"],"names":[],"mappings":"AAeA,oBAAY,SAAS;IAInB,SAAS,cAAc;IAKvB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,8 @@
1
+ var TiersMode = /* @__PURE__ */ ((TiersMode2) => {
2
+ TiersMode2["GRADUATED"] = "graduated";
3
+ TiersMode2["VOLUME"] = "volume";
4
+ return TiersMode2;
5
+ })(TiersMode || {});
6
+ export {
7
+ TiersMode
8
+ };
@@ -0,0 +1,6 @@
1
+ export * from './billing-price.entity';
2
+ export * from './enums/billing-scheme.enum';
3
+ export * from './enums/pricing-model.enum';
4
+ export * from './enums/recurring-interval.enum';
5
+ export * from './enums/tiers-mode.enum';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-prices/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./billing-price.entity.js";
2
+ export * from "./enums/billing-scheme.enum.js";
3
+ export * from "./enums/pricing-model.enum.js";
4
+ export * from "./enums/recurring-interval.enum.js";
5
+ export * from "./enums/tiers-mode.enum.js";
@@ -0,0 +1,12 @@
1
+ import { BillingPrice } from '../billing-prices';
2
+ export declare class BillingProduct {
3
+ id: string;
4
+ code: string;
5
+ name: string;
6
+ description: string | null;
7
+ isActive: boolean;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ prices: BillingPrice[];
11
+ }
12
+ //# sourceMappingURL=billing-product.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-product.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-products/billing-product.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBjD,qBAIa,cAAc;IAIzB,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;IAOb,IAAI,EAAE,MAAM,CAAC;IAOb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ3B,QAAQ,EAAE,OAAO,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB"}
@@ -0,0 +1,83 @@
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 {
12
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ Index,
16
+ OneToMany,
17
+ PrimaryGeneratedColumn,
18
+ Unique,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { BillingPrice } from "../billing-prices/index.js";
22
+ let BillingProduct = class {
23
+ };
24
+ __decorateClass([
25
+ PrimaryGeneratedColumn("uuid", {
26
+ comment: "Identificador \xFAnico do produto de billing."
27
+ })
28
+ ], BillingProduct.prototype, "id", 2);
29
+ __decorateClass([
30
+ Column({
31
+ type: "varchar",
32
+ length: 60,
33
+ comment: "C\xF3digo sem\xE2ntico est\xE1vel do produto (ex.: TOURNAMENT_LICENSE). Imut\xE1vel ap\xF3s a cria\xE7\xE3o."
34
+ })
35
+ ], BillingProduct.prototype, "code", 2);
36
+ __decorateClass([
37
+ Column({
38
+ type: "varchar",
39
+ length: 255,
40
+ comment: "Nome de exibi\xE7\xE3o do produto."
41
+ })
42
+ ], BillingProduct.prototype, "name", 2);
43
+ __decorateClass([
44
+ Column({
45
+ type: "text",
46
+ nullable: true,
47
+ comment: "Descri\xE7\xE3o opcional do produto."
48
+ })
49
+ ], BillingProduct.prototype, "description", 2);
50
+ __decorateClass([
51
+ Column({
52
+ name: "is_active",
53
+ type: "boolean",
54
+ default: true,
55
+ comment: "Indica se o produto est\xE1 dispon\xEDvel para venda. Aposenta sem apagar hist\xF3rico."
56
+ })
57
+ ], BillingProduct.prototype, "isActive", 2);
58
+ __decorateClass([
59
+ CreateDateColumn({
60
+ name: "created_at",
61
+ type: "timestamptz",
62
+ comment: "Data de cria\xE7\xE3o do registro."
63
+ })
64
+ ], BillingProduct.prototype, "createdAt", 2);
65
+ __decorateClass([
66
+ UpdateDateColumn({
67
+ name: "updated_at",
68
+ type: "timestamptz",
69
+ comment: "Data da \xFAltima atualiza\xE7\xE3o do registro."
70
+ })
71
+ ], BillingProduct.prototype, "updatedAt", 2);
72
+ __decorateClass([
73
+ OneToMany(() => BillingPrice, (price) => price.product)
74
+ ], BillingProduct.prototype, "prices", 2);
75
+ BillingProduct = __decorateClass([
76
+ Entity("billing_products"),
77
+ Unique("UQ_billing_products_code", ["code"]),
78
+ Index("idx_billing_products_code", ["code"]),
79
+ Index("idx_billing_products_is_active", ["isActive"])
80
+ ], BillingProduct);
81
+ export {
82
+ BillingProduct
83
+ };
@@ -0,0 +1,6 @@
1
+ export declare const BillingProductCode: {
2
+ readonly TOURNAMENT_LICENSE: "TOURNAMENT_LICENSE";
3
+ readonly EXTRA_CATEGORY: "EXTRA_CATEGORY";
4
+ };
5
+ export type BillingProductCode = (typeof BillingProductCode)[keyof typeof BillingProductCode];
6
+ //# sourceMappingURL=billing-product-code.constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-product-code.constant.d.ts","sourceRoot":"","sources":["../../../../src/billing/billing-products/enums/billing-product-code.constant.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB;;;CAUrB,CAAC;AAWX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ const BillingProductCode = {
2
+ /**
3
+ * Licença de uso da plataforma por campeonato (agrupador de categorias).
4
+ */
5
+ TOURNAMENT_LICENSE: "TOURNAMENT_LICENSE",
6
+ /**
7
+ * Categoria adicional dentro de um campeonato.
8
+ */
9
+ EXTRA_CATEGORY: "EXTRA_CATEGORY"
10
+ };
11
+ export {
12
+ BillingProductCode
13
+ };
@@ -0,0 +1,3 @@
1
+ export * from './billing-product.entity';
2
+ export * from './enums/billing-product-code.constant';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-products/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./billing-product.entity.js";
2
+ export * from "./enums/billing-product-code.constant.js";
@@ -0,0 +1,3 @@
1
+ export * from './billing-prices';
2
+ export * from './billing-products';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/billing/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./billing-prices/index.js";
2
+ export * from "./billing-products/index.js";
@@ -1,4 +1,5 @@
1
1
  import { PasswordReset, RefreshToken, User, UserAuthProvider, UserOnboardingIntent, UserVerification } from '../app-auth';
2
+ import { BillingPrice, BillingProduct } from '../billing';
2
3
  import { Organization, OrganizationUser, OrganizationUserBillingInfo, PhoneNumber } from '../central-auth';
3
4
  import { Coupon, CouponUsage } from '../coupons';
4
5
  import { Address, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from '../facilities';
@@ -10,5 +11,5 @@ import { Player, PlayerPersonalData, PlayerPosition } from '../players';
10
11
  import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
11
12
  import { RegulationExtraction, Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentCategoryGroup, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFollow, TournamentFormatConfig, TournamentGroup, TournamentGroupContact, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentRegulationFieldStatus, TournamentTeam, TournamentTeamInvitation } from '../tournaments';
12
13
  import { UserDomainEvent, UserEventView } from '../user-events';
13
- export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentPenaltyShootout | typeof RegulationExtraction | typeof Tournament | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentTeamInvitation | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserOnboardingIntent | typeof UserVerification | typeof FeedActivitySubject | typeof FeedActivity | typeof FeedOutbox | typeof UserDomainEvent | typeof UserEventView)[];
14
+ export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentPenaltyShootout | typeof RegulationExtraction | typeof Tournament | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentTeamInvitation | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamModality | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPrice | typeof FeedActivitySubject | typeof FeedActivity | typeof FeedOutbox | typeof UserDomainEvent | typeof UserEventView)[];
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAE/B,cAAc,EACd,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,01DA0E7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ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4DA4E7B,CAAC"}
@@ -6,6 +6,7 @@ import {
6
6
  UserOnboardingIntent,
7
7
  UserVerification
8
8
  } from "../app-auth/index.js";
9
+ import { BillingPrice, BillingProduct } from "../billing/index.js";
9
10
  import {
10
11
  Organization,
11
12
  OrganizationUser,
@@ -70,6 +71,8 @@ import {
70
71
  import { UserDomainEvent, UserEventView } from "../user-events/index.js";
71
72
  const DATABASE_ENTITIES = [
72
73
  Address,
74
+ BillingProduct,
75
+ BillingPrice,
73
76
  Coupon,
74
77
  CouponUsage,
75
78
  Facility,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './app-auth';
2
2
  export * from './backoffice';
3
+ export * from './billing';
3
4
  export * from './central-auth';
4
5
  export * from './common';
5
6
  export * from './coupons';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./app-auth/index.js";
2
2
  export * from "./backoffice/index.js";
3
+ export * from "./billing/index.js";
3
4
  export * from "./central-auth/index.js";
4
5
  export * from "./common/index.js";
5
6
  export * from "./coupons/index.js";
@@ -1,4 +1,3 @@
1
- export { TournamentPublicationStatus } from './enums/tournament-publication-status.enum';
2
1
  export { TournamentRegulationMode } from './enums/tournament-regulation-mode.enum';
3
2
  export { Tournament } from './tournament.entity';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,8 +1,6 @@
1
- import { TournamentPublicationStatus } from "./enums/tournament-publication-status.enum.js";
2
1
  import { TournamentRegulationMode } from "./enums/tournament-regulation-mode.enum.js";
3
2
  import { Tournament } from "./tournament.entity.js";
4
3
  export {
5
4
  Tournament,
6
- TournamentPublicationStatus,
7
5
  TournamentRegulationMode
8
6
  };
@@ -23,11 +23,8 @@ import { TournamentRegistrationRequirement } from '../tournament-registration-re
23
23
  import { TournamentRule } from '../tournament-rules';
24
24
  import { TournamentTeamInvitation } from '../tournament-team-invitations';
25
25
  import { TournamentTeam } from '../tournament-teams';
26
- import { TournamentPublicationStatus } from './enums/tournament-publication-status.enum';
27
26
  import { TournamentRegulationMode } from './enums/tournament-regulation-mode.enum';
28
- type TournamentContract = Omit<ITournament, 'publicationStatus'> & {
29
- publicationStatus: TournamentPublicationStatus;
30
- };
27
+ type TournamentContract = Omit<ITournament, 'publicationStatus'>;
31
28
  export declare class Tournament implements TournamentContract {
32
29
  id: number;
33
30
  name: string;
@@ -48,7 +45,6 @@ export declare class Tournament implements TournamentContract {
48
45
  refereeFee?: number | null;
49
46
  registrationDeadline?: string | null;
50
47
  playerRegistrationDeadline?: string | null;
51
- publicationStatus: TournamentPublicationStatus;
52
48
  modality: TournamentModality;
53
49
  regulationPdfUrl?: string | null;
54
50
  defaultRegulationUrl: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAgB5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,g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uB,CAAC;IAGvC,KAAK,EAAE,cAAc,EAAE,CAAC;IAGxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAG1B,IAAI,EAAE,cAAc,CAAC;IAGrB,UAAU,EAAE,oBAAoB,CAAC;IAGjC,MAAM,EAAE,sBAAsB,CAAC;IAG/B,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,OAAO,EAAE,eAAe,EAAE,CAAC;IAG3B,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAG3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAG5B,mBAAmB,EAAE,2BAA2B,EAAE,CAAC;IAGnD,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,YAAY,EAAE,qBAAqB,EAAE,CAAC;IAItC,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IAGtD,eAAe,EAAE,wBAAwB,EAAE,CAAC;IAG5C,wBAAwB,EAAE,iCAAiC,EAAE,CAAC;IAG9D,aAAa,EAAE,sBAAsB,EAAE,CAAC;IAKxC,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB"}
@@ -50,7 +50,6 @@ import { TournamentRegistrationRequirement } from "../tournament-registration-re
50
50
  import { TournamentRule } from "../tournament-rules/index.js";
51
51
  import { TournamentTeamInvitation } from "../tournament-team-invitations/index.js";
52
52
  import { TournamentTeam } from "../tournament-teams/index.js";
53
- import { TournamentPublicationStatus } from "./enums/tournament-publication-status.enum.js";
54
53
  import { TournamentRegulationMode } from "./enums/tournament-regulation-mode.enum.js";
55
54
  let Tournament = class {
56
55
  };
@@ -193,15 +192,6 @@ __decorateClass([
193
192
  comment: "Data limite para inscri\xE7\xE3o/altera\xE7\xE3o de jogadores (YYYY-MM-DD)."
194
193
  })
195
194
  ], Tournament.prototype, "playerRegistrationDeadline", 2);
196
- __decorateClass([
197
- Column({
198
- name: "publication_status",
199
- default: TournamentPublicationStatus.DRAFT,
200
- type: "enum",
201
- enum: Object.values(TournamentPublicationStatus),
202
- comment: "Indica o est\xE1gio de publica\xE7\xE3o do torneio (rascunho, configura\xE7\xE3o, aguardando publica\xE7\xE3o/pagamento ou publicado)."
203
- })
204
- ], Tournament.prototype, "publicationStatus", 2);
205
195
  __decorateClass([
206
196
  Column({
207
197
  default: TournamentModality.FUT7,
@@ -351,23 +341,10 @@ __decorateClass([
351
341
  Tournament = __decorateClass([
352
342
  Entity("tournaments"),
353
343
  Index("idx_tournaments_organization", ["organizationId"]),
354
- Index("idx_tournaments_pub_active_id", ["id"], {
355
- where: `"publication_status" = 'published' AND "deleted_at" IS NULL`
356
- }),
357
- Index("idx_tournaments_pub_active_initial", [
358
- "publicationStatus",
359
- "deletedAt",
360
- "initialDate",
361
- "id"
362
- ]),
363
- Index("idx_tournaments_pub_active_end", ["publicationStatus", "deletedAt", "endDate", "id"]),
364
- Index("idx_tournaments_pub_active_id_comp", ["publicationStatus", "deletedAt", "id"]),
365
- Index("idx_tournaments_publication_status", ["publicationStatus"]),
366
344
  Index("idx_tournaments_initial_date", ["initialDate"]),
367
345
  Index("idx_tournaments_end_date", ["endDate"]),
368
346
  Index("idx_tournaments_state_city", ["state", "city"]),
369
347
  Index("idx_tournaments_deleted_at", ["deletedAt"]),
370
- Index("idx_tournaments_org_status_active", ["organizationId", "publicationStatus", "deletedAt"]),
371
348
  Index("idx_tournaments_category_group", ["categoryGroupId"]),
372
349
  Check("CHK_TOURNAMENT_END_DATE", '"end_date" >= "initial_date"')
373
350
  ], Tournament);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "6.2.0",
3
+ "version": "7.1.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -1,8 +0,0 @@
1
- export declare enum TournamentPublicationStatus {
2
- DRAFT = "draft",
3
- PERIOD_AND_LOCATION_SET = "period_and_location",
4
- CREATED = "created",
5
- PENDING_PUBLICATION = "pending_publication",
6
- PUBLISHED = "published"
7
- }
8
- //# sourceMappingURL=tournament-publication-status.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tournament-publication-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/tournaments/tournaments/enums/tournament-publication-status.enum.ts"],"names":[],"mappings":"AASA,oBAAY,2BAA2B;IAIrC,KAAK,UAAU;IAKf,uBAAuB,wBAAwB;IAK/C,OAAO,YAAY;IAKnB,mBAAmB,wBAAwB;IAK3C,SAAS,cAAc;CACxB"}
@@ -1,11 +0,0 @@
1
- var TournamentPublicationStatus = /* @__PURE__ */ ((TournamentPublicationStatus2) => {
2
- TournamentPublicationStatus2["DRAFT"] = "draft";
3
- TournamentPublicationStatus2["PERIOD_AND_LOCATION_SET"] = "period_and_location";
4
- TournamentPublicationStatus2["CREATED"] = "created";
5
- TournamentPublicationStatus2["PENDING_PUBLICATION"] = "pending_publication";
6
- TournamentPublicationStatus2["PUBLISHED"] = "published";
7
- return TournamentPublicationStatus2;
8
- })(TournamentPublicationStatus || {});
9
- export {
10
- TournamentPublicationStatus
11
- };