@spaceandtimelabs/makeinfinite-ui 0.59.2 → 0.61.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
@@ -148,26 +148,36 @@ export declare const APIHandler: (baseUrl: string) => {
148
148
  deleteProject: (projectName: string) => Promise<Response>;
149
149
  requestErrorCorrection: (projectName: string, componentId: string, errorMessage: string) => Promise<Response>;
150
150
  addImage: (formData: FormData) => Promise<Response>;
151
+ editElement: (params: {
152
+ projectName: string;
153
+ componentId: string;
154
+ elementXPath: string;
155
+ styleRequest?: object | null;
156
+ textRequest?: string | null;
157
+ backgroundImageRequest?: string | null;
158
+ domTreeRepr: string;
159
+ }) => Promise<Response>;
151
160
  initializeProject: (projectName: string) => Promise<Response>;
152
161
  };
153
162
 
154
- export declare const APIProxyHandler: (baseUrl: string) => {
163
+ export declare const APIProxyHandler: (baseUrl: string, projectHmac?: string) => {
155
164
  getSecrets: () => Promise<Response>;
156
165
  putSecret: (secretReference: string, secret: Omit<Secret, "creator_user_id" | "secret_reference">) => Promise<Response>;
157
166
  getSecret: (secretReference: string) => Promise<Response>;
158
167
  deleteSecret: (secretReference: string) => Promise<Response>;
159
- getTierKeyMap: (miniappName: string) => Promise<Response>;
160
- putTierKeyMap: (miniappName: string, tier: string, secretReference: string) => Promise<Response>;
161
- getTierKeyMapForTier: (miniappName: string, tier: string) => Promise<Response>;
162
- deleteTierKeyMap: (miniappName: string, tier: string) => Promise<Response>;
163
- getTierAssignments: (miniappName: string) => Promise<Response>;
164
- putTierAssignment: (miniappName: string, userId: string, tier: string) => Promise<Response>;
165
- getTierAssignment: (miniappName: string, userId: string) => Promise<Response>;
166
- deleteTierAssignment: (miniappName: string, userId: string) => Promise<Response>;
167
- getRateLimits: (miniappName: string) => Promise<Response>;
168
- putRateLimit: (miniappName: string, tier: string, secretReference: string, rateLimit: Pick<RateLimit, "window_ms" | "limit">) => Promise<Response>;
169
- getRateLimit: (miniappName: string, tier: string, secretReference: string) => Promise<Response>;
170
- deleteRateLimit: (miniappName: string, tier: string, secretReference: string) => Promise<Response>;
168
+ getAllTierKeyMaps: () => Promise<Response>;
169
+ getTierKeyMap: (miniappName: string, customHmac?: string) => Promise<Response>;
170
+ putTierKeyMap: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
171
+ getTierKeyMapForTier: (miniappName: string, tier: string, customHmac?: string) => Promise<Response>;
172
+ deleteTierKeyMap: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
173
+ getTierAssignments: (miniappName: string, customHmac?: string) => Promise<Response>;
174
+ putTierAssignment: (miniappName: string, userId: string, tier: string, customHmac?: string) => Promise<Response>;
175
+ getTierAssignment: (miniappName: string, userId: string, customHmac?: string) => Promise<Response>;
176
+ deleteTierAssignment: (miniappName: string, userId: string, customHmac?: string) => Promise<Response>;
177
+ getRateLimits: (miniappName: string, customHmac?: string) => Promise<Response>;
178
+ putRateLimit: (miniappName: string, tier: string, secretReference: string, rateLimit: Pick<RateLimit, "window_ms" | "limit">, customHmac?: string) => Promise<Response>;
179
+ getRateLimit: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
180
+ deleteRateLimit: (miniappName: string, tier: string, secretReference: string, customHmac?: string) => Promise<Response>;
171
181
  createProxyFetch: (config: ProxyFetchConfig) => (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
172
182
  createProxyGetView: (config: ProxyGetViewConfig) => (schema: string, viewName: string, parameters?: {
173
183
  [key: string]: string | number | boolean;
@@ -859,6 +869,12 @@ inset?: boolean;
859
869
 
860
870
  declare const DropdownMenuTrigger: ForwardRefExoticComponent<DropdownMenu_2.DropdownMenuTriggerProps & RefAttributes<HTMLButtonElement>>;
861
871
 
872
+ export declare type FetchProjectResponse = {
873
+ status: string;
874
+ projects: Project[];
875
+ time_taken: string;
876
+ };
877
+
862
878
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
863
879
 
864
880
  declare const FormControl: ForwardRefExoticComponent<Omit<SlotProps & RefAttributes<HTMLElement>, "ref"> & RefAttributes<HTMLElement>>;
@@ -1021,6 +1037,16 @@ declare const PopoverTrigger: ForwardRefExoticComponent<Popover_2.PopoverTrigger
1021
1037
 
1022
1038
  declare const Progress: ForwardRefExoticComponent<Omit<Progress_2.ProgressProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
1023
1039
 
1040
+ export declare type Project = {
1041
+ clone_url: string;
1042
+ project_name: string;
1043
+ creator_sxt_uuid: string;
1044
+ created_at_s: number;
1045
+ updated_at_s: number;
1046
+ hmac: string;
1047
+ extra_meta?: string | null;
1048
+ };
1049
+
1024
1050
  export declare const ProjectProvider: (props: {
1025
1051
  config: any;
1026
1052
  metadata?: any;
@@ -1028,12 +1054,12 @@ export declare const ProjectProvider: (props: {
1028
1054
  }) => JSX_2.Element;
1029
1055
 
1030
1056
  /** Configuration for the proxy fetch client */
1031
- declare type ProxyFetchConfig = {
1057
+ export declare type ProxyFetchConfig = {
1032
1058
  miniappName: string;
1033
1059
  };
1034
1060
 
1035
1061
  /** Configuration for the proxy getView client */
1036
- declare type ProxyGetViewConfig = {
1062
+ export declare type ProxyGetViewConfig = {
1037
1063
  miniappName: string;
1038
1064
  gwProxyUrl: string;
1039
1065
  };
@@ -1043,7 +1069,7 @@ declare const RadioGroup: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroup
1043
1069
  declare const RadioGroupItem: ForwardRefExoticComponent<Omit<RadioGroup_2.RadioGroupItemProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
1044
1070
 
1045
1071
  /** Represents rate limit configuration for a tier */
1046
- declare type RateLimit = {
1072
+ export declare type RateLimit = {
1047
1073
  miniapp_name: string;
1048
1074
  secret_reference: string;
1049
1075
  tier: string;
@@ -1136,7 +1162,7 @@ declare const ScrollArea: ForwardRefExoticComponent<Omit<ScrollArea_2.ScrollArea
1136
1162
  declare const ScrollBar: ForwardRefExoticComponent<Omit<ScrollArea_2.ScrollAreaScrollbarProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
1137
1163
 
1138
1164
  /** Represents a secret configuration for API access */
1139
- declare type Secret = {
1165
+ export declare type Secret = {
1140
1166
  creator_user_id: string;
1141
1167
  api_domain: string;
1142
1168
  api_path_prefix: string;
@@ -1298,6 +1324,21 @@ declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<
1298
1324
  declare interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
1299
1325
  }
1300
1326
 
1327
+ /** Represents a tier assignment for a user */
1328
+ export declare type TierAssignment = {
1329
+ miniapp_name: string;
1330
+ user_id: string;
1331
+ tier: string;
1332
+ };
1333
+
1334
+ /** Represents a mapping between a miniapp tier and a secret */
1335
+ export declare type TierMapping = {
1336
+ miniapp_name: string;
1337
+ creator_id: string;
1338
+ secret_reference: string;
1339
+ tier: string;
1340
+ };
1341
+
1301
1342
  declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
1302
1343
 
1303
1344
  declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;