@devpad/api 2.0.2 → 2.0.4
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/{chunk-5X36WMYQ.js → chunk-5ALH7B5B.js} +7 -1
- package/dist/{chunk-WTGVONUB.js → chunk-XGQQPYSB.js} +8 -4
- package/dist/{errors.d-C73AkrdX.d.ts → errors.d-DcjQAql-.d.ts} +12 -2
- package/dist/index.d.ts +14 -6
- package/dist/index.js +150 -48
- package/dist/{media.d-R87HGuRp.d.ts → media.d-CQ56ckoR.d.ts} +1 -1
- package/dist/schema/blog.d.ts +529 -607
- package/dist/schema/blog.js +10 -81
- package/dist/schema/index.d.ts +5 -5
- package/dist/schema/index.js +6 -82
- package/dist/schema/media.d.ts +8 -9
- package/dist/schema/media.js +6 -98
- package/dist/{schema.d-BceDyQED.d.ts → schema.d-DcPuyqgh.d.ts} +414 -531
- package/dist/{types.d-UV8B6hPN.d.ts → types.d-BgSkvLhS.d.ts} +4286 -4286
- package/dist/{types.d-CoHRMrYJ.d.ts → types.d-CeY2wsr4.d.ts} +13 -1
- package/dist/{types.d-1hBObc_N.d.ts → types.d-DLE9TSql.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-FOO5XXY5.js +0 -318
package/dist/schema/blog.js
CHANGED
|
@@ -1,66 +1,13 @@
|
|
|
1
|
+
// src/schema/blog.ts
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { integer, primaryKey, sqliteTable, text, unique } from "drizzle-orm/sqlite-core";
|
|
11
|
-
var blog_posts = sqliteTable("blog_posts", {
|
|
12
|
-
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
13
|
-
uuid: text("uuid").notNull().unique(),
|
|
14
|
-
author_id: text("author_id").notNull(),
|
|
15
|
-
slug: text("slug").notNull(),
|
|
16
|
-
corpus_version: text("corpus_version"),
|
|
17
|
-
category: text("category").notNull().default("root"),
|
|
18
|
-
archived: integer("archived", { mode: "boolean" }).notNull().default(false),
|
|
19
|
-
publish_at: integer("publish_at", { mode: "timestamp" }),
|
|
20
|
-
created_at: integer("created_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`),
|
|
21
|
-
updated_at: integer("updated_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`)
|
|
22
|
-
}, (table) => ({
|
|
23
|
-
posts_author_slug_unique: unique("posts_author_slug_unique").on(table.author_id, table.slug)
|
|
24
|
-
}));
|
|
25
|
-
var blog_categories = sqliteTable("blog_categories", {
|
|
26
|
-
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
27
|
-
owner_id: text("owner_id").notNull(),
|
|
28
|
-
name: text("name").notNull(),
|
|
29
|
-
parent: text("parent").default("root")
|
|
30
|
-
}, (table) => ({
|
|
31
|
-
categories_owner_name_unique: unique("categories_owner_name_unique").on(table.owner_id, table.name)
|
|
32
|
-
}));
|
|
33
|
-
var blog_tags = sqliteTable("blog_tags", {
|
|
34
|
-
post_id: integer("post_id").notNull().references(() => blog_posts.id, { onDelete: "cascade" }),
|
|
35
|
-
tag: text("tag").notNull()
|
|
36
|
-
}, (table) => ({
|
|
37
|
-
blog_tags_pk: primaryKey({ columns: [table.post_id, table.tag] })
|
|
38
|
-
}));
|
|
39
|
-
var blog_integrations = sqliteTable("blog_integrations", {
|
|
40
|
-
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
41
|
-
user_id: text("user_id").notNull(),
|
|
42
|
-
source: text("source").notNull(),
|
|
43
|
-
location: text("location").notNull(),
|
|
44
|
-
data: text("data", { mode: "json" }).$type(),
|
|
45
|
-
last_fetch: integer("last_fetch", { mode: "timestamp" }),
|
|
46
|
-
status: text("status").default("pending"),
|
|
47
|
-
created_at: integer("created_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`)
|
|
48
|
-
});
|
|
49
|
-
var blog_fetch_links = sqliteTable("blog_fetch_links", {
|
|
50
|
-
id: integer("id").primaryKey({ autoIncrement: true }),
|
|
51
|
-
post_id: integer("post_id").notNull().references(() => blog_posts.id, { onDelete: "cascade" }),
|
|
52
|
-
integration_id: integer("integration_id").notNull().references(() => blog_integrations.id, { onDelete: "cascade" }),
|
|
53
|
-
identifier: text("identifier").notNull()
|
|
54
|
-
}, (table) => ({
|
|
55
|
-
fetch_links_integration_identifier_unique: unique("fetch_links_integration_identifier_unique").on(table.integration_id, table.identifier)
|
|
56
|
-
}));
|
|
57
|
-
var blog_post_projects = sqliteTable("blog_post_projects", {
|
|
58
|
-
post_id: integer("post_id").notNull().references(() => blog_posts.id, { onDelete: "cascade" }),
|
|
59
|
-
project_id: text("project_id").notNull(),
|
|
60
|
-
created_at: integer("created_at", { mode: "timestamp" }).notNull().default(sql`(unixepoch())`)
|
|
61
|
-
}, (table) => ({
|
|
62
|
-
blog_post_projects_pk: primaryKey({ columns: [table.post_id, table.project_id] })
|
|
63
|
-
}));
|
|
3
|
+
create_cloudflare_backend,
|
|
4
|
+
create_corpus,
|
|
5
|
+
create_memory_backend,
|
|
6
|
+
define_store as define_store2,
|
|
7
|
+
err as err2,
|
|
8
|
+
json_codec as json_codec2,
|
|
9
|
+
ok as ok2
|
|
10
|
+
} from "@f0rbit/corpus";
|
|
64
11
|
|
|
65
12
|
// ../schema/dist/blog/corpus.js
|
|
66
13
|
import { define_store, json_codec } from "@f0rbit/corpus";
|
|
@@ -310,39 +257,21 @@ export {
|
|
|
310
257
|
TagInsertSchema,
|
|
311
258
|
TagSchema,
|
|
312
259
|
VersionInfoSchema,
|
|
313
|
-
api_keys,
|
|
314
|
-
at,
|
|
315
|
-
blog_categories,
|
|
316
|
-
blog_fetch_links,
|
|
317
|
-
blog_integrations,
|
|
318
|
-
blog_post_projects,
|
|
319
|
-
blog_posts,
|
|
320
|
-
blog_tags,
|
|
321
260
|
corpusPath,
|
|
322
261
|
create_cloudflare_backend,
|
|
323
262
|
create_corpus,
|
|
324
263
|
create_memory_backend,
|
|
325
264
|
define_store2 as define_store,
|
|
326
265
|
err2 as err,
|
|
327
|
-
first,
|
|
328
|
-
format_error,
|
|
329
266
|
isDraft,
|
|
330
267
|
isPublished,
|
|
331
268
|
isScheduled,
|
|
332
269
|
json_codec2 as json_codec,
|
|
333
|
-
last,
|
|
334
270
|
mapCorpusError,
|
|
335
|
-
match,
|
|
336
271
|
ok2 as ok,
|
|
337
272
|
parsePostContent,
|
|
338
|
-
pipe,
|
|
339
273
|
postStatus,
|
|
340
274
|
postStoreId,
|
|
341
275
|
postsStoreDefinition,
|
|
342
|
-
serializePostContent
|
|
343
|
-
to_fallback,
|
|
344
|
-
to_nullable,
|
|
345
|
-
try_catch,
|
|
346
|
-
try_catch_async,
|
|
347
|
-
unwrap_or
|
|
276
|
+
serializePostContent
|
|
348
277
|
};
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { A as
|
|
2
|
-
export {
|
|
3
|
-
export { c as Action, R as ApiClientConfig, A as ApiKey, a0 as ApiResponse, a5 as ArrayBufferedQueue, a4 as BufferedQueue, C as CodebaseTask, a9 as ConfigSchema, a3 as ConfigSchemaType, L as GetConfigResult, G as Goal, $ as HistoryAction, I as IgnorePath, p as InsertAction, i as InsertApiKey, q as InsertCodebaseTask, n as InsertGoal, u as InsertIgnorePath, m as InsertMilestone, j as InsertProject, h as InsertSession, l as InsertTag, t as InsertTagConfig, k as InsertTask, o as InsertTaskTag, r as InsertTodoUpdate, s as InsertTrackerResult, g as InsertUser, M as Milestone, W as Nullable, P as Project, D as ProjectConfig, J as ProjectWithTasks, V as RequestOptions, E as SaveConfigRequest, F as SaveTagsRequest, Y as ScanStatus, Z as ScanStatusRequest, _ as ScanUpdate, S as Session, N as TAG_COLOURS, a as Tag, O as TagColor, f as TagConfig, K as TagWithColor, Q as TagWithTypedColor, T as Task, b as TaskTag, X as TaskView, H as TaskWithDetails, d as TodoUpdate, e as TrackerResult, B as UpdateAction, a1 as UpdateData, a2 as UpdateUser, z as UpsertGoal, y as UpsertMilestone, v as UpsertProject, x as UpsertTag, w as UpsertTodo, U as User, af as config_schema, ab as project_config, ac as save_config_request, ad as save_tags_request, a8 as update_action, ae as update_user, ah as upsert_goal, ag as upsert_milestone, a6 as upsert_project, aa as upsert_tag, a7 as upsert_todo } from '../types.d-CoHRMrYJ.js';
|
|
4
|
-
import 'drizzle-orm';
|
|
5
|
-
import 'drizzle-orm/sqlite-core';
|
|
1
|
+
export { b as ApiError, A as AuthExpiredError, d as BadRequestError, B as BaseError, C as ConflictError, h as CronError, D as DatabaseError, E as EncryptionError, i as ErrorContext, j as ErrorLogEntry, F as ForbiddenError, G as GithubError, a as NetworkError, N as NotFoundError, P as ParseError, c as ProtectedError, g as ProviderError, R as RateLimitedError, e as ScanError, f as ServiceError, S as StoreError, U as UnauthorizedError, V as ValidationError, Y as apiError, X as authExpired, a2 as badRequest, k as configureErrorLogging, a0 as conflict, $ as dbError, _ as encryptionError, a6 as errors, M as forbidden, a5 as githubError, s as isApiError, r as isAuthExpiredError, y as isBadRequestError, w as isConflictError, v as isDatabaseError, u as isEncryptionError, m as isForbiddenError, I as isGithubError, q as isNetworkError, l as isNotFoundError, t as isParseError, x as isProtectedError, o as isRateLimitedError, K as isRetryableError, H as isScanError, J as isServiceError, p as isStoreError, z as isUnauthorizedError, n as isValidationError, W as networkError, L as notFound, Z as parseError, a1 as protectedEntity, Q as rateLimited, a4 as scanError, T as storeError, a3 as unauthorized, O as validation } from '../errors.d-DcjQAql-.js';
|
|
2
|
+
export { c as Action, R as ApiClientConfig, A as ApiKey, a0 as ApiResponse, a5 as ArrayBufferedQueue, a4 as BufferedQueue, C as CodebaseTask, a9 as ConfigSchema, a3 as ConfigSchemaType, L as GetConfigResult, G as Goal, $ as HistoryAction, I as IgnorePath, p as InsertAction, i as InsertApiKey, q as InsertCodebaseTask, n as InsertGoal, u as InsertIgnorePath, m as InsertMilestone, j as InsertProject, h as InsertSession, l as InsertTag, t as InsertTagConfig, k as InsertTask, o as InsertTaskTag, r as InsertTodoUpdate, s as InsertTrackerResult, g as InsertUser, M as Milestone, W as Nullable, P as Project, D as ProjectConfig, J as ProjectWithTasks, V as RequestOptions, E as SaveConfigRequest, F as SaveTagsRequest, Y as ScanStatus, Z as ScanStatusRequest, _ as ScanUpdate, S as Session, N as TAG_COLOURS, a as Tag, O as TagColor, f as TagConfig, K as TagWithColor, Q as TagWithTypedColor, T as Task, b as TaskTag, X as TaskView, H as TaskWithDetails, d as TodoUpdate, e as TrackerResult, B as UpdateAction, a1 as UpdateData, a2 as UpdateUser, z as UpsertGoal, y as UpsertMilestone, v as UpsertProject, x as UpsertTag, w as UpsertTodo, U as User, af as config_schema, ab as project_config, ac as save_config_request, ad as save_tags_request, a8 as update_action, ae as update_user, ah as upsert_goal, ag as upsert_milestone, a6 as upsert_project, aa as upsert_tag, a7 as upsert_todo } from '../types.d-CeY2wsr4.js';
|
|
6
3
|
import '@f0rbit/corpus';
|
|
4
|
+
import 'drizzle-orm';
|
|
7
5
|
import 'zod';
|
|
6
|
+
import '../schema.d-DcPuyqgh.js';
|
|
7
|
+
import 'drizzle-orm/sqlite-core';
|
package/dist/schema/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
upsert_project,
|
|
14
14
|
upsert_tag,
|
|
15
15
|
upsert_todo
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-XGQQPYSB.js";
|
|
17
17
|
import {
|
|
18
18
|
apiError,
|
|
19
19
|
authExpired,
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
isNetworkError,
|
|
37
37
|
isNotFoundError,
|
|
38
38
|
isParseError,
|
|
39
|
+
isProtectedError,
|
|
39
40
|
isRateLimitedError,
|
|
40
41
|
isRetryableError,
|
|
41
42
|
isScanError,
|
|
@@ -46,84 +47,28 @@ import {
|
|
|
46
47
|
networkError,
|
|
47
48
|
notFound,
|
|
48
49
|
parseError,
|
|
50
|
+
protectedEntity,
|
|
49
51
|
rateLimited,
|
|
50
52
|
scanError,
|
|
51
53
|
storeError,
|
|
52
54
|
unauthorized,
|
|
53
55
|
validation
|
|
54
|
-
} from "../chunk-
|
|
55
|
-
import {
|
|
56
|
-
action,
|
|
57
|
-
action_relations,
|
|
58
|
-
api_keys,
|
|
59
|
-
api_keys_relations,
|
|
60
|
-
checklist,
|
|
61
|
-
checklist_item,
|
|
62
|
-
checklist_item_relations,
|
|
63
|
-
checklist_relations,
|
|
64
|
-
codebase_tasks,
|
|
65
|
-
commit_detail,
|
|
66
|
-
deleted,
|
|
67
|
-
entity,
|
|
68
|
-
goal,
|
|
69
|
-
goal_relations,
|
|
70
|
-
id,
|
|
71
|
-
ignore_path,
|
|
72
|
-
milestone,
|
|
73
|
-
milestone_relations,
|
|
74
|
-
owned_entity,
|
|
75
|
-
owner_id,
|
|
76
|
-
project,
|
|
77
|
-
project_relations,
|
|
78
|
-
session,
|
|
79
|
-
session_relations,
|
|
80
|
-
tag,
|
|
81
|
-
tag_config,
|
|
82
|
-
tag_relations,
|
|
83
|
-
task,
|
|
84
|
-
task_relations,
|
|
85
|
-
task_tag,
|
|
86
|
-
task_tag_relations,
|
|
87
|
-
timestamps,
|
|
88
|
-
todoUpdatesRelations,
|
|
89
|
-
todo_updates,
|
|
90
|
-
tracker_result,
|
|
91
|
-
tracker_result_relations,
|
|
92
|
-
update_tracker_relations,
|
|
93
|
-
user,
|
|
94
|
-
user_relations
|
|
95
|
-
} from "../chunk-FOO5XXY5.js";
|
|
56
|
+
} from "../chunk-5ALH7B5B.js";
|
|
96
57
|
export {
|
|
97
58
|
ArrayBufferedQueue,
|
|
98
59
|
ConfigSchema,
|
|
99
60
|
TAG_COLOURS,
|
|
100
|
-
action,
|
|
101
|
-
action_relations,
|
|
102
61
|
apiError,
|
|
103
|
-
api_keys,
|
|
104
|
-
api_keys_relations,
|
|
105
62
|
authExpired,
|
|
106
63
|
badRequest,
|
|
107
|
-
checklist,
|
|
108
|
-
checklist_item,
|
|
109
|
-
checklist_item_relations,
|
|
110
|
-
checklist_relations,
|
|
111
|
-
codebase_tasks,
|
|
112
|
-
commit_detail,
|
|
113
64
|
config_schema,
|
|
114
65
|
configureErrorLogging,
|
|
115
66
|
conflict,
|
|
116
67
|
dbError,
|
|
117
|
-
deleted,
|
|
118
68
|
encryptionError,
|
|
119
|
-
entity,
|
|
120
69
|
errors,
|
|
121
70
|
forbidden,
|
|
122
71
|
githubError,
|
|
123
|
-
goal,
|
|
124
|
-
goal_relations,
|
|
125
|
-
id,
|
|
126
|
-
ignore_path,
|
|
127
72
|
isApiError,
|
|
128
73
|
isAuthExpiredError,
|
|
129
74
|
isBadRequestError,
|
|
@@ -135,6 +80,7 @@ export {
|
|
|
135
80
|
isNetworkError,
|
|
136
81
|
isNotFoundError,
|
|
137
82
|
isParseError,
|
|
83
|
+
isProtectedError,
|
|
138
84
|
isRateLimitedError,
|
|
139
85
|
isRetryableError,
|
|
140
86
|
isScanError,
|
|
@@ -142,45 +88,23 @@ export {
|
|
|
142
88
|
isStoreError,
|
|
143
89
|
isUnauthorizedError,
|
|
144
90
|
isValidationError,
|
|
145
|
-
milestone,
|
|
146
|
-
milestone_relations,
|
|
147
91
|
networkError,
|
|
148
92
|
notFound,
|
|
149
|
-
owned_entity,
|
|
150
|
-
owner_id,
|
|
151
93
|
parseError,
|
|
152
|
-
project,
|
|
153
94
|
project_config,
|
|
154
|
-
|
|
95
|
+
protectedEntity,
|
|
155
96
|
rateLimited,
|
|
156
97
|
save_config_request,
|
|
157
98
|
save_tags_request,
|
|
158
99
|
scanError,
|
|
159
|
-
session,
|
|
160
|
-
session_relations,
|
|
161
100
|
storeError,
|
|
162
|
-
tag,
|
|
163
|
-
tag_config,
|
|
164
|
-
tag_relations,
|
|
165
|
-
task,
|
|
166
|
-
task_relations,
|
|
167
|
-
task_tag,
|
|
168
|
-
task_tag_relations,
|
|
169
|
-
timestamps,
|
|
170
|
-
todoUpdatesRelations,
|
|
171
|
-
todo_updates,
|
|
172
|
-
tracker_result,
|
|
173
|
-
tracker_result_relations,
|
|
174
101
|
unauthorized,
|
|
175
102
|
update_action,
|
|
176
|
-
update_tracker_relations,
|
|
177
103
|
update_user,
|
|
178
104
|
upsert_goal,
|
|
179
105
|
upsert_milestone,
|
|
180
106
|
upsert_project,
|
|
181
107
|
upsert_tag,
|
|
182
108
|
upsert_todo,
|
|
183
|
-
user,
|
|
184
|
-
user_relations,
|
|
185
109
|
validation
|
|
186
110
|
};
|
package/dist/schema/media.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { b as apiKeys } from '../schema.d-BceDyQED.js';
|
|
3
|
-
export { b as ApiError, A as AuthExpiredError, c as BadRequestError, B as BaseError, C as ConflictError, g as CronError, D as DatabaseError, E as EncryptionError, h as ErrorContext, i as ErrorLogEntry, F as ForbiddenError, G as GithubError, a as NetworkError, N as NotFoundError, P as ParseError, f as ProviderError, R as RateLimitedError, d as ScanError, e as ServiceError, S as StoreError, U as UnauthorizedError, V as ValidationError, W as apiError, T as authExpired, $ as badRequest, j as configureErrorLogging, _ as conflict, Z as dbError, Y as encryptionError, a3 as errors, K as forbidden, a2 as githubError, r as isApiError, q as isAuthExpiredError, w as isBadRequestError, v as isConflictError, u as isDatabaseError, t as isEncryptionError, l as isForbiddenError, z as isGithubError, p as isNetworkError, k as isNotFoundError, s as isParseError, n as isRateLimitedError, I as isRetryableError, y as isScanError, H as isServiceError, o as isStoreError, x as isUnauthorizedError, m as isValidationError, Q as networkError, J as notFound, X as parseError, M as rateLimited, a1 as scanError, O as storeError, a0 as unauthorized, L as validation } from '../errors.d-C73AkrdX.js';
|
|
1
|
+
export { b as ApiError, A as AuthExpiredError, d as BadRequestError, B as BaseError, C as ConflictError, h as CronError, D as DatabaseError, E as EncryptionError, i as ErrorContext, j as ErrorLogEntry, F as ForbiddenError, G as GithubError, a as NetworkError, N as NotFoundError, P as ParseError, c as ProtectedError, g as ProviderError, R as RateLimitedError, e as ScanError, f as ServiceError, S as StoreError, U as UnauthorizedError, V as ValidationError, Y as apiError, X as authExpired, a2 as badRequest, k as configureErrorLogging, a0 as conflict, $ as dbError, _ as encryptionError, a6 as errors, M as forbidden, a5 as githubError, s as isApiError, r as isAuthExpiredError, y as isBadRequestError, w as isConflictError, v as isDatabaseError, u as isEncryptionError, m as isForbiddenError, I as isGithubError, q as isNetworkError, l as isNotFoundError, t as isParseError, x as isProtectedError, o as isRateLimitedError, K as isRetryableError, H as isScanError, J as isServiceError, p as isStoreError, z as isUnauthorizedError, n as isValidationError, W as networkError, L as notFound, Z as parseError, a1 as protectedEntity, Q as rateLimited, a4 as scanError, T as storeError, a3 as unauthorized, O as validation } from '../errors.d-DcjQAql-.js';
|
|
4
2
|
import { z } from 'zod';
|
|
5
|
-
export {
|
|
6
|
-
export { corpus_snapshots } from '@f0rbit/corpus/schema';
|
|
7
|
-
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import 'drizzle-orm';
|
|
3
|
+
export { A as Account, p as AccountSetting, q as AccountWithUser, a6 as AddFilterInput, a3 as AddFilterSchema, r as ApiKey, s as BlueskyAuthor, B as BlueskyAuthorSchema, t as BlueskyFeedItem, a as BlueskyFeedItemSchema, u as BlueskyPost, b as BlueskyPostSchema, v as BlueskyRaw, c as BlueskyRawSchema, af as BlueskySettings, aa as BlueskySettingsSchema, aD as CommentPayload, aq as CommentPayloadSchema, aG as CommitGroup, at as CommitGroupSchema, ax as CommitPayload, ak as CommitPayloadSchema, C as CorpusPath, a4 as CreateProfileInput, $ as CreateProfileSchema, aH as DateGroup, au as DateGroupSchema, w as DevpadRaw, D as DevpadRawSchema, ah as DevpadSettings, ac as DevpadSettingsSchema, x as DevpadTask, d as DevpadTaskSchema, a8 as FilterKey, a2 as FilterKeySchema, a7 as FilterType, a1 as FilterTypeSchema, y as GitHubBaseEvent, G as GitHubBaseEventSchema, z as GitHubEvent, e as GitHubEventSchema, E as GitHubExtendedCommit, f as GitHubExtendedCommitSchema, F as GitHubPullRequest, g as GitHubPullRequestSchema, H as GitHubRaw, h as GitHubRawSchema, I as GitHubRepo, i as GitHubRepoSchema, ae as GitHubSettings, a9 as GitHubSettingsSchema, k as MULTI_STORE_PLATFORMS, M as MultiStorePlatform, N as NewAccount, J as NewAccountSetting, K as NewApiKey, L as NewPlatformCredential, O as NewProfile, Q as NewProfileFilter, R as NewRateLimit, l as PLATFORMS, aB as PRCommit, ao as PRCommitSchema, aE as Payload, ar as PayloadSchema, P as Platform, S as PlatformCredential, m as PlatformSchema, ai as PlatformSettings, ad as PlatformSettingsSchemaMap, ay as PostPayload, al as PostPayloadSchema, T as Profile, U as ProfileFilter, aC as PullRequestPayload, ap as PullRequestPayloadSchema, V as RateLimit, _ as SlugSchema, aA as TaskPayload, an as TaskPayloadSchema, aI as Timeline, aF as TimelineItem, as as TimelineItemSchema, av as TimelineSchema, aw as TimelineType, aj as TimelineTypeSchema, a5 as UpdateProfileInput, a0 as UpdateProfileSchema, az as VideoPayload, am as VideoPayloadSchema, W as YouTubeRaw, Y as YouTubeRawSchema, ag as YouTubeSettings, ab as YouTubeSettingsSchema, X as YouTubeThumbnail, n as YouTubeThumbnailSchema, Z as YouTubeVideo, o as YouTubeVideoSchema, j as isMultiStorePlatform } from '../types.d-BgSkvLhS.js';
|
|
9
4
|
import '@f0rbit/corpus';
|
|
5
|
+
import 'drizzle-orm';
|
|
6
|
+
import '../media.d-CQ56ckoR.js';
|
|
7
|
+
import 'drizzle-orm/sqlite-core';
|
|
8
|
+
import '../schema.d-DcPuyqgh.js';
|
|
10
9
|
|
|
11
10
|
declare const brand: unique symbol;
|
|
12
11
|
type Brand<T, B extends string> = T & {
|
|
@@ -886,6 +885,7 @@ declare const TwitterMetaStoreSchema: z.ZodObject<{
|
|
|
886
885
|
pinned_tweet_id: z.ZodOptional<z.ZodString>;
|
|
887
886
|
fetched_at: z.ZodString;
|
|
888
887
|
}, "strip", z.ZodTypeAny, {
|
|
888
|
+
protected: boolean;
|
|
889
889
|
id: string;
|
|
890
890
|
name: string;
|
|
891
891
|
created_at: string;
|
|
@@ -893,7 +893,6 @@ declare const TwitterMetaStoreSchema: z.ZodObject<{
|
|
|
893
893
|
username: string;
|
|
894
894
|
verified: boolean;
|
|
895
895
|
verified_type: "blue" | "none" | "business" | "government";
|
|
896
|
-
protected: boolean;
|
|
897
896
|
public_metrics: {
|
|
898
897
|
followers_count: number;
|
|
899
898
|
following_count: number;
|
|
@@ -918,6 +917,7 @@ declare const TwitterMetaStoreSchema: z.ZodObject<{
|
|
|
918
917
|
tweet_count: number;
|
|
919
918
|
listed_count: number;
|
|
920
919
|
};
|
|
920
|
+
protected?: boolean | undefined;
|
|
921
921
|
description?: string | undefined;
|
|
922
922
|
url?: string | undefined;
|
|
923
923
|
location?: string | undefined;
|
|
@@ -925,7 +925,6 @@ declare const TwitterMetaStoreSchema: z.ZodObject<{
|
|
|
925
925
|
profile_banner_url?: string | undefined;
|
|
926
926
|
verified?: boolean | undefined;
|
|
927
927
|
verified_type?: "blue" | "none" | "business" | "government" | undefined;
|
|
928
|
-
protected?: boolean | undefined;
|
|
929
928
|
pinned_tweet_id?: string | undefined;
|
|
930
929
|
}>;
|
|
931
930
|
type TwitterUserMetrics = z.infer<typeof TwitterUserMetricsSchema>;
|
package/dist/schema/media.js
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
isNetworkError,
|
|
21
21
|
isNotFoundError,
|
|
22
22
|
isParseError,
|
|
23
|
+
isProtectedError,
|
|
23
24
|
isRateLimitedError,
|
|
24
25
|
isRetryableError,
|
|
25
26
|
isScanError,
|
|
@@ -30,101 +31,13 @@ import {
|
|
|
30
31
|
networkError,
|
|
31
32
|
notFound,
|
|
32
33
|
parseError,
|
|
34
|
+
protectedEntity,
|
|
33
35
|
rateLimited,
|
|
34
36
|
scanError,
|
|
35
37
|
storeError,
|
|
36
38
|
unauthorized,
|
|
37
39
|
validation
|
|
38
|
-
} from "../chunk-
|
|
39
|
-
import {
|
|
40
|
-
api_keys
|
|
41
|
-
} from "../chunk-FOO5XXY5.js";
|
|
42
|
-
|
|
43
|
-
// ../schema/dist/database/media.js
|
|
44
|
-
import { index, integer, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
|
|
45
|
-
import { corpus_snapshots } from "@f0rbit/corpus/schema";
|
|
46
|
-
var media_profiles = sqliteTable("media_profiles", {
|
|
47
|
-
id: text("id").primaryKey(),
|
|
48
|
-
user_id: text("user_id").notNull(),
|
|
49
|
-
slug: text("slug").notNull(),
|
|
50
|
-
name: text("name").notNull(),
|
|
51
|
-
description: text("description"),
|
|
52
|
-
theme: text("theme"),
|
|
53
|
-
created_at: text("created_at").notNull(),
|
|
54
|
-
updated_at: text("updated_at").notNull()
|
|
55
|
-
}, (table) => ({
|
|
56
|
-
user_idx: index("idx_media_profiles_user").on(table.user_id),
|
|
57
|
-
user_slug_idx: uniqueIndex("idx_media_profiles_user_slug").on(table.user_id, table.slug)
|
|
58
|
-
}));
|
|
59
|
-
var media_accounts = sqliteTable("media_accounts", {
|
|
60
|
-
id: text("id").primaryKey(),
|
|
61
|
-
profile_id: text("profile_id").notNull().references(() => media_profiles.id, { onDelete: "cascade" }),
|
|
62
|
-
platform: text("platform").notNull().$type(),
|
|
63
|
-
platform_user_id: text("platform_user_id"),
|
|
64
|
-
platform_username: text("platform_username"),
|
|
65
|
-
access_token_encrypted: text("access_token_encrypted").notNull(),
|
|
66
|
-
refresh_token_encrypted: text("refresh_token_encrypted"),
|
|
67
|
-
token_expires_at: text("token_expires_at"),
|
|
68
|
-
is_active: integer("is_active", { mode: "boolean" }).default(true),
|
|
69
|
-
last_fetched_at: text("last_fetched_at"),
|
|
70
|
-
created_at: text("created_at").notNull(),
|
|
71
|
-
updated_at: text("updated_at").notNull()
|
|
72
|
-
}, (table) => ({
|
|
73
|
-
profile_idx: index("idx_media_accounts_profile").on(table.profile_id),
|
|
74
|
-
profile_platform_user_idx: uniqueIndex("idx_media_accounts_profile_platform_user").on(table.profile_id, table.platform, table.platform_user_id)
|
|
75
|
-
}));
|
|
76
|
-
var media_rate_limits = sqliteTable("media_rate_limits", {
|
|
77
|
-
id: text("id").primaryKey(),
|
|
78
|
-
account_id: text("account_id").notNull().references(() => media_accounts.id),
|
|
79
|
-
remaining: integer("remaining"),
|
|
80
|
-
limit_total: integer("limit_total"),
|
|
81
|
-
reset_at: text("reset_at"),
|
|
82
|
-
consecutive_failures: integer("consecutive_failures").default(0),
|
|
83
|
-
last_failure_at: text("last_failure_at"),
|
|
84
|
-
circuit_open_until: text("circuit_open_until"),
|
|
85
|
-
updated_at: text("updated_at").notNull()
|
|
86
|
-
}, (table) => ({
|
|
87
|
-
account_idx: uniqueIndex("idx_media_rate_limits_account").on(table.account_id)
|
|
88
|
-
}));
|
|
89
|
-
var media_account_settings = sqliteTable("media_account_settings", {
|
|
90
|
-
id: text("id").primaryKey(),
|
|
91
|
-
account_id: text("account_id").notNull().references(() => media_accounts.id, { onDelete: "cascade" }),
|
|
92
|
-
setting_key: text("setting_key").notNull(),
|
|
93
|
-
setting_value: text("setting_value").notNull(),
|
|
94
|
-
created_at: text("created_at").notNull(),
|
|
95
|
-
updated_at: text("updated_at").notNull()
|
|
96
|
-
}, (table) => ({
|
|
97
|
-
account_key_idx: uniqueIndex("idx_media_account_settings_unique").on(table.account_id, table.setting_key),
|
|
98
|
-
account_idx: index("idx_media_account_settings_account").on(table.account_id)
|
|
99
|
-
}));
|
|
100
|
-
var media_profile_filters = sqliteTable("media_profile_filters", {
|
|
101
|
-
id: text("id").primaryKey(),
|
|
102
|
-
profile_id: text("profile_id").notNull().references(() => media_profiles.id, { onDelete: "cascade" }),
|
|
103
|
-
account_id: text("account_id").notNull().references(() => media_accounts.id, { onDelete: "cascade" }),
|
|
104
|
-
filter_type: text("filter_type").notNull().$type(),
|
|
105
|
-
filter_key: text("filter_key").notNull(),
|
|
106
|
-
filter_value: text("filter_value").notNull(),
|
|
107
|
-
created_at: text("created_at").notNull(),
|
|
108
|
-
updated_at: text("updated_at").notNull()
|
|
109
|
-
}, (table) => ({
|
|
110
|
-
profile_idx: index("idx_media_profile_filters_profile").on(table.profile_id),
|
|
111
|
-
account_idx: index("idx_media_profile_filters_account").on(table.account_id)
|
|
112
|
-
}));
|
|
113
|
-
var media_platform_credentials = sqliteTable("media_platform_credentials", {
|
|
114
|
-
id: text("id").primaryKey(),
|
|
115
|
-
profile_id: text("profile_id").notNull().references(() => media_profiles.id, { onDelete: "cascade" }),
|
|
116
|
-
platform: text("platform").notNull().$type(),
|
|
117
|
-
client_id: text("client_id").notNull(),
|
|
118
|
-
client_secret_encrypted: text("client_secret_encrypted").notNull(),
|
|
119
|
-
redirect_uri: text("redirect_uri"),
|
|
120
|
-
metadata: text("metadata"),
|
|
121
|
-
is_verified: integer("is_verified", { mode: "boolean" }).default(false),
|
|
122
|
-
created_at: text("created_at").notNull(),
|
|
123
|
-
updated_at: text("updated_at").notNull()
|
|
124
|
-
}, (table) => ({
|
|
125
|
-
profile_platform_idx: uniqueIndex("idx_platform_credentials_unique").on(table.profile_id, table.platform),
|
|
126
|
-
profile_idx: index("idx_platform_credentials_profile").on(table.profile_id)
|
|
127
|
-
}));
|
|
40
|
+
} from "../chunk-5ALH7B5B.js";
|
|
128
41
|
|
|
129
42
|
// ../schema/dist/media/branded.js
|
|
130
43
|
var userId = (id) => id;
|
|
@@ -695,6 +608,7 @@ export {
|
|
|
695
608
|
GitHubSettingsSchema,
|
|
696
609
|
MULTI_STORE_PLATFORMS,
|
|
697
610
|
PLATFORMS,
|
|
611
|
+
PRCommitSchema,
|
|
698
612
|
PayloadSchema,
|
|
699
613
|
PlatformSchema,
|
|
700
614
|
PlatformSettingsSchemaMap,
|
|
@@ -724,16 +638,12 @@ export {
|
|
|
724
638
|
YouTubeThumbnailSchema,
|
|
725
639
|
YouTubeVideoSchema,
|
|
726
640
|
accountId,
|
|
727
|
-
media_account_settings as accountSettings,
|
|
728
|
-
media_accounts as accounts,
|
|
729
641
|
apiError,
|
|
730
|
-
api_keys as apiKeys,
|
|
731
642
|
authExpired,
|
|
732
643
|
badRequest,
|
|
733
644
|
configureErrorLogging,
|
|
734
645
|
conflict,
|
|
735
646
|
connectionId,
|
|
736
|
-
corpus_snapshots,
|
|
737
647
|
dbError,
|
|
738
648
|
encryptionError,
|
|
739
649
|
errors,
|
|
@@ -751,6 +661,7 @@ export {
|
|
|
751
661
|
isNetworkError,
|
|
752
662
|
isNotFoundError,
|
|
753
663
|
isParseError,
|
|
664
|
+
isProtectedError,
|
|
754
665
|
isRateLimitedError,
|
|
755
666
|
isRetryableError,
|
|
756
667
|
isScanError,
|
|
@@ -762,12 +673,9 @@ export {
|
|
|
762
673
|
networkError,
|
|
763
674
|
notFound,
|
|
764
675
|
parseError,
|
|
765
|
-
media_platform_credentials as platformCredentials,
|
|
766
|
-
media_profile_filters as profileFilters,
|
|
767
676
|
profileId,
|
|
768
|
-
|
|
677
|
+
protectedEntity,
|
|
769
678
|
rateLimited,
|
|
770
|
-
media_rate_limits as rateLimits,
|
|
771
679
|
scanError,
|
|
772
680
|
storeError,
|
|
773
681
|
unauthorized,
|