late-sdk 0.0.857 → 0.0.858

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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/docs/ChannelPicker.md +20 -0
  4. data/docs/ChannelPickerChannelsInner.md +24 -0
  5. data/docs/ChannelPickerTeam.md +22 -0
  6. data/docs/ConnectApi.md +78 -0
  7. data/docs/CreatePost200Response.md +22 -0
  8. data/docs/CreatePost200ResponseTiktokInner.md +24 -0
  9. data/docs/CreatePostRequest.md +2 -0
  10. data/docs/ListSlackChannels200Response.md +49 -0
  11. data/docs/PlatformTarget.md +1 -1
  12. data/docs/Post.md +1 -1
  13. data/docs/PostsApi.md +4 -4
  14. data/docs/StartOAuth.md +20 -0
  15. data/docs/WebhookLog.md +1 -1
  16. data/lib/zernio-sdk/api/connect_api.rb +77 -0
  17. data/lib/zernio-sdk/api/posts_api.rb +4 -4
  18. data/lib/zernio-sdk/models/channel_picker.rb +192 -0
  19. data/lib/zernio-sdk/models/channel_picker_channels_inner.rb +244 -0
  20. data/lib/zernio-sdk/models/channel_picker_team.rb +169 -0
  21. data/lib/zernio-sdk/models/create_post200_response.rb +221 -0
  22. data/lib/zernio-sdk/models/create_post200_response_tiktok_inner.rb +227 -0
  23. data/lib/zernio-sdk/models/create_post_request.rb +13 -1
  24. data/lib/zernio-sdk/models/list_slack_channels200_response.rb +104 -0
  25. data/lib/zernio-sdk/models/platform_target.rb +1 -1
  26. data/lib/zernio-sdk/models/post.rb +3 -2
  27. data/lib/zernio-sdk/models/start_o_auth.rb +190 -0
  28. data/lib/zernio-sdk/models/webhook_log.rb +1 -1
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +7 -0
  31. data/openapi.yaml +133 -6
  32. data/spec/api/connect_api_spec.rb +15 -0
  33. data/spec/api/posts_api_spec.rb +1 -1
  34. data/spec/models/channel_picker_channels_inner_spec.rb +54 -0
  35. data/spec/models/channel_picker_spec.rb +42 -0
  36. data/spec/models/channel_picker_team_spec.rb +48 -0
  37. data/spec/models/create_post200_response_spec.rb +48 -0
  38. data/spec/models/create_post200_response_tiktok_inner_spec.rb +54 -0
  39. data/spec/models/create_post_request_spec.rb +6 -0
  40. data/spec/models/list_slack_channels200_response_spec.rb +32 -0
  41. data/spec/models/post_spec.rb +1 -1
  42. data/spec/models/start_o_auth_spec.rb +42 -0
  43. data/zernio-sdk-0.0.858.gem +0 -0
  44. metadata +30 -2
  45. data/zernio-sdk-0.0.857.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ac6293997f8522188b2568db8a696b1cfce99c6e86271759ab4005ef5d4f08a
4
- data.tar.gz: e4a95ce4e0d240f50a9d9fa86d5966401e2dc0e2f7af80890c252fbc89ef7dc5
3
+ metadata.gz: f988c7eedbed5a0b20b1af98b4d69bdbc120812358bf51de4c471918db01e073
4
+ data.tar.gz: d12293150e6ae180eea0086533720a8884038987e649c7e65bd676bf29ad5aab
5
5
  SHA512:
6
- metadata.gz: 55e9960c1de205b4e971de8063a8e5f036b9418d6c3d31f42eacc6a3e9238f72ac96991abf036ae6c119d86ba7fff458e598cef3d75628ec1bd25f7bc6b7a530
7
- data.tar.gz: c9216c428f3c0f28b02aab6320d7c91da4773b4a6c9c63ab7d47dc14d6ccf1b204938ec509d2f477936b9d32b613a6f9adf119ceee08556413323f7b051bf24a
6
+ metadata.gz: 7dba660d52af52a6553273548ef3aafe52ceb430e0efbf6e22528e63c8165dba1584210c85f526f08e208c956a0a48538be70956f7a607938137900951a80ed0
7
+ data.tar.gz: 5ef878dbb05ff4ca840e3f7f72cf3b89658f6d3080122e86bcd68870d55ce415c1c3340534de4f2b129044b589df4ff9c7d5ba6dc6611a27141a4fcc9e5df47e
data/README.md CHANGED
@@ -294,6 +294,7 @@ Class | Method | HTTP request | Description
294
294
  *Zernio::ConnectApi* | [**list_instagram_pages**](docs/ConnectApi.md#list_instagram_pages) | **GET** /v1/connect/instagram/select-account | List Pages with a linked Instagram account
295
295
  *Zernio::ConnectApi* | [**list_linked_in_organizations**](docs/ConnectApi.md#list_linked_in_organizations) | **GET** /v1/connect/linkedin/organizations | List LinkedIn orgs
296
296
  *Zernio::ConnectApi* | [**list_pinterest_boards_for_selection**](docs/ConnectApi.md#list_pinterest_boards_for_selection) | **GET** /v1/connect/pinterest/select-board | List Pinterest boards
297
+ *Zernio::ConnectApi* | [**list_slack_channels**](docs/ConnectApi.md#list_slack_channels) | **GET** /v1/connect/slack | List Slack channels for the channel picker
297
298
  *Zernio::ConnectApi* | [**list_snapchat_profiles**](docs/ConnectApi.md#list_snapchat_profiles) | **GET** /v1/connect/snapchat/select-profile | List Snapchat profiles
298
299
  *Zernio::ConnectApi* | [**list_whats_app_phone_numbers**](docs/ConnectApi.md#list_whats_app_phone_numbers) | **GET** /v1/connect/whatsapp/select-phone-number | List numbers for selection
299
300
  *Zernio::ConnectApi* | [**select_facebook_page**](docs/ConnectApi.md#select_facebook_page) | **POST** /v1/connect/facebook/select-page | Select Facebook page
@@ -825,6 +826,9 @@ Class | Method | HTTP request | Description
825
826
  - [Zernio::CampaignAnalyticsResponseCampaign](docs/CampaignAnalyticsResponseCampaign.md)
826
827
  - [Zernio::CancelBroadcast200Response](docs/CancelBroadcast200Response.md)
827
828
  - [Zernio::CancelPhoneNumberPortIn200Response](docs/CancelPhoneNumberPortIn200Response.md)
829
+ - [Zernio::ChannelPicker](docs/ChannelPicker.md)
830
+ - [Zernio::ChannelPickerChannelsInner](docs/ChannelPickerChannelsInner.md)
831
+ - [Zernio::ChannelPickerTeam](docs/ChannelPickerTeam.md)
828
832
  - [Zernio::CheckPhoneNumberAvailability200Response](docs/CheckPhoneNumberAvailability200Response.md)
829
833
  - [Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner](docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md)
830
834
  - [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
@@ -960,6 +964,8 @@ Class | Method | HTTP request | Description
960
964
  - [Zernio::CreatePinterestBoard201Response](docs/CreatePinterestBoard201Response.md)
961
965
  - [Zernio::CreatePinterestBoard201ResponseBoard](docs/CreatePinterestBoard201ResponseBoard.md)
962
966
  - [Zernio::CreatePinterestBoardRequest](docs/CreatePinterestBoardRequest.md)
967
+ - [Zernio::CreatePost200Response](docs/CreatePost200Response.md)
968
+ - [Zernio::CreatePost200ResponseTiktokInner](docs/CreatePost200ResponseTiktokInner.md)
963
969
  - [Zernio::CreatePost403Response](docs/CreatePost403Response.md)
964
970
  - [Zernio::CreatePost409Response](docs/CreatePost409Response.md)
965
971
  - [Zernio::CreatePost409ResponseDetails](docs/CreatePost409ResponseDetails.md)
@@ -1717,6 +1723,7 @@ Class | Method | HTTP request | Description
1717
1723
  - [Zernio::ListSipTrunks200Response](docs/ListSipTrunks200Response.md)
1718
1724
  - [Zernio::ListSipTrunks200ResponseTrunksInner](docs/ListSipTrunks200ResponseTrunksInner.md)
1719
1725
  - [Zernio::ListSipTrunks200ResponseTrunksInnerTermination](docs/ListSipTrunks200ResponseTrunksInnerTermination.md)
1726
+ - [Zernio::ListSlackChannels200Response](docs/ListSlackChannels200Response.md)
1720
1727
  - [Zernio::ListSlackMembers200Response](docs/ListSlackMembers200Response.md)
1721
1728
  - [Zernio::ListSlackMembers200ResponseMembersInner](docs/ListSlackMembers200ResponseMembersInner.md)
1722
1729
  - [Zernio::ListSmsOptOuts200Response](docs/ListSmsOptOuts200Response.md)
@@ -2062,6 +2069,7 @@ Class | Method | HTTP request | Description
2062
2069
  - [Zernio::StartGoogleBusinessVerification200Response](docs/StartGoogleBusinessVerification200Response.md)
2063
2070
  - [Zernio::StartGoogleBusinessVerification200ResponseVerification](docs/StartGoogleBusinessVerification200ResponseVerification.md)
2064
2071
  - [Zernio::StartGoogleBusinessVerificationRequest](docs/StartGoogleBusinessVerificationRequest.md)
2072
+ - [Zernio::StartOAuth](docs/StartOAuth.md)
2065
2073
  - [Zernio::StartSmsRegistration200Response](docs/StartSmsRegistration200Response.md)
2066
2074
  - [Zernio::StartSmsRegistrationRequest](docs/StartSmsRegistrationRequest.md)
2067
2075
  - [Zernio::StartSmsRegistrationRequestBrand](docs/StartSmsRegistrationRequestBrand.md)
@@ -0,0 +1,20 @@
1
+ # Zernio::ChannelPicker
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **team** | [**ChannelPickerTeam**](ChannelPickerTeam.md) | | |
8
+ | **channels** | [**Array<ChannelPickerChannelsInner>**](ChannelPickerChannelsInner.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ChannelPicker.new(
16
+ team: null,
17
+ channels: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # Zernio::ChannelPickerChannelsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Channel id (C... or G...), the value to send as channelId on POST | |
8
+ | **name** | **String** | | |
9
+ | **is_private** | **Boolean** | | |
10
+ | **is_member** | **Boolean** | Whether the Zernio bot is already a member of the channel | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::ChannelPickerChannelsInner.new(
18
+ id: null,
19
+ name: null,
20
+ is_private: null,
21
+ is_member: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Zernio::ChannelPickerTeam
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Slack workspace (team) id | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **icon** | **String** | Workspace icon URL | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::ChannelPickerTeam.new(
17
+ id: null,
18
+ name: null,
19
+ icon: null
20
+ )
21
+ ```
22
+
data/docs/ConnectApi.md CHANGED
@@ -37,6 +37,7 @@ All URIs are relative to *https://zernio.com/api*
37
37
  | [**list_instagram_pages**](ConnectApi.md#list_instagram_pages) | **GET** /v1/connect/instagram/select-account | List Pages with a linked Instagram account |
38
38
  | [**list_linked_in_organizations**](ConnectApi.md#list_linked_in_organizations) | **GET** /v1/connect/linkedin/organizations | List LinkedIn orgs |
39
39
  | [**list_pinterest_boards_for_selection**](ConnectApi.md#list_pinterest_boards_for_selection) | **GET** /v1/connect/pinterest/select-board | List Pinterest boards |
40
+ | [**list_slack_channels**](ConnectApi.md#list_slack_channels) | **GET** /v1/connect/slack | List Slack channels for the channel picker |
40
41
  | [**list_snapchat_profiles**](ConnectApi.md#list_snapchat_profiles) | **GET** /v1/connect/snapchat/select-profile | List Snapchat profiles |
41
42
  | [**list_whats_app_phone_numbers**](ConnectApi.md#list_whats_app_phone_numbers) | **GET** /v1/connect/whatsapp/select-phone-number | List numbers for selection |
42
43
  | [**select_facebook_page**](ConnectApi.md#select_facebook_page) | **POST** /v1/connect/facebook/select-page | Select Facebook page |
@@ -2433,6 +2434,83 @@ end
2433
2434
  - **Accept**: application/json
2434
2435
 
2435
2436
 
2437
+ ## list_slack_channels
2438
+
2439
+ > <ListSlackChannels200Response> list_slack_channels(profile_id, opts)
2440
+
2441
+ List Slack channels for the channel picker
2442
+
2443
+ Serves the channel picker of the Slack connect flow. Slack's OAuth installs the bot into a workspace, not a channel, so after the redirect the caller lists the workspace's channels here and finalizes one with `POST /v1/connect/slack`. Served by a dedicated route that shadows `GET /v1/connect/{platform}` for `slack`. Send exactly one of `pendingDataToken` (first connect: the nonce from the OAuth redirect, bound to the same `profileId`) or `accountId` (add another channel to a workspace already connected: the existing Slack account's workspace token is reused, no re-OAuth). With neither, the endpoint behaves like `GET /v1/connect/{platform}` and returns `authUrl` and `state` to start the OAuth flow. Channels are read live from Slack (`conversations.list`, public and private, archived excluded, up to 2,000). `isMember` says whether the Zernio bot is already in the channel: a public channel is joined automatically on finalize, a private one must be invited (`/invite @Zernio`) first.
2444
+
2445
+ ### Examples
2446
+
2447
+ ```ruby
2448
+ require 'time'
2449
+ require 'zernio-sdk'
2450
+ # setup authorization
2451
+ Zernio.configure do |config|
2452
+ # Configure Bearer authorization (JWT): bearerAuth
2453
+ config.access_token = 'YOUR_BEARER_TOKEN'
2454
+ end
2455
+
2456
+ api_instance = Zernio::ConnectApi.new
2457
+ profile_id = 'profile_id_example' # String | Zernio profile the channel account will belong to. Must match the profile the OAuth flow was started on when `pendingDataToken` is used.
2458
+ opts = {
2459
+ pending_data_token: 'pending_data_token_example', # String | Nonce from the OAuth redirect (first connect).
2460
+ account_id: 'account_id_example', # String | Existing active Slack account (yours or a team member's) whose workspace token is reused.
2461
+ redirect_url: 'redirect_url_example' # String | Start-OAuth mode only: where to send the user after the connect completes. `redirectUrl` is accepted as an alias.
2462
+ }
2463
+
2464
+ begin
2465
+ # List Slack channels for the channel picker
2466
+ result = api_instance.list_slack_channels(profile_id, opts)
2467
+ p result
2468
+ rescue Zernio::ApiError => e
2469
+ puts "Error when calling ConnectApi->list_slack_channels: #{e}"
2470
+ end
2471
+ ```
2472
+
2473
+ #### Using the list_slack_channels_with_http_info variant
2474
+
2475
+ This returns an Array which contains the response data, status code and headers.
2476
+
2477
+ > <Array(<ListSlackChannels200Response>, Integer, Hash)> list_slack_channels_with_http_info(profile_id, opts)
2478
+
2479
+ ```ruby
2480
+ begin
2481
+ # List Slack channels for the channel picker
2482
+ data, status_code, headers = api_instance.list_slack_channels_with_http_info(profile_id, opts)
2483
+ p status_code # => 2xx
2484
+ p headers # => { ... }
2485
+ p data # => <ListSlackChannels200Response>
2486
+ rescue Zernio::ApiError => e
2487
+ puts "Error when calling ConnectApi->list_slack_channels_with_http_info: #{e}"
2488
+ end
2489
+ ```
2490
+
2491
+ ### Parameters
2492
+
2493
+ | Name | Type | Description | Notes |
2494
+ | ---- | ---- | ----------- | ----- |
2495
+ | **profile_id** | **String** | Zernio profile the channel account will belong to. Must match the profile the OAuth flow was started on when &#x60;pendingDataToken&#x60; is used. | |
2496
+ | **pending_data_token** | **String** | Nonce from the OAuth redirect (first connect). | [optional] |
2497
+ | **account_id** | **String** | Existing active Slack account (yours or a team member&#39;s) whose workspace token is reused. | [optional] |
2498
+ | **redirect_url** | **String** | Start-OAuth mode only: where to send the user after the connect completes. &#x60;redirectUrl&#x60; is accepted as an alias. | [optional] |
2499
+
2500
+ ### Return type
2501
+
2502
+ [**ListSlackChannels200Response**](ListSlackChannels200Response.md)
2503
+
2504
+ ### Authorization
2505
+
2506
+ [bearerAuth](../README.md#bearerAuth)
2507
+
2508
+ ### HTTP request headers
2509
+
2510
+ - **Content-Type**: Not defined
2511
+ - **Accept**: application/json
2512
+
2513
+
2436
2514
  ## list_snapchat_profiles
2437
2515
 
2438
2516
  > <ListSnapchatProfiles200Response> list_snapchat_profiles(x_connect_token, profile_id, temp_token)
@@ -0,0 +1,22 @@
1
+ # Zernio::CreatePost200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **dry_run** | **Boolean** | Always true on this response | |
8
+ | **can_publish** | **Boolean** | True only when every evaluated TikTok account can publish now | |
9
+ | **tiktok** | [**Array&lt;CreatePost200ResponseTiktokInner&gt;**](CreatePost200ResponseTiktokInner.md) | One verdict per &#x60;tiktok&#x60; entry in the request, in request order | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CreatePost200Response.new(
17
+ dry_run: null,
18
+ can_publish: null,
19
+ tiktok: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Zernio::CreatePost200ResponseTiktokInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | | |
8
+ | **can_publish** | **Boolean** | | |
9
+ | **already_posted_today** | **Boolean** | Whether this account already published a Direct Post today (an account that did can keep publishing). Absent for Creator Inbox drafts and when no per-user limit applies. | [optional] |
10
+ | **reason** | **String** | Human-readable explanation of the verdict | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::CreatePost200ResponseTiktokInner.new(
18
+ account_id: null,
19
+ can_publish: null,
20
+ already_posted_today: null,
21
+ reason: null
22
+ )
23
+ ```
24
+
@@ -11,6 +11,7 @@
11
11
  | **scheduled_for** | **Time** | When to publish. Required unless &#x60;publishNow&#x60; is true, &#x60;queuedFromProfile&#x60; is set, or the post is a draft. An ISO 8601 value with a &#x60;Z&#x60; or offset (&#x60;2026-01-15T10:00:00Z&#x60;, &#x60;2026-01-15T11:00:00+01:00&#x60;) is taken as-is; a value without one (&#x60;2026-01-15T10:00:00&#x60; or &#x60;2026-01-15 10:00&#x60;) is read as local time in &#x60;timezone&#x60;. A value already in the past is published synchronously in the same request. Ignored when &#x60;publishNow&#x60; is true. | [optional] |
12
12
  | **publish_now** | **Boolean** | Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and &#x60;platformPostUrl&#x60;, with HTTP 207 when some platforms failed. Takes precedence over &#x60;scheduledFor&#x60;; ignored when &#x60;isDraft&#x60; is true. | [optional][default to false] |
13
13
  | **is_draft** | **Boolean** | When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically. | [optional][default to false] |
14
+ | **dry_run** | **Boolean** | TikTok only. Preview whether each &#x60;tiktok&#x60; entry in &#x60;platforms&#x60; could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with &#x60;{ dryRun: true, canPublish, tiktok: [...] }&#x60; instead of 201. Only &#x60;tiktok&#x60; entries are evaluated; other platforms in the body are ignored, and a body with no &#x60;tiktok&#x60; entry is rejected with 400 &#x60;invalid_field_value&#x60; on &#x60;platforms&#x60;. An entry with &#x60;platformSpecificData.tiktokSettings.draft: true&#x60; (Creator Inbox upload) is not subject to the limit and always reports &#x60;canPublish: true&#x60;. | [optional][default to false] |
14
15
  | **timezone** | **String** | IANA timezone (&#x60;Europe/Madrid&#x60;, &#x60;America/New_York&#x60;) used to interpret a &#x60;scheduledFor&#x60; (root or per-platform) that carries no &#x60;Z&#x60; or offset. Has no effect on values that already carry one. An unknown name returns 400 when &#x60;scheduledFor&#x60; is set. | [optional][default to &#39;UTC&#39;] |
15
16
  | **tags** | **Array&lt;String&gt;** | Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed. | [optional] |
16
17
  | **hashtags** | **Array&lt;String&gt;** | Stored for reference only. Hashtags are NOT automatically appended to the caption when publishing. Include hashtags directly in the content field (platforms like Instagram only support hashtags as caption text). For YouTube keywords, use the tags field instead. | [optional] |
@@ -36,6 +37,7 @@ instance = Zernio::CreatePostRequest.new(
36
37
  scheduled_for: null,
37
38
  publish_now: null,
38
39
  is_draft: null,
40
+ dry_run: null,
39
41
  timezone: null,
40
42
  tags: null,
41
43
  hashtags: null,
@@ -0,0 +1,49 @@
1
+ # Zernio::ListSlackChannels200Response
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 'zernio-sdk'
13
+
14
+ Zernio::ListSlackChannels200Response.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'ChannelPicker',
18
+ # :'StartOAuth'
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 'zernio-sdk'
30
+
31
+ Zernio::ListSlackChannels200Response.build(data)
32
+ # => #<ChannelPicker:0x00007fdd4aab02a0>
33
+
34
+ Zernio::ListSlackChannels200Response.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
+ - `ChannelPicker`
47
+ - `StartOAuth`
48
+ - `nil` (if no type matches)
49
+
@@ -10,7 +10,7 @@
10
10
  | **custom_media** | [**Array&lt;MediaItem&gt;**](MediaItem.md) | | [optional] |
11
11
  | **scheduled_for** | **Time** | Optional per-platform scheduled time override (uses post.scheduledFor when omitted) | [optional] |
12
12
  | **platform_specific_data** | **Hash&lt;String, Object&gt;** | The platform-specific options stored on this target, echoed back as they were sent. Typed per platform on the way in (see the *PlatformData schemas on the request body); free-form on the way out, because a response is not guaranteed to match exactly one of those variants and generated clients that pick a variant by structure reject the entire response when it doesn&#39;t. Zernio&#39;s internal publishing state (snapshots, container ids, publish stage) is never returned here, and the key is omitted rather than sent as an empty object. | [optional] |
13
- | **status** | **String** | Platform-specific status: pending, publishing, published, failed | [optional] |
13
+ | **status** | **String** | Platform-specific status: pending, processing, uploading, published, failed, cancelled (removed from the platform via DELETE /v1/posts/{postId}/unpublish) | [optional] |
14
14
  | **platform_post_id** | **String** | The native post ID on the platform (populated after successful publish) | [optional] |
15
15
  | **platform_post_url** | **String** | Public URL of the published post. Included in the response for immediate posts; for scheduled posts, fetch via GET /v1/posts/{postId} after publish time. Empty when the platform confirmed the publish without returning an id a permalink can be built from (TikTok returns a publish id for some uploads); the TikTok reconcile cron backfills it later. | [optional] |
16
16
  | **published_at** | **Time** | Timestamp when the post was published to this platform | [optional] |
data/docs/Post.md CHANGED
@@ -12,7 +12,7 @@
12
12
  | **platforms** | [**Array&lt;PlatformTarget&gt;**](PlatformTarget.md) | | [optional] |
13
13
  | **scheduled_for** | **Time** | | [optional] |
14
14
  | **timezone** | **String** | | [optional] |
15
- | **status** | **String** | | [optional] |
15
+ | **status** | **String** | &#x60;cancelled&#x60; is set by DELETE /v1/posts/{postId}/unpublish once every platform entry has been removed from its platform (a post with published entries left becomes &#x60;partial&#x60;); cancelled posts can be edited and rescheduled like drafts. | [optional] |
16
16
  | **tags** | **Array&lt;String&gt;** | YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates removed. | [optional] |
17
17
  | **hashtags** | **Array&lt;String&gt;** | Stored for reference only. Hashtags are NOT automatically appended to the caption when publishing. Include hashtags directly in the content field (platforms like Instagram only support hashtags as caption text). For YouTube keywords, use the tags field instead. | [optional] |
18
18
  | **mentions** | **Array&lt;String&gt;** | Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field. | [optional] |
data/docs/PostsApi.md CHANGED
@@ -91,7 +91,7 @@ end
91
91
 
92
92
  ## create_post
93
93
 
94
- > <PostCreateResponse> create_post(create_post_request, opts)
94
+ > <CreatePost200Response> create_post(create_post_request, opts)
95
95
 
96
96
  Create post
97
97
 
@@ -127,7 +127,7 @@ end
127
127
 
128
128
  This returns an Array which contains the response data, status code and headers.
129
129
 
130
- > <Array(<PostCreateResponse>, Integer, Hash)> create_post_with_http_info(create_post_request, opts)
130
+ > <Array(<CreatePost200Response>, Integer, Hash)> create_post_with_http_info(create_post_request, opts)
131
131
 
132
132
  ```ruby
133
133
  begin
@@ -135,7 +135,7 @@ begin
135
135
  data, status_code, headers = api_instance.create_post_with_http_info(create_post_request, opts)
136
136
  p status_code # => 2xx
137
137
  p headers # => { ... }
138
- p data # => <PostCreateResponse>
138
+ p data # => <CreatePost200Response>
139
139
  rescue Zernio::ApiError => e
140
140
  puts "Error when calling PostsApi->create_post_with_http_info: #{e}"
141
141
  end
@@ -150,7 +150,7 @@ end
150
150
 
151
151
  ### Return type
152
152
 
153
- [**PostCreateResponse**](PostCreateResponse.md)
153
+ [**CreatePost200Response**](CreatePost200Response.md)
154
154
 
155
155
  ### Authorization
156
156
 
@@ -0,0 +1,20 @@
1
+ # Zernio::StartOAuth
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **auth_url** | **String** | | |
8
+ | **state** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::StartOAuth.new(
16
+ auth_url: null,
17
+ state: null
18
+ )
19
+ ```
20
+
data/docs/WebhookLog.md CHANGED
@@ -7,7 +7,7 @@
7
7
  | **user_id** | **String** | ID of the account owner the webhook belongs to | [optional] |
8
8
  | **webhook_id** | **String** | ID of the webhook configuration that produced this delivery | [optional] |
9
9
  | **webhook_name** | **String** | Name of the webhook configuration at delivery time | [optional] |
10
- | **event_id** | **String** | Stable webhook event ID (correlates to the delivered payload) | [optional] |
10
+ | **event_id** | **String** | Stable webhook event ID: the payload &#x60;id&#x60;, also sent as the X-Zernio-Event-Id header. Shared by every attempt and redelivery of the same event. | [optional] |
11
11
  | **event** | **String** | Event type that triggered the delivery (e.g. post.published) | [optional] |
12
12
  | **url** | **String** | Destination URL the webhook was delivered to | [optional] |
13
13
  | **status** | **String** | Delivery outcome | [optional] |
@@ -2370,6 +2370,83 @@ module Zernio
2370
2370
  return data, status_code, headers
2371
2371
  end
2372
2372
 
2373
+ # List Slack channels for the channel picker
2374
+ # Serves the channel picker of the Slack connect flow. Slack's OAuth installs the bot into a workspace, not a channel, so after the redirect the caller lists the workspace's channels here and finalizes one with `POST /v1/connect/slack`. Served by a dedicated route that shadows `GET /v1/connect/{platform}` for `slack`. Send exactly one of `pendingDataToken` (first connect: the nonce from the OAuth redirect, bound to the same `profileId`) or `accountId` (add another channel to a workspace already connected: the existing Slack account's workspace token is reused, no re-OAuth). With neither, the endpoint behaves like `GET /v1/connect/{platform}` and returns `authUrl` and `state` to start the OAuth flow. Channels are read live from Slack (`conversations.list`, public and private, archived excluded, up to 2,000). `isMember` says whether the Zernio bot is already in the channel: a public channel is joined automatically on finalize, a private one must be invited (`/invite @Zernio`) first.
2375
+ # @param profile_id [String] Zernio profile the channel account will belong to. Must match the profile the OAuth flow was started on when &#x60;pendingDataToken&#x60; is used.
2376
+ # @param [Hash] opts the optional parameters
2377
+ # @option opts [String] :pending_data_token Nonce from the OAuth redirect (first connect).
2378
+ # @option opts [String] :account_id Existing active Slack account (yours or a team member&#39;s) whose workspace token is reused.
2379
+ # @option opts [String] :redirect_url Start-OAuth mode only: where to send the user after the connect completes. &#x60;redirectUrl&#x60; is accepted as an alias.
2380
+ # @return [ListSlackChannels200Response]
2381
+ def list_slack_channels(profile_id, opts = {})
2382
+ data, _status_code, _headers = list_slack_channels_with_http_info(profile_id, opts)
2383
+ data
2384
+ end
2385
+
2386
+ # List Slack channels for the channel picker
2387
+ # Serves the channel picker of the Slack connect flow. Slack&#39;s OAuth installs the bot into a workspace, not a channel, so after the redirect the caller lists the workspace&#39;s channels here and finalizes one with &#x60;POST /v1/connect/slack&#x60;. Served by a dedicated route that shadows &#x60;GET /v1/connect/{platform}&#x60; for &#x60;slack&#x60;. Send exactly one of &#x60;pendingDataToken&#x60; (first connect: the nonce from the OAuth redirect, bound to the same &#x60;profileId&#x60;) or &#x60;accountId&#x60; (add another channel to a workspace already connected: the existing Slack account&#39;s workspace token is reused, no re-OAuth). With neither, the endpoint behaves like &#x60;GET /v1/connect/{platform}&#x60; and returns &#x60;authUrl&#x60; and &#x60;state&#x60; to start the OAuth flow. Channels are read live from Slack (&#x60;conversations.list&#x60;, public and private, archived excluded, up to 2,000). &#x60;isMember&#x60; says whether the Zernio bot is already in the channel: a public channel is joined automatically on finalize, a private one must be invited (&#x60;/invite @Zernio&#x60;) first.
2388
+ # @param profile_id [String] Zernio profile the channel account will belong to. Must match the profile the OAuth flow was started on when &#x60;pendingDataToken&#x60; is used.
2389
+ # @param [Hash] opts the optional parameters
2390
+ # @option opts [String] :pending_data_token Nonce from the OAuth redirect (first connect).
2391
+ # @option opts [String] :account_id Existing active Slack account (yours or a team member&#39;s) whose workspace token is reused.
2392
+ # @option opts [String] :redirect_url Start-OAuth mode only: where to send the user after the connect completes. &#x60;redirectUrl&#x60; is accepted as an alias.
2393
+ # @return [Array<(ListSlackChannels200Response, Integer, Hash)>] ListSlackChannels200Response data, response status code and response headers
2394
+ def list_slack_channels_with_http_info(profile_id, opts = {})
2395
+ if @api_client.config.debugging
2396
+ @api_client.config.logger.debug 'Calling API: ConnectApi.list_slack_channels ...'
2397
+ end
2398
+ # verify the required parameter 'profile_id' is set
2399
+ if @api_client.config.client_side_validation && profile_id.nil?
2400
+ fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.list_slack_channels"
2401
+ end
2402
+ if @api_client.config.client_side_validation && !opts[:'pending_data_token'].nil? && opts[:'pending_data_token'].to_s.length < 16
2403
+ fail ArgumentError, 'invalid value for "opts[:"pending_data_token"]" when calling ConnectApi.list_slack_channels, the character length must be greater than or equal to 16.'
2404
+ end
2405
+
2406
+ # resource path
2407
+ local_var_path = '/v1/connect/slack'
2408
+
2409
+ # query parameters
2410
+ query_params = opts[:query_params] || {}
2411
+ query_params[:'profileId'] = profile_id
2412
+ query_params[:'pendingDataToken'] = opts[:'pending_data_token'] if !opts[:'pending_data_token'].nil?
2413
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
2414
+ query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
2415
+
2416
+ # header parameters
2417
+ header_params = opts[:header_params] || {}
2418
+ # HTTP header 'Accept' (if needed)
2419
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2420
+
2421
+ # form parameters
2422
+ form_params = opts[:form_params] || {}
2423
+
2424
+ # http body (model)
2425
+ post_body = opts[:debug_body]
2426
+
2427
+ # return_type
2428
+ return_type = opts[:debug_return_type] || 'ListSlackChannels200Response'
2429
+
2430
+ # auth_names
2431
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2432
+
2433
+ new_options = opts.merge(
2434
+ :operation => :"ConnectApi.list_slack_channels",
2435
+ :header_params => header_params,
2436
+ :query_params => query_params,
2437
+ :form_params => form_params,
2438
+ :body => post_body,
2439
+ :auth_names => auth_names,
2440
+ :return_type => return_type
2441
+ )
2442
+
2443
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2444
+ if @api_client.config.debugging
2445
+ @api_client.config.logger.debug "API called: ConnectApi#list_slack_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2446
+ end
2447
+ return data, status_code, headers
2448
+ end
2449
+
2373
2450
  # List Snapchat profiles
2374
2451
  # For headless flows. Returns Snapchat Public Profiles the user can post to. Use X-Connect-Token from the redirect URL.
2375
2452
  # @param x_connect_token [String] Short-lived connect token from the OAuth redirect
@@ -92,7 +92,7 @@ module Zernio
92
92
  # @param create_post_request [CreatePostRequest]
93
93
  # @param [Hash] opts the optional parameters
94
94
  # @option opts [String] :x_request_id Optional client-generated request identifier for safe retry (idempotency). When two requests carry the same value, the second is treated as a retry of the first and returns the original post (HTTP 200) instead of creating a duplicate. Window is ~5 minutes from the first request. Generate a UUID per logical call. SDKs do this automatically; HTTP clients should set it themselves or omit it. See the operation description for the full idempotency contract.
95
- # @return [PostCreateResponse]
95
+ # @return [CreatePost200Response]
96
96
  def create_post(create_post_request, opts = {})
97
97
  data, _status_code, _headers = create_post_with_http_info(create_post_request, opts)
98
98
  data
@@ -103,7 +103,7 @@ module Zernio
103
103
  # @param create_post_request [CreatePostRequest]
104
104
  # @param [Hash] opts the optional parameters
105
105
  # @option opts [String] :x_request_id Optional client-generated request identifier for safe retry (idempotency). When two requests carry the same value, the second is treated as a retry of the first and returns the original post (HTTP 200) instead of creating a duplicate. Window is ~5 minutes from the first request. Generate a UUID per logical call. SDKs do this automatically; HTTP clients should set it themselves or omit it. See the operation description for the full idempotency contract.
106
- # @return [Array<(PostCreateResponse, Integer, Hash)>] PostCreateResponse data, response status code and response headers
106
+ # @return [Array<(CreatePost200Response, Integer, Hash)>] CreatePost200Response data, response status code and response headers
107
107
  def create_post_with_http_info(create_post_request, opts = {})
108
108
  if @api_client.config.debugging
109
109
  @api_client.config.logger.debug 'Calling API: PostsApi.create_post ...'
@@ -136,7 +136,7 @@ module Zernio
136
136
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_post_request)
137
137
 
138
138
  # return_type
139
- return_type = opts[:debug_return_type] || 'PostCreateResponse'
139
+ return_type = opts[:debug_return_type] || 'CreatePost200Response'
140
140
 
141
141
  # auth_names
142
142
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
@@ -417,7 +417,7 @@ module Zernio
417
417
  if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
418
418
  fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
419
419
  end
420
- allowable_values = ["draft", "scheduled", "published", "failed"]
420
+ allowable_values = ["draft", "scheduled", "publishing", "published", "partial", "failed", "cancelled"]
421
421
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
422
422
  fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
423
423
  end