vr-commons 1.0.157 → 1.0.158

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.
@@ -1,23 +1,6 @@
1
1
  import { Device, UserRole } from "vr-models";
2
2
  import { Transaction } from "sequelize";
3
- import { StockChangeResult } from "./types";
4
- export interface LockAllDevicesResult {
5
- success: boolean;
6
- lockedCount: number;
7
- failedCount: number;
8
- failedDeviceIds: string[];
9
- errors: string[];
10
- message: string;
11
- totalProcessed: number;
12
- }
13
- export interface LockDevicesOptions {
14
- actorId?: string;
15
- actorRole?: UserRole | string;
16
- transaction?: any;
17
- batchSize?: number;
18
- maxRetries?: number;
19
- triggeredBy?: "cronjob" | "manual";
20
- }
3
+ import { LockAllDevicesResult, LockDevicesOptions, StockChangeResult } from "./types";
21
4
  export declare const stockUtil: {
22
5
  /**
23
6
  * Increment stock when devices are added/created
@@ -1,3 +1,4 @@
1
+ import { UserRole } from "vr-models";
1
2
  export type VerificationMethod = "SMS" | "EMAIL";
2
3
  export interface PendingRegistration {
3
4
  id: string;
@@ -34,3 +35,20 @@ export interface StockChangeResult {
34
35
  productId: string;
35
36
  productName: string;
36
37
  }
38
+ export interface LockAllDevicesResult {
39
+ success: boolean;
40
+ lockedCount: number;
41
+ failedCount: number;
42
+ failedDeviceIds: string[];
43
+ errors: string[];
44
+ message: string;
45
+ totalProcessed: number;
46
+ }
47
+ export interface LockDevicesOptions {
48
+ actorId?: string;
49
+ actorRole?: UserRole | string;
50
+ transaction?: any;
51
+ batchSize?: number;
52
+ maxRetries?: number;
53
+ triggeredBy?: "cronjob" | "manual";
54
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",