@remnawave/backend-contract 0.0.75 → 0.0.76

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,4 +1,5 @@
1
1
  export declare const ROOT: "/api";
2
+ export declare const METRICS_ROOT: "/metrics";
2
3
  export declare const REST_API: {
3
4
  readonly AUTH: {
4
5
  readonly LOGIN: "/api/auth/login";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AAEpC,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;qCAgBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;;6CAGvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;kCAIhB,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAEhD,eAAO,MAAM,QAAQ;;;;;;gCAME,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;qCAgBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;;6CAGvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;kCAIhB,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;;;;;;;CAQnB,CAAC"}
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.REST_API = exports.ROOT = void 0;
36
+ exports.REST_API = exports.METRICS_ROOT = exports.ROOT = void 0;
37
37
  const CONTROLLERS = __importStar(require("./controllers"));
38
38
  exports.ROOT = '/api';
39
+ exports.METRICS_ROOT = '/metrics';
39
40
  exports.REST_API = {
40
41
  AUTH: {
41
42
  LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
@@ -3,46 +3,103 @@ export declare namespace FindAllApiTokensCommand {
3
3
  const url: "/api/tokens/";
4
4
  const TSQ_url: "/api/tokens/";
5
5
  const ResponseSchema: z.ZodObject<{
6
- response: z.ZodArray<z.ZodObject<{
7
- uuid: z.ZodString;
8
- token: z.ZodString;
9
- tokenName: z.ZodString;
10
- tokenDescription: z.ZodNullable<z.ZodString>;
11
- createdAt: z.ZodEffects<z.ZodString, Date, string>;
12
- updatedAt: z.ZodEffects<z.ZodString, Date, string>;
6
+ response: z.ZodObject<{
7
+ apiKeys: z.ZodArray<z.ZodObject<{
8
+ uuid: z.ZodString;
9
+ token: z.ZodString;
10
+ tokenName: z.ZodString;
11
+ tokenDescription: z.ZodNullable<z.ZodString>;
12
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
13
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ uuid: string;
16
+ tokenName: string;
17
+ tokenDescription: string | null;
18
+ token: string;
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ }, {
22
+ uuid: string;
23
+ tokenName: string;
24
+ tokenDescription: string | null;
25
+ token: string;
26
+ createdAt: string;
27
+ updatedAt: string;
28
+ }>, "many">;
29
+ docs: z.ZodObject<{
30
+ isDocsEnabled: z.ZodBoolean;
31
+ scalarPath: z.ZodNullable<z.ZodString>;
32
+ swaggerPath: z.ZodNullable<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ isDocsEnabled: boolean;
35
+ scalarPath: string | null;
36
+ swaggerPath: string | null;
37
+ }, {
38
+ isDocsEnabled: boolean;
39
+ scalarPath: string | null;
40
+ swaggerPath: string | null;
41
+ }>;
13
42
  }, "strip", z.ZodTypeAny, {
14
- uuid: string;
15
- tokenName: string;
16
- tokenDescription: string | null;
17
- token: string;
18
- createdAt: Date;
19
- updatedAt: Date;
43
+ apiKeys: {
44
+ uuid: string;
45
+ tokenName: string;
46
+ tokenDescription: string | null;
47
+ token: string;
48
+ createdAt: Date;
49
+ updatedAt: Date;
50
+ }[];
51
+ docs: {
52
+ isDocsEnabled: boolean;
53
+ scalarPath: string | null;
54
+ swaggerPath: string | null;
55
+ };
20
56
  }, {
21
- uuid: string;
22
- tokenName: string;
23
- tokenDescription: string | null;
24
- token: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- }>, "many">;
57
+ apiKeys: {
58
+ uuid: string;
59
+ tokenName: string;
60
+ tokenDescription: string | null;
61
+ token: string;
62
+ createdAt: string;
63
+ updatedAt: string;
64
+ }[];
65
+ docs: {
66
+ isDocsEnabled: boolean;
67
+ scalarPath: string | null;
68
+ swaggerPath: string | null;
69
+ };
70
+ }>;
28
71
  }, "strip", z.ZodTypeAny, {
29
72
  response: {
30
- uuid: string;
31
- tokenName: string;
32
- tokenDescription: string | null;
33
- token: string;
34
- createdAt: Date;
35
- updatedAt: Date;
36
- }[];
73
+ apiKeys: {
74
+ uuid: string;
75
+ tokenName: string;
76
+ tokenDescription: string | null;
77
+ token: string;
78
+ createdAt: Date;
79
+ updatedAt: Date;
80
+ }[];
81
+ docs: {
82
+ isDocsEnabled: boolean;
83
+ scalarPath: string | null;
84
+ swaggerPath: string | null;
85
+ };
86
+ };
37
87
  }, {
38
88
  response: {
39
- uuid: string;
40
- tokenName: string;
41
- tokenDescription: string | null;
42
- token: string;
43
- createdAt: string;
44
- updatedAt: string;
45
- }[];
89
+ apiKeys: {
90
+ uuid: string;
91
+ tokenName: string;
92
+ tokenDescription: string | null;
93
+ token: string;
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ }[];
97
+ docs: {
98
+ isDocsEnabled: boolean;
99
+ scalarPath: string | null;
100
+ swaggerPath: string | null;
101
+ };
102
+ };
46
103
  }>;
47
104
  type Response = z.infer<typeof ResponseSchema>;
48
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"find.command.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/find.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,gBAA8B,CAAC;IACxC,MAAM,OAAO,gBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"find.command.d.ts","sourceRoot":"","sources":["../../../../commands/api-tokens/find.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,gBAA8B,CAAC;IACxC,MAAM,OAAO,gBAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -9,6 +9,13 @@ var FindAllApiTokensCommand;
9
9
  FindAllApiTokensCommand.url = api_1.REST_API.API_TOKENS.GET_ALL;
10
10
  FindAllApiTokensCommand.TSQ_url = FindAllApiTokensCommand.url;
11
11
  FindAllApiTokensCommand.ResponseSchema = zod_1.z.object({
12
- response: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
12
+ response: zod_1.z.object({
13
+ apiKeys: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
14
+ docs: zod_1.z.object({
15
+ isDocsEnabled: zod_1.z.boolean(),
16
+ scalarPath: zod_1.z.string().nullable(),
17
+ swaggerPath: zod_1.z.string().nullable(),
18
+ }),
19
+ }),
13
20
  });
14
21
  })(FindAllApiTokensCommand || (exports.FindAllApiTokensCommand = FindAllApiTokensCommand = {}));
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.REST_API = exports.ROOT = void 0;
36
+ exports.REST_API = exports.METRICS_ROOT = exports.ROOT = void 0;
37
37
  const CONTROLLERS = __importStar(require("./controllers"));
38
38
  exports.ROOT = '/api';
39
+ exports.METRICS_ROOT = '/metrics';
39
40
  exports.REST_API = {
40
41
  AUTH: {
41
42
  LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
@@ -9,6 +9,13 @@ var FindAllApiTokensCommand;
9
9
  FindAllApiTokensCommand.url = api_1.REST_API.API_TOKENS.GET_ALL;
10
10
  FindAllApiTokensCommand.TSQ_url = FindAllApiTokensCommand.url;
11
11
  FindAllApiTokensCommand.ResponseSchema = zod_1.z.object({
12
- response: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
12
+ response: zod_1.z.object({
13
+ apiKeys: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
14
+ docs: zod_1.z.object({
15
+ isDocsEnabled: zod_1.z.boolean(),
16
+ scalarPath: zod_1.z.string().nullable(),
17
+ swaggerPath: zod_1.z.string().nullable(),
18
+ }),
19
+ }),
13
20
  });
14
21
  })(FindAllApiTokensCommand || (exports.FindAllApiTokensCommand = FindAllApiTokensCommand = {}));
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.75",
3
+ "version": "0.0.76",
4
4
  "public": true,
5
- "description": "A contract library for Remnawave",
5
+ "license": "AGPL-3.0-only",
6
+ "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",
6
7
  "author": "REMNAWAVE <github.com/remnawave>",
7
8
  "homepage": "https://github.com/remnawave",
8
9
  "repository": {
@@ -26,7 +27,6 @@
26
27
  "prepublish": "npm run build"
27
28
  },
28
29
  "keywords": [],
29
- "license": "ISC",
30
30
  "dependencies": {
31
31
  "zod": "^3.22.4"
32
32
  }