jourycms-sdk 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/typings/v1/cache-manager/entity.d.ts +12 -1
- package/typings/v1/index.d.ts +1 -0
- package/typings/v1/services/auth/api/auth.d.ts +5 -1
- package/typings/v1/services/auth/entities/role.d.ts +7 -1
- package/typings/v1/services/auth/entities/user.d.ts +1 -56
- package/typings/v1/services/content/api/article.d.ts +3 -2
- package/typings/v1/services/content/entities/article-type.d.ts +2 -2
- package/typings/v1/services/content/entities/article.d.ts +3 -5
- package/typings/v1/services/content/entities/comment.d.ts +1 -1
- package/typings/v1/services/content/entities/custom-fieds/custom-field.d.ts +160 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/article_object.custom-field.d.ts +27 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/boolean.custom-field.d.ts +22 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/checkbox.custom-field.d.ts +24 -0
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date_range.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/file.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/image.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/number.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/radiobox.custom-field.d.ts +5 -7
- package/typings/v1/services/content/entities/custom-fieds/fields/select.custom-field.d.ts +25 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/text.custom-field.d.ts +24 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/time.custom-field.d.ts +22 -0
- package/typings/v1/services/content/entities/custom-fieds/index.d.ts +2 -0
- package/typings/v1/services/content/entities/review.d.ts +1 -1
- package/typings/v1/services/content/entities/taxonomy.d.ts +1 -1
- package/typings/v1/services/content/entities/term.d.ts +1 -1
- package/typings/v1/services/storage/entities/uploaded-file.d.ts +0 -2
- package/typings/v1/services/system/entities/config.d.ts +40 -0
- package/typings/v1/theme/component.d.ts +9 -0
- package/typings/v1/theme/index.d.ts +3 -0
- package/typings/v1/theme/layout.d.ts +10 -0
- package/typings/v1/theme/page.d.ts +9 -0
- package/typings/v1/ui/forms/article/index.d.ts +0 -1
- package/typings/v1/ui/routes/icons.d.ts +28 -0
- package/typings/v1/ui/routes/index.d.ts +1 -0
- package/typings/v1/ui/routes/routes.d.ts +0 -19
- package/typings/v1/utils/api/request.d.ts +34 -31
- package/typings/v1/utils/api/response.d.ts +20 -54
- package/typings/v1/utils/common/common.d.ts +5 -0
- package/typings/v1/utils/entities/snapshots.d.ts +0 -11
- package/typings/v1/utils/system/models.d.ts +18 -16
- package/typings/v1/utils/utils.d.ts +3 -0
- package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +0 -189
- package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +0 -29
- package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +0 -24
- package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +0 -26
- package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +0 -27
- package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +0 -26
- package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +0 -24
- package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +0 -1
- /package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/index.d.ts +0 -0
package/package.json
CHANGED
@@ -59,13 +59,24 @@ declare module Levelup {
|
|
59
59
|
: // system
|
60
60
|
E extends "app"
|
61
61
|
? System.Api.Apps.List.Request
|
62
|
+
|
63
|
+
: // content
|
64
|
+
E extends "article"
|
65
|
+
? Content.Api.Articles.List.Request
|
66
|
+
: E extends "articleType"
|
67
|
+
? Content.Api.ArticleTypes.List.Request
|
68
|
+
: E extends "taxonomy"
|
69
|
+
? Content.Api.Taxonomies.List.Request
|
70
|
+
: E extends "term"
|
71
|
+
? Content.Api.Terms.List.Request
|
72
|
+
|
62
73
|
: never;
|
63
74
|
|
64
75
|
|
65
76
|
|
66
77
|
|
67
78
|
export type TListQueryParams<E extends TEntity> =
|
68
|
-
E extends Levelup.CMS.V1.
|
79
|
+
E extends Levelup.CMS.V1.Utils.SystemStructure.Models.AllModels
|
69
80
|
? Levelup.CMS.V1.CacheManager.TLevelupListQueryParams<E>
|
70
81
|
: never;
|
71
82
|
}
|
package/typings/v1/index.d.ts
CHANGED
@@ -18,7 +18,11 @@ declare module Levelup {
|
|
18
18
|
export namespace Signup {
|
19
19
|
export type Request =
|
20
20
|
Levelup.CMS.V1.Utils.Api.Request.BuildCreateRequest<{
|
21
|
-
|
21
|
+
account_type: 'agency' | 'doctor' | 'escort';
|
22
|
+
address: Utils.Entity.Snapshots.Locations.Address;
|
23
|
+
first_name: string;
|
24
|
+
family_name: string;
|
25
|
+
sex: Users.Entity.Sex | null;
|
22
26
|
email: string;
|
23
27
|
password: string;
|
24
28
|
}>;
|
@@ -3,9 +3,15 @@ declare module Levelup {
|
|
3
3
|
namespace V1 {
|
4
4
|
namespace Auth {
|
5
5
|
export namespace Entity {
|
6
|
+
|
7
|
+
export type TDefaultUserRoles =
|
8
|
+
| "admin"
|
9
|
+
| "agency"
|
10
|
+
| "escort"
|
11
|
+
| "doctor"
|
6
12
|
export interface Role
|
7
13
|
extends Utils.Entity.General.ICreatable,
|
8
|
-
|
14
|
+
Utils.Entity.General.IHasSearchMeta {
|
9
15
|
_id: Utils.Common.ID;
|
10
16
|
is_system: boolean;
|
11
17
|
is_company_related: boolean;
|
@@ -14,8 +14,6 @@ declare module Levelup {
|
|
14
14
|
phones: string[];
|
15
15
|
website: string | null;
|
16
16
|
address: Utils.Entity.Snapshots.Locations.Address;
|
17
|
-
has_work_address: boolean;
|
18
|
-
work_address: Utils.Entity.Snapshots.Locations.Address | null;
|
19
17
|
social_links?: {
|
20
18
|
network: Utils.Common.SocialNetworks;
|
21
19
|
url: string;
|
@@ -45,15 +43,6 @@ declare module Levelup {
|
|
45
43
|
export interface IUserInsights {
|
46
44
|
last_updated: Date | null;
|
47
45
|
rating: number;
|
48
|
-
parcel_count: number;
|
49
|
-
delivered_parcel_count: number;
|
50
|
-
returned_parcel_count: number;
|
51
|
-
delivered_parcel_percentage: number;
|
52
|
-
returned_parcel_percentage: number;
|
53
|
-
complaint_count: number;
|
54
|
-
resolved_complaint_count: number;
|
55
|
-
resolved_complaint_percentage: number;
|
56
|
-
balance: number;
|
57
46
|
}
|
58
47
|
|
59
48
|
export interface IUserAttributes {
|
@@ -63,54 +52,11 @@ declare module Levelup {
|
|
63
52
|
inactive_since?: Date | null;
|
64
53
|
|
65
54
|
nid?: string | null;
|
66
|
-
driving_license_id?: string | null;
|
67
55
|
started_at?: Date | null;
|
68
|
-
|
69
|
-
multi_office_user?: {
|
70
|
-
is_related_to_offices?: boolean;
|
71
|
-
can_manage_all_offices?: boolean;
|
72
|
-
subscribed_at_office?: Utils.Common.ID | null;
|
73
|
-
managed_offices?: Utils.Common.ID[];
|
74
|
-
last_managed_office?: Utils.Common.ID | null;
|
75
|
-
} | null;
|
76
|
-
|
77
|
-
seller?: {
|
78
|
-
stores: Utils.Common.ID[];
|
79
|
-
last_managed_store?: Utils.Common.ID;
|
80
|
-
} | null;
|
81
|
-
|
82
|
-
deliverer?: {
|
83
|
-
countries?: Utils.Common.LocationAdministrativeCode[];
|
84
|
-
states?: Utils.Common.LocationAdministrativeCode[];
|
85
|
-
cities?: Utils.Common.LocationAdministrativeCode[];
|
86
|
-
is_freelancer?: boolean;
|
87
|
-
default_delivery_fees?: number;
|
88
|
-
delivery_fees?: {
|
89
|
-
city: {
|
90
|
-
country: Utils.Common.LocationAdministrativeCode;
|
91
|
-
state: Utils.Common.LocationAdministrativeCode;
|
92
|
-
city: Utils.Common.LocationAdministrativeCode;
|
93
|
-
};
|
94
|
-
is_default: boolean;
|
95
|
-
fees: number;
|
96
|
-
}[];
|
97
|
-
} | null;
|
98
|
-
|
99
|
-
team?: {
|
100
|
-
has_team: boolean;
|
101
|
-
team?: {
|
102
|
-
leader: string;
|
103
|
-
members: string[];
|
104
|
-
};
|
105
|
-
};
|
56
|
+
related_article?: string | null;
|
106
57
|
}
|
107
58
|
|
108
59
|
export interface IUserSnapshots {
|
109
|
-
stores?: Utils.Entity.Snapshots.Accounts.Store[];
|
110
|
-
company?: Utils.Entity.Snapshots.Accounts.Company;
|
111
|
-
offices?: Utils.Entity.Snapshots.Logistics.Office[];
|
112
|
-
team_leader?: Utils.Entity.Snapshots.Auth.User;
|
113
|
-
team_members?: Utils.Entity.Snapshots.Auth.User[];
|
114
60
|
}
|
115
61
|
|
116
62
|
export interface User
|
@@ -128,7 +74,6 @@ declare module Levelup {
|
|
128
74
|
|
129
75
|
profile: IUserProfile;
|
130
76
|
preferences?: IUserPreferences;
|
131
|
-
deliverer_data?: IDelivererData;
|
132
77
|
attributes: IUserAttributes;
|
133
78
|
snapshots?: IUserSnapshots;
|
134
79
|
insights?: IUserInsights;
|
@@ -73,7 +73,7 @@ declare module Levelup {
|
|
73
73
|
export namespace GetOne {
|
74
74
|
export type Request = Utils.Api.Request.Build<{}>;
|
75
75
|
export type Response<T extends Entity.Article = Entity.Article> =
|
76
|
-
Utils.Api.Response.BuildSingleItemResponse<T>;
|
76
|
+
Utils.Api.Response.BuildSingleItemResponse<T, 'users' | 'article_types' | 'linked_articles'>;
|
77
77
|
}
|
78
78
|
|
79
79
|
/**
|
@@ -95,10 +95,11 @@ declare module Levelup {
|
|
95
95
|
Entity.Article & {
|
96
96
|
tag: any;
|
97
97
|
tag_slug: any;
|
98
|
+
populate_linked_articles: Utils.Api.Request.TProjectableFields<Entity.Article>[] | boolean;
|
98
99
|
}
|
99
100
|
>;
|
100
101
|
export type Response<T extends Entity.Article = Entity.Article> =
|
101
|
-
Utils.Api.Response.BuildListResponse<T>;
|
102
|
+
Utils.Api.Response.BuildListResponse<T, 'users' | 'article_types' | 'linked_articles'>;
|
102
103
|
}
|
103
104
|
}
|
104
105
|
}
|
@@ -6,7 +6,7 @@ declare module Levelup {
|
|
6
6
|
type ICustomMetaField = {
|
7
7
|
field_key: string;
|
8
8
|
field_label: string;
|
9
|
-
field_type:
|
9
|
+
field_type: CustomFields.CustomFieldType;
|
10
10
|
field_options: {
|
11
11
|
[Key: string]: any;
|
12
12
|
};
|
@@ -36,7 +36,7 @@ declare module Levelup {
|
|
36
36
|
};
|
37
37
|
description: string;
|
38
38
|
description_unformatted: string;
|
39
|
-
description_structured:
|
39
|
+
description_structured: JSONContent;
|
40
40
|
|
41
41
|
custom_meta_fields: ICustomMetaField[];
|
42
42
|
related_taxonomies: Utils.Common.ID[];
|
@@ -18,7 +18,7 @@ declare module Levelup {
|
|
18
18
|
|
19
19
|
export interface Article
|
20
20
|
extends Utils.Entity.General.ICreatable,
|
21
|
-
|
21
|
+
Utils.Entity.General.IHasSearchMeta {
|
22
22
|
_type: Utils.Common.ID | null;
|
23
23
|
_id: Utils.Common.ID;
|
24
24
|
slug: string;
|
@@ -26,13 +26,11 @@ declare module Levelup {
|
|
26
26
|
body: string;
|
27
27
|
body_unformatted: string;
|
28
28
|
body_structured: { [Key: string]: any };
|
29
|
-
|
29
|
+
is_published: boolean;
|
30
|
+
published_at: Date | null;
|
30
31
|
is_featured: boolean;
|
31
|
-
|
32
32
|
featured_image: Utils.Common.FileAttribute | null;
|
33
|
-
|
34
33
|
article_type: Utils.Common.ID;
|
35
|
-
|
36
34
|
related_tags: {
|
37
35
|
_id: Utils.Common.ID;
|
38
36
|
taxonomy: Utils.Common.ID;
|
@@ -0,0 +1,160 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export type AnyField = keyof OptionTypes;
|
8
|
+
export type FieldType = keyof FilterMenu.OptionTypes;
|
9
|
+
export type OptionType<FieldType> = OptionTypes[FieldType];
|
10
|
+
type ExtendFieldProps<T> = T &
|
11
|
+
Partial<{
|
12
|
+
}>;
|
13
|
+
|
14
|
+
type BaseFieldOption<Input, IsMulti extends boolean = false> = {
|
15
|
+
label?: string;
|
16
|
+
required?: boolean;
|
17
|
+
default_value?: IsMulti extends true ? Utils.Common.MultiValue<Input> : Utils.Common.SingleValue<Input>;
|
18
|
+
}
|
19
|
+
|
20
|
+
type CustomFieldType =
|
21
|
+
| 'article_object'
|
22
|
+
| 'boolean'
|
23
|
+
| 'checkbox'
|
24
|
+
| 'date_range'
|
25
|
+
| 'date'
|
26
|
+
| 'file'
|
27
|
+
| 'image'
|
28
|
+
| 'number'
|
29
|
+
| 'radiobox'
|
30
|
+
| 'select'
|
31
|
+
| 'text'
|
32
|
+
| 'time';
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
type MetaFieldInput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
37
|
+
T extends 'article_object' ? ArticleObjectField.Input<IsMulti> :
|
38
|
+
T extends 'boolean' ? BooleanField.Input :
|
39
|
+
T extends 'checkbox' ? CheckboxField.Input :
|
40
|
+
T extends 'date_range' ? DateRangeField.Input :
|
41
|
+
T extends 'date' ? DateField.Input :
|
42
|
+
T extends 'file' ? FileField.Input<IsMulti> :
|
43
|
+
T extends 'image' ? ImageField.Input<IsMulti> :
|
44
|
+
T extends 'number' ? NumberField.Input :
|
45
|
+
T extends 'radiobox' ? RadioboxField.Input :
|
46
|
+
T extends 'select' ? SelectField.Input<IsMulti> :
|
47
|
+
T extends 'text' ? TextField.Input :
|
48
|
+
T extends 'time' ? TimeField.Input :
|
49
|
+
never;
|
50
|
+
|
51
|
+
type MetaFieldOutput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
52
|
+
T extends 'article_object' ? ArticleObjectField.Output<IsMulti> :
|
53
|
+
T extends 'boolean' ? BooleanField.Output :
|
54
|
+
T extends 'checkbox' ? CheckboxField.Output :
|
55
|
+
T extends 'date_range' ? DateRangeField.Output :
|
56
|
+
T extends 'date' ? DateField.Output :
|
57
|
+
T extends 'file' ? FileField.Output<IsMulti> :
|
58
|
+
T extends 'image' ? ImageField.Output<IsMulti> :
|
59
|
+
T extends 'number' ? NumberField.Output :
|
60
|
+
T extends 'radiobox' ? RadioboxField.Output :
|
61
|
+
T extends 'select' ? SelectField.Output<IsMulti> :
|
62
|
+
T extends 'text' ? TextField.Output :
|
63
|
+
T extends 'time' ? TimeField.Output :
|
64
|
+
never;
|
65
|
+
|
66
|
+
type MetaField<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
67
|
+
field_key: string;
|
68
|
+
field_label: string;
|
69
|
+
field_type: T;
|
70
|
+
field_options: T extends 'article_object' ? ArticleObjectField.Options<IsMulti> :
|
71
|
+
T extends 'boolean' ? BooleanField.Options :
|
72
|
+
T extends 'checkbox' ? CheckboxField.Options :
|
73
|
+
T extends 'date_range' ? DateRangeField.Options :
|
74
|
+
T extends 'date' ? DateField.Options :
|
75
|
+
T extends 'file' ? FileField.Options<IsMulti> :
|
76
|
+
T extends 'image' ? ImageField.Options<IsMulti> :
|
77
|
+
T extends 'number' ? NumberField.Options :
|
78
|
+
T extends 'radiobox' ? RadioboxField.Options :
|
79
|
+
T extends 'select' ? SelectField.Options<IsMulti> :
|
80
|
+
T extends 'text' ? TextField.Options :
|
81
|
+
T extends 'time' ? TimeField.Options :
|
82
|
+
never;
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
export namespace Forms {
|
88
|
+
|
89
|
+
|
90
|
+
export type OnChangeValue<
|
91
|
+
Option,
|
92
|
+
IsMulti extends boolean
|
93
|
+
> = IsMulti extends true ? Utils.Common.MultiValue<Option> : Utils.Common.SingleValue<Option>;
|
94
|
+
|
95
|
+
|
96
|
+
export type Field<
|
97
|
+
T extends keyof OptionTypes,
|
98
|
+
IsMulti extends boolean = false
|
99
|
+
> =
|
100
|
+
| ExtendFieldProps<{
|
101
|
+
label: string;
|
102
|
+
isMulti?: false;
|
103
|
+
value: Utils.Common.SingleValue<OptionType<T>>;
|
104
|
+
type: T;
|
105
|
+
source?:
|
106
|
+
| string[];
|
107
|
+
}>
|
108
|
+
| ExtendFieldProps<{
|
109
|
+
label: string;
|
110
|
+
isMulti?: true;
|
111
|
+
value: Utils.Common.MultiValue<OptionType<T>>;
|
112
|
+
type: T;
|
113
|
+
source?:
|
114
|
+
| string[];
|
115
|
+
}>;
|
116
|
+
|
117
|
+
export type Fields<
|
118
|
+
T extends { [field: string]: Field } = { [field: string]: Field }
|
119
|
+
> = { [field: string]: Field };
|
120
|
+
|
121
|
+
export type FilterValue<T> = {
|
122
|
+
[property in keyof T]: T[property]["value"];
|
123
|
+
};
|
124
|
+
|
125
|
+
export type ComponentProps<
|
126
|
+
T extends Fields = { [field: string]: Field }
|
127
|
+
> = {
|
128
|
+
filter: T;
|
129
|
+
onChange: (
|
130
|
+
value: FilterValue<T>,
|
131
|
+
label: {
|
132
|
+
[field: string]: {
|
133
|
+
label: string;
|
134
|
+
value: LabelType;
|
135
|
+
};
|
136
|
+
}
|
137
|
+
) => void;
|
138
|
+
type?: TComponentType;
|
139
|
+
controlsPosition?: "both" | "bottom" | "top";
|
140
|
+
className?: string;
|
141
|
+
clearField?: (field: string) => void;
|
142
|
+
clearAll?: () => void;
|
143
|
+
omitFields?: Array<keyof T>;
|
144
|
+
};
|
145
|
+
|
146
|
+
type MetaFieldInputProps<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
147
|
+
label: string;
|
148
|
+
required: MetaField<T, IsMulti>['field_options']['required'];
|
149
|
+
default_value: MetaField<T, IsMulti>['field_options']['default_value'] | null;
|
150
|
+
options: MetaField<T, IsMulti>['field_options'];
|
151
|
+
value: MetaFieldInput<T, IsMulti>;
|
152
|
+
onChange: (value: MetaFieldInput<T, IsMulti>) => void | PromiseLike<void>;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
package/typings/v1/services/content/entities/custom-fieds/fields/article_object.custom-field.d.ts
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace ArticleObjectField {
|
8
|
+
|
9
|
+
export type Key = "article_object";
|
10
|
+
|
11
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.ID[] : Utils.Common.ID | null;
|
12
|
+
|
13
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true
|
14
|
+
? Content.Entity.Article[]
|
15
|
+
: Content.Entity.Article | null;
|
16
|
+
|
17
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input, IsMulti> & {
|
18
|
+
multiple: IsMulti;
|
19
|
+
type: Utils.Common.Name;
|
20
|
+
filter: Content.Api.Articles.List.Request['filters'];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace BooleanField {
|
8
|
+
|
9
|
+
export type Key = "boolean";
|
10
|
+
|
11
|
+
export type Input = boolean;
|
12
|
+
|
13
|
+
export type Output = boolean;
|
14
|
+
|
15
|
+
export type Options = BaseFieldOption<Input, false> & {
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace CheckboxField {
|
8
|
+
|
9
|
+
|
10
|
+
export type Key = "checkbox";
|
11
|
+
|
12
|
+
export type Input = Utils.Common.MultiValue<string>;
|
13
|
+
|
14
|
+
export type Output = Utils.Common.MultiValue<Utils.Common.TLabelValue>;
|
15
|
+
|
16
|
+
export type Options = BaseFieldOption<Input, false> & {
|
17
|
+
choices: Utils.Common.MultiValue<Utils.Common.TLabelValue>
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -2,8 +2,7 @@ declare module Levelup {
|
|
2
2
|
|
3
3
|
namespace CMS {
|
4
4
|
namespace V1 {
|
5
|
-
|
6
|
-
export namespace Forms {
|
5
|
+
export namespace Content {
|
7
6
|
export namespace CustomFields {
|
8
7
|
export namespace DateField {
|
9
8
|
|
@@ -19,5 +18,4 @@ declare module Levelup {
|
|
19
18
|
}
|
20
19
|
}
|
21
20
|
}
|
22
|
-
}
|
23
|
-
}
|
21
|
+
}
|
@@ -2,8 +2,7 @@ declare module Levelup {
|
|
2
2
|
|
3
3
|
namespace CMS {
|
4
4
|
namespace V1 {
|
5
|
-
|
6
|
-
export namespace Forms {
|
5
|
+
export namespace Content {
|
7
6
|
export namespace CustomFields {
|
8
7
|
export namespace DateRangeField {
|
9
8
|
|
@@ -22,5 +21,4 @@ declare module Levelup {
|
|
22
21
|
}
|
23
22
|
}
|
24
23
|
}
|
25
|
-
}
|
26
|
-
}
|
24
|
+
}
|
@@ -3,8 +3,7 @@ declare module Levelup {
|
|
3
3
|
|
4
4
|
namespace CMS {
|
5
5
|
namespace V1 {
|
6
|
-
|
7
|
-
export namespace Forms {
|
6
|
+
export namespace Content {
|
8
7
|
export namespace CustomFields {
|
9
8
|
export namespace FileField {
|
10
9
|
|
@@ -22,5 +21,4 @@ declare module Levelup {
|
|
22
21
|
}
|
23
22
|
}
|
24
23
|
}
|
25
|
-
}
|
26
|
-
}
|
24
|
+
}
|
@@ -2,8 +2,7 @@ declare module Levelup {
|
|
2
2
|
|
3
3
|
namespace CMS {
|
4
4
|
namespace V1 {
|
5
|
-
|
6
|
-
export namespace Forms {
|
5
|
+
export namespace Content {
|
7
6
|
export namespace CustomFields {
|
8
7
|
export namespace ImageField {
|
9
8
|
|
@@ -21,5 +20,4 @@ declare module Levelup {
|
|
21
20
|
}
|
22
21
|
}
|
23
22
|
}
|
24
|
-
}
|
25
|
-
}
|
23
|
+
}
|
@@ -2,8 +2,7 @@ declare module Levelup {
|
|
2
2
|
|
3
3
|
namespace CMS {
|
4
4
|
namespace V1 {
|
5
|
-
|
6
|
-
export namespace Forms {
|
5
|
+
export namespace Content {
|
7
6
|
export namespace CustomFields {
|
8
7
|
export namespace NumberField {
|
9
8
|
|
@@ -22,5 +21,4 @@ declare module Levelup {
|
|
22
21
|
}
|
23
22
|
}
|
24
23
|
}
|
25
|
-
}
|
26
|
-
}
|
24
|
+
}
|
@@ -2,20 +2,19 @@ declare module Levelup {
|
|
2
2
|
|
3
3
|
namespace CMS {
|
4
4
|
namespace V1 {
|
5
|
-
|
6
|
-
export namespace Forms {
|
5
|
+
export namespace Content {
|
7
6
|
export namespace CustomFields {
|
8
7
|
export namespace RadioboxField {
|
9
8
|
|
10
9
|
|
11
10
|
export type Key = "radiobox";
|
12
11
|
|
13
|
-
export type Input = SingleValue<string>;
|
12
|
+
export type Input = Utils.Common.SingleValue<string>;
|
14
13
|
|
15
|
-
export type Output = SingleValue<Utils.Common.TLabelValue>;
|
14
|
+
export type Output = Utils.Common.SingleValue<Utils.Common.TLabelValue>;
|
16
15
|
|
17
16
|
export type Options = BaseFieldOption<Input, false> & {
|
18
|
-
choices: MultiValue<Utils.Common.TLabelValue>
|
17
|
+
choices: Utils.Common.MultiValue<Utils.Common.TLabelValue>
|
19
18
|
|
20
19
|
}
|
21
20
|
}
|
@@ -23,5 +22,4 @@ declare module Levelup {
|
|
23
22
|
}
|
24
23
|
}
|
25
24
|
}
|
26
|
-
}
|
27
|
-
}
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace SelectField {
|
8
|
+
|
9
|
+
|
10
|
+
export type Key = "select";
|
11
|
+
|
12
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? string[] : string | null;
|
13
|
+
|
14
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.TLabelValue[] : Utils.Common.TLabelValue | null;
|
15
|
+
|
16
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input<IsMulti>, IsMulti> & {
|
17
|
+
multiple?: IsMulti;
|
18
|
+
choices: Utils.Common.MultiValue<Utils.Common.TLabelValue>
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace TextField {
|
8
|
+
|
9
|
+
export type Key = "text";
|
10
|
+
|
11
|
+
export type Input = string | null;
|
12
|
+
|
13
|
+
export type Output = Input;
|
14
|
+
|
15
|
+
export type Options = BaseFieldOption<Input, false> & {
|
16
|
+
min: number;
|
17
|
+
max: number;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace TimeField {
|
8
|
+
|
9
|
+
export type Key = "time";
|
10
|
+
|
11
|
+
export type Input = Utils.Common.SingleValue<Utils.Common.Time>;
|
12
|
+
|
13
|
+
export type Output = Input;
|
14
|
+
|
15
|
+
export type Options = BaseFieldOption<Input> & {
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|