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
@@ -1,189 +0,0 @@
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.CMS.V1.Auth.Entity.TRoleGroup
23
- | Levelup.CMS.V1.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
-
@@ -1,29 +0,0 @@
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
- }
@@ -1,24 +0,0 @@
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
- }
@@ -1,26 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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 SelectField {
9
-
10
-
11
- export type Key = "select";
12
-
13
- export type Input<IsMulti extends boolean = false> = IsMulti extends true ? string[] : string | null;
14
-
15
- export type Output<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.TLabelValue[] : Utils.Common.TLabelValue | null;
16
-
17
- export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input<IsMulti>, IsMulti> & {
18
- multiple?: IsMulti;
19
- choices: MultiValue<Utils.Common.TLabelValue>
20
- }
21
- }
22
- }
23
- }
24
- }
25
- }
26
- }
27
- }
@@ -1,26 +0,0 @@
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 TextField {
9
-
10
- export type Key = "text";
11
-
12
- export type Input = string | 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
- }
@@ -1,24 +0,0 @@
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 TimeField {
9
-
10
- export type Key = "time";
11
-
12
- export type Input = SingleValue<Utils.Common.Time>;
13
-
14
- export type Output = Input;
15
-
16
- export type Options = BaseFieldOption<Input> & {
17
- }
18
- }
19
- }
20
- }
21
- }
22
- }
23
- }
24
- }
@@ -1 +0,0 @@
1
- export * from "./fields/index..d.ts";