@usepanacea/sdk 0.1.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/CHANGELOG.md +17 -0
- package/README.md +133 -0
- package/dist/browser.cjs +249 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +191 -0
- package/dist/browser.d.ts +191 -0
- package/dist/browser.js +246 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.cjs +249 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +246 -0
- package/dist/index.js.map +1 -0
- package/dist/types.cjs +4 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +170 -0
- package/dist/types.d.ts +170 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/webhooks.cjs +4 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +59 -0
- package/dist/webhooks.d.ts +59 -0
- package/dist/webhooks.js +3 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +69 -0
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @usepanacea/sdk/types
|
|
3
|
+
* Public request/response DTOs for the Panacea REST API.
|
|
4
|
+
* These mirror the server-side schemas exactly — no Zod dependency here.
|
|
5
|
+
*/
|
|
6
|
+
interface PaginationMeta {
|
|
7
|
+
page: number;
|
|
8
|
+
limit: number;
|
|
9
|
+
total: number;
|
|
10
|
+
totalPages: number;
|
|
11
|
+
}
|
|
12
|
+
interface PaginatedResponse<T> {
|
|
13
|
+
data: T[];
|
|
14
|
+
pagination: PaginationMeta;
|
|
15
|
+
}
|
|
16
|
+
interface ApiErrorBody {
|
|
17
|
+
error: {
|
|
18
|
+
code: string;
|
|
19
|
+
message: string;
|
|
20
|
+
retriable: boolean;
|
|
21
|
+
traceId?: string;
|
|
22
|
+
details?: Record<string, unknown>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface QueryOptions {
|
|
26
|
+
/** The user's question */
|
|
27
|
+
question: string;
|
|
28
|
+
/** Optional session ID for multi-turn conversations */
|
|
29
|
+
sessionId?: string;
|
|
30
|
+
/** Optional additional context to inject */
|
|
31
|
+
context?: string;
|
|
32
|
+
}
|
|
33
|
+
interface QuerySource {
|
|
34
|
+
path: string;
|
|
35
|
+
title: string;
|
|
36
|
+
confidence: number;
|
|
37
|
+
}
|
|
38
|
+
interface QueryResult {
|
|
39
|
+
answer: string;
|
|
40
|
+
sources: QuerySource[];
|
|
41
|
+
confidence: number;
|
|
42
|
+
flaggedForReview: boolean;
|
|
43
|
+
sessionId: string;
|
|
44
|
+
}
|
|
45
|
+
interface IngestUrlOptions {
|
|
46
|
+
type: "url";
|
|
47
|
+
url: string;
|
|
48
|
+
slug?: string;
|
|
49
|
+
category?: string;
|
|
50
|
+
}
|
|
51
|
+
interface IngestTextOptions {
|
|
52
|
+
type: "text";
|
|
53
|
+
content: string;
|
|
54
|
+
filename?: string;
|
|
55
|
+
slug?: string;
|
|
56
|
+
category?: string;
|
|
57
|
+
}
|
|
58
|
+
type IngestOptions = IngestUrlOptions | IngestTextOptions;
|
|
59
|
+
interface IngestResult {
|
|
60
|
+
rawPath: string;
|
|
61
|
+
confidence: number;
|
|
62
|
+
hadPii: boolean;
|
|
63
|
+
title: string;
|
|
64
|
+
}
|
|
65
|
+
type WikiEntryStatus = "draft" | "active" | "archived";
|
|
66
|
+
interface WikiEntry {
|
|
67
|
+
id: string;
|
|
68
|
+
tenantId: string;
|
|
69
|
+
path: string;
|
|
70
|
+
title: string;
|
|
71
|
+
content: string;
|
|
72
|
+
confidence: number;
|
|
73
|
+
version: number;
|
|
74
|
+
status: WikiEntryStatus;
|
|
75
|
+
tags?: string[];
|
|
76
|
+
sourceUrl?: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
}
|
|
80
|
+
interface ListWikiOptions {
|
|
81
|
+
page?: number;
|
|
82
|
+
limit?: number;
|
|
83
|
+
status?: WikiEntryStatus;
|
|
84
|
+
}
|
|
85
|
+
interface CreateWikiEntryOptions {
|
|
86
|
+
path: string;
|
|
87
|
+
title: string;
|
|
88
|
+
content: string;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
category?: string;
|
|
91
|
+
}
|
|
92
|
+
interface UpdateWikiEntryOptions {
|
|
93
|
+
title?: string;
|
|
94
|
+
content?: string;
|
|
95
|
+
tags?: string[];
|
|
96
|
+
}
|
|
97
|
+
type ReviewStatus = "pending" | "approved" | "rejected" | "modified";
|
|
98
|
+
interface ReviewQueueItem {
|
|
99
|
+
id: string;
|
|
100
|
+
tenantId: string;
|
|
101
|
+
entryPath: string;
|
|
102
|
+
proposedContent: string;
|
|
103
|
+
currentContent?: string;
|
|
104
|
+
confidence: number;
|
|
105
|
+
reviewStatus: ReviewStatus;
|
|
106
|
+
reviewerId?: string;
|
|
107
|
+
reviewedAt?: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
}
|
|
110
|
+
interface ListReviewOptions {
|
|
111
|
+
page?: number;
|
|
112
|
+
limit?: number;
|
|
113
|
+
status?: ReviewStatus;
|
|
114
|
+
}
|
|
115
|
+
interface ActOnReviewOptions {
|
|
116
|
+
status: "approved" | "rejected" | "modified";
|
|
117
|
+
modifiedContent?: string;
|
|
118
|
+
}
|
|
119
|
+
type ReactionType = "thumbs_up" | "thumbs_down" | "flag" | "copy";
|
|
120
|
+
type WebhookEvent = "wiki.updated" | "review.approved" | "review.rejected" | "ingest.complete";
|
|
121
|
+
interface WebhookRegistration {
|
|
122
|
+
id: string;
|
|
123
|
+
tenantId: string;
|
|
124
|
+
url: string;
|
|
125
|
+
events: WebhookEvent[];
|
|
126
|
+
isActive?: boolean;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
}
|
|
129
|
+
interface CreateWebhookOptions {
|
|
130
|
+
url: string;
|
|
131
|
+
events: WebhookEvent[];
|
|
132
|
+
description?: string;
|
|
133
|
+
}
|
|
134
|
+
type SystemStatus = "healthy" | "degraded" | "unhealthy" | "unknown";
|
|
135
|
+
type AgentStatus = "idle" | "running" | "error" | "disabled";
|
|
136
|
+
interface AgentHealth {
|
|
137
|
+
name: string;
|
|
138
|
+
status: AgentStatus;
|
|
139
|
+
lastRunAt?: string;
|
|
140
|
+
message?: string;
|
|
141
|
+
}
|
|
142
|
+
interface HealthReport {
|
|
143
|
+
status: SystemStatus;
|
|
144
|
+
timestamp: string;
|
|
145
|
+
agents: AgentHealth[];
|
|
146
|
+
wikiEntryCount: number;
|
|
147
|
+
pendingReviewCount: number;
|
|
148
|
+
dbConnected: boolean;
|
|
149
|
+
}
|
|
150
|
+
type ApiKeyPrefix = "pk_live" | "pk_test";
|
|
151
|
+
interface ApiKey {
|
|
152
|
+
id: string;
|
|
153
|
+
tenantId: string;
|
|
154
|
+
prefix: ApiKeyPrefix;
|
|
155
|
+
name?: string;
|
|
156
|
+
lastUsedAt?: string;
|
|
157
|
+
createdAt: string;
|
|
158
|
+
}
|
|
159
|
+
interface CreateApiKeyOptions {
|
|
160
|
+
name?: string;
|
|
161
|
+
prefix?: ApiKeyPrefix;
|
|
162
|
+
expiresAt?: string;
|
|
163
|
+
}
|
|
164
|
+
interface CreateApiKeyResult {
|
|
165
|
+
key: ApiKey;
|
|
166
|
+
/** Raw key value — only returned once, on creation */
|
|
167
|
+
rawKey: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type { ActOnReviewOptions, AgentHealth, AgentStatus, ApiErrorBody, ApiKey, ApiKeyPrefix, CreateApiKeyOptions, CreateApiKeyResult, CreateWebhookOptions, CreateWikiEntryOptions, HealthReport, IngestOptions, IngestResult, IngestTextOptions, IngestUrlOptions, ListReviewOptions, ListWikiOptions, PaginatedResponse, PaginationMeta, QueryOptions, QueryResult, QuerySource, ReactionType, ReviewQueueItem, ReviewStatus, SystemStatus, UpdateWikiEntryOptions, WebhookEvent, WebhookRegistration, WikiEntry, WikiEntryStatus };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @usepanacea/sdk/types
|
|
3
|
+
* Public request/response DTOs for the Panacea REST API.
|
|
4
|
+
* These mirror the server-side schemas exactly — no Zod dependency here.
|
|
5
|
+
*/
|
|
6
|
+
interface PaginationMeta {
|
|
7
|
+
page: number;
|
|
8
|
+
limit: number;
|
|
9
|
+
total: number;
|
|
10
|
+
totalPages: number;
|
|
11
|
+
}
|
|
12
|
+
interface PaginatedResponse<T> {
|
|
13
|
+
data: T[];
|
|
14
|
+
pagination: PaginationMeta;
|
|
15
|
+
}
|
|
16
|
+
interface ApiErrorBody {
|
|
17
|
+
error: {
|
|
18
|
+
code: string;
|
|
19
|
+
message: string;
|
|
20
|
+
retriable: boolean;
|
|
21
|
+
traceId?: string;
|
|
22
|
+
details?: Record<string, unknown>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface QueryOptions {
|
|
26
|
+
/** The user's question */
|
|
27
|
+
question: string;
|
|
28
|
+
/** Optional session ID for multi-turn conversations */
|
|
29
|
+
sessionId?: string;
|
|
30
|
+
/** Optional additional context to inject */
|
|
31
|
+
context?: string;
|
|
32
|
+
}
|
|
33
|
+
interface QuerySource {
|
|
34
|
+
path: string;
|
|
35
|
+
title: string;
|
|
36
|
+
confidence: number;
|
|
37
|
+
}
|
|
38
|
+
interface QueryResult {
|
|
39
|
+
answer: string;
|
|
40
|
+
sources: QuerySource[];
|
|
41
|
+
confidence: number;
|
|
42
|
+
flaggedForReview: boolean;
|
|
43
|
+
sessionId: string;
|
|
44
|
+
}
|
|
45
|
+
interface IngestUrlOptions {
|
|
46
|
+
type: "url";
|
|
47
|
+
url: string;
|
|
48
|
+
slug?: string;
|
|
49
|
+
category?: string;
|
|
50
|
+
}
|
|
51
|
+
interface IngestTextOptions {
|
|
52
|
+
type: "text";
|
|
53
|
+
content: string;
|
|
54
|
+
filename?: string;
|
|
55
|
+
slug?: string;
|
|
56
|
+
category?: string;
|
|
57
|
+
}
|
|
58
|
+
type IngestOptions = IngestUrlOptions | IngestTextOptions;
|
|
59
|
+
interface IngestResult {
|
|
60
|
+
rawPath: string;
|
|
61
|
+
confidence: number;
|
|
62
|
+
hadPii: boolean;
|
|
63
|
+
title: string;
|
|
64
|
+
}
|
|
65
|
+
type WikiEntryStatus = "draft" | "active" | "archived";
|
|
66
|
+
interface WikiEntry {
|
|
67
|
+
id: string;
|
|
68
|
+
tenantId: string;
|
|
69
|
+
path: string;
|
|
70
|
+
title: string;
|
|
71
|
+
content: string;
|
|
72
|
+
confidence: number;
|
|
73
|
+
version: number;
|
|
74
|
+
status: WikiEntryStatus;
|
|
75
|
+
tags?: string[];
|
|
76
|
+
sourceUrl?: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
}
|
|
80
|
+
interface ListWikiOptions {
|
|
81
|
+
page?: number;
|
|
82
|
+
limit?: number;
|
|
83
|
+
status?: WikiEntryStatus;
|
|
84
|
+
}
|
|
85
|
+
interface CreateWikiEntryOptions {
|
|
86
|
+
path: string;
|
|
87
|
+
title: string;
|
|
88
|
+
content: string;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
category?: string;
|
|
91
|
+
}
|
|
92
|
+
interface UpdateWikiEntryOptions {
|
|
93
|
+
title?: string;
|
|
94
|
+
content?: string;
|
|
95
|
+
tags?: string[];
|
|
96
|
+
}
|
|
97
|
+
type ReviewStatus = "pending" | "approved" | "rejected" | "modified";
|
|
98
|
+
interface ReviewQueueItem {
|
|
99
|
+
id: string;
|
|
100
|
+
tenantId: string;
|
|
101
|
+
entryPath: string;
|
|
102
|
+
proposedContent: string;
|
|
103
|
+
currentContent?: string;
|
|
104
|
+
confidence: number;
|
|
105
|
+
reviewStatus: ReviewStatus;
|
|
106
|
+
reviewerId?: string;
|
|
107
|
+
reviewedAt?: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
}
|
|
110
|
+
interface ListReviewOptions {
|
|
111
|
+
page?: number;
|
|
112
|
+
limit?: number;
|
|
113
|
+
status?: ReviewStatus;
|
|
114
|
+
}
|
|
115
|
+
interface ActOnReviewOptions {
|
|
116
|
+
status: "approved" | "rejected" | "modified";
|
|
117
|
+
modifiedContent?: string;
|
|
118
|
+
}
|
|
119
|
+
type ReactionType = "thumbs_up" | "thumbs_down" | "flag" | "copy";
|
|
120
|
+
type WebhookEvent = "wiki.updated" | "review.approved" | "review.rejected" | "ingest.complete";
|
|
121
|
+
interface WebhookRegistration {
|
|
122
|
+
id: string;
|
|
123
|
+
tenantId: string;
|
|
124
|
+
url: string;
|
|
125
|
+
events: WebhookEvent[];
|
|
126
|
+
isActive?: boolean;
|
|
127
|
+
createdAt: string;
|
|
128
|
+
}
|
|
129
|
+
interface CreateWebhookOptions {
|
|
130
|
+
url: string;
|
|
131
|
+
events: WebhookEvent[];
|
|
132
|
+
description?: string;
|
|
133
|
+
}
|
|
134
|
+
type SystemStatus = "healthy" | "degraded" | "unhealthy" | "unknown";
|
|
135
|
+
type AgentStatus = "idle" | "running" | "error" | "disabled";
|
|
136
|
+
interface AgentHealth {
|
|
137
|
+
name: string;
|
|
138
|
+
status: AgentStatus;
|
|
139
|
+
lastRunAt?: string;
|
|
140
|
+
message?: string;
|
|
141
|
+
}
|
|
142
|
+
interface HealthReport {
|
|
143
|
+
status: SystemStatus;
|
|
144
|
+
timestamp: string;
|
|
145
|
+
agents: AgentHealth[];
|
|
146
|
+
wikiEntryCount: number;
|
|
147
|
+
pendingReviewCount: number;
|
|
148
|
+
dbConnected: boolean;
|
|
149
|
+
}
|
|
150
|
+
type ApiKeyPrefix = "pk_live" | "pk_test";
|
|
151
|
+
interface ApiKey {
|
|
152
|
+
id: string;
|
|
153
|
+
tenantId: string;
|
|
154
|
+
prefix: ApiKeyPrefix;
|
|
155
|
+
name?: string;
|
|
156
|
+
lastUsedAt?: string;
|
|
157
|
+
createdAt: string;
|
|
158
|
+
}
|
|
159
|
+
interface CreateApiKeyOptions {
|
|
160
|
+
name?: string;
|
|
161
|
+
prefix?: ApiKeyPrefix;
|
|
162
|
+
expiresAt?: string;
|
|
163
|
+
}
|
|
164
|
+
interface CreateApiKeyResult {
|
|
165
|
+
key: ApiKey;
|
|
166
|
+
/** Raw key value — only returned once, on creation */
|
|
167
|
+
rawKey: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type { ActOnReviewOptions, AgentHealth, AgentStatus, ApiErrorBody, ApiKey, ApiKeyPrefix, CreateApiKeyOptions, CreateApiKeyResult, CreateWebhookOptions, CreateWikiEntryOptions, HealthReport, IngestOptions, IngestResult, IngestTextOptions, IngestUrlOptions, ListReviewOptions, ListWikiOptions, PaginatedResponse, PaginationMeta, QueryOptions, QueryResult, QuerySource, ReactionType, ReviewQueueItem, ReviewStatus, SystemStatus, UpdateWikiEntryOptions, WebhookEvent, WebhookRegistration, WikiEntry, WikiEntryStatus };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"webhooks.cjs"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @usepanacea/sdk/webhooks
|
|
3
|
+
* Typed webhook payload definitions for all Panacea webhook events.
|
|
4
|
+
* Use these to type-check your webhook handler.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import type { PanaceaWebhookPayload } from "@usepanacea/sdk/webhooks"
|
|
9
|
+
*
|
|
10
|
+
* app.post("/webhooks/panacea", (req, res) => {
|
|
11
|
+
* const payload = req.body as PanaceaWebhookPayload
|
|
12
|
+
* if (payload.event === "ingest.complete") {
|
|
13
|
+
* console.log(payload.data.rawPath)
|
|
14
|
+
* }
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
interface WebhookBase {
|
|
19
|
+
/** ISO-8601 timestamp */
|
|
20
|
+
timestamp: string;
|
|
21
|
+
/** Tenant that triggered the event */
|
|
22
|
+
tenantId: string;
|
|
23
|
+
}
|
|
24
|
+
interface WikiUpdatedPayload extends WebhookBase {
|
|
25
|
+
event: "wiki.updated";
|
|
26
|
+
data: {
|
|
27
|
+
entryPath: string;
|
|
28
|
+
version: number;
|
|
29
|
+
title: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface ReviewApprovedPayload extends WebhookBase {
|
|
33
|
+
event: "review.approved";
|
|
34
|
+
data: {
|
|
35
|
+
reviewId: string;
|
|
36
|
+
entryPath: string;
|
|
37
|
+
reviewerId: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ReviewRejectedPayload extends WebhookBase {
|
|
41
|
+
event: "review.rejected";
|
|
42
|
+
data: {
|
|
43
|
+
reviewId: string;
|
|
44
|
+
entryPath: string;
|
|
45
|
+
reviewerId: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface IngestCompletePayload extends WebhookBase {
|
|
49
|
+
event: "ingest.complete";
|
|
50
|
+
data: {
|
|
51
|
+
rawPath: string;
|
|
52
|
+
title: string;
|
|
53
|
+
confidence: number;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
type PanaceaWebhookPayload = WikiUpdatedPayload | ReviewApprovedPayload | ReviewRejectedPayload | IngestCompletePayload;
|
|
57
|
+
type WebhookEventName = PanaceaWebhookPayload["event"];
|
|
58
|
+
|
|
59
|
+
export type { IngestCompletePayload, PanaceaWebhookPayload, ReviewApprovedPayload, ReviewRejectedPayload, WebhookEventName, WikiUpdatedPayload };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module @usepanacea/sdk/webhooks
|
|
3
|
+
* Typed webhook payload definitions for all Panacea webhook events.
|
|
4
|
+
* Use these to type-check your webhook handler.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import type { PanaceaWebhookPayload } from "@usepanacea/sdk/webhooks"
|
|
9
|
+
*
|
|
10
|
+
* app.post("/webhooks/panacea", (req, res) => {
|
|
11
|
+
* const payload = req.body as PanaceaWebhookPayload
|
|
12
|
+
* if (payload.event === "ingest.complete") {
|
|
13
|
+
* console.log(payload.data.rawPath)
|
|
14
|
+
* }
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
interface WebhookBase {
|
|
19
|
+
/** ISO-8601 timestamp */
|
|
20
|
+
timestamp: string;
|
|
21
|
+
/** Tenant that triggered the event */
|
|
22
|
+
tenantId: string;
|
|
23
|
+
}
|
|
24
|
+
interface WikiUpdatedPayload extends WebhookBase {
|
|
25
|
+
event: "wiki.updated";
|
|
26
|
+
data: {
|
|
27
|
+
entryPath: string;
|
|
28
|
+
version: number;
|
|
29
|
+
title: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface ReviewApprovedPayload extends WebhookBase {
|
|
33
|
+
event: "review.approved";
|
|
34
|
+
data: {
|
|
35
|
+
reviewId: string;
|
|
36
|
+
entryPath: string;
|
|
37
|
+
reviewerId: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ReviewRejectedPayload extends WebhookBase {
|
|
41
|
+
event: "review.rejected";
|
|
42
|
+
data: {
|
|
43
|
+
reviewId: string;
|
|
44
|
+
entryPath: string;
|
|
45
|
+
reviewerId: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
interface IngestCompletePayload extends WebhookBase {
|
|
49
|
+
event: "ingest.complete";
|
|
50
|
+
data: {
|
|
51
|
+
rawPath: string;
|
|
52
|
+
title: string;
|
|
53
|
+
confidence: number;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
type PanaceaWebhookPayload = WikiUpdatedPayload | ReviewApprovedPayload | ReviewRejectedPayload | IngestCompletePayload;
|
|
57
|
+
type WebhookEventName = PanaceaWebhookPayload["event"];
|
|
58
|
+
|
|
59
|
+
export type { IngestCompletePayload, PanaceaWebhookPayload, ReviewApprovedPayload, ReviewRejectedPayload, WebhookEventName, WikiUpdatedPayload };
|
package/dist/webhooks.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"webhooks.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@usepanacea/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Official Panacea TypeScript SDK — HTTP client for Node.js and browser",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/aevrHQ/panacea.git",
|
|
11
|
+
"directory": "packages/sdk"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/aevrHQ/panacea/tree/main/packages/sdk#readme",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"panacea",
|
|
16
|
+
"knowledge-base",
|
|
17
|
+
"ai",
|
|
18
|
+
"sdk",
|
|
19
|
+
"rag",
|
|
20
|
+
"typescript"
|
|
21
|
+
],
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"browser": {
|
|
27
|
+
"import": "./dist/browser.js",
|
|
28
|
+
"types": "./dist/browser.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"require": "./dist/index.cjs",
|
|
32
|
+
"types": "./dist/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./types": {
|
|
35
|
+
"import": "./dist/types.js",
|
|
36
|
+
"require": "./dist/types.cjs",
|
|
37
|
+
"types": "./dist/types.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./webhooks": {
|
|
40
|
+
"import": "./dist/webhooks.js",
|
|
41
|
+
"require": "./dist/webhooks.cjs",
|
|
42
|
+
"types": "./dist/webhooks.d.ts"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"README.md",
|
|
48
|
+
"CHANGELOG.md"
|
|
49
|
+
],
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=20"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"tsup": "^8.5.0",
|
|
58
|
+
"typescript": "^5.8.3",
|
|
59
|
+
"@types/node": "^20",
|
|
60
|
+
"@panacea/shared": "0.0.1"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"dev": "tsup --watch",
|
|
65
|
+
"typecheck": "tsc --noEmit",
|
|
66
|
+
"test": "vitest run",
|
|
67
|
+
"clean": "rm -rf dist"
|
|
68
|
+
}
|
|
69
|
+
}
|