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,339 @@
|
|
1
|
+
declare class EventDispatcher {
|
2
|
+
private handlers;
|
3
|
+
remove(eventName: string): void;
|
4
|
+
remove(eventNames: string[]): void;
|
5
|
+
remove(callback: (data: any) => void): void;
|
6
|
+
detach(detachFrom: any, eventName?: string): void;
|
7
|
+
detach(detachFrom: any, eventNames?: string[]): void;
|
8
|
+
detach(detachFrom: any, callback?: (data: any) => void): void;
|
9
|
+
attach(attachTo: any, eventName: string, callback: (data: any) => void): void;
|
10
|
+
attach(
|
11
|
+
attachTo: any,
|
12
|
+
eventNames: string[],
|
13
|
+
callback: (data: any) => void
|
14
|
+
): void;
|
15
|
+
on(eventName: string, callback: (data: any) => void): void;
|
16
|
+
on(eventNames: string[], callback: (data: any) => void): void;
|
17
|
+
dispatch<T = any>(eventName: string, data: T): void;
|
18
|
+
dispatch<T = any>(eventNames: string[], data: T): void;
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @description project levelup
|
23
|
+
*/
|
24
|
+
declare module Levelup {
|
25
|
+
export namespace CMS {
|
26
|
+
export namespace V1 {
|
27
|
+
/**
|
28
|
+
* @description Service
|
29
|
+
*/
|
30
|
+
export namespace Events {
|
31
|
+
export namespace Payloads {
|
32
|
+
|
33
|
+
/* -------------------------------------------------------------------------- */
|
34
|
+
/* AUTH */
|
35
|
+
/* -------------------------------------------------------------------------- */
|
36
|
+
|
37
|
+
export namespace Users {
|
38
|
+
export namespace User {
|
39
|
+
export type created = {
|
40
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
41
|
+
};
|
42
|
+
export type updated = {
|
43
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
44
|
+
};
|
45
|
+
export type deleted = {
|
46
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
47
|
+
};
|
48
|
+
export type restored = {
|
49
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
50
|
+
};
|
51
|
+
export type roleChanged = {
|
52
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
53
|
+
};
|
54
|
+
export type permissionsChanged = {
|
55
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
56
|
+
};
|
57
|
+
export type attributeCompany = {
|
58
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
59
|
+
company: Levelup.V2.Accounts.Entity.Company;
|
60
|
+
};
|
61
|
+
export type attributeStore = {
|
62
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
63
|
+
store_id: Levelup.V2.Accounts.Entity.Store;
|
64
|
+
};
|
65
|
+
export type removeStore = {
|
66
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
67
|
+
store_id: string;
|
68
|
+
};
|
69
|
+
export type suspendStatusChanged = {
|
70
|
+
suspended: boolean;
|
71
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
72
|
+
};
|
73
|
+
export type loginInfoUpdated = {
|
74
|
+
data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
|
75
|
+
};
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
export namespace Auth {
|
80
|
+
export type login = { data: Levelup.V2.Users.Entity.ExposedUser };
|
81
|
+
export type register = { data: Levelup.V2.Users.Entity.ExposedUser };
|
82
|
+
export type logout = { data: Levelup.V2.Users.Entity.ExposedUser };
|
83
|
+
export type restored = { data: Levelup.V2.Users.Entity.ExposedUser };
|
84
|
+
|
85
|
+
export namespace ApiKey {
|
86
|
+
export type created = {
|
87
|
+
data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
|
88
|
+
};
|
89
|
+
export type updated = {
|
90
|
+
data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
|
91
|
+
};
|
92
|
+
export type deleted = {
|
93
|
+
data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
|
94
|
+
};
|
95
|
+
export type restored = {
|
96
|
+
data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
|
97
|
+
};
|
98
|
+
export type enableStatusChanged = {
|
99
|
+
enabled: boolean;
|
100
|
+
data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
|
101
|
+
};
|
102
|
+
}
|
103
|
+
|
104
|
+
export namespace Role {
|
105
|
+
export type created = {
|
106
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
107
|
+
};
|
108
|
+
export type updated = {
|
109
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
110
|
+
};
|
111
|
+
export type deleted = {
|
112
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
113
|
+
};
|
114
|
+
export type restored = {
|
115
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
116
|
+
};
|
117
|
+
export type permissionsChanged = {
|
118
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
119
|
+
};
|
120
|
+
export type addUser = {
|
121
|
+
data: Partial<Levelup.V2.Auth.Entity.Role>;
|
122
|
+
};
|
123
|
+
}
|
124
|
+
|
125
|
+
export namespace Permission {
|
126
|
+
export type created = {
|
127
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
128
|
+
};
|
129
|
+
export type updated = {
|
130
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
131
|
+
};
|
132
|
+
export type deleted = {
|
133
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
134
|
+
};
|
135
|
+
export type restored = {
|
136
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
137
|
+
};
|
138
|
+
export type addRole = {
|
139
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
140
|
+
};
|
141
|
+
export type addUser = {
|
142
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>;
|
143
|
+
};
|
144
|
+
export type permissionListUpdated = {
|
145
|
+
data: Partial<Levelup.V2.Auth.Entity.Permission>[];
|
146
|
+
};
|
147
|
+
}
|
148
|
+
export namespace PermissionGroup {
|
149
|
+
export type created = {
|
150
|
+
data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
|
151
|
+
};
|
152
|
+
export type updated = {
|
153
|
+
data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
|
154
|
+
};
|
155
|
+
export type deleted = {
|
156
|
+
data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
|
157
|
+
};
|
158
|
+
export type restored = {
|
159
|
+
data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
|
160
|
+
};
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
/* -------------------------------------------------------------------------- */
|
165
|
+
/* CM */
|
166
|
+
/* -------------------------------------------------------------------------- */
|
167
|
+
export namespace Content {
|
168
|
+
export namespace Comment {
|
169
|
+
export type created = {
|
170
|
+
data: Partial<Levelup.V2.Cm.Entity.Comment>;
|
171
|
+
};
|
172
|
+
export type updated = {
|
173
|
+
data: Partial<Levelup.V2.Cm.Entity.Comment>;
|
174
|
+
};
|
175
|
+
export type deleted = {
|
176
|
+
data: Partial<Levelup.V2.Cm.Entity.Comment>;
|
177
|
+
};
|
178
|
+
export type restored = {
|
179
|
+
data: Partial<Levelup.V2.Cm.Entity.Comment>;
|
180
|
+
};
|
181
|
+
}
|
182
|
+
export namespace Review {
|
183
|
+
export type created = {
|
184
|
+
data: Partial<Levelup.V2.Cm.Entity.Review>;
|
185
|
+
};
|
186
|
+
export type updated = {
|
187
|
+
data: Partial<Levelup.V2.Cm.Entity.Review>;
|
188
|
+
};
|
189
|
+
export type deleted = {
|
190
|
+
data: Partial<Levelup.V2.Cm.Entity.Review>;
|
191
|
+
};
|
192
|
+
export type restored = {
|
193
|
+
data: Partial<Levelup.V2.Cm.Entity.Review>;
|
194
|
+
};
|
195
|
+
}
|
196
|
+
export namespace Article {
|
197
|
+
export type created = {
|
198
|
+
data: Partial<Levelup.V2.Cm.Entity.Article>;
|
199
|
+
};
|
200
|
+
export type updated = {
|
201
|
+
data: Partial<Levelup.V2.Cm.Entity.Article>;
|
202
|
+
};
|
203
|
+
export type deleted = {
|
204
|
+
data: Partial<Levelup.V2.Cm.Entity.Article>;
|
205
|
+
};
|
206
|
+
export type restored = {
|
207
|
+
data: Partial<Levelup.V2.Cm.Entity.Article>;
|
208
|
+
};
|
209
|
+
}
|
210
|
+
export namespace ArticleType {
|
211
|
+
export type created = {
|
212
|
+
data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
|
213
|
+
};
|
214
|
+
export type updated = {
|
215
|
+
data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
|
216
|
+
};
|
217
|
+
export type deleted = {
|
218
|
+
data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
|
219
|
+
};
|
220
|
+
export type restored = {
|
221
|
+
data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
|
222
|
+
};
|
223
|
+
}
|
224
|
+
export namespace Term {
|
225
|
+
export type created = { data: Partial<Levelup.V2.Cm.Entity.Term> };
|
226
|
+
export type updated = { data: Partial<Levelup.V2.Cm.Entity.Term> };
|
227
|
+
export type deleted = { data: Partial<Levelup.V2.Cm.Entity.Term> };
|
228
|
+
export type restored = { data: Partial<Levelup.V2.Cm.Entity.Term> };
|
229
|
+
}
|
230
|
+
export namespace Taxonomy {
|
231
|
+
export type created = {
|
232
|
+
data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
|
233
|
+
};
|
234
|
+
export type updated = {
|
235
|
+
data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
|
236
|
+
};
|
237
|
+
export type deleted = {
|
238
|
+
data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
|
239
|
+
};
|
240
|
+
export type restored = {
|
241
|
+
data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
|
242
|
+
};
|
243
|
+
}
|
244
|
+
export namespace Translation {
|
245
|
+
export namespace Item {
|
246
|
+
export type created = {
|
247
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
|
248
|
+
};
|
249
|
+
export type updated = {
|
250
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
|
251
|
+
};
|
252
|
+
export type deleted = {
|
253
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
|
254
|
+
};
|
255
|
+
export type restored = {
|
256
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
|
257
|
+
};
|
258
|
+
}
|
259
|
+
export namespace Project {
|
260
|
+
export type created = {
|
261
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
|
262
|
+
};
|
263
|
+
export type updated = {
|
264
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
|
265
|
+
};
|
266
|
+
export type deleted = {
|
267
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
|
268
|
+
};
|
269
|
+
export type restored = {
|
270
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
|
271
|
+
};
|
272
|
+
}
|
273
|
+
export namespace Namespace {
|
274
|
+
export type created = {
|
275
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
|
276
|
+
};
|
277
|
+
export type updated = {
|
278
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
|
279
|
+
};
|
280
|
+
export type deleted = {
|
281
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
|
282
|
+
};
|
283
|
+
export type restored = {
|
284
|
+
data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
|
285
|
+
};
|
286
|
+
}
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
/* -------------------------------------------------------------------------- */
|
291
|
+
/* STORAGE */
|
292
|
+
/* -------------------------------------------------------------------------- */
|
293
|
+
export namespace Storage {
|
294
|
+
export namespace UploadedFile {
|
295
|
+
export type created = {
|
296
|
+
data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
|
297
|
+
};
|
298
|
+
export type updated = {
|
299
|
+
data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
|
300
|
+
};
|
301
|
+
export type deleted = {
|
302
|
+
data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
|
303
|
+
};
|
304
|
+
export type restored = {
|
305
|
+
data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
|
306
|
+
};
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
/* -------------------------------------------------------------------------- */
|
311
|
+
/* SYSTEM */
|
312
|
+
/* -------------------------------------------------------------------------- */
|
313
|
+
export namespace System {
|
314
|
+
export namespace App {
|
315
|
+
export type created = {
|
316
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
317
|
+
};
|
318
|
+
export type updated = {
|
319
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
320
|
+
};
|
321
|
+
export type deleted = {
|
322
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
323
|
+
};
|
324
|
+
export type restored = {
|
325
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
326
|
+
};
|
327
|
+
export type disabled = {
|
328
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
329
|
+
};
|
330
|
+
export type enabled = {
|
331
|
+
data: Partial<Levelup.V2.System.Entity.App>;
|
332
|
+
};
|
333
|
+
}
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|
338
|
+
}
|
339
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export * from "./events/index.d.ts";
|
2
|
+
export * from "./lib/index.d.ts";
|
3
|
+
export * from "./modules/index.d.ts";
|
4
|
+
export * from "./sdk/index.d.ts";
|
5
|
+
export * from "./security/index.d.ts";
|
6
|
+
export * from "./services/index.d.ts";
|
7
|
+
export * from "./ui/index.d.ts";
|
8
|
+
export * from "./utils/index.d.ts";
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* @description project levelup
|
3
|
+
* @version 2.0.0
|
4
|
+
* @namespace Levelup
|
5
|
+
* @global
|
6
|
+
* @export Levelup
|
7
|
+
* @copyright drsalmi@icloud.com
|
8
|
+
* @name Salmi Ahmed
|
9
|
+
*/
|
10
|
+
declare module Levelup {
|
11
|
+
|
12
|
+
namespace CMS {
|
13
|
+
namespace V1 {
|
14
|
+
namespace Lib {
|
15
|
+
namespace ExecutionScenario {
|
16
|
+
export interface Scenario<T> {
|
17
|
+
method: string;
|
18
|
+
args: Record<string, any>;
|
19
|
+
authData: Levelup.V2.Security.AuthData;
|
20
|
+
execution: T
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
namespace CMS {
|
3
|
+
namespace V1 {
|
4
|
+
namespace Lib {
|
5
|
+
namespace Logger {
|
6
|
+
/**
|
7
|
+
* Represents the context of a logger instance.
|
8
|
+
*/
|
9
|
+
type InstanceContext =
|
10
|
+
| "APPLICATION"
|
11
|
+
| "MIDDLEWARE"
|
12
|
+
| "SUBSCRIBER"
|
13
|
+
| "BROKER"
|
14
|
+
| "MAPPER"
|
15
|
+
| "VALIDATOR"
|
16
|
+
| "SANITIZER"
|
17
|
+
| "COMPONENT"
|
18
|
+
| "UTILITY"
|
19
|
+
| "SEED"
|
20
|
+
| "SERVICE"
|
21
|
+
| "CONTROLLER"
|
22
|
+
| "LOADER"
|
23
|
+
| "MODEL"
|
24
|
+
| "REDUX"
|
25
|
+
| "HOOK"
|
26
|
+
| "PAGE"
|
27
|
+
| "MODAL"
|
28
|
+
| "GUARD"
|
29
|
+
| "FORM";
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Represents the log type of a logger instance.
|
33
|
+
*/
|
34
|
+
type LogType =
|
35
|
+
| "INFO"
|
36
|
+
| "WARN"
|
37
|
+
| "ERROR"
|
38
|
+
| "DEBUG"
|
39
|
+
| "SUCCESS"
|
40
|
+
| "SILLY"
|
41
|
+
| "HTTP"
|
42
|
+
| "EVENT"
|
43
|
+
| "VALUE";
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Represents the configuration of a logger instance.
|
47
|
+
*/
|
48
|
+
type InstanceConfig = unknown;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
namespace Express {
|
3
|
+
|
4
|
+
export interface Request {
|
5
|
+
auth?: (
|
6
|
+
| Levelup.V2.Security.JWTPaymentAuthPayload
|
7
|
+
| Levelup.V2.Security.JWTUserAuthPayload
|
8
|
+
) & {
|
9
|
+
iss?: string | undefined;
|
10
|
+
sub?: string | undefined;
|
11
|
+
aud?: string | string[] | undefined;
|
12
|
+
exp?: number | undefined;
|
13
|
+
nbf?: number | undefined;
|
14
|
+
iat?: number | undefined;
|
15
|
+
jti?: string | undefined;
|
16
|
+
};
|
17
|
+
|
18
|
+
current_token?: string | null;
|
19
|
+
jwt_expired?: boolean;
|
20
|
+
|
21
|
+
attached_entities: {
|
22
|
+
token?: string;
|
23
|
+
app?: Levelup.V2.System.Entity.App | null;
|
24
|
+
user?: Levelup.V2.Users.Entity.User | null;
|
25
|
+
api_key?: Levelup.V2.Auth.Entity.ExposedApiKey | null;
|
26
|
+
service?: {
|
27
|
+
name: string;
|
28
|
+
is_external: boolean;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
|
32
|
+
has_access_if?: {
|
33
|
+
filters?: {
|
34
|
+
user?: Levelup.V2.Utils.Common.ID;
|
35
|
+
};
|
36
|
+
condition?: () => boolean;
|
37
|
+
} | null;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
declare module 'mongoose' {
|
2
|
+
type MongooseFuzzySearchingField<T = any> =
|
3
|
+
| keyof T
|
4
|
+
| {
|
5
|
+
name: keyof T;
|
6
|
+
minSize?: number;
|
7
|
+
weight?: number;
|
8
|
+
prefixOnly?: boolean;
|
9
|
+
escapeSpecialCharacters?: boolean;
|
10
|
+
keys?: (string | number)[];
|
11
|
+
};
|
12
|
+
|
13
|
+
interface MongooseFuzzySearchingOptions<T extends Record<string, unknown>> {
|
14
|
+
fields?: MongooseFuzzySearchingField<T>[];
|
15
|
+
middlewares?: any;
|
16
|
+
}
|
17
|
+
|
18
|
+
interface MongooseFuzzySearchingParams {
|
19
|
+
query: string;
|
20
|
+
minSize?: string;
|
21
|
+
prefixOnly?: boolean;
|
22
|
+
exact?: boolean;
|
23
|
+
}
|
24
|
+
|
25
|
+
/**
|
26
|
+
* @deprecated this makes Model type = any
|
27
|
+
* FIXME: this makes Model type = any
|
28
|
+
*/
|
29
|
+
interface _Model<T extends Document> {
|
30
|
+
fuzzySearch(query: string | MongooseFuzzySearchingParams): Promise<T[]>;
|
31
|
+
}
|
32
|
+
|
33
|
+
type QueryWithFuzzySearch<Entity> = Query<(Entity & Document)[], Entity & Document, {}, Entity & Document> & {
|
34
|
+
// type QueryWithFuzzySearch<ResultType, DocType, THelpers = {}, RawDocType = DocType> = Query<ResultType, DocType, THelpers, RawDocType> & {
|
35
|
+
fuzzySearch?(query: string | MongooseFuzzySearchingParams): Query<(Entity & Document)[], Entity & Document, {}, Entity & Document>;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
declare module 'mongoose-fuzzy-searching';
|
40
|
+
|
41
|
+
declare module 'mongoose-fuzzy-searching/helpers' {
|
42
|
+
export function nGrams(
|
43
|
+
query: string,
|
44
|
+
escapeSpecialCharacters: boolean,
|
45
|
+
defaultNgamMinSize: number,
|
46
|
+
checkPrefixOnly: boolean
|
47
|
+
): string[];
|
48
|
+
}
|