jourycms-sdk 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/base.app-container.d.ts +7 -0
- package/dist/base.app-container.d.ts.map +1 -0
- package/dist/base.app-container.js +10 -0
- package/dist/base.client.d.ts +10 -0
- package/dist/base.client.d.ts.map +1 -0
- package/dist/base.client.js +16 -0
- package/dist/base.service-container.d.ts +8 -0
- package/dist/base.service-container.d.ts.map +1 -0
- package/dist/base.service-container.js +12 -0
- package/dist/containers/auth/clients/api-keys.client.d.ts +13 -0
- package/dist/containers/auth/clients/api-keys.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/api-keys.client.js +48 -0
- package/dist/containers/auth/clients/auth.client.d.ts +12 -0
- package/dist/containers/auth/clients/auth.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/auth.client.js +39 -0
- package/dist/containers/auth/clients/permission-groups.client.d.ts +12 -0
- package/dist/containers/auth/clients/permission-groups.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/permission-groups.client.js +42 -0
- package/dist/containers/auth/clients/permissions.client.d.ts +13 -0
- package/dist/containers/auth/clients/permissions.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/permissions.client.js +48 -0
- package/dist/containers/auth/clients/roles.client.d.ts +17 -0
- package/dist/containers/auth/clients/roles.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/roles.client.js +72 -0
- package/dist/containers/auth/clients/users.client.d.ts +26 -0
- package/dist/containers/auth/clients/users.client.d.ts.map +1 -0
- package/dist/containers/auth/clients/users.client.js +128 -0
- package/dist/containers/auth/service-container.d.ts +23 -0
- package/dist/containers/auth/service-container.d.ts.map +1 -0
- package/dist/containers/auth/service-container.js +48 -0
- package/dist/containers/content/clients/article-types.client.d.ts +15 -0
- package/dist/containers/content/clients/article-types.client.d.ts.map +1 -0
- package/dist/containers/content/clients/article-types.client.js +60 -0
- package/dist/containers/content/clients/articles.client.d.ts +15 -0
- package/dist/containers/content/clients/articles.client.d.ts.map +1 -0
- package/dist/containers/content/clients/articles.client.js +60 -0
- package/dist/containers/content/clients/comments.client.d.ts +15 -0
- package/dist/containers/content/clients/comments.client.d.ts.map +1 -0
- package/dist/containers/content/clients/comments.client.js +60 -0
- package/dist/containers/content/clients/reviews.client.d.ts +15 -0
- package/dist/containers/content/clients/reviews.client.d.ts.map +1 -0
- package/dist/containers/content/clients/reviews.client.js +60 -0
- package/dist/containers/content/clients/taxonomies.client.d.ts +15 -0
- package/dist/containers/content/clients/taxonomies.client.d.ts.map +1 -0
- package/dist/containers/content/clients/taxonomies.client.js +60 -0
- package/dist/containers/content/clients/terms.client.d.ts +15 -0
- package/dist/containers/content/clients/terms.client.d.ts.map +1 -0
- package/dist/containers/content/clients/terms.client.js +60 -0
- package/dist/containers/content/clients/translation.items.client.d.ts +16 -0
- package/dist/containers/content/clients/translation.items.client.d.ts.map +1 -0
- package/dist/containers/content/clients/translation.items.client.js +66 -0
- package/dist/containers/content/clients/translation.namespaces.client.d.ts +16 -0
- package/dist/containers/content/clients/translation.namespaces.client.d.ts.map +1 -0
- package/dist/containers/content/clients/translation.namespaces.client.js +66 -0
- package/dist/containers/content/clients/translation.projects.client.d.ts +16 -0
- package/dist/containers/content/clients/translation.projects.client.d.ts.map +1 -0
- package/dist/containers/content/clients/translation.projects.client.js +66 -0
- package/dist/containers/content/service-container.d.ts +29 -0
- package/dist/containers/content/service-container.d.ts.map +1 -0
- package/dist/containers/content/service-container.js +66 -0
- package/dist/containers/storage/clients/files.client.d.ts +13 -0
- package/dist/containers/storage/clients/files.client.d.ts.map +1 -0
- package/dist/containers/storage/clients/files.client.js +48 -0
- package/dist/containers/storage/clients/uploader.client.d.ts +6 -0
- package/dist/containers/storage/clients/uploader.client.d.ts.map +1 -0
- package/dist/containers/storage/clients/uploader.client.js +12 -0
- package/dist/containers/storage/clients/utils.client.d.ts +15 -0
- package/dist/containers/storage/clients/utils.client.d.ts.map +1 -0
- package/dist/containers/storage/clients/utils.client.js +45 -0
- package/dist/containers/storage/service-container.d.ts +31 -0
- package/dist/containers/storage/service-container.d.ts.map +1 -0
- package/dist/containers/storage/service-container.js +63 -0
- package/dist/containers/system/clients/apps.client.d.ts +16 -0
- package/dist/containers/system/clients/apps.client.d.ts.map +1 -0
- package/dist/containers/system/clients/apps.client.js +66 -0
- package/dist/containers/system/service-container.d.ts +13 -0
- package/dist/containers/system/service-container.d.ts.map +1 -0
- package/dist/containers/system/service-container.js +18 -0
- package/dist/exceptions/api-response.exception.d.ts +15 -0
- package/dist/exceptions/api-response.exception.d.ts.map +1 -0
- package/dist/exceptions/api-response.exception.js +26 -0
- package/dist/http-client.d.ts +20 -0
- package/dist/http-client.d.ts.map +1 -0
- package/dist/http-client.js +187 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +237 -0
- package/dist/init-sdk.d.ts +21 -0
- package/dist/init-sdk.d.ts.map +1 -0
- package/dist/init-sdk.js +17 -0
- package/dist/sdk.test.d.ts +1 -0
- package/dist/sdk.test.d.ts.map +1 -0
- package/dist/sdk.test.js +1 -0
- package/dist/utils/helpers.d.ts +5 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +13 -0
- package/dist/utils/logger.d.ts +133 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +176 -0
- package/package.json +49 -0
- package/typings/index.d.ts +1 -0
- package/typings/v1/cache-manager/class.d.ts +0 -0
- package/typings/v1/cache-manager/entity.d.ts +83 -0
- package/typings/v1/cache-manager/index.d.ts +5 -0
- package/typings/v1/cache-manager/store.d.ts +35 -0
- package/typings/v1/events/index.d.ts +3 -0
- package/typings/v1/events/payloads.d.ts +339 -0
- package/typings/v1/index.d.ts +8 -0
- package/typings/v1/lib/execution-scenario/index.d.ts +27 -0
- package/typings/v1/lib/index.d.ts +4 -0
- package/typings/v1/lib/logger/index.d.ts +3 -0
- package/typings/v1/lib/logger/logger.d.ts +53 -0
- package/typings/v1/modules/express/express.d.ts +40 -0
- package/typings/v1/modules/express/index.d.ts +3 -0
- package/typings/v1/modules/index.d.ts +4 -0
- package/typings/v1/modules/mongoose/index.d.ts +3 -0
- package/typings/v1/modules/mongoose/mongoose.d.ts +48 -0
- package/typings/v1/sdk/index.d.ts +3 -0
- package/typings/v1/sdk/sdk.d.ts +158 -0
- package/typings/v1/security/auth-data.d.ts +36 -0
- package/typings/v1/security/index.d.ts +4 -0
- package/typings/v1/security/jwt.d.ts +36 -0
- package/typings/v1/services/auth/api/api-key.d.ts +144 -0
- package/typings/v1/services/auth/api/auth.d.ts +168 -0
- package/typings/v1/services/auth/api/index.d.ts +9 -0
- package/typings/v1/services/auth/api/permission-group.d.ts +95 -0
- package/typings/v1/services/auth/api/permission.d.ts +128 -0
- package/typings/v1/services/auth/api/role.d.ts +193 -0
- package/typings/v1/services/auth/api/tools.d.ts +33 -0
- package/typings/v1/services/auth/api/user.d.ts +391 -0
- package/typings/v1/services/auth/entities/_shared.d.ts +11 -0
- package/typings/v1/services/auth/entities/api-key.d.ts +29 -0
- package/typings/v1/services/auth/entities/federated-credential.d.ts +22 -0
- package/typings/v1/services/auth/entities/index.d.ts +9 -0
- package/typings/v1/services/auth/entities/permission-group.d.ts +20 -0
- package/typings/v1/services/auth/entities/permission.d.ts +24 -0
- package/typings/v1/services/auth/entities/role.d.ts +25 -0
- package/typings/v1/services/auth/entities/user.d.ts +153 -0
- package/typings/v1/services/auth/index.d.ts +5 -0
- package/typings/v1/services/auth/models/.DS_Store +0 -0
- package/typings/v1/services/auth/models/api-key.d.ts +19 -0
- package/typings/v1/services/auth/models/api-key.model.d.ts +3 -0
- package/typings/v1/services/auth/models/federated-credential.d.ts +24 -0
- package/typings/v1/services/auth/models/index.d.ts +9 -0
- package/typings/v1/services/auth/models/permission-group.d.ts +24 -0
- package/typings/v1/services/auth/models/permission.d.ts +22 -0
- package/typings/v1/services/auth/models/role.d.ts +22 -0
- package/typings/v1/services/auth/models/user.d.ts +22 -0
- package/typings/v1/services/content/api/article-type.d.ts +160 -0
- package/typings/v1/services/content/api/article.d.ts +108 -0
- package/typings/v1/services/content/api/comment.d.ts +106 -0
- package/typings/v1/services/content/api/index.d.ts +12 -0
- package/typings/v1/services/content/api/review.d.ts +105 -0
- package/typings/v1/services/content/api/taxonomy.d.ts +101 -0
- package/typings/v1/services/content/api/term.d.ts +101 -0
- package/typings/v1/services/content/api/translation.item.d.ts +195 -0
- package/typings/v1/services/content/api/translation.namespace.d.ts +135 -0
- package/typings/v1/services/content/api/translation.project.d.ts +196 -0
- package/typings/v1/services/content/api/translation.tools.d.ts +85 -0
- package/typings/v1/services/content/entities/article-type.d.ts +51 -0
- package/typings/v1/services/content/entities/article.d.ts +53 -0
- package/typings/v1/services/content/entities/comment.d.ts +34 -0
- package/typings/v1/services/content/entities/index.d.ts +11 -0
- package/typings/v1/services/content/entities/review.d.ts +35 -0
- package/typings/v1/services/content/entities/taxonomy.d.ts +40 -0
- package/typings/v1/services/content/entities/term.d.ts +43 -0
- package/typings/v1/services/content/entities/translation.item.d.ts +48 -0
- package/typings/v1/services/content/entities/translation.namespace.d.ts +29 -0
- package/typings/v1/services/content/entities/translation.project.d.ts +98 -0
- package/typings/v1/services/content/index.d.ts +5 -0
- package/typings/v1/services/content/models/article-type.d.ts +19 -0
- package/typings/v1/services/content/models/article.d.ts +19 -0
- package/typings/v1/services/content/models/comment.d.ts +19 -0
- package/typings/v1/services/content/models/index.d.ts +11 -0
- package/typings/v1/services/content/models/review.d.ts +19 -0
- package/typings/v1/services/content/models/taxonomy.d.ts +19 -0
- package/typings/v1/services/content/models/term.d.ts +19 -0
- package/typings/v1/services/content/models/translation.item.d.ts +21 -0
- package/typings/v1/services/content/models/translation.namespace.d.ts +22 -0
- package/typings/v1/services/content/models/translation.project.d.ts +21 -0
- package/typings/v1/services/index.d.ts +4 -0
- package/typings/v1/services/storage/api/index.d.ts +3 -0
- package/typings/v1/services/storage/api/uploaded-file.d.ts +166 -0
- package/typings/v1/services/storage/entities/index.d.ts +3 -0
- package/typings/v1/services/storage/entities/uploaded-file.d.ts +49 -0
- package/typings/v1/services/storage/index.d.ts +5 -0
- package/typings/v1/services/storage/models/index.d.ts +3 -0
- package/typings/v1/services/storage/models/uploaded-file.d.ts +19 -0
- package/typings/v1/services/system/api/app.d.ts +130 -0
- package/typings/v1/services/system/api/index.d.ts +3 -0
- package/typings/v1/services/system/entities/app.d.ts +97 -0
- package/typings/v1/services/system/entities/index.d.ts +3 -0
- package/typings/v1/services/system/index.d.ts +5 -0
- package/typings/v1/services/system/models/app.d.ts +19 -0
- package/typings/v1/services/system/models/index.d.ts +3 -0
- package/typings/v1/ui/admin/index.d.ts +1 -0
- package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +189 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +29 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +24 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +26 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/date.custom-field.d.ts +23 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/date_range.custom-field.d.ts +26 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/file.custom-field.d.ts +26 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/image.custom-field.d.ts +25 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/index.d.ts +11 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/number.custom-field.d.ts +26 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/radiobox.custom-field.d.ts +27 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +27 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +26 -0
- package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +24 -0
- package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +1 -0
- package/typings/v1/ui/forms/article/index.d.ts +1 -0
- package/typings/v1/ui/forms/index.d.ts +1 -0
- package/typings/v1/ui/index.d.ts +3 -0
- package/typings/v1/ui/routes/index.d.ts +1 -0
- package/typings/v1/ui/routes/routes.d.ts +73 -0
- package/typings/v1/utils/api/index.d.ts +4 -0
- package/typings/v1/utils/api/request.d.ts +215 -0
- package/typings/v1/utils/api/response.d.ts +188 -0
- package/typings/v1/utils/common/common.d.ts +53 -0
- package/typings/v1/utils/common/index.d.ts +3 -0
- package/typings/v1/utils/dev/config.d.ts +135 -0
- package/typings/v1/utils/dev/index.d.ts +4 -0
- package/typings/v1/utils/dev/instrumentation.d.ts +41 -0
- package/typings/v1/utils/entities/entities.d.ts +66 -0
- package/typings/v1/utils/entities/index.d.ts +4 -0
- package/typings/v1/utils/entities/snapshots.d.ts +69 -0
- package/typings/v1/utils/index.d.ts +10 -0
- package/typings/v1/utils/models/index.d.ts +3 -0
- package/typings/v1/utils/models/models.d.ts +50 -0
- package/typings/v1/utils/seed/index.d.ts +3 -0
- package/typings/v1/utils/seed/locations.d.ts +41 -0
- package/typings/v1/utils/system/microservice.d.ts +11 -0
- package/typings/v1/utils/system/models.d.ts +21 -0
- package/typings/v1/utils/utils.d.ts +171 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
namespace CMS {
|
3
|
+
namespace V1 {
|
4
|
+
namespace Content {
|
5
|
+
/**
|
6
|
+
* SubDomain Translation
|
7
|
+
*/
|
8
|
+
export namespace Translation {
|
9
|
+
/**
|
10
|
+
* @description Service Entity
|
11
|
+
*/
|
12
|
+
export namespace Entity {
|
13
|
+
export type TLanguageCode =
|
14
|
+
| "zh"
|
15
|
+
| "es"
|
16
|
+
| "en"
|
17
|
+
| "hi"
|
18
|
+
| "ar"
|
19
|
+
| "bn"
|
20
|
+
| "pt"
|
21
|
+
| "ru"
|
22
|
+
| "ja"
|
23
|
+
| "de"
|
24
|
+
| "ko"
|
25
|
+
| "fr"
|
26
|
+
| "tr"
|
27
|
+
| "vi"
|
28
|
+
| "ur"
|
29
|
+
| "it"
|
30
|
+
| "th"
|
31
|
+
| "gu"
|
32
|
+
| "pl"
|
33
|
+
| "uk"
|
34
|
+
| "ro"
|
35
|
+
| "nl"
|
36
|
+
| "el"
|
37
|
+
| "sv"
|
38
|
+
| "sr"
|
39
|
+
| "hu"
|
40
|
+
| "fa"
|
41
|
+
| "cs"
|
42
|
+
| "fi"
|
43
|
+
| "sk"
|
44
|
+
| "da"
|
45
|
+
| "bg"
|
46
|
+
| "no"
|
47
|
+
| "he"
|
48
|
+
| "id"
|
49
|
+
| "ms"
|
50
|
+
| "lv"
|
51
|
+
| "lt"
|
52
|
+
| "et"
|
53
|
+
| "hr"
|
54
|
+
| "sl"
|
55
|
+
| "mt"
|
56
|
+
| "is"
|
57
|
+
| "ga"
|
58
|
+
| "mk"
|
59
|
+
| "cy"
|
60
|
+
| "ne"
|
61
|
+
| "ml"
|
62
|
+
| "kn"
|
63
|
+
| "mr"
|
64
|
+
| "ta"
|
65
|
+
| "te"
|
66
|
+
| "pa"
|
67
|
+
| "sw"
|
68
|
+
| "ka"
|
69
|
+
| "am"
|
70
|
+
| "ti"
|
71
|
+
| "xh"
|
72
|
+
| "zu"
|
73
|
+
| "yi"
|
74
|
+
| "so"
|
75
|
+
| "sn"
|
76
|
+
| "ny"
|
77
|
+
| "st"
|
78
|
+
| "tn"
|
79
|
+
| "ts"
|
80
|
+
| "ss"
|
81
|
+
| "ve"
|
82
|
+
| "nr";
|
83
|
+
|
84
|
+
export interface Project
|
85
|
+
extends Utils.Entity.General.ICreatable,
|
86
|
+
Utils.Entity.General.IHasSearchMeta {
|
87
|
+
_id: Utils.Common.ID;
|
88
|
+
name: string;
|
89
|
+
description: string;
|
90
|
+
languages: LanguageCode[];
|
91
|
+
default_language: LanguageCode;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type ArticleTypeDocument = Entity.ArticleType & Document;
|
13
|
+
export type ArticleType = MongooseModel<ArticleTypeDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type ArticleDocument = Entity.Article & Document;
|
13
|
+
export type Article = MongooseModel<ArticleDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type CommentDocument = Entity.Comment & Document;
|
13
|
+
export type Comment = MongooseModel<CommentDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
'generated by levelup';
|
2
|
+
|
3
|
+
export * from "./translation.project.d.ts";
|
4
|
+
export * from "./translation.namespace.d.ts";
|
5
|
+
export * from "./translation.item.d.ts";
|
6
|
+
export * from "./taxonomy.d.ts";
|
7
|
+
export * from "./term.d.ts";
|
8
|
+
export * from "./review.d.ts";
|
9
|
+
export * from "./comment.d.ts";
|
10
|
+
export * from "./article.d.ts";
|
11
|
+
export * from "./article-type.d.ts";
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type ReviewDocument = Entity.Review & Document;
|
13
|
+
export type Review = MongooseModel<ReviewDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type TaxonomyDocument = Entity.Taxonomy & Document;
|
13
|
+
export type Taxonomy = MongooseModel<TaxonomyDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
export namespace Model {
|
12
|
+
export type TermDocument = Entity.Term & Document;
|
13
|
+
export type Term = MongooseModel<TermDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
namespace Translation {
|
12
|
+
export namespace Model {
|
13
|
+
export type ItemDocument = Entity.Item & Document;
|
14
|
+
export type Item = MongooseModel<ItemDocument>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from 'mongoose';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
namespace Translation {
|
12
|
+
|
13
|
+
export namespace Model {
|
14
|
+
export type NamespaceDocument = Entity.Namespace & Document;
|
15
|
+
export type Namespace = MongooseModel<NamespaceDocument>;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Content {
|
11
|
+
namespace Translation {
|
12
|
+
export namespace Model {
|
13
|
+
export type ProjectDocument = Entity.Project & Document;
|
14
|
+
export type Project = MongooseModel<ProjectDocument>;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,166 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
namespace CMS {
|
3
|
+
namespace V1 {
|
4
|
+
namespace Storage {
|
5
|
+
export namespace Api {
|
6
|
+
/**
|
7
|
+
* --------------------------------------------------------------------------
|
8
|
+
* Upload
|
9
|
+
* --------------------------------------------------------------------------
|
10
|
+
* @link
|
11
|
+
* @fires UploadedFilesService.Upload
|
12
|
+
* @param {Levelup.V2.Storage.Api.Upload.Request} query
|
13
|
+
* @returns {Levelup.V2.Storage.Api.Upload.Response}
|
14
|
+
* @method POST
|
15
|
+
*
|
16
|
+
*/
|
17
|
+
export namespace Upload {
|
18
|
+
export type Request = FormData;
|
19
|
+
export type Response = Utils.Api.Response.BuildSingleItemResponse<{
|
20
|
+
files: Entity.UploadedFile[];
|
21
|
+
}>;
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* --------------------------------------------------------------------------
|
25
|
+
* LoadRemote
|
26
|
+
* --------------------------------------------------------------------------
|
27
|
+
* @link
|
28
|
+
* @fires UploadedFilesService.LoadRemote
|
29
|
+
* @param {Levelup.V2.Storage.Api.LoadRemote.Request} query
|
30
|
+
* @returns {Levelup.V2.Storage.Api.LoadRemote.Response}
|
31
|
+
* @method POST
|
32
|
+
*
|
33
|
+
*/
|
34
|
+
export namespace LoadRemote {
|
35
|
+
export type Request = Utils.Api.Request.BuildCreateRequest<{
|
36
|
+
url: string;
|
37
|
+
}>;
|
38
|
+
export type Response =
|
39
|
+
Utils.Api.Response.BuildSingleItemResponse<Entity.UploadedFile>;
|
40
|
+
}
|
41
|
+
|
42
|
+
export namespace UploadedFiles {
|
43
|
+
/**
|
44
|
+
* --------------------------------------------------------------------------
|
45
|
+
* Create
|
46
|
+
* --------------------------------------------------------------------------
|
47
|
+
* @link
|
48
|
+
* @fires UploadedFilesService.Create
|
49
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.Create.Request} query
|
50
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.Create.Response}
|
51
|
+
* @method POST
|
52
|
+
*
|
53
|
+
*/
|
54
|
+
export namespace Create {
|
55
|
+
export type Request =
|
56
|
+
Utils.Api.Request.BuildCreateRequest<Entity.UploadedFile>;
|
57
|
+
export type Response =
|
58
|
+
Utils.Api.Response.BuildSingleItemResponse<Entity.UploadedFile>;
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* --------------------------------------------------------------------------
|
63
|
+
* Update
|
64
|
+
* --------------------------------------------------------------------------
|
65
|
+
* @link
|
66
|
+
* @fires UploadedFilesService.Update
|
67
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.Update.Request} query
|
68
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.Update.Response}
|
69
|
+
* @method PUT
|
70
|
+
*
|
71
|
+
*/
|
72
|
+
export namespace Update {
|
73
|
+
export type Request =
|
74
|
+
Utils.Api.Request.BuildUpdateRequest<Entity.UploadedFile>;
|
75
|
+
export type Response =
|
76
|
+
Utils.Api.Response.BuildSingleItemResponse<Entity.UploadedFile>;
|
77
|
+
}
|
78
|
+
|
79
|
+
/**
|
80
|
+
* --------------------------------------------------------------------------
|
81
|
+
* Delete
|
82
|
+
* --------------------------------------------------------------------------
|
83
|
+
* @link
|
84
|
+
* @fires UploadedFilesService.Delete
|
85
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.Delete.Request} query
|
86
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.Delete.Response}
|
87
|
+
* @method DELETE
|
88
|
+
*
|
89
|
+
*/
|
90
|
+
export namespace Delete {
|
91
|
+
export type Response = Utils.Api.Response.DefaultDeleteResponse;
|
92
|
+
}
|
93
|
+
|
94
|
+
/**
|
95
|
+
* --------------------------------------------------------------------------
|
96
|
+
* BulkDelete
|
97
|
+
* --------------------------------------------------------------------------
|
98
|
+
* @link
|
99
|
+
* @fires UploadedFilesService.BulkDelete
|
100
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.BulkDelete.Request} query
|
101
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.BulkDelete.Response}
|
102
|
+
* @method DELETE
|
103
|
+
*
|
104
|
+
*/
|
105
|
+
export namespace BulkDelete {
|
106
|
+
export type Request = Utils.Api.Request.Build<{
|
107
|
+
data: {
|
108
|
+
id?: string[];
|
109
|
+
tracking_id?: string[];
|
110
|
+
};
|
111
|
+
}>;
|
112
|
+
export type Response = Utils.Api.Response.DefaultDeleteResponse;
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
* --------------------------------------------------------------------------
|
117
|
+
* GetOne
|
118
|
+
* --------------------------------------------------------------------------
|
119
|
+
* @link
|
120
|
+
* @fires UploadedFilesService.GetOne
|
121
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.GetOne.Request} query
|
122
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.GetOne.Response}
|
123
|
+
* @method GET
|
124
|
+
*
|
125
|
+
*/
|
126
|
+
export namespace GetOne {
|
127
|
+
type Scope = "";
|
128
|
+
export type Request = Utils.Api.Request.Build<
|
129
|
+
Record<string, unknown>
|
130
|
+
>;
|
131
|
+
export type Response =
|
132
|
+
Utils.Api.Response.BuildSingleItemResponse<Entity.UploadedFile>;
|
133
|
+
}
|
134
|
+
|
135
|
+
/**
|
136
|
+
* --------------------------------------------------------------------------
|
137
|
+
* List
|
138
|
+
* --------------------------------------------------------------------------
|
139
|
+
* @link
|
140
|
+
* @fires UploadedFilesService.List
|
141
|
+
* @param {Levelup.V2.Storage.Api.UploadedFiles.List.Request} query
|
142
|
+
* @returns {Levelup.V2.Storage.Api.UploadedFiles.List.Response}
|
143
|
+
* @method GET
|
144
|
+
*
|
145
|
+
*/
|
146
|
+
export namespace List {
|
147
|
+
type Scope = "listing" | "ids" | "trackings";
|
148
|
+
|
149
|
+
export type Request =
|
150
|
+
Utils.Api.Request.BuildSearchablePagedSortableFilterableProjectable<Entity.UploadedFile> & {
|
151
|
+
scope?: Scope;
|
152
|
+
filters?: {
|
153
|
+
/**
|
154
|
+
* Here will be the custom filters
|
155
|
+
*/
|
156
|
+
};
|
157
|
+
};
|
158
|
+
export type Response =
|
159
|
+
Utils.Api.Response.BuildListResponse<Entity.UploadedFile>;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
namespace CMS {
|
3
|
+
namespace V1 {
|
4
|
+
namespace Storage {
|
5
|
+
export namespace Entity {
|
6
|
+
export interface IUploadedFileAttributes {
|
7
|
+
store?: Utils.Common.ID;
|
8
|
+
}
|
9
|
+
|
10
|
+
export interface IUploadedFileSnapshots {
|
11
|
+
store?: Utils.Entity.Snapshots.Accounts.Store;
|
12
|
+
}
|
13
|
+
|
14
|
+
export interface UploadedFile
|
15
|
+
extends Utils.Entity.General.ICreatable,
|
16
|
+
Utils.Entity.General.IHasSearchMeta {
|
17
|
+
_id: Utils.Common.ID;
|
18
|
+
field_name: string;
|
19
|
+
|
20
|
+
original_name: string;
|
21
|
+
remote_url?: string;
|
22
|
+
/**
|
23
|
+
* The base file name with extension
|
24
|
+
*/
|
25
|
+
file_name: string;
|
26
|
+
/**
|
27
|
+
* The relative path to the file
|
28
|
+
*/
|
29
|
+
file_path: string;
|
30
|
+
/**
|
31
|
+
* The relative path to the file directory
|
32
|
+
*/
|
33
|
+
destination: string;
|
34
|
+
/**
|
35
|
+
* File size in bytes
|
36
|
+
*/
|
37
|
+
size: number;
|
38
|
+
|
39
|
+
caption: string;
|
40
|
+
encoding: string;
|
41
|
+
mimetype: string;
|
42
|
+
attributes: IUploadedFileAttributes;
|
43
|
+
snapshots: IUploadedFileSnapshots;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { Document, Model as MongooseModel } from "mongoose";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @description global here is very important because we have imported from another module
|
5
|
+
*/
|
6
|
+
declare global {
|
7
|
+
declare module Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace Storage {
|
11
|
+
export namespace Model {
|
12
|
+
export type UploadedFileDocument = Entity.UploadedFile & Document;
|
13
|
+
export type UploadedFile = MongooseModel<UploadedFileDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|