@getlatedev/node 0.2.1297 → 0.2.1298
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 +31 -8
- package/dist/index.d.ts +31 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +3 -2
- package/src/generated/types.gen.ts +31 -7
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@getlatedev/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.1298",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@getlatedev/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.1298",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -1366,8 +1366,9 @@ export const deleteProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
1366
1366
|
/**
|
|
1367
1367
|
* List accounts
|
|
1368
1368
|
* Returns connected accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on.
|
|
1369
|
-
* Supports optional server-side pagination
|
|
1370
|
-
*
|
|
1369
|
+
* Supports optional server-side pagination. When omitted, returns all accounts (backward-compatible).
|
|
1370
|
+
* Cursor paging: send `limit` alone for the first page, then pass `pagination.nextCursor` back as `cursor` until it is null. Pages are ordered by account id, so accounts added or removed between calls never shift a page. Cannot be combined with `page`, `sort` or `perProfile`.
|
|
1371
|
+
* Offset paging: send `page` and `limit` together. Out-of-range page/limit values are rejected with 400 rather than silently clamped.
|
|
1371
1372
|
*
|
|
1372
1373
|
*/
|
|
1373
1374
|
export const listAccounts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListAccountsData, ThrowOnError>) => {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
+
export type AccountCursorPagination = {
|
|
4
|
+
limit: number;
|
|
5
|
+
/**
|
|
6
|
+
* Opaque cursor for the next page; pass it back as `cursor`. Null on the last page.
|
|
7
|
+
*/
|
|
8
|
+
nextCursor: (string) | null;
|
|
9
|
+
};
|
|
10
|
+
|
|
3
11
|
export type AccountsListResponse = {
|
|
4
12
|
accounts: Array<SocialAccount>;
|
|
5
13
|
/**
|
|
@@ -7,9 +15,9 @@ export type AccountsListResponse = {
|
|
|
7
15
|
*/
|
|
8
16
|
hasAnalyticsAccess: boolean;
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
18
|
+
* Present on a paginated request: `{ page, limit, total, pages }` with page and limit, `{ limit, nextCursor }` with cursor paging (limit alone or cursor).
|
|
11
19
|
*/
|
|
12
|
-
pagination?: Pagination;
|
|
20
|
+
pagination?: (Pagination | AccountCursorPagination);
|
|
13
21
|
/**
|
|
14
22
|
* Only with profileIds and perProfile. Accounts matching the filters per profile ID; a profile with none is absent.
|
|
15
23
|
*/
|
|
@@ -6763,6 +6771,10 @@ export type FollowerStatsResponse = {
|
|
|
6763
6771
|
to?: string;
|
|
6764
6772
|
};
|
|
6765
6773
|
granularity?: string;
|
|
6774
|
+
/**
|
|
6775
|
+
* Only present when limit or cursor is sent.
|
|
6776
|
+
*/
|
|
6777
|
+
pagination?: AccountCursorPagination;
|
|
6766
6778
|
};
|
|
6767
6779
|
|
|
6768
6780
|
export type FoodMenu = {
|
|
@@ -21290,6 +21302,10 @@ export type ListAccountsData = {
|
|
|
21290
21302
|
* Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit), communication = WhatsApp, Telegram, Discord, Slack and iMessage, blogs = Shopify and WordPress, crm = HubSpot, social = every other platform.
|
|
21291
21303
|
*/
|
|
21292
21304
|
category?: 'social' | 'ads' | 'communication' | 'blogs' | 'crm';
|
|
21305
|
+
/**
|
|
21306
|
+
* Opaque cursor from a previous response's `pagination.nextCursor`; returns the next page of `limit` accounts (500 when limit is omitted). A cursor we cannot parse returns 400. Cannot be combined with page.
|
|
21307
|
+
*/
|
|
21308
|
+
cursor?: string;
|
|
21293
21309
|
/**
|
|
21294
21310
|
* When true, leaves out accounts the dashboard does not show as connections: posting
|
|
21295
21311
|
* accounts with `enabled: false` (ads accounts are always kept, whatever their `enabled`
|
|
@@ -21307,7 +21323,7 @@ export type ListAccountsData = {
|
|
|
21307
21323
|
/**
|
|
21308
21324
|
* When true, appends the shared WhatsApp sandbox account and the iMessage sandbox account
|
|
21309
21325
|
* to the list when they are active, honouring `platform` but no other filter. Ignored on
|
|
21310
|
-
* a paginated request (page
|
|
21326
|
+
* a paginated request (page, limit or cursor) and together with `perProfile`. Accepts `true` or
|
|
21311
21327
|
* `false` in any letter case; any other value returns 400.
|
|
21312
21328
|
*
|
|
21313
21329
|
*/
|
|
@@ -21320,7 +21336,7 @@ export type ListAccountsData = {
|
|
|
21320
21336
|
*/
|
|
21321
21337
|
includeStatusCounts?: boolean;
|
|
21322
21338
|
/**
|
|
21323
|
-
* Page size.
|
|
21339
|
+
* Page size. With page, an offset page; alone or with cursor, a cursor page.
|
|
21324
21340
|
*
|
|
21325
21341
|
*/
|
|
21326
21342
|
limit?: number;
|
|
@@ -21329,12 +21345,12 @@ export type ListAccountsData = {
|
|
|
21329
21345
|
*/
|
|
21330
21346
|
order?: 'asc' | 'desc';
|
|
21331
21347
|
/**
|
|
21332
|
-
* Page number (1-based)
|
|
21348
|
+
* Page number (1-based) for offset paging. Requires limit; omit page, limit and cursor for all accounts.
|
|
21333
21349
|
*
|
|
21334
21350
|
*/
|
|
21335
21351
|
page?: number;
|
|
21336
21352
|
/**
|
|
21337
|
-
* Return a preview of each profile in profileIds: the newest account of every platform it has, topped up to at least N. Requires profileIds; cannot be combined with page
|
|
21353
|
+
* Return a preview of each profile in profileIds: the newest account of every platform it has, topped up to at least N. Requires profileIds; cannot be combined with page, limit or cursor.
|
|
21338
21354
|
*/
|
|
21339
21355
|
perProfile?: number;
|
|
21340
21356
|
/**
|
|
@@ -21354,7 +21370,7 @@ export type ListAccountsData = {
|
|
|
21354
21370
|
*/
|
|
21355
21371
|
search?: string;
|
|
21356
21372
|
/**
|
|
21357
|
-
* Sort
|
|
21373
|
+
* Sort an offset-paginated listing (page and limit) by account name, platform, profile name, status (accounts needing a reconnect first when ascending) or connection date. Ties keep the default order: platform, then newest first.
|
|
21358
21374
|
*/
|
|
21359
21375
|
sort?: 'account' | 'platform' | 'profile' | 'status' | 'connected';
|
|
21360
21376
|
/**
|
|
@@ -21375,6 +21391,10 @@ export type GetFollowerStatsData = {
|
|
|
21375
21391
|
* Comma-separated list of account IDs (optional, defaults to all user's accounts)
|
|
21376
21392
|
*/
|
|
21377
21393
|
accountIds?: string;
|
|
21394
|
+
/**
|
|
21395
|
+
* Opaque cursor from a previous response's `pagination.nextCursor`; returns the next page of `limit` accounts (25 when limit is omitted). A cursor we cannot parse returns 400.
|
|
21396
|
+
*/
|
|
21397
|
+
cursor?: string;
|
|
21378
21398
|
/**
|
|
21379
21399
|
* Start date in YYYY-MM-DD format (defaults to 30 days ago)
|
|
21380
21400
|
*/
|
|
@@ -21383,6 +21403,10 @@ export type GetFollowerStatsData = {
|
|
|
21383
21403
|
* Data aggregation level
|
|
21384
21404
|
*/
|
|
21385
21405
|
granularity?: 'daily' | 'weekly' | 'monthly';
|
|
21406
|
+
/**
|
|
21407
|
+
* Accounts per page, ordered by account id. Send it to page through accounts; the response then carries `pagination.nextCursor`. Without limit or cursor every matching account is returned.
|
|
21408
|
+
*/
|
|
21409
|
+
limit?: number;
|
|
21386
21410
|
/**
|
|
21387
21411
|
* Filter by profile ID
|
|
21388
21412
|
*/
|