@lovable.dev/sdk 1.9.0 → 1.10.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/README.md +5 -4
- package/dist/index.d.ts +167 -330
- package/dist/index.js +3 -17
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +192 -382
- package/dist/schemas.js +98 -77
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +2 -16
- package/src/generated/paths.ts +165 -315
- package/src/generated/version.ts +1 -1
- package/src/generated/zod/zod.gen.ts +85 -52
- package/src/schemas-deprecated.ts +25 -50
- package/src/types.ts +3 -4
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -325,10 +325,8 @@ export class LovableClient {
|
|
|
325
325
|
visibility: options?.visibility,
|
|
326
326
|
publish_status: options?.publish_status,
|
|
327
327
|
folder_id: options?.folder_id,
|
|
328
|
-
folder_ids: options?.folder_ids,
|
|
329
328
|
user_id: options?.user_id,
|
|
330
329
|
type: options?.type,
|
|
331
|
-
search_fields: options?.search_fields,
|
|
332
330
|
viewed_by_me: options?.viewed_by_me,
|
|
333
331
|
cursor: options?.cursor,
|
|
334
332
|
limit: options?.limit,
|
|
@@ -1251,19 +1249,7 @@ export class LovableClient {
|
|
|
1251
1249
|
return remix.job_id;
|
|
1252
1250
|
}
|
|
1253
1251
|
|
|
1254
|
-
/**
|
|
1255
|
-
* Wait for a remix operation to complete.
|
|
1256
|
-
*
|
|
1257
|
-
* Polls the remix job endpoint until the job reaches "completed" or "error" status.
|
|
1258
|
-
*
|
|
1259
|
-
* @param sourceProjectId - The source project ID. Kept for backward compatibility; the public job endpoint is keyed by job ID.
|
|
1260
|
-
* @param jobId - The job ID returned by `remixProject()`
|
|
1261
|
-
* @param options.pollInterval - Time between polls in ms (default: 2000)
|
|
1262
|
-
* @param options.timeout - Maximum time to wait in ms (default: 300000 = 5 minutes)
|
|
1263
|
-
* @param options.onProgress - Optional callback for status/step updates
|
|
1264
|
-
* @returns The new project ID
|
|
1265
|
-
* @throws Error if the remix fails or timeout is reached
|
|
1266
|
-
*/
|
|
1252
|
+
/** sourceProjectId is retained for compatibility; the API looks up jobs by jobId. */
|
|
1267
1253
|
async waitForRemix(sourceProjectId: string, jobId: string, options?: RemixWaitOptions): Promise<RemixResult> {
|
|
1268
1254
|
const pollInterval = options?.pollInterval ?? 2000;
|
|
1269
1255
|
const timeout = options?.timeout ?? 300000;
|
|
@@ -1277,7 +1263,7 @@ export class LovableClient {
|
|
|
1277
1263
|
});
|
|
1278
1264
|
const progress = data!;
|
|
1279
1265
|
const status = progress.status as RemixJobStatus;
|
|
1280
|
-
options?.onProgress?.(status
|
|
1266
|
+
options?.onProgress?.(status);
|
|
1281
1267
|
|
|
1282
1268
|
if (status === "completed" && progress.result) {
|
|
1283
1269
|
return { projectId: progress.result.project_id };
|