@stack0/sdk 0.2.9 → 0.3.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/README.md +200 -0
- package/dist/cdn/index.d.mts +185 -2
- package/dist/cdn/index.d.ts +185 -2
- package/dist/cdn/index.js +138 -0
- package/dist/cdn/index.js.map +1 -1
- package/dist/cdn/index.mjs +138 -0
- package/dist/cdn/index.mjs.map +1 -1
- package/dist/extraction/index.d.mts +1 -1
- package/dist/extraction/index.d.ts +1 -1
- package/dist/http-client-DjrRWvXA.d.mts +24 -0
- package/dist/http-client-DjrRWvXA.d.ts +24 -0
- package/dist/index.d.mts +534 -3
- package/dist/index.d.ts +534 -3
- package/dist/index.js +449 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +449 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mail/index.d.mts +1 -1
- package/dist/mail/index.d.ts +1 -1
- package/dist/screenshots/index.d.mts +1 -1
- package/dist/screenshots/index.d.ts +1 -1
- package/dist/webdata/index.d.mts +1 -1
- package/dist/webdata/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/http-client-Wr9lXo9_.d.mts +0 -10
- package/dist/http-client-Wr9lXo9_.d.ts +0 -10
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,536 @@
|
|
|
1
1
|
import { Mail } from './mail/index.mjs';
|
|
2
2
|
export { Attachment, EmailAddress, EmailRecipient, GetEmailResponse, SendEmailRequest, SendEmailResponse, Stack0Error } from './mail/index.mjs';
|
|
3
3
|
import { CDN } from './cdn/index.mjs';
|
|
4
|
-
export { Asset, AssetStatus, AssetType, ConfirmUploadRequest, ConfirmUploadResponse, CreateFolderRequest, DeleteAssetRequest, DeleteAssetsRequest, DeleteAssetsResponse, Folder, FolderTreeNode, GetAssetRequest, GetFolderTreeRequest, GetTransformUrlRequest, GetTransformUrlResponse, ListAssetsRequest, ListAssetsResponse, MoveAssetsRequest, MoveAssetsResponse, TransformOptions, UpdateAssetRequest, UploadUrlRequest, UploadUrlResponse } from './cdn/index.mjs';
|
|
4
|
+
export { Asset, AssetStatus, AssetType, ConfirmUploadRequest, ConfirmUploadResponse, CreateFolderRequest, DeleteAssetRequest, DeleteAssetsRequest, DeleteAssetsResponse, ExtractAudioRequest, ExtractAudioResponse, Folder, FolderTreeNode, GetAssetRequest, GetFolderTreeRequest, GetTransformUrlRequest, GetTransformUrlResponse, ListAssetsRequest, ListAssetsResponse, ListJobsRequest, ListJobsResponse, MoveAssetsRequest, MoveAssetsResponse, StreamingUrls, ThumbnailRequest, ThumbnailResponse, TranscodeJob, TranscodeVideoRequest, TranscodingStatus, TransformOptions, TrimOptions, UpdateAssetRequest, UploadUrlRequest, UploadUrlResponse, VideoCodec, VideoOutputFormat, VideoQuality, VideoVariant, WatermarkOptions } from './cdn/index.mjs';
|
|
5
5
|
import { Screenshots } from './screenshots/index.mjs';
|
|
6
6
|
export { BatchScreenshotJob, Clip, CreateBatchScreenshotsRequest, CreateScreenshotRequest, CreateScreenshotResponse, CreateScreenshotScheduleRequest, DeviceType, GetScreenshotRequest, ListScreenshotsRequest, ListScreenshotsResponse, ResourceType, Screenshot, ScreenshotBatchJobsResponse, ScreenshotFormat, ScreenshotSchedule, ScreenshotSchedulesResponse, ScreenshotStatus, UpdateScreenshotScheduleRequest } from './screenshots/index.mjs';
|
|
7
7
|
import { Extraction } from './extraction/index.mjs';
|
|
8
8
|
export { BatchExtractionJob, CreateBatchExtractionsRequest, CreateExtractionRequest, CreateExtractionResponse, CreateExtractionScheduleRequest, ExtractionBatchJobsResponse, ExtractionMode, ExtractionResult, ExtractionSchedule, ExtractionSchedulesResponse, ExtractionStatus, ExtractionUsage, GetExtractionRequest, GetUsageRequest, ListExtractionsRequest, ListExtractionsResponse, PageMetadata, UpdateExtractionScheduleRequest } from './extraction/index.mjs';
|
|
9
9
|
import { Webdata } from './webdata/index.mjs';
|
|
10
|
-
import { H as HttpClientConfig } from './http-client-
|
|
10
|
+
import { H as HttpClient, a as HttpClientConfig } from './http-client-DjrRWvXA.mjs';
|
|
11
11
|
export { B as BatchJobStatus, C as CreateBatchResponse, c as CreateScheduleResponse, E as Environment, G as GetBatchJobRequest, a as GetScheduleRequest, L as ListBatchJobsRequest, b as ListSchedulesRequest, S as ScheduleFrequency } from './shared-types-B0PyC7cF.mjs';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Stack0 Integrations SDK Types
|
|
15
|
+
*/
|
|
16
|
+
interface PaginatedResult<T> {
|
|
17
|
+
data: T[];
|
|
18
|
+
nextCursor?: string;
|
|
19
|
+
hasMore: boolean;
|
|
20
|
+
totalCount?: number;
|
|
21
|
+
}
|
|
22
|
+
interface ListOptions {
|
|
23
|
+
cursor?: string;
|
|
24
|
+
limit?: number;
|
|
25
|
+
sortBy?: string;
|
|
26
|
+
sortOrder?: "asc" | "desc";
|
|
27
|
+
filters?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
type ConnectorCategory = "crm" | "storage" | "communication" | "productivity";
|
|
30
|
+
interface Connector {
|
|
31
|
+
id: string;
|
|
32
|
+
slug: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
category: ConnectorCategory;
|
|
36
|
+
iconUrl?: string;
|
|
37
|
+
websiteUrl?: string;
|
|
38
|
+
isEnabled: boolean;
|
|
39
|
+
}
|
|
40
|
+
interface Connection {
|
|
41
|
+
id: string;
|
|
42
|
+
connectorId: string;
|
|
43
|
+
connectorSlug: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
status: "pending" | "connected" | "error" | "disconnected";
|
|
46
|
+
externalAccountId?: string;
|
|
47
|
+
externalAccountName?: string;
|
|
48
|
+
lastSyncedAt?: Date;
|
|
49
|
+
lastUsedAt?: Date;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
}
|
|
53
|
+
interface Address {
|
|
54
|
+
type?: "work" | "home" | "billing" | "shipping" | "headquarters" | "other";
|
|
55
|
+
street?: string;
|
|
56
|
+
city?: string;
|
|
57
|
+
state?: string;
|
|
58
|
+
postalCode?: string;
|
|
59
|
+
country?: string;
|
|
60
|
+
}
|
|
61
|
+
interface PhoneNumber {
|
|
62
|
+
type?: "work" | "home" | "mobile" | "fax" | "other";
|
|
63
|
+
number: string;
|
|
64
|
+
isPrimary?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface IntegrationEmailAddress {
|
|
67
|
+
type?: "work" | "personal" | "other";
|
|
68
|
+
email: string;
|
|
69
|
+
isPrimary?: boolean;
|
|
70
|
+
}
|
|
71
|
+
interface Contact {
|
|
72
|
+
id: string;
|
|
73
|
+
firstName?: string;
|
|
74
|
+
lastName?: string;
|
|
75
|
+
email?: string;
|
|
76
|
+
emails?: IntegrationEmailAddress[];
|
|
77
|
+
phone?: string;
|
|
78
|
+
phones?: PhoneNumber[];
|
|
79
|
+
title?: string;
|
|
80
|
+
department?: string;
|
|
81
|
+
companyId?: string;
|
|
82
|
+
companyName?: string;
|
|
83
|
+
addresses?: Address[];
|
|
84
|
+
website?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
ownerId?: string;
|
|
87
|
+
customFields?: Record<string, unknown>;
|
|
88
|
+
createdAt?: Date;
|
|
89
|
+
updatedAt?: Date;
|
|
90
|
+
remoteData?: unknown;
|
|
91
|
+
}
|
|
92
|
+
interface CreateContactInput {
|
|
93
|
+
firstName?: string;
|
|
94
|
+
lastName?: string;
|
|
95
|
+
email?: string;
|
|
96
|
+
emails?: IntegrationEmailAddress[];
|
|
97
|
+
phone?: string;
|
|
98
|
+
phones?: PhoneNumber[];
|
|
99
|
+
title?: string;
|
|
100
|
+
department?: string;
|
|
101
|
+
companyId?: string;
|
|
102
|
+
companyName?: string;
|
|
103
|
+
addresses?: Address[];
|
|
104
|
+
website?: string;
|
|
105
|
+
description?: string;
|
|
106
|
+
ownerId?: string;
|
|
107
|
+
customFields?: Record<string, unknown>;
|
|
108
|
+
}
|
|
109
|
+
type UpdateContactInput = Partial<CreateContactInput>;
|
|
110
|
+
interface Company {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
domain?: string;
|
|
114
|
+
website?: string;
|
|
115
|
+
industry?: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
employeeCount?: number;
|
|
118
|
+
annualRevenue?: number;
|
|
119
|
+
phone?: string;
|
|
120
|
+
phones?: PhoneNumber[];
|
|
121
|
+
addresses?: Address[];
|
|
122
|
+
ownerId?: string;
|
|
123
|
+
customFields?: Record<string, unknown>;
|
|
124
|
+
createdAt?: Date;
|
|
125
|
+
updatedAt?: Date;
|
|
126
|
+
remoteData?: unknown;
|
|
127
|
+
}
|
|
128
|
+
interface CreateCompanyInput {
|
|
129
|
+
name: string;
|
|
130
|
+
domain?: string;
|
|
131
|
+
website?: string;
|
|
132
|
+
industry?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
employeeCount?: number;
|
|
135
|
+
annualRevenue?: number;
|
|
136
|
+
phone?: string;
|
|
137
|
+
phones?: PhoneNumber[];
|
|
138
|
+
addresses?: Address[];
|
|
139
|
+
ownerId?: string;
|
|
140
|
+
customFields?: Record<string, unknown>;
|
|
141
|
+
}
|
|
142
|
+
type UpdateCompanyInput = Partial<CreateCompanyInput>;
|
|
143
|
+
interface Deal {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
amount?: number;
|
|
147
|
+
currency?: string;
|
|
148
|
+
stage?: string;
|
|
149
|
+
status?: "open" | "won" | "lost";
|
|
150
|
+
probability?: number;
|
|
151
|
+
expectedCloseDate?: Date;
|
|
152
|
+
actualCloseDate?: Date;
|
|
153
|
+
companyId?: string;
|
|
154
|
+
contactIds?: string[];
|
|
155
|
+
ownerId?: string;
|
|
156
|
+
description?: string;
|
|
157
|
+
customFields?: Record<string, unknown>;
|
|
158
|
+
createdAt?: Date;
|
|
159
|
+
updatedAt?: Date;
|
|
160
|
+
remoteData?: unknown;
|
|
161
|
+
}
|
|
162
|
+
interface CreateDealInput {
|
|
163
|
+
name: string;
|
|
164
|
+
amount?: number;
|
|
165
|
+
currency?: string;
|
|
166
|
+
stage?: string;
|
|
167
|
+
status?: "open" | "won" | "lost";
|
|
168
|
+
probability?: number;
|
|
169
|
+
expectedCloseDate?: Date;
|
|
170
|
+
companyId?: string;
|
|
171
|
+
contactIds?: string[];
|
|
172
|
+
ownerId?: string;
|
|
173
|
+
description?: string;
|
|
174
|
+
customFields?: Record<string, unknown>;
|
|
175
|
+
}
|
|
176
|
+
type UpdateDealInput = Partial<CreateDealInput>;
|
|
177
|
+
interface FilePermission {
|
|
178
|
+
type: "user" | "group" | "anyone";
|
|
179
|
+
role: "owner" | "writer" | "reader" | "commenter";
|
|
180
|
+
email?: string;
|
|
181
|
+
displayName?: string;
|
|
182
|
+
}
|
|
183
|
+
interface File {
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
mimeType?: string;
|
|
187
|
+
size?: number;
|
|
188
|
+
folderId?: string;
|
|
189
|
+
path?: string;
|
|
190
|
+
downloadUrl?: string;
|
|
191
|
+
webUrl?: string;
|
|
192
|
+
thumbnailUrl?: string;
|
|
193
|
+
isFolder: boolean;
|
|
194
|
+
parentId?: string;
|
|
195
|
+
ownerId?: string;
|
|
196
|
+
permissions?: FilePermission[];
|
|
197
|
+
createdAt?: Date;
|
|
198
|
+
updatedAt?: Date;
|
|
199
|
+
remoteData?: unknown;
|
|
200
|
+
}
|
|
201
|
+
interface IntegrationFolder {
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
path?: string;
|
|
205
|
+
parentId?: string;
|
|
206
|
+
webUrl?: string;
|
|
207
|
+
itemCount?: number;
|
|
208
|
+
createdAt?: Date;
|
|
209
|
+
updatedAt?: Date;
|
|
210
|
+
remoteData?: unknown;
|
|
211
|
+
}
|
|
212
|
+
interface CreateFolderInput {
|
|
213
|
+
name: string;
|
|
214
|
+
parentId?: string;
|
|
215
|
+
}
|
|
216
|
+
interface UploadFileInput {
|
|
217
|
+
name: string;
|
|
218
|
+
mimeType: string;
|
|
219
|
+
data: ArrayBuffer | Uint8Array;
|
|
220
|
+
folderId?: string;
|
|
221
|
+
}
|
|
222
|
+
interface Channel {
|
|
223
|
+
id: string;
|
|
224
|
+
name: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
type: "public" | "private" | "direct" | "group";
|
|
227
|
+
memberCount?: number;
|
|
228
|
+
isArchived?: boolean;
|
|
229
|
+
topic?: string;
|
|
230
|
+
createdAt?: Date;
|
|
231
|
+
updatedAt?: Date;
|
|
232
|
+
remoteData?: unknown;
|
|
233
|
+
}
|
|
234
|
+
interface MessageAttachment {
|
|
235
|
+
id?: string;
|
|
236
|
+
type?: "file" | "image" | "video" | "link";
|
|
237
|
+
name?: string;
|
|
238
|
+
url?: string;
|
|
239
|
+
size?: number;
|
|
240
|
+
mimeType?: string;
|
|
241
|
+
}
|
|
242
|
+
interface MessageReaction {
|
|
243
|
+
emoji: string;
|
|
244
|
+
count: number;
|
|
245
|
+
userIds?: string[];
|
|
246
|
+
}
|
|
247
|
+
interface Message {
|
|
248
|
+
id: string;
|
|
249
|
+
channelId: string;
|
|
250
|
+
content: string;
|
|
251
|
+
senderId?: string;
|
|
252
|
+
senderName?: string;
|
|
253
|
+
threadId?: string;
|
|
254
|
+
replyCount?: number;
|
|
255
|
+
isEdited?: boolean;
|
|
256
|
+
attachments?: MessageAttachment[];
|
|
257
|
+
reactions?: MessageReaction[];
|
|
258
|
+
createdAt?: Date;
|
|
259
|
+
updatedAt?: Date;
|
|
260
|
+
remoteData?: unknown;
|
|
261
|
+
}
|
|
262
|
+
interface SendMessageInput {
|
|
263
|
+
channelId: string;
|
|
264
|
+
content: string;
|
|
265
|
+
threadId?: string;
|
|
266
|
+
}
|
|
267
|
+
interface CommunicationUser {
|
|
268
|
+
id: string;
|
|
269
|
+
name?: string;
|
|
270
|
+
username?: string;
|
|
271
|
+
displayName?: string;
|
|
272
|
+
email?: string;
|
|
273
|
+
avatarUrl?: string;
|
|
274
|
+
status?: "active" | "away" | "dnd" | "offline" | {
|
|
275
|
+
text: string;
|
|
276
|
+
emoji?: string;
|
|
277
|
+
};
|
|
278
|
+
isBot?: boolean;
|
|
279
|
+
createdAt?: Date;
|
|
280
|
+
updatedAt?: Date;
|
|
281
|
+
remoteData?: unknown;
|
|
282
|
+
}
|
|
283
|
+
interface Document {
|
|
284
|
+
id: string;
|
|
285
|
+
title: string;
|
|
286
|
+
content?: string;
|
|
287
|
+
type?: "page" | "document" | "note";
|
|
288
|
+
parentId?: string;
|
|
289
|
+
webUrl?: string;
|
|
290
|
+
iconUrl?: string;
|
|
291
|
+
iconEmoji?: string;
|
|
292
|
+
coverUrl?: string;
|
|
293
|
+
isArchived?: boolean;
|
|
294
|
+
properties?: Record<string, unknown>;
|
|
295
|
+
createdAt?: Date;
|
|
296
|
+
updatedAt?: Date;
|
|
297
|
+
remoteData?: unknown;
|
|
298
|
+
}
|
|
299
|
+
interface CreateDocumentInput {
|
|
300
|
+
title: string;
|
|
301
|
+
content?: string;
|
|
302
|
+
type?: "page" | "document" | "note";
|
|
303
|
+
parentId?: string;
|
|
304
|
+
iconEmoji?: string;
|
|
305
|
+
}
|
|
306
|
+
type UpdateDocumentInput = Partial<CreateDocumentInput>;
|
|
307
|
+
type ColumnType = "text" | "number" | "boolean" | "date" | "datetime" | "select" | "multiSelect" | "url" | "email" | "phone" | "formula" | "relation" | "rollup" | "file" | "person" | "status" | "checkbox" | "unknown";
|
|
308
|
+
interface SelectOption {
|
|
309
|
+
id: string;
|
|
310
|
+
name: string;
|
|
311
|
+
color?: string;
|
|
312
|
+
}
|
|
313
|
+
interface TableColumn {
|
|
314
|
+
id: string;
|
|
315
|
+
name: string;
|
|
316
|
+
type: ColumnType;
|
|
317
|
+
description?: string;
|
|
318
|
+
options?: string[] | SelectOption[];
|
|
319
|
+
}
|
|
320
|
+
interface Table {
|
|
321
|
+
id: string;
|
|
322
|
+
name: string;
|
|
323
|
+
description?: string;
|
|
324
|
+
columns: TableColumn[];
|
|
325
|
+
webUrl?: string;
|
|
326
|
+
isArchived?: boolean;
|
|
327
|
+
createdAt?: Date;
|
|
328
|
+
updatedAt?: Date;
|
|
329
|
+
remoteData?: unknown;
|
|
330
|
+
}
|
|
331
|
+
interface TableRow {
|
|
332
|
+
id: string;
|
|
333
|
+
tableId: string;
|
|
334
|
+
cells: Record<string, unknown>;
|
|
335
|
+
webUrl?: string;
|
|
336
|
+
createdAt?: Date;
|
|
337
|
+
updatedAt?: Date;
|
|
338
|
+
remoteData?: unknown;
|
|
339
|
+
}
|
|
340
|
+
interface CreateTableRowInput {
|
|
341
|
+
cells: Record<string, unknown>;
|
|
342
|
+
}
|
|
343
|
+
type UpdateTableRowInput = CreateTableRowInput;
|
|
344
|
+
interface PassthroughRequest {
|
|
345
|
+
connectionId: string;
|
|
346
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
347
|
+
path: string;
|
|
348
|
+
body?: unknown;
|
|
349
|
+
query?: Record<string, string>;
|
|
350
|
+
headers?: Record<string, string>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Stack0 Integrations Client
|
|
355
|
+
* Unified API for third-party integrations
|
|
356
|
+
*/
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* CRM operations client
|
|
360
|
+
*/
|
|
361
|
+
declare class CRM {
|
|
362
|
+
private http;
|
|
363
|
+
constructor(http: HttpClient);
|
|
364
|
+
listContacts(connectionId: string, options?: ListOptions): Promise<PaginatedResult<Contact>>;
|
|
365
|
+
getContact(connectionId: string, id: string): Promise<Contact>;
|
|
366
|
+
createContact(connectionId: string, data: CreateContactInput): Promise<Contact>;
|
|
367
|
+
updateContact(connectionId: string, id: string, data: UpdateContactInput): Promise<Contact>;
|
|
368
|
+
deleteContact(connectionId: string, id: string): Promise<{
|
|
369
|
+
success: boolean;
|
|
370
|
+
}>;
|
|
371
|
+
listCompanies(connectionId: string, options?: ListOptions): Promise<PaginatedResult<Company>>;
|
|
372
|
+
getCompany(connectionId: string, id: string): Promise<Company>;
|
|
373
|
+
createCompany(connectionId: string, data: CreateCompanyInput): Promise<Company>;
|
|
374
|
+
updateCompany(connectionId: string, id: string, data: UpdateCompanyInput): Promise<Company>;
|
|
375
|
+
deleteCompany(connectionId: string, id: string): Promise<{
|
|
376
|
+
success: boolean;
|
|
377
|
+
}>;
|
|
378
|
+
listDeals(connectionId: string, options?: ListOptions): Promise<PaginatedResult<Deal>>;
|
|
379
|
+
getDeal(connectionId: string, id: string): Promise<Deal>;
|
|
380
|
+
createDeal(connectionId: string, data: CreateDealInput): Promise<Deal>;
|
|
381
|
+
updateDeal(connectionId: string, id: string, data: UpdateDealInput): Promise<Deal>;
|
|
382
|
+
deleteDeal(connectionId: string, id: string): Promise<{
|
|
383
|
+
success: boolean;
|
|
384
|
+
}>;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Storage operations client
|
|
388
|
+
*/
|
|
389
|
+
declare class Storage {
|
|
390
|
+
private http;
|
|
391
|
+
constructor(http: HttpClient);
|
|
392
|
+
listFiles(connectionId: string, folderId?: string, options?: ListOptions): Promise<PaginatedResult<File>>;
|
|
393
|
+
getFile(connectionId: string, id: string): Promise<File>;
|
|
394
|
+
uploadFile(connectionId: string, input: UploadFileInput): Promise<File>;
|
|
395
|
+
deleteFile(connectionId: string, id: string): Promise<{
|
|
396
|
+
success: boolean;
|
|
397
|
+
}>;
|
|
398
|
+
downloadFile(connectionId: string, id: string): Promise<{
|
|
399
|
+
data: ArrayBuffer;
|
|
400
|
+
mimeType: string;
|
|
401
|
+
filename: string;
|
|
402
|
+
}>;
|
|
403
|
+
listFolders(connectionId: string, parentId?: string, options?: ListOptions): Promise<PaginatedResult<IntegrationFolder>>;
|
|
404
|
+
getFolder(connectionId: string, id: string): Promise<IntegrationFolder>;
|
|
405
|
+
createFolder(connectionId: string, data: CreateFolderInput): Promise<IntegrationFolder>;
|
|
406
|
+
deleteFolder(connectionId: string, id: string): Promise<{
|
|
407
|
+
success: boolean;
|
|
408
|
+
}>;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Communication operations client
|
|
412
|
+
*/
|
|
413
|
+
declare class Communication {
|
|
414
|
+
private http;
|
|
415
|
+
constructor(http: HttpClient);
|
|
416
|
+
listChannels(connectionId: string, options?: ListOptions): Promise<PaginatedResult<Channel>>;
|
|
417
|
+
getChannel(connectionId: string, id: string): Promise<Channel>;
|
|
418
|
+
listMessages(connectionId: string, channelId: string, options?: ListOptions): Promise<PaginatedResult<Message>>;
|
|
419
|
+
sendMessage(connectionId: string, input: SendMessageInput): Promise<Message>;
|
|
420
|
+
listUsers(connectionId: string, options?: ListOptions): Promise<PaginatedResult<CommunicationUser>>;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Productivity operations client
|
|
424
|
+
*/
|
|
425
|
+
declare class Productivity {
|
|
426
|
+
private http;
|
|
427
|
+
constructor(http: HttpClient);
|
|
428
|
+
listDocuments(connectionId: string, parentId?: string, options?: ListOptions): Promise<PaginatedResult<Document>>;
|
|
429
|
+
getDocument(connectionId: string, id: string): Promise<Document>;
|
|
430
|
+
createDocument(connectionId: string, data: CreateDocumentInput): Promise<Document>;
|
|
431
|
+
updateDocument(connectionId: string, id: string, data: UpdateDocumentInput): Promise<Document>;
|
|
432
|
+
listTables(connectionId: string, options?: ListOptions): Promise<PaginatedResult<Table>>;
|
|
433
|
+
getTable(connectionId: string, id: string): Promise<Table>;
|
|
434
|
+
listTableRows(connectionId: string, tableId: string, options?: ListOptions): Promise<PaginatedResult<TableRow>>;
|
|
435
|
+
getTableRow(connectionId: string, tableId: string, rowId: string): Promise<TableRow>;
|
|
436
|
+
createTableRow(connectionId: string, tableId: string, data: CreateTableRowInput): Promise<TableRow>;
|
|
437
|
+
updateTableRow(connectionId: string, tableId: string, rowId: string, data: UpdateTableRowInput): Promise<TableRow>;
|
|
438
|
+
deleteTableRow(connectionId: string, tableId: string, rowId: string): Promise<{
|
|
439
|
+
success: boolean;
|
|
440
|
+
}>;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Stack0 Integrations SDK Client
|
|
444
|
+
*
|
|
445
|
+
* @example
|
|
446
|
+
* ```typescript
|
|
447
|
+
* import { Integrations } from '@stack0/sdk';
|
|
448
|
+
*
|
|
449
|
+
* const integrations = new Integrations({ apiKey: 'stack0_...' });
|
|
450
|
+
*
|
|
451
|
+
* // List connectors
|
|
452
|
+
* const connectors = await integrations.listConnectors();
|
|
453
|
+
*
|
|
454
|
+
* // List contacts from a CRM connection
|
|
455
|
+
* const contacts = await integrations.crm.listContacts('conn_123');
|
|
456
|
+
*
|
|
457
|
+
* // Create a contact
|
|
458
|
+
* const contact = await integrations.crm.createContact('conn_123', {
|
|
459
|
+
* firstName: 'John',
|
|
460
|
+
* lastName: 'Doe',
|
|
461
|
+
* email: 'john@example.com',
|
|
462
|
+
* });
|
|
463
|
+
*
|
|
464
|
+
* // Send a message via Slack
|
|
465
|
+
* await integrations.communication.sendMessage('conn_456', {
|
|
466
|
+
* channelId: 'C123',
|
|
467
|
+
* content: 'Hello from Stack0!',
|
|
468
|
+
* });
|
|
469
|
+
*
|
|
470
|
+
* // Upload a file to Google Drive
|
|
471
|
+
* await integrations.storage.uploadFile('conn_789', {
|
|
472
|
+
* name: 'report.pdf',
|
|
473
|
+
* mimeType: 'application/pdf',
|
|
474
|
+
* data: fileBuffer,
|
|
475
|
+
* });
|
|
476
|
+
* ```
|
|
477
|
+
*/
|
|
478
|
+
declare class Integrations {
|
|
479
|
+
private http;
|
|
480
|
+
crm: CRM;
|
|
481
|
+
storage: Storage;
|
|
482
|
+
communication: Communication;
|
|
483
|
+
productivity: Productivity;
|
|
484
|
+
constructor(config: HttpClientConfig);
|
|
485
|
+
/**
|
|
486
|
+
* List all available connectors
|
|
487
|
+
*/
|
|
488
|
+
listConnectors(category?: ConnectorCategory): Promise<Connector[]>;
|
|
489
|
+
/**
|
|
490
|
+
* Get a specific connector
|
|
491
|
+
*/
|
|
492
|
+
getConnector(slug: string): Promise<Connector>;
|
|
493
|
+
/**
|
|
494
|
+
* List all connections
|
|
495
|
+
*/
|
|
496
|
+
listConnections(options?: {
|
|
497
|
+
connectorId?: string;
|
|
498
|
+
status?: Connection["status"];
|
|
499
|
+
}): Promise<Connection[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Get a specific connection
|
|
502
|
+
*/
|
|
503
|
+
getConnection(id: string): Promise<Connection>;
|
|
504
|
+
/**
|
|
505
|
+
* Create a new connection (initiates OAuth flow)
|
|
506
|
+
* Returns the OAuth authorization URL to redirect the user to
|
|
507
|
+
*/
|
|
508
|
+
createConnection(connectorSlug: string, options?: {
|
|
509
|
+
name?: string;
|
|
510
|
+
projectId?: string;
|
|
511
|
+
}): Promise<{
|
|
512
|
+
connectionId: string;
|
|
513
|
+
authorizationUrl: string;
|
|
514
|
+
}>;
|
|
515
|
+
/**
|
|
516
|
+
* Delete a connection
|
|
517
|
+
*/
|
|
518
|
+
deleteConnection(id: string): Promise<{
|
|
519
|
+
success: boolean;
|
|
520
|
+
}>;
|
|
521
|
+
/**
|
|
522
|
+
* Test a connection's credentials
|
|
523
|
+
*/
|
|
524
|
+
testConnection(id: string): Promise<{
|
|
525
|
+
success: boolean;
|
|
526
|
+
error?: string;
|
|
527
|
+
}>;
|
|
528
|
+
/**
|
|
529
|
+
* Make a raw passthrough request to the provider API
|
|
530
|
+
*/
|
|
531
|
+
passthrough(request: PassthroughRequest): Promise<unknown>;
|
|
532
|
+
}
|
|
533
|
+
|
|
13
534
|
/**
|
|
14
535
|
* Stack0 SDK
|
|
15
536
|
* Official SDK for Stack0 services
|
|
@@ -48,6 +569,15 @@ export { B as BatchJobStatus, C as CreateBatchResponse, c as CreateScheduleRespo
|
|
|
48
569
|
* url: 'https://example.com/article',
|
|
49
570
|
* mode: 'markdown',
|
|
50
571
|
* });
|
|
572
|
+
*
|
|
573
|
+
* // List contacts from a connected CRM
|
|
574
|
+
* const contacts = await stack0.integrations.crm.listContacts('conn_123');
|
|
575
|
+
*
|
|
576
|
+
* // Send a Slack message
|
|
577
|
+
* await stack0.integrations.communication.sendMessage('conn_456', {
|
|
578
|
+
* channelId: 'C123',
|
|
579
|
+
* content: 'Hello from Stack0!',
|
|
580
|
+
* });
|
|
51
581
|
* ```
|
|
52
582
|
*/
|
|
53
583
|
|
|
@@ -64,6 +594,7 @@ declare class Stack0 {
|
|
|
64
594
|
cdn: CDN;
|
|
65
595
|
screenshots: Screenshots;
|
|
66
596
|
extraction: Extraction;
|
|
597
|
+
integrations: Integrations;
|
|
67
598
|
/**
|
|
68
599
|
* @deprecated Use `screenshots` and `extraction` instead. Will be removed in a future version.
|
|
69
600
|
*/
|
|
@@ -71,4 +602,4 @@ declare class Stack0 {
|
|
|
71
602
|
constructor(config: Stack0Config);
|
|
72
603
|
}
|
|
73
604
|
|
|
74
|
-
export { CDN, Extraction, Mail, Screenshots, Stack0, type Stack0Config, Webdata, Stack0 as default };
|
|
605
|
+
export { CDN, type Channel, type CommunicationUser, type Company, type Connection, type Connector, type ConnectorCategory, type Contact, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type Deal, Extraction, type Address as IntegrationAddress, type ColumnType as IntegrationColumnType, type CreateDocumentInput as IntegrationCreateDocumentInput, type CreateFolderInput as IntegrationCreateFolderInput, type CreateTableRowInput as IntegrationCreateTableRowInput, type Document as IntegrationDocument, type IntegrationEmailAddress, type File as IntegrationFile, type FilePermission as IntegrationFilePermission, type IntegrationFolder, type MessageAttachment as IntegrationMessageAttachment, type MessageReaction as IntegrationMessageReaction, type PhoneNumber as IntegrationPhoneNumber, type SelectOption as IntegrationSelectOption, type Table as IntegrationTable, type TableColumn as IntegrationTableColumn, type TableRow as IntegrationTableRow, type UpdateDocumentInput as IntegrationUpdateDocumentInput, type UpdateTableRowInput as IntegrationUpdateTableRowInput, Integrations, type ListOptions as IntegrationsListOptions, type PaginatedResult as IntegrationsPaginatedResult, Mail, type Message, type PassthroughRequest, Screenshots, type SendMessageInput, Stack0, type Stack0Config, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UploadFileInput, Webdata, Stack0 as default };
|