@ooneex/typeorm 0.16.0 → 0.16.1

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.
@@ -2,7 +2,7 @@ import { ITypeormDatabase } from "@ooneex/database";
2
2
  import { FilterResultType } from "@ooneex/types";
3
3
  import { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from "typeorm";
4
4
  import { CurrencyCodeType } from "@ooneex/currencies";
5
- import { EDiscountType, ICoupon, IPlan, IProduct } from "@ooneex/payment";
5
+ import { ICredit } from "@ooneex/payment";
6
6
  import { LocaleType } from "@ooneex/translation";
7
7
  import { IBase } from "@ooneex/types";
8
8
  declare abstract class BaseEntity implements IBase {
@@ -18,70 +18,77 @@ declare abstract class BaseEntity implements IBase {
18
18
  updatedAt?: Date;
19
19
  deletedAt?: Date;
20
20
  }
21
- declare class PaymentCouponEntity extends BaseEntity implements ICoupon {
22
- code: string;
23
- name?: string;
24
- description?: string;
25
- discountType: EDiscountType;
26
- discountValue: number;
21
+ declare class PaymentCreditEntity extends BaseEntity implements ICredit {
22
+ balance: number;
27
23
  currency?: CurrencyCodeType;
28
- maxUses?: number;
29
- usedCount?: number;
30
- startAt?: Date;
31
- endAt?: Date;
32
- isActive?: boolean;
33
- minimumAmount?: number;
34
- applicableProducts?: IProduct[];
35
- applicablePlans?: IPlan[];
24
+ expiresAt?: Date;
25
+ description?: string;
36
26
  }
37
- declare class PaymentCouponRepository {
27
+ declare class PaymentCreditRepository {
38
28
  private readonly database;
39
29
  constructor(database: ITypeormDatabase);
40
- open(): Promise<Repository<PaymentCouponEntity>>;
30
+ open(): Promise<Repository<PaymentCreditEntity>>;
41
31
  close(): Promise<void>;
42
- find(criteria: FindManyOptions<PaymentCouponEntity> & {
32
+ find(criteria: FindManyOptions<PaymentCreditEntity> & {
43
33
  page?: number;
44
34
  limit?: number;
45
35
  q?: string;
46
- }): Promise<FilterResultType<PaymentCouponEntity>>;
47
- findOne(id: string): Promise<PaymentCouponEntity | null>;
48
- findOneBy(criteria: FindOptionsWhere<PaymentCouponEntity>): Promise<PaymentCouponEntity | null>;
49
- create(entity: PaymentCouponEntity, options?: SaveOptions): Promise<PaymentCouponEntity>;
50
- createMany(entities: PaymentCouponEntity[], options?: SaveOptions): Promise<PaymentCouponEntity[]>;
51
- update(entity: PaymentCouponEntity, options?: SaveOptions): Promise<PaymentCouponEntity>;
52
- updateMany(entities: PaymentCouponEntity[], options?: SaveOptions): Promise<PaymentCouponEntity[]>;
53
- delete(criteria: FindOptionsWhere<PaymentCouponEntity> | FindOptionsWhere<PaymentCouponEntity>[]): Promise<UpdateResult>;
54
- count(criteria?: FindOptionsWhere<PaymentCouponEntity> | FindOptionsWhere<PaymentCouponEntity>[]): Promise<number>;
36
+ }): Promise<FilterResultType<PaymentCreditEntity>>;
37
+ findOne(id: string): Promise<PaymentCreditEntity | null>;
38
+ findOneBy(criteria: FindOptionsWhere<PaymentCreditEntity>): Promise<PaymentCreditEntity | null>;
39
+ create(entity: PaymentCreditEntity, options?: SaveOptions): Promise<PaymentCreditEntity>;
40
+ createMany(entities: PaymentCreditEntity[], options?: SaveOptions): Promise<PaymentCreditEntity[]>;
41
+ update(entity: PaymentCreditEntity, options?: SaveOptions): Promise<PaymentCreditEntity>;
42
+ updateMany(entities: PaymentCreditEntity[], options?: SaveOptions): Promise<PaymentCreditEntity[]>;
43
+ delete(criteria: FindOptionsWhere<PaymentCreditEntity> | FindOptionsWhere<PaymentCreditEntity>[]): Promise<UpdateResult>;
44
+ count(criteria?: FindOptionsWhere<PaymentCreditEntity> | FindOptionsWhere<PaymentCreditEntity>[]): Promise<number>;
55
45
  }
56
46
  import { ITypeormDatabase as ITypeormDatabase2 } from "@ooneex/database";
57
47
  import { FilterResultType as FilterResultType2 } from "@ooneex/types";
58
48
  import { FindManyOptions as FindManyOptions2, FindOptionsWhere as FindOptionsWhere2, Repository as Repository2, SaveOptions as SaveOptions2, UpdateResult as UpdateResult2 } from "typeorm";
59
49
  import { CurrencyCodeType as CurrencyCodeType2 } from "@ooneex/currencies";
60
- import { ICredit } from "@ooneex/payment";
61
- declare class PaymentCreditEntity extends BaseEntity implements ICredit {
62
- balance: number;
63
- currency?: CurrencyCodeType2;
64
- expiresAt?: Date;
50
+ import { DiscountDurationType, DiscountType, IDiscount, IPlan, IProduct } from "@ooneex/payment";
51
+ declare class PaymentDiscountEntity extends BaseEntity implements IDiscount {
52
+ key?: string;
53
+ name: string;
65
54
  description?: string;
55
+ code?: string;
56
+ type: DiscountType;
57
+ amount: number;
58
+ currency?: CurrencyCodeType2;
59
+ duration: DiscountDurationType;
60
+ durationInMonths?: number;
61
+ startAt?: Date;
62
+ endAt?: Date;
63
+ maxUses?: number;
64
+ usedCount?: number;
65
+ maxRedemptions?: number;
66
+ redemptionsCount?: number;
67
+ isActive?: boolean;
68
+ minimumAmount?: number;
69
+ applicableProducts?: IProduct[];
70
+ applicablePlans?: IPlan[];
71
+ organizationId?: string;
72
+ metadata?: Record<string, string | number | boolean>;
66
73
  }
67
- declare class PaymentCreditRepository {
74
+ declare class PaymentDiscountRepository {
68
75
  private readonly database;
69
76
  constructor(database: ITypeormDatabase2);
70
- open(): Promise<Repository2<PaymentCreditEntity>>;
77
+ open(): Promise<Repository2<PaymentDiscountEntity>>;
71
78
  close(): Promise<void>;
72
- find(criteria: FindManyOptions2<PaymentCreditEntity> & {
79
+ find(criteria: FindManyOptions2<PaymentDiscountEntity> & {
73
80
  page?: number;
74
81
  limit?: number;
75
82
  q?: string;
76
- }): Promise<FilterResultType2<PaymentCreditEntity>>;
77
- findOne(id: string): Promise<PaymentCreditEntity | null>;
78
- findOneBy(criteria: FindOptionsWhere2<PaymentCreditEntity>): Promise<PaymentCreditEntity | null>;
79
- create(entity: PaymentCreditEntity, options?: SaveOptions2): Promise<PaymentCreditEntity>;
80
- createMany(entities: PaymentCreditEntity[], options?: SaveOptions2): Promise<PaymentCreditEntity[]>;
81
- update(entity: PaymentCreditEntity, options?: SaveOptions2): Promise<PaymentCreditEntity>;
82
- updateMany(entities: PaymentCreditEntity[], options?: SaveOptions2): Promise<PaymentCreditEntity[]>;
83
- delete(criteria: FindOptionsWhere2<PaymentCreditEntity> | FindOptionsWhere2<PaymentCreditEntity>[]): Promise<UpdateResult2>;
84
- count(criteria?: FindOptionsWhere2<PaymentCreditEntity> | FindOptionsWhere2<PaymentCreditEntity>[]): Promise<number>;
83
+ }): Promise<FilterResultType2<PaymentDiscountEntity>>;
84
+ findOne(id: string): Promise<PaymentDiscountEntity | null>;
85
+ findOneBy(criteria: FindOptionsWhere2<PaymentDiscountEntity>): Promise<PaymentDiscountEntity | null>;
86
+ create(entity: PaymentDiscountEntity, options?: SaveOptions2): Promise<PaymentDiscountEntity>;
87
+ createMany(entities: PaymentDiscountEntity[], options?: SaveOptions2): Promise<PaymentDiscountEntity[]>;
88
+ update(entity: PaymentDiscountEntity, options?: SaveOptions2): Promise<PaymentDiscountEntity>;
89
+ updateMany(entities: PaymentDiscountEntity[], options?: SaveOptions2): Promise<PaymentDiscountEntity[]>;
90
+ delete(criteria: FindOptionsWhere2<PaymentDiscountEntity> | FindOptionsWhere2<PaymentDiscountEntity>[]): Promise<UpdateResult2>;
91
+ count(criteria?: FindOptionsWhere2<PaymentDiscountEntity> | FindOptionsWhere2<PaymentDiscountEntity>[]): Promise<number>;
85
92
  }
86
93
  import { ITypeormDatabase as ITypeormDatabase3 } from "@ooneex/database";
87
94
  import { FilterResultType as FilterResultType3 } from "@ooneex/types";
@@ -153,19 +160,28 @@ import { FindManyOptions as FindManyOptions5, FindOptionsWhere as FindOptionsWhe
153
160
  import { ICategory } from "@ooneex/category";
154
161
  import { CurrencyCodeType as CurrencyCodeType4 } from "@ooneex/currencies";
155
162
  import { IImage } from "@ooneex/image";
156
- import { IProduct as IProduct2 } from "@ooneex/payment";
163
+ import { BenefitType, CustomFieldType, IProduct as IProduct2, PriceType, SubscriptionPeriodType } from "@ooneex/payment";
157
164
  import { ITag } from "@ooneex/tag";
158
165
  import { ScalarType } from "@ooneex/types";
159
166
  declare class PaymentProductEntity extends BaseEntity implements IProduct2 {
167
+ key?: string;
160
168
  name: string;
161
169
  description?: string;
162
170
  categories?: ICategory[];
163
- currency: CurrencyCodeType4;
164
- price: number;
171
+ currency?: CurrencyCodeType4;
172
+ price?: number;
165
173
  barcode?: string;
166
174
  images?: IImage[];
167
175
  attributes?: Record<string, ScalarType>;
168
176
  tags?: ITag[];
177
+ isRecurring?: boolean;
178
+ isArchived?: boolean;
179
+ organizationId?: string;
180
+ recurringInterval?: SubscriptionPeriodType;
181
+ metadata?: Record<string, string | number | boolean>;
182
+ prices?: PriceType[];
183
+ benefits?: BenefitType[];
184
+ attachedCustomFields?: CustomFieldType[];
169
185
  }
170
186
  declare class PaymentProductRepository {
171
187
  private readonly database;
@@ -189,9 +205,9 @@ declare class PaymentProductRepository {
189
205
  import { ITypeormDatabase as ITypeormDatabase6 } from "@ooneex/database";
190
206
  import { FilterResultType as FilterResultType6 } from "@ooneex/types";
191
207
  import { FindManyOptions as FindManyOptions6, FindOptionsWhere as FindOptionsWhere6, Repository as Repository6, SaveOptions as SaveOptions6, UpdateResult as UpdateResult6 } from "typeorm";
192
- import { ICoupon as ICoupon2, ICredit as ICredit2, IPlan as IPlan3, ISubscription } from "@ooneex/payment";
208
+ import { ICredit as ICredit2, IDiscount as IDiscount2, IPlan as IPlan3, ISubscription } from "@ooneex/payment";
193
209
  declare class PaymentSubscriptionEntity extends BaseEntity implements Omit<ISubscription, "isActive"> {
194
- coupons?: ICoupon2[];
210
+ discounts?: IDiscount2[];
195
211
  plans?: IPlan3[];
196
212
  credits?: ICredit2[];
197
213
  startAt: Date;
@@ -217,4 +233,4 @@ declare class PaymentSubscriptionRepository {
217
233
  delete(criteria: FindOptionsWhere6<PaymentSubscriptionEntity> | FindOptionsWhere6<PaymentSubscriptionEntity>[]): Promise<UpdateResult6>;
218
234
  count(criteria?: FindOptionsWhere6<PaymentSubscriptionEntity> | FindOptionsWhere6<PaymentSubscriptionEntity>[]): Promise<number>;
219
235
  }
220
- export { PaymentSubscriptionRepository, PaymentProductRepository, PaymentPlanRepository, PaymentFeatureRepository, PaymentCreditRepository, PaymentCouponRepository };
236
+ export { PaymentSubscriptionRepository, PaymentProductRepository, PaymentPlanRepository, PaymentFeatureRepository, PaymentDiscountRepository, PaymentCreditRepository };
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{$ as L,_ as I,aa as h,ba as E,ca as R,da as C}from"../../../shared/chunk-5tnqjb3n.js";import"../../../shared/chunk-xwe8m6av.js";import"../../../shared/chunk-p22keb3y.js";import"../../../shared/chunk-6jnj2pfx.js";import"../../../shared/chunk-x2d798hg.js";import"../../../shared/chunk-xrqhqgen.js";import{Ha as T,Ia as U,Ja as V}from"../../../shared/chunk-59vwmfpm.js";import{inject as g}from"@ooneex/container";import{decorator as q}from"@ooneex/repository";import{ILike as Z}from"typeorm";class ${database;constructor(x){this.database=x}async open(){return await this.database.open(E)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,H,K=A===0?100:A;if(z&&z>0&&A&&A>0)H=(z-1)*K;let J={...D,take:K,...H!==void 0&&{skip:H}};if(B){let G=[{code:Z(`%${B}%`)},{name:Z(`%${B}%`)},{description:Z(`%${B}%`)}];J={...J,where:D.where?[...G.map((M)=>({...D.where,...M}))]:G}}let X=await v.find(J),N=D.where;if(B){let G=[{code:Z(`%${B}%`)},{name:Z(`%${B}%`)},{description:Z(`%${B}%`)}];N=D.where?[...G.map((M)=>({...D.where,...M}))]:G}let Q=await this.count(N),Y=Math.ceil(Q/A);return{resources:X,total:Q,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}$=T([q.repository(),U(0,g("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],$);import{inject as u}from"@ooneex/container";import{decorator as P}from"@ooneex/repository";import{ILike as O}from"typeorm";class F{database;constructor(x){this.database=x}async open(){return await this.database.open(R)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,H,K=A===0?100:A;if(z&&z>0&&A&&A>0)H=(z-1)*K;let J={...D,take:K,...H!==void 0&&{skip:H}};if(B)J={...J,where:{...D.where,description:O(`%${B}%`)}};let X=await v.find(J),N=D.where;if(B)N={...D.where,description:O(`%${B}%`)};let Q=await this.count(N),Y=Math.ceil(Q/A);return{resources:X,total:Q,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}F=T([P.repository(),U(0,u("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],F);import{inject as k}from"@ooneex/container";import{decorator as l}from"@ooneex/repository";import{ILike as S}from"typeorm";class j{database;constructor(x){this.database=x}async open(){return await this.database.open(I)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,H,K=A===0?100:A;if(z&&z>0&&A&&A>0)H=(z-1)*K;let J={...D,take:K,...H!==void 0&&{skip:H}};if(B){let G=[{name:S(`%${B}%`)},{description:S(`%${B}%`)}];J={...J,where:D.where?[...G.map((M)=>({...D.where,...M}))]:G}}let X=await v.find(J),N=D.where;if(B){let G=[{name:S(`%${B}%`)},{description:S(`%${B}%`)}];N=D.where?[...G.map((M)=>({...D.where,...M}))]:G}let Q=await this.count(N),Y=Math.ceil(Q/A);return{resources:X,total:Q,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}j=T([l.repository(),U(0,k("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],j);import{inject as m}from"@ooneex/container";import{decorator as d}from"@ooneex/repository";import{ILike as w}from"typeorm";class f{database;constructor(x){this.database=x}async open(){return await this.database.open(L)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,H,K=A===0?100:A;if(z&&z>0&&A&&A>0)H=(z-1)*K;let J={...D,take:K,...H!==void 0&&{skip:H}};if(B){let G=[{name:w(`%${B}%`)},{description:w(`%${B}%`)}];J={...J,where:D.where?[...G.map((M)=>({...D.where,...M}))]:G}}let X=await v.find(J),N=D.where;if(B){let G=[{name:w(`%${B}%`)},{description:w(`%${B}%`)}];N=D.where?[...G.map((M)=>({...D.where,...M}))]:G}let Q=await this.count(N),Y=Math.ceil(Q/A);return{resources:X,total:Q,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}f=T([d.repository(),U(0,m("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],f);import{inject as y}from"@ooneex/container";import{decorator as c}from"@ooneex/repository";import{ILike as _}from"typeorm";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(h)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...D}=x,H,K=A===0?100:A;if(z&&z>0&&A&&A>0)H=(z-1)*K;let J={...D,take:K,...H!==void 0&&{skip:H}};if(B){let G=[{name:_(`%${B}%`)},{description:_(`%${B}%`)},{barcode:_(`%${B}%`)}];J={...J,where:D.where?[...G.map((M)=>({...D.where,...M}))]:G}}let X=await v.find(J),N=D.where;if(B){let G=[{name:_(`%${B}%`)},{description:_(`%${B}%`)},{barcode:_(`%${B}%`)}];N=D.where?[...G.map((M)=>({...D.where,...M}))]:G}let Q=await this.count(N),Y=Math.ceil(Q/A);return{resources:X,total:Q,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=T([c.repository(),U(0,y("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as p}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";class b{database;constructor(x){this.database=x}async open(){return await this.database.open(C)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,...B}=x,D,H=A===0?100:A;if(z&&z>0&&A&&A>0)D=(z-1)*H;let K=await v.find({...B,take:H,...D!==void 0&&{skip:D}}),J=await this.count(B.where),X=Math.ceil(J/A);return{resources:K,total:J,totalPages:X,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}b=T([a.repository(),U(0,p("database")),V("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],b);export{b as PaymentSubscriptionRepository,W as PaymentProductRepository,f as PaymentPlanRepository,j as PaymentFeatureRepository,F as PaymentCreditRepository,$ as PaymentCouponRepository};
2
+ import{$ as C,_ as O,aa as I,ba as L,ca as R,da as h}from"../../../shared/chunk-b668j15v.js";import"../../../shared/chunk-xwe8m6av.js";import"../../../shared/chunk-p22keb3y.js";import"../../../shared/chunk-6jnj2pfx.js";import"../../../shared/chunk-x2d798hg.js";import"../../../shared/chunk-xrqhqgen.js";import{Ha as U,Ia as V,Ja as X}from"../../../shared/chunk-59vwmfpm.js";import{inject as g}from"@ooneex/container";import{decorator as q}from"@ooneex/repository";import{ILike as E}from"typeorm";class D{database;constructor(x){this.database=x}async open(){return await this.database.open(O)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...G}=x,J,M=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*M;let K={...G,take:M,...J!==void 0&&{skip:J}};if(B)K={...K,where:{...G.where,description:E(`%${B}%`)}};let Y=await v.find(K),Q=G.where;if(B)Q={...G.where,description:E(`%${B}%`)};let T=await this.count(Q),Z=Math.ceil(T/A);return{resources:Y,total:T,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}D=U([q.repository(),V(0,g("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],D);import{inject as u}from"@ooneex/container";import{decorator as P}from"@ooneex/repository";import{ILike as _}from"typeorm";class F{database;constructor(x){this.database=x}async open(){return await this.database.open(R)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...G}=x,J,M=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*M;let K={...G,take:M,...J!==void 0&&{skip:J}};if(B){let H=[{code:_(`%${B}%`)},{name:_(`%${B}%`)},{description:_(`%${B}%`)}];K={...K,where:G.where?[...H.map((N)=>({...G.where,...N}))]:H}}let Y=await v.find(K),Q=G.where;if(B){let H=[{code:_(`%${B}%`)},{name:_(`%${B}%`)},{description:_(`%${B}%`)}];Q=G.where?[...H.map((N)=>({...G.where,...N}))]:H}let T=await this.count(Q),Z=Math.ceil(T/A);return{resources:Y,total:T,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}F=U([P.repository(),V(0,u("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],F);import{inject as k}from"@ooneex/container";import{decorator as l}from"@ooneex/repository";import{ILike as S}from"typeorm";class j{database;constructor(x){this.database=x}async open(){return await this.database.open(C)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...G}=x,J,M=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*M;let K={...G,take:M,...J!==void 0&&{skip:J}};if(B){let H=[{name:S(`%${B}%`)},{description:S(`%${B}%`)}];K={...K,where:G.where?[...H.map((N)=>({...G.where,...N}))]:H}}let Y=await v.find(K),Q=G.where;if(B){let H=[{name:S(`%${B}%`)},{description:S(`%${B}%`)}];Q=G.where?[...H.map((N)=>({...G.where,...N}))]:H}let T=await this.count(Q),Z=Math.ceil(T/A);return{resources:Y,total:T,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}j=U([l.repository(),V(0,k("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],j);import{inject as m}from"@ooneex/container";import{decorator as d}from"@ooneex/repository";import{ILike as w}from"typeorm";class f{database;constructor(x){this.database=x}async open(){return await this.database.open(I)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...G}=x,J,M=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*M;let K={...G,take:M,...J!==void 0&&{skip:J}};if(B){let H=[{name:w(`%${B}%`)},{description:w(`%${B}%`)}];K={...K,where:G.where?[...H.map((N)=>({...G.where,...N}))]:H}}let Y=await v.find(K),Q=G.where;if(B){let H=[{name:w(`%${B}%`)},{description:w(`%${B}%`)}];Q=G.where?[...H.map((N)=>({...G.where,...N}))]:H}let T=await this.count(Q),Z=Math.ceil(T/A);return{resources:Y,total:T,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}f=U([d.repository(),V(0,m("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],f);import{inject as y}from"@ooneex/container";import{decorator as c}from"@ooneex/repository";import{ILike as $}from"typeorm";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(L)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:B,...G}=x,J,M=A===0?100:A;if(z&&z>0&&A&&A>0)J=(z-1)*M;let K={...G,take:M,...J!==void 0&&{skip:J}};if(B){let H=[{name:$(`%${B}%`)},{description:$(`%${B}%`)},{barcode:$(`%${B}%`)}];K={...K,where:G.where?[...H.map((N)=>({...G.where,...N}))]:H}}let Y=await v.find(K),Q=G.where;if(B){let H=[{name:$(`%${B}%`)},{description:$(`%${B}%`)},{barcode:$(`%${B}%`)}];Q=G.where?[...H.map((N)=>({...G.where,...N}))]:H}let T=await this.count(Q),Z=Math.ceil(T/A);return{resources:Y,total:T,totalPages:Z,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=U([c.repository(),V(0,y("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as p}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";class b{database;constructor(x){this.database=x}async open(){return await this.database.open(h)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,...B}=x,G,J=A===0?100:A;if(z&&z>0&&A&&A>0)G=(z-1)*J;let M=await v.find({...B,take:J,...G!==void 0&&{skip:G}}),K=await this.count(B.where),Y=Math.ceil(K/A);return{resources:M,total:K,totalPages:Y,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}b=U([a.repository(),V(0,p("database")),X("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],b);export{b as PaymentSubscriptionRepository,W as PaymentProductRepository,f as PaymentPlanRepository,j as PaymentFeatureRepository,F as PaymentDiscountRepository,D as PaymentCreditRepository};
3
3
 
4
- //# debugId=57EC0C587083B55564756E2164756E21
4
+ //# debugId=183B18ED0A1F51B164756E2164756E21
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["src/repositories/payment/PaymentCouponRepository.ts", "src/repositories/payment/PaymentCreditRepository.ts", "src/repositories/payment/PaymentFeatureRepository.ts", "src/repositories/payment/PaymentPlanRepository.ts", "src/repositories/payment/PaymentProductRepository.ts", "src/repositories/payment/PaymentSubscriptionRepository.ts"],
3
+ "sources": ["src/repositories/payment/PaymentCreditRepository.ts", "src/repositories/payment/PaymentDiscountRepository.ts", "src/repositories/payment/PaymentFeatureRepository.ts", "src/repositories/payment/PaymentPlanRepository.ts", "src/repositories/payment/PaymentProductRepository.ts", "src/repositories/payment/PaymentSubscriptionRepository.ts"],
4
4
  "sourcesContent": [
5
- "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentCouponEntity } from \"../../entities/payment/PaymentCouponEntity\";\n\n@decorator.repository()\nexport class PaymentCouponRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentCouponEntity>> {\n return await this.database.open(PaymentCouponEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentCouponEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentCouponEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply coupon search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [{ code: ILike(`%${q}%`) }, { name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [{ code: ILike(`%${q}%`) }, { name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentCouponEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentCouponEntity>): Promise<PaymentCouponEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentCouponEntity, options?: SaveOptions): Promise<PaymentCouponEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentCouponEntity[], options?: SaveOptions): Promise<PaymentCouponEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentCouponEntity, options?: SaveOptions): Promise<PaymentCouponEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentCouponEntity[], options?: SaveOptions): Promise<PaymentCouponEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentCouponEntity> | FindOptionsWhere<PaymentCouponEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentCouponEntity> | FindOptionsWhere<PaymentCouponEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
6
5
  "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentCreditEntity } from \"../../entities/payment/PaymentCreditEntity\";\n\n@decorator.repository()\nexport class PaymentCreditRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentCreditEntity>> {\n return await this.database.open(PaymentCreditEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentCreditEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentCreditEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply credit description search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n description: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including description search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n description: ILike(`%${q}%`),\n };\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentCreditEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentCreditEntity>): Promise<PaymentCreditEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentCreditEntity, options?: SaveOptions): Promise<PaymentCreditEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentCreditEntity[], options?: SaveOptions): Promise<PaymentCreditEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentCreditEntity, options?: SaveOptions): Promise<PaymentCreditEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentCreditEntity[], options?: SaveOptions): Promise<PaymentCreditEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentCreditEntity> | FindOptionsWhere<PaymentCreditEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentCreditEntity> | FindOptionsWhere<PaymentCreditEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
6
+ "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentDiscountEntity } from \"../../entities/payment/PaymentDiscountEntity\";\n\n@decorator.repository()\nexport class PaymentDiscountRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentDiscountEntity>> {\n return await this.database.open(PaymentDiscountEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentDiscountEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentDiscountEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply discount search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [{ code: ILike(`%${q}%`) }, { name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [{ code: ILike(`%${q}%`) }, { name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentDiscountEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentDiscountEntity>): Promise<PaymentDiscountEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentDiscountEntity, options?: SaveOptions): Promise<PaymentDiscountEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentDiscountEntity[], options?: SaveOptions): Promise<PaymentDiscountEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentDiscountEntity, options?: SaveOptions): Promise<PaymentDiscountEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentDiscountEntity[], options?: SaveOptions): Promise<PaymentDiscountEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentDiscountEntity> | FindOptionsWhere<PaymentDiscountEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentDiscountEntity> | FindOptionsWhere<PaymentDiscountEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
7
7
  "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentFeatureEntity } from \"../../entities/payment/PaymentFeatureEntity\";\n\n@decorator.repository()\nexport class PaymentFeatureRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentFeatureEntity>> {\n return await this.database.open(PaymentFeatureEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentFeatureEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentFeatureEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply feature search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentFeatureEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentFeatureEntity>): Promise<PaymentFeatureEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentFeatureEntity, options?: SaveOptions): Promise<PaymentFeatureEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentFeatureEntity[], options?: SaveOptions): Promise<PaymentFeatureEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentFeatureEntity, options?: SaveOptions): Promise<PaymentFeatureEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentFeatureEntity[], options?: SaveOptions): Promise<PaymentFeatureEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentFeatureEntity> | FindOptionsWhere<PaymentFeatureEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentFeatureEntity> | FindOptionsWhere<PaymentFeatureEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
8
8
  "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentPlanEntity } from \"../../entities/payment/PaymentPlanEntity\";\n\n@decorator.repository()\nexport class PaymentPlanRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentPlanEntity>> {\n return await this.database.open(PaymentPlanEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentPlanEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentPlanEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply plan search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [{ name: ILike(`%${q}%`) }, { description: ILike(`%${q}%`) }];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentPlanEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentPlanEntity>): Promise<PaymentPlanEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentPlanEntity, options?: SaveOptions): Promise<PaymentPlanEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentPlanEntity[], options?: SaveOptions): Promise<PaymentPlanEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentPlanEntity, options?: SaveOptions): Promise<PaymentPlanEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentPlanEntity[], options?: SaveOptions): Promise<PaymentPlanEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentPlanEntity> | FindOptionsWhere<PaymentPlanEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentPlanEntity> | FindOptionsWhere<PaymentPlanEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
9
9
  "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { PaymentProductEntity } from \"../../entities/payment/PaymentProductEntity\";\n\n@decorator.repository()\nexport class PaymentProductRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentProductEntity>> {\n return await this.database.open(PaymentProductEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentProductEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<PaymentProductEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply product search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n const searchConditions = [\n { name: ILike(`%${q}%`) },\n { description: ILike(`%${q}%`) },\n { barcode: ILike(`%${q}%`) },\n ];\n\n findOptions = {\n ...findOptions,\n where: rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions,\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including search\n let countWhere = rest.where;\n if (q) {\n const searchConditions = [\n { name: ILike(`%${q}%`) },\n { description: ILike(`%${q}%`) },\n { barcode: ILike(`%${q}%`) },\n ];\n\n countWhere = rest.where\n ? [...searchConditions.map((condition) => ({ ...rest.where, ...condition }))]\n : searchConditions;\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentProductEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<PaymentProductEntity>): Promise<PaymentProductEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentProductEntity, options?: SaveOptions): Promise<PaymentProductEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: PaymentProductEntity[], options?: SaveOptions): Promise<PaymentProductEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentProductEntity, options?: SaveOptions): Promise<PaymentProductEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: PaymentProductEntity[], options?: SaveOptions): Promise<PaymentProductEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentProductEntity> | FindOptionsWhere<PaymentProductEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentProductEntity> | FindOptionsWhere<PaymentProductEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n",
10
10
  "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { PaymentSubscriptionEntity } from \"../../entities/payment/PaymentSubscriptionEntity\";\n\n@decorator.repository()\nexport class PaymentSubscriptionRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<PaymentSubscriptionEntity>> {\n return await this.database.open(PaymentSubscriptionEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<PaymentSubscriptionEntity> & { page?: number; limit?: number },\n ): Promise<FilterResultType<PaymentSubscriptionEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n const result = await repository.find({ ...rest, take, ...(skip !== undefined && { skip }) });\n\n const total = await this.count(rest.where);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<PaymentSubscriptionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(\n criteria: FindOptionsWhere<PaymentSubscriptionEntity>,\n ): Promise<PaymentSubscriptionEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async create(entity: PaymentSubscriptionEntity, options?: SaveOptions): Promise<PaymentSubscriptionEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(\n entities: PaymentSubscriptionEntity[],\n options?: SaveOptions,\n ): Promise<PaymentSubscriptionEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: PaymentSubscriptionEntity, options?: SaveOptions): Promise<PaymentSubscriptionEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(\n entities: PaymentSubscriptionEntity[],\n options?: SaveOptions,\n ): Promise<PaymentSubscriptionEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<PaymentSubscriptionEntity> | FindOptionsWhere<PaymentSubscriptionEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(\n criteria?: FindOptionsWhere<PaymentSubscriptionEntity> | FindOptionsWhere<PaymentSubscriptionEntity>[],\n ): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
11
11
  ],
12
- "mappings": ";sUAAA,yBAAS,kCAET,4BAAS,mCAGT,wBAAS,wBAIF,MAAM,CAAwB,CAGhB,SAFnB,WAAW,CAEQ,EACjB,CADiB,qBAGN,KAAI,EAA6C,CAC5D,OAAO,MAAM,KAAK,SAAS,KAAK,CAAmB,OAGxC,MAAK,EAAkB,CAClC,MAAM,KAAK,SAAS,MAAM,OAGf,KAAI,CACf,EACgD,CAChD,IAAM,EAAa,MAA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Ga,EAAN,GADN,EAAU,WAAW,EAGjB,MAAO,UAAU,GAFf,wFAAM",
13
+ "debugId": "183B18ED0A1F51B164756E2164756E21",
14
14
  "names": []
15
15
  }
@@ -245,6 +245,7 @@ import { IAccount as IAccount2, ISession as ISession2, IUser as IUser7, IVerific
245
245
  declare class UserEntity extends BaseEntity implements IUser7 {
246
246
  email: string;
247
247
  roles: ERole[];
248
+ key?: string;
248
249
  name?: string;
249
250
  lastName?: string;
250
251
  firstName?: string;
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Aa as d,ra as y,sa as I,ta as g,ua as m,va as q,wa as U,xa as u,ya as k,za as l}from"../../../shared/chunk-kw4t1san.js";import"../../../shared/chunk-p22keb3y.js";import"../../../shared/chunk-6jnj2pfx.js";import"../../../shared/chunk-x2d798hg.js";import"../../../shared/chunk-xrqhqgen.js";import{Ha as Y,Ia as Z,Ja as _}from"../../../shared/chunk-59vwmfpm.js";import{inject as p}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";import{ILike as j}from"typeorm";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(I)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{provider:j(`%${H}%`)},{providerAccountId:j(`%${H}%`)},{email:j(`%${H}%`)},{name:j(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{provider:j(`%${H}%`)},{providerAccountId:j(`%${H}%`)},{email:j(`%${H}%`)},{name:j(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=Y([a.repository(),Z(0,p("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as n}from"@ooneex/container";import{decorator as s}from"@ooneex/repository";import{ILike as T,LessThan as r}from"typeorm";class V{database;constructor(x){this.database=x}async open(){return await this.database.open(g)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{deviceName:T(`%${H}%`)},{deviceType:T(`%${H}%`)},{browser:T(`%${H}%`)},{operatingSystem:T(`%${H}%`)},{location:T(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{deviceName:T(`%${H}%`)},{deviceType:T(`%${H}%`)},{browser:T(`%${H}%`)},{operatingSystem:T(`%${H}%`)},{location:T(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async findByToken(x){return await(await this.open()).findOne({where:{token:x}})}async findByRefreshToken(x){return await(await this.open()).findOne({where:{refreshToken:x}})}async findActiveSessions(x){return await(await this.open()).find({where:{user:{id:x},isActive:!0},order:{lastAccessAt:"DESC"}})}async findExpiredSessions(){return await(await this.open()).find({where:{expiresAt:r(new Date),isActive:!0}})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async revokeSession(x,v){let G=await this.open(),z={isActive:!1,revokedAt:new Date};if(v!==void 0)z.revokedReason=v;return await G.update(x,z)}async revokeAllUserSessions(x,v){let G=await this.open(),z={isActive:!1,revokedAt:new Date};if(v!==void 0)z.revokedReason=v;return await G.update({user:{id:x},isActive:!0},z)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}V=Y([s.repository(),Z(0,n("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],V);import{inject as o}from"@ooneex/container";import{decorator as e}from"@ooneex/repository";class S{database;constructor(x){this.database=x}async open(){return await this.database.open(m)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}S=Y([e.repository(),Z(0,o("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],S);import{inject as t}from"@ooneex/container";import{decorator as i}from"@ooneex/repository";class O{database;constructor(x){this.database=x}async open(){return await this.database.open(q)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}O=Y([i.repository(),Z(0,t("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],O);import{inject as xx}from"@ooneex/container";import{decorator as vx}from"@ooneex/repository";import{EProfileUpdateStatus as L}from"@ooneex/user";import{ILike as P}from"typeorm";class C{database;constructor(x){this.database=x}async open(){return await this.database.open(u)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{updateReason:P(`%${H}%`)},{description:P(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{updateReason:P(`%${H}%`)},{description:P(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async markAsCompleted(x){return await(await this.open()).update(x,{status:L.COMPLETED,appliedAt:new Date})}async markAsFailed(x,v){let G=await this.open(),z={status:L.FAILED};if(v!==void 0)z.description=v;return await G.update(x,z)}async markAsReverted(x,v){let G=await this.open(),z={status:L.REVERTED};if(v!==void 0)z.description=v;return await G.update(x,z)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}C=Y([vx.repository(),Z(0,xx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],C);import{inject as zx}from"@ooneex/container";import{decorator as Gx}from"@ooneex/repository";class w{database;constructor(x){this.database=x}async open(){return await this.database.open(k)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}w=Y([Gx.repository(),Z(0,zx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],w);import{inject as Hx}from"@ooneex/container";import{decorator as Jx}from"@ooneex/repository";import{ILike as A}from"typeorm";class f{database;constructor(x){this.database=x}async open(){return await this.database.open(y)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{email:A(`%${H}%`)},{name:A(`%${H}%`)},{firstName:A(`%${H}%`)},{lastName:A(`%${H}%`)},{username:A(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{email:A(`%${H}%`)},{name:A(`%${H}%`)},{firstName:A(`%${H}%`)},{lastName:A(`%${H}%`)},{username:A(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}f=Y([Jx.repository(),Z(0,Hx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],f);import{inject as Kx}from"@ooneex/container";import{decorator as Nx}from"@ooneex/repository";class E{database;constructor(x){this.database=x}async open(){return await this.database.open(l)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}E=Y([Nx.repository(),Z(0,Kx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],E);import{inject as Qx}from"@ooneex/container";import{decorator as Xx}from"@ooneex/repository";class R{database;constructor(x){this.database=x}async open(){return await this.database.open(d)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}R=Y([Xx.repository(),Z(0,Qx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],R);import{inject as Yx}from"@ooneex/container";import{decorator as Zx}from"@ooneex/repository";import{ILike as D,MoreThan as c}from"typeorm";class h{database;constructor(x){this.database=x}async open(){return await this.database.open(U)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{email:D(`%${H}%`)},{phone:D(`%${H}%`)},{token:D(`%${H}%`)},{code:D(`%${H}%`)},{description:D(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{email:D(`%${H}%`)},{phone:D(`%${H}%`)},{token:D(`%${H}%`)},{code:D(`%${H}%`)},{description:D(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async findByToken(x){return await(await this.open()).findOne({where:{token:x,isUsed:!1,expiresAt:c(new Date)}})}async findByCode(x){return await(await this.open()).findOne({where:{code:x,isUsed:!1,expiresAt:c(new Date)}})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async markAsUsed(x){return await(await this.open()).update(x,{isUsed:!0,usedAt:new Date})}async incrementAttempts(x){return await(await this.open()).createQueryBuilder().update(U).set({attemptsCount:()=>"attempts_count + 1"}).where("id = :id",{id:x}).execute()}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}h=Y([Zx.repository(),Z(0,Yx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],h);export{h as VerificationRepository,R as UserViewedRepository,E as UserStatRepository,f as UserRepository,w as UserReportRepository,C as UserProfileUpdateRepository,O as UserFollowedRepository,S as UserBlockedRepository,V as SessionRepository,W as AccountRepository};
2
+ import{Aa as d,ra as y,sa as I,ta as g,ua as m,va as q,wa as U,xa as u,ya as k,za as l}from"../../../shared/chunk-gb0y6wm0.js";import"../../../shared/chunk-p22keb3y.js";import"../../../shared/chunk-6jnj2pfx.js";import"../../../shared/chunk-x2d798hg.js";import"../../../shared/chunk-xrqhqgen.js";import{Ha as Y,Ia as Z,Ja as _}from"../../../shared/chunk-59vwmfpm.js";import{inject as p}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";import{ILike as j}from"typeorm";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(I)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{provider:j(`%${H}%`)},{providerAccountId:j(`%${H}%`)},{email:j(`%${H}%`)},{name:j(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{provider:j(`%${H}%`)},{providerAccountId:j(`%${H}%`)},{email:j(`%${H}%`)},{name:j(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=Y([a.repository(),Z(0,p("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as n}from"@ooneex/container";import{decorator as s}from"@ooneex/repository";import{ILike as T,LessThan as r}from"typeorm";class V{database;constructor(x){this.database=x}async open(){return await this.database.open(g)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{deviceName:T(`%${H}%`)},{deviceType:T(`%${H}%`)},{browser:T(`%${H}%`)},{operatingSystem:T(`%${H}%`)},{location:T(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{deviceName:T(`%${H}%`)},{deviceType:T(`%${H}%`)},{browser:T(`%${H}%`)},{operatingSystem:T(`%${H}%`)},{location:T(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async findByToken(x){return await(await this.open()).findOne({where:{token:x}})}async findByRefreshToken(x){return await(await this.open()).findOne({where:{refreshToken:x}})}async findActiveSessions(x){return await(await this.open()).find({where:{user:{id:x},isActive:!0},order:{lastAccessAt:"DESC"}})}async findExpiredSessions(){return await(await this.open()).find({where:{expiresAt:r(new Date),isActive:!0}})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async revokeSession(x,v){let G=await this.open(),z={isActive:!1,revokedAt:new Date};if(v!==void 0)z.revokedReason=v;return await G.update(x,z)}async revokeAllUserSessions(x,v){let G=await this.open(),z={isActive:!1,revokedAt:new Date};if(v!==void 0)z.revokedReason=v;return await G.update({user:{id:x},isActive:!0},z)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}V=Y([s.repository(),Z(0,n("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],V);import{inject as o}from"@ooneex/container";import{decorator as e}from"@ooneex/repository";class S{database;constructor(x){this.database=x}async open(){return await this.database.open(m)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}S=Y([e.repository(),Z(0,o("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],S);import{inject as t}from"@ooneex/container";import{decorator as i}from"@ooneex/repository";class O{database;constructor(x){this.database=x}async open(){return await this.database.open(q)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}O=Y([i.repository(),Z(0,t("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],O);import{inject as xx}from"@ooneex/container";import{decorator as vx}from"@ooneex/repository";import{EProfileUpdateStatus as L}from"@ooneex/user";import{ILike as P}from"typeorm";class C{database;constructor(x){this.database=x}async open(){return await this.database.open(u)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{updateReason:P(`%${H}%`)},{description:P(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{updateReason:P(`%${H}%`)},{description:P(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async markAsCompleted(x){return await(await this.open()).update(x,{status:L.COMPLETED,appliedAt:new Date})}async markAsFailed(x,v){let G=await this.open(),z={status:L.FAILED};if(v!==void 0)z.description=v;return await G.update(x,z)}async markAsReverted(x,v){let G=await this.open(),z={status:L.REVERTED};if(v!==void 0)z.description=v;return await G.update(x,z)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}C=Y([vx.repository(),Z(0,xx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],C);import{inject as zx}from"@ooneex/container";import{decorator as Gx}from"@ooneex/repository";class w{database;constructor(x){this.database=x}async open(){return await this.database.open(k)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}w=Y([Gx.repository(),Z(0,zx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],w);import{inject as Hx}from"@ooneex/container";import{decorator as Jx}from"@ooneex/repository";import{ILike as A}from"typeorm";class f{database;constructor(x){this.database=x}async open(){return await this.database.open(y)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{email:A(`%${H}%`)},{name:A(`%${H}%`)},{firstName:A(`%${H}%`)},{lastName:A(`%${H}%`)},{username:A(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{email:A(`%${H}%`)},{name:A(`%${H}%`)},{firstName:A(`%${H}%`)},{lastName:A(`%${H}%`)},{username:A(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}f=Y([Jx.repository(),Z(0,Hx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],f);import{inject as Kx}from"@ooneex/container";import{decorator as Nx}from"@ooneex/repository";class E{database;constructor(x){this.database=x}async open(){return await this.database.open(l)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}E=Y([Nx.repository(),Z(0,Kx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],E);import{inject as Qx}from"@ooneex/container";import{decorator as Xx}from"@ooneex/repository";class R{database;constructor(x){this.database=x}async open(){return await this.database.open(d)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,...H}=x,J,K=z===0?100:z;if(G&&G>0&&z&&z>0)J=(G-1)*K;let X=await v.find({...H,take:K,...J!==void 0&&{skip:J}}),N=await this.count(H.where),$=Math.ceil(N/z);return{resources:X,total:N,totalPages:$,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}R=Y([Xx.repository(),Z(0,Qx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],R);import{inject as Yx}from"@ooneex/container";import{decorator as Zx}from"@ooneex/repository";import{ILike as D,MoreThan as c}from"typeorm";class h{database;constructor(x){this.database=x}async open(){return await this.database.open(U)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:G=1,limit:z=100,q:H,...J}=x,K,X=z===0?100:z;if(G&&G>0&&z&&z>0)K=(G-1)*X;let N={...J,take:X,...K!==void 0&&{skip:K}};if(H){let Q=[{email:D(`%${H}%`)},{phone:D(`%${H}%`)},{token:D(`%${H}%`)},{code:D(`%${H}%`)},{description:D(`%${H}%`)}];N={...N,where:J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}}let $=await v.find(N),B=J.where;if(H){let Q=[{email:D(`%${H}%`)},{phone:D(`%${H}%`)},{token:D(`%${H}%`)},{code:D(`%${H}%`)},{description:D(`%${H}%`)}];B=J.where?[...Q.map((M)=>({...J.where,...M}))]:Q}let F=await this.count(B),b=Math.ceil(F/z);return{resources:$,total:F,totalPages:b,page:G,limit:z}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async findByToken(x){return await(await this.open()).findOne({where:{token:x,isUsed:!1,expiresAt:c(new Date)}})}async findByCode(x){return await(await this.open()).findOne({where:{code:x,isUsed:!1,expiresAt:c(new Date)}})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async markAsUsed(x){return await(await this.open()).update(x,{isUsed:!0,usedAt:new Date})}async incrementAttempts(x){return await(await this.open()).createQueryBuilder().update(U).set({attemptsCount:()=>"attempts_count + 1"}).where("id = :id",{id:x}).execute()}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}h=Y([Zx.repository(),Z(0,Yx("database")),_("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],h);export{h as VerificationRepository,R as UserViewedRepository,E as UserStatRepository,f as UserRepository,w as UserReportRepository,C as UserProfileUpdateRepository,O as UserFollowedRepository,S as UserBlockedRepository,V as SessionRepository,W as AccountRepository};
3
3
 
4
4
  //# debugId=7571045582C886C264756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ooneex/typeorm",
3
3
  "description": "Pre-built TypeORM entities, migrations, and repositories for common domain models",
4
- "version": "0.16.0",
4
+ "version": "0.16.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -247,28 +247,28 @@
247
247
  "npm:publish": "bun publish --tolerate-republish --access public"
248
248
  },
249
249
  "dependencies": {
250
- "@ooneex/book": "0.0.16",
251
- "@ooneex/category": "0.0.16",
252
- "@ooneex/color": "0.0.16",
253
- "@ooneex/container": "0.0.17",
254
- "@ooneex/country": "0.0.16",
255
- "@ooneex/currencies": "0.0.16",
256
- "@ooneex/database": "0.0.16",
257
- "@ooneex/education": "0.0.16",
258
- "@ooneex/folder": "0.0.16",
259
- "@ooneex/gamification": "0.0.16",
260
- "@ooneex/image": "0.0.16",
261
- "@ooneex/payment": "0.0.16",
262
- "@ooneex/repository": "0.0.16",
263
- "@ooneex/role": "0.0.16",
264
- "@ooneex/status": "0.0.16",
265
- "@ooneex/tag": "0.0.16",
266
- "@ooneex/translation": "0.0.16",
267
- "@ooneex/types": "0.0.16",
268
- "@ooneex/user": "0.0.16",
250
+ "@ooneex/book": "0.0.17",
251
+ "@ooneex/category": "0.0.17",
252
+ "@ooneex/color": "0.0.17",
253
+ "@ooneex/container": "0.0.18",
254
+ "@ooneex/country": "0.0.17",
255
+ "@ooneex/currencies": "0.0.17",
256
+ "@ooneex/database": "0.0.17",
257
+ "@ooneex/education": "0.0.17",
258
+ "@ooneex/folder": "0.0.17",
259
+ "@ooneex/gamification": "0.0.17",
260
+ "@ooneex/image": "0.0.17",
261
+ "@ooneex/payment": "0.0.17",
262
+ "@ooneex/repository": "0.0.17",
263
+ "@ooneex/role": "0.0.17",
264
+ "@ooneex/status": "0.0.17",
265
+ "@ooneex/tag": "0.0.17",
266
+ "@ooneex/translation": "0.0.17",
267
+ "@ooneex/types": "0.0.17",
268
+ "@ooneex/user": "0.0.17",
269
269
  "@ooneex/utils": "0.1.0",
270
- "@ooneex/video": "0.0.16",
271
- "@ooneex/migrations": "0.15.0",
270
+ "@ooneex/video": "0.0.17",
271
+ "@ooneex/migrations": "0.16.0",
272
272
  "typeorm": "^0.3.27"
273
273
  },
274
274
  "keywords": [
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{qa as x}from"./chunk-xwe8m6av.js";import{Ba as v}from"./chunk-p22keb3y.js";import{Ca as I}from"./chunk-6jnj2pfx.js";import{Ga as a}from"./chunk-xrqhqgen.js";import{Ha as e,Ja as n}from"./chunk-59vwmfpm.js";import{Column as s,Entity as J}from"typeorm";class i extends a{}e([s({name:"name",type:"varchar",length:255}),n("design:type",String)],i.prototype,"name",void 0),e([s({name:"description",type:"text",nullable:!0}),n("design:type",String)],i.prototype,"description",void 0),e([s({name:"is_enabled",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],i.prototype,"isEnabled",void 0),e([s({name:"limit",type:"int",nullable:!0}),n("design:type",Number)],i.prototype,"limit",void 0),i=e([J({name:"payment_features"})],i);import{ESubscriptionPeriod as g}from"@ooneex/payment";import{Column as r,Entity as j,JoinTable as A,ManyToMany as M}from"typeorm";class m extends a{}e([r({name:"name",type:"varchar",length:255}),n("design:type",String)],m.prototype,"name",void 0),e([r({name:"description",type:"text",nullable:!0}),n("design:type",String)],m.prototype,"description",void 0),e([r({name:"currency",type:"varchar",length:3}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],m.prototype,"currency",void 0),e([r({name:"price",type:"decimal",precision:10,scale:2}),n("design:type",Number)],m.prototype,"price",void 0),e([r({name:"period",type:"enum",enum:g}),n("design:type",typeof g==="undefined"?Object:g)],m.prototype,"period",void 0),e([r({name:"period_count",type:"int",default:1,nullable:!0}),n("design:type",Number)],m.prototype,"periodCount",void 0),e([M(()=>i,{nullable:!0,eager:!1,cascade:["insert","update"]}),A({name:"payment_plans_features",joinColumn:{name:"plan_id",referencedColumnName:"id"},inverseJoinColumn:{name:"feature_id",referencedColumnName:"id"}}),n("design:type",Array)],m.prototype,"features",void 0),e([r({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],m.prototype,"isActive",void 0),e([r({name:"trial_days",type:"int",default:0,nullable:!0}),n("design:type",Number)],m.prototype,"trialDays",void 0),m=e([j({name:"payment_plans"})],m);import{Column as o,Entity as B,JoinTable as y,ManyToMany as f}from"typeorm";class l extends a{}e([o({name:"name",type:"varchar",length:255}),n("design:type",String)],l.prototype,"name",void 0),e([o({name:"description",type:"text",nullable:!0}),n("design:type",String)],l.prototype,"description",void 0),e([f(()=>x,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_categories",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"category_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"categories",void 0),e([o({name:"currency",type:"varchar",length:3}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],l.prototype,"currency",void 0),e([o({name:"price",type:"decimal",precision:10,scale:2}),n("design:type",Number)],l.prototype,"price",void 0),e([o({name:"barcode",type:"varchar",length:255,nullable:!0}),n("design:type",String)],l.prototype,"barcode",void 0),e([f(()=>v,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_images",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"image_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"images",void 0),e([o({name:"attributes",type:"jsonb",nullable:!0}),n("design:type",typeof Record==="undefined"?Object:Record)],l.prototype,"attributes",void 0),e([f(()=>I,{nullable:!0,eager:!1,cascade:["insert","update"]}),y({name:"payment_products_tags",joinColumn:{name:"product_id",referencedColumnName:"id"},inverseJoinColumn:{name:"tag_id",referencedColumnName:"id"}}),n("design:type",Array)],l.prototype,"tags",void 0),l=e([B({name:"payment_products"})],l);import{EDiscountType as T}from"@ooneex/payment";import{Column as t,Entity as D,JoinTable as h,ManyToMany as N}from"typeorm";class u extends a{}e([t({name:"code",type:"varchar",length:50,unique:!0}),n("design:type",String)],u.prototype,"code",void 0),e([t({name:"name",type:"varchar",length:255,nullable:!0}),n("design:type",String)],u.prototype,"name",void 0),e([t({name:"description",type:"text",nullable:!0}),n("design:type",String)],u.prototype,"description",void 0),e([t({name:"discount_type",type:"enum",enum:T}),n("design:type",typeof T==="undefined"?Object:T)],u.prototype,"discountType",void 0),e([t({name:"discount_value",type:"decimal",precision:10,scale:2}),n("design:type",Number)],u.prototype,"discountValue",void 0),e([t({name:"currency",type:"varchar",length:3,nullable:!0}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],u.prototype,"currency",void 0),e([t({name:"max_uses",type:"int",nullable:!0}),n("design:type",Number)],u.prototype,"maxUses",void 0),e([t({name:"used_count",type:"int",default:0,nullable:!0}),n("design:type",Number)],u.prototype,"usedCount",void 0),e([t({name:"start_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],u.prototype,"startAt",void 0),e([t({name:"end_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],u.prototype,"endAt",void 0),e([t({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],u.prototype,"isActive",void 0),e([t({name:"minimum_amount",type:"decimal",precision:10,scale:2,nullable:!0}),n("design:type",Number)],u.prototype,"minimumAmount",void 0),e([N(()=>l,{nullable:!0,eager:!1,cascade:["insert","update"]}),h({name:"payment_coupons_applicable_products",joinColumn:{name:"coupon_id",referencedColumnName:"id"},inverseJoinColumn:{name:"product_id",referencedColumnName:"id"}}),n("design:type",Array)],u.prototype,"applicableProducts",void 0),e([N(()=>m,{nullable:!0,eager:!1,cascade:["insert","update"]}),h({name:"payment_coupons_applicable_plans",joinColumn:{name:"coupon_id",referencedColumnName:"id"},inverseJoinColumn:{name:"plan_id",referencedColumnName:"id"}}),n("design:type",Array)],u.prototype,"applicablePlans",void 0),u=e([D({name:"payment_coupons"})],u);import{Column as c,Entity as z}from"typeorm";class p extends a{}e([c({name:"balance",type:"decimal",precision:10,scale:2}),n("design:type",Number)],p.prototype,"balance",void 0),e([c({name:"currency",type:"varchar",length:3,nullable:!0}),n("design:type",typeof CurrencyCodeType==="undefined"?Object:CurrencyCodeType)],p.prototype,"currency",void 0),e([c({name:"expires_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],p.prototype,"expiresAt",void 0),e([c({name:"description",type:"text",nullable:!0}),n("design:type",String)],p.prototype,"description",void 0),p=e([z({name:"payment_credits"})],p);import{Column as d,Entity as E,JoinTable as b,ManyToMany as C}from"typeorm";class _ extends a{}e([C(()=>u,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_coupons",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"coupon_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"coupons",void 0),e([C(()=>m,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_plans",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"plan_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"plans",void 0),e([C(()=>p,{nullable:!0,eager:!1,cascade:["insert","update"]}),b({name:"payment_subscriptions_credits",joinColumn:{name:"subscription_id",referencedColumnName:"id"},inverseJoinColumn:{name:"credit_id",referencedColumnName:"id"}}),n("design:type",Array)],_.prototype,"credits",void 0),e([d({name:"start_at",type:"timestamptz"}),n("design:type",typeof Date==="undefined"?Object:Date)],_.prototype,"startAt",void 0),e([d({name:"end_at",type:"timestamptz",nullable:!0}),n("design:type",typeof Date==="undefined"?Object:Date)],_.prototype,"endAt",void 0),e([d({name:"is_trial",type:"boolean",default:!1,nullable:!0}),n("design:type",Boolean)],_.prototype,"isTrial",void 0),e([d({name:"is_active",type:"boolean",default:!0,nullable:!0}),n("design:type",Boolean)],_.prototype,"isActive",void 0),_=e([E({name:"payment_subscriptions"})],_);
3
- export{i as _,m as $,l as aa,u as ba,p as ca,_ as da};
4
-
5
- //# debugId=1671746A056BBCAB64756E2164756E21