@cf-vibesdk/sdk 0.0.6 → 0.0.7
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 +253 -37
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -5107,42 +5107,234 @@ declare const systemSettings: import("drizzle-orm/sqlite-core").SQLiteTableWithC
|
|
|
5107
5107
|
};
|
|
5108
5108
|
dialect: "sqlite";
|
|
5109
5109
|
}>;
|
|
5110
|
-
type User =
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
type
|
|
5135
|
-
type
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5110
|
+
type User = {
|
|
5111
|
+
id: string;
|
|
5112
|
+
email: string;
|
|
5113
|
+
username: string | null;
|
|
5114
|
+
displayName: string;
|
|
5115
|
+
avatarUrl: string | null;
|
|
5116
|
+
bio: string | null;
|
|
5117
|
+
provider: string;
|
|
5118
|
+
providerId: string;
|
|
5119
|
+
emailVerified: boolean | null;
|
|
5120
|
+
passwordHash: string | null;
|
|
5121
|
+
failedLoginAttempts: number | null;
|
|
5122
|
+
lockedUntil: Date | null;
|
|
5123
|
+
passwordChangedAt: Date | null;
|
|
5124
|
+
preferences: unknown | null;
|
|
5125
|
+
theme: "system" | "light" | "dark" | null;
|
|
5126
|
+
timezone: string | null;
|
|
5127
|
+
isActive: boolean | null;
|
|
5128
|
+
isSuspended: boolean | null;
|
|
5129
|
+
createdAt: Date | null;
|
|
5130
|
+
updatedAt: Date | null;
|
|
5131
|
+
lastActiveAt: Date | null;
|
|
5132
|
+
deletedAt: Date | null;
|
|
5133
|
+
}
|
|
5134
|
+
type NewUser = Record<string, unknown>;
|
|
5135
|
+
type Session = {
|
|
5136
|
+
id: string;
|
|
5137
|
+
userId: string;
|
|
5138
|
+
deviceInfo: string | null;
|
|
5139
|
+
userAgent: string | null;
|
|
5140
|
+
ipAddress: string | null;
|
|
5141
|
+
isRevoked: boolean | null;
|
|
5142
|
+
revokedAt: Date | null;
|
|
5143
|
+
revokedReason: string | null;
|
|
5144
|
+
accessTokenHash: string;
|
|
5145
|
+
refreshTokenHash: string;
|
|
5146
|
+
expiresAt: Date;
|
|
5147
|
+
createdAt: Date | null;
|
|
5148
|
+
lastActivity: Date | null;
|
|
5149
|
+
}
|
|
5150
|
+
type NewSession = Record<string, unknown>;
|
|
5151
|
+
type ApiKey = {
|
|
5152
|
+
id: string;
|
|
5153
|
+
userId: string;
|
|
5154
|
+
name: string;
|
|
5155
|
+
keyHash: string;
|
|
5156
|
+
keyPreview: string;
|
|
5157
|
+
scopes: string;
|
|
5158
|
+
isActive: boolean | null;
|
|
5159
|
+
lastUsed: Date | null;
|
|
5160
|
+
requestCount: number | null;
|
|
5161
|
+
expiresAt: Date | null;
|
|
5162
|
+
createdAt: Date | null;
|
|
5163
|
+
updatedAt: Date | null;
|
|
5164
|
+
}
|
|
5165
|
+
type NewApiKey = Record<string, unknown>;
|
|
5166
|
+
type App = {
|
|
5167
|
+
id: string;
|
|
5168
|
+
title: string;
|
|
5169
|
+
description: string | null;
|
|
5170
|
+
iconUrl: string | null;
|
|
5171
|
+
originalPrompt: string;
|
|
5172
|
+
finalPrompt: string | null;
|
|
5173
|
+
framework: string | null;
|
|
5174
|
+
userId: string | null;
|
|
5175
|
+
sessionToken: string | null;
|
|
5176
|
+
visibility: "private" | "public";
|
|
5177
|
+
status: "completed" | "generating";
|
|
5178
|
+
deploymentId: string | null;
|
|
5179
|
+
githubRepositoryUrl: string | null;
|
|
5180
|
+
githubRepositoryVisibility: "private" | "public" | null;
|
|
5181
|
+
isArchived: boolean | null;
|
|
5182
|
+
isFeatured: boolean | null;
|
|
5183
|
+
version: number | null;
|
|
5184
|
+
parentAppId: string | null;
|
|
5185
|
+
screenshotUrl: string | null;
|
|
5186
|
+
screenshotCapturedAt: Date | null;
|
|
5187
|
+
createdAt: Date | null;
|
|
5188
|
+
updatedAt: Date | null;
|
|
5189
|
+
lastDeployedAt: Date | null;
|
|
5190
|
+
}
|
|
5191
|
+
type NewApp = Record<string, unknown>;
|
|
5192
|
+
type AppLike = {
|
|
5193
|
+
id: string;
|
|
5194
|
+
appId: string;
|
|
5195
|
+
userId: string;
|
|
5196
|
+
reactionType: string;
|
|
5197
|
+
createdAt: Date | null;
|
|
5198
|
+
}
|
|
5199
|
+
type NewAppLike = Record<string, unknown>;
|
|
5200
|
+
type CommentLike = {
|
|
5201
|
+
id: string;
|
|
5202
|
+
commentId: string;
|
|
5203
|
+
userId: string;
|
|
5204
|
+
reactionType: string;
|
|
5205
|
+
createdAt: Date | null;
|
|
5206
|
+
}
|
|
5207
|
+
type NewCommentLike = Record<string, unknown>;
|
|
5208
|
+
type AppComment = {
|
|
5209
|
+
id: string;
|
|
5210
|
+
appId: string;
|
|
5211
|
+
userId: string;
|
|
5212
|
+
content: string;
|
|
5213
|
+
parentCommentId: string | null;
|
|
5214
|
+
isEdited: boolean | null;
|
|
5215
|
+
isDeleted: boolean | null;
|
|
5216
|
+
createdAt: Date | null;
|
|
5217
|
+
updatedAt: Date | null;
|
|
5218
|
+
}
|
|
5219
|
+
type NewAppComment = Record<string, unknown>;
|
|
5220
|
+
type AppView = {
|
|
5221
|
+
id: string;
|
|
5222
|
+
appId: string;
|
|
5223
|
+
userId: string | null;
|
|
5224
|
+
sessionToken: string | null;
|
|
5225
|
+
ipAddressHash: string | null;
|
|
5226
|
+
referrer: string | null;
|
|
5227
|
+
userAgent: string | null;
|
|
5228
|
+
deviceType: string | null;
|
|
5229
|
+
viewedAt: Date | null;
|
|
5230
|
+
durationSeconds: number | null;
|
|
5231
|
+
}
|
|
5232
|
+
type NewAppView = Record<string, unknown>;
|
|
5233
|
+
type OAuthState = {
|
|
5234
|
+
id: string;
|
|
5235
|
+
state: string;
|
|
5236
|
+
provider: string;
|
|
5237
|
+
redirectUri: string | null;
|
|
5238
|
+
scopes: unknown | null;
|
|
5239
|
+
userId: string | null;
|
|
5240
|
+
codeVerifier: string | null;
|
|
5241
|
+
nonce: string | null;
|
|
5242
|
+
createdAt: Date | null;
|
|
5243
|
+
expiresAt: Date;
|
|
5244
|
+
isUsed: boolean | null;
|
|
5245
|
+
}
|
|
5246
|
+
type NewOAuthState = Record<string, unknown>;
|
|
5247
|
+
type SystemSetting = {
|
|
5248
|
+
id: string;
|
|
5249
|
+
key: string;
|
|
5250
|
+
value: unknown | null;
|
|
5251
|
+
description: string | null;
|
|
5252
|
+
updatedAt: Date | null;
|
|
5253
|
+
updatedBy: string | null;
|
|
5254
|
+
}
|
|
5255
|
+
type NewSystemSetting = Record<string, unknown>;
|
|
5256
|
+
type Favorite = {
|
|
5257
|
+
id: string;
|
|
5258
|
+
userId: string;
|
|
5259
|
+
appId: string;
|
|
5260
|
+
createdAt: Date | null;
|
|
5261
|
+
}
|
|
5262
|
+
type NewFavorite = Record<string, unknown>;
|
|
5263
|
+
type AuthAttempt = {
|
|
5264
|
+
id: number;
|
|
5265
|
+
identifier: string;
|
|
5266
|
+
attemptType: "login" | "register" | "oauth_google" | "oauth_github" | "refresh" | "reset_password";
|
|
5267
|
+
success: boolean;
|
|
5268
|
+
ipAddress: string;
|
|
5269
|
+
userAgent: string | null;
|
|
5270
|
+
attemptedAt: Date | null;
|
|
5271
|
+
}
|
|
5272
|
+
type NewAuthAttempt = Record<string, unknown>;
|
|
5273
|
+
type PasswordResetToken = {
|
|
5274
|
+
id: string;
|
|
5275
|
+
userId: string;
|
|
5276
|
+
tokenHash: string;
|
|
5277
|
+
expiresAt: Date;
|
|
5278
|
+
used: boolean | null;
|
|
5279
|
+
createdAt: Date | null;
|
|
5280
|
+
}
|
|
5281
|
+
type NewPasswordResetToken = Record<string, unknown>;
|
|
5282
|
+
type EmailVerificationToken = {
|
|
5283
|
+
id: string;
|
|
5284
|
+
userId: string;
|
|
5285
|
+
tokenHash: string;
|
|
5286
|
+
email: string;
|
|
5287
|
+
expiresAt: Date;
|
|
5288
|
+
used: boolean | null;
|
|
5289
|
+
createdAt: Date | null;
|
|
5290
|
+
}
|
|
5291
|
+
type NewEmailVerificationToken = Record<string, unknown>;
|
|
5292
|
+
type AuditLog = {
|
|
5293
|
+
id: string;
|
|
5294
|
+
userId: string | null;
|
|
5295
|
+
entityType: string;
|
|
5296
|
+
entityId: string;
|
|
5297
|
+
action: string;
|
|
5298
|
+
oldValues: unknown | null;
|
|
5299
|
+
newValues: unknown | null;
|
|
5300
|
+
ipAddress: string | null;
|
|
5301
|
+
userAgent: string | null;
|
|
5302
|
+
createdAt: Date | null;
|
|
5303
|
+
}
|
|
5304
|
+
type NewAuditLog = Record<string, unknown>;
|
|
5305
|
+
type UserModelConfig = {
|
|
5306
|
+
id: string;
|
|
5307
|
+
userId: string;
|
|
5308
|
+
agentActionName: string;
|
|
5309
|
+
modelName: string | null;
|
|
5310
|
+
maxTokens: number | null;
|
|
5311
|
+
temperature: number | null;
|
|
5312
|
+
reasoningEffort: "high" | "medium" | "low" | null;
|
|
5313
|
+
providerOverride: "cloudflare" | "direct" | null;
|
|
5314
|
+
fallbackModel: string | null;
|
|
5315
|
+
isActive: boolean | null;
|
|
5316
|
+
createdAt: Date | null;
|
|
5317
|
+
updatedAt: Date | null;
|
|
5318
|
+
}
|
|
5319
|
+
type NewUserModelConfig = Record<string, unknown>;
|
|
5320
|
+
type UserModelProvider = {
|
|
5321
|
+
id: string;
|
|
5322
|
+
userId: string;
|
|
5323
|
+
name: string;
|
|
5324
|
+
baseUrl: string;
|
|
5325
|
+
secretId: string | null;
|
|
5326
|
+
isActive: boolean | null;
|
|
5327
|
+
createdAt: Date | null;
|
|
5328
|
+
updatedAt: Date | null;
|
|
5329
|
+
}
|
|
5330
|
+
type NewUserModelProvider = Record<string, unknown>;
|
|
5331
|
+
type Star = {
|
|
5332
|
+
id: string;
|
|
5333
|
+
userId: string;
|
|
5334
|
+
appId: string;
|
|
5335
|
+
starredAt: Date | null;
|
|
5336
|
+
}
|
|
5337
|
+
type NewStar = Record<string, unknown>;
|
|
5146
5338
|
type Visibility = "private" | "public";
|
|
5147
5339
|
/**
|
|
5148
5340
|
* Standard pagination interface used across all services
|
|
@@ -5278,7 +5470,31 @@ export type BuildStartEvent = {
|
|
|
5278
5470
|
};
|
|
5279
5471
|
export type ApiResponse<T> = BaseApiResponse<T>;
|
|
5280
5472
|
/** Base App type with all fields (serialized for JSON) */
|
|
5281
|
-
type App$1 =
|
|
5473
|
+
type App$1 = {
|
|
5474
|
+
id: string;
|
|
5475
|
+
title: string;
|
|
5476
|
+
description: string | null;
|
|
5477
|
+
iconUrl: string | null;
|
|
5478
|
+
originalPrompt: string;
|
|
5479
|
+
finalPrompt: string | null;
|
|
5480
|
+
framework: string | null;
|
|
5481
|
+
userId: string | null;
|
|
5482
|
+
sessionToken: string | null;
|
|
5483
|
+
visibility: "private" | "public";
|
|
5484
|
+
status: "completed" | "generating";
|
|
5485
|
+
deploymentId: string | null;
|
|
5486
|
+
githubRepositoryUrl: string | null;
|
|
5487
|
+
githubRepositoryVisibility: "private" | "public" | null;
|
|
5488
|
+
isArchived: boolean | null;
|
|
5489
|
+
isFeatured: boolean | null;
|
|
5490
|
+
version: number | null;
|
|
5491
|
+
parentAppId: string | null;
|
|
5492
|
+
screenshotUrl: string | null;
|
|
5493
|
+
screenshotCapturedAt: string | null;
|
|
5494
|
+
createdAt: string | null;
|
|
5495
|
+
updatedAt: string | null;
|
|
5496
|
+
lastDeployedAt: string | null;
|
|
5497
|
+
};
|
|
5282
5498
|
/** App visibility setting */
|
|
5283
5499
|
export type AppVisibility = Visibility;
|
|
5284
5500
|
/** App with favorite status for user-specific queries */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cf-vibesdk/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "rm -rf ./dist && bun build ./src/index.ts --outdir ./dist --target browser",
|
|
22
|
-
"bundle-types": "dts-bundle-generator --export-referenced-types false --no-check --project ./tsconfig.protocol.json -o ./dist/index.d.ts ./src/index.ts",
|
|
22
|
+
"bundle-types": "dts-bundle-generator --export-referenced-types false --no-check --project ./tsconfig.protocol.json -o ./dist/index.d.ts ./src/index.ts && bun run scripts/expand-drizzle-types.ts",
|
|
23
23
|
"typecheck": "tsc -p ./tsconfig.json --noEmit",
|
|
24
24
|
"test": "bun test test/*.test.ts",
|
|
25
25
|
"test:integration": "bun test --timeout 600000 test/integration/*.test.ts"
|