@remnawave/backend-contract 0.7.18 → 0.7.20

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.
@@ -27,56 +27,89 @@ export declare namespace CreateUserHwidDeviceCommand {
27
27
  }>;
28
28
  type Request = z.infer<typeof RequestSchema>;
29
29
  const ResponseSchema: z.ZodObject<{
30
- response: z.ZodArray<z.ZodObject<{
31
- hwid: z.ZodString;
32
- userUuid: z.ZodString;
33
- platform: z.ZodNullable<z.ZodString>;
34
- osVersion: z.ZodNullable<z.ZodString>;
35
- deviceModel: z.ZodNullable<z.ZodString>;
36
- userAgent: z.ZodNullable<z.ZodString>;
37
- createdAt: z.ZodEffects<z.ZodString, Date, string>;
38
- updatedAt: z.ZodEffects<z.ZodString, Date, string>;
30
+ response: z.ZodObject<{
31
+ total: z.ZodNumber;
32
+ devices: z.ZodArray<z.ZodObject<{
33
+ hwid: z.ZodString;
34
+ userUuid: z.ZodString;
35
+ platform: z.ZodNullable<z.ZodString>;
36
+ osVersion: z.ZodNullable<z.ZodString>;
37
+ deviceModel: z.ZodNullable<z.ZodString>;
38
+ userAgent: z.ZodNullable<z.ZodString>;
39
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
40
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ hwid: string;
43
+ createdAt: Date;
44
+ updatedAt: Date;
45
+ userUuid: string;
46
+ platform: string | null;
47
+ osVersion: string | null;
48
+ deviceModel: string | null;
49
+ userAgent: string | null;
50
+ }, {
51
+ hwid: string;
52
+ createdAt: string;
53
+ updatedAt: string;
54
+ userUuid: string;
55
+ platform: string | null;
56
+ osVersion: string | null;
57
+ deviceModel: string | null;
58
+ userAgent: string | null;
59
+ }>, "many">;
39
60
  }, "strip", z.ZodTypeAny, {
40
- hwid: string;
41
- createdAt: Date;
42
- updatedAt: Date;
43
- userUuid: string;
44
- platform: string | null;
45
- osVersion: string | null;
46
- deviceModel: string | null;
47
- userAgent: string | null;
61
+ devices: {
62
+ hwid: string;
63
+ createdAt: Date;
64
+ updatedAt: Date;
65
+ userUuid: string;
66
+ platform: string | null;
67
+ osVersion: string | null;
68
+ deviceModel: string | null;
69
+ userAgent: string | null;
70
+ }[];
71
+ total: number;
48
72
  }, {
49
- hwid: string;
50
- createdAt: string;
51
- updatedAt: string;
52
- userUuid: string;
53
- platform: string | null;
54
- osVersion: string | null;
55
- deviceModel: string | null;
56
- userAgent: string | null;
57
- }>, "many">;
73
+ devices: {
74
+ hwid: string;
75
+ createdAt: string;
76
+ updatedAt: string;
77
+ userUuid: string;
78
+ platform: string | null;
79
+ osVersion: string | null;
80
+ deviceModel: string | null;
81
+ userAgent: string | null;
82
+ }[];
83
+ total: number;
84
+ }>;
58
85
  }, "strip", z.ZodTypeAny, {
59
86
  response: {
60
- hwid: string;
61
- createdAt: Date;
62
- updatedAt: Date;
63
- userUuid: string;
64
- platform: string | null;
65
- osVersion: string | null;
66
- deviceModel: string | null;
67
- userAgent: string | null;
68
- }[];
87
+ devices: {
88
+ hwid: string;
89
+ createdAt: Date;
90
+ updatedAt: Date;
91
+ userUuid: string;
92
+ platform: string | null;
93
+ osVersion: string | null;
94
+ deviceModel: string | null;
95
+ userAgent: string | null;
96
+ }[];
97
+ total: number;
98
+ };
69
99
  }, {
70
100
  response: {
71
- hwid: string;
72
- createdAt: string;
73
- updatedAt: string;
74
- userUuid: string;
75
- platform: string | null;
76
- osVersion: string | null;
77
- deviceModel: string | null;
78
- userAgent: string | null;
79
- }[];
101
+ devices: {
102
+ hwid: string;
103
+ createdAt: string;
104
+ updatedAt: string;
105
+ userUuid: string;
106
+ platform: string | null;
107
+ osVersion: string | null;
108
+ deviceModel: string | null;
109
+ userAgent: string | null;
110
+ }[];
111
+ total: number;
112
+ };
80
113
  }>;
81
114
  type Response = z.infer<typeof ResponseSchema>;
82
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-user-hwid-device.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/create-user-hwid-device.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,qBAAwC,CAAC;IAClD,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create-user-hwid-device.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/create-user-hwid-device.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,qBAAwC,CAAC;IAClD,MAAM,OAAO,qBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -19,6 +19,9 @@ var CreateUserHwidDeviceCommand;
19
19
  userAgent: zod_1.z.optional(zod_1.z.string()),
20
20
  });
21
21
  CreateUserHwidDeviceCommand.ResponseSchema = zod_1.z.object({
22
- response: zod_1.z.array(models_1.HwidUserDeviceSchema),
22
+ response: zod_1.z.object({
23
+ total: zod_1.z.number(),
24
+ devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
25
+ }),
23
26
  });
24
27
  })(CreateUserHwidDeviceCommand || (exports.CreateUserHwidDeviceCommand = CreateUserHwidDeviceCommand = {}));
@@ -15,56 +15,89 @@ export declare namespace DeleteUserHwidDeviceCommand {
15
15
  }>;
16
16
  type Request = z.infer<typeof RequestSchema>;
17
17
  const ResponseSchema: z.ZodObject<{
18
- response: z.ZodArray<z.ZodObject<{
19
- hwid: z.ZodString;
20
- userUuid: z.ZodString;
21
- platform: z.ZodNullable<z.ZodString>;
22
- osVersion: z.ZodNullable<z.ZodString>;
23
- deviceModel: z.ZodNullable<z.ZodString>;
24
- userAgent: z.ZodNullable<z.ZodString>;
25
- createdAt: z.ZodEffects<z.ZodString, Date, string>;
26
- updatedAt: z.ZodEffects<z.ZodString, Date, string>;
18
+ response: z.ZodObject<{
19
+ total: z.ZodNumber;
20
+ devices: z.ZodArray<z.ZodObject<{
21
+ hwid: z.ZodString;
22
+ userUuid: z.ZodString;
23
+ platform: z.ZodNullable<z.ZodString>;
24
+ osVersion: z.ZodNullable<z.ZodString>;
25
+ deviceModel: z.ZodNullable<z.ZodString>;
26
+ userAgent: z.ZodNullable<z.ZodString>;
27
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
28
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ hwid: string;
31
+ createdAt: Date;
32
+ updatedAt: Date;
33
+ userUuid: string;
34
+ platform: string | null;
35
+ osVersion: string | null;
36
+ deviceModel: string | null;
37
+ userAgent: string | null;
38
+ }, {
39
+ hwid: string;
40
+ createdAt: string;
41
+ updatedAt: string;
42
+ userUuid: string;
43
+ platform: string | null;
44
+ osVersion: string | null;
45
+ deviceModel: string | null;
46
+ userAgent: string | null;
47
+ }>, "many">;
27
48
  }, "strip", z.ZodTypeAny, {
28
- hwid: string;
29
- createdAt: Date;
30
- updatedAt: Date;
31
- userUuid: string;
32
- platform: string | null;
33
- osVersion: string | null;
34
- deviceModel: string | null;
35
- userAgent: string | null;
49
+ devices: {
50
+ hwid: string;
51
+ createdAt: Date;
52
+ updatedAt: Date;
53
+ userUuid: string;
54
+ platform: string | null;
55
+ osVersion: string | null;
56
+ deviceModel: string | null;
57
+ userAgent: string | null;
58
+ }[];
59
+ total: number;
36
60
  }, {
37
- hwid: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- userUuid: string;
41
- platform: string | null;
42
- osVersion: string | null;
43
- deviceModel: string | null;
44
- userAgent: string | null;
45
- }>, "many">;
61
+ devices: {
62
+ hwid: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ userUuid: string;
66
+ platform: string | null;
67
+ osVersion: string | null;
68
+ deviceModel: string | null;
69
+ userAgent: string | null;
70
+ }[];
71
+ total: number;
72
+ }>;
46
73
  }, "strip", z.ZodTypeAny, {
47
74
  response: {
48
- hwid: string;
49
- createdAt: Date;
50
- updatedAt: Date;
51
- userUuid: string;
52
- platform: string | null;
53
- osVersion: string | null;
54
- deviceModel: string | null;
55
- userAgent: string | null;
56
- }[];
75
+ devices: {
76
+ hwid: string;
77
+ createdAt: Date;
78
+ updatedAt: Date;
79
+ userUuid: string;
80
+ platform: string | null;
81
+ osVersion: string | null;
82
+ deviceModel: string | null;
83
+ userAgent: string | null;
84
+ }[];
85
+ total: number;
86
+ };
57
87
  }, {
58
88
  response: {
59
- hwid: string;
60
- createdAt: string;
61
- updatedAt: string;
62
- userUuid: string;
63
- platform: string | null;
64
- osVersion: string | null;
65
- deviceModel: string | null;
66
- userAgent: string | null;
67
- }[];
89
+ devices: {
90
+ hwid: string;
91
+ createdAt: string;
92
+ updatedAt: string;
93
+ userUuid: string;
94
+ platform: string | null;
95
+ osVersion: string | null;
96
+ deviceModel: string | null;
97
+ userAgent: string | null;
98
+ }[];
99
+ total: number;
100
+ };
68
101
  }>;
69
102
  type Response = z.infer<typeof ResponseSchema>;
70
103
  }
@@ -1 +1 @@
1
- {"version":3,"file":"delete-user-hwid-device.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/delete-user-hwid-device.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAAwC,CAAC;IAClD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;MAGxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"delete-user-hwid-device.command.d.ts","sourceRoot":"","sources":["../../../../commands/hwid/delete-user-hwid-device.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,4BAAwC,CAAC;IAClD,MAAM,OAAO,4BAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;MAGxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -15,6 +15,9 @@ var DeleteUserHwidDeviceCommand;
15
15
  hwid: zod_1.z.string(),
16
16
  });
17
17
  DeleteUserHwidDeviceCommand.ResponseSchema = zod_1.z.object({
18
- response: zod_1.z.array(models_1.HwidUserDeviceSchema),
18
+ response: zod_1.z.object({
19
+ total: zod_1.z.number(),
20
+ devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
21
+ }),
19
22
  });
20
23
  })(DeleteUserHwidDeviceCommand || (exports.DeleteUserHwidDeviceCommand = DeleteUserHwidDeviceCommand = {}));
@@ -559,5 +559,15 @@ export declare const ERRORS: {
559
559
  readonly message: "Bulk delete by status error";
560
560
  readonly httpCode: 500;
561
561
  };
562
+ readonly CLEAN_OLD_USAGE_RECORDS_ERROR: {
563
+ readonly code: "A107";
564
+ readonly message: "Clean old usage records error";
565
+ readonly httpCode: 500;
566
+ };
567
+ readonly VACUUM_TABLE_ERROR: {
568
+ readonly code: "A108";
569
+ readonly message: "Vacuum table error";
570
+ readonly httpCode: 500;
571
+ };
562
572
  };
563
573
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoO3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8O3B,CAAC"}
@@ -530,4 +530,14 @@ exports.ERRORS = {
530
530
  message: 'Bulk delete by status error',
531
531
  httpCode: 500,
532
532
  },
533
+ CLEAN_OLD_USAGE_RECORDS_ERROR: {
534
+ code: 'A107',
535
+ message: 'Clean old usage records error',
536
+ httpCode: 500,
537
+ },
538
+ VACUUM_TABLE_ERROR: {
539
+ code: 'A108',
540
+ message: 'Vacuum table error',
541
+ httpCode: 500,
542
+ },
533
543
  };
@@ -19,6 +19,9 @@ var CreateUserHwidDeviceCommand;
19
19
  userAgent: zod_1.z.optional(zod_1.z.string()),
20
20
  });
21
21
  CreateUserHwidDeviceCommand.ResponseSchema = zod_1.z.object({
22
- response: zod_1.z.array(models_1.HwidUserDeviceSchema),
22
+ response: zod_1.z.object({
23
+ total: zod_1.z.number(),
24
+ devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
25
+ }),
23
26
  });
24
27
  })(CreateUserHwidDeviceCommand || (exports.CreateUserHwidDeviceCommand = CreateUserHwidDeviceCommand = {}));
@@ -15,6 +15,9 @@ var DeleteUserHwidDeviceCommand;
15
15
  hwid: zod_1.z.string(),
16
16
  });
17
17
  DeleteUserHwidDeviceCommand.ResponseSchema = zod_1.z.object({
18
- response: zod_1.z.array(models_1.HwidUserDeviceSchema),
18
+ response: zod_1.z.object({
19
+ total: zod_1.z.number(),
20
+ devices: zod_1.z.array(models_1.HwidUserDeviceSchema),
21
+ }),
19
22
  });
20
23
  })(DeleteUserHwidDeviceCommand || (exports.DeleteUserHwidDeviceCommand = DeleteUserHwidDeviceCommand = {}));
@@ -530,4 +530,14 @@ exports.ERRORS = {
530
530
  message: 'Bulk delete by status error',
531
531
  httpCode: 500,
532
532
  },
533
+ CLEAN_OLD_USAGE_RECORDS_ERROR: {
534
+ code: 'A107',
535
+ message: 'Clean old usage records error',
536
+ httpCode: 500,
537
+ },
538
+ VACUUM_TABLE_ERROR: {
539
+ code: 'A108',
540
+ message: 'Vacuum table error',
541
+ httpCode: 500,
542
+ },
533
543
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.7.18",
3
+ "version": "0.7.20",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",