@veruna/api-contracts 1.0.22 → 1.0.23
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.
- package/build/rest-api.d.ts +6 -5
- package/build/rest-api.js +9 -8
- package/build/v1/file/commands/delete-file-by-key.command.d.ts +1 -1
- package/build/v1/file/commands/upload-file.command.d.ts +1 -1
- package/build/v1/file/commands/upload-image.command.d.ts +1 -1
- package/build/v1/file/queries/list-files.query.d.ts +1 -1
- package/build/v1/file/queries/list-folders.query.d.ts +1 -1
- package/package.json +1 -1
package/build/rest-api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Used by frontend for API calls
|
|
4
4
|
*/
|
|
5
5
|
export declare const ROOT: "/api";
|
|
6
|
+
export declare const FILE_ROOT: "/file-api";
|
|
6
7
|
export declare const REST_API: {
|
|
7
8
|
readonly V1: {
|
|
8
9
|
readonly AUTH: {
|
|
@@ -88,13 +89,13 @@ export declare const REST_API: {
|
|
|
88
89
|
};
|
|
89
90
|
};
|
|
90
91
|
readonly FILE: {
|
|
91
|
-
readonly UPLOAD_IMAGE: "/api/v1/files/upload-image";
|
|
92
|
-
readonly UPLOAD: "/api/v1/files/upload";
|
|
93
|
-
readonly LIST: "/api/v1/files";
|
|
92
|
+
readonly UPLOAD_IMAGE: "/file-api/v1/files/upload-image";
|
|
93
|
+
readonly UPLOAD: "/file-api/v1/files/upload";
|
|
94
|
+
readonly LIST: "/file-api/v1/files";
|
|
94
95
|
readonly GET_BY_ID: (id: string) => string;
|
|
95
96
|
readonly DELETE_BY_ID: (id: string) => string;
|
|
96
|
-
readonly DELETE_BY_KEY: "/api/v1/files/by-key";
|
|
97
|
-
readonly FOLDERS: "/api/v1/files/folders";
|
|
97
|
+
readonly DELETE_BY_KEY: "/file-api/v1/files/by-key";
|
|
98
|
+
readonly FOLDERS: "/file-api/v1/files/folders";
|
|
98
99
|
};
|
|
99
100
|
readonly CHAT_PROJECT: {
|
|
100
101
|
readonly CREATE: "/api/v1/projects/";
|
package/build/rest-api.js
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Used by frontend for API calls
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.REST_API = exports.ROOT = void 0;
|
|
7
|
+
exports.REST_API = exports.FILE_ROOT = exports.ROOT = void 0;
|
|
8
8
|
const controllers_1 = require("./controllers");
|
|
9
9
|
const routes_1 = require("./routes");
|
|
10
10
|
exports.ROOT = '/api';
|
|
11
|
+
exports.FILE_ROOT = '/file-api';
|
|
11
12
|
exports.REST_API = {
|
|
12
13
|
V1: {
|
|
13
14
|
// Auth module
|
|
@@ -102,15 +103,15 @@ exports.REST_API = {
|
|
|
102
103
|
// File module (External Go service)
|
|
103
104
|
FILE: {
|
|
104
105
|
// Images
|
|
105
|
-
UPLOAD_IMAGE: `${exports.
|
|
106
|
+
UPLOAD_IMAGE: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD_IMAGE}`,
|
|
106
107
|
// Files
|
|
107
|
-
UPLOAD: `${exports.
|
|
108
|
-
LIST: `${exports.
|
|
109
|
-
GET_BY_ID: (id) => `${exports.
|
|
110
|
-
DELETE_BY_ID: (id) => `${exports.
|
|
111
|
-
DELETE_BY_KEY: `${exports.
|
|
108
|
+
UPLOAD: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.UPLOAD}`,
|
|
109
|
+
LIST: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}`,
|
|
110
|
+
GET_BY_ID: (id) => `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
|
|
111
|
+
DELETE_BY_ID: (id) => `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${id}`,
|
|
112
|
+
DELETE_BY_KEY: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.DELETE_BY_KEY}`,
|
|
112
113
|
// Folders
|
|
113
|
-
FOLDERS: `${exports.
|
|
114
|
+
FOLDERS: `${exports.FILE_ROOT}/${controllers_1.FILE_CONTROLLER}/${routes_1.FILE_ROUTES.FOLDERS}`,
|
|
114
115
|
},
|
|
115
116
|
// Chat Project module
|
|
116
117
|
CHAT_PROJECT: {
|
|
@@ -8,7 +8,7 @@ export declare namespace FileDeleteByKeyCommand {
|
|
|
8
8
|
message: z.ZodString;
|
|
9
9
|
key: z.ZodString;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
|
-
const URL: "/api/v1/files/by-key";
|
|
11
|
+
const URL: "/file-api/v1/files/by-key";
|
|
12
12
|
const METHOD = HttpMethod.DELETE;
|
|
13
13
|
type RequestType = z.infer<typeof Request>;
|
|
14
14
|
type ResponseType = z.infer<typeof Response>;
|
|
@@ -9,7 +9,7 @@ export declare namespace FileUploadCommand {
|
|
|
9
9
|
cdnUrl: z.ZodString;
|
|
10
10
|
s3Url: z.ZodString;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
|
-
const URL: "/api/v1/files/upload";
|
|
12
|
+
const URL: "/file-api/v1/files/upload";
|
|
13
13
|
const METHOD = HttpMethod.PUT;
|
|
14
14
|
type RequestType = z.infer<typeof Request>;
|
|
15
15
|
type ResponseType = z.infer<typeof Response>;
|
|
@@ -12,7 +12,7 @@ export declare namespace FileUploadImageCommand {
|
|
|
12
12
|
cdnUrl: z.ZodString;
|
|
13
13
|
s3Url: z.ZodString;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
|
-
const URL: "/api/v1/files/upload-image";
|
|
15
|
+
const URL: "/file-api/v1/files/upload-image";
|
|
16
16
|
const METHOD = HttpMethod.PUT;
|
|
17
17
|
type RequestType = z.infer<typeof Request>;
|
|
18
18
|
type ResponseType = z.infer<typeof Response>;
|
|
@@ -31,7 +31,7 @@ export declare namespace FileListQuery {
|
|
|
31
31
|
hasPrev: z.ZodBoolean;
|
|
32
32
|
}, z.core.$strip>;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
|
-
const URL: "/api/v1/files";
|
|
34
|
+
const URL: "/file-api/v1/files";
|
|
35
35
|
const METHOD = HttpMethod.GET;
|
|
36
36
|
type RequestType = z.infer<typeof Request>;
|
|
37
37
|
type ResponseType = z.infer<typeof Response>;
|
|
@@ -10,7 +10,7 @@ export declare namespace FileFoldersListQuery {
|
|
|
10
10
|
fileCount: z.ZodNumber;
|
|
11
11
|
}, z.core.$strip>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
|
-
const URL: "/api/v1/files/folders";
|
|
13
|
+
const URL: "/file-api/v1/files/folders";
|
|
14
14
|
const METHOD = HttpMethod.GET;
|
|
15
15
|
type RequestType = z.infer<typeof Request>;
|
|
16
16
|
type ResponseType = z.infer<typeof Response>;
|