@opfr/services 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/index.es.js +841 -733
  2. package/dist/index.umd.js +1 -1
  3. package/dist/services/AbstractCachedService.d.ts +1 -1
  4. package/dist/services/AbstractCachedService.d.ts.map +1 -1
  5. package/dist/services/ban/definition/model.d.ts +1 -1
  6. package/dist/services/ban/definition/model.d.ts.map +1 -1
  7. package/dist/services/ban/definition/schema.d.ts +1 -1
  8. package/dist/services/ban/definition/schema.d.ts.map +1 -1
  9. package/dist/services/ban/helper.d.ts +2 -2
  10. package/dist/services/ban/helper.d.ts.map +1 -1
  11. package/dist/services/ban/index.d.ts +1 -1
  12. package/dist/services/ban/index.d.ts.map +1 -1
  13. package/dist/services/ban/process/create.d.ts +1 -1
  14. package/dist/services/ban/process/create.d.ts.map +1 -1
  15. package/dist/services/ban/process/findMany.d.ts +1 -1
  16. package/dist/services/ban/process/findMany.d.ts.map +1 -1
  17. package/dist/services/ban/process/findOne.d.ts +1 -1
  18. package/dist/services/ban/process/findOne.d.ts.map +1 -1
  19. package/dist/services/ban/process/updateOne.d.ts +5 -0
  20. package/dist/services/ban/process/updateOne.d.ts.map +1 -0
  21. package/dist/services/ban/service.d.ts +3 -3
  22. package/dist/services/ban/service.d.ts.map +1 -1
  23. package/dist/services/ban/{type.d.ts → types.d.ts} +1 -1
  24. package/dist/services/ban/types.d.ts.map +1 -0
  25. package/dist/services/entities/helper.d.ts +0 -2
  26. package/dist/services/entities/helper.d.ts.map +1 -1
  27. package/dist/services/entities/process/updateOne.d.ts +3 -2
  28. package/dist/services/entities/process/updateOne.d.ts.map +1 -1
  29. package/dist/services/entities/service.d.ts +2 -1
  30. package/dist/services/entities/service.d.ts.map +1 -1
  31. package/dist/services/index.d.ts +1 -0
  32. package/dist/services/index.d.ts.map +1 -1
  33. package/dist/services/invitations/process/updateOne.d.ts +5 -0
  34. package/dist/services/invitations/process/updateOne.d.ts.map +1 -0
  35. package/dist/services/invitations/service.d.ts +3 -3
  36. package/dist/services/invitations/service.d.ts.map +1 -1
  37. package/dist/services/ornaments/process/updateOne.d.ts +3 -2
  38. package/dist/services/ornaments/process/updateOne.d.ts.map +1 -1
  39. package/dist/services/ornaments/service.d.ts +1 -1
  40. package/dist/services/ornaments/service.d.ts.map +1 -1
  41. package/dist/services/panoplies/process/updateOne.d.ts +2 -1
  42. package/dist/services/panoplies/process/updateOne.d.ts.map +1 -1
  43. package/dist/services/panoplies/service.d.ts +1 -1
  44. package/dist/services/panoplies/service.d.ts.map +1 -1
  45. package/dist/services/user-daily-report/index.d.ts +1 -0
  46. package/dist/services/user-daily-report/index.d.ts.map +1 -1
  47. package/package.json +10 -5
  48. package/dist/services/ban/type.d.ts.map +0 -1
@@ -1,4 +1,5 @@
1
- import type { MongooseUpdate } from '../../types';
1
+ import type { RootFilterQuery } from 'mongoose';
2
+ import type { Lean, MongooseUpdate } from '../../types';
2
3
  import type { EntityDocument } from '../types';
3
- export declare const updateEntity: (entityId: string, update: MongooseUpdate<EntityDocument>, upsert: boolean) => Promise<void>;
4
+ export declare const updateEntity: (filter: RootFilterQuery<EntityDocument>, update: MongooseUpdate<EntityDocument>) => Promise<Lean<EntityDocument> | null>;
4
5
  //# sourceMappingURL=updateOne.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/entities/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,QAAQ,cAAc,CAAC,cAAc,CAAC,EACtC,QAAQ,OAAO,kBAKhB,CAAC"}
1
+ {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/entities/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,YAAY,GACvB,QAAQ,eAAe,CAAC,cAAc,CAAC,EACvC,QAAQ,cAAc,CAAC,cAAc,CAAC,KACrC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAMrC,CAAC"}
@@ -5,7 +5,8 @@ import { EntityHelper } from './helper';
5
5
  import type { EntityDocument } from './types';
6
6
  declare class EntityService extends EntityHelper {
7
7
  constructor();
8
- protected updateInDb(filter: RootFilterQuery<EntityDocument>, data: MongooseUpdate<EntityDocument>): Promise<Lean<EntityDocument>>;
8
+ createInDb(entity: Entity): Promise<EntityDocument>;
9
+ protected updateInDb(filter: RootFilterQuery<EntityDocument>, update: MongooseUpdate<EntityDocument>): Promise<Lean<EntityDocument> | null>;
9
10
  protected fetchFromDb(id: string): Promise<(import("mongoose").FlattenMaps<EntityDocument> & Required<{
10
11
  _id: import("mongoose").Types.ObjectId;
11
12
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/services/entities/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,cAAM,aAAc,SAAQ,YAAY;;IAKtC,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,eAAe,CAAC,cAAc,C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AM;CAGzC;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
@@ -15,6 +15,7 @@ export * from './user-meta';
15
15
  export * from './user-ornament';
16
16
  export * from './user-quest';
17
17
  export * from './user-raid';
18
+ export * from './user-settings';
18
19
  export * from './user-shop';
19
20
  export * from './user-stats/casino';
20
21
  export * from './user-stats/crew';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,cAAc,OAAO,CAAC;AAEtB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAE5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAE5B,cAAc,OAAO,CAAC;AAEtB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { RootFilterQuery } from 'mongoose';
2
+ import type { Lean, MongooseUpdate } from '../../types';
3
+ import type { InvitationDocument } from '../types';
4
+ export declare const updateInvitation: (filter: RootFilterQuery<InvitationDocument>, update: MongooseUpdate<InvitationDocument>) => Promise<Lean<InvitationDocument> | null>;
5
+ //# sourceMappingURL=updateOne.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/invitations/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,eAAe,CAAC,kBAAkB,CAAC,EAC3C,QAAQ,cAAc,CAAC,kBAAkB,CAAC,KACzC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAMzC,CAAC"}
@@ -1,6 +1,6 @@
1
- import { type Types } from 'mongoose';
1
+ import { type RootFilterQuery, type Types } from 'mongoose';
2
2
  import type { GameType } from '@opfr/definitions';
3
- import type { Lean } from '../types';
3
+ import type { Lean, MongooseUpdate } from '../types';
4
4
  import { InvitationHelper } from './helper';
5
5
  import type { InvitationDocument } from './types';
6
6
  declare class InvitationService extends InvitationHelper {
@@ -20,7 +20,7 @@ declare class InvitationService extends InvitationHelper {
20
20
  senderId: Types.ObjectId;
21
21
  gameMode: GameType;
22
22
  }): Promise<Lean<InvitationDocument> | null>;
23
- protected updateInDb(): Promise<Lean<InvitationDocument> | null>;
23
+ protected updateInDb(filter: RootFilterQuery<InvitationDocument>, update: MongooseUpdate<InvitationDocument>): Promise<Lean<InvitationDocument> | null>;
24
24
  }
25
25
  export declare const invitationService: InvitationService;
26
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/services/invitations/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EA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UAAU,CAAC;AAG5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,cAAM,iBAAkB,SAAQ,gBAAgB;;IAK9C,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE;QAC1B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;QAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QACzB,QAAQ,EAAE,QAAQ,CAAC;KACpB,GAAG,MAAM;IAIV,SAAS,CAAC,MAAM,CAAC,EACf,UAAU,EACV,QAAQ,EACR,QAAQ,GACT,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG;QAC5B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;QAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QACzB,QAAQ,EAAE,QAAQ,CAAC;KACpB;IAID,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE;QAC5B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;QAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;QACzB,QAAQ,EAAE,QAAQ,CAAC;KACpB,GAAG,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;IAI5C,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,eAAe,CAAC,kBAAkB,CAAC,EAC3C,MAAM,EAAE,cAAc,CAAC,kBAAkB,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAG5C;AAED,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { UpdateQuery, UpdateWithAggregationPipeline } from 'mongoose';
1
+ import type { RootFilterQuery } from 'mongoose';
2
+ import type { Lean, MongooseUpdate } from '../../types';
2
3
  import type { OrnamentDocument } from '../types';
3
- export declare const updateOrnament: (ornamentId: string, update: UpdateQuery<OrnamentDocument> | UpdateWithAggregationPipeline, upsert: boolean) => Promise<void>;
4
+ export declare const updateOrnament: (filter: RootFilterQuery<OrnamentDocument>, update: MongooseUpdate<OrnamentDocument>) => Promise<Lean<OrnamentDocument> | null>;
4
5
  //# sourceMappingURL=updateOne.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/ornaments/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAG3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,cAAc,GACzB,YAAY,MAAM,EAClB,QAAQ,WAAW,CAAC,gBAAgB,CAAC,GAAG,6BAA6B,EACrE,QAAQ,OAAO,kBAKhB,CAAC"}
1
+ {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/ornaments/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,cAAc,GACzB,QAAQ,eAAe,CAAC,gBAAgB,CAAC,EACzC,QAAQ,cAAc,CAAC,gBAAgB,CAAC,KACvC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAMvC,CAAC"}
@@ -5,7 +5,7 @@ import { OrnamentHelper } from './helper';
5
5
  import type { OrnamentDocument } from './types';
6
6
  declare class OrnamentService extends OrnamentHelper {
7
7
  constructor();
8
- protected updateInDb(filter: RootFilterQuery<OrnamentDocument>, data: MongooseUpdate<OrnamentDocument>): Promise<Lean<OrnamentDocument>>;
8
+ protected updateInDb(filter: RootFilterQuery<OrnamentDocument>, update: MongooseUpdate<OrnamentDocument>): Promise<Lean<OrnamentDocument> | null>;
9
9
  protected fetchFromDb(id: string): Promise<(import("mongoose").FlattenMaps<OrnamentDocument> & Required<{
10
10
  _id: import("mongoose").Types.ObjectId;
11
11
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/services/ornaments/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,cAAM,eAAgB,SAAQ,cAAc;;IAK1C,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAAC,EACzC,IAAI,EAAE,cAAc,CAAC,gBAAgB,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAIlC,SAAS,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM;;;;;IAIhC,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAAC;;;;;IAInE,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAI5C,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAG5C;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/services/ornaments/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,cAAM,eAAgB,SAAQ,cAAc;;IAK1C,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAAC,EACzC,MAAM,EAAE,cAAc,CAAC,gBAAgB,CAAC,GACvC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IAIzC,SAAS,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM;;;;;IAIhC,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,gBAAgB,CAAC;;;;;IAInE,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAI5C,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAG5C;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
@@ -1,4 +1,5 @@
1
+ import type { RootFilterQuery } from 'mongoose';
1
2
  import type { Lean, MongooseUpdate } from '../../types';
2
3
  import type { PanoplyDocument } from '../types';
3
- export declare const updatePanoply: (entityId: string, update: MongooseUpdate<PanoplyDocument>, upsert: boolean) => Promise<Lean<PanoplyDocument> | null>;
4
+ export declare const updatePanoply: (filter: RootFilterQuery<PanoplyDocument>, update: MongooseUpdate<PanoplyDocument>) => Promise<Lean<PanoplyDocument> | null>;
4
5
  //# sourceMappingURL=updateOne.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/panoplies/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,aAAa,GACxB,UAAU,MAAM,EAChB,QAAQ,cAAc,CAAC,eAAe,CAAC,EACvC,QAAQ,OAAO,KACd,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAOtC,CAAC"}
1
+ {"version":3,"file":"updateOne.d.ts","sourceRoot":"","sources":["../../../../src/services/panoplies/process/updateOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,aAAa,GACxB,QAAQ,eAAe,CAAC,eAAe,CAAC,EACxC,QAAQ,cAAc,CAAC,eAAe,CAAC,KACtC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAMtC,CAAC"}
@@ -6,7 +6,7 @@ declare class PanoplyService extends PanoplyHelper {
6
6
  constructor();
7
7
  protected normalizeKey(key: string): string;
8
8
  protected getKey({ panoplyId }: Lean<PanoplyDocument>): string;
9
- protected updateInDb(filter: RootFilterQuery<PanoplyDocument>, data: MongooseUpdate<PanoplyDocument>): Promise<Lean<PanoplyDocument>>;
9
+ protected updateInDb(filter: RootFilterQuery<PanoplyDocument>, update: MongooseUpdate<PanoplyDocument>): Promise<Lean<PanoplyDocument> | null>;
10
10
  protected fetchFromDb(id: string): Promise<(import("mongoose").FlattenMaps<PanoplyDocument> & Required<{
11
11
  _id: import("mongoose").Types.ObjectId;
12
12
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/services/panoplies/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,KAAK,EAAE,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AC,EAAE,EAAE,MAAM;;;;;IAIhC,SAAS,CAAC,eAAe,CAAC,MAAM,GAAE,eAAe,CAAC,eAAe,CAAM;;;;;CAGxE;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export type * from './types';
2
+ export * from './service';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/user-daily-report/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/user-daily-report/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@opfr/services",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "description": "OPFR services",
6
6
  "author": "Matthieu VEIGA",
7
7
  "scripts": {
8
8
  "prepublish": "npm run build",
9
- "build": "vite build && tsc -p tsconfig.build.json"
9
+ "build": "vite build && tsc -p tsconfig.build.json",
10
+ "test": "vitest",
11
+ "test:ci": "vitest run",
12
+ "coverage": "vitest run --coverage"
10
13
  },
11
14
  "peerDependencies": {
12
15
  "@opfr/definitions": "^1.0.0",
@@ -16,9 +19,11 @@
16
19
  "node-cache": "^5"
17
20
  },
18
21
  "devDependencies": {
19
- "@opfr/definitions": "^1.1.1",
22
+ "@faker-js/faker": "10.1.0",
23
+ "@opfr/definitions": "^1.2.0",
20
24
  "@opfr/utils-lang": "^1.0.2",
21
25
  "@opfr/utils-type": "^1.0.1",
26
+ "mongodb-memory-server": "11.0.1",
22
27
  "mongoose": "8.20.3",
23
28
  "node-cache": "5.1.2"
24
29
  },
@@ -42,7 +47,7 @@
42
47
  "dist"
43
48
  ],
44
49
  "dependencies": {
45
- "node-cache": "5.1.2"
50
+ "node-cache": "^5"
46
51
  },
47
- "gitHead": "c20f5172a10bbfedef2b37e6af3323e2a6b6bee1"
52
+ "gitHead": "5d49d967a17c70a6b770f8693a8fa22c06f16420"
48
53
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/services/ban/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,GAAG;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,EAAE,GAAG;CAAG"}