@getlatedev/node 0.1.25 → 0.1.26
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.mts +37 -114
- package/dist/index.d.ts +37 -114
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +77 -129
- package/src/generated/types.gen.ts +37 -114
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -134,8 +134,7 @@ export const downloadBlueskyMedia = <ThrowOnError extends boolean = false>(optio
|
|
|
134
134
|
/**
|
|
135
135
|
* Get post analytics
|
|
136
136
|
* Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats.
|
|
137
|
-
*
|
|
138
|
-
* For follower stats, use /v1/accounts/follower-stats. LinkedIn personal accounts: per-post analytics only for Late-published posts. Telegram: not available. Data is cached and refreshed at most once per hour.
|
|
137
|
+
* Accepts both Late Post IDs and External Post IDs (auto-resolved). Data is cached and refreshed at most once per hour. For follower stats, use /v1/accounts/follower-stats.
|
|
139
138
|
*
|
|
140
139
|
*/
|
|
141
140
|
export const getAnalytics = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAnalyticsData, ThrowOnError>) => {
|
|
@@ -147,12 +146,8 @@ export const getAnalytics = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
148
|
* Get YouTube daily views
|
|
150
|
-
* Returns
|
|
151
|
-
*
|
|
152
|
-
* watch time, and subscriber changes.
|
|
153
|
-
*
|
|
154
|
-
* Requires the yt-analytics.readonly OAuth scope. Existing YouTube accounts may need to re-authorize. If the scope is missing, the response includes a reauthorizeUrl.
|
|
155
|
-
* Data has a 2-3 day delay; endDate is automatically capped to 3 days ago. Maximum 90 days of historical data. Defaults to last 30 days.
|
|
149
|
+
* Returns daily view counts for a YouTube video including views, watch time, and subscriber changes.
|
|
150
|
+
* Requires yt-analytics.readonly scope (re-authorization may be needed). Data has a 2-3 day delay. Max 90 days, defaults to last 30 days.
|
|
156
151
|
*
|
|
157
152
|
*/
|
|
158
153
|
export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeDailyViewsData, ThrowOnError>) => {
|
|
@@ -164,6 +159,7 @@ export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(optio
|
|
|
164
159
|
|
|
165
160
|
/**
|
|
166
161
|
* List groups
|
|
162
|
+
* Returns all account groups for the authenticated user, including group names and associated account IDs.
|
|
167
163
|
*/
|
|
168
164
|
export const listAccountGroups = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
169
165
|
return (options?.client ?? client).get<ListAccountGroupsResponse, ListAccountGroupsError, ThrowOnError>({
|
|
@@ -174,6 +170,7 @@ export const listAccountGroups = <ThrowOnError extends boolean = false>(options?
|
|
|
174
170
|
|
|
175
171
|
/**
|
|
176
172
|
* Create group
|
|
173
|
+
* Creates a new account group with a name and a list of social account IDs.
|
|
177
174
|
*/
|
|
178
175
|
export const createAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAccountGroupData, ThrowOnError>) => {
|
|
179
176
|
return (options?.client ?? client).post<CreateAccountGroupResponse, CreateAccountGroupError, ThrowOnError>({
|
|
@@ -184,6 +181,7 @@ export const createAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
184
181
|
|
|
185
182
|
/**
|
|
186
183
|
* Update group
|
|
184
|
+
* Updates the name or account list of an existing group. You can rename the group, change its accounts, or both.
|
|
187
185
|
*/
|
|
188
186
|
export const updateAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountGroupData, ThrowOnError>) => {
|
|
189
187
|
return (options?.client ?? client).put<UpdateAccountGroupResponse, UpdateAccountGroupError, ThrowOnError>({
|
|
@@ -194,6 +192,7 @@ export const updateAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
194
192
|
|
|
195
193
|
/**
|
|
196
194
|
* Delete group
|
|
195
|
+
* Permanently deletes an account group. The accounts themselves are not affected.
|
|
197
196
|
*/
|
|
198
197
|
export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountGroupData, ThrowOnError>) => {
|
|
199
198
|
return (options?.client ?? client).delete<DeleteAccountGroupResponse, DeleteAccountGroupError, ThrowOnError>({
|
|
@@ -204,10 +203,7 @@ export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
204
203
|
|
|
205
204
|
/**
|
|
206
205
|
* Get presigned upload URL
|
|
207
|
-
* Get a presigned URL to upload files directly to cloud storage.
|
|
208
|
-
*
|
|
209
|
-
* How it works: call this endpoint with the filename and content type, receive an uploadUrl (presigned) and publicUrl, PUT your file directly to the uploadUrl, then use the publicUrl in your posts.
|
|
210
|
-
*
|
|
206
|
+
* Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
211
207
|
*/
|
|
212
208
|
export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMediaPresignedUrlData, ThrowOnError>) => {
|
|
213
209
|
return (options?.client ?? client).post<GetMediaPresignedUrlResponse, GetMediaPresignedUrlError, ThrowOnError>({
|
|
@@ -218,6 +214,7 @@ export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(optio
|
|
|
218
214
|
|
|
219
215
|
/**
|
|
220
216
|
* Search posts
|
|
217
|
+
* Search Reddit posts using a connected account. Optionally scope to a specific subreddit.
|
|
221
218
|
*/
|
|
222
219
|
export const searchReddit = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SearchRedditData, ThrowOnError>) => {
|
|
223
220
|
return (options?.client ?? client).get<SearchRedditResponse, SearchRedditError, ThrowOnError>({
|
|
@@ -228,6 +225,7 @@ export const searchReddit = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
228
225
|
|
|
229
226
|
/**
|
|
230
227
|
* Get subreddit feed
|
|
228
|
+
* Fetch posts from a subreddit feed. Supports sorting, time filtering, and cursor-based pagination.
|
|
231
229
|
*/
|
|
232
230
|
export const getRedditFeed = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFeedData, ThrowOnError>) => {
|
|
233
231
|
return (options?.client ?? client).get<GetRedditFeedResponse, GetRedditFeedError, ThrowOnError>({
|
|
@@ -238,6 +236,7 @@ export const getRedditFeed = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
238
236
|
|
|
239
237
|
/**
|
|
240
238
|
* Get plan and usage stats
|
|
239
|
+
* Returns the current plan name, billing period, plan limits, and usage counts.
|
|
241
240
|
*/
|
|
242
241
|
export const getUsageStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
243
242
|
return (options?.client ?? client).get<GetUsageStatsResponse, GetUsageStatsError, ThrowOnError>({
|
|
@@ -248,10 +247,7 @@ export const getUsageStats = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
248
247
|
|
|
249
248
|
/**
|
|
250
249
|
* List posts
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* Platform notes: YouTube posts always include at least one video. Instagram/TikTok posts always include media (drafts may omit media). TikTok does not mix photos and videos in the same post.
|
|
254
|
-
*
|
|
250
|
+
* Returns a paginated list of posts. Published posts include platformPostUrl with the public URL on each platform.
|
|
255
251
|
*/
|
|
256
252
|
export const listPosts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListPostsData, ThrowOnError>) => {
|
|
257
253
|
return (options?.client ?? client).get<ListPostsResponse, ListPostsError, ThrowOnError>({
|
|
@@ -262,9 +258,8 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
262
258
|
|
|
263
259
|
/**
|
|
264
260
|
* Create post
|
|
265
|
-
* Immediate posts (publishNow: true) include platformPostUrl in the response.
|
|
266
|
-
*
|
|
267
|
-
* Platform constraints: YouTube requires video. Instagram/TikTok require media (TikTok cannot mix videos and images). Instagram carousels up to 10 items, Threads up to 10 images. Facebook Stories need single image/video with contentType story. LinkedIn up to 20 images or single PDF. Pinterest single image/video with boardId. Bluesky up to 4 images. Snapchat single image/video.
|
|
261
|
+
* Create and optionally publish a post. Immediate posts (publishNow: true) include platformPostUrl in the response.
|
|
262
|
+
* Content is optional when media is attached or all platforms have customContent. See each platform's schema for media constraints.
|
|
268
263
|
*
|
|
269
264
|
*/
|
|
270
265
|
export const createPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePostData, ThrowOnError>) => {
|
|
@@ -301,10 +296,7 @@ export const updatePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
301
296
|
|
|
302
297
|
/**
|
|
303
298
|
* Delete post
|
|
304
|
-
* Delete a draft or scheduled post from Late.
|
|
305
|
-
* To remove a published post from a social media platform, use the [Unpublish endpoint](#tag/Posts/operation/unpublishPost) instead.
|
|
306
|
-
* When deleting a scheduled or draft post that consumed upload quota, the quota will be automatically refunded.
|
|
307
|
-
*
|
|
299
|
+
* Delete a draft or scheduled post from Late. Published posts cannot be deleted; use the Unpublish endpoint instead. Upload quota is automatically refunded.
|
|
308
300
|
*/
|
|
309
301
|
export const deletePost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeletePostData, ThrowOnError>) => {
|
|
310
302
|
return (options?.client ?? client).delete<DeletePostResponse, DeletePostError, ThrowOnError>({
|
|
@@ -315,6 +307,7 @@ export const deletePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
315
307
|
|
|
316
308
|
/**
|
|
317
309
|
* Bulk upload from CSV
|
|
310
|
+
* Create multiple posts by uploading a CSV file. Use dryRun=true to validate without creating posts.
|
|
318
311
|
*/
|
|
319
312
|
export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkUploadPostsData, ThrowOnError>) => {
|
|
320
313
|
return (options?.client ?? client).post<BulkUploadPostsResponse, BulkUploadPostsError, ThrowOnError>({
|
|
@@ -330,6 +323,7 @@ export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: O
|
|
|
330
323
|
|
|
331
324
|
/**
|
|
332
325
|
* Retry failed post
|
|
326
|
+
* Immediately retries publishing a failed post. Returns the updated post with its new status.
|
|
333
327
|
*/
|
|
334
328
|
export const retryPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RetryPostData, ThrowOnError>) => {
|
|
335
329
|
return (options?.client ?? client).post<RetryPostResponse, RetryPostError, ThrowOnError>({
|
|
@@ -340,9 +334,8 @@ export const retryPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
340
334
|
|
|
341
335
|
/**
|
|
342
336
|
* Unpublish post
|
|
343
|
-
* Deletes a published post from the specified platform. The post record in Late is kept but its
|
|
344
|
-
*
|
|
345
|
-
* Threaded posts (Twitter, Threads, Bluesky) delete all items in the thread. Telegram messages older than 48h may fail to delete. YouTube deletion is permanent.
|
|
337
|
+
* Deletes a published post from the specified platform. The post record in Late is kept but its status is updated to cancelled.
|
|
338
|
+
* Not supported on Instagram, TikTok, or Snapchat. Threaded posts delete all items. YouTube deletion is permanent.
|
|
346
339
|
*
|
|
347
340
|
*/
|
|
348
341
|
export const unpublishPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnpublishPostData, ThrowOnError>) => {
|
|
@@ -354,6 +347,7 @@ export const unpublishPost = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
354
347
|
|
|
355
348
|
/**
|
|
356
349
|
* List users
|
|
350
|
+
* Returns all users in the workspace including roles and profile access. Also returns the currentUserId of the caller.
|
|
357
351
|
*/
|
|
358
352
|
export const listUsers = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
359
353
|
return (options?.client ?? client).get<ListUsersResponse, ListUsersError, ThrowOnError>({
|
|
@@ -364,6 +358,7 @@ export const listUsers = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
364
358
|
|
|
365
359
|
/**
|
|
366
360
|
* Get user
|
|
361
|
+
* Returns a single user's details by ID, including name, email, and role.
|
|
367
362
|
*/
|
|
368
363
|
export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetUserData, ThrowOnError>) => {
|
|
369
364
|
return (options?.client ?? client).get<GetUserResponse, GetUserError, ThrowOnError>({
|
|
@@ -374,9 +369,7 @@ export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
374
369
|
|
|
375
370
|
/**
|
|
376
371
|
* List profiles
|
|
377
|
-
* Returns profiles
|
|
378
|
-
* Use includeOverLimit=true to include profiles that exceed the plan limit (for management/deletion purposes).
|
|
379
|
-
*
|
|
372
|
+
* Returns profiles sorted by creation date. Use includeOverLimit=true to include profiles that exceed the plan limit.
|
|
380
373
|
*/
|
|
381
374
|
export const listProfiles = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListProfilesData, ThrowOnError>) => {
|
|
382
375
|
return (options?.client ?? client).get<ListProfilesResponse, ListProfilesError, ThrowOnError>({
|
|
@@ -387,6 +380,7 @@ export const listProfiles = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
387
380
|
|
|
388
381
|
/**
|
|
389
382
|
* Create profile
|
|
383
|
+
* Creates a new profile with a name, optional description, and color.
|
|
390
384
|
*/
|
|
391
385
|
export const createProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateProfileData, ThrowOnError>) => {
|
|
392
386
|
return (options?.client ?? client).post<CreateProfileResponse, CreateProfileError, ThrowOnError>({
|
|
@@ -397,6 +391,7 @@ export const createProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
397
391
|
|
|
398
392
|
/**
|
|
399
393
|
* Get profile
|
|
394
|
+
* Returns a single profile by ID, including its name, color, and default status.
|
|
400
395
|
*/
|
|
401
396
|
export const getProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetProfileData, ThrowOnError>) => {
|
|
402
397
|
return (options?.client ?? client).get<GetProfileResponse, GetProfileError, ThrowOnError>({
|
|
@@ -407,6 +402,7 @@ export const getProfile = <ThrowOnError extends boolean = false>(options: Option
|
|
|
407
402
|
|
|
408
403
|
/**
|
|
409
404
|
* Update profile
|
|
405
|
+
* Updates a profile's name, description, color, or default status.
|
|
410
406
|
*/
|
|
411
407
|
export const updateProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateProfileData, ThrowOnError>) => {
|
|
412
408
|
return (options?.client ?? client).put<UpdateProfileResponse, UpdateProfileError, ThrowOnError>({
|
|
@@ -417,6 +413,7 @@ export const updateProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
417
413
|
|
|
418
414
|
/**
|
|
419
415
|
* Delete profile
|
|
416
|
+
* Permanently deletes a profile by ID.
|
|
420
417
|
*/
|
|
421
418
|
export const deleteProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteProfileData, ThrowOnError>) => {
|
|
422
419
|
return (options?.client ?? client).delete<DeleteProfileResponse, DeleteProfileError, ThrowOnError>({
|
|
@@ -427,10 +424,7 @@ export const deleteProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
427
424
|
|
|
428
425
|
/**
|
|
429
426
|
* List accounts
|
|
430
|
-
* Returns
|
|
431
|
-
* By default, only returns accounts from profiles within the user's plan limit.
|
|
432
|
-
* Follower count data (followersCount, followersLastUpdated) is only included if user has analytics add-on.
|
|
433
|
-
*
|
|
427
|
+
* Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on.
|
|
434
428
|
*/
|
|
435
429
|
export const listAccounts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListAccountsData, ThrowOnError>) => {
|
|
436
430
|
return (options?.client ?? client).get<ListAccountsResponse, ListAccountsError, ThrowOnError>({
|
|
@@ -454,6 +448,7 @@ export const getFollowerStats = <ThrowOnError extends boolean = false>(options?:
|
|
|
454
448
|
|
|
455
449
|
/**
|
|
456
450
|
* Update account
|
|
451
|
+
* Updates a connected social account's display name or username override.
|
|
457
452
|
*/
|
|
458
453
|
export const updateAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountData, ThrowOnError>) => {
|
|
459
454
|
return (options?.client ?? client).put<UpdateAccountResponse, UpdateAccountError, ThrowOnError>({
|
|
@@ -464,6 +459,7 @@ export const updateAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
464
459
|
|
|
465
460
|
/**
|
|
466
461
|
* Disconnect account
|
|
462
|
+
* Disconnects and removes a connected social account.
|
|
467
463
|
*/
|
|
468
464
|
export const deleteAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountData, ThrowOnError>) => {
|
|
469
465
|
return (options?.client ?? client).delete<DeleteAccountResponse, DeleteAccountError, ThrowOnError>({
|
|
@@ -474,10 +470,7 @@ export const deleteAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
474
470
|
|
|
475
471
|
/**
|
|
476
472
|
* Check accounts health
|
|
477
|
-
* Returns
|
|
478
|
-
* permissions status, and any issues that need attention. Useful for monitoring account
|
|
479
|
-
* connections and identifying accounts that need reconnection.
|
|
480
|
-
*
|
|
473
|
+
* Returns health status of all connected accounts including token validity, permissions, and issues needing attention.
|
|
481
474
|
*/
|
|
482
475
|
export const getAllAccountsHealth = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAllAccountsHealthData, ThrowOnError>) => {
|
|
483
476
|
return (options?.client ?? client).get<GetAllAccountsHealthResponse, GetAllAccountsHealthError, ThrowOnError>({
|
|
@@ -488,9 +481,7 @@ export const getAllAccountsHealth = <ThrowOnError extends boolean = false>(optio
|
|
|
488
481
|
|
|
489
482
|
/**
|
|
490
483
|
* Check account health
|
|
491
|
-
* Returns detailed health
|
|
492
|
-
* granted permissions, missing permissions, and actionable recommendations.
|
|
493
|
-
*
|
|
484
|
+
* Returns detailed health info for a specific account including token status, permissions, and recommendations.
|
|
494
485
|
*/
|
|
495
486
|
export const getAccountHealth = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAccountHealthData, ThrowOnError>) => {
|
|
496
487
|
return (options?.client ?? client).get<GetAccountHealthResponse, GetAccountHealthError, ThrowOnError>({
|
|
@@ -501,6 +492,7 @@ export const getAccountHealth = <ThrowOnError extends boolean = false>(options:
|
|
|
501
492
|
|
|
502
493
|
/**
|
|
503
494
|
* List keys
|
|
495
|
+
* Returns all API keys for the authenticated user. Keys are returned with a preview only, not the full key value.
|
|
504
496
|
*/
|
|
505
497
|
export const listApiKeys = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
506
498
|
return (options?.client ?? client).get<ListApiKeysResponse, ListApiKeysError, ThrowOnError>({
|
|
@@ -511,6 +503,7 @@ export const listApiKeys = <ThrowOnError extends boolean = false>(options?: Opti
|
|
|
511
503
|
|
|
512
504
|
/**
|
|
513
505
|
* Create key
|
|
506
|
+
* Creates a new API key with an optional expiry. The full key value is only returned once in the response.
|
|
514
507
|
*/
|
|
515
508
|
export const createApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateApiKeyData, ThrowOnError>) => {
|
|
516
509
|
return (options?.client ?? client).post<CreateApiKeyResponse, CreateApiKeyError, ThrowOnError>({
|
|
@@ -521,6 +514,7 @@ export const createApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
521
514
|
|
|
522
515
|
/**
|
|
523
516
|
* Delete key
|
|
517
|
+
* Permanently revokes and deletes an API key.
|
|
524
518
|
*/
|
|
525
519
|
export const deleteApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteApiKeyData, ThrowOnError>) => {
|
|
526
520
|
return (options?.client ?? client).delete<DeleteApiKeyResponse, DeleteApiKeyError, ThrowOnError>({
|
|
@@ -544,10 +538,8 @@ export const createInviteToken = <ThrowOnError extends boolean = false>(options:
|
|
|
544
538
|
|
|
545
539
|
/**
|
|
546
540
|
* Get OAuth connect URL
|
|
547
|
-
* Initiate an OAuth connection flow
|
|
548
|
-
* Standard flow:
|
|
549
|
-
* Headless mode (Facebook, LinkedIn, Pinterest, Google Business, Snapchat): add headless=true to this endpoint. After OAuth, the user is redirected to your redirect_url with OAuth data (profileId, tempToken, userProfile, connect_token, platform, step). Use the platform-specific selection endpoints to fetch options and save the selection.
|
|
550
|
-
* LinkedIn uses pendingDataToken instead of tempToken; call GET /v1/connect/pending-data?token=TOKEN to retrieve OAuth data (one-time use, expires in 10 minutes).
|
|
541
|
+
* Initiate an OAuth connection flow. Returns an authUrl to redirect the user to.
|
|
542
|
+
* Standard flow: Late hosts the selection UI, then redirects to your redirect_url. Headless mode (headless=true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.
|
|
551
543
|
*
|
|
552
544
|
*/
|
|
553
545
|
export const getConnectUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetConnectUrlData, ThrowOnError>) => {
|
|
@@ -559,6 +551,7 @@ export const getConnectUrl = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
559
551
|
|
|
560
552
|
/**
|
|
561
553
|
* Complete OAuth callback
|
|
554
|
+
* Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
|
|
562
555
|
*/
|
|
563
556
|
export const handleOAuthCallback = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleOAuthCallbackData, ThrowOnError>) => {
|
|
564
557
|
return (options?.client ?? client).post<HandleOAuthCallbackResponse, HandleOAuthCallbackError, ThrowOnError>({
|
|
@@ -580,9 +573,7 @@ export const listFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
580
573
|
|
|
581
574
|
/**
|
|
582
575
|
* Select Facebook page
|
|
583
|
-
* Complete the headless flow
|
|
584
|
-
* The userProfile should be the decoded JSON object from the userProfile query param in the OAuth callback redirect URL. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
585
|
-
*
|
|
576
|
+
* Complete the headless flow by saving the user's selected Facebook page. Pass the userProfile from the OAuth redirect and use X-Connect-Token if connecting via API key.
|
|
586
577
|
*/
|
|
587
578
|
export const selectFacebookPage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectFacebookPageData, ThrowOnError>) => {
|
|
588
579
|
return (options?.client ?? client).post<SelectFacebookPageResponse, SelectFacebookPageError, ThrowOnError>({
|
|
@@ -593,9 +584,7 @@ export const selectFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
593
584
|
|
|
594
585
|
/**
|
|
595
586
|
* List GBP locations
|
|
596
|
-
* For headless
|
|
597
|
-
* Call this endpoint to retrieve the list of locations the user can manage, then build your own UI to let them select one. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
598
|
-
*
|
|
587
|
+
* For headless flows. Returns the list of GBP locations the user can manage. Use X-Connect-Token if connecting via API key.
|
|
599
588
|
*/
|
|
600
589
|
export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => {
|
|
601
590
|
return (options?.client ?? client).get<ListGoogleBusinessLocationsResponse, ListGoogleBusinessLocationsError, ThrowOnError>({
|
|
@@ -606,9 +595,7 @@ export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false
|
|
|
606
595
|
|
|
607
596
|
/**
|
|
608
597
|
* Select GBP location
|
|
609
|
-
* Complete the headless flow
|
|
610
|
-
* The userProfile should be the decoded JSON object from the userProfile query param in the OAuth callback redirect URL. It contains important token information including the refresh token. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
611
|
-
*
|
|
598
|
+
* Complete the headless flow by saving the user's selected GBP location. Include userProfile from the OAuth redirect (contains refresh token). Use X-Connect-Token if connecting via API key.
|
|
612
599
|
*/
|
|
613
600
|
export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectGoogleBusinessLocationData, ThrowOnError>) => {
|
|
614
601
|
return (options?.client ?? client).post<SelectGoogleBusinessLocationResponse, SelectGoogleBusinessLocationError, ThrowOnError>({
|
|
@@ -619,9 +606,7 @@ export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = fals
|
|
|
619
606
|
|
|
620
607
|
/**
|
|
621
608
|
* Get reviews
|
|
622
|
-
*
|
|
623
|
-
* Use pagination via nextPageToken for locations with many reviews.
|
|
624
|
-
*
|
|
609
|
+
* Returns reviews for a GBP account including ratings, comments, and owner replies. Use nextPageToken for pagination.
|
|
625
610
|
*/
|
|
626
611
|
export const getGoogleBusinessReviews = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessReviewsData, ThrowOnError>) => {
|
|
627
612
|
return (options?.client ?? client).get<GetGoogleBusinessReviewsResponse, GetGoogleBusinessReviewsError, ThrowOnError>({
|
|
@@ -632,9 +617,7 @@ export const getGoogleBusinessReviews = <ThrowOnError extends boolean = false>(o
|
|
|
632
617
|
|
|
633
618
|
/**
|
|
634
619
|
* Get food menus
|
|
635
|
-
*
|
|
636
|
-
* Only available for locations with food menu support (restaurants, cafes, etc.).
|
|
637
|
-
*
|
|
620
|
+
* Returns food menus for a GBP location including sections, items, pricing, and dietary info. Only for locations with food menu support.
|
|
638
621
|
*/
|
|
639
622
|
export const getGoogleBusinessFoodMenus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessFoodMenusData, ThrowOnError>) => {
|
|
640
623
|
return (options?.client ?? client).get<GetGoogleBusinessFoodMenusResponse, GetGoogleBusinessFoodMenusError, ThrowOnError>({
|
|
@@ -645,12 +628,7 @@ export const getGoogleBusinessFoodMenus = <ThrowOnError extends boolean = false>
|
|
|
645
628
|
|
|
646
629
|
/**
|
|
647
630
|
* Update food menus
|
|
648
|
-
* Updates
|
|
649
|
-
*
|
|
650
|
-
* Send the full menus array. Use updateMask for partial updates (e.g. "menus" to only update the menus field).
|
|
651
|
-
*
|
|
652
|
-
* Each menu can contain sections, and each section can contain items with pricing, dietary restrictions, allergens, and more.
|
|
653
|
-
*
|
|
631
|
+
* Updates food menus for a GBP location. Send the full menus array. Use updateMask for partial updates.
|
|
654
632
|
*/
|
|
655
633
|
export const updateGoogleBusinessFoodMenus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGoogleBusinessFoodMenusData, ThrowOnError>) => {
|
|
656
634
|
return (options?.client ?? client).put<UpdateGoogleBusinessFoodMenusResponse, UpdateGoogleBusinessFoodMenusError, ThrowOnError>({
|
|
@@ -661,11 +639,7 @@ export const updateGoogleBusinessFoodMenus = <ThrowOnError extends boolean = fal
|
|
|
661
639
|
|
|
662
640
|
/**
|
|
663
641
|
* Get location details
|
|
664
|
-
*
|
|
665
|
-
* business description, phone numbers, website, categories, and more.
|
|
666
|
-
*
|
|
667
|
-
* Use the readMask query parameter to request specific fields.
|
|
668
|
-
*
|
|
642
|
+
* Returns detailed GBP location info (hours, description, phone, website, categories). Use readMask to request specific fields.
|
|
669
643
|
*/
|
|
670
644
|
export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessLocationDetailsData, ThrowOnError>) => {
|
|
671
645
|
return (options?.client ?? client).get<GetGoogleBusinessLocationDetailsResponse, GetGoogleBusinessLocationDetailsError, ThrowOnError>({
|
|
@@ -676,9 +650,7 @@ export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean =
|
|
|
676
650
|
|
|
677
651
|
/**
|
|
678
652
|
* Update location details
|
|
679
|
-
* Updates location details
|
|
680
|
-
* The updateMask field is required and specifies which fields to update. Common masks: regularHours, specialHours, profile.description, websiteUri, phoneNumbers. Combine with commas (e.g. regularHours,specialHours).
|
|
681
|
-
*
|
|
653
|
+
* Updates GBP location details (hours, description, phone, website). The updateMask field is required and specifies which fields to update.
|
|
682
654
|
*/
|
|
683
655
|
export const updateGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGoogleBusinessLocationDetailsData, ThrowOnError>) => {
|
|
684
656
|
return (options?.client ?? client).put<UpdateGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsError, ThrowOnError>({
|
|
@@ -716,6 +688,7 @@ export const createGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
716
688
|
|
|
717
689
|
/**
|
|
718
690
|
* Delete photo
|
|
691
|
+
* Deletes a photo or media item from a GBP location.
|
|
719
692
|
*/
|
|
720
693
|
export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessMediaData, ThrowOnError>) => {
|
|
721
694
|
return (options?.client ?? client).delete<DeleteGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaError, ThrowOnError>({
|
|
@@ -726,8 +699,7 @@ export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
726
699
|
|
|
727
700
|
/**
|
|
728
701
|
* Get attributes
|
|
729
|
-
*
|
|
730
|
-
*
|
|
702
|
+
* Returns GBP location attributes (amenities, services, accessibility, payment types). Available attributes vary by business category.
|
|
731
703
|
*/
|
|
732
704
|
export const getGoogleBusinessAttributes = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessAttributesData, ThrowOnError>) => {
|
|
733
705
|
return (options?.client ?? client).get<GetGoogleBusinessAttributesResponse, GetGoogleBusinessAttributesError, ThrowOnError>({
|
|
@@ -780,6 +752,7 @@ export const createGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
780
752
|
|
|
781
753
|
/**
|
|
782
754
|
* Delete action link
|
|
755
|
+
* Deletes a place action link (e.g. booking or ordering URL) from a GBP location.
|
|
783
756
|
*/
|
|
784
757
|
export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessPlaceActionData, ThrowOnError>) => {
|
|
785
758
|
return (options?.client ?? client).delete<DeleteGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionError, ThrowOnError>({
|
|
@@ -790,9 +763,7 @@ export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
790
763
|
|
|
791
764
|
/**
|
|
792
765
|
* Get pending OAuth data
|
|
793
|
-
* Fetch pending OAuth data for headless mode
|
|
794
|
-
* After OAuth redirect, use the pendingDataToken from the URL to fetch the stored data. This endpoint is one-time use (data is deleted after fetch) and expires after 10 minutes. No authentication required, just the token.
|
|
795
|
-
*
|
|
766
|
+
* Fetch pending OAuth data for headless mode using the pendingDataToken from the redirect URL. One-time use, expires after 10 minutes. No authentication required.
|
|
796
767
|
*/
|
|
797
768
|
export const getPendingOAuthData = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPendingOAuthDataData, ThrowOnError>) => {
|
|
798
769
|
return (options?.client ?? client).get<GetPendingOAuthDataResponse, GetPendingOAuthDataError, ThrowOnError>({
|
|
@@ -803,9 +774,7 @@ export const getPendingOAuthData = <ThrowOnError extends boolean = false>(option
|
|
|
803
774
|
|
|
804
775
|
/**
|
|
805
776
|
* List LinkedIn orgs
|
|
806
|
-
* Fetch full organization details for custom UI.
|
|
807
|
-
* Use this endpoint to fetch full details including logos, vanity names, websites, and more. No authentication required, just the tempToken from the OAuth redirect.
|
|
808
|
-
*
|
|
777
|
+
* Fetch full LinkedIn organization details (logos, vanity names, websites) for custom UI. No authentication required, just the tempToken from OAuth.
|
|
809
778
|
*/
|
|
810
779
|
export const listLinkedInOrganizations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListLinkedInOrganizationsData, ThrowOnError>) => {
|
|
811
780
|
return (options?.client ?? client).get<ListLinkedInOrganizationsResponse, ListLinkedInOrganizationsError, ThrowOnError>({
|
|
@@ -816,9 +785,7 @@ export const listLinkedInOrganizations = <ThrowOnError extends boolean = false>(
|
|
|
816
785
|
|
|
817
786
|
/**
|
|
818
787
|
* Select LinkedIn org
|
|
819
|
-
* Complete the LinkedIn connection flow.
|
|
820
|
-
* Set accountType to "personal" for a personal profile (omit selectedOrganization), or "organization" to connect as a company page. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
821
|
-
*
|
|
788
|
+
* Complete the LinkedIn connection flow. Set accountType to "personal" or "organization" to connect as a company page. Use X-Connect-Token if connecting via API key.
|
|
822
789
|
*/
|
|
823
790
|
export const selectLinkedInOrganization = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectLinkedInOrganizationData, ThrowOnError>) => {
|
|
824
791
|
return (options?.client ?? client).post<SelectLinkedInOrganizationResponse, SelectLinkedInOrganizationError, ThrowOnError>({
|
|
@@ -829,9 +796,7 @@ export const selectLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
829
796
|
|
|
830
797
|
/**
|
|
831
798
|
* List Pinterest boards
|
|
832
|
-
*
|
|
833
|
-
* Call this endpoint to retrieve the list of boards the user can post to, then build your UI and call POST /v1/connect/pinterest/select-board to save the selection. Use X-Connect-Token header with the connect_token from the redirect URL.
|
|
834
|
-
*
|
|
799
|
+
* For headless flows. Returns Pinterest boards the user can post to. Use X-Connect-Token from the redirect URL.
|
|
835
800
|
*/
|
|
836
801
|
export const listPinterestBoardsForSelection = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListPinterestBoardsForSelectionData, ThrowOnError>) => {
|
|
837
802
|
return (options?.client ?? client).get<ListPinterestBoardsForSelectionResponse, ListPinterestBoardsForSelectionError, ThrowOnError>({
|
|
@@ -854,9 +819,7 @@ export const selectPinterestBoard = <ThrowOnError extends boolean = false>(optio
|
|
|
854
819
|
|
|
855
820
|
/**
|
|
856
821
|
* List Snapchat profiles
|
|
857
|
-
* For headless
|
|
858
|
-
* Call this endpoint to retrieve the list of Snapchat Public Profiles the user can post to, then build your UI and call POST /v1/connect/snapchat/select-profile to save the selection. Use X-Connect-Token header with the connect_token from the redirect URL.
|
|
859
|
-
*
|
|
822
|
+
* For headless flows. Returns Snapchat Public Profiles the user can post to. Use X-Connect-Token from the redirect URL.
|
|
860
823
|
*/
|
|
861
824
|
export const listSnapchatProfiles = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListSnapchatProfilesData, ThrowOnError>) => {
|
|
862
825
|
return (options?.client ?? client).get<ListSnapchatProfilesResponse, ListSnapchatProfilesError, ThrowOnError>({
|
|
@@ -867,9 +830,7 @@ export const listSnapchatProfiles = <ThrowOnError extends boolean = false>(optio
|
|
|
867
830
|
|
|
868
831
|
/**
|
|
869
832
|
* Select Snapchat profile
|
|
870
|
-
* Complete the Snapchat connection flow
|
|
871
|
-
* After Snapchat OAuth with headless=true, you'll be redirected with tempToken, userProfile, publicProfiles, connect_token, platform=snapchat, and step=select_public_profile in the URL. Parse publicProfiles to build your custom selector UI, then call this endpoint with the selected profile. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
872
|
-
*
|
|
833
|
+
* Complete the Snapchat connection flow by saving the selected Public Profile. Snapchat requires a Public Profile to publish content. Use X-Connect-Token if connecting via API key.
|
|
873
834
|
*/
|
|
874
835
|
export const selectSnapchatProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectSnapchatProfileData, ThrowOnError>) => {
|
|
875
836
|
return (options?.client ?? client).post<SelectSnapchatProfileResponse, SelectSnapchatProfileError, ThrowOnError>({
|
|
@@ -893,9 +854,7 @@ export const connectBlueskyCredentials = <ThrowOnError extends boolean = false>(
|
|
|
893
854
|
|
|
894
855
|
/**
|
|
895
856
|
* Generate Telegram code
|
|
896
|
-
* Generate
|
|
897
|
-
* Flow: get an access code (valid 15 minutes), add the bot as admin in your channel/group, open a private chat with the bot, send the code + @yourchannel (e.g. LATE-ABC123 @mychannel), then poll PATCH /v1/connect/telegram?code={CODE} to check connection status. For private channels without a public username, forward any message from the channel to the bot along with the access code.
|
|
898
|
-
*
|
|
857
|
+
* Generate an access code (valid 15 minutes) for connecting a Telegram channel or group. Add the bot as admin, then send the code + @yourchannel to the bot. Poll PATCH /v1/connect/telegram to check status.
|
|
899
858
|
*/
|
|
900
859
|
export const getTelegramConnectStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTelegramConnectStatusData, ThrowOnError>) => {
|
|
901
860
|
return (options?.client ?? client).get<GetTelegramConnectStatusResponse, GetTelegramConnectStatusError, ThrowOnError>({
|
|
@@ -906,11 +865,7 @@ export const getTelegramConnectStatus = <ThrowOnError extends boolean = false>(o
|
|
|
906
865
|
|
|
907
866
|
/**
|
|
908
867
|
* Connect Telegram directly
|
|
909
|
-
* Connect a Telegram channel/group directly using the chat ID.
|
|
910
|
-
*
|
|
911
|
-
* This is an alternative to the access code flow for power users who know their Telegram chat ID.
|
|
912
|
-
* The bot must already be added as an administrator in the channel/group.
|
|
913
|
-
*
|
|
868
|
+
* Connect a Telegram channel/group directly using the chat ID. Alternative to the access code flow. The bot must already be an admin in the channel/group.
|
|
914
869
|
*/
|
|
915
870
|
export const initiateTelegramConnect = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<InitiateTelegramConnectData, ThrowOnError>) => {
|
|
916
871
|
return (options?.client ?? client).post<InitiateTelegramConnectResponse, InitiateTelegramConnectError, ThrowOnError>({
|
|
@@ -945,6 +900,7 @@ export const getFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
945
900
|
|
|
946
901
|
/**
|
|
947
902
|
* Update Facebook page
|
|
903
|
+
* Switch which Facebook Page is active for a connected account.
|
|
948
904
|
*/
|
|
949
905
|
export const updateFacebookPage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateFacebookPageData, ThrowOnError>) => {
|
|
950
906
|
return (options?.client ?? client).put<UpdateFacebookPageResponse, UpdateFacebookPageError, ThrowOnError>({
|
|
@@ -955,6 +911,7 @@ export const updateFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
955
911
|
|
|
956
912
|
/**
|
|
957
913
|
* List LinkedIn orgs
|
|
914
|
+
* Returns LinkedIn organizations (company pages) the connected account has admin access to.
|
|
958
915
|
*/
|
|
959
916
|
export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInOrganizationsData, ThrowOnError>) => {
|
|
960
917
|
return (options?.client ?? client).get<GetLinkedInOrganizationsResponse, GetLinkedInOrganizationsError, ThrowOnError>({
|
|
@@ -965,9 +922,7 @@ export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(o
|
|
|
965
922
|
|
|
966
923
|
/**
|
|
967
924
|
* Get LinkedIn aggregate stats
|
|
968
|
-
* Returns aggregate analytics across all posts for a LinkedIn personal account. Org accounts should use /v1/analytics instead.
|
|
969
|
-
* Required scope: r_member_postAnalytics (missing scope returns 403). Aggregation: TOTAL (default, lifetime totals) or DAILY (time series). Use startDate/endDate to filter. MEMBERS_REACHED is not available with DAILY aggregation.
|
|
970
|
-
*
|
|
925
|
+
* Returns aggregate analytics across all posts for a LinkedIn personal account. Org accounts should use /v1/analytics instead. Requires r_member_postAnalytics scope.
|
|
971
926
|
*/
|
|
972
927
|
export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInAggregateAnalyticsData, ThrowOnError>) => {
|
|
973
928
|
return (options?.client ?? client).get<GetLinkedInAggregateAnalyticsResponse, GetLinkedInAggregateAnalyticsError, ThrowOnError>({
|
|
@@ -978,9 +933,7 @@ export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = fal
|
|
|
978
933
|
|
|
979
934
|
/**
|
|
980
935
|
* Get LinkedIn post stats
|
|
981
|
-
* Returns analytics for a specific LinkedIn post
|
|
982
|
-
* Personal accounts require r_member_postAnalytics scope and return impressions, reach, likes, comments, shares, and video views (clicks not available). Organization accounts require r_organization_social scope and additionally return clicks and engagement rate.
|
|
983
|
-
*
|
|
936
|
+
* Returns analytics for a specific LinkedIn post by URN. Works for both personal and organization accounts.
|
|
984
937
|
*/
|
|
985
938
|
export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInPostAnalyticsData, ThrowOnError>) => {
|
|
986
939
|
return (options?.client ?? client).get<GetLinkedInPostAnalyticsResponse, GetLinkedInPostAnalyticsError, ThrowOnError>({
|
|
@@ -991,6 +944,7 @@ export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(o
|
|
|
991
944
|
|
|
992
945
|
/**
|
|
993
946
|
* Switch LinkedIn account type
|
|
947
|
+
* Switch a LinkedIn account between personal profile and organization (company page) posting.
|
|
994
948
|
*/
|
|
995
949
|
export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateLinkedInOrganizationData, ThrowOnError>) => {
|
|
996
950
|
return (options?.client ?? client).put<UpdateLinkedInOrganizationResponse, UpdateLinkedInOrganizationError, ThrowOnError>({
|
|
@@ -1001,9 +955,7 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1001
955
|
|
|
1002
956
|
/**
|
|
1003
957
|
* Resolve LinkedIn mention
|
|
1004
|
-
* Converts a LinkedIn profile or company URL to a URN for @mentions in posts.
|
|
1005
|
-
* Person mentions require admin access to at least one LinkedIn Organization. Org mentions work with any account. For person mentions to be clickable, provide the displayName parameter matching the exact name on their profile. Org names are fetched automatically. Use the returned mentionFormat directly in post content.
|
|
1006
|
-
*
|
|
958
|
+
* Converts a LinkedIn profile or company URL to a URN for @mentions in posts. Person mentions require org admin access. Use the returned mentionFormat in post content.
|
|
1007
959
|
*/
|
|
1008
960
|
export const getLinkedInMentions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInMentionsData, ThrowOnError>) => {
|
|
1009
961
|
return (options?.client ?? client).get<GetLinkedInMentionsResponse, GetLinkedInMentionsError, ThrowOnError>({
|
|
@@ -1014,6 +966,7 @@ export const getLinkedInMentions = <ThrowOnError extends boolean = false>(option
|
|
|
1014
966
|
|
|
1015
967
|
/**
|
|
1016
968
|
* List Pinterest boards
|
|
969
|
+
* Returns the boards available for a connected Pinterest account. Use this to get a board ID when creating a Pinterest post.
|
|
1017
970
|
*/
|
|
1018
971
|
export const getPinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPinterestBoardsData, ThrowOnError>) => {
|
|
1019
972
|
return (options?.client ?? client).get<GetPinterestBoardsResponse, GetPinterestBoardsError, ThrowOnError>({
|
|
@@ -1024,6 +977,7 @@ export const getPinterestBoards = <ThrowOnError extends boolean = false>(options
|
|
|
1024
977
|
|
|
1025
978
|
/**
|
|
1026
979
|
* Set default Pinterest board
|
|
980
|
+
* Sets the default board used when publishing pins for this account.
|
|
1027
981
|
*/
|
|
1028
982
|
export const updatePinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdatePinterestBoardsData, ThrowOnError>) => {
|
|
1029
983
|
return (options?.client ?? client).put<UpdatePinterestBoardsResponse, UpdatePinterestBoardsError, ThrowOnError>({
|
|
@@ -1045,6 +999,7 @@ export const getGmbLocations = <ThrowOnError extends boolean = false>(options: O
|
|
|
1045
999
|
|
|
1046
1000
|
/**
|
|
1047
1001
|
* Update GBP location
|
|
1002
|
+
* Switch which GBP location is active for a connected account.
|
|
1048
1003
|
*/
|
|
1049
1004
|
export const updateGmbLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGmbLocationData, ThrowOnError>) => {
|
|
1050
1005
|
return (options?.client ?? client).put<UpdateGmbLocationResponse, UpdateGmbLocationError, ThrowOnError>({
|
|
@@ -1055,6 +1010,7 @@ export const updateGmbLocation = <ThrowOnError extends boolean = false>(options:
|
|
|
1055
1010
|
|
|
1056
1011
|
/**
|
|
1057
1012
|
* List Reddit subreddits
|
|
1013
|
+
* Returns the subreddits the connected Reddit account can post to. Use this to get a subreddit name when creating a Reddit post.
|
|
1058
1014
|
*/
|
|
1059
1015
|
export const getRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditSubredditsData, ThrowOnError>) => {
|
|
1060
1016
|
return (options?.client ?? client).get<GetRedditSubredditsResponse, GetRedditSubredditsError, ThrowOnError>({
|
|
@@ -1065,6 +1021,7 @@ export const getRedditSubreddits = <ThrowOnError extends boolean = false>(option
|
|
|
1065
1021
|
|
|
1066
1022
|
/**
|
|
1067
1023
|
* Set default subreddit
|
|
1024
|
+
* Sets the default subreddit used when publishing posts for this Reddit account.
|
|
1068
1025
|
*/
|
|
1069
1026
|
export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateRedditSubredditsData, ThrowOnError>) => {
|
|
1070
1027
|
return (options?.client ?? client).put<UpdateRedditSubredditsResponse, UpdateRedditSubredditsError, ThrowOnError>({
|
|
@@ -1075,6 +1032,7 @@ export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(opt
|
|
|
1075
1032
|
|
|
1076
1033
|
/**
|
|
1077
1034
|
* List subreddit flairs
|
|
1035
|
+
* Returns available post flairs for a subreddit. Some subreddits require a flair when posting.
|
|
1078
1036
|
*/
|
|
1079
1037
|
export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFlairsData, ThrowOnError>) => {
|
|
1080
1038
|
return (options?.client ?? client).get<GetRedditFlairsResponse, GetRedditFlairsError, ThrowOnError>({
|
|
@@ -1085,8 +1043,7 @@ export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: O
|
|
|
1085
1043
|
|
|
1086
1044
|
/**
|
|
1087
1045
|
* List schedules
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1046
|
+
* Returns queue schedules for a profile. Use all=true for all queues, or queueId for a specific one. Defaults to the default queue.
|
|
1090
1047
|
*/
|
|
1091
1048
|
export const listQueueSlots = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListQueueSlotsData, ThrowOnError>) => {
|
|
1092
1049
|
return (options?.client ?? client).get<ListQueueSlotsResponse, ListQueueSlotsError, ThrowOnError>({
|
|
@@ -1135,6 +1092,7 @@ export const deleteQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1135
1092
|
|
|
1136
1093
|
/**
|
|
1137
1094
|
* Preview upcoming slots
|
|
1095
|
+
* Returns the next N upcoming queue slot times for a profile as ISO datetime strings.
|
|
1138
1096
|
*/
|
|
1139
1097
|
export const previewQueue = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PreviewQueueData, ThrowOnError>) => {
|
|
1140
1098
|
return (options?.client ?? client).get<PreviewQueueResponse, PreviewQueueError, ThrowOnError>({
|
|
@@ -1145,11 +1103,7 @@ export const previewQueue = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
1145
1103
|
|
|
1146
1104
|
/**
|
|
1147
1105
|
* Get next available slot
|
|
1148
|
-
* Returns the next available queue slot for preview
|
|
1149
|
-
* Instead, use POST /v1/posts with queuedFromProfile (and optionally queueId). Useful for showing users when their next post will go out, debugging queue configuration, or building UI previews.
|
|
1150
|
-
*
|
|
1151
|
-
* If no queueId is specified, uses the profile's default queue.
|
|
1152
|
-
*
|
|
1106
|
+
* Returns the next available queue slot for preview purposes. To create a queue post, use POST /v1/posts with queuedFromProfile instead of scheduledFor.
|
|
1153
1107
|
*/
|
|
1154
1108
|
export const getNextQueueSlot = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetNextQueueSlotData, ThrowOnError>) => {
|
|
1155
1109
|
return (options?.client ?? client).get<GetNextQueueSlotResponse, GetNextQueueSlotError, ThrowOnError>({
|
|
@@ -1318,10 +1272,7 @@ export const getInboxConversationMessages = <ThrowOnError extends boolean = fals
|
|
|
1318
1272
|
|
|
1319
1273
|
/**
|
|
1320
1274
|
* Send message
|
|
1321
|
-
* Send a message in a conversation. Supports text, attachments, quick replies, buttons,
|
|
1322
|
-
* Attachments: Telegram (images, videos, docs up to 50MB), Facebook (images, videos, audio, files), Instagram (images, videos, audio via URL), Twitter/X (images, videos). Not supported on Bluesky/Reddit.
|
|
1323
|
-
* Interactive messages (quick replies, buttons, templates, reply markup) vary by platform. Unsupported fields are silently ignored.
|
|
1324
|
-
*
|
|
1275
|
+
* Send a message in a conversation. Supports text, attachments, quick replies, buttons, and message tags. Attachment and interactive message support varies by platform.
|
|
1325
1276
|
*/
|
|
1326
1277
|
export const sendInboxMessage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendInboxMessageData, ThrowOnError>) => {
|
|
1327
1278
|
return (options?.client ?? client).post<SendInboxMessageResponse, SendInboxMessageError, ThrowOnError>({
|
|
@@ -1367,6 +1318,7 @@ export const setMessengerMenu = <ThrowOnError extends boolean = false>(options:
|
|
|
1367
1318
|
|
|
1368
1319
|
/**
|
|
1369
1320
|
* Delete FB persistent menu
|
|
1321
|
+
* Removes the persistent menu from Facebook Messenger conversations for this account.
|
|
1370
1322
|
*/
|
|
1371
1323
|
export const deleteMessengerMenu = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteMessengerMenuData, ThrowOnError>) => {
|
|
1372
1324
|
return (options?.client ?? client).delete<DeleteMessengerMenuResponse, DeleteMessengerMenuError, ThrowOnError>({
|
|
@@ -1399,6 +1351,7 @@ export const setInstagramIceBreakers = <ThrowOnError extends boolean = false>(op
|
|
|
1399
1351
|
|
|
1400
1352
|
/**
|
|
1401
1353
|
* Delete IG ice breakers
|
|
1354
|
+
* Removes the ice breaker questions from an Instagram account's Messenger experience.
|
|
1402
1355
|
*/
|
|
1403
1356
|
export const deleteInstagramIceBreakers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteInstagramIceBreakersData, ThrowOnError>) => {
|
|
1404
1357
|
return (options?.client ?? client).delete<DeleteInstagramIceBreakersResponse, DeleteInstagramIceBreakersError, ThrowOnError>({
|
|
@@ -1431,6 +1384,7 @@ export const setTelegramCommands = <ThrowOnError extends boolean = false>(option
|
|
|
1431
1384
|
|
|
1432
1385
|
/**
|
|
1433
1386
|
* Delete TG bot commands
|
|
1387
|
+
* Clears all bot commands configured for a Telegram bot account.
|
|
1434
1388
|
*/
|
|
1435
1389
|
export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTelegramCommandsData, ThrowOnError>) => {
|
|
1436
1390
|
return (options?.client ?? client).delete<DeleteTelegramCommandsResponse, DeleteTelegramCommandsError, ThrowOnError>({
|
|
@@ -1441,11 +1395,7 @@ export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(opt
|
|
|
1441
1395
|
|
|
1442
1396
|
/**
|
|
1443
1397
|
* List commented posts
|
|
1444
|
-
*
|
|
1445
|
-
* Aggregates data from multiple accounts in a single API call.
|
|
1446
|
-
*
|
|
1447
|
-
* Supported platforms: Facebook, Instagram, Twitter/X, Bluesky, Threads, YouTube, LinkedIn, Reddit, TikTok (write-only).
|
|
1448
|
-
*
|
|
1398
|
+
* Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts.
|
|
1449
1399
|
*/
|
|
1450
1400
|
export const listInboxComments = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxCommentsData, ThrowOnError>) => {
|
|
1451
1401
|
return (options?.client ?? client).get<ListInboxCommentsResponse, ListInboxCommentsError, ThrowOnError>({
|
|
@@ -1542,9 +1492,7 @@ export const unlikeInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
1542
1492
|
|
|
1543
1493
|
/**
|
|
1544
1494
|
* Send private reply
|
|
1545
|
-
* Send a private
|
|
1546
|
-
* Only one private reply per comment (platform restriction), must be sent within 7 days, only for comments on your own posts, text only. Instagram messages go to Inbox or Message Requests; Facebook opens a Messenger conversation. Both permissions are already included in Late's OAuth flow.
|
|
1547
|
-
*
|
|
1495
|
+
* Send a private message to the author of a comment. Supported on Instagram and Facebook only. One reply per comment, must be sent within 7 days, text only.
|
|
1548
1496
|
*/
|
|
1549
1497
|
export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendPrivateReplyToCommentData, ThrowOnError>) => {
|
|
1550
1498
|
return (options?.client ?? client).post<SendPrivateReplyToCommentResponse, SendPrivateReplyToCommentError, ThrowOnError>({
|