@lovable.dev/sdk 1.3.0 → 1.4.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 +238 -5
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +58 -2
- package/dist/schemas.js +35 -5
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +10 -2
- package/src/generated/paths.ts +236 -4
- package/src/generated/zod/zod.gen.ts +41 -2
- package/src/types.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -380,6 +380,50 @@ interface paths {
|
|
|
380
380
|
patch?: never;
|
|
381
381
|
trace?: never;
|
|
382
382
|
};
|
|
383
|
+
"/v1/members/bulk-set-credit-limit": {
|
|
384
|
+
parameters: {
|
|
385
|
+
query?: never;
|
|
386
|
+
header?: never;
|
|
387
|
+
path?: never;
|
|
388
|
+
cookie?: never;
|
|
389
|
+
};
|
|
390
|
+
get?: never;
|
|
391
|
+
put?: never;
|
|
392
|
+
/**
|
|
393
|
+
* Bulk-set member credit limits (Preview)
|
|
394
|
+
* @description Sets or clears the monthly credit limit for up to 50 members in one request. Returns HTTP 200 with a per-member result; an individual failure does not fail the request. Pass workspace_id in the request body.
|
|
395
|
+
*
|
|
396
|
+
* This operation is in public preview (beta): send `X-Enable-Beta: true` on every request. Requests without the header are rejected with HTTP 400 and type `beta_required` in the standard error envelope. Request and response shapes may change before the operation graduates to the stable surface.
|
|
397
|
+
*/
|
|
398
|
+
post: operations["post-v1-members-bulk-set-credit-limit"];
|
|
399
|
+
delete?: never;
|
|
400
|
+
options?: never;
|
|
401
|
+
head?: never;
|
|
402
|
+
patch?: never;
|
|
403
|
+
trace?: never;
|
|
404
|
+
};
|
|
405
|
+
"/v1/members/{user_id}": {
|
|
406
|
+
parameters: {
|
|
407
|
+
query?: never;
|
|
408
|
+
header?: never;
|
|
409
|
+
path?: never;
|
|
410
|
+
cookie?: never;
|
|
411
|
+
};
|
|
412
|
+
get?: never;
|
|
413
|
+
put?: never;
|
|
414
|
+
post?: never;
|
|
415
|
+
delete?: never;
|
|
416
|
+
options?: never;
|
|
417
|
+
head?: never;
|
|
418
|
+
/**
|
|
419
|
+
* Update a member's credit limit (Preview)
|
|
420
|
+
* @description Sets or clears a workspace member's monthly credit limit. Pass workspace_id in the request body and the member's user_id in the path.
|
|
421
|
+
*
|
|
422
|
+
* This operation is in public preview (beta): send `X-Enable-Beta: true` on every request. Requests without the header are rejected with HTTP 400 and type `beta_required` in the standard error envelope. Request and response shapes may change before the operation graduates to the stable surface.
|
|
423
|
+
*/
|
|
424
|
+
patch: operations["patch-v1-members-user_id"];
|
|
425
|
+
trace?: never;
|
|
426
|
+
};
|
|
383
427
|
"/v1/messages": {
|
|
384
428
|
parameters: {
|
|
385
429
|
query?: never;
|
|
@@ -1101,7 +1145,13 @@ interface paths {
|
|
|
1101
1145
|
delete?: never;
|
|
1102
1146
|
options?: never;
|
|
1103
1147
|
head?: never;
|
|
1104
|
-
|
|
1148
|
+
/**
|
|
1149
|
+
* Update workspace settings (Preview)
|
|
1150
|
+
* @description Updates writable workspace settings. Currently supports the default per-member monthly credit limit. Pass workspace_id in the request body.
|
|
1151
|
+
*
|
|
1152
|
+
* This operation is in public preview (beta): send `X-Enable-Beta: true` on every request. Requests without the header are rejected with HTTP 400 and type `beta_required` in the standard error envelope. Request and response shapes may change before the operation graduates to the stable surface.
|
|
1153
|
+
*/
|
|
1154
|
+
patch: operations["patch-v1-settings"];
|
|
1105
1155
|
trace?: never;
|
|
1106
1156
|
};
|
|
1107
1157
|
"/v1/skills": {
|
|
@@ -2028,6 +2078,16 @@ interface components {
|
|
|
2028
2078
|
/** @description Project ID */
|
|
2029
2079
|
project_id: string;
|
|
2030
2080
|
};
|
|
2081
|
+
PublicV1GetEditsOutputBody: {
|
|
2082
|
+
/** @description List of edits */
|
|
2083
|
+
data: components["schemas"]["V1EditSummary"][] | null;
|
|
2084
|
+
/** @description Deprecated: use data. Legacy edits list kept for backward compatibility */
|
|
2085
|
+
edits: components["schemas"]["V1EditSummary"][] | null;
|
|
2086
|
+
/** @description Deprecated: use pagination.has_more */
|
|
2087
|
+
has_more: boolean;
|
|
2088
|
+
/** @description Cursor pagination metadata */
|
|
2089
|
+
pagination: components["schemas"]["Pagination"];
|
|
2090
|
+
};
|
|
2031
2091
|
PublicV1GetWorkspaceBody: {
|
|
2032
2092
|
/** @description Caller's membership in this workspace. */
|
|
2033
2093
|
current_member?: components["schemas"]["PublicV1WorkspaceMember"];
|
|
@@ -2549,6 +2609,48 @@ interface components {
|
|
|
2549
2609
|
*/
|
|
2550
2610
|
start: string;
|
|
2551
2611
|
};
|
|
2612
|
+
V1BulkMemberCreditLimitItem: {
|
|
2613
|
+
/**
|
|
2614
|
+
* Format: double
|
|
2615
|
+
* @description A number (0 blocks all spend) to set the cap, or null to clear it (the member inherits the workspace default).
|
|
2616
|
+
*/
|
|
2617
|
+
monthly_credit_limit: number | null;
|
|
2618
|
+
/** @description Member user_id (from GET /v1/members; active members only). */
|
|
2619
|
+
user_id: string;
|
|
2620
|
+
};
|
|
2621
|
+
V1BulkMemberCreditLimitResult: {
|
|
2622
|
+
/** @description Failure reason when status is error. */
|
|
2623
|
+
error?: string;
|
|
2624
|
+
/** @description success or error. */
|
|
2625
|
+
status: string;
|
|
2626
|
+
/** @description The member this result is for. */
|
|
2627
|
+
user_id: string;
|
|
2628
|
+
};
|
|
2629
|
+
V1BulkSetMemberCreditLimitInputBody: {
|
|
2630
|
+
/** @description Per-member limits to apply (1-50 entries). Use the workspace default (PATCH /v1/settings) to cap everyone at once. */
|
|
2631
|
+
members: components["schemas"]["V1BulkMemberCreditLimitItem"][];
|
|
2632
|
+
/** @description Workspace ID. */
|
|
2633
|
+
workspace_id: string;
|
|
2634
|
+
};
|
|
2635
|
+
V1BulkSetMemberCreditLimitOutputBody: {
|
|
2636
|
+
/**
|
|
2637
|
+
* Format: int64
|
|
2638
|
+
* @description Number that failed (see per-item error).
|
|
2639
|
+
*/
|
|
2640
|
+
failed: number;
|
|
2641
|
+
/** @description Per-member outcome, in request order. */
|
|
2642
|
+
results: components["schemas"]["V1BulkMemberCreditLimitResult"][] | null;
|
|
2643
|
+
/**
|
|
2644
|
+
* Format: int64
|
|
2645
|
+
* @description Number applied successfully.
|
|
2646
|
+
*/
|
|
2647
|
+
successful: number;
|
|
2648
|
+
/**
|
|
2649
|
+
* Format: int64
|
|
2650
|
+
* @description Number of members in the request.
|
|
2651
|
+
*/
|
|
2652
|
+
total: number;
|
|
2653
|
+
};
|
|
2552
2654
|
V1ConnectionItem: {
|
|
2553
2655
|
/** @description Connector type (e.g. google_drive, stripe) */
|
|
2554
2656
|
connector_id: string;
|
|
@@ -2742,7 +2844,6 @@ interface components {
|
|
|
2742
2844
|
};
|
|
2743
2845
|
V1DiffResponse: {
|
|
2744
2846
|
diffs: components["schemas"]["V1DiffEntry"][] | null;
|
|
2745
|
-
error?: string;
|
|
2746
2847
|
};
|
|
2747
2848
|
V1EditSummary: {
|
|
2748
2849
|
/** @description Commit message */
|
|
@@ -3283,6 +3384,24 @@ interface components {
|
|
|
3283
3384
|
/** @description File type (e.g. user_upload) */
|
|
3284
3385
|
type?: string;
|
|
3285
3386
|
};
|
|
3387
|
+
V1UpdateMemberCreditLimitInputBody: {
|
|
3388
|
+
/**
|
|
3389
|
+
* Format: double
|
|
3390
|
+
* @description The member's monthly credit cap. Send a number >= 0 (0 blocks all spend) to set it, or null to clear it (the member then inherits the workspace default).
|
|
3391
|
+
*/
|
|
3392
|
+
monthly_credit_limit?: number | null;
|
|
3393
|
+
/** @description Workspace ID. */
|
|
3394
|
+
workspace_id: string;
|
|
3395
|
+
};
|
|
3396
|
+
V1UpdateWorkspaceSettingsInputBody: {
|
|
3397
|
+
/**
|
|
3398
|
+
* Format: double
|
|
3399
|
+
* @description Default monthly credit cap applied to each member without an explicit per-member limit. Send a number >= 0 (0 blocks all member spend) to set it, or null to clear it (members are then bounded only by the workspace balance).
|
|
3400
|
+
*/
|
|
3401
|
+
default_monthly_member_credit_limit?: number | null;
|
|
3402
|
+
/** @description Workspace ID. */
|
|
3403
|
+
workspace_id: string;
|
|
3404
|
+
};
|
|
3286
3405
|
V1UsagePeriod: {
|
|
3287
3406
|
/** @description Inclusive end of the covered window (YYYY-MM-DD, UTC). */
|
|
3288
3407
|
end: string;
|
|
@@ -4318,7 +4437,9 @@ interface operations {
|
|
|
4318
4437
|
project_id: string;
|
|
4319
4438
|
/** @description Maximum number of edits to return */
|
|
4320
4439
|
limit?: number;
|
|
4321
|
-
/** @description
|
|
4440
|
+
/** @description Opaque pagination cursor returned by the previous page */
|
|
4441
|
+
cursor?: string;
|
|
4442
|
+
/** @description Deprecated: use cursor. ISO 8601 timestamp to fetch edits older than */
|
|
4322
4443
|
before?: string;
|
|
4323
4444
|
};
|
|
4324
4445
|
header?: never;
|
|
@@ -4333,7 +4454,7 @@ interface operations {
|
|
|
4333
4454
|
[name: string]: unknown;
|
|
4334
4455
|
};
|
|
4335
4456
|
content: {
|
|
4336
|
-
"application/json": components["schemas"]["
|
|
4457
|
+
"application/json": components["schemas"]["PublicV1GetEditsOutputBody"];
|
|
4337
4458
|
};
|
|
4338
4459
|
};
|
|
4339
4460
|
/** @description Error */
|
|
@@ -4639,6 +4760,81 @@ interface operations {
|
|
|
4639
4760
|
};
|
|
4640
4761
|
};
|
|
4641
4762
|
};
|
|
4763
|
+
"post-v1-members-bulk-set-credit-limit": {
|
|
4764
|
+
parameters: {
|
|
4765
|
+
query?: never;
|
|
4766
|
+
header: {
|
|
4767
|
+
/** @description Required for public preview endpoints. Set to true on every request. */
|
|
4768
|
+
"X-Enable-Beta": "true";
|
|
4769
|
+
};
|
|
4770
|
+
path?: never;
|
|
4771
|
+
cookie?: never;
|
|
4772
|
+
};
|
|
4773
|
+
requestBody: {
|
|
4774
|
+
content: {
|
|
4775
|
+
"application/json": components["schemas"]["V1BulkSetMemberCreditLimitInputBody"];
|
|
4776
|
+
};
|
|
4777
|
+
};
|
|
4778
|
+
responses: {
|
|
4779
|
+
/** @description OK */
|
|
4780
|
+
200: {
|
|
4781
|
+
headers: {
|
|
4782
|
+
[name: string]: unknown;
|
|
4783
|
+
};
|
|
4784
|
+
content: {
|
|
4785
|
+
"application/json": components["schemas"]["V1BulkSetMemberCreditLimitOutputBody"];
|
|
4786
|
+
};
|
|
4787
|
+
};
|
|
4788
|
+
/** @description Error */
|
|
4789
|
+
default: {
|
|
4790
|
+
headers: {
|
|
4791
|
+
[name: string]: unknown;
|
|
4792
|
+
};
|
|
4793
|
+
content: {
|
|
4794
|
+
"application/problem+json": components["schemas"]["ErrorModel"];
|
|
4795
|
+
};
|
|
4796
|
+
};
|
|
4797
|
+
};
|
|
4798
|
+
};
|
|
4799
|
+
"patch-v1-members-user_id": {
|
|
4800
|
+
parameters: {
|
|
4801
|
+
query?: never;
|
|
4802
|
+
header: {
|
|
4803
|
+
/** @description Required for public preview endpoints. Set to true on every request. */
|
|
4804
|
+
"X-Enable-Beta": "true";
|
|
4805
|
+
};
|
|
4806
|
+
path: {
|
|
4807
|
+
/** @description User ID of the member to update (the user_id returned by GET /v1/members; active members only). */
|
|
4808
|
+
user_id: string;
|
|
4809
|
+
};
|
|
4810
|
+
cookie?: never;
|
|
4811
|
+
};
|
|
4812
|
+
requestBody: {
|
|
4813
|
+
content: {
|
|
4814
|
+
"application/json": components["schemas"]["V1UpdateMemberCreditLimitInputBody"];
|
|
4815
|
+
};
|
|
4816
|
+
};
|
|
4817
|
+
responses: {
|
|
4818
|
+
/** @description OK */
|
|
4819
|
+
200: {
|
|
4820
|
+
headers: {
|
|
4821
|
+
[name: string]: unknown;
|
|
4822
|
+
};
|
|
4823
|
+
content: {
|
|
4824
|
+
"application/json": components["schemas"]["V1WorkspaceMember"];
|
|
4825
|
+
};
|
|
4826
|
+
};
|
|
4827
|
+
/** @description Error */
|
|
4828
|
+
default: {
|
|
4829
|
+
headers: {
|
|
4830
|
+
[name: string]: unknown;
|
|
4831
|
+
};
|
|
4832
|
+
content: {
|
|
4833
|
+
"application/problem+json": components["schemas"]["ErrorModel"];
|
|
4834
|
+
};
|
|
4835
|
+
};
|
|
4836
|
+
};
|
|
4837
|
+
};
|
|
4642
4838
|
"get-v1-messages": {
|
|
4643
4839
|
parameters: {
|
|
4644
4840
|
query: {
|
|
@@ -6095,6 +6291,42 @@ interface operations {
|
|
|
6095
6291
|
};
|
|
6096
6292
|
};
|
|
6097
6293
|
};
|
|
6294
|
+
"patch-v1-settings": {
|
|
6295
|
+
parameters: {
|
|
6296
|
+
query?: never;
|
|
6297
|
+
header: {
|
|
6298
|
+
/** @description Required for public preview endpoints. Set to true on every request. */
|
|
6299
|
+
"X-Enable-Beta": "true";
|
|
6300
|
+
};
|
|
6301
|
+
path?: never;
|
|
6302
|
+
cookie?: never;
|
|
6303
|
+
};
|
|
6304
|
+
requestBody: {
|
|
6305
|
+
content: {
|
|
6306
|
+
"application/json": components["schemas"]["V1UpdateWorkspaceSettingsInputBody"];
|
|
6307
|
+
};
|
|
6308
|
+
};
|
|
6309
|
+
responses: {
|
|
6310
|
+
/** @description OK */
|
|
6311
|
+
200: {
|
|
6312
|
+
headers: {
|
|
6313
|
+
[name: string]: unknown;
|
|
6314
|
+
};
|
|
6315
|
+
content: {
|
|
6316
|
+
"application/json": components["schemas"]["V1WorkspaceSettingsBody"];
|
|
6317
|
+
};
|
|
6318
|
+
};
|
|
6319
|
+
/** @description Error */
|
|
6320
|
+
default: {
|
|
6321
|
+
headers: {
|
|
6322
|
+
[name: string]: unknown;
|
|
6323
|
+
};
|
|
6324
|
+
content: {
|
|
6325
|
+
"application/problem+json": components["schemas"]["ErrorModel"];
|
|
6326
|
+
};
|
|
6327
|
+
};
|
|
6328
|
+
};
|
|
6329
|
+
};
|
|
6098
6330
|
"get-v1-skills": {
|
|
6099
6331
|
parameters: {
|
|
6100
6332
|
query: {
|
|
@@ -7320,7 +7552,7 @@ type GitFilesResponse = Schemas["PublicV1GitFilesResponse"] & {
|
|
|
7320
7552
|
files: GitFileEntry[];
|
|
7321
7553
|
};
|
|
7322
7554
|
type EditSummary = Schemas["V1EditSummary"];
|
|
7323
|
-
type EditsResponse = Schemas["
|
|
7555
|
+
type EditsResponse = Schemas["PublicV1GetEditsOutputBody"];
|
|
7324
7556
|
type LibraryProjectResponse = Record<string, unknown>;
|
|
7325
7557
|
type TemplateProjectResponse = Record<string, unknown>;
|
|
7326
7558
|
type ListLibraryProjectsResponse = {
|
|
@@ -7768,6 +8000,7 @@ declare class LovableClient {
|
|
|
7768
8000
|
listEdits(projectId: string, params?: {
|
|
7769
8001
|
limit?: number;
|
|
7770
8002
|
before?: string;
|
|
8003
|
+
cursor?: string;
|
|
7771
8004
|
}): Promise<EditsResponse>;
|
|
7772
8005
|
/** Get an ephemeral presigned URL for uploading a file before a project exists. */
|
|
7773
8006
|
getFileUploadUrl(params: {
|
package/dist/index.js
CHANGED
|
@@ -729,7 +729,8 @@ var LovableClient = class {
|
|
|
729
729
|
const { data } = await this.typed.GET("/v1/edits", { params: { query: {
|
|
730
730
|
project_id: projectId,
|
|
731
731
|
limit: params?.limit,
|
|
732
|
-
before: params?.before
|
|
732
|
+
before: params?.before,
|
|
733
|
+
cursor: params?.cursor
|
|
733
734
|
} } });
|
|
734
735
|
return data;
|
|
735
736
|
}
|