@forestadmin/forestadmin-client 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,19 +68,22 @@ export type ForestServerActionFieldCommon<TType extends ForestServerColumnType =
68
68
  export type ForestServerActionFieldBase = ForestServerActionFieldCommon & {
69
69
  reference: string | null;
70
70
  };
71
- export type ForestServerActionFieldDropdownOptions<TValue = string> = {
72
- name: 'dropdown';
71
+ type ForestServerActionFieldLimitedValueOptions<TName extends string, TValue = string, TParameters = Record<string, never>> = {
72
+ name: TName;
73
73
  parameters: {
74
- placeholder?: string | null;
75
- isSearchable?: boolean;
76
74
  static: {
77
75
  options: Array<{
78
76
  label: string;
79
77
  value: TValue;
80
78
  } | TValue>;
81
79
  };
82
- };
80
+ } & TParameters;
83
81
  };
82
+ export type ForestServerActionFieldDropdownOptions<TValue = string> = ForestServerActionFieldLimitedValueOptions<'dropdown', TValue, {
83
+ placeholder?: string | null;
84
+ isSearchable?: boolean;
85
+ }>;
86
+ export type ForestServerActionFieldRadioButtonOptions<TValue = string> = ForestServerActionFieldLimitedValueOptions<'radio button', TValue>;
84
87
  export type ForestServerActionFieldCheckboxOptions = {
85
88
  name: 'boolean editor';
86
89
  parameters: Record<string, never>;
@@ -114,7 +117,8 @@ export type ForestServerActionFieldRichTextOptions = {
114
117
  };
115
118
  };
116
119
  export type ForestServerActionFieldDropdown = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Timeonly', ForestServerActionFieldDropdownOptions<string>> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldDropdownOptions<string[]>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldDropdownOptions<number>>;
117
- export type ForestServerActionField = ForestServerActionFieldDropdown | ForestServerActionFieldBase | ForestServerActionFieldCommon<'Boolean', ForestServerActionFieldCheckboxOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextInputOptions> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldTextInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextAreaOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldRichTextOptions>;
120
+ export type ForestServerActionFieldRadioButton = ForestServerActionFieldCommon<'String' | 'Dateonly' | 'Date' | 'Timeonly', ForestServerActionFieldRadioButtonOptions<string>> | ForestServerActionFieldCommon<'Number', ForestServerActionFieldRadioButtonOptions<number>>;
121
+ export type ForestServerActionField = ForestServerActionFieldDropdown | ForestServerActionFieldRadioButton | ForestServerActionFieldBase | ForestServerActionFieldCommon<'Boolean', ForestServerActionFieldCheckboxOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextInputOptions> | ForestServerActionFieldCommon<['String'], ForestServerActionFieldTextInputListOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldTextAreaOptions> | ForestServerActionFieldCommon<'String', ForestServerActionFieldRichTextOptions>;
118
122
  export type ForestServerField = Partial<{
119
123
  field: string;
120
124
  type: ForestServerColumnType;
@@ -141,4 +145,5 @@ export type ForestServerSegment = {
141
145
  name: string;
142
146
  };
143
147
  export type ValidationType = 'contains' | 'is after' | 'is before' | 'is greater than' | 'is less than' | 'is like' | 'is longer than' | 'is present' | 'is shorter than';
148
+ export {};
144
149
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forestadmin/forestadmin-client",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "publishConfig": {
@@ -31,7 +31,7 @@
31
31
  "test": "jest"
32
32
  },
33
33
  "devDependencies": {
34
- "@forestadmin/datasource-toolkit": "1.15.0",
34
+ "@forestadmin/datasource-toolkit": "1.16.0",
35
35
  "@types/json-api-serializer": "^2.6.3",
36
36
  "@types/jsonwebtoken": "^9.0.1",
37
37
  "@types/superagent": "^4.1.16"