@opfr/services 0.48.0 → 0.49.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.
@@ -0,0 +1,32 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
26
+ import type { Types } from 'mongoose';
27
+ declare const USER_META_EVENT_NAMES: readonly ["death"];
28
+ type UserMetaEvent = (typeof USER_META_EVENT_NAMES)[number];
29
+ export declare const emitUserMetaEvent: (name: UserMetaEvent, userId: Types.ObjectId) => void;
30
+ export declare const onUserMetaEvent: (callback: (eventName: UserMetaEvent, userId: Types.ObjectId) => void) => void;
31
+ export {};
32
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/services/user-meta/event.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,QAAA,MAAM,qBAAqB,oBAAqB,CAAC;AAEjD,KAAK,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5D,eAAO,MAAM,iBAAiB,SACtB,aAAa,UACX,MAAM,QAAQ,SAGvB,CAAC;AAEF,eAAO,MAAM,eAAe,yBACJ,aAAa,UAAU,MAAM,QAAQ,KAAK,IAAI,SAOrE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import * as userMetaGetters from './query/getters';
2
2
  import * as userMetaUpdates from './query/updates';
3
3
  export type * from './types';
4
+ export * from './event';
4
5
  export { userMetaModel } from './definition/model';
5
6
  export * from './process/findOne';
6
7
  export * from './process/updateOne';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/user-meta/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AAEnD,mBAAmB,SAAS,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/user-meta/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AAEnD,mBAAmB,SAAS,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
@@ -24,13 +24,14 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
26
  import type { Types } from 'mongoose';
27
- import type { CharacteristicRequirement, CharacteristicsRecord } from '@opfr/utils-type';
27
+ import { type CharacteristicRequirement, type CharacteristicsRecord } from '@opfr/utils-type';
28
28
  import type { UserInventory } from '../../user-inventory';
29
29
  import type { UserMeta } from '../types';
30
30
  export declare const getTotalCharacteristics: (userMeta: UserMeta) => CharacteristicsRecord;
31
31
  export declare const isCooldownForXpPassed: (userMeta: UserMeta) => boolean;
32
32
  export declare const calcXpBoost: (userMeta: UserMeta) => number;
33
33
  export declare const calcMessageXp: (msg: string) => number;
34
+ export declare const getXpDeathPenalties: (userMeta: UserMeta) => number;
34
35
  export declare const calcXp: (userMeta: UserMeta, amount: number, multiplier: number) => number;
35
36
  export declare const calcBerry: (userMeta: UserMeta, amount: number, isCasino: boolean) => number;
36
37
  export declare const calcCooldownWorkBuff: (userMeta: UserMeta) => number;
@@ -1 +1 @@
1
- {"version":3,"file":"getters.d.ts","sourceRoot":"","sources":["../../../../src/services/user-meta/query/getters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,OAAO,KAAK,EAEV,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAK1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,eAAO,MAAM,uBAAuB,aACxB,QAAQ,KACjB,qBAQF,CAAC;AAEF,eAAO,MAAM,qBAAqB,aAAc,QAAQ,YAEvD,CAAC;AAEF,eAAO,MAAM,WAAW,aAAc,QAAQ,KAAG,MAgBhD,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,MAAM,WAOxC,CAAC;AA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0",
4
4
  "private": false,
5
5
  "description": "OPFR services",
6
6
  "author": "Matthieu VEIGA",
@@ -36,5 +36,5 @@
36
36
  "node_modules",
37
37
  "dist"
38
38
  ],
39
- "gitHead": "d4da4981e7a7ce7bf9d68c05ae873679c722cacd"
39
+ "gitHead": "28694fe50ae4ad32619fea350b9f462bfac81c78"
40
40
  }