@geoly-ai/social-hub-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +681 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +815 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +34 -0
- package/dist/index.test.js.map +1 -0
- package/package.json +34 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
export type SocialHubClientOptions = {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
apiKey: string;
|
|
4
|
+
};
|
|
5
|
+
export type HealthCheckJson = {
|
|
6
|
+
ok?: boolean;
|
|
7
|
+
db?: string;
|
|
8
|
+
redis?: string;
|
|
9
|
+
};
|
|
10
|
+
/** GET /health without API key. */
|
|
11
|
+
export declare function getSocialHubHealth(baseUrl: string): Promise<HealthCheckJson>;
|
|
12
|
+
/** GET /health/live without API key. */
|
|
13
|
+
export declare function getSocialHubHealthLive(baseUrl: string): Promise<{
|
|
14
|
+
ok: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
/** POST /v1/auth/device/code — no API key required. */
|
|
17
|
+
export declare function createDeviceCode(baseUrl: string, body: {
|
|
18
|
+
clientName?: string;
|
|
19
|
+
deviceName?: string;
|
|
20
|
+
teamId?: string;
|
|
21
|
+
durationKind?: "short" | "long" | "custom";
|
|
22
|
+
expiresAt?: string;
|
|
23
|
+
}): Promise<DeviceCodeResponse>;
|
|
24
|
+
/** POST /v1/auth/device/token — poll for CLI access token. */
|
|
25
|
+
export declare function pollDeviceToken(baseUrl: string, deviceCode: string): Promise<PollDeviceTokenResponse>;
|
|
26
|
+
/** Query params for GET /calendar-entries */
|
|
27
|
+
export type ListCalendarEntriesParams = {
|
|
28
|
+
campaignId?: string;
|
|
29
|
+
publishingPlanId?: string;
|
|
30
|
+
socialAccountId?: string;
|
|
31
|
+
status?: string;
|
|
32
|
+
from?: string;
|
|
33
|
+
to?: string;
|
|
34
|
+
limit?: number;
|
|
35
|
+
};
|
|
36
|
+
/** Body for PATCH /calendar-entries/:id */
|
|
37
|
+
export type UpdateCalendarEntryBody = {
|
|
38
|
+
plannedAt?: string;
|
|
39
|
+
status?: string;
|
|
40
|
+
permalink?: string;
|
|
41
|
+
failureReason?: string;
|
|
42
|
+
};
|
|
43
|
+
export type ListRedditPostSnapshotsParams = {
|
|
44
|
+
limit?: number;
|
|
45
|
+
campaignId?: string;
|
|
46
|
+
calendarEntryId?: string;
|
|
47
|
+
socialAccountId?: string;
|
|
48
|
+
};
|
|
49
|
+
export type RedditPostSnapshotStatsParams = {
|
|
50
|
+
campaignId?: string;
|
|
51
|
+
calendarEntryId?: string;
|
|
52
|
+
opsStatus?: string;
|
|
53
|
+
postType?: string;
|
|
54
|
+
range?: number;
|
|
55
|
+
compare?: "wow" | "mom" | "both";
|
|
56
|
+
};
|
|
57
|
+
export type DeviceCodeResponse = {
|
|
58
|
+
device_code: string;
|
|
59
|
+
user_code: string;
|
|
60
|
+
verification_uri: string;
|
|
61
|
+
verification_uri_complete: string;
|
|
62
|
+
expires_in: number;
|
|
63
|
+
interval: number;
|
|
64
|
+
};
|
|
65
|
+
export type PollDeviceTokenResponse = {
|
|
66
|
+
error: "authorization_pending";
|
|
67
|
+
} | {
|
|
68
|
+
error: "slow_down";
|
|
69
|
+
} | {
|
|
70
|
+
error: "expired_token";
|
|
71
|
+
} | {
|
|
72
|
+
error: "access_denied";
|
|
73
|
+
} | {
|
|
74
|
+
access_token: string;
|
|
75
|
+
token_type: "Bearer";
|
|
76
|
+
expires_at: string;
|
|
77
|
+
team_id: string;
|
|
78
|
+
team_ids?: string[];
|
|
79
|
+
duration_kind: "short" | "long" | "custom";
|
|
80
|
+
downgraded?: boolean;
|
|
81
|
+
};
|
|
82
|
+
export type AuthContextResponse = {
|
|
83
|
+
kind: "api_key" | "session" | "cli_token";
|
|
84
|
+
teamId: string;
|
|
85
|
+
role: string;
|
|
86
|
+
visibleTeamIds: string[];
|
|
87
|
+
visibleBrandIds: string[];
|
|
88
|
+
visibleCampaignIds: string[] | null;
|
|
89
|
+
visibleAccountIds: string[];
|
|
90
|
+
userId?: string;
|
|
91
|
+
email?: string;
|
|
92
|
+
name?: string;
|
|
93
|
+
};
|
|
94
|
+
export type UpdateCampaignBody = {
|
|
95
|
+
name?: string;
|
|
96
|
+
startsAt?: string | null;
|
|
97
|
+
endsAt?: string | null;
|
|
98
|
+
};
|
|
99
|
+
export type UpdateContentDraftBody = {
|
|
100
|
+
title?: string;
|
|
101
|
+
body?: string;
|
|
102
|
+
status?: string;
|
|
103
|
+
};
|
|
104
|
+
export type UpdateNotificationChannelBody = {
|
|
105
|
+
provider?: string;
|
|
106
|
+
externalId?: string;
|
|
107
|
+
minRole?: string;
|
|
108
|
+
campaignId?: string | null;
|
|
109
|
+
};
|
|
110
|
+
export type ListSubredditWatchlistsParams = {
|
|
111
|
+
limit?: number;
|
|
112
|
+
offset?: number;
|
|
113
|
+
campaignId?: string;
|
|
114
|
+
};
|
|
115
|
+
export type ListHotPostsParams = {
|
|
116
|
+
limit?: number;
|
|
117
|
+
offset?: number;
|
|
118
|
+
subreddit?: string;
|
|
119
|
+
sortBy?: "score" | "comments" | "capturedAt" | "upvoteRatio";
|
|
120
|
+
};
|
|
121
|
+
export type ListKolIntentsParams = {
|
|
122
|
+
limit?: number;
|
|
123
|
+
offset?: number;
|
|
124
|
+
campaignId?: string;
|
|
125
|
+
status?: "interested" | "contacting" | "connected" | "not_interested";
|
|
126
|
+
sortBy?: "createdAt" | "status" | "rating" | "karma" | "activity" | "lastActive";
|
|
127
|
+
sortOrder?: "asc" | "desc";
|
|
128
|
+
};
|
|
129
|
+
export type ListEventsParams = {
|
|
130
|
+
limit?: number;
|
|
131
|
+
type?: string;
|
|
132
|
+
actor?: string;
|
|
133
|
+
result?: string;
|
|
134
|
+
socialAccountId?: string;
|
|
135
|
+
createdFrom?: string;
|
|
136
|
+
createdTo?: string;
|
|
137
|
+
};
|
|
138
|
+
export type ListNotificationChannelsParams = {
|
|
139
|
+
campaignId?: string;
|
|
140
|
+
};
|
|
141
|
+
export type ListApiKeysParams = {
|
|
142
|
+
limit?: number;
|
|
143
|
+
};
|
|
144
|
+
export type AccountGraphDrilldownParams = {
|
|
145
|
+
socialAccountId: string;
|
|
146
|
+
limit?: number;
|
|
147
|
+
};
|
|
148
|
+
export type ListScheduledJobsParams = {
|
|
149
|
+
limit?: number;
|
|
150
|
+
status?: string;
|
|
151
|
+
socialAccountId?: string;
|
|
152
|
+
from?: string;
|
|
153
|
+
to?: string;
|
|
154
|
+
};
|
|
155
|
+
export type ListAccountsParams = {
|
|
156
|
+
limit?: number;
|
|
157
|
+
status?: string;
|
|
158
|
+
platform?: string;
|
|
159
|
+
campaignId?: string;
|
|
160
|
+
};
|
|
161
|
+
export type ListAuditLogsParams = {
|
|
162
|
+
limit?: number;
|
|
163
|
+
type?: string;
|
|
164
|
+
actor?: "user" | "agent" | "cron";
|
|
165
|
+
result?: "succeeded" | "failed" | "skipped";
|
|
166
|
+
socialAccountId?: string;
|
|
167
|
+
createdFrom?: string;
|
|
168
|
+
createdTo?: string;
|
|
169
|
+
};
|
|
170
|
+
export type ListAccountGraphParams = {
|
|
171
|
+
limit?: number;
|
|
172
|
+
cursor?: string;
|
|
173
|
+
socialAccountId?: string;
|
|
174
|
+
edgeType?: string;
|
|
175
|
+
minRisk?: "high" | "medium" | "low";
|
|
176
|
+
};
|
|
177
|
+
export type ListCampaignsParams = {
|
|
178
|
+
brandId?: string;
|
|
179
|
+
};
|
|
180
|
+
export type ListPublishingPlansParams = {
|
|
181
|
+
campaignId?: string;
|
|
182
|
+
};
|
|
183
|
+
export type ListSubredditSanctionsParams = {
|
|
184
|
+
limit?: number;
|
|
185
|
+
socialAccountId?: string;
|
|
186
|
+
subreddit?: string;
|
|
187
|
+
};
|
|
188
|
+
export type ListReportsParams = {
|
|
189
|
+
limit?: number;
|
|
190
|
+
reportType?: "reddit-post-snapshot" | "account-status-snapshot" | "campaign-digest";
|
|
191
|
+
};
|
|
192
|
+
export declare class SocialHubClient {
|
|
193
|
+
private readonly opts;
|
|
194
|
+
constructor(opts: SocialHubClientOptions);
|
|
195
|
+
private teamBase;
|
|
196
|
+
/** GET /health — no API key required. */
|
|
197
|
+
getHealth(): Promise<HealthCheckJson>;
|
|
198
|
+
private fetchJson;
|
|
199
|
+
appendEvent(teamId: string, body: {
|
|
200
|
+
type: string;
|
|
201
|
+
socialAccountId?: string;
|
|
202
|
+
payload?: Record<string, unknown>;
|
|
203
|
+
}): Promise<{
|
|
204
|
+
id: string;
|
|
205
|
+
}>;
|
|
206
|
+
listEvents(teamId: string, limit?: number): Promise<{
|
|
207
|
+
items: {
|
|
208
|
+
id: string;
|
|
209
|
+
teamId: string;
|
|
210
|
+
type: string;
|
|
211
|
+
socialAccountId: string | null;
|
|
212
|
+
payload: Record<string, unknown> | null;
|
|
213
|
+
createdAt: string;
|
|
214
|
+
}[];
|
|
215
|
+
}>;
|
|
216
|
+
getDashboardSummary(teamId: string, params?: {
|
|
217
|
+
interactionTrendDays?: 7 | 14 | 30;
|
|
218
|
+
campaignId?: string;
|
|
219
|
+
brandId?: string;
|
|
220
|
+
from?: string;
|
|
221
|
+
to?: string;
|
|
222
|
+
}): Promise<{
|
|
223
|
+
metrics?: Record<string, number | undefined>;
|
|
224
|
+
}>;
|
|
225
|
+
listCalendarEntries(teamId: string, params?: ListCalendarEntriesParams): Promise<{
|
|
226
|
+
items: unknown[];
|
|
227
|
+
}>;
|
|
228
|
+
updateCalendarEntry(teamId: string, entryId: string, body: UpdateCalendarEntryBody): Promise<{
|
|
229
|
+
ok: boolean;
|
|
230
|
+
warning?: string;
|
|
231
|
+
}>;
|
|
232
|
+
listRedditPostSnapshots(teamId: string, params?: ListRedditPostSnapshotsParams): Promise<{
|
|
233
|
+
items: unknown[];
|
|
234
|
+
}>;
|
|
235
|
+
getRedditPostSnapshotStats(teamId: string, params?: RedditPostSnapshotStatsParams): Promise<unknown>;
|
|
236
|
+
getRedditPostRefreshStatus(teamId: string): Promise<unknown>;
|
|
237
|
+
refreshAllRedditPostSnapshots(teamId: string): Promise<{
|
|
238
|
+
queued: number;
|
|
239
|
+
batchId?: string;
|
|
240
|
+
warning?: string;
|
|
241
|
+
}>;
|
|
242
|
+
getRedditRefreshAllProgress(teamId: string, batchId: string): Promise<unknown>;
|
|
243
|
+
refreshRedditPostSnapshot(teamId: string, snapshotId: string): Promise<{
|
|
244
|
+
queued: number;
|
|
245
|
+
warning?: string;
|
|
246
|
+
}>;
|
|
247
|
+
updateRedditPostSnapshot(teamId: string, snapshotId: string, body: Record<string, unknown>): Promise<{
|
|
248
|
+
ok: boolean;
|
|
249
|
+
}>;
|
|
250
|
+
deleteRedditPostSnapshot(teamId: string, snapshotId: string): Promise<{
|
|
251
|
+
ok: boolean;
|
|
252
|
+
}>;
|
|
253
|
+
importRedditPostSnapshotsFromFeishu(teamId: string, body?: {
|
|
254
|
+
baseToken?: string;
|
|
255
|
+
tableId?: string;
|
|
256
|
+
}): Promise<unknown>;
|
|
257
|
+
listScheduledJobs(teamId: string, params?: ListScheduledJobsParams): Promise<{
|
|
258
|
+
items: unknown[];
|
|
259
|
+
}>;
|
|
260
|
+
getScheduledJobsAutomationSummary(teamId: string, hours?: number): Promise<{
|
|
261
|
+
summary: Record<string, number>;
|
|
262
|
+
}>;
|
|
263
|
+
createScheduledJob(teamId: string, body: Record<string, unknown>): Promise<unknown>;
|
|
264
|
+
createScheduledJobsBatch(teamId: string, body: {
|
|
265
|
+
jobs: Record<string, unknown>[];
|
|
266
|
+
}): Promise<unknown>;
|
|
267
|
+
retryScheduledJob(teamId: string, jobId: string): Promise<unknown>;
|
|
268
|
+
cancelScheduledJob(teamId: string, jobId: string): Promise<unknown>;
|
|
269
|
+
listContentDrafts(teamId: string, limit?: number): Promise<{
|
|
270
|
+
items: unknown[];
|
|
271
|
+
}>;
|
|
272
|
+
createContentDraft(teamId: string, body: {
|
|
273
|
+
campaignId: string;
|
|
274
|
+
title: string;
|
|
275
|
+
body: string;
|
|
276
|
+
}): Promise<{
|
|
277
|
+
id: string;
|
|
278
|
+
}>;
|
|
279
|
+
listReports(teamId: string, options?: ListReportsParams | number): Promise<{
|
|
280
|
+
items: unknown[];
|
|
281
|
+
}>;
|
|
282
|
+
ingestReport(teamId: string, body: {
|
|
283
|
+
reportType: "reddit-post-snapshot" | "account-status-snapshot" | "campaign-digest";
|
|
284
|
+
source: string;
|
|
285
|
+
traceId?: string;
|
|
286
|
+
}): Promise<unknown>;
|
|
287
|
+
listAccounts(teamId: string, params?: ListAccountsParams): Promise<{
|
|
288
|
+
items: unknown[];
|
|
289
|
+
}>;
|
|
290
|
+
createAccount(teamId: string, body: Record<string, unknown>): Promise<{
|
|
291
|
+
id: string;
|
|
292
|
+
}>;
|
|
293
|
+
listBrands(teamId: string): Promise<{
|
|
294
|
+
items: unknown[];
|
|
295
|
+
}>;
|
|
296
|
+
createBrand(teamId: string, body: {
|
|
297
|
+
name: string;
|
|
298
|
+
slug?: string;
|
|
299
|
+
}): Promise<{
|
|
300
|
+
id: string;
|
|
301
|
+
}>;
|
|
302
|
+
updateBrand(teamId: string, brandId: string, body: Record<string, unknown>): Promise<unknown>;
|
|
303
|
+
listCampaigns(teamId: string, params?: ListCampaignsParams): Promise<{
|
|
304
|
+
items: unknown[];
|
|
305
|
+
}>;
|
|
306
|
+
createCampaign(teamId: string, body: {
|
|
307
|
+
brandId: string;
|
|
308
|
+
name: string;
|
|
309
|
+
startsAt?: string;
|
|
310
|
+
endsAt?: string;
|
|
311
|
+
}): Promise<{
|
|
312
|
+
id: string;
|
|
313
|
+
}>;
|
|
314
|
+
listPublishingPlans(teamId: string, params?: ListPublishingPlansParams): Promise<{
|
|
315
|
+
items: unknown[];
|
|
316
|
+
}>;
|
|
317
|
+
createPublishingPlan(teamId: string, body: Record<string, unknown>): Promise<unknown>;
|
|
318
|
+
listAuditLogs(teamId: string, params?: ListAuditLogsParams): Promise<{
|
|
319
|
+
items: unknown[];
|
|
320
|
+
}>;
|
|
321
|
+
getPermissionsMatrix(teamId: string): Promise<unknown>;
|
|
322
|
+
listAccountGraphEdges(teamId: string, params?: ListAccountGraphParams): Promise<{
|
|
323
|
+
items: unknown[];
|
|
324
|
+
nextCursor?: string;
|
|
325
|
+
}>;
|
|
326
|
+
createRedditPostSnapshot(teamId: string, body: Record<string, unknown>): Promise<{
|
|
327
|
+
id: string;
|
|
328
|
+
}>;
|
|
329
|
+
appendEventsBatch(teamId: string, body: {
|
|
330
|
+
events: Record<string, unknown>[];
|
|
331
|
+
}): Promise<unknown>;
|
|
332
|
+
triggerOpenClawIngest(teamId: string, body: {
|
|
333
|
+
mode: "dry-run" | "apply";
|
|
334
|
+
sourceRoot?: string;
|
|
335
|
+
sourcePaths?: Record<string, string>;
|
|
336
|
+
}): Promise<unknown>;
|
|
337
|
+
listSubredditSanctions(teamId: string, params?: ListSubredditSanctionsParams): Promise<{
|
|
338
|
+
items: unknown[];
|
|
339
|
+
}>;
|
|
340
|
+
createSubredditSanction(teamId: string, body: {
|
|
341
|
+
socialAccountId: string;
|
|
342
|
+
subreddit: string;
|
|
343
|
+
status: string;
|
|
344
|
+
reason?: string;
|
|
345
|
+
expiresAt?: string;
|
|
346
|
+
}): Promise<{
|
|
347
|
+
id: string;
|
|
348
|
+
}>;
|
|
349
|
+
listAccountRiskProfiles(teamId: string, limit?: number): Promise<{
|
|
350
|
+
items: unknown[];
|
|
351
|
+
}>;
|
|
352
|
+
getAccountRiskProfile(teamId: string, socialAccountId: string): Promise<unknown>;
|
|
353
|
+
upsertAccountRiskProfile(teamId: string, socialAccountId: string, body: Record<string, unknown>): Promise<unknown>;
|
|
354
|
+
getAccount(teamId: string, accountId: string): Promise<unknown>;
|
|
355
|
+
updateAccount(teamId: string, accountId: string, body: {
|
|
356
|
+
handle?: string | null;
|
|
357
|
+
profileUrl?: string | null;
|
|
358
|
+
status?: string;
|
|
359
|
+
credentialsRef?: string | null;
|
|
360
|
+
externalId?: string | null;
|
|
361
|
+
karma?: number | null;
|
|
362
|
+
accountAgeDays?: number | null;
|
|
363
|
+
workflowStage?: string | null;
|
|
364
|
+
metricsSource?: string | null;
|
|
365
|
+
metricsUpdatedAt?: string | null;
|
|
366
|
+
}): Promise<{
|
|
367
|
+
ok: boolean;
|
|
368
|
+
}>;
|
|
369
|
+
getCampaign(teamId: string, campaignId: string): Promise<unknown>;
|
|
370
|
+
updateCampaign(teamId: string, campaignId: string, body: UpdateCampaignBody): Promise<unknown>;
|
|
371
|
+
getContentDraft(teamId: string, draftId: string): Promise<unknown>;
|
|
372
|
+
updateContentDraft(teamId: string, draftId: string, body: UpdateContentDraftBody): Promise<unknown>;
|
|
373
|
+
deleteContentDraft(teamId: string, draftId: string): Promise<void>;
|
|
374
|
+
cancelPublishingPlan(teamId: string, planId: string): Promise<void>;
|
|
375
|
+
listAgentTeams(): Promise<{
|
|
376
|
+
items: unknown[];
|
|
377
|
+
}>;
|
|
378
|
+
listWorkspaceDocuments(teamId: string, params?: {
|
|
379
|
+
kind?: string;
|
|
380
|
+
limit?: number;
|
|
381
|
+
}): Promise<{
|
|
382
|
+
items: unknown[];
|
|
383
|
+
}>;
|
|
384
|
+
createTeam(body: {
|
|
385
|
+
slug: string;
|
|
386
|
+
name: string;
|
|
387
|
+
}): Promise<{
|
|
388
|
+
id: string;
|
|
389
|
+
}>;
|
|
390
|
+
updateTeam(teamId: string, body: {
|
|
391
|
+
slug?: string;
|
|
392
|
+
name?: string;
|
|
393
|
+
}): Promise<{
|
|
394
|
+
ok: boolean;
|
|
395
|
+
}>;
|
|
396
|
+
addTeamMember(teamId: string, body: {
|
|
397
|
+
userId: string;
|
|
398
|
+
role: string;
|
|
399
|
+
}): Promise<{
|
|
400
|
+
id: string;
|
|
401
|
+
}>;
|
|
402
|
+
listSubredditWatchlists(teamId: string, params?: ListSubredditWatchlistsParams): Promise<{
|
|
403
|
+
items: unknown[];
|
|
404
|
+
total: number;
|
|
405
|
+
limit: number;
|
|
406
|
+
offset: number;
|
|
407
|
+
}>;
|
|
408
|
+
createSubredditWatchlist(teamId: string, body: Record<string, unknown>): Promise<{
|
|
409
|
+
id: string;
|
|
410
|
+
}>;
|
|
411
|
+
updateSubredditWatchlist(teamId: string, watchlistId: string, body: Record<string, unknown>): Promise<{
|
|
412
|
+
ok: boolean;
|
|
413
|
+
}>;
|
|
414
|
+
deleteSubredditWatchlist(teamId: string, watchlistId: string): Promise<void>;
|
|
415
|
+
listHotPosts(teamId: string, params?: ListHotPostsParams): Promise<{
|
|
416
|
+
items: unknown[];
|
|
417
|
+
total: number;
|
|
418
|
+
limit: number;
|
|
419
|
+
offset: number;
|
|
420
|
+
}>;
|
|
421
|
+
createHotPost(teamId: string, body: Record<string, unknown>): Promise<{
|
|
422
|
+
id: string;
|
|
423
|
+
}>;
|
|
424
|
+
exportHotPostsCsv(teamId: string, params?: ListHotPostsParams): Promise<string>;
|
|
425
|
+
listKolIntents(teamId: string, params?: ListKolIntentsParams): Promise<{
|
|
426
|
+
items: unknown[];
|
|
427
|
+
total: number;
|
|
428
|
+
limit: number;
|
|
429
|
+
offset: number;
|
|
430
|
+
}>;
|
|
431
|
+
createKolIntent(teamId: string, body: Record<string, unknown>): Promise<{
|
|
432
|
+
id: string;
|
|
433
|
+
}>;
|
|
434
|
+
dispatchTaskFromHotPost(teamId: string, body: {
|
|
435
|
+
hotPostId: string;
|
|
436
|
+
socialAccountId: string;
|
|
437
|
+
action: string;
|
|
438
|
+
runAt?: string;
|
|
439
|
+
}): Promise<unknown>;
|
|
440
|
+
listUsers(teamId: string): Promise<{
|
|
441
|
+
items: unknown[];
|
|
442
|
+
}>;
|
|
443
|
+
createUser(teamId: string, body: Record<string, unknown>): Promise<{
|
|
444
|
+
id: string;
|
|
445
|
+
}>;
|
|
446
|
+
listBrandMembers(teamId: string, params?: {
|
|
447
|
+
userId?: string;
|
|
448
|
+
}): Promise<{
|
|
449
|
+
items: unknown[];
|
|
450
|
+
}>;
|
|
451
|
+
createBrandMember(teamId: string, body: {
|
|
452
|
+
brandId: string;
|
|
453
|
+
userId: string;
|
|
454
|
+
role?: string;
|
|
455
|
+
}): Promise<{
|
|
456
|
+
id: string;
|
|
457
|
+
}>;
|
|
458
|
+
listNotificationChannels(teamId: string, params?: ListNotificationChannelsParams): Promise<{
|
|
459
|
+
items: unknown[];
|
|
460
|
+
}>;
|
|
461
|
+
createNotificationChannel(teamId: string, body: {
|
|
462
|
+
provider: string;
|
|
463
|
+
externalId: string;
|
|
464
|
+
minRole?: string;
|
|
465
|
+
campaignId?: string;
|
|
466
|
+
}): Promise<{
|
|
467
|
+
id: string;
|
|
468
|
+
}>;
|
|
469
|
+
updateNotificationChannel(teamId: string, channelId: string, body: UpdateNotificationChannelBody): Promise<{
|
|
470
|
+
ok: boolean;
|
|
471
|
+
}>;
|
|
472
|
+
deleteNotificationChannel(teamId: string, channelId: string): Promise<void>;
|
|
473
|
+
testNotificationChannel(teamId: string, channelId: string): Promise<{
|
|
474
|
+
ok: boolean;
|
|
475
|
+
warning?: string;
|
|
476
|
+
jobId?: string;
|
|
477
|
+
}>;
|
|
478
|
+
listApiKeys(teamId: string, params?: ListApiKeysParams): Promise<{
|
|
479
|
+
items: unknown[];
|
|
480
|
+
}>;
|
|
481
|
+
createApiKey(teamId: string, body: Record<string, unknown>): Promise<{
|
|
482
|
+
id: string;
|
|
483
|
+
key: string;
|
|
484
|
+
}>;
|
|
485
|
+
deleteApiKey(teamId: string, apiKeyId: string): Promise<void>;
|
|
486
|
+
rotateApiKey(teamId: string, apiKeyId: string): Promise<{
|
|
487
|
+
id: string;
|
|
488
|
+
key: string;
|
|
489
|
+
}>;
|
|
490
|
+
batchRevokeApiKeys(teamId: string, ids: string[]): Promise<unknown>;
|
|
491
|
+
batchRotateApiKeys(teamId: string, ids: string[]): Promise<unknown>;
|
|
492
|
+
listEventsFiltered(teamId: string, params?: ListEventsParams): Promise<{
|
|
493
|
+
items: unknown[];
|
|
494
|
+
}>;
|
|
495
|
+
exportEventsCsv(teamId: string, params?: ListEventsParams): Promise<string>;
|
|
496
|
+
createReport(teamId: string, body: Record<string, unknown>): Promise<{
|
|
497
|
+
id: string;
|
|
498
|
+
}>;
|
|
499
|
+
updateJobAgentStatus(teamId: string, jobId: string, body: {
|
|
500
|
+
status: "running" | "succeeded" | "failed";
|
|
501
|
+
lastError?: string;
|
|
502
|
+
payload?: Record<string, unknown>;
|
|
503
|
+
}): Promise<unknown>;
|
|
504
|
+
updatePermissionsMatrix(teamId: string, body: Record<string, unknown>): Promise<unknown>;
|
|
505
|
+
getAccountGraphDrilldown(teamId: string, params: AccountGraphDrilldownParams): Promise<unknown>;
|
|
506
|
+
sessionLogin(body: {
|
|
507
|
+
email: string;
|
|
508
|
+
password: string;
|
|
509
|
+
}): Promise<unknown>;
|
|
510
|
+
sessionLogout(): Promise<unknown>;
|
|
511
|
+
sessionMe(): Promise<unknown>;
|
|
512
|
+
sessionActiveTeam(body: {
|
|
513
|
+
teamId: string;
|
|
514
|
+
}): Promise<unknown>;
|
|
515
|
+
sessionSetPassword(body: {
|
|
516
|
+
email: string;
|
|
517
|
+
teamId?: string;
|
|
518
|
+
password: string;
|
|
519
|
+
}): Promise<unknown>;
|
|
520
|
+
sessionUpdateProfile(body: {
|
|
521
|
+
name: string;
|
|
522
|
+
}): Promise<unknown>;
|
|
523
|
+
listTeamBrowserEnvironments(teamId: string): Promise<unknown>;
|
|
524
|
+
listAccountBrowserEnvironments(teamId: string, accountId: string): Promise<unknown>;
|
|
525
|
+
createBrowserEnvironment(teamId: string, accountId: string, body: {
|
|
526
|
+
ipAddress?: string;
|
|
527
|
+
userAgent?: string;
|
|
528
|
+
timezone?: string;
|
|
529
|
+
language?: string;
|
|
530
|
+
platform?: string;
|
|
531
|
+
notes?: string;
|
|
532
|
+
}): Promise<unknown>;
|
|
533
|
+
listAccountPersonas(teamId: string, accountId: string): Promise<unknown>;
|
|
534
|
+
createAccountPersona(teamId: string, accountId: string, body: {
|
|
535
|
+
markdown: string;
|
|
536
|
+
}): Promise<unknown>;
|
|
537
|
+
listCampaignAccounts(teamId: string, campaignId: string): Promise<unknown>;
|
|
538
|
+
assignCampaignAccount(teamId: string, campaignId: string, body: {
|
|
539
|
+
socialAccountId: string;
|
|
540
|
+
visibility?: string;
|
|
541
|
+
}): Promise<unknown>;
|
|
542
|
+
removeCampaignAccount(teamId: string, campaignId: string, socialAccountId: string): Promise<unknown>;
|
|
543
|
+
deleteBrandMember(teamId: string, memberId: string): Promise<unknown>;
|
|
544
|
+
deleteAccount(teamId: string, accountId: string): Promise<{
|
|
545
|
+
ok: boolean;
|
|
546
|
+
}>;
|
|
547
|
+
listAccountBrandBindings(teamId: string, accountId: string): Promise<{
|
|
548
|
+
items: unknown[];
|
|
549
|
+
}>;
|
|
550
|
+
addAccountBrandBinding(teamId: string, accountId: string, body: {
|
|
551
|
+
brandId: string;
|
|
552
|
+
}): Promise<unknown>;
|
|
553
|
+
removeAccountBrandBinding(teamId: string, accountId: string, brandId: string): Promise<{
|
|
554
|
+
ok: boolean;
|
|
555
|
+
}>;
|
|
556
|
+
listAccountStatusSnapshots(teamId: string, accountId: string, limit?: number): Promise<{
|
|
557
|
+
items: unknown[];
|
|
558
|
+
}>;
|
|
559
|
+
getAuthContext(): Promise<AuthContextResponse>;
|
|
560
|
+
revokeCurrentCliToken(): Promise<{
|
|
561
|
+
ok: boolean;
|
|
562
|
+
}>;
|
|
563
|
+
opsClaimNext(teamId: string, body: {
|
|
564
|
+
agentId: string;
|
|
565
|
+
socialAccountId?: string;
|
|
566
|
+
leaseSeconds?: number;
|
|
567
|
+
}): Promise<{
|
|
568
|
+
job: unknown | null;
|
|
569
|
+
}>;
|
|
570
|
+
opsClaim(teamId: string, body: {
|
|
571
|
+
agentId: string;
|
|
572
|
+
jobId: string;
|
|
573
|
+
leaseSeconds?: number;
|
|
574
|
+
}): Promise<{
|
|
575
|
+
job: unknown;
|
|
576
|
+
}>;
|
|
577
|
+
opsHeartbeat(teamId: string, body: {
|
|
578
|
+
agentId: string;
|
|
579
|
+
jobId: string;
|
|
580
|
+
leaseSeconds?: number;
|
|
581
|
+
payload?: Record<string, unknown>;
|
|
582
|
+
}): Promise<{
|
|
583
|
+
ok: boolean;
|
|
584
|
+
}>;
|
|
585
|
+
opsComplete(teamId: string, body: {
|
|
586
|
+
agentId: string;
|
|
587
|
+
jobId: string;
|
|
588
|
+
permalink?: string;
|
|
589
|
+
calendarEntryId?: string;
|
|
590
|
+
redditPostSnapshotId?: string;
|
|
591
|
+
payload?: Record<string, unknown>;
|
|
592
|
+
}): Promise<{
|
|
593
|
+
ok: boolean;
|
|
594
|
+
jobId: string;
|
|
595
|
+
status: string;
|
|
596
|
+
trace: Record<string, unknown>;
|
|
597
|
+
updated: Record<string, unknown>;
|
|
598
|
+
}>;
|
|
599
|
+
opsFail(teamId: string, body: {
|
|
600
|
+
agentId: string;
|
|
601
|
+
jobId: string;
|
|
602
|
+
reason: string;
|
|
603
|
+
message?: string;
|
|
604
|
+
payload?: Record<string, unknown>;
|
|
605
|
+
}): Promise<{
|
|
606
|
+
ok: boolean;
|
|
607
|
+
jobId: string;
|
|
608
|
+
status: string;
|
|
609
|
+
}>;
|
|
610
|
+
opsSkip(teamId: string, body: {
|
|
611
|
+
agentId: string;
|
|
612
|
+
jobId: string;
|
|
613
|
+
reason: string;
|
|
614
|
+
message?: string;
|
|
615
|
+
payload?: Record<string, unknown>;
|
|
616
|
+
}): Promise<{
|
|
617
|
+
ok: boolean;
|
|
618
|
+
jobId: string;
|
|
619
|
+
status: string;
|
|
620
|
+
}>;
|
|
621
|
+
getAccountAgentContext(teamId: string, accountRef: string, params?: {
|
|
622
|
+
expand?: string;
|
|
623
|
+
}): Promise<Record<string, unknown>>;
|
|
624
|
+
getJobAgentContext(teamId: string, jobId: string): Promise<Record<string, unknown>>;
|
|
625
|
+
listAccountPools(teamId: string, accountRef: string, params?: {
|
|
626
|
+
status?: string;
|
|
627
|
+
industry?: string;
|
|
628
|
+
limit?: number;
|
|
629
|
+
}): Promise<{
|
|
630
|
+
items: unknown[];
|
|
631
|
+
}>;
|
|
632
|
+
listSubredditCandidates(teamId: string, accountRef: string, params?: {
|
|
633
|
+
industry?: string;
|
|
634
|
+
action?: string;
|
|
635
|
+
limit?: number;
|
|
636
|
+
}): Promise<{
|
|
637
|
+
items: unknown[];
|
|
638
|
+
}>;
|
|
639
|
+
listSettings(): Promise<{
|
|
640
|
+
items: Array<{
|
|
641
|
+
key: string;
|
|
642
|
+
value: string;
|
|
643
|
+
}>;
|
|
644
|
+
}>;
|
|
645
|
+
getSetting(key: string): Promise<{
|
|
646
|
+
key: string;
|
|
647
|
+
value: string;
|
|
648
|
+
}>;
|
|
649
|
+
upsertSetting(key: string, body: {
|
|
650
|
+
value: string;
|
|
651
|
+
description?: string;
|
|
652
|
+
}): Promise<{
|
|
653
|
+
key: string;
|
|
654
|
+
value: string;
|
|
655
|
+
}>;
|
|
656
|
+
listTeamInvites(teamId: string): Promise<{
|
|
657
|
+
items: unknown[];
|
|
658
|
+
}>;
|
|
659
|
+
createTeamInvite(teamId: string, body: {
|
|
660
|
+
email: string;
|
|
661
|
+
role: string;
|
|
662
|
+
brandId?: string;
|
|
663
|
+
}): Promise<unknown>;
|
|
664
|
+
revokeTeamInvite(teamId: string, inviteId: string): Promise<{
|
|
665
|
+
ok: boolean;
|
|
666
|
+
}>;
|
|
667
|
+
listSystemMembers(): Promise<{
|
|
668
|
+
items: unknown[];
|
|
669
|
+
}>;
|
|
670
|
+
updateSystemMemberRole(userId: string, body: {
|
|
671
|
+
role: string;
|
|
672
|
+
}): Promise<{
|
|
673
|
+
updated: boolean;
|
|
674
|
+
}>;
|
|
675
|
+
listIndustryPools(teamId: string, params?: {
|
|
676
|
+
limit?: number;
|
|
677
|
+
}): Promise<{
|
|
678
|
+
items: unknown[];
|
|
679
|
+
}>;
|
|
680
|
+
}
|
|
681
|
+
//# sourceMappingURL=index.d.ts.map
|