@opexa/portal-sdk 0.0.49 → 0.0.50
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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/types.d.ts +15 -0
- package/dist/services/types.d.ts +62 -0
- package/package.json +1 -1
package/dist/sdk/types.d.ts
CHANGED
|
@@ -1046,10 +1046,25 @@ export interface ActivityRecord {
|
|
|
1046
1046
|
export interface ActivityRecordsInput extends Internal.ActivityRecordsQueryVariables {
|
|
1047
1047
|
}
|
|
1048
1048
|
export type ActivityRecordsReturn = OperationResult<never, PaginatedQueryResult<'activityRecords', ActivityRecord>>;
|
|
1049
|
+
export type FieldType = UnionAlias<Internal.FieldType>;
|
|
1050
|
+
export interface TextField extends Internal.TextField {
|
|
1051
|
+
}
|
|
1052
|
+
export interface ImageField extends Internal.ImageField {
|
|
1053
|
+
}
|
|
1054
|
+
export interface SelectField extends Internal.SelectField {
|
|
1055
|
+
}
|
|
1056
|
+
export interface MultiSelectField extends Internal.MultiSelectField {
|
|
1057
|
+
}
|
|
1058
|
+
export interface ToggleField extends Internal.ToggleField {
|
|
1059
|
+
}
|
|
1060
|
+
export interface CompoundField extends Internal.CompoundField {
|
|
1061
|
+
}
|
|
1062
|
+
export type Field = TextField | ImageField | SelectField | MultiSelectField | ToggleField | CompoundField;
|
|
1049
1063
|
export interface Site {
|
|
1050
1064
|
id: string;
|
|
1051
1065
|
name: string;
|
|
1052
1066
|
logo?: string;
|
|
1067
|
+
fields: Field[];
|
|
1053
1068
|
}
|
|
1054
1069
|
export type SiteReturn = OperationResult<never, Site>;
|
|
1055
1070
|
export {};
|
package/dist/services/types.d.ts
CHANGED
|
@@ -921,10 +921,72 @@ export interface MayaSessionQueryVariables {
|
|
|
921
921
|
export interface ValidateMayaSessionMutation {
|
|
922
922
|
validateMayaSession: boolean;
|
|
923
923
|
}
|
|
924
|
+
export interface TextField {
|
|
925
|
+
id: string;
|
|
926
|
+
type: 'text';
|
|
927
|
+
label: string;
|
|
928
|
+
value?: string;
|
|
929
|
+
default?: string;
|
|
930
|
+
required?: true;
|
|
931
|
+
pattern?: 'url' | 'email' | (string & {});
|
|
932
|
+
minLength?: number;
|
|
933
|
+
maxLength?: number;
|
|
934
|
+
placeholder?: string;
|
|
935
|
+
}
|
|
936
|
+
export interface ImageField {
|
|
937
|
+
id: string;
|
|
938
|
+
type: 'image';
|
|
939
|
+
label: string;
|
|
940
|
+
default?: string;
|
|
941
|
+
required?: boolean;
|
|
942
|
+
width?: number;
|
|
943
|
+
height?: number;
|
|
944
|
+
minWidth?: number;
|
|
945
|
+
minHeight?: number;
|
|
946
|
+
maxWidth?: number;
|
|
947
|
+
maxHeight?: number;
|
|
948
|
+
}
|
|
949
|
+
export interface SelectField {
|
|
950
|
+
id: string;
|
|
951
|
+
type: 'select';
|
|
952
|
+
label: string;
|
|
953
|
+
options: string[];
|
|
954
|
+
default?: string;
|
|
955
|
+
required?: boolean;
|
|
956
|
+
}
|
|
957
|
+
export interface MultiSelectField {
|
|
958
|
+
id: string;
|
|
959
|
+
type: 'multi_select';
|
|
960
|
+
label: string;
|
|
961
|
+
options: string[];
|
|
962
|
+
default?: string[];
|
|
963
|
+
required?: boolean;
|
|
964
|
+
}
|
|
965
|
+
export interface ToggleField {
|
|
966
|
+
id: string;
|
|
967
|
+
type: 'toggle';
|
|
968
|
+
label: string;
|
|
969
|
+
default?: boolean;
|
|
970
|
+
}
|
|
971
|
+
export interface CompoundField {
|
|
972
|
+
id: string;
|
|
973
|
+
type: 'compound';
|
|
974
|
+
fields: (TextField | ImageField | SelectField | MultiSelectField | ToggleField | CompoundField)[];
|
|
975
|
+
default?: any;
|
|
976
|
+
multiple?: boolean;
|
|
977
|
+
}
|
|
978
|
+
export type Field = TextField | ImageField | SelectField | MultiSelectField | ToggleField | CompoundField;
|
|
979
|
+
export type FieldType = Field['type'];
|
|
980
|
+
export interface SiteConfig {
|
|
981
|
+
name: string;
|
|
982
|
+
logo: string;
|
|
983
|
+
fields: Field[];
|
|
984
|
+
}
|
|
924
985
|
export interface Site {
|
|
925
986
|
id: string;
|
|
926
987
|
name: string;
|
|
927
988
|
logo?: string | null;
|
|
989
|
+
config: SiteConfig;
|
|
928
990
|
}
|
|
929
991
|
export interface SiteQuery {
|
|
930
992
|
data: Site;
|