jourycms-sdk 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/package.json +1 -1
  2. package/typings/v1/cache-manager/entity.d.ts +12 -1
  3. package/typings/v1/index.d.ts +1 -0
  4. package/typings/v1/services/auth/api/auth.d.ts +7 -1
  5. package/typings/v1/services/auth/entities/role.d.ts +7 -1
  6. package/typings/v1/services/auth/entities/user.d.ts +1 -56
  7. package/typings/v1/services/content/api/article.d.ts +3 -2
  8. package/typings/v1/services/content/entities/article-type.d.ts +4 -6
  9. package/typings/v1/services/content/entities/article.d.ts +3 -5
  10. package/typings/v1/services/content/entities/comment.d.ts +1 -1
  11. package/typings/v1/services/content/entities/custom-fieds/custom-field.d.ts +194 -0
  12. package/typings/v1/services/content/entities/custom-fieds/fields/article_object.custom-field.d.ts +27 -0
  13. package/typings/v1/services/content/entities/custom-fieds/fields/boolean.custom-field.d.ts +22 -0
  14. package/typings/v1/services/content/entities/custom-fieds/fields/checkbox.custom-field.d.ts +24 -0
  15. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date.custom-field.d.ts +2 -4
  16. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date_range.custom-field.d.ts +2 -4
  17. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/file.custom-field.d.ts +2 -4
  18. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/image.custom-field.d.ts +2 -4
  19. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/number.custom-field.d.ts +2 -4
  20. package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/radiobox.custom-field.d.ts +5 -7
  21. package/typings/v1/services/content/entities/custom-fieds/fields/select.custom-field.d.ts +25 -0
  22. package/typings/v1/services/content/entities/custom-fieds/fields/text.custom-field.d.ts +24 -0
  23. package/typings/v1/services/content/entities/custom-fieds/fields/time.custom-field.d.ts +22 -0
  24. package/typings/v1/services/content/entities/custom-fieds/index.d.ts +2 -0
  25. package/typings/v1/services/content/entities/review.d.ts +1 -1
  26. package/typings/v1/services/content/entities/taxonomy.d.ts +1 -1
  27. package/typings/v1/services/content/entities/term.d.ts +1 -1
  28. package/typings/v1/services/storage/entities/uploaded-file.d.ts +0 -2
  29. package/typings/v1/services/system/entities/config.d.ts +41 -0
  30. package/typings/v1/theme/component.d.ts +9 -0
  31. package/typings/v1/theme/index.d.ts +3 -0
  32. package/typings/v1/theme/layout.d.ts +10 -0
  33. package/typings/v1/theme/page.d.ts +9 -0
  34. package/typings/v1/ui/forms/article/index.d.ts +0 -1
  35. package/typings/v1/ui/routes/icons.d.ts +28 -0
  36. package/typings/v1/ui/routes/index.d.ts +1 -0
  37. package/typings/v1/ui/routes/routes.d.ts +0 -19
  38. package/typings/v1/utils/api/request.d.ts +34 -31
  39. package/typings/v1/utils/api/response.d.ts +20 -54
  40. package/typings/v1/utils/common/common.d.ts +5 -0
  41. package/typings/v1/utils/entities/snapshots.d.ts +1 -12
  42. package/typings/v1/utils/system/models.d.ts +18 -16
  43. package/typings/v1/utils/utils.d.ts +3 -0
  44. package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +0 -189
  45. package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +0 -29
  46. package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +0 -24
  47. package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +0 -26
  48. package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +0 -27
  49. package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +0 -26
  50. package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +0 -24
  51. package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +0 -1
  52. /package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jourycms-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Sdk for Joury CMS",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -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.CacheManager.TLevelupEntity
79
+ E extends Levelup.CMS.V1.Utils.SystemStructure.Models.AllModels
69
80
  ? Levelup.CMS.V1.CacheManager.TLevelupListQueryParams<E>
70
81
  : never;
71
82
  }
@@ -4,5 +4,6 @@ export * from "./modules/index.d.ts";
4
4
  export * from "./sdk/index.d.ts";
5
5
  export * from "./security/index.d.ts";
6
6
  export * from "./services/index.d.ts";
7
+ export * from "./theme/index.d.ts";
7
8
  export * from "./ui/index.d.ts";
8
9
  export * from "./utils/index.d.ts";
@@ -18,7 +18,13 @@ declare module Levelup {
18
18
  export namespace Signup {
19
19
  export type Request =
20
20
  Levelup.CMS.V1.Utils.Api.Request.BuildCreateRequest<{
21
- name: string;
21
+ account_type: 'agency' | 'doctor' | 'escort';
22
+ address: Utils.Entity.Snapshots.Locations.Address;
23
+ first_name: string;
24
+ family_name: string;
25
+ phones: string[];
26
+ website: string;
27
+ sex: Users.Entity.Sex | null;
22
28
  email: string;
23
29
  password: string;
24
30
  }>;
@@ -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
- Utils.Entity.General.IHasSearchMeta {
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,10 +6,8 @@ declare module Levelup {
6
6
  type ICustomMetaField = {
7
7
  field_key: string;
8
8
  field_label: string;
9
- field_type: UI.Forms.CustomFields.CustomFieldType;
10
- field_options: {
11
- [Key: string]: any;
12
- };
9
+ field_type: CustomFields.CustomFieldType;
10
+ field_options: CustomFields.MetaField<CustomFields.CustomFieldType, boolean>['field_options'];
13
11
  };
14
12
 
15
13
  export interface IArticleTypeSnapshots {
@@ -22,7 +20,7 @@ declare module Levelup {
22
20
 
23
21
  export interface ArticleType
24
22
  extends Utils.Entity.General.ICreatable,
25
- Utils.Entity.General.IHasSearchMeta {
23
+ Utils.Entity.General.IHasSearchMeta {
26
24
  _id: Utils.Common.ID;
27
25
  slug: string;
28
26
  name: string;
@@ -36,7 +34,7 @@ declare module Levelup {
36
34
  };
37
35
  description: string;
38
36
  description_unformatted: string;
39
- description_structured: { [Key: string]: any };
37
+ description_structured: JSONContent;
40
38
 
41
39
  custom_meta_fields: ICustomMetaField[];
42
40
  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
- Utils.Entity.General.IHasSearchMeta {
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;
@@ -23,7 +23,7 @@ declare module Levelup {
23
23
 
24
24
  body: string;
25
25
  body_unformatted: string;
26
- body_structured: { [Key: string]: any };
26
+ body_structured: JSONContent;
27
27
 
28
28
  snapshots: ICommentSnapshots;
29
29
  }
@@ -0,0 +1,194 @@
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 TOperator = 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'exists' | 'not_empty';
15
+ type TConstraint<Operator extends TOperator> =
16
+ Operator extends 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' ? {
17
+ field: string;
18
+ operator: Operator;
19
+ value: any;
20
+ } :
21
+ Operator extends 'in' | 'nin' ? {
22
+ field: string;
23
+ operator: Operator;
24
+ value: any[];
25
+ } :
26
+ Operator extends 'exists' | 'not_empty' ? {
27
+ field: string;
28
+ operator: Operator;
29
+ } :
30
+ never;
31
+
32
+ type BaseFieldOption<Input, IsMulti extends boolean = false> = {
33
+ label?: string;
34
+ required?: boolean;
35
+ default_value?: IsMulti extends true ? Utils.Common.MultiValue<Input> : Utils.Common.SingleValue<Input>;
36
+ constraints?: TConstraint<TOperator>[];
37
+ }
38
+
39
+ type CustomFieldType =
40
+ | 'article_object'
41
+ | 'boolean'
42
+ | 'checkbox'
43
+ | 'date_range'
44
+ | 'date'
45
+ | 'file'
46
+ | 'image'
47
+ | 'number'
48
+ | 'radiobox'
49
+ | 'select'
50
+ | 'algerian_state'
51
+ | 'algerian_city'
52
+ | 'ksa_city'
53
+ | 'text'
54
+ | 'time';
55
+
56
+
57
+
58
+ type MetaFieldInput<T extends CustomFieldType, IsMulti extends boolean = false> =
59
+ T extends 'article_object' ? ArticleObjectField.Input<IsMulti> :
60
+ T extends 'boolean' ? BooleanField.Input :
61
+ T extends 'checkbox' ? CheckboxField.Input :
62
+ T extends 'date_range' ? DateRangeField.Input :
63
+ T extends 'date' ? DateField.Input :
64
+ T extends 'file' ? FileField.Input<IsMulti> :
65
+ T extends 'image' ? ImageField.Input<IsMulti> :
66
+ T extends 'number' ? NumberField.Input :
67
+ T extends 'radiobox' ? RadioboxField.Input :
68
+ T extends 'select' ? SelectField.Input<IsMulti> :
69
+ T extends 'algerian_state' ? SelectField.Intput<IsMulti> :
70
+ T extends 'algerian_city' ? SelectField.Intput<IsMulti> :
71
+ T extends 'ksa_city' ? SelectField.Intput<IsMulti> :
72
+ T extends 'text' ? TextField.Input :
73
+ T extends 'time' ? TimeField.Input :
74
+ never;
75
+
76
+ type MetaFieldOutput<T extends CustomFieldType, IsMulti extends boolean = false> =
77
+ T extends 'article_object' ? ArticleObjectField.Output<IsMulti> :
78
+ T extends 'boolean' ? BooleanField.Output :
79
+ T extends 'checkbox' ? CheckboxField.Output :
80
+ T extends 'date_range' ? DateRangeField.Output :
81
+ T extends 'date' ? DateField.Output :
82
+ T extends 'file' ? FileField.Output<IsMulti> :
83
+ T extends 'image' ? ImageField.Output<IsMulti> :
84
+ T extends 'number' ? NumberField.Output :
85
+ T extends 'radiobox' ? RadioboxField.Output :
86
+ T extends 'select' ? SelectField.Output<IsMulti> :
87
+ T extends 'algerian_state' ? SelectField.Output<IsMulti> :
88
+ T extends 'algerian_city' ? SelectField.Output<IsMulti> :
89
+ T extends 'ksa_city' ? SelectField.Output<IsMulti> :
90
+ T extends 'text' ? TextField.Output :
91
+ T extends 'time' ? TimeField.Output :
92
+ never;
93
+
94
+ type MetaField<T extends CustomFieldType, IsMulti extends boolean = false> = {
95
+ field_key: string;
96
+ field_label: string;
97
+ field_type: T;
98
+ field_options: T extends 'article_object' ? ArticleObjectField.Options<IsMulti> :
99
+ T extends 'boolean' ? BooleanField.Options :
100
+ T extends 'checkbox' ? CheckboxField.Options :
101
+ T extends 'date_range' ? DateRangeField.Options :
102
+ T extends 'date' ? DateField.Options :
103
+ T extends 'file' ? FileField.Options<IsMulti> :
104
+ T extends 'image' ? ImageField.Options<IsMulti> :
105
+ T extends 'number' ? NumberField.Options :
106
+ T extends 'radiobox' ? RadioboxField.Options :
107
+ T extends 'select' ? SelectField.Options<IsMulti> :
108
+ T extends 'algerian_state' ? SelectField.Options<IsMulti> :
109
+ T extends 'algerian_city' ? SelectField.Options<IsMulti> :
110
+ T extends 'ksa_city' ? SelectField.Options<IsMulti> :
111
+ T extends 'text' ? TextField.Options :
112
+ T extends 'time' ? TimeField.Options :
113
+ never;
114
+ }
115
+
116
+
117
+
118
+ export namespace Forms {
119
+
120
+
121
+ export type OnChangeValue<
122
+ Option,
123
+ IsMulti extends boolean
124
+ > = IsMulti extends true ? Utils.Common.MultiValue<Option> : Utils.Common.SingleValue<Option>;
125
+
126
+
127
+ export type Field<
128
+ T extends keyof OptionTypes,
129
+ IsMulti extends boolean = false
130
+ > =
131
+ | ExtendFieldProps<{
132
+ label: string;
133
+ isMulti?: false;
134
+ value: Utils.Common.SingleValue<OptionType<T>>;
135
+ type: T;
136
+ source?:
137
+ | string[];
138
+ }>
139
+ | ExtendFieldProps<{
140
+ label: string;
141
+ isMulti?: true;
142
+ value: Utils.Common.MultiValue<OptionType<T>>;
143
+ type: T;
144
+ source?:
145
+ | string[];
146
+ }>;
147
+
148
+ export type Fields<
149
+ T extends { [field: string]: Field } = { [field: string]: Field }
150
+ > = { [field: string]: Field };
151
+
152
+ export type FilterValue<T> = {
153
+ [property in keyof T]: T[property]["value"];
154
+ };
155
+
156
+ export type ComponentProps<
157
+ T extends Fields = { [field: string]: Field }
158
+ > = {
159
+ filter: T;
160
+ onChange: (
161
+ value: FilterValue<T>,
162
+ label: {
163
+ [field: string]: {
164
+ label: string;
165
+ value: LabelType;
166
+ };
167
+ }
168
+ ) => void;
169
+ type?: TComponentType;
170
+ controlsPosition?: "both" | "bottom" | "top";
171
+ className?: string;
172
+ clearField?: (field: string) => void;
173
+ clearAll?: () => void;
174
+ omitFields?: Array<keyof T>;
175
+ };
176
+
177
+ type MetaFieldInputProps<T extends CustomFieldType, IsMulti extends boolean = false> = {
178
+ label: string;
179
+ required: MetaField<T, IsMulti>['field_options']['required'];
180
+ default_value: MetaField<T, IsMulti>['field_options']['default_value'] | null;
181
+ options: MetaField<T, IsMulti>['field_options'];
182
+ value: MetaFieldInput<T, IsMulti>;
183
+ onChange: (value: MetaFieldInput<T, IsMulti>) => void | PromiseLike<void>;
184
+ metaData: {
185
+ [key: string]: any;
186
+ };
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+
@@ -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
- export namespace UI {
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
- export namespace UI {
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
- export namespace UI {
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
- export namespace UI {
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
- export namespace UI {
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
- export namespace UI {
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
+ }