@kaiban/sdk 0.1.1 → 0.1.2
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/README.md +376 -80
- package/dist/index.d.ts +6 -7
- package/dist/index.js +6 -7
- package/dist/lib/client.d.ts +5 -8
- package/dist/lib/client.js +5 -7
- package/dist/lib/http/HttpClient.js +5 -3
- package/dist/lib/resources/ActivitiesClient.d.ts +86 -27
- package/dist/lib/resources/ActivitiesClient.js +90 -29
- package/dist/lib/resources/AgentsClient.d.ts +68 -15
- package/dist/lib/resources/AgentsClient.js +75 -17
- package/dist/lib/resources/BoardsClient.d.ts +3 -3
- package/dist/lib/resources/BoardsClient.js +2 -2
- package/dist/lib/resources/CardsClient.d.ts +139 -12
- package/dist/lib/resources/CardsClient.js +171 -25
- package/dist/lib/resources/ExternalChannelsClient.d.ts +3 -3
- package/dist/lib/resources/ExternalChannelsClient.js +2 -2
- package/dist/lib/resources/ResourcesClient.d.ts +3 -30
- package/dist/lib/resources/ResourcesClient.js +2 -26
- package/dist/lib/resources/TeamsClient.d.ts +3 -3
- package/dist/lib/resources/TeamsClient.js +2 -2
- package/dist/types/a2a-data-parts.d.ts +2 -2
- package/dist/types/entities/activities.d.ts +56 -14
- package/dist/types/entities/activities.js +73 -1
- package/dist/types/entities/agent.d.ts +47 -5
- package/dist/types/entities/agent.js +25 -1
- package/dist/types/entities/card.d.ts +16 -26
- package/dist/types/entities/card.js +26 -1
- package/dist/types/entities/external-channel.d.ts +25 -5
- package/dist/types/entities/external-channel.js +16 -1
- package/dist/types/entities/index.d.ts +4 -5
- package/dist/types/entities/index.js +4 -5
- package/dist/types/entities/resource.d.ts +21 -12
- package/dist/types/entities/resource.js +7 -1
- package/dist/types/responses.d.ts +10 -10
- package/package.json +33 -6
- package/dist/lib/resources/BenchmarkExecutionsClient.d.ts +0 -250
- package/dist/lib/resources/BenchmarkExecutionsClient.js +0 -261
- package/dist/lib/resources/BenchmarksClient.d.ts +0 -159
- package/dist/lib/resources/BenchmarksClient.js +0 -158
- package/dist/lib/resources/SupervisorFeedbackClient.d.ts +0 -75
- package/dist/lib/resources/SupervisorFeedbackClient.js +0 -67
- package/dist/lib/resources/TeamMembersClient.d.ts +0 -66
- package/dist/lib/resources/TeamMembersClient.js +0 -75
- package/dist/lib/resources/__tests__/ActivitiesClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/ActivitiesClient.test.js +0 -33
- package/dist/lib/resources/__tests__/AgentsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/AgentsClient.test.js +0 -37
- package/dist/lib/resources/__tests__/BenchmarkExecutionsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/BenchmarkExecutionsClient.test.js +0 -59
- package/dist/lib/resources/__tests__/BenchmarksClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/BenchmarksClient.test.js +0 -42
- package/dist/lib/resources/__tests__/BoardsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/BoardsClient.test.js +0 -26
- package/dist/lib/resources/__tests__/CardsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/CardsClient.test.js +0 -62
- package/dist/lib/resources/__tests__/ExternalChannelsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/ExternalChannelsClient.test.js +0 -26
- package/dist/lib/resources/__tests__/ResourcesClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/ResourcesClient.test.js +0 -28
- package/dist/lib/resources/__tests__/SupervisorFeedbackClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/SupervisorFeedbackClient.test.js +0 -24
- package/dist/lib/resources/__tests__/TeamMembersClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/TeamMembersClient.test.js +0 -26
- package/dist/lib/resources/__tests__/TeamsClient.test.d.ts +0 -1
- package/dist/lib/resources/__tests__/TeamsClient.test.js +0 -26
- package/dist/types/entities/benchmark.d.ts +0 -82
- package/dist/types/entities/benchmark.js +0 -1
|
@@ -1,15 +1,53 @@
|
|
|
1
1
|
import { ISODate } from './shared';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
export declare const ActivityType: {
|
|
3
|
+
readonly CARD_STATUS_CHANGED: "card_status_changed";
|
|
4
|
+
readonly CARD_RESULT_PREVIEW: "card_result_preview";
|
|
5
|
+
readonly CARD_TASK_COMPLETED: "card_task_completed";
|
|
6
|
+
readonly CARD_TASK_BLOCKED: "card_task_blocked";
|
|
7
|
+
readonly CARD_TASK_STARTED: "card_task_started";
|
|
8
|
+
readonly CARD_AGENT_ADDED: "card_agent_added";
|
|
9
|
+
readonly CARD_AGENT_REMOVED: "card_agent_removed";
|
|
10
|
+
readonly CARD_TITLE_CHANGED: "card_title_changed";
|
|
11
|
+
readonly CARD_DESCRIPTION_CHANGED: "card_description_changed";
|
|
12
|
+
readonly CARD_RESULT_CHANGED: "card_result_changed";
|
|
13
|
+
readonly CARD_PRIORITY_CHANGED: "card_priority_changed";
|
|
14
|
+
readonly CARD_MEMBER_ADDED: "card_member_added";
|
|
15
|
+
readonly CARD_MEMBER_REMOVED: "card_member_removed";
|
|
16
|
+
readonly CARD_COMMENT_ADDED: "card_comment_added";
|
|
17
|
+
readonly CARD_DELETED: "card_deleted";
|
|
18
|
+
readonly CARD_CREATED: "card_created";
|
|
19
|
+
readonly CARD_CLONED: "card_cloned";
|
|
20
|
+
readonly CARD_COLUMN_CHANGED: "card_column_changed";
|
|
21
|
+
readonly THREAD_USER_MESSAGE: "thread_user_message";
|
|
22
|
+
readonly THREAD_AGENT_MESSAGE: "thread_agent_message";
|
|
23
|
+
readonly THREAD_AGENT_MESSAGE_EVALUATION: "thread_agent_message_evaluation";
|
|
24
|
+
readonly THREAD_FEEDBACK: "thread_feedback";
|
|
25
|
+
readonly THREAD_STEP_COSTS: "thread_step_costs";
|
|
26
|
+
readonly AGENT_TASK_DOING: "agent_task_doing";
|
|
27
|
+
readonly AGENT_TASK_COMPLETED: "agent_task_completed";
|
|
28
|
+
readonly AGENT_TASK_DONE: "agent_task_done";
|
|
29
|
+
readonly AGENT_TASK_BLOCKED: "agent_task_blocked";
|
|
30
|
+
readonly AGENT_TASK_WAITING: "agent_task_waiting";
|
|
31
|
+
readonly AGENT_TASK_CANCELLED: "agent_task_cancelled";
|
|
32
|
+
readonly AGENT_TASK_FAILED: "agent_task_failed";
|
|
33
|
+
readonly AGENT_STATUS_OBSERVATION: "agent_status_observation";
|
|
34
|
+
readonly AGENT_STATUS_THINKING_END: "agent_status_thinking_end";
|
|
35
|
+
readonly AGENT_STATUS_UPDATED: "agent_status_updated";
|
|
36
|
+
readonly AGENT_REGISTER_APPROVAL: "agent_register_approval";
|
|
37
|
+
readonly AGENT_REGISTER_REJECTED: "agent_register_rejected";
|
|
38
|
+
readonly AGENT_RESPOND_FEEDBACK: "agent_respond_feedback";
|
|
39
|
+
readonly RESULT_APPROVED: "result_approved";
|
|
40
|
+
readonly RESULT_REJECTED: "result_rejected";
|
|
41
|
+
readonly RESULT_FEEDBACK: "result_feedback";
|
|
42
|
+
readonly EMAIL_RECEIVED: "email_received";
|
|
43
|
+
readonly EMAIL_SENT: "email_sent";
|
|
44
|
+
readonly EMAIL_OPENED: "email_opened";
|
|
45
|
+
readonly EMAIL_CLICKED: "email_clicked";
|
|
46
|
+
readonly EMAIL_BOUNCED: "email_bounced";
|
|
47
|
+
readonly EMAIL_SPAM: "email_spam";
|
|
48
|
+
readonly SYSTEM_TRACE: "system_trace";
|
|
49
|
+
readonly RESOURCE_PUBLISHED: "resource_published";
|
|
50
|
+
};
|
|
13
51
|
export interface ActivityActor {
|
|
14
52
|
id: string;
|
|
15
53
|
type: 'user' | 'agent' | 'system';
|
|
@@ -20,13 +58,17 @@ export interface ActivityChange {
|
|
|
20
58
|
old_value: unknown;
|
|
21
59
|
new_value: unknown;
|
|
22
60
|
}
|
|
23
|
-
export interface
|
|
61
|
+
export interface Activity {
|
|
62
|
+
id: string;
|
|
24
63
|
board_id: string;
|
|
25
|
-
card_id: string;
|
|
26
64
|
team_id: string;
|
|
27
|
-
|
|
65
|
+
card_id: string;
|
|
66
|
+
type: (typeof ActivityType)[keyof typeof ActivityType];
|
|
28
67
|
description: string;
|
|
29
68
|
actor: ActivityActor;
|
|
30
69
|
changes?: ActivityChange[];
|
|
31
70
|
metadata?: Record<string, unknown>;
|
|
71
|
+
user_id?: string;
|
|
72
|
+
created_at: ISODate;
|
|
32
73
|
}
|
|
74
|
+
export type ActivityCreate = Omit<Activity, 'id' | 'created_at'>;
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const ActivityType = {
|
|
2
|
+
// Card status activities
|
|
3
|
+
CARD_STATUS_CHANGED: 'card_status_changed',
|
|
4
|
+
CARD_RESULT_PREVIEW: 'card_result_preview',
|
|
5
|
+
// Card task activities
|
|
6
|
+
CARD_TASK_COMPLETED: 'card_task_completed',
|
|
7
|
+
CARD_TASK_BLOCKED: 'card_task_blocked',
|
|
8
|
+
CARD_TASK_STARTED: 'card_task_started',
|
|
9
|
+
// Card modification activities
|
|
10
|
+
CARD_AGENT_ADDED: 'card_agent_added',
|
|
11
|
+
CARD_AGENT_REMOVED: 'card_agent_removed',
|
|
12
|
+
CARD_TITLE_CHANGED: 'card_title_changed',
|
|
13
|
+
CARD_DESCRIPTION_CHANGED: 'card_description_changed',
|
|
14
|
+
CARD_RESULT_CHANGED: 'card_result_changed',
|
|
15
|
+
CARD_PRIORITY_CHANGED: 'card_priority_changed',
|
|
16
|
+
CARD_MEMBER_ADDED: 'card_member_added',
|
|
17
|
+
CARD_MEMBER_REMOVED: 'card_member_removed',
|
|
18
|
+
CARD_COMMENT_ADDED: 'card_comment_added',
|
|
19
|
+
CARD_DELETED: 'card_deleted',
|
|
20
|
+
CARD_CREATED: 'card_created',
|
|
21
|
+
CARD_CLONED: 'card_cloned',
|
|
22
|
+
CARD_COLUMN_CHANGED: 'card_column_changed',
|
|
23
|
+
// A2A task status activities
|
|
24
|
+
// "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
25
|
+
// | "auth-required" | "unknown"
|
|
26
|
+
// Types for A2A task status activities
|
|
27
|
+
// TODO: Understand how to mix with the existing agent task status activities
|
|
28
|
+
// A2A_TASK_STATUS_SUBMITTED: 'submitted',
|
|
29
|
+
// A2A_TASK_STATUS_WORKING: 'working',
|
|
30
|
+
// A2A_TASK_STATUS_INPUT_REQUIRED: 'required',
|
|
31
|
+
// A2A_TASK_STATUS_COMPLETED: 'completed',
|
|
32
|
+
// A2A_TASK_STATUS_CANCELED: 'canceled',
|
|
33
|
+
// A2A_TASK_STATUS_FAILED: 'failed',
|
|
34
|
+
// A2A_TASK_STATUS_REJECTED: 'rejected',
|
|
35
|
+
// A2A_TASK_STATUS_AUTH_REQUIRED: 'auth-required',
|
|
36
|
+
// A2A_TASK_STATUS_UNKNOWN: 'unknown',
|
|
37
|
+
// Thread activities
|
|
38
|
+
THREAD_USER_MESSAGE: 'thread_user_message',
|
|
39
|
+
THREAD_AGENT_MESSAGE: 'thread_agent_message',
|
|
40
|
+
THREAD_AGENT_MESSAGE_EVALUATION: 'thread_agent_message_evaluation',
|
|
41
|
+
THREAD_FEEDBACK: 'thread_feedback',
|
|
42
|
+
THREAD_STEP_COSTS: 'thread_step_costs',
|
|
43
|
+
// Agent task status activities
|
|
44
|
+
AGENT_TASK_DOING: 'agent_task_doing',
|
|
45
|
+
AGENT_TASK_COMPLETED: 'agent_task_completed',
|
|
46
|
+
AGENT_TASK_DONE: 'agent_task_done',
|
|
47
|
+
AGENT_TASK_BLOCKED: 'agent_task_blocked',
|
|
48
|
+
AGENT_TASK_WAITING: 'agent_task_waiting',
|
|
49
|
+
AGENT_TASK_CANCELLED: 'agent_task_cancelled',
|
|
50
|
+
AGENT_TASK_FAILED: 'agent_task_failed',
|
|
51
|
+
// Agent action activities
|
|
52
|
+
AGENT_STATUS_OBSERVATION: 'agent_status_observation',
|
|
53
|
+
AGENT_STATUS_THINKING_END: 'agent_status_thinking_end',
|
|
54
|
+
AGENT_STATUS_UPDATED: 'agent_status_updated',
|
|
55
|
+
AGENT_REGISTER_APPROVAL: 'agent_register_approval',
|
|
56
|
+
AGENT_REGISTER_REJECTED: 'agent_register_rejected',
|
|
57
|
+
AGENT_RESPOND_FEEDBACK: 'agent_respond_feedback',
|
|
58
|
+
// Result feedback activities
|
|
59
|
+
RESULT_APPROVED: 'result_approved',
|
|
60
|
+
RESULT_REJECTED: 'result_rejected',
|
|
61
|
+
RESULT_FEEDBACK: 'result_feedback',
|
|
62
|
+
// Email activities
|
|
63
|
+
EMAIL_RECEIVED: 'email_received',
|
|
64
|
+
EMAIL_SENT: 'email_sent',
|
|
65
|
+
EMAIL_OPENED: 'email_opened',
|
|
66
|
+
EMAIL_CLICKED: 'email_clicked',
|
|
67
|
+
EMAIL_BOUNCED: 'email_bounced',
|
|
68
|
+
EMAIL_SPAM: 'email_spam',
|
|
69
|
+
// System tracing activities
|
|
70
|
+
SYSTEM_TRACE: 'system_trace',
|
|
71
|
+
// Resource activities
|
|
72
|
+
RESOURCE_PUBLISHED: 'resource_published',
|
|
73
|
+
};
|
|
@@ -1,16 +1,58 @@
|
|
|
1
1
|
import { ISODate } from './shared';
|
|
2
|
+
export declare const AgentType: {
|
|
3
|
+
readonly KAIBANJS: "kaibanjs";
|
|
4
|
+
readonly CREWAI: "crewai";
|
|
5
|
+
readonly EXTERNAL: "external";
|
|
6
|
+
readonly A2A: "a2a";
|
|
7
|
+
};
|
|
8
|
+
export declare const AgentStatus: {
|
|
9
|
+
readonly ACTIVE: "active";
|
|
10
|
+
readonly DRAFT: "draft";
|
|
11
|
+
readonly INACTIVE: "inactive";
|
|
12
|
+
};
|
|
2
13
|
export interface Agent {
|
|
3
14
|
id: string;
|
|
4
15
|
name: string;
|
|
5
16
|
description: string;
|
|
6
17
|
team_id: string;
|
|
7
|
-
status:
|
|
8
|
-
type:
|
|
18
|
+
status: (typeof AgentStatus)[keyof typeof AgentStatus];
|
|
19
|
+
type: (typeof AgentType)[keyof typeof AgentType];
|
|
9
20
|
created_at?: ISODate;
|
|
10
21
|
updated_at?: ISODate;
|
|
11
22
|
}
|
|
23
|
+
export declare const AgentFeedbackStatus: {
|
|
24
|
+
readonly UNPROCESSED: "unprocessed";
|
|
25
|
+
readonly REVIEWED: "reviewed";
|
|
26
|
+
readonly ANNOTATED: "annotated";
|
|
27
|
+
};
|
|
28
|
+
export declare const AgentFeedbackType: {
|
|
29
|
+
readonly OPERATOR_EVALUATION_ADDED: "operator_evaluation_added";
|
|
30
|
+
readonly USER_CONVERSATION_FEEDBACK: "user_conversation_feedback";
|
|
31
|
+
readonly USER_MESSAGE_EVALUATION: "user_message_evaluation";
|
|
32
|
+
};
|
|
33
|
+
export declare const AgentFeedbackEvaluation: {
|
|
34
|
+
readonly POSITIVE: "positive";
|
|
35
|
+
readonly NEGATIVE: "negative";
|
|
36
|
+
};
|
|
12
37
|
export interface AgentFeedback {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
id: string;
|
|
39
|
+
agent_id: string;
|
|
40
|
+
team_id: string;
|
|
41
|
+
activity_id: string;
|
|
42
|
+
status: (typeof AgentFeedbackStatus)[keyof typeof AgentFeedbackStatus];
|
|
43
|
+
type: (typeof AgentFeedbackType)[keyof typeof AgentFeedbackType];
|
|
44
|
+
evaluation: (typeof AgentFeedbackEvaluation)[keyof typeof AgentFeedbackEvaluation];
|
|
45
|
+
comment: string;
|
|
46
|
+
created_by: string;
|
|
47
|
+
created_at: ISODate;
|
|
48
|
+
}
|
|
49
|
+
export interface AgentSupervisorFeedback {
|
|
50
|
+
id: string;
|
|
51
|
+
agent_id: string;
|
|
52
|
+
team_id: string;
|
|
53
|
+
activity_id: string;
|
|
54
|
+
board_id: string;
|
|
55
|
+
feedback: string;
|
|
56
|
+
created_by: string;
|
|
57
|
+
created_at: ISODate;
|
|
16
58
|
}
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const AgentType = {
|
|
2
|
+
KAIBANJS: 'kaibanjs',
|
|
3
|
+
CREWAI: 'crewai',
|
|
4
|
+
EXTERNAL: 'external',
|
|
5
|
+
A2A: 'a2a',
|
|
6
|
+
};
|
|
7
|
+
export const AgentStatus = {
|
|
8
|
+
ACTIVE: 'active',
|
|
9
|
+
DRAFT: 'draft',
|
|
10
|
+
INACTIVE: 'inactive',
|
|
11
|
+
};
|
|
12
|
+
export const AgentFeedbackStatus = {
|
|
13
|
+
UNPROCESSED: 'unprocessed',
|
|
14
|
+
REVIEWED: 'reviewed',
|
|
15
|
+
ANNOTATED: 'annotated',
|
|
16
|
+
};
|
|
17
|
+
export const AgentFeedbackType = {
|
|
18
|
+
OPERATOR_EVALUATION_ADDED: 'operator_evaluation_added',
|
|
19
|
+
USER_CONVERSATION_FEEDBACK: 'user_conversation_feedback',
|
|
20
|
+
USER_MESSAGE_EVALUATION: 'user_message_evaluation',
|
|
21
|
+
};
|
|
22
|
+
export const AgentFeedbackEvaluation = {
|
|
23
|
+
POSITIVE: 'positive',
|
|
24
|
+
NEGATIVE: 'negative',
|
|
25
|
+
};
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
import { ISODate } from './shared';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
status: 'backlog' | 'todo' | 'doing' | 'blocked' | 'done';
|
|
11
|
-
column_key: string;
|
|
12
|
-
created_at?: ISODate;
|
|
13
|
-
updated_at?: ISODate;
|
|
14
|
-
priority: string;
|
|
15
|
-
result?: string;
|
|
16
|
-
member_ids: string[];
|
|
17
|
-
metadata?: Record<string, unknown>;
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
parts?: Part[];
|
|
20
|
-
}
|
|
21
|
-
export type Part = {
|
|
2
|
+
export declare const CardStatus: {
|
|
3
|
+
readonly BACKLOG: "backlog";
|
|
4
|
+
readonly TODO: "todo";
|
|
5
|
+
readonly DOING: "doing";
|
|
6
|
+
readonly BLOCKED: "blocked";
|
|
7
|
+
readonly DONE: "done";
|
|
8
|
+
};
|
|
9
|
+
export type CardPart = {
|
|
22
10
|
type: 'text';
|
|
23
11
|
text: {
|
|
24
12
|
content: string;
|
|
@@ -31,20 +19,22 @@ export type Part = {
|
|
|
31
19
|
uri: string;
|
|
32
20
|
};
|
|
33
21
|
};
|
|
34
|
-
export interface
|
|
22
|
+
export interface Card {
|
|
23
|
+
id: string;
|
|
35
24
|
team_id: string;
|
|
36
25
|
board_id: string;
|
|
37
26
|
owner_id: string;
|
|
38
27
|
agent_id: string;
|
|
39
28
|
title: string;
|
|
40
29
|
description?: string;
|
|
41
|
-
status:
|
|
30
|
+
status: (typeof CardStatus)[keyof typeof CardStatus];
|
|
42
31
|
column_key: string;
|
|
43
32
|
priority: string;
|
|
33
|
+
result?: string;
|
|
44
34
|
member_ids: string[];
|
|
45
|
-
parts?: Part[];
|
|
46
35
|
metadata?: Record<string, unknown>;
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
parts?: CardPart[];
|
|
38
|
+
created_at: ISODate;
|
|
39
|
+
updated_at?: ISODate;
|
|
47
40
|
}
|
|
48
|
-
export type UpdateCardInput = Partial<Omit<CreateCardInput, 'team_id' | 'board_id' | 'owner_id'>> & {
|
|
49
|
-
status?: Card['status'];
|
|
50
|
-
};
|
|
@@ -1 +1,26 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const CardStatus = {
|
|
2
|
+
BACKLOG: 'backlog',
|
|
3
|
+
TODO: 'todo',
|
|
4
|
+
DOING: 'doing',
|
|
5
|
+
BLOCKED: 'blocked',
|
|
6
|
+
DONE: 'done',
|
|
7
|
+
};
|
|
8
|
+
// export interface CreateCardInput {
|
|
9
|
+
// team_id: string;
|
|
10
|
+
// board_id: string;
|
|
11
|
+
// owner_id: string;
|
|
12
|
+
// agent_id: string;
|
|
13
|
+
// title: string;
|
|
14
|
+
// description?: string;
|
|
15
|
+
// status: Card['status'];
|
|
16
|
+
// column_key: string;
|
|
17
|
+
// priority: string;
|
|
18
|
+
// member_ids: string[];
|
|
19
|
+
// parts?: CardPart[];
|
|
20
|
+
// metadata?: Record<string, unknown>;
|
|
21
|
+
// }
|
|
22
|
+
// export type UpdateCardInput = Partial<
|
|
23
|
+
// Omit<CreateCardInput, 'team_id' | 'board_id' | 'owner_id'>
|
|
24
|
+
// > & {
|
|
25
|
+
// status?: Card['status'];
|
|
26
|
+
// };
|
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
import { ISODate } from './shared';
|
|
2
|
+
export declare const ExternalChannelType: {
|
|
3
|
+
readonly EMAIL: "email";
|
|
4
|
+
readonly FORM: "form";
|
|
5
|
+
readonly CALL: "call";
|
|
6
|
+
readonly SMS: "sms";
|
|
7
|
+
readonly CHATBOT: "chatbot";
|
|
8
|
+
};
|
|
9
|
+
export declare const ExternalChannelStatus: {
|
|
10
|
+
readonly ACTIVE: "active";
|
|
11
|
+
readonly INACTIVE: "inactive";
|
|
12
|
+
};
|
|
13
|
+
export declare const ExternalChannelPriority: {
|
|
14
|
+
readonly LOW: "low";
|
|
15
|
+
readonly MEDIUM: "medium";
|
|
16
|
+
readonly HIGH: "high";
|
|
17
|
+
};
|
|
2
18
|
export interface ExternalChannel {
|
|
3
19
|
id: string;
|
|
20
|
+
type: (typeof ExternalChannelType)[keyof typeof ExternalChannelType];
|
|
4
21
|
name: string;
|
|
5
|
-
|
|
6
|
-
team_id: string;
|
|
7
|
-
board_id: string;
|
|
22
|
+
description?: string;
|
|
8
23
|
agent_id: string;
|
|
9
|
-
|
|
10
|
-
|
|
24
|
+
board_id: string;
|
|
25
|
+
team_id: string;
|
|
26
|
+
initial_column_key: string;
|
|
27
|
+
status: (typeof ExternalChannelStatus)[keyof typeof ExternalChannelStatus];
|
|
28
|
+
priority: (typeof ExternalChannelPriority)[keyof typeof ExternalChannelPriority];
|
|
29
|
+
metadata?: Record<string, unknown>;
|
|
30
|
+
created_at: ISODate;
|
|
11
31
|
updated_at?: ISODate;
|
|
12
32
|
}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const ExternalChannelType = {
|
|
2
|
+
EMAIL: 'email',
|
|
3
|
+
FORM: 'form',
|
|
4
|
+
CALL: 'call',
|
|
5
|
+
SMS: 'sms',
|
|
6
|
+
CHATBOT: 'chatbot',
|
|
7
|
+
};
|
|
8
|
+
export const ExternalChannelStatus = {
|
|
9
|
+
ACTIVE: 'active',
|
|
10
|
+
INACTIVE: 'inactive',
|
|
11
|
+
};
|
|
12
|
+
export const ExternalChannelPriority = {
|
|
13
|
+
LOW: 'low',
|
|
14
|
+
MEDIUM: 'medium',
|
|
15
|
+
HIGH: 'high',
|
|
16
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from './shared';
|
|
2
|
-
export * from './card';
|
|
3
1
|
export * from './activities';
|
|
4
2
|
export * from './agent';
|
|
5
|
-
export * from './team';
|
|
6
3
|
export * from './board';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './benchmark';
|
|
4
|
+
export * from './card';
|
|
9
5
|
export * from './external-channel';
|
|
6
|
+
export * from './resource';
|
|
7
|
+
export * from './shared';
|
|
8
|
+
export * from './team';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from './shared';
|
|
2
|
-
export * from './card';
|
|
3
1
|
export * from './activities';
|
|
4
2
|
export * from './agent';
|
|
5
|
-
export * from './team';
|
|
6
3
|
export * from './board';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './benchmark';
|
|
4
|
+
export * from './card';
|
|
9
5
|
export * from './external-channel';
|
|
6
|
+
export * from './resource';
|
|
7
|
+
export * from './shared';
|
|
8
|
+
export * from './team';
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { ISODate } from './shared';
|
|
2
|
+
export declare const ResourceStatus: {
|
|
3
|
+
readonly DRAFT: "draft";
|
|
4
|
+
readonly INDEXING: "indexing";
|
|
5
|
+
readonly INDEXING_ERROR: "indexing_error";
|
|
6
|
+
readonly PUBLISHED: "published";
|
|
7
|
+
readonly ARCHIVED: "archived";
|
|
8
|
+
};
|
|
2
9
|
export interface Resource {
|
|
3
10
|
id: string;
|
|
4
|
-
|
|
5
|
-
description
|
|
6
|
-
version
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
version: number;
|
|
14
|
+
status: (typeof ResourceStatus)[keyof typeof ResourceStatus];
|
|
15
|
+
team_id: string;
|
|
16
|
+
created_by: string;
|
|
17
|
+
last_edited_by: string;
|
|
18
|
+
published_at: ISODate;
|
|
19
|
+
last_edited_at: ISODate;
|
|
20
|
+
draft_content: string;
|
|
21
|
+
published_content: string;
|
|
22
|
+
vector_db_index_name?: string;
|
|
23
|
+
created_at: ISODate;
|
|
24
|
+
updated_at: ISODate;
|
|
16
25
|
}
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
export interface PaginationMeta {
|
|
5
5
|
/** Number of items per page */
|
|
6
6
|
limit: number;
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/** Cursor for
|
|
10
|
-
next_cursor
|
|
11
|
-
/** Cursor for the previous page */
|
|
12
|
-
previous_cursor?: string;
|
|
7
|
+
/** Cursor for previous page, null if no previous page */
|
|
8
|
+
prev_cursor: string | null;
|
|
9
|
+
/** Cursor for next page, null if no next page */
|
|
10
|
+
next_cursor: string | null;
|
|
13
11
|
}
|
|
14
12
|
/**
|
|
15
13
|
* API meta information returned with each response
|
|
@@ -43,22 +41,24 @@ export interface ErrorEnvelope {
|
|
|
43
41
|
meta: ResponseMeta;
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
|
-
* Generic paginated response format
|
|
44
|
+
* Generic paginated response format
|
|
47
45
|
*/
|
|
48
46
|
export interface Paginated<T> {
|
|
49
47
|
/** Array of items in the current page */
|
|
50
48
|
data: T[];
|
|
51
49
|
/** Pagination metadata */
|
|
52
|
-
|
|
50
|
+
pagination: PaginationMeta;
|
|
53
51
|
}
|
|
54
52
|
/**
|
|
55
53
|
* Parameters for list operations
|
|
56
54
|
*/
|
|
57
55
|
export interface ListParams {
|
|
58
|
-
/** Cursor for pagination (from previous/next response) */
|
|
59
|
-
cursor?: string;
|
|
60
56
|
/** Number of items per page (default: 50, max: 100) */
|
|
61
57
|
limit?: number;
|
|
58
|
+
/** Cursor to navigate backwards (get items before this cursor) */
|
|
59
|
+
before?: string;
|
|
60
|
+
/** Cursor to navigate forwards (get items after this cursor) */
|
|
61
|
+
after?: string;
|
|
62
62
|
/**
|
|
63
63
|
* Fields to sort by. Use - prefix for descending order.
|
|
64
64
|
* Example: ['-created_at', 'name'] sorts by created_at desc, then name asc
|
package/package.json
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaiban/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Official TypeScript SDK for the Kaiban API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"kaiban",
|
|
7
|
+
"sdk",
|
|
8
|
+
"api",
|
|
9
|
+
"client",
|
|
10
|
+
"typescript",
|
|
11
|
+
"agents",
|
|
12
|
+
"ai",
|
|
13
|
+
"workflow",
|
|
14
|
+
"cards",
|
|
15
|
+
"boards"
|
|
16
|
+
],
|
|
17
|
+
"author": "Kaiban",
|
|
18
|
+
"homepage": "https://github.com/kaiban-ai/kaiban-sdk#readme",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/kaiban-ai/kaiban-sdk.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/kaiban-ai/kaiban-sdk/issues"
|
|
25
|
+
},
|
|
5
26
|
"license": "MIT",
|
|
6
27
|
"type": "module",
|
|
7
28
|
"main": "dist/index.js",
|
|
@@ -27,17 +48,22 @@
|
|
|
27
48
|
"clean": "rimraf dist",
|
|
28
49
|
"prepare": "npm run build",
|
|
29
50
|
"dev": "npm run lint && npm run format && tsc -w -p tsconfig.json",
|
|
30
|
-
"lint": "
|
|
31
|
-
"lint:fix": "
|
|
32
|
-
"format": "
|
|
33
|
-
"format:check": "
|
|
51
|
+
"lint": "eslint .",
|
|
52
|
+
"lint:fix": "eslint . --fix",
|
|
53
|
+
"format": "prettier --write .",
|
|
54
|
+
"format:check": "prettier --check .",
|
|
34
55
|
"refresh": "rm -rf node_modules package-lock.json && npm install",
|
|
35
56
|
"test": "vitest run",
|
|
36
57
|
"test:watch": "vitest",
|
|
37
58
|
"docs:generate": "typedoc",
|
|
38
59
|
"docs:clean": "rimraf docs",
|
|
39
60
|
"docs:build": "npm run docs:clean && npm run docs:generate",
|
|
40
|
-
"docs:serve": "npm run docs:generate && npx serve docs"
|
|
61
|
+
"docs:serve": "npm run docs:generate && npx serve docs",
|
|
62
|
+
"prepublishOnly": "npm run clean && npm run build && npm test",
|
|
63
|
+
"publish:dry": "npm publish --dry-run",
|
|
64
|
+
"version:patch": "npm version patch",
|
|
65
|
+
"version:minor": "npm version minor",
|
|
66
|
+
"version:major": "npm version major"
|
|
41
67
|
},
|
|
42
68
|
"devDependencies": {
|
|
43
69
|
"@eslint/js": "^9.12.0",
|
|
@@ -46,6 +72,7 @@
|
|
|
46
72
|
"eslint-config-prettier": "^9.1.0",
|
|
47
73
|
"prettier": "^3.3.3",
|
|
48
74
|
"rimraf": "^6.0.1",
|
|
75
|
+
"tsx": "^4.20.6",
|
|
49
76
|
"typedoc": "^0.28.14",
|
|
50
77
|
"typescript": "^5.4.0",
|
|
51
78
|
"typescript-eslint": "^8.8.0",
|