exponential-sdk 1.0.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.
@@ -0,0 +1,256 @@
1
+ import { TRPCClientError } from '@trpc/client';
2
+ export { TRPCClientError } from '@trpc/client';
3
+
4
+ type ActionInput = {
5
+ assigneeId?: string;
6
+ };
7
+ type KanbanInput = {
8
+ projectId?: string;
9
+ assigneeId?: string;
10
+ kanbanStatus?: 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';
11
+ };
12
+ type TodayInput = {
13
+ workspaceId?: string;
14
+ };
15
+ type DateRangeInput = {
16
+ startDate: Date;
17
+ endDate: Date;
18
+ workspaceId?: string;
19
+ };
20
+ type ProjectInput = {
21
+ include?: {
22
+ actions?: boolean;
23
+ };
24
+ workspaceId?: string;
25
+ };
26
+ interface TrpcClient {
27
+ action: {
28
+ getAll: {
29
+ query: (input?: ActionInput) => Promise<unknown[]>;
30
+ };
31
+ getKanbanActions: {
32
+ query: (input?: KanbanInput) => Promise<unknown[]>;
33
+ };
34
+ getToday: {
35
+ query: (input?: TodayInput) => Promise<unknown[]>;
36
+ };
37
+ getByDateRange: {
38
+ query: (input: DateRangeInput) => Promise<unknown[]>;
39
+ };
40
+ getProjectActions: {
41
+ query: (input: {
42
+ projectId: string;
43
+ assigneeId?: string;
44
+ }) => Promise<unknown[]>;
45
+ };
46
+ };
47
+ project: {
48
+ getAll: {
49
+ query: (input?: ProjectInput) => Promise<unknown[]>;
50
+ };
51
+ };
52
+ workspace: {
53
+ list: {
54
+ query: () => Promise<unknown[]>;
55
+ };
56
+ };
57
+ }
58
+ declare function isTRPCError(error: unknown): error is TRPCClientError<any>;
59
+
60
+ type KanbanStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';
61
+ type Priority = 'Quick' | 'Scheduled' | '1st Priority' | '2nd Priority' | '3rd Priority' | '4th Priority' | '5th Priority' | 'Errand' | 'Remember' | 'Watch' | 'Someday Maybe';
62
+ interface Action {
63
+ id: string;
64
+ name: string;
65
+ description: string | null;
66
+ status: string;
67
+ priority: string;
68
+ projectId: string | null;
69
+ workspaceId: string | null;
70
+ kanbanStatus: KanbanStatus | null;
71
+ kanbanOrder: number | null;
72
+ dueDate: Date | null;
73
+ scheduledStart: Date | null;
74
+ scheduledEnd: Date | null;
75
+ duration: number | null;
76
+ completedAt: Date | null;
77
+ createdAt: Date;
78
+ updatedAt: Date;
79
+ source: string;
80
+ project?: {
81
+ id: string;
82
+ name: string;
83
+ } | null;
84
+ workspace?: {
85
+ id: string;
86
+ slug: string;
87
+ name: string;
88
+ } | null;
89
+ assignees?: Array<{
90
+ user: {
91
+ id: string;
92
+ name: string | null;
93
+ email: string | null;
94
+ };
95
+ }>;
96
+ }
97
+ interface ActionOutput {
98
+ id: string;
99
+ name: string;
100
+ description: string | null;
101
+ status: string;
102
+ priority: string;
103
+ kanbanStatus: string | null;
104
+ dueDate: string | null;
105
+ scheduledStart: string | null;
106
+ scheduledEnd: string | null;
107
+ project: {
108
+ id: string;
109
+ name: string;
110
+ } | null;
111
+ workspace: {
112
+ id: string;
113
+ slug: string;
114
+ name: string;
115
+ } | null;
116
+ assignees: Array<{
117
+ id: string;
118
+ name: string | null;
119
+ email: string | null;
120
+ }>;
121
+ createdAt: string;
122
+ completedAt: string | null;
123
+ }
124
+ interface ActionsListOutput {
125
+ actions: ActionOutput[];
126
+ total: number;
127
+ filters: {
128
+ status?: string;
129
+ projectId?: string;
130
+ workspaceId?: string;
131
+ kanbanStatus?: string;
132
+ };
133
+ }
134
+
135
+ interface ActionsListOptions {
136
+ projectId?: string;
137
+ status?: KanbanStatus;
138
+ assigneeId?: string;
139
+ }
140
+ interface ActionsKanbanOptions {
141
+ projectId?: string;
142
+ status?: KanbanStatus;
143
+ assigneeId?: string;
144
+ }
145
+ declare class ActionsApi {
146
+ private client;
147
+ constructor(client: TrpcClient);
148
+ list(options?: ActionsListOptions): Promise<Action[]>;
149
+ getToday(workspaceId?: string): Promise<Action[]>;
150
+ getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]>;
151
+ getKanban(options?: ActionsKanbanOptions): Promise<Action[]>;
152
+ getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]>;
153
+ }
154
+
155
+ interface Project {
156
+ id: string;
157
+ name: string;
158
+ description: string | null;
159
+ status: string | null;
160
+ priority: string | null;
161
+ workspaceId: string | null;
162
+ createdAt: Date;
163
+ updatedAt: Date;
164
+ workspace?: {
165
+ id: string;
166
+ slug: string;
167
+ name: string;
168
+ } | null;
169
+ }
170
+ interface ProjectOutput {
171
+ id: string;
172
+ name: string;
173
+ description: string | null;
174
+ status: string | null;
175
+ priority: string | null;
176
+ workspace: {
177
+ id: string;
178
+ slug: string;
179
+ name: string;
180
+ } | null;
181
+ }
182
+ interface ProjectsListOutput {
183
+ projects: ProjectOutput[];
184
+ total: number;
185
+ }
186
+
187
+ interface ProjectsListOptions {
188
+ workspaceId?: string;
189
+ includeActions?: boolean;
190
+ }
191
+ declare class ProjectsApi {
192
+ private client;
193
+ constructor(client: TrpcClient);
194
+ list(options?: ProjectsListOptions): Promise<Project[]>;
195
+ }
196
+
197
+ interface Workspace {
198
+ id: string;
199
+ name: string;
200
+ slug: string;
201
+ type: string;
202
+ createdAt: Date;
203
+ updatedAt: Date;
204
+ }
205
+ interface WorkspaceOutput {
206
+ id: string;
207
+ name: string;
208
+ slug: string;
209
+ type: string;
210
+ }
211
+ interface WorkspacesListOutput {
212
+ workspaces: WorkspaceOutput[];
213
+ total: number;
214
+ }
215
+
216
+ declare class WorkspacesApi {
217
+ private client;
218
+ constructor(client: TrpcClient);
219
+ list(): Promise<Workspace[]>;
220
+ }
221
+
222
+ interface ExponentialConfig {
223
+ apiUrl: string;
224
+ token: string;
225
+ tokenExpiry?: string;
226
+ defaultWorkspaceId?: string;
227
+ defaultWorkspaceSlug?: string;
228
+ }
229
+ declare function createConfigStore(options?: {
230
+ projectName?: string;
231
+ }): {
232
+ loadConfig: () => ExponentialConfig;
233
+ saveConfig: (values: Partial<ExponentialConfig>) => void;
234
+ clearConfig: () => void;
235
+ isAuthenticated: () => boolean;
236
+ getConfigPath: () => string;
237
+ };
238
+ declare function loadConfig(): ExponentialConfig;
239
+ declare function saveConfig(values: Partial<ExponentialConfig>): void;
240
+ declare function clearConfig(): void;
241
+ declare function isAuthenticated(): boolean;
242
+ declare function getConfigPath(): string;
243
+
244
+ declare class ExponentialClient {
245
+ private config;
246
+ private client;
247
+ actions: ActionsApi;
248
+ projects: ProjectsApi;
249
+ workspaces: WorkspacesApi;
250
+ constructor(config: {
251
+ token: string;
252
+ apiUrl: string;
253
+ });
254
+ }
255
+
256
+ export { type Action, type ActionOutput, type ActionsListOutput, ExponentialClient, type ExponentialConfig, type KanbanStatus, type Priority, type Project, type ProjectOutput, type ProjectsListOutput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
package/dist/index.js ADDED
@@ -0,0 +1,208 @@
1
+ // src/client.ts
2
+ import { createTRPCClient, httpBatchLink, TRPCClientError } from "@trpc/client";
3
+ import superjson from "superjson";
4
+ function createClient(config) {
5
+ const apiUrl = config.apiUrl.replace(/\/+$/, "");
6
+ return createTRPCClient({
7
+ links: [
8
+ httpBatchLink({
9
+ url: `${apiUrl}/api/trpc`,
10
+ headers() {
11
+ return {
12
+ Authorization: `Bearer ${config.token}`
13
+ };
14
+ },
15
+ transformer: superjson
16
+ })
17
+ ]
18
+ });
19
+ }
20
+ function isTRPCError(error) {
21
+ return error instanceof TRPCClientError;
22
+ }
23
+
24
+ // src/actions.ts
25
+ var ActionsApi = class {
26
+ constructor(client) {
27
+ this.client = client;
28
+ }
29
+ async list(options = {}) {
30
+ const { projectId, status, assigneeId } = options;
31
+ let actions;
32
+ if (projectId) {
33
+ actions = await this.client.action.getProjectActions.query({
34
+ projectId,
35
+ assigneeId
36
+ });
37
+ } else if (status) {
38
+ actions = await this.client.action.getKanbanActions.query({
39
+ kanbanStatus: status,
40
+ assigneeId
41
+ });
42
+ } else {
43
+ actions = await this.client.action.getAll.query({
44
+ assigneeId
45
+ });
46
+ }
47
+ if (!status) {
48
+ actions = actions.filter(
49
+ (action) => action.status !== "COMPLETED" && action.status !== "CANCELLED" && action.kanbanStatus !== "DONE" && action.kanbanStatus !== "CANCELLED"
50
+ );
51
+ }
52
+ return actions;
53
+ }
54
+ async getToday(workspaceId) {
55
+ return await this.client.action.getToday.query({
56
+ workspaceId
57
+ });
58
+ }
59
+ async getByDateRange(start, end, workspaceId) {
60
+ return await this.client.action.getByDateRange.query({
61
+ startDate: start,
62
+ endDate: end,
63
+ workspaceId
64
+ });
65
+ }
66
+ async getKanban(options = {}) {
67
+ const { projectId, status, assigneeId } = options;
68
+ return await this.client.action.getKanbanActions.query({
69
+ projectId,
70
+ kanbanStatus: status,
71
+ assigneeId
72
+ });
73
+ }
74
+ async getProjectActions(projectId, assigneeId) {
75
+ return await this.client.action.getProjectActions.query({
76
+ projectId,
77
+ assigneeId
78
+ });
79
+ }
80
+ };
81
+
82
+ // src/projects.ts
83
+ var ProjectsApi = class {
84
+ constructor(client) {
85
+ this.client = client;
86
+ }
87
+ async list(options = {}) {
88
+ const { workspaceId, includeActions } = options;
89
+ return await this.client.project.getAll.query({
90
+ workspaceId,
91
+ include: includeActions ? { actions: true } : void 0
92
+ });
93
+ }
94
+ };
95
+
96
+ // src/workspaces.ts
97
+ var WorkspacesApi = class {
98
+ constructor(client) {
99
+ this.client = client;
100
+ }
101
+ async list() {
102
+ return await this.client.workspace.list.query();
103
+ }
104
+ };
105
+
106
+ // src/config.ts
107
+ import Conf from "conf";
108
+ var schema = {
109
+ apiUrl: {
110
+ type: "string",
111
+ default: ""
112
+ },
113
+ token: {
114
+ type: "string",
115
+ default: ""
116
+ },
117
+ tokenExpiry: {
118
+ type: "string",
119
+ default: ""
120
+ },
121
+ defaultWorkspaceId: {
122
+ type: "string",
123
+ default: ""
124
+ },
125
+ defaultWorkspaceSlug: {
126
+ type: "string",
127
+ default: ""
128
+ }
129
+ };
130
+ function createStore(projectName) {
131
+ return new Conf({
132
+ projectName,
133
+ schema
134
+ });
135
+ }
136
+ function readConfig(store) {
137
+ return {
138
+ apiUrl: store.get("apiUrl"),
139
+ token: store.get("token"),
140
+ tokenExpiry: store.get("tokenExpiry"),
141
+ defaultWorkspaceId: store.get("defaultWorkspaceId"),
142
+ defaultWorkspaceSlug: store.get("defaultWorkspaceSlug")
143
+ };
144
+ }
145
+ function writeConfig(store, values) {
146
+ if (values.apiUrl !== void 0) store.set("apiUrl", values.apiUrl);
147
+ if (values.token !== void 0) store.set("token", values.token);
148
+ if (values.tokenExpiry !== void 0) store.set("tokenExpiry", values.tokenExpiry);
149
+ if (values.defaultWorkspaceId !== void 0) store.set("defaultWorkspaceId", values.defaultWorkspaceId);
150
+ if (values.defaultWorkspaceSlug !== void 0) store.set("defaultWorkspaceSlug", values.defaultWorkspaceSlug);
151
+ }
152
+ var defaultStore = createStore("exponential-sdk");
153
+ function createConfigStore(options) {
154
+ const store = createStore(options?.projectName ?? "exponential-sdk");
155
+ return {
156
+ loadConfig: () => readConfig(store),
157
+ saveConfig: (values) => writeConfig(store, values),
158
+ clearConfig: () => store.clear(),
159
+ isAuthenticated: () => {
160
+ const cfg = readConfig(store);
161
+ return Boolean(cfg.token && cfg.apiUrl);
162
+ },
163
+ getConfigPath: () => store.path
164
+ };
165
+ }
166
+ function loadConfig() {
167
+ return readConfig(defaultStore);
168
+ }
169
+ function saveConfig(values) {
170
+ writeConfig(defaultStore, values);
171
+ }
172
+ function clearConfig() {
173
+ defaultStore.clear();
174
+ }
175
+ function isAuthenticated() {
176
+ const cfg = readConfig(defaultStore);
177
+ return Boolean(cfg.token && cfg.apiUrl);
178
+ }
179
+ function getConfigPath() {
180
+ return defaultStore.path;
181
+ }
182
+
183
+ // src/index.ts
184
+ var ExponentialClient = class {
185
+ constructor(config) {
186
+ this.config = config;
187
+ this.client = createClient(this.config);
188
+ this.actions = new ActionsApi(this.client);
189
+ this.projects = new ProjectsApi(this.client);
190
+ this.workspaces = new WorkspacesApi(this.client);
191
+ }
192
+ client;
193
+ actions;
194
+ projects;
195
+ workspaces;
196
+ };
197
+ export {
198
+ ExponentialClient,
199
+ TRPCClientError,
200
+ clearConfig,
201
+ createConfigStore,
202
+ getConfigPath,
203
+ isAuthenticated,
204
+ isTRPCError,
205
+ loadConfig,
206
+ saveConfig
207
+ };
208
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/projects.ts","../src/workspaces.ts","../src/config.ts","../src/index.ts"],"sourcesContent":["import { createTRPCClient, httpBatchLink, TRPCClientError } from '@trpc/client';\nimport superjson from 'superjson';\n\ntype ActionInput = {\n assigneeId?: string;\n};\n\ntype KanbanInput = {\n projectId?: string;\n assigneeId?: string;\n kanbanStatus?: 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';\n};\n\ntype TodayInput = {\n workspaceId?: string;\n};\n\ntype DateRangeInput = {\n startDate: Date;\n endDate: Date;\n workspaceId?: string;\n};\n\ntype ProjectInput = {\n include?: {\n actions?: boolean;\n };\n workspaceId?: string;\n};\n\nexport interface TrpcClient {\n action: {\n getAll: { query: (input?: ActionInput) => Promise<unknown[]> };\n getKanbanActions: { query: (input?: KanbanInput) => Promise<unknown[]> };\n getToday: { query: (input?: TodayInput) => Promise<unknown[]> };\n getByDateRange: { query: (input: DateRangeInput) => Promise<unknown[]> };\n getProjectActions: { query: (input: { projectId: string; assigneeId?: string }) => Promise<unknown[]> };\n };\n project: {\n getAll: { query: (input?: ProjectInput) => Promise<unknown[]> };\n };\n workspace: {\n list: { query: () => Promise<unknown[]> };\n };\n}\n\nexport function createClient(config: { token: string; apiUrl: string }): TrpcClient {\n const apiUrl = config.apiUrl.replace(/\\/+$/, '');\n\n return createTRPCClient<any>({\n links: [\n httpBatchLink({\n url: `${apiUrl}/api/trpc`,\n headers() {\n return {\n Authorization: `Bearer ${config.token}`,\n };\n },\n transformer: superjson,\n }),\n ],\n }) as unknown as TrpcClient;\n}\n\nexport function isTRPCError(error: unknown): error is TRPCClientError<any> {\n return error instanceof TRPCClientError;\n}\n\nexport { TRPCClientError };\n","import type { TrpcClient } from './client.js';\nimport type { Action, KanbanStatus } from './types/action.js';\n\nexport interface ActionsListOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport interface ActionsKanbanOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport class ActionsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ActionsListOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n let actions: Action[];\n\n if (projectId) {\n actions = await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n } else if (status) {\n actions = await this.client.action.getKanbanActions.query({\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n } else {\n actions = await this.client.action.getAll.query({\n assigneeId,\n }) as Action[];\n }\n\n // Match CLI behavior: hide completed/cancelled unless status specified\n if (!status) {\n actions = actions.filter(action =>\n action.status !== 'COMPLETED' &&\n action.status !== 'CANCELLED' &&\n action.kanbanStatus !== 'DONE' &&\n action.kanbanStatus !== 'CANCELLED'\n );\n }\n\n return actions;\n }\n\n async getToday(workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getToday.query({\n workspaceId,\n }) as Action[];\n }\n\n async getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getByDateRange.query({\n startDate: start,\n endDate: end,\n workspaceId,\n }) as Action[];\n }\n\n async getKanban(options: ActionsKanbanOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n\n return await this.client.action.getKanbanActions.query({\n projectId,\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n }\n\n async getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]> {\n return await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Project } from './types/project.js';\n\nexport interface ProjectsListOptions {\n workspaceId?: string;\n includeActions?: boolean;\n}\n\nexport class ProjectsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ProjectsListOptions = {}): Promise<Project[]> {\n const { workspaceId, includeActions } = options;\n\n return await this.client.project.getAll.query({\n workspaceId,\n include: includeActions ? { actions: true } : undefined,\n }) as Project[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Workspace } from './types/workspace.js';\n\nexport class WorkspacesApi {\n constructor(private client: TrpcClient) {}\n\n async list(): Promise<Workspace[]> {\n return await this.client.workspace.list.query() as Workspace[];\n }\n}\n","import Conf from 'conf';\n\nexport interface ExponentialConfig {\n apiUrl: string;\n token: string;\n tokenExpiry?: string;\n defaultWorkspaceId?: string;\n defaultWorkspaceSlug?: string;\n}\n\nconst schema = {\n apiUrl: {\n type: 'string' as const,\n default: '',\n },\n token: {\n type: 'string' as const,\n default: '',\n },\n tokenExpiry: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceId: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceSlug: {\n type: 'string' as const,\n default: '',\n },\n};\n\nfunction createStore(projectName: string) {\n return new Conf<ExponentialConfig>({\n projectName,\n schema,\n });\n}\n\nfunction readConfig(store: Conf<ExponentialConfig>): ExponentialConfig {\n return {\n apiUrl: store.get('apiUrl'),\n token: store.get('token'),\n tokenExpiry: store.get('tokenExpiry'),\n defaultWorkspaceId: store.get('defaultWorkspaceId'),\n defaultWorkspaceSlug: store.get('defaultWorkspaceSlug'),\n };\n}\n\nfunction writeConfig(store: Conf<ExponentialConfig>, values: Partial<ExponentialConfig>): void {\n if (values.apiUrl !== undefined) store.set('apiUrl', values.apiUrl);\n if (values.token !== undefined) store.set('token', values.token);\n if (values.tokenExpiry !== undefined) store.set('tokenExpiry', values.tokenExpiry);\n if (values.defaultWorkspaceId !== undefined) store.set('defaultWorkspaceId', values.defaultWorkspaceId);\n if (values.defaultWorkspaceSlug !== undefined) store.set('defaultWorkspaceSlug', values.defaultWorkspaceSlug);\n}\n\nconst defaultStore = createStore('exponential-sdk');\n\nexport function createConfigStore(options?: { projectName?: string }) {\n const store = createStore(options?.projectName ?? 'exponential-sdk');\n\n return {\n loadConfig: () => readConfig(store),\n saveConfig: (values: Partial<ExponentialConfig>) => writeConfig(store, values),\n clearConfig: () => store.clear(),\n isAuthenticated: () => {\n const cfg = readConfig(store);\n return Boolean(cfg.token && cfg.apiUrl);\n },\n getConfigPath: () => store.path,\n };\n}\n\nexport function loadConfig(): ExponentialConfig {\n return readConfig(defaultStore);\n}\n\nexport function saveConfig(values: Partial<ExponentialConfig>): void {\n writeConfig(defaultStore, values);\n}\n\nexport function clearConfig(): void {\n defaultStore.clear();\n}\n\nexport function isAuthenticated(): boolean {\n const cfg = readConfig(defaultStore);\n return Boolean(cfg.token && cfg.apiUrl);\n}\n\nexport function getConfigPath(): string {\n return defaultStore.path;\n}\n","import { createClient, isTRPCError, TRPCClientError, type TrpcClient } from './client.js';\nimport { ActionsApi } from './actions.js';\nimport { ProjectsApi } from './projects.js';\nimport { WorkspacesApi } from './workspaces.js';\n\nexport class ExponentialClient {\n private client: TrpcClient;\n actions: ActionsApi;\n projects: ProjectsApi;\n workspaces: WorkspacesApi;\n\n constructor(private config: { token: string; apiUrl: string }) {\n this.client = createClient(this.config);\n this.actions = new ActionsApi(this.client);\n this.projects = new ProjectsApi(this.client);\n this.workspaces = new WorkspacesApi(this.client);\n }\n}\n\nexport {\n createConfigStore,\n loadConfig,\n saveConfig,\n clearConfig,\n isAuthenticated,\n getConfigPath,\n} from './config.js';\n\nexport type { ExponentialConfig } from './config.js';\nexport type {\n Action,\n ActionOutput,\n ActionsListOutput,\n KanbanStatus,\n Priority,\n} from './types/action.js';\nexport type { Project, ProjectOutput, ProjectsListOutput } from './types/project.js';\nexport type { Workspace, WorkspaceOutput, WorkspacesListOutput } from './types/workspace.js';\nexport { isTRPCError, TRPCClientError };\n"],"mappings":";AAAA,SAAS,kBAAkB,eAAe,uBAAuB;AACjE,OAAO,eAAe;AA6Cf,SAAS,aAAa,QAAuD;AAClF,QAAM,SAAS,OAAO,OAAO,QAAQ,QAAQ,EAAE;AAE/C,SAAO,iBAAsB;AAAA,IAC3B,OAAO;AAAA,MACL,cAAc;AAAA,QACZ,KAAK,GAAG,MAAM;AAAA,QACd,UAAU;AACR,iBAAO;AAAA,YACL,eAAe,UAAU,OAAO,KAAK;AAAA,UACvC;AAAA,QACF;AAAA,QACA,aAAa;AAAA,MACf,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;AAEO,SAAS,YAAY,OAA+C;AACzE,SAAO,iBAAiB;AAC1B;;;ACnDO,IAAM,aAAN,MAAiB;AAAA,EACtB,YAAoB,QAAoB;AAApB;AAAA,EAAqB;AAAA,EAEzC,MAAM,KAAK,UAA8B,CAAC,GAAsB;AAC9D,UAAM,EAAE,WAAW,QAAQ,WAAW,IAAI;AAC1C,QAAI;AAEJ,QAAI,WAAW;AACb,gBAAU,MAAM,KAAK,OAAO,OAAO,kBAAkB,MAAM;AAAA,QACzD;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,WAAW,QAAQ;AACjB,gBAAU,MAAM,KAAK,OAAO,OAAO,iBAAiB,MAAM;AAAA,QACxD,cAAc;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,OAAO;AACL,gBAAU,MAAM,KAAK,OAAO,OAAO,OAAO,MAAM;AAAA,QAC9C;AAAA,MACF,CAAC;AAAA,IACH;AAGA,QAAI,CAAC,QAAQ;AACX,gBAAU,QAAQ;AAAA,QAAO,YACvB,OAAO,WAAW,eAClB,OAAO,WAAW,eAClB,OAAO,iBAAiB,UACxB,OAAO,iBAAiB;AAAA,MAC1B;AAAA,IACF;AAEA,WAA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AAM,WAAW,KAAK;AAC5B,aAAO,QAAQ,IAAI,SAAS,IAAI,MAAM;AAAA,IACxC;AAAA,IACA,eAAe,MAAM,MAAM;AAAA,EAC7B;AACF;AAEO,SAAS,aAAgC;AAC9C,SAAO,WAAW,YAAY;AAChC;AAEO,SAAS,WAAW,QAA0C;AACnE,cAAY,cAAc,MAAM;AAClC;AAEO,SAAS,cAAoB;AAClC,eAAa,MAAM;AACrB;AAEO,SAAS,kBAA2B;AACzC,QAAM,MAAM,WAAW,YAAY;AACnC,SAAO,QAAQ,IAAI,SAAS,IAAI,MAAM;AACxC;AAEO,SAAS,gBAAwB;AACtC,SAAO,aAAa;AACtB;;;ACzFO,IAAM,oBAAN,MAAwB;AAAA,EAM7B,YAAoB,QAA2C;AAA3C;AAClB,SAAK,SAAS,aAAa,KAAK,MAAM;AACtC,SAAK,UAAU,IAAI,WAAW,KAAK,MAAM;AACzC,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,aAAa,IAAI,cAAc,KAAK,MAAM;AAAA,EACjD;AAAA,EAVQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAQF;","names":[]}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "exponential-sdk",
3
+ "version": "1.0.0",
4
+ "description": "SDK for interacting with the Exponential API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsup",
16
+ "dev": "tsup --watch",
17
+ "typecheck": "tsc --noEmit"
18
+ },
19
+ "engines": {
20
+ "node": ">=18.0.0"
21
+ },
22
+ "dependencies": {
23
+ "@trpc/client": "^11.0.0-rc.446",
24
+ "conf": "^13.0.1",
25
+ "superjson": "^2.2.1"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^20.14.10",
29
+ "tsup": "^8.3.5",
30
+ "typescript": "^5.7.2"
31
+ },
32
+ "license": "MIT"
33
+ }