@devpad/api 2.1.8 → 2.1.10
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 +140 -4
- package/dist/index.js +228 -1
- package/dist/schema/blog.d.ts +2 -2
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/media.d.ts +2 -2
- package/dist/{schema.d-DcPuyqgh.d.ts → schema.d-Bka8880l.d.ts} +2 -2
- package/dist/{types.d-KTbLqF_P.d.ts → types.d-CW-e2BrO.d.ts} +1 -1
- package/dist/{types.d-BgSkvLhS.d.ts → types.d-VdW3W-u7.d.ts} +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Q as PostListParams, S as PostsResponse, J as Post, L as PostCreate, N as PostUpdate, d as VersionInfo, a as PostContent, k as Category, $ as CategoryCreate, v as AccessKey } from './types.d-DLE9TSql.js';
|
|
2
|
-
import { T as Profile, a4 as CreateProfileInput, a5 as UpdateProfileInput, U as ProfileFilter, a6 as AddFilterInput, aI as Timeline, A as Account, ai as PlatformSettings } from './types.d-
|
|
3
|
-
import { A as ApiKey, P as Project, g as UpsertProject, r as GetConfigResult, n as SaveConfigRequest, M as Milestone, G as Goal, o as TaskWithDetails, h as UpsertTodo, i as UpsertTag, H as HistoryAction, u as TagWithTypedColor } from './types.d-
|
|
4
|
-
export { m as ProjectConfig, T as Task } from './types.d-
|
|
2
|
+
import { T as Profile, a4 as CreateProfileInput, a5 as UpdateProfileInput, U as ProfileFilter, a6 as AddFilterInput, aI as Timeline, A as Account, ai as PlatformSettings } from './types.d-VdW3W-u7.js';
|
|
3
|
+
import { A as ApiKey, P as Project, g as UpsertProject, r as GetConfigResult, n as SaveConfigRequest, M as Milestone, G as Goal, o as TaskWithDetails, h as UpsertTodo, i as UpsertTag, H as HistoryAction, u as TagWithTypedColor } from './types.d-CW-e2BrO.js';
|
|
4
|
+
export { m as ProjectConfig, T as Task } from './types.d-CW-e2BrO.js';
|
|
5
5
|
import { Result } from '@f0rbit/corpus';
|
|
6
6
|
export { Result, err, ok } from '@f0rbit/corpus';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import 'drizzle-orm';
|
|
9
9
|
import './media.d-CQ56ckoR.js';
|
|
10
10
|
import 'drizzle-orm/sqlite-core';
|
|
11
|
-
import './schema.d-
|
|
11
|
+
import './schema.d-Bka8880l.js';
|
|
12
12
|
|
|
13
13
|
interface BufferedQueue<T> {
|
|
14
14
|
latest(): T | null;
|
|
@@ -94,6 +94,7 @@ declare class ApiClient {
|
|
|
94
94
|
authenticated: boolean;
|
|
95
95
|
user: any;
|
|
96
96
|
session: any;
|
|
97
|
+
scope?: string;
|
|
97
98
|
}>>;
|
|
98
99
|
keys: {
|
|
99
100
|
list: () => Promise<ApiResult<ApiKey[]>>;
|
|
@@ -512,6 +513,141 @@ declare class ApiClient {
|
|
|
512
513
|
* Get request history for debugging
|
|
513
514
|
*/
|
|
514
515
|
history(): BufferedQueue<RequestHistoryEntry>;
|
|
516
|
+
/**
|
|
517
|
+
* Pulse analytics and monitoring namespace
|
|
518
|
+
*/
|
|
519
|
+
readonly pulse: {
|
|
520
|
+
/**
|
|
521
|
+
* Get summary analytics for a project
|
|
522
|
+
*/
|
|
523
|
+
summary: (input: {
|
|
524
|
+
project_id: string;
|
|
525
|
+
range: "24h" | "7d" | "30d" | "90d" | {
|
|
526
|
+
from: number;
|
|
527
|
+
to: number;
|
|
528
|
+
};
|
|
529
|
+
}) => Promise<ApiResult<any>>;
|
|
530
|
+
/**
|
|
531
|
+
* List events for a project
|
|
532
|
+
*/
|
|
533
|
+
events: (input: {
|
|
534
|
+
project_id: string;
|
|
535
|
+
name?: string;
|
|
536
|
+
level?: string;
|
|
537
|
+
ts_from?: number;
|
|
538
|
+
ts_to?: number;
|
|
539
|
+
search?: string;
|
|
540
|
+
limit?: number;
|
|
541
|
+
cursor?: string;
|
|
542
|
+
}) => Promise<ApiResult<any>>;
|
|
543
|
+
/**
|
|
544
|
+
* List error issues for a project
|
|
545
|
+
*/
|
|
546
|
+
errors: (input: {
|
|
547
|
+
project_id: string;
|
|
548
|
+
range: "24h" | "7d" | "30d" | "90d" | {
|
|
549
|
+
from: number;
|
|
550
|
+
to: number;
|
|
551
|
+
};
|
|
552
|
+
group_by_fingerprint?: boolean;
|
|
553
|
+
}) => Promise<ApiResult<any>>;
|
|
554
|
+
/**
|
|
555
|
+
* List logs for a project
|
|
556
|
+
*/
|
|
557
|
+
logs: (input: {
|
|
558
|
+
project_id: string;
|
|
559
|
+
range: "24h" | "7d" | "30d" | "90d" | {
|
|
560
|
+
from: number;
|
|
561
|
+
to: number;
|
|
562
|
+
};
|
|
563
|
+
level?: string;
|
|
564
|
+
search?: string;
|
|
565
|
+
}) => Promise<ApiResult<any>>;
|
|
566
|
+
/**
|
|
567
|
+
* Get latency metrics for a project
|
|
568
|
+
*/
|
|
569
|
+
latency: (input: {
|
|
570
|
+
project_id: string;
|
|
571
|
+
range: "24h" | "7d" | "30d" | "90d" | {
|
|
572
|
+
from: number;
|
|
573
|
+
to: number;
|
|
574
|
+
};
|
|
575
|
+
route?: string;
|
|
576
|
+
percentiles?: number[];
|
|
577
|
+
}) => Promise<ApiResult<any>>;
|
|
578
|
+
/**
|
|
579
|
+
* Subscription management
|
|
580
|
+
*/
|
|
581
|
+
subs: {
|
|
582
|
+
/**
|
|
583
|
+
* List subscriptions for a project
|
|
584
|
+
*/
|
|
585
|
+
list: (input: {
|
|
586
|
+
project_id: string;
|
|
587
|
+
}) => Promise<ApiResult<any[]>>;
|
|
588
|
+
/**
|
|
589
|
+
* Create a subscription
|
|
590
|
+
*/
|
|
591
|
+
create: (input: {
|
|
592
|
+
project_id: string;
|
|
593
|
+
name: string;
|
|
594
|
+
filter: any;
|
|
595
|
+
channel: any;
|
|
596
|
+
cooldown_seconds?: number;
|
|
597
|
+
}) => Promise<ApiResult<{
|
|
598
|
+
id: string;
|
|
599
|
+
}>>;
|
|
600
|
+
/**
|
|
601
|
+
* Get a subscription by ID
|
|
602
|
+
*/
|
|
603
|
+
get: (id: string) => Promise<ApiResult<any>>;
|
|
604
|
+
/**
|
|
605
|
+
* Update a subscription
|
|
606
|
+
*/
|
|
607
|
+
update: (id: string, patch: Partial<{
|
|
608
|
+
name: string;
|
|
609
|
+
filter: any;
|
|
610
|
+
channel: any;
|
|
611
|
+
cooldown_seconds: number;
|
|
612
|
+
}>) => Promise<ApiResult<any>>;
|
|
613
|
+
/**
|
|
614
|
+
* Delete a subscription
|
|
615
|
+
*/
|
|
616
|
+
delete: (id: string) => Promise<ApiResult<{
|
|
617
|
+
success: boolean;
|
|
618
|
+
}>>;
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* Ingest key management
|
|
622
|
+
*/
|
|
623
|
+
keys: {
|
|
624
|
+
/**
|
|
625
|
+
* List ingest keys for a project
|
|
626
|
+
*/
|
|
627
|
+
list: (input: {
|
|
628
|
+
project_id: string;
|
|
629
|
+
}) => Promise<ApiResult<any[]>>;
|
|
630
|
+
/**
|
|
631
|
+
* Create a new ingest key (returns plaintext only once)
|
|
632
|
+
*/
|
|
633
|
+
create: (input: {
|
|
634
|
+
project_id: string;
|
|
635
|
+
name?: string;
|
|
636
|
+
rate_limit_per_min?: number;
|
|
637
|
+
}) => Promise<ApiResult<{
|
|
638
|
+
id: string;
|
|
639
|
+
key: string;
|
|
640
|
+
}>>;
|
|
641
|
+
/**
|
|
642
|
+
* Delete an ingest key
|
|
643
|
+
*/
|
|
644
|
+
delete: (id: string, input: {
|
|
645
|
+
project_id: string;
|
|
646
|
+
}) => Promise<ApiResult<{
|
|
647
|
+
success: boolean;
|
|
648
|
+
}>>;
|
|
649
|
+
};
|
|
650
|
+
};
|
|
515
651
|
/**
|
|
516
652
|
* Get the API key
|
|
517
653
|
*/
|
package/dist/index.js
CHANGED
|
@@ -937,6 +937,137 @@ var ApiClient2 = class {
|
|
|
937
937
|
*/
|
|
938
938
|
preferences: (data) => wrap(() => this.clients.auth.patch("/user/preferences", { body: data }))
|
|
939
939
|
};
|
|
940
|
+
/**
|
|
941
|
+
* Pulse analytics and monitoring namespace
|
|
942
|
+
*/
|
|
943
|
+
this.pulse = {
|
|
944
|
+
/**
|
|
945
|
+
* Get summary analytics for a project
|
|
946
|
+
*/
|
|
947
|
+
summary: (input) => wrap(
|
|
948
|
+
() => this.clients.pulse.get("/summary/:project_id".replace(":project_id", input.project_id), {
|
|
949
|
+
query: typeof input.range === "string" ? { range: input.range } : { from: String(input.range.from), to: String(input.range.to) }
|
|
950
|
+
})
|
|
951
|
+
),
|
|
952
|
+
/**
|
|
953
|
+
* List events for a project
|
|
954
|
+
*/
|
|
955
|
+
events: (input) => wrap(() => {
|
|
956
|
+
const query = {};
|
|
957
|
+
if (input.name) query.name = input.name;
|
|
958
|
+
if (input.level) query.level = input.level;
|
|
959
|
+
if (typeof input.ts_from === "number") query.ts_from = String(input.ts_from);
|
|
960
|
+
if (typeof input.ts_to === "number") query.ts_to = String(input.ts_to);
|
|
961
|
+
if (input.search) query.search = input.search;
|
|
962
|
+
if (input.limit) query.limit = String(input.limit);
|
|
963
|
+
if (input.cursor) query.cursor = input.cursor;
|
|
964
|
+
return this.clients.pulse.get("/events/:project_id".replace(":project_id", input.project_id), { query });
|
|
965
|
+
}),
|
|
966
|
+
/**
|
|
967
|
+
* List error issues for a project
|
|
968
|
+
*/
|
|
969
|
+
errors: (input) => wrap(() => {
|
|
970
|
+
const query = {};
|
|
971
|
+
if (typeof input.range === "string") {
|
|
972
|
+
query.range = input.range;
|
|
973
|
+
} else {
|
|
974
|
+
query.from = String(input.range.from);
|
|
975
|
+
query.to = String(input.range.to);
|
|
976
|
+
}
|
|
977
|
+
if (input.group_by_fingerprint) query.group_by_fingerprint = "true";
|
|
978
|
+
return this.clients.pulse.get("/errors/:project_id".replace(":project_id", input.project_id), { query });
|
|
979
|
+
}),
|
|
980
|
+
/**
|
|
981
|
+
* List logs for a project
|
|
982
|
+
*/
|
|
983
|
+
logs: (input) => wrap(() => {
|
|
984
|
+
const query = {};
|
|
985
|
+
if (typeof input.range === "string") {
|
|
986
|
+
query.range = input.range;
|
|
987
|
+
} else {
|
|
988
|
+
query.from = String(input.range.from);
|
|
989
|
+
query.to = String(input.range.to);
|
|
990
|
+
}
|
|
991
|
+
if (input.level) query.level = input.level;
|
|
992
|
+
if (input.search) query.search = input.search;
|
|
993
|
+
return this.clients.pulse.get("/logs/:project_id".replace(":project_id", input.project_id), { query });
|
|
994
|
+
}),
|
|
995
|
+
/**
|
|
996
|
+
* Get latency metrics for a project
|
|
997
|
+
*/
|
|
998
|
+
latency: (input) => wrap(() => {
|
|
999
|
+
const query = {};
|
|
1000
|
+
if (typeof input.range === "string") {
|
|
1001
|
+
query.range = input.range;
|
|
1002
|
+
} else {
|
|
1003
|
+
query.from = String(input.range.from);
|
|
1004
|
+
query.to = String(input.range.to);
|
|
1005
|
+
}
|
|
1006
|
+
if (input.route) query.route = input.route;
|
|
1007
|
+
if (input.percentiles && input.percentiles.length > 0) query.percentiles = input.percentiles.join(",");
|
|
1008
|
+
return this.clients.pulse.get("/latency/:project_id".replace(":project_id", input.project_id), { query });
|
|
1009
|
+
}),
|
|
1010
|
+
/**
|
|
1011
|
+
* Subscription management
|
|
1012
|
+
*/
|
|
1013
|
+
subs: {
|
|
1014
|
+
/**
|
|
1015
|
+
* List subscriptions for a project
|
|
1016
|
+
*/
|
|
1017
|
+
list: (input) => wrap(() => this.clients.pulse.get("/admin/subs", { query: { project_id: input.project_id } })),
|
|
1018
|
+
/**
|
|
1019
|
+
* Create a subscription
|
|
1020
|
+
*/
|
|
1021
|
+
create: (input) => wrap(
|
|
1022
|
+
() => this.clients.pulse.post("/admin/subs", {
|
|
1023
|
+
body: {
|
|
1024
|
+
project_id: input.project_id,
|
|
1025
|
+
name: input.name,
|
|
1026
|
+
filter: input.filter,
|
|
1027
|
+
channel: input.channel,
|
|
1028
|
+
cooldown_seconds: input.cooldown_seconds
|
|
1029
|
+
}
|
|
1030
|
+
})
|
|
1031
|
+
),
|
|
1032
|
+
/**
|
|
1033
|
+
* Get a subscription by ID
|
|
1034
|
+
*/
|
|
1035
|
+
get: (id) => wrap(() => this.clients.pulse.get(`/admin/subs/${id}`)),
|
|
1036
|
+
/**
|
|
1037
|
+
* Update a subscription
|
|
1038
|
+
*/
|
|
1039
|
+
update: (id, patch) => wrap(() => this.clients.pulse.patch(`/admin/subs/${id}`, { body: patch })),
|
|
1040
|
+
/**
|
|
1041
|
+
* Delete a subscription
|
|
1042
|
+
*/
|
|
1043
|
+
delete: (id) => wrap(() => this.clients.pulse.delete(`/admin/subs/${id}`))
|
|
1044
|
+
},
|
|
1045
|
+
/**
|
|
1046
|
+
* Ingest key management
|
|
1047
|
+
*/
|
|
1048
|
+
keys: {
|
|
1049
|
+
/**
|
|
1050
|
+
* List ingest keys for a project
|
|
1051
|
+
*/
|
|
1052
|
+
list: (input) => wrap(() => this.clients.pulse.get("/admin/keys", { query: { project_id: input.project_id } })),
|
|
1053
|
+
/**
|
|
1054
|
+
* Create a new ingest key (returns plaintext only once)
|
|
1055
|
+
*/
|
|
1056
|
+
create: (input) => wrap(
|
|
1057
|
+
() => this.clients.pulse.post("/admin/keys", {
|
|
1058
|
+
body: {
|
|
1059
|
+
project_id: input.project_id,
|
|
1060
|
+
name: input.name,
|
|
1061
|
+
rate_limit_per_min: input.rate_limit_per_min
|
|
1062
|
+
}
|
|
1063
|
+
})
|
|
1064
|
+
),
|
|
1065
|
+
/**
|
|
1066
|
+
* Delete an ingest key
|
|
1067
|
+
*/
|
|
1068
|
+
delete: (id, input) => wrap(() => this.clients.pulse.delete(`/admin/keys/${id}`, { query: { project_id: input.project_id } }))
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
940
1071
|
const base_url = options.base_url || "http://localhost:4321/api/v1";
|
|
941
1072
|
this._api_key = options.api_key ?? "";
|
|
942
1073
|
this._auth_mode = options.auth_mode ?? (options.api_key?.startsWith("jwt:") ? "session" : options.api_key ? "key" : "cookie");
|
|
@@ -964,7 +1095,8 @@ var ApiClient2 = class {
|
|
|
964
1095
|
github: new ApiClient({ ...clientOptions, category: "github" }),
|
|
965
1096
|
tags: new ApiClient({ ...clientOptions, category: "tags" }),
|
|
966
1097
|
blog: new ApiClient({ ...clientOptions, category: "blog" }),
|
|
967
|
-
media: new ApiClient({ ...clientOptions, category: "media" })
|
|
1098
|
+
media: new ApiClient({ ...clientOptions, category: "media" }),
|
|
1099
|
+
pulse: new ApiClient({ ...clientOptions, category: "pulse" })
|
|
968
1100
|
};
|
|
969
1101
|
}
|
|
970
1102
|
/**
|
|
@@ -1453,6 +1585,101 @@ var tools = {
|
|
|
1453
1585
|
const { user_id, ...params } = input;
|
|
1454
1586
|
return unwrap(await client.media.timeline.get(user_id, params));
|
|
1455
1587
|
}
|
|
1588
|
+
},
|
|
1589
|
+
// Pulse analytics tools
|
|
1590
|
+
devpad_pulse_summary: {
|
|
1591
|
+
name: "devpad_pulse_summary",
|
|
1592
|
+
description: "Get summary analytics for a project (pageviews, sessions, errors, latency)",
|
|
1593
|
+
inputSchema: z.object({
|
|
1594
|
+
project_id: z.string().describe("Project ID"),
|
|
1595
|
+
range: z.enum(["24h", "7d", "30d", "90d"]).describe("Time range")
|
|
1596
|
+
}),
|
|
1597
|
+
execute: async (client, input) => unwrap(await client.pulse.summary({ project_id: input.project_id, range: input.range }))
|
|
1598
|
+
},
|
|
1599
|
+
devpad_pulse_events: {
|
|
1600
|
+
name: "devpad_pulse_events",
|
|
1601
|
+
description: "List events for a project with optional filtering",
|
|
1602
|
+
inputSchema: z.object({
|
|
1603
|
+
project_id: z.string().describe("Project ID"),
|
|
1604
|
+
name: z.string().optional().describe("Event name filter (pageview, error, log, etc)"),
|
|
1605
|
+
level: z.string().optional().describe("Log level filter (debug, info, warn, error, critical)"),
|
|
1606
|
+
ts_from: z.number().optional().describe("Start timestamp (unix ms)"),
|
|
1607
|
+
ts_to: z.number().optional().describe("End timestamp (unix ms)"),
|
|
1608
|
+
search: z.string().optional().describe("Search substring in event properties"),
|
|
1609
|
+
limit: z.number().optional().describe("Max events to return (max 500)"),
|
|
1610
|
+
cursor: z.string().optional().describe("Pagination cursor")
|
|
1611
|
+
}),
|
|
1612
|
+
execute: async (client, input) => unwrap(await client.pulse.events(input))
|
|
1613
|
+
},
|
|
1614
|
+
devpad_pulse_errors: {
|
|
1615
|
+
name: "devpad_pulse_errors",
|
|
1616
|
+
description: "List error issues for a project, optionally grouped by fingerprint",
|
|
1617
|
+
inputSchema: z.object({
|
|
1618
|
+
project_id: z.string().describe("Project ID"),
|
|
1619
|
+
range: z.enum(["24h", "7d", "30d", "90d"]).describe("Time range"),
|
|
1620
|
+
group_by_fingerprint: z.boolean().optional().describe("Group by error fingerprint (true) or list all (false)")
|
|
1621
|
+
}),
|
|
1622
|
+
execute: async (client, input) => unwrap(await client.pulse.errors({ project_id: input.project_id, range: input.range, group_by_fingerprint: input.group_by_fingerprint }))
|
|
1623
|
+
},
|
|
1624
|
+
devpad_pulse_logs: {
|
|
1625
|
+
name: "devpad_pulse_logs",
|
|
1626
|
+
description: "List logs for a project with optional level and message filtering",
|
|
1627
|
+
inputSchema: z.object({
|
|
1628
|
+
project_id: z.string().describe("Project ID"),
|
|
1629
|
+
range: z.enum(["24h", "7d", "30d", "90d"]).describe("Time range"),
|
|
1630
|
+
level: z.string().optional().describe("Log level filter"),
|
|
1631
|
+
search: z.string().optional().describe("Search in log messages")
|
|
1632
|
+
}),
|
|
1633
|
+
execute: async (client, input) => unwrap(await client.pulse.logs(input))
|
|
1634
|
+
},
|
|
1635
|
+
devpad_pulse_latency: {
|
|
1636
|
+
name: "devpad_pulse_latency",
|
|
1637
|
+
description: "Get request latency metrics (p50, p95, p99) for a project",
|
|
1638
|
+
inputSchema: z.object({
|
|
1639
|
+
project_id: z.string().describe("Project ID"),
|
|
1640
|
+
range: z.enum(["24h", "7d", "30d", "90d"]).describe("Time range"),
|
|
1641
|
+
route: z.string().optional().describe("Filter by HTTP route"),
|
|
1642
|
+
percentiles: z.array(z.number()).optional().describe("Percentiles to compute (default [50, 95, 99])")
|
|
1643
|
+
}),
|
|
1644
|
+
execute: async (client, input) => unwrap(await client.pulse.latency(input))
|
|
1645
|
+
},
|
|
1646
|
+
devpad_alerts_list: {
|
|
1647
|
+
name: "devpad_alerts_list",
|
|
1648
|
+
description: "List notification subscriptions (alerts) for a project",
|
|
1649
|
+
inputSchema: z.object({
|
|
1650
|
+
project_id: z.string().describe("Project ID")
|
|
1651
|
+
}),
|
|
1652
|
+
execute: async (client, input) => unwrap(await client.pulse.subs.list(input))
|
|
1653
|
+
},
|
|
1654
|
+
devpad_alerts_subscribe: {
|
|
1655
|
+
name: "devpad_alerts_subscribe",
|
|
1656
|
+
description: "Create a new notification subscription (alert) for events",
|
|
1657
|
+
inputSchema: z.object({
|
|
1658
|
+
project_id: z.string().describe("Project ID"),
|
|
1659
|
+
name: z.string().describe("Subscription name"),
|
|
1660
|
+
filter: z.record(z.any()).describe("Event filter (name, level, url_pattern, properties)"),
|
|
1661
|
+
channel: z.record(z.any()).describe("Notification channel (kind + config: discord, ntfy, email)"),
|
|
1662
|
+
cooldown_seconds: z.number().optional().describe("Cooldown between notifications (default 60)")
|
|
1663
|
+
}),
|
|
1664
|
+
execute: async (client, input) => unwrap(await client.pulse.subs.create(input))
|
|
1665
|
+
},
|
|
1666
|
+
devpad_alerts_unsubscribe: {
|
|
1667
|
+
name: "devpad_alerts_unsubscribe",
|
|
1668
|
+
description: "Delete a notification subscription by ID",
|
|
1669
|
+
inputSchema: z.object({
|
|
1670
|
+
id: z.string().describe("Subscription ID")
|
|
1671
|
+
}),
|
|
1672
|
+
execute: async (client, input) => unwrap(await client.pulse.subs.delete(input.id))
|
|
1673
|
+
},
|
|
1674
|
+
devpad_pulse_key_create: {
|
|
1675
|
+
name: "devpad_pulse_key_create",
|
|
1676
|
+
description: "Create a new ingest key for a project (returns plaintext once)",
|
|
1677
|
+
inputSchema: z.object({
|
|
1678
|
+
project_id: z.string().describe("Project ID"),
|
|
1679
|
+
name: z.string().optional().describe("Key name/label"),
|
|
1680
|
+
rate_limit_per_min: z.number().optional().describe("Rate limit in requests per minute (default 600)")
|
|
1681
|
+
}),
|
|
1682
|
+
execute: async (client, input) => unwrap(await client.pulse.keys.create(input))
|
|
1456
1683
|
}
|
|
1457
1684
|
};
|
|
1458
1685
|
var toolNames = Object.keys(tools);
|
package/dist/schema/blog.d.ts
CHANGED
|
@@ -2241,14 +2241,14 @@ declare const fullSchema: {
|
|
|
2241
2241
|
tableName: "api_keys";
|
|
2242
2242
|
dataType: "string";
|
|
2243
2243
|
columnType: "SQLiteText";
|
|
2244
|
-
data: "devpad" | "blog" | "media" | "all";
|
|
2244
|
+
data: "devpad" | "blog" | "media" | "pulse" | "all";
|
|
2245
2245
|
driverParam: string;
|
|
2246
2246
|
notNull: true;
|
|
2247
2247
|
hasDefault: true;
|
|
2248
2248
|
isPrimaryKey: false;
|
|
2249
2249
|
isAutoincrement: false;
|
|
2250
2250
|
hasRuntimeDefault: false;
|
|
2251
|
-
enumValues: ["devpad", "blog", "media", "all"];
|
|
2251
|
+
enumValues: ["devpad", "blog", "media", "pulse", "all"];
|
|
2252
2252
|
baseColumn: never;
|
|
2253
2253
|
identity: undefined;
|
|
2254
2254
|
generated: undefined;
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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, A as ApiKey, C as CodebaseTask, z as ConfigSchemaType, r as GetConfigResult, G as Goal, H as HistoryAction, I as IgnorePath, M as Milestone, N as Nullable, P as Project, m as ProjectConfig, p as ProjectWithTasks, n as SaveConfigRequest, w as ScanStatus, S as Session, s as TAG_COLOURS, a as Tag, t as TagColor, f as TagConfig, q as TagWithColor, u as TagWithTypedColor, T as Task, b as TaskTag, v as TaskView, o as TaskWithDetails, d as TodoUpdate, e as TrackerResult, l as UpdateAction, x as UpdateData, y as UpdateUser, k as UpsertGoal, j as UpsertMilestone, g as UpsertProject, i as UpsertTag, h as UpsertTodo, U as User, Q as config_schema, J as project_config, K as save_config_request, L as save_tags_request, E as update_action, O as update_user, V as upsert_goal, R as upsert_milestone, B as upsert_project, F as upsert_tag, D as upsert_todo } from '../types.d-
|
|
2
|
+
export { c as Action, A as ApiKey, C as CodebaseTask, z as ConfigSchemaType, r as GetConfigResult, G as Goal, H as HistoryAction, I as IgnorePath, M as Milestone, N as Nullable, P as Project, m as ProjectConfig, p as ProjectWithTasks, n as SaveConfigRequest, w as ScanStatus, S as Session, s as TAG_COLOURS, a as Tag, t as TagColor, f as TagConfig, q as TagWithColor, u as TagWithTypedColor, T as Task, b as TaskTag, v as TaskView, o as TaskWithDetails, d as TodoUpdate, e as TrackerResult, l as UpdateAction, x as UpdateData, y as UpdateUser, k as UpsertGoal, j as UpsertMilestone, g as UpsertProject, i as UpsertTag, h as UpsertTodo, U as User, Q as config_schema, J as project_config, K as save_config_request, L as save_tags_request, E as update_action, O as update_user, V as upsert_goal, R as upsert_milestone, B as upsert_project, F as upsert_tag, D as upsert_todo } from '../types.d-CW-e2BrO.js';
|
|
3
3
|
import '@f0rbit/corpus';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '../schema.d-
|
|
6
|
+
import '../schema.d-Bka8880l.js';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/schema/media.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
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
2
|
import { z } from 'zod';
|
|
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-
|
|
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-VdW3W-u7.js';
|
|
4
4
|
import '@f0rbit/corpus';
|
|
5
5
|
import 'drizzle-orm';
|
|
6
6
|
import '../media.d-CQ56ckoR.js';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '../schema.d-
|
|
8
|
+
import '../schema.d-Bka8880l.js';
|
|
9
9
|
|
|
10
10
|
declare const brand: unique symbol;
|
|
11
11
|
type Brand<T, B extends string> = T & {
|
|
@@ -359,14 +359,14 @@ declare const api_keys: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
359
359
|
tableName: "api_keys";
|
|
360
360
|
dataType: "string";
|
|
361
361
|
columnType: "SQLiteText";
|
|
362
|
-
data: "devpad" | "blog" | "media" | "all";
|
|
362
|
+
data: "devpad" | "blog" | "media" | "pulse" | "all";
|
|
363
363
|
driverParam: string;
|
|
364
364
|
notNull: true;
|
|
365
365
|
hasDefault: true;
|
|
366
366
|
isPrimaryKey: false;
|
|
367
367
|
isAutoincrement: false;
|
|
368
368
|
hasRuntimeDefault: false;
|
|
369
|
-
enumValues: ["devpad", "blog", "media", "all"];
|
|
369
|
+
enumValues: ["devpad", "blog", "media", "pulse", "all"];
|
|
370
370
|
baseColumn: never;
|
|
371
371
|
identity: undefined;
|
|
372
372
|
generated: undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InferSelectModel } from 'drizzle-orm';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { a as api_keys, p as project, m as milestone, g as goal, t as task, c as codebase_tasks, b as action, A as ActionType, d as tag, u as user, s as session, e as task_tag, f as todo_updates, h as tracker_result, i as tag_config, j as ignore_path } from './schema.d-
|
|
3
|
+
import { a as api_keys, p as project, m as milestone, g as goal, t as task, c as codebase_tasks, b as action, A as ActionType, d as tag, u as user, s as session, e as task_tag, f as todo_updates, h as tracker_result, i as tag_config, j as ignore_path } from './schema.d-Bka8880l.js';
|
|
4
4
|
|
|
5
5
|
declare const upsert_project: z.ZodObject<{
|
|
6
6
|
id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
|
3
3
|
import { m as media_profiles, a as media_profile_filters, b as media_accounts, c as media_account_settings, d as media_platform_credentials, e as media_rate_limits } from './media.d-CQ56ckoR.js';
|
|
4
|
-
import { a as api_keys } from './schema.d-
|
|
4
|
+
import { a as api_keys } from './schema.d-Bka8880l.js';
|
|
5
5
|
|
|
6
6
|
declare const GitHubSettingsSchema: z.ZodObject<{
|
|
7
7
|
hidden_repos: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "f0rbit",
|
|
6
6
|
"url": "https://github.com/f0rbit"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"zod": "^3.22.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@devpad/schema": "^2.1.
|
|
30
|
+
"@devpad/schema": "^2.1.10",
|
|
31
31
|
"@types/node": "^20.11.24",
|
|
32
32
|
"bun-types": "latest",
|
|
33
33
|
"eslint": "^8.57.0",
|