late-sdk 0.0.117 → 0.0.119

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/docs/AccountWithFollowerStats.md +2 -0
  4. data/docs/ConnectAds200Response.md +49 -0
  5. data/docs/ConnectAds200ResponseOneOf.md +26 -0
  6. data/docs/ConnectAds200ResponseOneOf1.md +20 -0
  7. data/docs/ConnectApi.md +80 -0
  8. data/docs/ListLogs200Response.md +20 -0
  9. data/docs/ListLogs200ResponseLogsInner.md +46 -0
  10. data/docs/ListLogs200ResponsePagination.md +26 -0
  11. data/docs/LogsApi.md +88 -2
  12. data/docs/SocialAccount.md +2 -0
  13. data/docs/WebhooksApi.md +1 -1
  14. data/lib/late-sdk/api/connect_api.rb +84 -0
  15. data/lib/late-sdk/api/logs_api.rb +117 -4
  16. data/lib/late-sdk/api/webhooks_api.rb +2 -2
  17. data/lib/late-sdk/models/account_with_follower_stats.rb +45 -1
  18. data/lib/late-sdk/models/connect_ads200_response.rb +104 -0
  19. data/lib/late-sdk/models/connect_ads200_response_one_of.rb +184 -0
  20. data/lib/late-sdk/models/connect_ads200_response_one_of1.rb +157 -0
  21. data/lib/late-sdk/models/list_logs200_response.rb +158 -0
  22. data/lib/late-sdk/models/list_logs200_response_logs_inner.rb +313 -0
  23. data/lib/late-sdk/models/list_logs200_response_pagination.rb +183 -0
  24. data/lib/late-sdk/models/social_account.rb +45 -1
  25. data/lib/late-sdk/version.rb +1 -1
  26. data/lib/late-sdk.rb +6 -0
  27. data/openapi.yaml +230 -4
  28. data/spec/api/connect_api_spec.rb +16 -0
  29. data/spec/api/logs_api_spec.rb +21 -2
  30. data/spec/api/webhooks_api_spec.rb +1 -1
  31. data/spec/models/account_with_follower_stats_spec.rb +10 -0
  32. data/spec/models/connect_ads200_response_one_of1_spec.rb +42 -0
  33. data/spec/models/connect_ads200_response_one_of_spec.rb +60 -0
  34. data/spec/models/connect_ads200_response_spec.rb +32 -0
  35. data/spec/models/list_logs200_response_logs_inner_spec.rb +124 -0
  36. data/spec/models/list_logs200_response_pagination_spec.rb +60 -0
  37. data/spec/models/list_logs200_response_spec.rb +42 -0
  38. data/spec/models/social_account_spec.rb +10 -0
  39. data/zernio-sdk-0.0.119.gem +0 -0
  40. metadata +759 -735
  41. data/zernio-sdk-0.0.117.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3909d5c6517bdf02287864de45d6832472310f508cd744dc35f97b6fdfed4f6
4
- data.tar.gz: 2f1a37ec0bedb5a4fe4642c2cfac4469248e5c3f2ff3fc0dba3a07ea9ee9a91a
3
+ metadata.gz: a6017bb3c967faecd4ac533acd584c76d525ab5b6a92f14dee6ac8890ebac30e
4
+ data.tar.gz: b695c5b6eb8106f18e7995bf74f39e9bf774beb5a8c984ebed9c5d1746291a08
5
5
  SHA512:
6
- metadata.gz: 8c70f92c5db36dc492889abd4439a22d48b5db8c487faef127d3319c92b1be3cf6b06b54966524e50914b53780b4f4ef1b86e667b2dd216aa9c97b6e5ddb27db
7
- data.tar.gz: 737a29f90ecc67cf5565ae6eaa0e1f39f3ff50d3ee5ea8288b18d24c23a64c931dbadbd8553f5c672149c421f1f013d45d0cfb1ac9bec6bbd7a7fa0ed27381f9
6
+ metadata.gz: b34052ee82d690a8c148dfd1c2a1f8c4b4da983db0162c6e61b8b9e9fe94f48401deecd00c02586f034f58f368925353fe7907abb244b79a960516860d19dab1
7
+ data.tar.gz: d78d2ca794476cbde6aa14e6a4bbc0233081bbd627c268a8b8fd7733108bdba4acd767de03dc1cd66adc34ba798b0bb5fc75947b7d4c692acfd8d93811787a27
data/README.md CHANGED
@@ -147,6 +147,7 @@ Class | Method | HTTP request | Description
147
147
  *Late::CommentsApi* | [**unhide_inbox_comment**](docs/CommentsApi.md#unhide_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/hide | Unhide comment
148
148
  *Late::CommentsApi* | [**unlike_inbox_comment**](docs/CommentsApi.md#unlike_inbox_comment) | **DELETE** /v1/inbox/comments/{postId}/{commentId}/like | Unlike comment
149
149
  *Late::ConnectApi* | [**complete_telegram_connect**](docs/ConnectApi.md#complete_telegram_connect) | **PATCH** /v1/connect/telegram | Check Telegram status
150
+ *Late::ConnectApi* | [**connect_ads**](docs/ConnectApi.md#connect_ads) | **GET** /v1/connect/{platform}/ads | Connect ads for a platform
150
151
  *Late::ConnectApi* | [**connect_bluesky_credentials**](docs/ConnectApi.md#connect_bluesky_credentials) | **POST** /v1/connect/bluesky/credentials | Connect Bluesky account
151
152
  *Late::ConnectApi* | [**connect_whats_app_credentials**](docs/ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials
152
153
  *Late::ConnectApi* | [**get_connect_url**](docs/ConnectApi.md#get_connect_url) | **GET** /v1/connect/{platform} | Get OAuth connect URL
@@ -207,6 +208,7 @@ Class | Method | HTTP request | Description
207
208
  *Late::LinkedInMentionsApi* | [**get_linked_in_mentions**](docs/LinkedInMentionsApi.md#get_linked_in_mentions) | **GET** /v1/accounts/{accountId}/linkedin-mentions | Resolve LinkedIn mention
208
209
  *Late::LogsApi* | [**get_post_logs**](docs/LogsApi.md#get_post_logs) | **GET** /v1/posts/{postId}/logs | Get post logs
209
210
  *Late::LogsApi* | [**list_connection_logs**](docs/LogsApi.md#list_connection_logs) | **GET** /v1/connections/logs | List connection logs
211
+ *Late::LogsApi* | [**list_logs**](docs/LogsApi.md#list_logs) | **GET** /v1/logs | List activity logs
210
212
  *Late::LogsApi* | [**list_posts_logs**](docs/LogsApi.md#list_posts_logs) | **GET** /v1/posts/logs | List publishing logs
211
213
  *Late::MediaApi* | [**get_media_presigned_url**](docs/MediaApi.md#get_media_presigned_url) | **POST** /v1/media/presign | Get presigned upload URL
212
214
  *Late::MessagesApi* | [**add_message_reaction**](docs/MessagesApi.md#add_message_reaction) | **POST** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Add reaction
@@ -392,6 +394,9 @@ Class | Method | HTTP request | Description
392
394
  - [Late::CancelWhatsAppBroadcastSchedule200Response](docs/CancelWhatsAppBroadcastSchedule200Response.md)
393
395
  - [Late::CancelWhatsAppBroadcastSchedule200ResponseBroadcast](docs/CancelWhatsAppBroadcastSchedule200ResponseBroadcast.md)
394
396
  - [Late::CompleteTelegramConnect200Response](docs/CompleteTelegramConnect200Response.md)
397
+ - [Late::ConnectAds200Response](docs/ConnectAds200Response.md)
398
+ - [Late::ConnectAds200ResponseOneOf](docs/ConnectAds200ResponseOneOf.md)
399
+ - [Late::ConnectAds200ResponseOneOf1](docs/ConnectAds200ResponseOneOf1.md)
395
400
  - [Late::ConnectBlueskyCredentials200Response](docs/ConnectBlueskyCredentials200Response.md)
396
401
  - [Late::ConnectBlueskyCredentialsRequest](docs/ConnectBlueskyCredentialsRequest.md)
397
402
  - [Late::ConnectWhatsAppCredentials200Response](docs/ConnectWhatsAppCredentials200Response.md)
@@ -773,6 +778,9 @@ Class | Method | HTTP request | Description
773
778
  - [Late::ListInboxReviews200ResponseSummary](docs/ListInboxReviews200ResponseSummary.md)
774
779
  - [Late::ListLinkedInOrganizations200Response](docs/ListLinkedInOrganizations200Response.md)
775
780
  - [Late::ListLinkedInOrganizations200ResponseOrganizationsInner](docs/ListLinkedInOrganizations200ResponseOrganizationsInner.md)
781
+ - [Late::ListLogs200Response](docs/ListLogs200Response.md)
782
+ - [Late::ListLogs200ResponseLogsInner](docs/ListLogs200ResponseLogsInner.md)
783
+ - [Late::ListLogs200ResponsePagination](docs/ListLogs200ResponsePagination.md)
776
784
  - [Late::ListPinterestBoardsForSelection200Response](docs/ListPinterestBoardsForSelection200Response.md)
777
785
  - [Late::ListPinterestBoardsForSelection200ResponseBoardsInner](docs/ListPinterestBoardsForSelection200ResponseBoardsInner.md)
778
786
  - [Late::ListPostsLogs200Response](docs/ListPostsLogs200Response.md)
@@ -13,6 +13,7 @@
13
13
  | **is_active** | **Boolean** | | [optional] |
14
14
  | **followers_count** | **Float** | Follower count (only included if user has analytics add-on) | [optional] |
15
15
  | **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
16
+ | **ads_status** | **String** | Ads connection status for this account. - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
16
17
  | **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - `qualityRating`: Phone number quality rating from Meta (`GREEN`, `YELLOW`, `RED`, or `UNKNOWN`) - `nameStatus`: Display name review status (`APPROVED`, `PENDING_REVIEW`, `DECLINED`, or `NONE`). Messages cannot be sent until the display name is approved by Meta. - `messagingLimitTier`: Maximum unique business-initiated conversations per 24h rolling window (`TIER_250`, `TIER_1K`, `TIER_10K`, `TIER_100K`, or `TIER_UNLIMITED`). Scales automatically as quality rating improves. - `verifiedName`: Meta-verified business display name - `displayPhoneNumber`: Formatted phone number (e.g., \"+1 555-123-4567\") - `wabaId`: WhatsApp Business Account ID - `phoneNumberId`: Meta phone number ID | [optional] |
17
18
  | **profile_picture** | **String** | | [optional] |
18
19
  | **current_followers** | **Float** | Current follower count | [optional] |
@@ -37,6 +38,7 @@ instance = Late::AccountWithFollowerStats.new(
37
38
  is_active: null,
38
39
  followers_count: null,
39
40
  followers_last_updated: null,
41
+ ads_status: null,
40
42
  metadata: null,
41
43
  profile_picture: null,
42
44
  current_followers: null,
@@ -0,0 +1,49 @@
1
+ # Late::ConnectAds200Response
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'late-sdk'
13
+
14
+ Late::ConnectAds200Response.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'ConnectAds200ResponseOneOf',
18
+ # :'ConnectAds200ResponseOneOf1'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'late-sdk'
30
+
31
+ Late::ConnectAds200Response.build(data)
32
+ # => #<ConnectAds200ResponseOneOf:0x00007fdd4aab02a0>
33
+
34
+ Late::ConnectAds200Response.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `ConnectAds200ResponseOneOf`
47
+ - `ConnectAds200ResponseOneOf1`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,26 @@
1
+ # Late::ConnectAds200ResponseOneOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **already_connected** | **Boolean** | | [optional] |
8
+ | **account_id** | **String** | | [optional] |
9
+ | **platform** | **String** | | [optional] |
10
+ | **username** | **String** | | [optional] |
11
+ | **display_name** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'late-sdk'
17
+
18
+ instance = Late::ConnectAds200ResponseOneOf.new(
19
+ already_connected: true,
20
+ account_id: null,
21
+ platform: null,
22
+ username: null,
23
+ display_name: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Late::ConnectAds200ResponseOneOf1
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **auth_url** | **String** | | [optional] |
8
+ | **state** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::ConnectAds200ResponseOneOf1.new(
16
+ auth_url: null,
17
+ state: null
18
+ )
19
+ ```
20
+
data/docs/ConnectApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://zernio.com/api*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**complete_telegram_connect**](ConnectApi.md#complete_telegram_connect) | **PATCH** /v1/connect/telegram | Check Telegram status |
8
+ | [**connect_ads**](ConnectApi.md#connect_ads) | **GET** /v1/connect/{platform}/ads | Connect ads for a platform |
8
9
  | [**connect_bluesky_credentials**](ConnectApi.md#connect_bluesky_credentials) | **POST** /v1/connect/bluesky/credentials | Connect Bluesky account |
9
10
  | [**connect_whats_app_credentials**](ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials |
10
11
  | [**get_connect_url**](ConnectApi.md#get_connect_url) | **GET** /v1/connect/{platform} | Get OAuth connect URL |
@@ -106,6 +107,85 @@ end
106
107
  - **Accept**: application/json
107
108
 
108
109
 
110
+ ## connect_ads
111
+
112
+ > <ConnectAds200Response> connect_ads(platform, profile_id, opts)
113
+
114
+ Connect ads for a platform
115
+
116
+ Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter, pinterest): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
117
+
118
+ ### Examples
119
+
120
+ ```ruby
121
+ require 'time'
122
+ require 'late-sdk'
123
+ # setup authorization
124
+ Late.configure do |config|
125
+ # Configure Bearer authorization (JWT): bearerAuth
126
+ config.access_token = 'YOUR_BEARER_TOKEN'
127
+ end
128
+
129
+ api_instance = Late::ConnectApi.new
130
+ platform = 'facebook' # String | Platform to connect ads for. Only platforms with ads support are accepted.
131
+ profile_id = 'profile_id_example' # String | Your Zernio profile ID
132
+ opts = {
133
+ account_id: 'account_id_example', # String | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter, pinterest). Ignored for same-token and ads-only platforms.
134
+ redirect_url: 'redirect_url_example', # String | Custom redirect URL after OAuth completes (same-token platforms only)
135
+ headless: true # Boolean | Enable headless mode (same-token platforms only)
136
+ }
137
+
138
+ begin
139
+ # Connect ads for a platform
140
+ result = api_instance.connect_ads(platform, profile_id, opts)
141
+ p result
142
+ rescue Late::ApiError => e
143
+ puts "Error when calling ConnectApi->connect_ads: #{e}"
144
+ end
145
+ ```
146
+
147
+ #### Using the connect_ads_with_http_info variant
148
+
149
+ This returns an Array which contains the response data, status code and headers.
150
+
151
+ > <Array(<ConnectAds200Response>, Integer, Hash)> connect_ads_with_http_info(platform, profile_id, opts)
152
+
153
+ ```ruby
154
+ begin
155
+ # Connect ads for a platform
156
+ data, status_code, headers = api_instance.connect_ads_with_http_info(platform, profile_id, opts)
157
+ p status_code # => 2xx
158
+ p headers # => { ... }
159
+ p data # => <ConnectAds200Response>
160
+ rescue Late::ApiError => e
161
+ puts "Error when calling ConnectApi->connect_ads_with_http_info: #{e}"
162
+ end
163
+ ```
164
+
165
+ ### Parameters
166
+
167
+ | Name | Type | Description | Notes |
168
+ | ---- | ---- | ----------- | ----- |
169
+ | **platform** | **String** | Platform to connect ads for. Only platforms with ads support are accepted. | |
170
+ | **profile_id** | **String** | Your Zernio profile ID | |
171
+ | **account_id** | **String** | Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter, pinterest). Ignored for same-token and ads-only platforms. | [optional] |
172
+ | **redirect_url** | **String** | Custom redirect URL after OAuth completes (same-token platforms only) | [optional] |
173
+ | **headless** | **Boolean** | Enable headless mode (same-token platforms only) | [optional][default to false] |
174
+
175
+ ### Return type
176
+
177
+ [**ConnectAds200Response**](ConnectAds200Response.md)
178
+
179
+ ### Authorization
180
+
181
+ [bearerAuth](../README.md#bearerAuth)
182
+
183
+ ### HTTP request headers
184
+
185
+ - **Content-Type**: Not defined
186
+ - **Accept**: application/json
187
+
188
+
109
189
  ## connect_bluesky_credentials
110
190
 
111
191
  > <ConnectBlueskyCredentials200Response> connect_bluesky_credentials(connect_bluesky_credentials_request)
@@ -0,0 +1,20 @@
1
+ # Late::ListLogs200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **logs** | [**Array&lt;ListLogs200ResponseLogsInner&gt;**](ListLogs200ResponseLogsInner.md) | | [optional] |
8
+ | **pagination** | [**ListLogs200ResponsePagination**](ListLogs200ResponsePagination.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::ListLogs200Response.new(
16
+ logs: null,
17
+ pagination: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,46 @@
1
+ # Late::ListLogs200ResponseLogsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | Log category (publishing, connections, webhooks, messaging) | [optional] |
8
+ | **action** | **String** | Specific action (post.published, message.sent, account.connected, etc.) | [optional] |
9
+ | **user_id** | **String** | | [optional] |
10
+ | **platform** | **String** | | [optional] |
11
+ | **account_id** | **String** | | [optional] |
12
+ | **status** | **String** | | [optional] |
13
+ | **status_code** | **Integer** | | [optional] |
14
+ | **error_message** | **String** | | [optional] |
15
+ | **error_code** | **String** | | [optional] |
16
+ | **duration_ms** | **Integer** | | [optional] |
17
+ | **endpoint** | **String** | The API endpoint that triggered this log | [optional] |
18
+ | **request_body** | **String** | Request JSON (truncated to 5KB) | [optional] |
19
+ | **response_body** | **String** | Response JSON (truncated to 10KB) | [optional] |
20
+ | **created_at** | **Time** | | [optional] |
21
+ | **metadata** | **String** | Additional context as JSON string | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'late-sdk'
27
+
28
+ instance = Late::ListLogs200ResponseLogsInner.new(
29
+ type: null,
30
+ action: null,
31
+ user_id: null,
32
+ platform: null,
33
+ account_id: null,
34
+ status: null,
35
+ status_code: null,
36
+ error_message: null,
37
+ error_code: null,
38
+ duration_ms: null,
39
+ endpoint: null,
40
+ request_body: null,
41
+ response_body: null,
42
+ created_at: null,
43
+ metadata: null
44
+ )
45
+ ```
46
+
@@ -0,0 +1,26 @@
1
+ # Late::ListLogs200ResponsePagination
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total** | **Integer** | | [optional] |
8
+ | **limit** | **Integer** | | [optional] |
9
+ | **skip** | **Integer** | | [optional] |
10
+ | **pages** | **Integer** | | [optional] |
11
+ | **has_more** | **Boolean** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'late-sdk'
17
+
18
+ instance = Late::ListLogs200ResponsePagination.new(
19
+ total: null,
20
+ limit: null,
21
+ skip: null,
22
+ pages: null,
23
+ has_more: null
24
+ )
25
+ ```
26
+
data/docs/LogsApi.md CHANGED
@@ -6,6 +6,7 @@ All URIs are relative to *https://zernio.com/api*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**get_post_logs**](LogsApi.md#get_post_logs) | **GET** /v1/posts/{postId}/logs | Get post logs |
8
8
  | [**list_connection_logs**](LogsApi.md#list_connection_logs) | **GET** /v1/connections/logs | List connection logs |
9
+ | [**list_logs**](LogsApi.md#list_logs) | **GET** /v1/logs | List activity logs |
9
10
  | [**list_posts_logs**](LogsApi.md#list_posts_logs) | **GET** /v1/posts/logs | List publishing logs |
10
11
 
11
12
 
@@ -88,7 +89,7 @@ end
88
89
 
89
90
  List connection logs
90
91
 
91
- Retrieve connection event logs showing account connection and disconnection history. Event types: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed. Logs are automatically deleted after 7 days.
92
+ **Deprecated.** Use `GET /v1/logs?type=connections` instead. Retrieve connection event logs. Logs are retained for 90 days.
92
93
 
93
94
  ### Examples
94
95
 
@@ -163,13 +164,98 @@ end
163
164
  - **Accept**: application/json
164
165
 
165
166
 
167
+ ## list_logs
168
+
169
+ > <ListLogs200Response> list_logs(opts)
170
+
171
+ List activity logs
172
+
173
+ Unified logs endpoint. Returns logs for publishing, connections, webhooks, and messaging. Filter by type, platform, status, and time range. Logs are retained for 90 days.
174
+
175
+ ### Examples
176
+
177
+ ```ruby
178
+ require 'time'
179
+ require 'late-sdk'
180
+ # setup authorization
181
+ Late.configure do |config|
182
+ # Configure Bearer authorization (JWT): bearerAuth
183
+ config.access_token = 'YOUR_BEARER_TOKEN'
184
+ end
185
+
186
+ api_instance = Late::LogsApi.new
187
+ opts = {
188
+ type: 'publishing', # String | Log category to query
189
+ status: 'success', # String | Filter by status
190
+ platform: 'tiktok', # String | Filter by platform
191
+ action: 'action_example', # String | Filter by action (e.g., post.published, message.sent, account.connected, webhook.delivered)
192
+ search: 'search_example', # String | Free-text search across log fields
193
+ days: 56, # Integer | Number of days to look back (max 90)
194
+ limit: 56, # Integer | Maximum number of logs to return (max 100)
195
+ skip: 56 # Integer | Number of logs to skip (for pagination)
196
+ }
197
+
198
+ begin
199
+ # List activity logs
200
+ result = api_instance.list_logs(opts)
201
+ p result
202
+ rescue Late::ApiError => e
203
+ puts "Error when calling LogsApi->list_logs: #{e}"
204
+ end
205
+ ```
206
+
207
+ #### Using the list_logs_with_http_info variant
208
+
209
+ This returns an Array which contains the response data, status code and headers.
210
+
211
+ > <Array(<ListLogs200Response>, Integer, Hash)> list_logs_with_http_info(opts)
212
+
213
+ ```ruby
214
+ begin
215
+ # List activity logs
216
+ data, status_code, headers = api_instance.list_logs_with_http_info(opts)
217
+ p status_code # => 2xx
218
+ p headers # => { ... }
219
+ p data # => <ListLogs200Response>
220
+ rescue Late::ApiError => e
221
+ puts "Error when calling LogsApi->list_logs_with_http_info: #{e}"
222
+ end
223
+ ```
224
+
225
+ ### Parameters
226
+
227
+ | Name | Type | Description | Notes |
228
+ | ---- | ---- | ----------- | ----- |
229
+ | **type** | **String** | Log category to query | [optional][default to &#39;publishing&#39;] |
230
+ | **status** | **String** | Filter by status | [optional] |
231
+ | **platform** | **String** | Filter by platform | [optional] |
232
+ | **action** | **String** | Filter by action (e.g., post.published, message.sent, account.connected, webhook.delivered) | [optional] |
233
+ | **search** | **String** | Free-text search across log fields | [optional] |
234
+ | **days** | **Integer** | Number of days to look back (max 90) | [optional][default to 90] |
235
+ | **limit** | **Integer** | Maximum number of logs to return (max 100) | [optional][default to 50] |
236
+ | **skip** | **Integer** | Number of logs to skip (for pagination) | [optional][default to 0] |
237
+
238
+ ### Return type
239
+
240
+ [**ListLogs200Response**](ListLogs200Response.md)
241
+
242
+ ### Authorization
243
+
244
+ [bearerAuth](../README.md#bearerAuth)
245
+
246
+ ### HTTP request headers
247
+
248
+ - **Content-Type**: Not defined
249
+ - **Accept**: application/json
250
+
251
+
166
252
  ## list_posts_logs
167
253
 
168
254
  > <ListPostsLogs200Response> list_posts_logs(opts)
169
255
 
170
256
  List publishing logs
171
257
 
172
- Retrieve publishing logs for all posts with detailed information about each publishing attempt. Filter by status, platform, or action. Logs are automatically deleted after 7 days.
258
+ **Deprecated.** Use `GET /v1/logs?type=publishing` instead. Retrieve publishing logs for all posts. Logs are retained for 90 days.
173
259
 
174
260
  ### Examples
175
261
 
@@ -13,6 +13,7 @@
13
13
  | **is_active** | **Boolean** | | [optional] |
14
14
  | **followers_count** | **Float** | Follower count (only included if user has analytics add-on) | [optional] |
15
15
  | **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
16
+ | **ads_status** | **String** | Ads connection status for this account. - &#x60;connected&#x60;: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - &#x60;not_connected&#x60;: Platform supports ads but requires a separate ads OAuth. Use &#x60;GET /v1/connect/{platform}/ads&#x60; to connect. - &#x60;not_available&#x60;: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). | [optional] |
16
17
  | **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - &#x60;qualityRating&#x60;: Phone number quality rating from Meta (&#x60;GREEN&#x60;, &#x60;YELLOW&#x60;, &#x60;RED&#x60;, or &#x60;UNKNOWN&#x60;) - &#x60;nameStatus&#x60;: Display name review status (&#x60;APPROVED&#x60;, &#x60;PENDING_REVIEW&#x60;, &#x60;DECLINED&#x60;, or &#x60;NONE&#x60;). Messages cannot be sent until the display name is approved by Meta. - &#x60;messagingLimitTier&#x60;: Maximum unique business-initiated conversations per 24h rolling window (&#x60;TIER_250&#x60;, &#x60;TIER_1K&#x60;, &#x60;TIER_10K&#x60;, &#x60;TIER_100K&#x60;, or &#x60;TIER_UNLIMITED&#x60;). Scales automatically as quality rating improves. - &#x60;verifiedName&#x60;: Meta-verified business display name - &#x60;displayPhoneNumber&#x60;: Formatted phone number (e.g., \&quot;+1 555-123-4567\&quot;) - &#x60;wabaId&#x60;: WhatsApp Business Account ID - &#x60;phoneNumberId&#x60;: Meta phone number ID | [optional] |
17
18
 
18
19
  ## Example
@@ -30,6 +31,7 @@ instance = Late::SocialAccount.new(
30
31
  is_active: null,
31
32
  followers_count: null,
32
33
  followers_last_updated: null,
34
+ ads_status: null,
33
35
  metadata: null
34
36
  )
35
37
  ```
data/docs/WebhooksApi.md CHANGED
@@ -156,7 +156,7 @@ end
156
156
 
157
157
  Get delivery logs
158
158
 
159
- Retrieve webhook delivery history. Logs are automatically deleted after 7 days.
159
+ **Deprecated.** Use `GET /v1/logs?type=webhooks` instead. Retrieve webhook delivery history. Logs are retained for 90 days.
160
160
 
161
161
  ### Examples
162
162
 
@@ -83,6 +83,90 @@ module Late
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
+ # Connect ads for a platform
87
+ # Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter, pinterest): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
88
+ # @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted.
89
+ # @param profile_id [String] Your Zernio profile ID
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter, pinterest). Ignored for same-token and ads-only platforms.
92
+ # @option opts [String] :redirect_url Custom redirect URL after OAuth completes (same-token platforms only)
93
+ # @option opts [Boolean] :headless Enable headless mode (same-token platforms only) (default to false)
94
+ # @return [ConnectAds200Response]
95
+ def connect_ads(platform, profile_id, opts = {})
96
+ data, _status_code, _headers = connect_ads_with_http_info(platform, profile_id, opts)
97
+ data
98
+ end
99
+
100
+ # Connect ads for a platform
101
+ # Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin): If a posting account already exists, returns &#x60;alreadyConnected: true&#x60; immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter, pinterest): Requires an existing posting account (&#x60;accountId&#x60; param). If ads are already connected, returns &#x60;alreadyConnected: true&#x60;. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns &#x60;alreadyConnected: true&#x60;. Otherwise, starts the Google Ads OAuth flow. Use the &#x60;adsStatus&#x60; field from &#x60;GET /v1/accounts&#x60; to check which accounts need ads connection.
102
+ # @param platform [String] Platform to connect ads for. Only platforms with ads support are accepted.
103
+ # @param profile_id [String] Your Zernio profile ID
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :account_id Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter, pinterest). Ignored for same-token and ads-only platforms.
106
+ # @option opts [String] :redirect_url Custom redirect URL after OAuth completes (same-token platforms only)
107
+ # @option opts [Boolean] :headless Enable headless mode (same-token platforms only) (default to false)
108
+ # @return [Array<(ConnectAds200Response, Integer, Hash)>] ConnectAds200Response data, response status code and response headers
109
+ def connect_ads_with_http_info(platform, profile_id, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: ConnectApi.connect_ads ...'
112
+ end
113
+ # verify the required parameter 'platform' is set
114
+ if @api_client.config.client_side_validation && platform.nil?
115
+ fail ArgumentError, "Missing the required parameter 'platform' when calling ConnectApi.connect_ads"
116
+ end
117
+ # verify enum value
118
+ allowable_values = ["facebook", "instagram", "linkedin", "tiktok", "twitter", "pinterest", "googleads"]
119
+ if @api_client.config.client_side_validation && !allowable_values.include?(platform)
120
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
121
+ end
122
+ # verify the required parameter 'profile_id' is set
123
+ if @api_client.config.client_side_validation && profile_id.nil?
124
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.connect_ads"
125
+ end
126
+ # resource path
127
+ local_var_path = '/v1/connect/{platform}/ads'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s))
128
+
129
+ # query parameters
130
+ query_params = opts[:query_params] || {}
131
+ query_params[:'profileId'] = profile_id
132
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
133
+ query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
134
+ query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].nil?
135
+
136
+ # header parameters
137
+ header_params = opts[:header_params] || {}
138
+ # HTTP header 'Accept' (if needed)
139
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body]
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'ConnectAds200Response'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"ConnectApi.connect_ads",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: ConnectApi#connect_ads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
86
170
  # Connect Bluesky account
87
171
  # Connect a Bluesky account using identifier (handle or email) and an app password. To get your userId for the state parameter, call GET /v1/users which includes a currentUserId field.
88
172
  # @param connect_bluesky_credentials_request [ConnectBlueskyCredentialsRequest]