@getlatedev/node 0.1.4 → 0.1.6
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 +3 -0
- package/dist/index.d.mts +940 -10
- package/dist/index.d.ts +940 -10
- package/dist/index.js +148 -0
- package/dist/index.mjs +148 -0
- package/package.json +1 -1
- package/src/client.ts +56 -0
- package/src/generated/sdk.gen.ts +246 -2
- package/src/generated/types.gen.ts +967 -9
|
@@ -1276,7 +1276,7 @@ export type Webhook = {
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* Events subscribed to
|
|
1278
1278
|
*/
|
|
1279
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected')>;
|
|
1279
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received')>;
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Whether webhook delivery is enabled
|
|
1282
1282
|
*/
|
|
@@ -1310,7 +1310,7 @@ export type WebhookLog = {
|
|
|
1310
1310
|
* Name of the webhook that was triggered
|
|
1311
1311
|
*/
|
|
1312
1312
|
webhookName?: string;
|
|
1313
|
-
event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'webhook.test';
|
|
1313
|
+
event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received' | 'webhook.test';
|
|
1314
1314
|
url?: string;
|
|
1315
1315
|
status?: 'success' | 'failed';
|
|
1316
1316
|
/**
|
|
@@ -1342,7 +1342,7 @@ export type WebhookLog = {
|
|
|
1342
1342
|
createdAt?: string;
|
|
1343
1343
|
};
|
|
1344
1344
|
|
|
1345
|
-
export type event = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'webhook.test';
|
|
1345
|
+
export type event = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received' | 'webhook.test';
|
|
1346
1346
|
|
|
1347
1347
|
export type status5 = 'success' | 'failed';
|
|
1348
1348
|
|
|
@@ -1405,6 +1405,84 @@ export type event3 = 'account.disconnected';
|
|
|
1405
1405
|
*/
|
|
1406
1406
|
export type disconnectionType = 'intentional' | 'unintentional';
|
|
1407
1407
|
|
|
1408
|
+
/**
|
|
1409
|
+
* Webhook payload for message received events (DMs from Instagram, Telegram)
|
|
1410
|
+
*/
|
|
1411
|
+
export type WebhookPayloadMessage = {
|
|
1412
|
+
event?: 'message.received';
|
|
1413
|
+
message?: {
|
|
1414
|
+
/**
|
|
1415
|
+
* Internal message ID
|
|
1416
|
+
*/
|
|
1417
|
+
id?: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* Internal conversation ID
|
|
1420
|
+
*/
|
|
1421
|
+
conversationId?: string;
|
|
1422
|
+
platform?: 'instagram' | 'facebook' | 'telegram';
|
|
1423
|
+
/**
|
|
1424
|
+
* Platform's message ID
|
|
1425
|
+
*/
|
|
1426
|
+
platformMessageId?: string;
|
|
1427
|
+
direction?: 'incoming';
|
|
1428
|
+
/**
|
|
1429
|
+
* Message text content
|
|
1430
|
+
*/
|
|
1431
|
+
text?: (string) | null;
|
|
1432
|
+
attachments?: Array<{
|
|
1433
|
+
/**
|
|
1434
|
+
* Attachment type (image, video, file, sticker, audio)
|
|
1435
|
+
*/
|
|
1436
|
+
type?: string;
|
|
1437
|
+
/**
|
|
1438
|
+
* Attachment URL (may expire for Meta platforms)
|
|
1439
|
+
*/
|
|
1440
|
+
url?: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* Additional attachment metadata
|
|
1443
|
+
*/
|
|
1444
|
+
payload?: {
|
|
1445
|
+
[key: string]: unknown;
|
|
1446
|
+
};
|
|
1447
|
+
}>;
|
|
1448
|
+
sender?: {
|
|
1449
|
+
id?: string;
|
|
1450
|
+
name?: string;
|
|
1451
|
+
username?: string;
|
|
1452
|
+
picture?: string;
|
|
1453
|
+
};
|
|
1454
|
+
sentAt?: string;
|
|
1455
|
+
isRead?: boolean;
|
|
1456
|
+
};
|
|
1457
|
+
conversation?: {
|
|
1458
|
+
id?: string;
|
|
1459
|
+
platformConversationId?: string;
|
|
1460
|
+
participantId?: string;
|
|
1461
|
+
participantName?: string;
|
|
1462
|
+
participantUsername?: string;
|
|
1463
|
+
participantPicture?: string;
|
|
1464
|
+
status?: 'active' | 'archived';
|
|
1465
|
+
};
|
|
1466
|
+
account?: {
|
|
1467
|
+
/**
|
|
1468
|
+
* Social account ID
|
|
1469
|
+
*/
|
|
1470
|
+
id?: string;
|
|
1471
|
+
platform?: string;
|
|
1472
|
+
username?: string;
|
|
1473
|
+
displayName?: string;
|
|
1474
|
+
};
|
|
1475
|
+
timestamp?: string;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
export type event4 = 'message.received';
|
|
1479
|
+
|
|
1480
|
+
export type platform2 = 'instagram' | 'facebook' | 'telegram';
|
|
1481
|
+
|
|
1482
|
+
export type direction = 'incoming';
|
|
1483
|
+
|
|
1484
|
+
export type status6 = 'active' | 'archived';
|
|
1485
|
+
|
|
1408
1486
|
/**
|
|
1409
1487
|
* Webhook payload for post events
|
|
1410
1488
|
*/
|
|
@@ -1426,7 +1504,7 @@ export type WebhookPayloadPost = {
|
|
|
1426
1504
|
timestamp?: string;
|
|
1427
1505
|
};
|
|
1428
1506
|
|
|
1429
|
-
export type
|
|
1507
|
+
export type event5 = 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial';
|
|
1430
1508
|
|
|
1431
1509
|
export type YouTubeDailyViewsResponse = {
|
|
1432
1510
|
success?: boolean;
|
|
@@ -1473,6 +1551,7 @@ export type YouTubeDailyViewsResponse = {
|
|
|
1473
1551
|
* - Custom thumbnails NOT supported for Shorts via API
|
|
1474
1552
|
* - Scheduled videos are uploaded immediately as the specified visibility and published at scheduled time
|
|
1475
1553
|
* - Visibility defaults to "public" if not specified
|
|
1554
|
+
* - madeForKids defaults to false (not child-directed)
|
|
1476
1555
|
* - Set containsSyntheticMedia: true if your video contains AI-generated content
|
|
1477
1556
|
*
|
|
1478
1557
|
*/
|
|
@@ -1489,6 +1568,19 @@ export type YouTubePlatformData = {
|
|
|
1489
1568
|
*
|
|
1490
1569
|
*/
|
|
1491
1570
|
visibility?: 'public' | 'private' | 'unlisted';
|
|
1571
|
+
/**
|
|
1572
|
+
* COPPA compliance: Audience designation for the video.
|
|
1573
|
+
* - true: Video is made for kids (child-directed content)
|
|
1574
|
+
* - false: Video is NOT made for kids (default)
|
|
1575
|
+
*
|
|
1576
|
+
* This field maps to YouTube's `selfDeclaredMadeForKids` setting. Videos marked as made for kids
|
|
1577
|
+
* have restricted features (no comments, no notifications, limited ad targeting).
|
|
1578
|
+
*
|
|
1579
|
+
* IMPORTANT: If not specified, defaults to false. YouTube requires this to be explicitly set,
|
|
1580
|
+
* otherwise the video may be blocked from views until configured in YouTube Studio.
|
|
1581
|
+
*
|
|
1582
|
+
*/
|
|
1583
|
+
madeForKids?: boolean;
|
|
1492
1584
|
/**
|
|
1493
1585
|
* Optional first comment to post immediately after video upload. Up to 10,000 characters (YouTube's comment limit).
|
|
1494
1586
|
*/
|
|
@@ -2048,6 +2140,13 @@ export type CreatePostData = {
|
|
|
2048
2140
|
metadata?: {
|
|
2049
2141
|
[key: string]: unknown;
|
|
2050
2142
|
};
|
|
2143
|
+
/**
|
|
2144
|
+
* Root-level TikTok settings applied to all TikTok platforms in the request.
|
|
2145
|
+
* This is a convenience shorthand. Settings here are merged into each TikTok
|
|
2146
|
+
* platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
2147
|
+
*
|
|
2148
|
+
*/
|
|
2149
|
+
tiktokSettings?: TikTokPlatformData;
|
|
2051
2150
|
/**
|
|
2052
2151
|
* Profile ID to schedule via queue.
|
|
2053
2152
|
*
|
|
@@ -2073,6 +2172,21 @@ export type CreatePostResponse = (PostCreateResponse);
|
|
|
2073
2172
|
|
|
2074
2173
|
export type CreatePostError = ({
|
|
2075
2174
|
error?: string;
|
|
2175
|
+
} | {
|
|
2176
|
+
error?: string;
|
|
2177
|
+
details?: {
|
|
2178
|
+
accountId?: string;
|
|
2179
|
+
platform?: string;
|
|
2180
|
+
existingPostId?: string;
|
|
2181
|
+
};
|
|
2182
|
+
} | {
|
|
2183
|
+
error?: string;
|
|
2184
|
+
/**
|
|
2185
|
+
* Additional context about the rate limit
|
|
2186
|
+
*/
|
|
2187
|
+
details?: {
|
|
2188
|
+
[key: string]: unknown;
|
|
2189
|
+
};
|
|
2076
2190
|
});
|
|
2077
2191
|
|
|
2078
2192
|
export type GetPostData = {
|
|
@@ -2137,6 +2251,11 @@ export type BulkUploadPostsResponse = ({
|
|
|
2137
2251
|
|
|
2138
2252
|
export type BulkUploadPostsError = (unknown | {
|
|
2139
2253
|
error?: string;
|
|
2254
|
+
} | {
|
|
2255
|
+
error?: string;
|
|
2256
|
+
details?: {
|
|
2257
|
+
[key: string]: unknown;
|
|
2258
|
+
};
|
|
2140
2259
|
});
|
|
2141
2260
|
|
|
2142
2261
|
export type RetryPostData = {
|
|
@@ -2149,6 +2268,11 @@ export type RetryPostResponse = (PostRetryResponse | unknown);
|
|
|
2149
2268
|
|
|
2150
2269
|
export type RetryPostError = (unknown | {
|
|
2151
2270
|
error?: string;
|
|
2271
|
+
} | {
|
|
2272
|
+
error?: string;
|
|
2273
|
+
details?: {
|
|
2274
|
+
[key: string]: unknown;
|
|
2275
|
+
};
|
|
2152
2276
|
});
|
|
2153
2277
|
|
|
2154
2278
|
export type ListUsersResponse = ({
|
|
@@ -2736,6 +2860,10 @@ export type SelectFacebookPageResponse = ({
|
|
|
2736
2860
|
*/
|
|
2737
2861
|
redirect_url?: string;
|
|
2738
2862
|
account?: {
|
|
2863
|
+
/**
|
|
2864
|
+
* ID of the created SocialAccount
|
|
2865
|
+
*/
|
|
2866
|
+
accountId?: string;
|
|
2739
2867
|
platform?: 'facebook';
|
|
2740
2868
|
username?: string;
|
|
2741
2869
|
displayName?: string;
|
|
@@ -2844,6 +2972,10 @@ export type SelectGoogleBusinessLocationResponse = ({
|
|
|
2844
2972
|
*/
|
|
2845
2973
|
redirect_url?: string;
|
|
2846
2974
|
account?: {
|
|
2975
|
+
/**
|
|
2976
|
+
* ID of the created SocialAccount
|
|
2977
|
+
*/
|
|
2978
|
+
accountId?: string;
|
|
2847
2979
|
platform?: 'googlebusiness';
|
|
2848
2980
|
username?: string;
|
|
2849
2981
|
displayName?: string;
|
|
@@ -3050,7 +3182,26 @@ export type SelectLinkedInOrganizationData = {
|
|
|
3050
3182
|
|
|
3051
3183
|
export type SelectLinkedInOrganizationResponse = ({
|
|
3052
3184
|
message?: string;
|
|
3053
|
-
|
|
3185
|
+
/**
|
|
3186
|
+
* The redirect URL with connection params appended (only if redirect_url was provided in request)
|
|
3187
|
+
*/
|
|
3188
|
+
redirect_url?: string;
|
|
3189
|
+
account?: {
|
|
3190
|
+
/**
|
|
3191
|
+
* ID of the created SocialAccount
|
|
3192
|
+
*/
|
|
3193
|
+
accountId?: string;
|
|
3194
|
+
platform?: 'linkedin';
|
|
3195
|
+
username?: string;
|
|
3196
|
+
displayName?: string;
|
|
3197
|
+
profilePicture?: string;
|
|
3198
|
+
isActive?: boolean;
|
|
3199
|
+
accountType?: 'personal' | 'organization';
|
|
3200
|
+
};
|
|
3201
|
+
bulkRefresh?: {
|
|
3202
|
+
updatedCount?: number;
|
|
3203
|
+
errors?: number;
|
|
3204
|
+
};
|
|
3054
3205
|
});
|
|
3055
3206
|
|
|
3056
3207
|
export type SelectLinkedInOrganizationError = (unknown | {
|
|
@@ -3147,6 +3298,10 @@ export type SelectPinterestBoardResponse = ({
|
|
|
3147
3298
|
*/
|
|
3148
3299
|
redirect_url?: string;
|
|
3149
3300
|
account?: {
|
|
3301
|
+
/**
|
|
3302
|
+
* ID of the created SocialAccount
|
|
3303
|
+
*/
|
|
3304
|
+
accountId?: string;
|
|
3150
3305
|
platform?: 'pinterest';
|
|
3151
3306
|
username?: string;
|
|
3152
3307
|
displayName?: string;
|
|
@@ -3277,6 +3432,10 @@ export type SelectSnapchatProfileResponse = ({
|
|
|
3277
3432
|
*/
|
|
3278
3433
|
redirect_url?: string;
|
|
3279
3434
|
account?: {
|
|
3435
|
+
/**
|
|
3436
|
+
* ID of the created SocialAccount
|
|
3437
|
+
*/
|
|
3438
|
+
accountId?: string;
|
|
3280
3439
|
platform?: 'snapchat';
|
|
3281
3440
|
username?: string;
|
|
3282
3441
|
displayName?: string;
|
|
@@ -3427,6 +3586,28 @@ export type CompleteTelegramConnectError = ({
|
|
|
3427
3586
|
error?: string;
|
|
3428
3587
|
} | unknown);
|
|
3429
3588
|
|
|
3589
|
+
export type GetFacebookPagesData = {
|
|
3590
|
+
path: {
|
|
3591
|
+
accountId: string;
|
|
3592
|
+
};
|
|
3593
|
+
};
|
|
3594
|
+
|
|
3595
|
+
export type GetFacebookPagesResponse = ({
|
|
3596
|
+
pages?: Array<{
|
|
3597
|
+
id?: string;
|
|
3598
|
+
name?: string;
|
|
3599
|
+
username?: string;
|
|
3600
|
+
category?: string;
|
|
3601
|
+
fan_count?: number;
|
|
3602
|
+
}>;
|
|
3603
|
+
selectedPageId?: string;
|
|
3604
|
+
cached?: boolean;
|
|
3605
|
+
});
|
|
3606
|
+
|
|
3607
|
+
export type GetFacebookPagesError = ({
|
|
3608
|
+
error?: string;
|
|
3609
|
+
} | unknown);
|
|
3610
|
+
|
|
3430
3611
|
export type UpdateFacebookPageData = {
|
|
3431
3612
|
body: {
|
|
3432
3613
|
selectedPageId: string;
|
|
@@ -3438,7 +3619,10 @@ export type UpdateFacebookPageData = {
|
|
|
3438
3619
|
|
|
3439
3620
|
export type UpdateFacebookPageResponse = ({
|
|
3440
3621
|
message?: string;
|
|
3441
|
-
|
|
3622
|
+
selectedPage?: {
|
|
3623
|
+
id?: string;
|
|
3624
|
+
name?: string;
|
|
3625
|
+
};
|
|
3442
3626
|
});
|
|
3443
3627
|
|
|
3444
3628
|
export type UpdateFacebookPageError = (unknown | {
|
|
@@ -3709,6 +3893,51 @@ export type UpdatePinterestBoardsError = (unknown | {
|
|
|
3709
3893
|
error?: string;
|
|
3710
3894
|
});
|
|
3711
3895
|
|
|
3896
|
+
export type GetGmbLocationsData = {
|
|
3897
|
+
path: {
|
|
3898
|
+
accountId: string;
|
|
3899
|
+
};
|
|
3900
|
+
};
|
|
3901
|
+
|
|
3902
|
+
export type GetGmbLocationsResponse = ({
|
|
3903
|
+
locations?: Array<{
|
|
3904
|
+
id?: string;
|
|
3905
|
+
name?: string;
|
|
3906
|
+
accountId?: string;
|
|
3907
|
+
accountName?: string;
|
|
3908
|
+
address?: string;
|
|
3909
|
+
category?: string;
|
|
3910
|
+
websiteUrl?: string;
|
|
3911
|
+
}>;
|
|
3912
|
+
selectedLocationId?: string;
|
|
3913
|
+
cached?: boolean;
|
|
3914
|
+
});
|
|
3915
|
+
|
|
3916
|
+
export type GetGmbLocationsError = ({
|
|
3917
|
+
error?: string;
|
|
3918
|
+
} | unknown);
|
|
3919
|
+
|
|
3920
|
+
export type UpdateGmbLocationData = {
|
|
3921
|
+
body: {
|
|
3922
|
+
selectedLocationId: string;
|
|
3923
|
+
};
|
|
3924
|
+
path: {
|
|
3925
|
+
accountId: string;
|
|
3926
|
+
};
|
|
3927
|
+
};
|
|
3928
|
+
|
|
3929
|
+
export type UpdateGmbLocationResponse = ({
|
|
3930
|
+
message?: string;
|
|
3931
|
+
selectedLocation?: {
|
|
3932
|
+
id?: string;
|
|
3933
|
+
name?: string;
|
|
3934
|
+
};
|
|
3935
|
+
});
|
|
3936
|
+
|
|
3937
|
+
export type UpdateGmbLocationError = (unknown | {
|
|
3938
|
+
error?: string;
|
|
3939
|
+
});
|
|
3940
|
+
|
|
3712
3941
|
export type GetRedditSubredditsData = {
|
|
3713
3942
|
path: {
|
|
3714
3943
|
accountId: string;
|
|
@@ -3949,7 +4178,7 @@ export type CreateWebhookSettingsData = {
|
|
|
3949
4178
|
/**
|
|
3950
4179
|
* Events to subscribe to
|
|
3951
4180
|
*/
|
|
3952
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected')>;
|
|
4181
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received')>;
|
|
3953
4182
|
/**
|
|
3954
4183
|
* Enable or disable webhook delivery
|
|
3955
4184
|
*/
|
|
@@ -3993,7 +4222,7 @@ export type UpdateWebhookSettingsData = {
|
|
|
3993
4222
|
/**
|
|
3994
4223
|
* Events to subscribe to
|
|
3995
4224
|
*/
|
|
3996
|
-
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected')>;
|
|
4225
|
+
events?: Array<('post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received')>;
|
|
3997
4226
|
/**
|
|
3998
4227
|
* Enable or disable webhook delivery
|
|
3999
4228
|
*/
|
|
@@ -4059,7 +4288,7 @@ export type GetWebhookLogsData = {
|
|
|
4059
4288
|
/**
|
|
4060
4289
|
* Filter by event type
|
|
4061
4290
|
*/
|
|
4062
|
-
event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'webhook.test';
|
|
4291
|
+
event?: 'post.scheduled' | 'post.published' | 'post.failed' | 'post.partial' | 'account.connected' | 'account.disconnected' | 'message.received' | 'webhook.test';
|
|
4063
4292
|
/**
|
|
4064
4293
|
* Maximum number of logs to return (max 100)
|
|
4065
4294
|
*/
|
|
@@ -4176,4 +4405,733 @@ export type GetPostLogsResponse = ({
|
|
|
4176
4405
|
|
|
4177
4406
|
export type GetPostLogsError = ({
|
|
4178
4407
|
error?: string;
|
|
4408
|
+
} | unknown);
|
|
4409
|
+
|
|
4410
|
+
export type ListInboxConversationsData = {
|
|
4411
|
+
query?: {
|
|
4412
|
+
/**
|
|
4413
|
+
* Filter by specific social account ID
|
|
4414
|
+
*/
|
|
4415
|
+
accountId?: string;
|
|
4416
|
+
/**
|
|
4417
|
+
* Pagination cursor for next page
|
|
4418
|
+
*/
|
|
4419
|
+
cursor?: string;
|
|
4420
|
+
/**
|
|
4421
|
+
* Maximum number of conversations to return
|
|
4422
|
+
*/
|
|
4423
|
+
limit?: number;
|
|
4424
|
+
/**
|
|
4425
|
+
* Filter by platform
|
|
4426
|
+
*/
|
|
4427
|
+
platform?: 'facebook' | 'instagram' | 'bluesky' | 'reddit' | 'telegram';
|
|
4428
|
+
/**
|
|
4429
|
+
* Filter by profile ID
|
|
4430
|
+
*/
|
|
4431
|
+
profileId?: string;
|
|
4432
|
+
/**
|
|
4433
|
+
* Sort order by updated time
|
|
4434
|
+
*/
|
|
4435
|
+
sortOrder?: 'asc' | 'desc';
|
|
4436
|
+
/**
|
|
4437
|
+
* Filter by conversation status
|
|
4438
|
+
*/
|
|
4439
|
+
status?: 'active' | 'archived';
|
|
4440
|
+
};
|
|
4441
|
+
};
|
|
4442
|
+
|
|
4443
|
+
export type ListInboxConversationsResponse = ({
|
|
4444
|
+
data?: Array<{
|
|
4445
|
+
id?: string;
|
|
4446
|
+
platform?: string;
|
|
4447
|
+
accountId?: string;
|
|
4448
|
+
accountUsername?: string;
|
|
4449
|
+
participantId?: string;
|
|
4450
|
+
participantName?: string;
|
|
4451
|
+
participantPicture?: (string) | null;
|
|
4452
|
+
lastMessage?: string;
|
|
4453
|
+
updatedTime?: string;
|
|
4454
|
+
status?: 'active' | 'archived';
|
|
4455
|
+
/**
|
|
4456
|
+
* Number of unread messages
|
|
4457
|
+
*/
|
|
4458
|
+
unreadCount?: (number) | null;
|
|
4459
|
+
/**
|
|
4460
|
+
* Direct link to open the conversation on the platform (if available)
|
|
4461
|
+
*/
|
|
4462
|
+
url?: (string) | null;
|
|
4463
|
+
}>;
|
|
4464
|
+
pagination?: {
|
|
4465
|
+
hasMore?: boolean;
|
|
4466
|
+
nextCursor?: (string) | null;
|
|
4467
|
+
};
|
|
4468
|
+
meta?: {
|
|
4469
|
+
accountsQueried?: number;
|
|
4470
|
+
accountsFailed?: number;
|
|
4471
|
+
failedAccounts?: Array<{
|
|
4472
|
+
accountId?: string;
|
|
4473
|
+
accountUsername?: (string) | null;
|
|
4474
|
+
platform?: string;
|
|
4475
|
+
error?: string;
|
|
4476
|
+
/**
|
|
4477
|
+
* Error code if available
|
|
4478
|
+
*/
|
|
4479
|
+
code?: (string) | null;
|
|
4480
|
+
/**
|
|
4481
|
+
* Seconds to wait before retry (rate limits)
|
|
4482
|
+
*/
|
|
4483
|
+
retryAfter?: (number) | null;
|
|
4484
|
+
}>;
|
|
4485
|
+
lastUpdated?: string;
|
|
4486
|
+
};
|
|
4487
|
+
});
|
|
4488
|
+
|
|
4489
|
+
export type ListInboxConversationsError = ({
|
|
4490
|
+
error?: string;
|
|
4491
|
+
} | unknown);
|
|
4492
|
+
|
|
4493
|
+
export type GetInboxConversationData = {
|
|
4494
|
+
path: {
|
|
4495
|
+
conversationId: string;
|
|
4496
|
+
};
|
|
4497
|
+
query: {
|
|
4498
|
+
/**
|
|
4499
|
+
* The social account ID
|
|
4500
|
+
*/
|
|
4501
|
+
accountId: string;
|
|
4502
|
+
};
|
|
4503
|
+
};
|
|
4504
|
+
|
|
4505
|
+
export type GetInboxConversationResponse = ({
|
|
4506
|
+
data?: {
|
|
4507
|
+
id?: string;
|
|
4508
|
+
accountId?: string;
|
|
4509
|
+
accountUsername?: string;
|
|
4510
|
+
platform?: string;
|
|
4511
|
+
status?: 'active' | 'archived';
|
|
4512
|
+
participantName?: string;
|
|
4513
|
+
participantId?: string;
|
|
4514
|
+
lastMessage?: string;
|
|
4515
|
+
lastMessageAt?: string;
|
|
4516
|
+
updatedTime?: string;
|
|
4517
|
+
participants?: Array<{
|
|
4518
|
+
id?: string;
|
|
4519
|
+
name?: string;
|
|
4520
|
+
}>;
|
|
4521
|
+
};
|
|
4522
|
+
});
|
|
4523
|
+
|
|
4524
|
+
export type GetInboxConversationError = ({
|
|
4525
|
+
error?: string;
|
|
4526
|
+
} | unknown);
|
|
4527
|
+
|
|
4528
|
+
export type UpdateInboxConversationData = {
|
|
4529
|
+
body: {
|
|
4530
|
+
/**
|
|
4531
|
+
* Social account ID
|
|
4532
|
+
*/
|
|
4533
|
+
accountId: string;
|
|
4534
|
+
status: 'active' | 'archived';
|
|
4535
|
+
};
|
|
4536
|
+
path: {
|
|
4537
|
+
conversationId: string;
|
|
4538
|
+
};
|
|
4539
|
+
};
|
|
4540
|
+
|
|
4541
|
+
export type UpdateInboxConversationResponse = ({
|
|
4542
|
+
success?: boolean;
|
|
4543
|
+
data?: {
|
|
4544
|
+
id?: string;
|
|
4545
|
+
accountId?: string;
|
|
4546
|
+
status?: 'active' | 'archived';
|
|
4547
|
+
platform?: string;
|
|
4548
|
+
updatedAt?: string;
|
|
4549
|
+
};
|
|
4550
|
+
});
|
|
4551
|
+
|
|
4552
|
+
export type UpdateInboxConversationError = ({
|
|
4553
|
+
error?: string;
|
|
4554
|
+
} | unknown);
|
|
4555
|
+
|
|
4556
|
+
export type GetInboxConversationMessagesData = {
|
|
4557
|
+
path: {
|
|
4558
|
+
conversationId: string;
|
|
4559
|
+
};
|
|
4560
|
+
query: {
|
|
4561
|
+
/**
|
|
4562
|
+
* Social account ID
|
|
4563
|
+
*/
|
|
4564
|
+
accountId: string;
|
|
4565
|
+
};
|
|
4566
|
+
};
|
|
4567
|
+
|
|
4568
|
+
export type GetInboxConversationMessagesResponse = ({
|
|
4569
|
+
status?: string;
|
|
4570
|
+
messages?: Array<{
|
|
4571
|
+
id?: string;
|
|
4572
|
+
conversationId?: string;
|
|
4573
|
+
accountId?: string;
|
|
4574
|
+
platform?: string;
|
|
4575
|
+
message?: string;
|
|
4576
|
+
senderId?: string;
|
|
4577
|
+
senderName?: (string) | null;
|
|
4578
|
+
direction?: 'incoming' | 'outgoing';
|
|
4579
|
+
createdAt?: string;
|
|
4580
|
+
attachments?: Array<{
|
|
4581
|
+
id?: string;
|
|
4582
|
+
type?: 'image' | 'video' | 'audio' | 'file' | 'sticker' | 'share';
|
|
4583
|
+
url?: string;
|
|
4584
|
+
filename?: (string) | null;
|
|
4585
|
+
previewUrl?: (string) | null;
|
|
4586
|
+
}>;
|
|
4587
|
+
/**
|
|
4588
|
+
* Reddit message subject
|
|
4589
|
+
*/
|
|
4590
|
+
subject?: (string) | null;
|
|
4591
|
+
/**
|
|
4592
|
+
* Instagram story reply
|
|
4593
|
+
*/
|
|
4594
|
+
storyReply?: (boolean) | null;
|
|
4595
|
+
/**
|
|
4596
|
+
* Instagram story mention
|
|
4597
|
+
*/
|
|
4598
|
+
isStoryMention?: (boolean) | null;
|
|
4599
|
+
}>;
|
|
4600
|
+
lastUpdated?: string;
|
|
4601
|
+
});
|
|
4602
|
+
|
|
4603
|
+
export type GetInboxConversationMessagesError = ({
|
|
4604
|
+
error?: string;
|
|
4605
|
+
} | unknown);
|
|
4606
|
+
|
|
4607
|
+
export type SendInboxMessageData = {
|
|
4608
|
+
body: {
|
|
4609
|
+
/**
|
|
4610
|
+
* Social account ID
|
|
4611
|
+
*/
|
|
4612
|
+
accountId: string;
|
|
4613
|
+
/**
|
|
4614
|
+
* Message text
|
|
4615
|
+
*/
|
|
4616
|
+
message: string;
|
|
4617
|
+
};
|
|
4618
|
+
path: {
|
|
4619
|
+
conversationId: string;
|
|
4620
|
+
};
|
|
4621
|
+
};
|
|
4622
|
+
|
|
4623
|
+
export type SendInboxMessageResponse = ({
|
|
4624
|
+
success?: boolean;
|
|
4625
|
+
data?: {
|
|
4626
|
+
/**
|
|
4627
|
+
* ID of the sent message (not returned for Reddit)
|
|
4628
|
+
*/
|
|
4629
|
+
messageId?: string;
|
|
4630
|
+
/**
|
|
4631
|
+
* Twitter conversation ID
|
|
4632
|
+
*/
|
|
4633
|
+
conversationId?: (string) | null;
|
|
4634
|
+
/**
|
|
4635
|
+
* Bluesky sent timestamp
|
|
4636
|
+
*/
|
|
4637
|
+
sentAt?: (string) | null;
|
|
4638
|
+
/**
|
|
4639
|
+
* Success message (Reddit only)
|
|
4640
|
+
*/
|
|
4641
|
+
message?: (string) | null;
|
|
4642
|
+
};
|
|
4643
|
+
});
|
|
4644
|
+
|
|
4645
|
+
export type SendInboxMessageError = ({
|
|
4646
|
+
error?: string;
|
|
4647
|
+
code?: 'PLATFORM_LIMITATION';
|
|
4648
|
+
} | {
|
|
4649
|
+
error?: string;
|
|
4650
|
+
} | unknown);
|
|
4651
|
+
|
|
4652
|
+
export type ListInboxCommentsData = {
|
|
4653
|
+
query?: {
|
|
4654
|
+
/**
|
|
4655
|
+
* Filter by specific social account ID
|
|
4656
|
+
*/
|
|
4657
|
+
accountId?: string;
|
|
4658
|
+
cursor?: string;
|
|
4659
|
+
limit?: number;
|
|
4660
|
+
/**
|
|
4661
|
+
* Minimum comment count
|
|
4662
|
+
*/
|
|
4663
|
+
minComments?: number;
|
|
4664
|
+
/**
|
|
4665
|
+
* Filter by platform
|
|
4666
|
+
*/
|
|
4667
|
+
platform?: 'facebook' | 'instagram' | 'youtube' | 'linkedin' | 'reddit' | 'bluesky' | 'tiktok';
|
|
4668
|
+
/**
|
|
4669
|
+
* Filter by profile ID
|
|
4670
|
+
*/
|
|
4671
|
+
profileId?: string;
|
|
4672
|
+
/**
|
|
4673
|
+
* Posts created after this date
|
|
4674
|
+
*/
|
|
4675
|
+
since?: string;
|
|
4676
|
+
/**
|
|
4677
|
+
* Sort field
|
|
4678
|
+
*/
|
|
4679
|
+
sortBy?: 'date' | 'comments';
|
|
4680
|
+
/**
|
|
4681
|
+
* Sort order
|
|
4682
|
+
*/
|
|
4683
|
+
sortOrder?: 'asc' | 'desc';
|
|
4684
|
+
};
|
|
4685
|
+
};
|
|
4686
|
+
|
|
4687
|
+
export type ListInboxCommentsResponse = ({
|
|
4688
|
+
data?: Array<{
|
|
4689
|
+
id?: string;
|
|
4690
|
+
platform?: string;
|
|
4691
|
+
accountId?: string;
|
|
4692
|
+
accountUsername?: string;
|
|
4693
|
+
content?: string;
|
|
4694
|
+
picture?: (string) | null;
|
|
4695
|
+
permalink?: (string) | null;
|
|
4696
|
+
createdTime?: string;
|
|
4697
|
+
commentCount?: number;
|
|
4698
|
+
likeCount?: number;
|
|
4699
|
+
/**
|
|
4700
|
+
* Bluesky content identifier
|
|
4701
|
+
*/
|
|
4702
|
+
cid?: (string) | null;
|
|
4703
|
+
/**
|
|
4704
|
+
* Reddit subreddit name
|
|
4705
|
+
*/
|
|
4706
|
+
subreddit?: (string) | null;
|
|
4707
|
+
}>;
|
|
4708
|
+
pagination?: {
|
|
4709
|
+
hasMore?: boolean;
|
|
4710
|
+
nextCursor?: (string) | null;
|
|
4711
|
+
};
|
|
4712
|
+
meta?: {
|
|
4713
|
+
accountsQueried?: number;
|
|
4714
|
+
accountsFailed?: number;
|
|
4715
|
+
failedAccounts?: Array<{
|
|
4716
|
+
accountId?: string;
|
|
4717
|
+
accountUsername?: (string) | null;
|
|
4718
|
+
platform?: string;
|
|
4719
|
+
error?: string;
|
|
4720
|
+
/**
|
|
4721
|
+
* Error code if available
|
|
4722
|
+
*/
|
|
4723
|
+
code?: (string) | null;
|
|
4724
|
+
/**
|
|
4725
|
+
* Seconds to wait before retry (rate limits)
|
|
4726
|
+
*/
|
|
4727
|
+
retryAfter?: (number) | null;
|
|
4728
|
+
}>;
|
|
4729
|
+
lastUpdated?: string;
|
|
4730
|
+
};
|
|
4731
|
+
});
|
|
4732
|
+
|
|
4733
|
+
export type ListInboxCommentsError = ({
|
|
4734
|
+
error?: string;
|
|
4735
|
+
} | unknown);
|
|
4736
|
+
|
|
4737
|
+
export type GetInboxPostCommentsData = {
|
|
4738
|
+
path: {
|
|
4739
|
+
postId: string;
|
|
4740
|
+
};
|
|
4741
|
+
query: {
|
|
4742
|
+
accountId: string;
|
|
4743
|
+
/**
|
|
4744
|
+
* (Reddit only) Get replies to a specific comment
|
|
4745
|
+
*/
|
|
4746
|
+
commentId?: string;
|
|
4747
|
+
/**
|
|
4748
|
+
* Pagination cursor
|
|
4749
|
+
*/
|
|
4750
|
+
cursor?: string;
|
|
4751
|
+
/**
|
|
4752
|
+
* Maximum number of comments to return
|
|
4753
|
+
*/
|
|
4754
|
+
limit?: number;
|
|
4755
|
+
/**
|
|
4756
|
+
* (Reddit only) Subreddit name
|
|
4757
|
+
*/
|
|
4758
|
+
subreddit?: string;
|
|
4759
|
+
};
|
|
4760
|
+
};
|
|
4761
|
+
|
|
4762
|
+
export type GetInboxPostCommentsResponse = ({
|
|
4763
|
+
status?: string;
|
|
4764
|
+
comments?: Array<{
|
|
4765
|
+
id?: string;
|
|
4766
|
+
message?: string;
|
|
4767
|
+
createdTime?: string;
|
|
4768
|
+
from?: {
|
|
4769
|
+
id?: string;
|
|
4770
|
+
name?: string;
|
|
4771
|
+
username?: string;
|
|
4772
|
+
picture?: (string) | null;
|
|
4773
|
+
isOwner?: boolean;
|
|
4774
|
+
};
|
|
4775
|
+
likeCount?: number;
|
|
4776
|
+
replyCount?: number;
|
|
4777
|
+
/**
|
|
4778
|
+
* The platform this comment is from
|
|
4779
|
+
*/
|
|
4780
|
+
platform?: string;
|
|
4781
|
+
/**
|
|
4782
|
+
* Direct link to the comment on the platform (if available)
|
|
4783
|
+
*/
|
|
4784
|
+
url?: (string) | null;
|
|
4785
|
+
replies?: Array<{
|
|
4786
|
+
[key: string]: unknown;
|
|
4787
|
+
}>;
|
|
4788
|
+
canReply?: boolean;
|
|
4789
|
+
canDelete?: boolean;
|
|
4790
|
+
/**
|
|
4791
|
+
* Whether this comment can be hidden (Facebook
|
|
4792
|
+
*/
|
|
4793
|
+
canHide?: boolean;
|
|
4794
|
+
/**
|
|
4795
|
+
* Whether this comment can be liked (Facebook
|
|
4796
|
+
*/
|
|
4797
|
+
canLike?: boolean;
|
|
4798
|
+
/**
|
|
4799
|
+
* Whether the comment is currently hidden
|
|
4800
|
+
*/
|
|
4801
|
+
isHidden?: boolean;
|
|
4802
|
+
/**
|
|
4803
|
+
* Whether the current user has liked this comment
|
|
4804
|
+
*/
|
|
4805
|
+
isLiked?: boolean;
|
|
4806
|
+
/**
|
|
4807
|
+
* Bluesky like URI for unliking
|
|
4808
|
+
*/
|
|
4809
|
+
likeUri?: (string) | null;
|
|
4810
|
+
/**
|
|
4811
|
+
* Bluesky content identifier
|
|
4812
|
+
*/
|
|
4813
|
+
cid?: (string) | null;
|
|
4814
|
+
/**
|
|
4815
|
+
* Parent comment ID for nested replies
|
|
4816
|
+
*/
|
|
4817
|
+
parentId?: (string) | null;
|
|
4818
|
+
/**
|
|
4819
|
+
* Bluesky root post URI
|
|
4820
|
+
*/
|
|
4821
|
+
rootUri?: (string) | null;
|
|
4822
|
+
/**
|
|
4823
|
+
* Bluesky root post CID
|
|
4824
|
+
*/
|
|
4825
|
+
rootCid?: (string) | null;
|
|
4826
|
+
}>;
|
|
4827
|
+
pagination?: {
|
|
4828
|
+
hasMore?: boolean;
|
|
4829
|
+
cursor?: (string) | null;
|
|
4830
|
+
};
|
|
4831
|
+
meta?: {
|
|
4832
|
+
platform?: string;
|
|
4833
|
+
postId?: string;
|
|
4834
|
+
accountId?: string;
|
|
4835
|
+
/**
|
|
4836
|
+
* (Reddit only) Subreddit name
|
|
4837
|
+
*/
|
|
4838
|
+
subreddit?: (string) | null;
|
|
4839
|
+
lastUpdated?: string;
|
|
4840
|
+
};
|
|
4841
|
+
});
|
|
4842
|
+
|
|
4843
|
+
export type GetInboxPostCommentsError = ({
|
|
4844
|
+
error?: string;
|
|
4845
|
+
} | unknown);
|
|
4846
|
+
|
|
4847
|
+
export type ReplyToInboxPostData = {
|
|
4848
|
+
body: {
|
|
4849
|
+
accountId: string;
|
|
4850
|
+
message: string;
|
|
4851
|
+
/**
|
|
4852
|
+
* Reply to specific comment (optional)
|
|
4853
|
+
*/
|
|
4854
|
+
commentId?: string;
|
|
4855
|
+
/**
|
|
4856
|
+
* (Reddit only) Subreddit name for replies
|
|
4857
|
+
*/
|
|
4858
|
+
subreddit?: string;
|
|
4859
|
+
/**
|
|
4860
|
+
* (Bluesky only) Parent content identifier
|
|
4861
|
+
*/
|
|
4862
|
+
parentCid?: string;
|
|
4863
|
+
/**
|
|
4864
|
+
* (Bluesky only) Root post URI
|
|
4865
|
+
*/
|
|
4866
|
+
rootUri?: string;
|
|
4867
|
+
/**
|
|
4868
|
+
* (Bluesky only) Root post CID
|
|
4869
|
+
*/
|
|
4870
|
+
rootCid?: string;
|
|
4871
|
+
};
|
|
4872
|
+
path: {
|
|
4873
|
+
postId: string;
|
|
4874
|
+
};
|
|
4875
|
+
};
|
|
4876
|
+
|
|
4877
|
+
export type ReplyToInboxPostResponse = ({
|
|
4878
|
+
success?: boolean;
|
|
4879
|
+
data?: {
|
|
4880
|
+
commentId?: string;
|
|
4881
|
+
isReply?: boolean;
|
|
4882
|
+
/**
|
|
4883
|
+
* Bluesky CID
|
|
4884
|
+
*/
|
|
4885
|
+
cid?: (string) | null;
|
|
4886
|
+
};
|
|
4887
|
+
});
|
|
4888
|
+
|
|
4889
|
+
export type ReplyToInboxPostError = ({
|
|
4890
|
+
error?: string;
|
|
4891
|
+
} | unknown);
|
|
4892
|
+
|
|
4893
|
+
export type DeleteInboxCommentData = {
|
|
4894
|
+
path: {
|
|
4895
|
+
postId: string;
|
|
4896
|
+
};
|
|
4897
|
+
query: {
|
|
4898
|
+
accountId: string;
|
|
4899
|
+
commentId: string;
|
|
4900
|
+
};
|
|
4901
|
+
};
|
|
4902
|
+
|
|
4903
|
+
export type DeleteInboxCommentResponse = ({
|
|
4904
|
+
success?: boolean;
|
|
4905
|
+
data?: {
|
|
4906
|
+
message?: string;
|
|
4907
|
+
};
|
|
4908
|
+
});
|
|
4909
|
+
|
|
4910
|
+
export type DeleteInboxCommentError = ({
|
|
4911
|
+
error?: string;
|
|
4912
|
+
} | unknown);
|
|
4913
|
+
|
|
4914
|
+
export type HideInboxCommentData = {
|
|
4915
|
+
body: {
|
|
4916
|
+
/**
|
|
4917
|
+
* The social account ID
|
|
4918
|
+
*/
|
|
4919
|
+
accountId: string;
|
|
4920
|
+
};
|
|
4921
|
+
path: {
|
|
4922
|
+
commentId: string;
|
|
4923
|
+
postId: string;
|
|
4924
|
+
};
|
|
4925
|
+
};
|
|
4926
|
+
|
|
4927
|
+
export type HideInboxCommentResponse = ({
|
|
4928
|
+
status?: string;
|
|
4929
|
+
commentId?: string;
|
|
4930
|
+
hidden?: boolean;
|
|
4931
|
+
platform?: string;
|
|
4932
|
+
});
|
|
4933
|
+
|
|
4934
|
+
export type HideInboxCommentError = (unknown | {
|
|
4935
|
+
error?: string;
|
|
4936
|
+
});
|
|
4937
|
+
|
|
4938
|
+
export type UnhideInboxCommentData = {
|
|
4939
|
+
path: {
|
|
4940
|
+
commentId: string;
|
|
4941
|
+
postId: string;
|
|
4942
|
+
};
|
|
4943
|
+
query: {
|
|
4944
|
+
accountId: string;
|
|
4945
|
+
};
|
|
4946
|
+
};
|
|
4947
|
+
|
|
4948
|
+
export type UnhideInboxCommentResponse = ({
|
|
4949
|
+
status?: string;
|
|
4950
|
+
commentId?: string;
|
|
4951
|
+
hidden?: boolean;
|
|
4952
|
+
platform?: string;
|
|
4953
|
+
});
|
|
4954
|
+
|
|
4955
|
+
export type UnhideInboxCommentError = (unknown | {
|
|
4956
|
+
error?: string;
|
|
4957
|
+
});
|
|
4958
|
+
|
|
4959
|
+
export type LikeInboxCommentData = {
|
|
4960
|
+
body: {
|
|
4961
|
+
/**
|
|
4962
|
+
* The social account ID
|
|
4963
|
+
*/
|
|
4964
|
+
accountId: string;
|
|
4965
|
+
/**
|
|
4966
|
+
* (Bluesky only) Content identifier for the comment
|
|
4967
|
+
*/
|
|
4968
|
+
cid?: string;
|
|
4969
|
+
};
|
|
4970
|
+
path: {
|
|
4971
|
+
commentId: string;
|
|
4972
|
+
postId: string;
|
|
4973
|
+
};
|
|
4974
|
+
};
|
|
4975
|
+
|
|
4976
|
+
export type LikeInboxCommentResponse = ({
|
|
4977
|
+
status?: string;
|
|
4978
|
+
commentId?: string;
|
|
4979
|
+
liked?: boolean;
|
|
4980
|
+
/**
|
|
4981
|
+
* (Bluesky only) URI to use for unliking
|
|
4982
|
+
*/
|
|
4983
|
+
likeUri?: string;
|
|
4984
|
+
platform?: string;
|
|
4985
|
+
});
|
|
4986
|
+
|
|
4987
|
+
export type LikeInboxCommentError = (unknown | {
|
|
4988
|
+
error?: string;
|
|
4989
|
+
});
|
|
4990
|
+
|
|
4991
|
+
export type UnlikeInboxCommentData = {
|
|
4992
|
+
path: {
|
|
4993
|
+
commentId: string;
|
|
4994
|
+
postId: string;
|
|
4995
|
+
};
|
|
4996
|
+
query: {
|
|
4997
|
+
accountId: string;
|
|
4998
|
+
/**
|
|
4999
|
+
* (Bluesky only) The like URI returned when liking
|
|
5000
|
+
*/
|
|
5001
|
+
likeUri?: string;
|
|
5002
|
+
};
|
|
5003
|
+
};
|
|
5004
|
+
|
|
5005
|
+
export type UnlikeInboxCommentResponse = ({
|
|
5006
|
+
status?: string;
|
|
5007
|
+
commentId?: string;
|
|
5008
|
+
liked?: boolean;
|
|
5009
|
+
platform?: string;
|
|
5010
|
+
});
|
|
5011
|
+
|
|
5012
|
+
export type UnlikeInboxCommentError = (unknown | {
|
|
5013
|
+
error?: string;
|
|
5014
|
+
});
|
|
5015
|
+
|
|
5016
|
+
export type ListInboxReviewsData = {
|
|
5017
|
+
query?: {
|
|
5018
|
+
/**
|
|
5019
|
+
* Filter by specific social account ID
|
|
5020
|
+
*/
|
|
5021
|
+
accountId?: string;
|
|
5022
|
+
cursor?: string;
|
|
5023
|
+
/**
|
|
5024
|
+
* Filter by reply status
|
|
5025
|
+
*/
|
|
5026
|
+
hasReply?: boolean;
|
|
5027
|
+
limit?: number;
|
|
5028
|
+
maxRating?: number;
|
|
5029
|
+
minRating?: number;
|
|
5030
|
+
platform?: 'facebook' | 'googlebusiness';
|
|
5031
|
+
profileId?: string;
|
|
5032
|
+
sortBy?: 'date' | 'rating';
|
|
5033
|
+
sortOrder?: 'asc' | 'desc';
|
|
5034
|
+
};
|
|
5035
|
+
};
|
|
5036
|
+
|
|
5037
|
+
export type ListInboxReviewsResponse = ({
|
|
5038
|
+
status?: string;
|
|
5039
|
+
data?: Array<{
|
|
5040
|
+
id?: string;
|
|
5041
|
+
platform?: string;
|
|
5042
|
+
accountId?: string;
|
|
5043
|
+
accountUsername?: string;
|
|
5044
|
+
reviewer?: {
|
|
5045
|
+
id?: (string) | null;
|
|
5046
|
+
name?: string;
|
|
5047
|
+
profileImage?: (string) | null;
|
|
5048
|
+
};
|
|
5049
|
+
rating?: number;
|
|
5050
|
+
text?: string;
|
|
5051
|
+
created?: string;
|
|
5052
|
+
hasReply?: boolean;
|
|
5053
|
+
reply?: {
|
|
5054
|
+
id?: string;
|
|
5055
|
+
text?: string;
|
|
5056
|
+
created?: string;
|
|
5057
|
+
} | null;
|
|
5058
|
+
reviewUrl?: (string) | null;
|
|
5059
|
+
}>;
|
|
5060
|
+
pagination?: {
|
|
5061
|
+
hasMore?: boolean;
|
|
5062
|
+
nextCursor?: (string) | null;
|
|
5063
|
+
};
|
|
5064
|
+
meta?: {
|
|
5065
|
+
accountsQueried?: number;
|
|
5066
|
+
accountsFailed?: number;
|
|
5067
|
+
failedAccounts?: Array<{
|
|
5068
|
+
accountId?: string;
|
|
5069
|
+
accountUsername?: (string) | null;
|
|
5070
|
+
platform?: string;
|
|
5071
|
+
error?: string;
|
|
5072
|
+
/**
|
|
5073
|
+
* Error code if available
|
|
5074
|
+
*/
|
|
5075
|
+
code?: (string) | null;
|
|
5076
|
+
/**
|
|
5077
|
+
* Seconds to wait before retry (rate limits)
|
|
5078
|
+
*/
|
|
5079
|
+
retryAfter?: (number) | null;
|
|
5080
|
+
}>;
|
|
5081
|
+
lastUpdated?: string;
|
|
5082
|
+
};
|
|
5083
|
+
summary?: {
|
|
5084
|
+
totalReviews?: number;
|
|
5085
|
+
averageRating?: (number) | null;
|
|
5086
|
+
};
|
|
5087
|
+
});
|
|
5088
|
+
|
|
5089
|
+
export type ListInboxReviewsError = ({
|
|
5090
|
+
error?: string;
|
|
5091
|
+
} | unknown);
|
|
5092
|
+
|
|
5093
|
+
export type ReplyToInboxReviewData = {
|
|
5094
|
+
body: {
|
|
5095
|
+
accountId: string;
|
|
5096
|
+
message: string;
|
|
5097
|
+
};
|
|
5098
|
+
path: {
|
|
5099
|
+
/**
|
|
5100
|
+
* Review ID (URL-encoded for Google Business)
|
|
5101
|
+
*/
|
|
5102
|
+
reviewId: string;
|
|
5103
|
+
};
|
|
5104
|
+
};
|
|
5105
|
+
|
|
5106
|
+
export type ReplyToInboxReviewResponse = ({
|
|
5107
|
+
status?: string;
|
|
5108
|
+
reply?: {
|
|
5109
|
+
id?: string;
|
|
5110
|
+
text?: string;
|
|
5111
|
+
created?: string;
|
|
5112
|
+
};
|
|
5113
|
+
platform?: string;
|
|
5114
|
+
});
|
|
5115
|
+
|
|
5116
|
+
export type ReplyToInboxReviewError = ({
|
|
5117
|
+
error?: string;
|
|
5118
|
+
} | unknown);
|
|
5119
|
+
|
|
5120
|
+
export type DeleteInboxReviewReplyData = {
|
|
5121
|
+
body: {
|
|
5122
|
+
accountId: string;
|
|
5123
|
+
};
|
|
5124
|
+
path: {
|
|
5125
|
+
reviewId: string;
|
|
5126
|
+
};
|
|
5127
|
+
};
|
|
5128
|
+
|
|
5129
|
+
export type DeleteInboxReviewReplyResponse = ({
|
|
5130
|
+
status?: string;
|
|
5131
|
+
message?: string;
|
|
5132
|
+
platform?: string;
|
|
5133
|
+
});
|
|
5134
|
+
|
|
5135
|
+
export type DeleteInboxReviewReplyError = ({
|
|
5136
|
+
error?: string;
|
|
4179
5137
|
} | unknown);
|