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,130 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* @description project
|
4
|
+
*/
|
5
|
+
declare module Levelup {
|
6
|
+
namespace CMS {
|
7
|
+
namespace V1 {
|
8
|
+
namespace System {
|
9
|
+
|
10
|
+
export namespace Api {
|
11
|
+
|
12
|
+
export namespace Apps {
|
13
|
+
|
14
|
+
/**
|
15
|
+
* --------------------------------------------------------------------------
|
16
|
+
* Create
|
17
|
+
* --------------------------------------------------------------------------
|
18
|
+
* @link
|
19
|
+
* @fires AppsService.Create
|
20
|
+
* @param {Levelup.V2.System.Api.Apps.Create.Request} query
|
21
|
+
* @returns {Levelup.V2.System.Api.Apps.Create.Response}
|
22
|
+
* @method POST
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
export namespace Create {
|
26
|
+
export type Request = Utils.Api.Request.BuildCreateRequest<Entity.App>;
|
27
|
+
export type Response = Utils.Api.Response.BuildSingleItemResponse<Entity.App>;
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
/**
|
32
|
+
* --------------------------------------------------------------------------
|
33
|
+
* Update
|
34
|
+
* --------------------------------------------------------------------------
|
35
|
+
* @link
|
36
|
+
* @fires AppsService.Update
|
37
|
+
* @param {Levelup.V2.System.Api.Apps.Update.Request} query
|
38
|
+
* @returns {Levelup.V2.System.Api.Apps.Update.Response}
|
39
|
+
* @method PUT
|
40
|
+
*
|
41
|
+
*/
|
42
|
+
export namespace Update {
|
43
|
+
export type Request = Utils.Api.Request.BuildUpdateRequest<Entity.App>;
|
44
|
+
export type Response = Utils.Api.Response.BuildSingleItemResponse<Entity.App>;
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* --------------------------------------------------------------------------
|
49
|
+
* Delete
|
50
|
+
* --------------------------------------------------------------------------
|
51
|
+
* @link
|
52
|
+
* @fires AppsService.Delete
|
53
|
+
* @param {Levelup.V2.System.Api.Apps.Delete.Request} query
|
54
|
+
* @returns {Levelup.V2.System.Api.Apps.Delete.Response}
|
55
|
+
* @method DELETE
|
56
|
+
*
|
57
|
+
*/
|
58
|
+
export namespace Delete {
|
59
|
+
export type Response = Utils.Api.Response.DefaultDeleteResponse;
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
/**
|
64
|
+
* --------------------------------------------------------------------------
|
65
|
+
* BulkDelete
|
66
|
+
* --------------------------------------------------------------------------
|
67
|
+
* @link
|
68
|
+
* @fires AppsService.BulkDelete
|
69
|
+
* @param {Levelup.V2.System.Api.Apps.BulkDelete.Request} query
|
70
|
+
* @returns {Levelup.V2.System.Api.Apps.BulkDelete.Response}
|
71
|
+
* @method DELETE
|
72
|
+
*
|
73
|
+
*/
|
74
|
+
export namespace BulkDelete {
|
75
|
+
export type Request = Utils.Api.Request.Build<{
|
76
|
+
data: {
|
77
|
+
id?: string[];
|
78
|
+
tracking_id?: string[];
|
79
|
+
}
|
80
|
+
}>
|
81
|
+
export type Response = Utils.Api.Response.DefaultDeleteResponse;
|
82
|
+
}
|
83
|
+
|
84
|
+
/**
|
85
|
+
* --------------------------------------------------------------------------
|
86
|
+
* GetOne
|
87
|
+
* --------------------------------------------------------------------------
|
88
|
+
* @link
|
89
|
+
* @fires AppsService.GetOne
|
90
|
+
* @param {Levelup.V2.System.Api.Apps.GetOne.Request} query
|
91
|
+
* @returns {Levelup.V2.System.Api.Apps.GetOne.Response}
|
92
|
+
* @method GET
|
93
|
+
*
|
94
|
+
*/
|
95
|
+
export namespace GetOne {
|
96
|
+
type Scope = '';
|
97
|
+
export type Request = Utils.Api.Request.Build<Record<string, unknown>>
|
98
|
+
export type Response = Utils.Api.Response.BuildSingleItemResponse<Entity.App>
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* --------------------------------------------------------------------------
|
103
|
+
* List
|
104
|
+
* --------------------------------------------------------------------------
|
105
|
+
* @link
|
106
|
+
* @fires AppsService.List
|
107
|
+
* @param {Levelup.V2.System.Api.Apps.List.Request} query
|
108
|
+
* @returns {Levelup.V2.System.Api.Apps.List.Response}
|
109
|
+
* @method GET
|
110
|
+
*
|
111
|
+
*/
|
112
|
+
export namespace List {
|
113
|
+
type Scope = 'listing' | 'ids' | 'trackings';
|
114
|
+
|
115
|
+
export type Request = Utils.Api.Request.BuildSearchablePagedSortableFilterableProjectable<Entity.App> & {
|
116
|
+
scope?: Scope;
|
117
|
+
filters?: {
|
118
|
+
/**
|
119
|
+
* Here will be the custom filters
|
120
|
+
*/
|
121
|
+
};
|
122
|
+
}
|
123
|
+
export type Response = Utils.Api.Response.BuildListResponse<Entity.App>
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
namespace CMS {
|
3
|
+
namespace V1 {
|
4
|
+
namespace System {
|
5
|
+
|
6
|
+
export namespace Entity {
|
7
|
+
/**
|
8
|
+
* Represents the settings for an app.
|
9
|
+
*/
|
10
|
+
export interface IAppSettings {
|
11
|
+
/**
|
12
|
+
* The listing configuration.
|
13
|
+
*/
|
14
|
+
listing?: {
|
15
|
+
/**
|
16
|
+
* The default listing count.
|
17
|
+
* - better value of table list is 25
|
18
|
+
* - better value of grid list is 24
|
19
|
+
*/
|
20
|
+
default_count: number;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* The locales configuration.
|
24
|
+
*/
|
25
|
+
locales?: {
|
26
|
+
/**
|
27
|
+
* The default language for the app.
|
28
|
+
*/
|
29
|
+
default_language: Levelup.V2.ContentManagement.Entity.TranslationManager.TLanguageCode;
|
30
|
+
/**
|
31
|
+
* The supported languages for the app.
|
32
|
+
*/
|
33
|
+
supported_languages: Levelup.V2.ContentManagement.Entity.TranslationManager.TLanguageCode[];
|
34
|
+
};
|
35
|
+
/**
|
36
|
+
* The locations configuration.
|
37
|
+
*/
|
38
|
+
locations?: {
|
39
|
+
/**
|
40
|
+
* The default country for the app.
|
41
|
+
* null if not related to a specific country.
|
42
|
+
*/
|
43
|
+
default_country: string | null;
|
44
|
+
/**
|
45
|
+
* The supported countries for the app.
|
46
|
+
*/
|
47
|
+
supported_countries: string[];
|
48
|
+
/**
|
49
|
+
* The default currency for the app.
|
50
|
+
* null if not related to a specific currency.
|
51
|
+
*/
|
52
|
+
default_currency: string | null;
|
53
|
+
/**
|
54
|
+
* The supported currencies for the app.
|
55
|
+
*/
|
56
|
+
supported_currencies: string[];
|
57
|
+
};
|
58
|
+
}
|
59
|
+
|
60
|
+
export interface IAppAttributes {
|
61
|
+
is_suspended?: boolean;
|
62
|
+
}
|
63
|
+
|
64
|
+
export interface IAppInsights {
|
65
|
+
company_count?: number;
|
66
|
+
store_count?: number;
|
67
|
+
user_count?: number;
|
68
|
+
}
|
69
|
+
|
70
|
+
export interface App extends Utils.Entity.General.IHasSearchMeta {
|
71
|
+
_id: Utils.Common.ID;
|
72
|
+
created_at?: Date;
|
73
|
+
updated_at?: Date;
|
74
|
+
is_deleted?: boolean;
|
75
|
+
deleted_at?: Date;
|
76
|
+
created_by: Utils.Common.ID;
|
77
|
+
owner: Utils.Common.ID;
|
78
|
+
name: string;
|
79
|
+
description: string;
|
80
|
+
logo: Utils.Common.FileAttribute;
|
81
|
+
|
82
|
+
enabled_services: TService[];
|
83
|
+
//
|
84
|
+
settings: IAppSettings;
|
85
|
+
attributes: IAppAttributes;
|
86
|
+
insights: IAppInsights;
|
87
|
+
//
|
88
|
+
token: string;
|
89
|
+
encryptedKey: string;
|
90
|
+
salt: string;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
@@ -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
|
+
namespace Levelup {
|
8
|
+
namespace CMS {
|
9
|
+
namespace V1 {
|
10
|
+
namespace System {
|
11
|
+
export namespace Model {
|
12
|
+
export type AppDocument = Entity.App & Document;
|
13
|
+
export type App = MongooseModel<AppDocument>;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "../routes/routes.js";
|
@@ -0,0 +1,189 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
|
9
|
+
export type AnyField = keyof OptionTypes;
|
10
|
+
export type FieldType = keyof FilterMenu.OptionTypes;
|
11
|
+
export type OptionType<FieldType> = OptionTypes[FieldType];
|
12
|
+
|
13
|
+
|
14
|
+
export type OnChangeValue<
|
15
|
+
Option,
|
16
|
+
IsMulti extends boolean
|
17
|
+
> = IsMulti extends true ? MultiValue<Option> : SingleValue<Option>;
|
18
|
+
|
19
|
+
type ExtendFieldProps<T> = T &
|
20
|
+
Partial<{
|
21
|
+
role_group:
|
22
|
+
| Levelup.V2.Auth.Entity.TRoleGroup
|
23
|
+
| Levelup.V2.Auth.Entity.TRoleGroup[];
|
24
|
+
}>;
|
25
|
+
|
26
|
+
export type Field<
|
27
|
+
T extends keyof OptionTypes,
|
28
|
+
IsMulti extends boolean = false
|
29
|
+
> =
|
30
|
+
| ExtendFieldProps<{
|
31
|
+
label: string;
|
32
|
+
isMulti?: false;
|
33
|
+
value: SingleValue<OptionType<T>>;
|
34
|
+
type: T;
|
35
|
+
source?:
|
36
|
+
| "companies"
|
37
|
+
| "offices"
|
38
|
+
| "users"
|
39
|
+
| "deliverers"
|
40
|
+
| "roles"
|
41
|
+
| "permissions"
|
42
|
+
| "productCategories"
|
43
|
+
| "warehouses"
|
44
|
+
| "vehicleTypes"
|
45
|
+
| "stores"
|
46
|
+
| string[];
|
47
|
+
}>
|
48
|
+
| ExtendFieldProps<{
|
49
|
+
label: string;
|
50
|
+
isMulti?: true;
|
51
|
+
value: MultiValue<OptionType<T>>;
|
52
|
+
type: T;
|
53
|
+
source?:
|
54
|
+
| "companies"
|
55
|
+
| "offices"
|
56
|
+
| "users"
|
57
|
+
| "deliverers"
|
58
|
+
| "roles"
|
59
|
+
| "permissions"
|
60
|
+
| "productCategories"
|
61
|
+
| "warehouses"
|
62
|
+
| "vehicleTypes"
|
63
|
+
| "stores"
|
64
|
+
| string[];
|
65
|
+
}>;
|
66
|
+
|
67
|
+
export type Fields<
|
68
|
+
T extends { [field: string]: Field } = { [field: string]: Field }
|
69
|
+
> = { [field: string]: Field };
|
70
|
+
|
71
|
+
export type FilterValue<T> = {
|
72
|
+
[property in keyof T]: T[property]["value"];
|
73
|
+
};
|
74
|
+
|
75
|
+
export type ComponentProps<
|
76
|
+
T extends Fields = { [field: string]: Field }
|
77
|
+
> = {
|
78
|
+
filter: T;
|
79
|
+
onChange: (
|
80
|
+
value: FilterValue<T>,
|
81
|
+
label: {
|
82
|
+
[field: string]: {
|
83
|
+
label: string;
|
84
|
+
value: LabelType;
|
85
|
+
};
|
86
|
+
}
|
87
|
+
) => void;
|
88
|
+
type?: TComponentType;
|
89
|
+
controlsPosition?: "both" | "bottom" | "top";
|
90
|
+
className?: string;
|
91
|
+
clearField?: (field: string) => void;
|
92
|
+
clearAll?: () => void;
|
93
|
+
omitFields?: Array<keyof T>;
|
94
|
+
};
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
export type SingleValue<Option> = Option | null;
|
101
|
+
export type MultiValue<Option> = Option[];
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
type BaseFieldOption<Input, IsMulti extends boolean = false> = {
|
107
|
+
label?: string;
|
108
|
+
required?: boolean;
|
109
|
+
default_value?: IsMulti extends true ? MultiValue<Input> : SingleValue<Input>;
|
110
|
+
}
|
111
|
+
|
112
|
+
type CustomFieldType =
|
113
|
+
| 'article_object'
|
114
|
+
| 'boolean'
|
115
|
+
| 'checkbox'
|
116
|
+
| 'date_range'
|
117
|
+
| 'date'
|
118
|
+
| 'file'
|
119
|
+
| 'image'
|
120
|
+
| 'number'
|
121
|
+
| 'radiobox'
|
122
|
+
| 'select'
|
123
|
+
| 'text'
|
124
|
+
| 'time';
|
125
|
+
|
126
|
+
type MetaFieldInput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
127
|
+
T extends 'article_object' ? ArticleObjectField.Input<IsMulti> :
|
128
|
+
T extends 'boolean' ? BooleanField.Input :
|
129
|
+
T extends 'checkbox' ? CheckboxField.Input :
|
130
|
+
T extends 'date_range' ? DateRangeField.Input :
|
131
|
+
T extends 'date' ? DateField.Input :
|
132
|
+
T extends 'file' ? FileField.Input<IsMulti> :
|
133
|
+
T extends 'image' ? ImageField.Input<IsMulti> :
|
134
|
+
T extends 'number' ? NumberField.Input :
|
135
|
+
T extends 'radiobox' ? RadioboxField.Input :
|
136
|
+
T extends 'select' ? SelectField.Input<IsMulti> :
|
137
|
+
T extends 'text' ? TextField.Input :
|
138
|
+
T extends 'time' ? TimeField.Input :
|
139
|
+
never;
|
140
|
+
|
141
|
+
type MetaFieldOutput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
142
|
+
T extends 'article_object' ? ArticleObjectField.Output<IsMulti> :
|
143
|
+
T extends 'boolean' ? BooleanField.Output :
|
144
|
+
T extends 'checkbox' ? CheckboxField.Output :
|
145
|
+
T extends 'date_range' ? DateRangeField.Output :
|
146
|
+
T extends 'date' ? DateField.Output :
|
147
|
+
T extends 'file' ? FileField.Output<IsMulti> :
|
148
|
+
T extends 'image' ? ImageField.Output<IsMulti> :
|
149
|
+
T extends 'number' ? NumberField.Output :
|
150
|
+
T extends 'radiobox' ? RadioboxField.Output :
|
151
|
+
T extends 'select' ? SelectField.Output<IsMulti> :
|
152
|
+
T extends 'text' ? TextField.Output :
|
153
|
+
T extends 'time' ? TimeField.Output :
|
154
|
+
never;
|
155
|
+
|
156
|
+
type MetaField<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
157
|
+
field_key: string;
|
158
|
+
field_label: string;
|
159
|
+
field_type: T;
|
160
|
+
field_options: T extends 'article_object' ? ArticleObjectField.Options<IsMulti> :
|
161
|
+
T extends 'boolean' ? BooleanField.Options :
|
162
|
+
T extends 'checkbox' ? CheckboxField.Options :
|
163
|
+
T extends 'date_range' ? DateRangeField.Options :
|
164
|
+
T extends 'date' ? DateField.Options :
|
165
|
+
T extends 'file' ? FileField.Options<IsMulti> :
|
166
|
+
T extends 'image' ? ImageField.Options<IsMulti> :
|
167
|
+
T extends 'number' ? NumberField.Options :
|
168
|
+
T extends 'radiobox' ? RadioboxField.Options :
|
169
|
+
T extends 'select' ? SelectField.Options<IsMulti> :
|
170
|
+
T extends 'text' ? TextField.Options :
|
171
|
+
T extends 'time' ? TimeField.Options :
|
172
|
+
never;
|
173
|
+
}
|
174
|
+
|
175
|
+
type MetaFieldInputProps<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
176
|
+
label: string;
|
177
|
+
required: MetaField<T, IsMulti>['field_options']['required'];
|
178
|
+
default_value: MetaField<T, IsMulti>['field_options']['default_value'] | null;
|
179
|
+
options: MetaField<T, IsMulti>['field_options'];
|
180
|
+
value: MetaFieldInput<T, IsMulti>;
|
181
|
+
onChange: (value: MetaFieldInput<T, IsMulti>) => void | PromiseLike<void>;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace ArticleObjectField {
|
9
|
+
|
10
|
+
export type Key = "article_object";
|
11
|
+
|
12
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.ID[] : Utils.Common.ID | null;
|
13
|
+
|
14
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true
|
15
|
+
? Content.Entity.Article[]
|
16
|
+
: Content.Entity.Article | null;
|
17
|
+
|
18
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input, IsMulti> & {
|
19
|
+
multiple: IsMulti;
|
20
|
+
type: Utils.Common.Name;
|
21
|
+
filter: Content.Api.Articles.List.Request['filters'];
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace BooleanField {
|
9
|
+
|
10
|
+
export type Key = "boolean";
|
11
|
+
|
12
|
+
export type Input = boolean;
|
13
|
+
|
14
|
+
export type Output = boolean;
|
15
|
+
|
16
|
+
export type Options = BaseFieldOption<Input, false> & {
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace CheckboxField {
|
9
|
+
|
10
|
+
|
11
|
+
export type Key = "checkbox";
|
12
|
+
|
13
|
+
export type Input = MultiValue<string>;
|
14
|
+
|
15
|
+
export type Output = MultiValue<Utils.Common.TLabelValue>;
|
16
|
+
|
17
|
+
export type Options = BaseFieldOption<Input, false> & {
|
18
|
+
choices: MultiValue<Utils.Common.TLabelValue>
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace DateField {
|
9
|
+
|
10
|
+
export type Key = "date";
|
11
|
+
|
12
|
+
export type Input = Date | null;
|
13
|
+
|
14
|
+
export type Output = Input;
|
15
|
+
|
16
|
+
export type Options = BaseFieldOption<Input, false> & {};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace DateRangeField {
|
9
|
+
|
10
|
+
export type Key = "date_range";
|
11
|
+
|
12
|
+
export type Input = {
|
13
|
+
start: Date | null;
|
14
|
+
end: Date | null;
|
15
|
+
} | null;
|
16
|
+
|
17
|
+
export type Output = Input;
|
18
|
+
|
19
|
+
export type Options = BaseFieldOption<Input, false> & {};
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
declare module Levelup {
|
3
|
+
|
4
|
+
namespace CMS {
|
5
|
+
namespace V1 {
|
6
|
+
export namespace UI {
|
7
|
+
export namespace Forms {
|
8
|
+
export namespace CustomFields {
|
9
|
+
export namespace FileField {
|
10
|
+
|
11
|
+
export type Key = "file";
|
12
|
+
|
13
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.FileAttribute[] : Utils.Common.FileAttribute | null;
|
14
|
+
|
15
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.FileAttribute[] : Utils.Common.FileAttribute | null;
|
16
|
+
|
17
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input, IsMulti> & {
|
18
|
+
multiple: IsMulti;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace ImageField {
|
9
|
+
|
10
|
+
export type Key = "image";
|
11
|
+
|
12
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.FileAttribute[] : Utils.Common.FileAttribute | null;
|
13
|
+
|
14
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.FileAttribute[] : Utils.Common.FileAttribute | null;
|
15
|
+
|
16
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input, IsMulti> & {
|
17
|
+
multiple: IsMulti;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export * from "./article_object.custom-field.d.ts";
|
2
|
+
export * from "./boolean.custom-field.d.ts";
|
3
|
+
export * from "./checkbox.custom-field.d.ts";
|
4
|
+
export * from "./date.custom-field.d.ts";
|
5
|
+
export * from "./file.custom-field.d.ts";
|
6
|
+
export * from "./image.custom-field.d.ts";
|
7
|
+
export * from "./number.custom-field.d.ts";
|
8
|
+
export * from "./select.custom-field.d.ts";
|
9
|
+
export * from "./text.custom-field.d.ts";
|
10
|
+
export * from "./time.custom-field.d.ts";
|
11
|
+
export * from "./radiobox.custom-field.d.ts";
|
@@ -0,0 +1,26 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace UI {
|
6
|
+
export namespace Forms {
|
7
|
+
export namespace CustomFields {
|
8
|
+
export namespace NumberField {
|
9
|
+
|
10
|
+
export type Key = "number";
|
11
|
+
|
12
|
+
export type Input = number | null;
|
13
|
+
|
14
|
+
export type Output = Input;
|
15
|
+
|
16
|
+
export type Options = BaseFieldOption<Input, false> & {
|
17
|
+
min: number;
|
18
|
+
max: number;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|