@spaceandtimelabs/makeinfinite-ui 0.62.1 → 0.64.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.
package/dist/index.d.ts CHANGED
@@ -137,11 +137,11 @@ export declare const APIHandler: (baseUrl: string) => {
137
137
  updateApplicationMetadata: (projectName: string, applicationName: string, applicationDescription: string, applicationCategory: string) => Promise<Response>;
138
138
  updateApplicationSettings: (projectName: string, applicationLoginEnabled?: boolean | null, defaultDeploymentChainReference?: string | null) => Promise<Response>;
139
139
  updateProjectFile: (filePath: string, projectName: string, sourceCode: string, abortSignal?: AbortSignal) => Promise<Response>;
140
- updateProjectFiles: (files: [{
140
+ updateProjectFiles: (files: {
141
141
  projectName: string;
142
142
  filePath: string;
143
143
  fileContent: string;
144
- }], abortSignal?: AbortSignal) => Promise<Response>;
144
+ }[], abortSignal?: AbortSignal) => Promise<Response>;
145
145
  deleteProjectComponent: (projectName: string, filePath: string) => Promise<Response>;
146
146
  deleteProjectFile: (projectName: string, filePath: string) => Promise<Response>;
147
147
  resetProjectFile: (projectName: string, filePath: string, gitRef: string, prune?: boolean, extraMetadata?: string) => Promise<Response>;
@@ -158,8 +158,13 @@ export declare const APIHandler: (baseUrl: string) => {
158
158
  domTreeRepr: string;
159
159
  }) => Promise<Response>;
160
160
  initializeProject: (projectName: string) => Promise<Response>;
161
+ getUserSpendAnalytics: () => Promise<Response>;
162
+ getCreatorPointsSum: (projectName?: string | null) => Promise<Response>;
163
+ getCreatorPointsTop: (n?: number) => Promise<Response>;
161
164
  };
162
165
 
166
+ declare type APIHandlerType = ReturnType<typeof APIHandler>;
167
+
163
168
  export declare const APIProxyHandler: (baseUrl: string, projectHmac?: string) => {
164
169
  getSecrets: () => Promise<Response>;
165
170
  putSecret: (secretReference: string, secret: Omit<Secret, "creator_user_id" | "secret_reference">) => Promise<Response>;
@@ -908,6 +913,14 @@ declare type GetTagsOptions = {
908
913
 
909
914
  export declare const getUndoTargetCommitForFile: (projectName: string, filePath: string) => Promise<[string, string]>;
910
915
 
916
+ declare const gwAPIHandler: (baseUrl: string) => {
917
+ getQueryContent: (queryId: string) => Promise<Response>;
918
+ getVisuals: (pageNo: number, pageSize: number, scope: string, searchPattern: string, sortBy: string, sortOrder: string, visibility: string, visualType: string) => Promise<Response>;
919
+ getSubscription: () => Promise<Response>;
920
+ };
921
+
922
+ declare type GwAPIHandlerType = ReturnType<typeof gwAPIHandler>;
923
+
911
924
  declare const HoverCard: FC<HoverCard_2.HoverCardProps>;
912
925
 
913
926
  declare const HoverCardContent: ForwardRefExoticComponent<Omit<HoverCard_2.HoverCardContentProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
@@ -1047,9 +1060,52 @@ export declare type Project = {
1047
1060
  extra_meta?: string | null;
1048
1061
  };
1049
1062
 
1063
+ declare interface ProjectConfig {
1064
+ API_BASE_URL: string | null;
1065
+ WS_BASE_URL: string | null;
1066
+ GW_BASE_URL: string | null;
1067
+ GW_PROXY_URL: string | null;
1068
+ PROXY_API_BASE_URL: string | null;
1069
+ }
1070
+
1071
+ declare const ProjectContext: Context<ProjectContextValue | null>;
1072
+
1073
+ declare interface ProjectContextValue {
1074
+ config: ProjectConfig;
1075
+ projectMetadata: ProjectMetadata;
1076
+ setProjectMetadata: React.Dispatch<React.SetStateAction<ProjectMetadata>>;
1077
+ syncToken: string;
1078
+ setSyncToken: () => void;
1079
+ selectedComponentId: string;
1080
+ setSelectedComponentId: React.Dispatch<React.SetStateAction<string>>;
1081
+ selectedComponentXPath: string;
1082
+ setSelectedComponentXPath: React.Dispatch<React.SetStateAction<string>>;
1083
+ selectedComponentHTML: string;
1084
+ setSelectedComponentHTML: React.Dispatch<React.SetStateAction<string>>;
1085
+ isComponentSubselected: boolean;
1086
+ setIsComponentSubselected: React.Dispatch<React.SetStateAction<boolean>>;
1087
+ APIHandler: APIHandlerType;
1088
+ gwAPIHandler: GwAPIHandlerType;
1089
+ proxyHandler: ProxyHandlerType;
1090
+ proxyFetch: ProxyFetchType | null;
1091
+ proxyGetView: ProxyGetViewType | null;
1092
+ }
1093
+
1094
+ declare interface ProjectMetadata {
1095
+ projectName: string | null;
1096
+ projectURL: string | null;
1097
+ projectHmac?: string;
1098
+ extraMeta: {
1099
+ application_name?: string;
1100
+ project_name?: string;
1101
+ application_description?: string;
1102
+ application_category?: string;
1103
+ };
1104
+ }
1105
+
1050
1106
  export declare const ProjectProvider: (props: {
1051
- config: any;
1052
- metadata?: any;
1107
+ config: ProjectConfig;
1108
+ metadata?: ProjectMetadata;
1053
1109
  children?: React.ReactNode;
1054
1110
  }) => JSX_2.Element;
1055
1111
 
@@ -1058,12 +1114,22 @@ export declare type ProxyFetchConfig = {
1058
1114
  miniappName: string;
1059
1115
  };
1060
1116
 
1117
+ declare type ProxyFetchType = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
1118
+
1061
1119
  /** Configuration for the proxy getView client */
1062
1120
  export declare type ProxyGetViewConfig = {
1063
1121
  miniappName: string;
1064
1122
  gwProxyUrl: string;
1065
1123
  };
1066
1124
 
1125
+ declare type ProxyGetViewType = (schema: string, viewName: string, parameters: {
1126
+ [key: string]: string | number | boolean;
1127
+ }) => Promise<{
1128
+ [key: string]: any;
1129
+ }[]>;
1130
+
1131
+ declare type ProxyHandlerType = ReturnType<typeof APIProxyHandler>;
1132
+
1067
1133
  declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
1068
1134
 
1069
1135
  declare const RadioGroupItem: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupItemProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
@@ -1405,7 +1471,7 @@ declare const useFormField: () => {
1405
1471
  formMessageId: string;
1406
1472
  };
1407
1473
 
1408
- export declare const useProject: () => any;
1474
+ export declare const useProject: () => NonNullable<React.ContextType<typeof ProjectContext>>;
1409
1475
 
1410
1476
  export declare const useRGContext: () => any;
1411
1477