late-sdk 0.0.754 → 0.0.755
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.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/docs/ConnectApi.md +210 -3
- data/docs/ConnectDiscordChannelRequest.md +22 -0
- data/docs/ConnectSlackChannelRequest.md +24 -0
- data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +28 -0
- data/lib/zernio-sdk/api/connect_api.rb +213 -4
- data/lib/zernio-sdk/models/connect_discord_channel_request.rb +219 -0
- data/lib/zernio-sdk/models/connect_slack_channel_request.rb +211 -0
- data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +230 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +95 -4
- data/spec/api/connect_api_spec.rb +38 -2
- data/spec/models/connect_discord_channel_request_spec.rb +48 -0
- data/spec/models/connect_slack_channel_request_spec.rb +54 -0
- data/spec/models/connect_whats_app_embedded_signup_request_spec.rb +66 -0
- data/zernio-sdk-0.0.755.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.754.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11cbc008b0117900fdcd5d38eeabc3aa4e57e97910167c2fa134123a21969d81
|
|
4
|
+
data.tar.gz: c71c6138d437f89f06c34e7a5a7d3af9acca5835a00dfcce840729440c25b73e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df029575fbf79a3e6951a87d422125eeb62c5b0fe76563e37b6fa0ffde9d67ad70e8f115e02a6db6ee17a8bc29b98e6898db34d10f529b40e9b887fda24d52a3
|
|
7
|
+
data.tar.gz: 1cce108640601e73be2e8aa0e856109e0b7f06fe1a369221d82bd732651f4581e11a393eae260a318174d9abc873e7ccdb90485ffa03d01bbbaf2a3e3065d99e
|
data/README.md
CHANGED
|
@@ -257,9 +257,12 @@ Class | Method | HTTP request | Description
|
|
|
257
257
|
*Zernio::ConnectApi* | [**configure_tik_tok_ads_brand_identity**](docs/ConnectApi.md#configure_tik_tok_ads_brand_identity) | **PATCH** /v1/connect/tiktok-ads | Set TikTok brand identity
|
|
258
258
|
*Zernio::ConnectApi* | [**connect_ads**](docs/ConnectApi.md#connect_ads) | **GET** /v1/connect/{platform}/ads | Connect ads for a platform
|
|
259
259
|
*Zernio::ConnectApi* | [**connect_bluesky_credentials**](docs/ConnectApi.md#connect_bluesky_credentials) | **POST** /v1/connect/bluesky/credentials | Connect Bluesky account
|
|
260
|
+
*Zernio::ConnectApi* | [**connect_discord_channel**](docs/ConnectApi.md#connect_discord_channel) | **POST** /v1/connect/discord | Connect a Discord channel
|
|
260
261
|
*Zernio::ConnectApi* | [**connect_open_ai_ads_credentials**](docs/ConnectApi.md#connect_open_ai_ads_credentials) | **POST** /v1/connect/openai-ads/credentials | Connect an OpenAI Ads account
|
|
261
262
|
*Zernio::ConnectApi* | [**connect_shopify_with_token**](docs/ConnectApi.md#connect_shopify_with_token) | **POST** /v1/connect/shopify/token | Connect a Shopify store with a custom-app Admin token
|
|
263
|
+
*Zernio::ConnectApi* | [**connect_slack_channel**](docs/ConnectApi.md#connect_slack_channel) | **POST** /v1/connect/slack | Connect a Slack channel
|
|
262
264
|
*Zernio::ConnectApi* | [**connect_whats_app_credentials**](docs/ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials
|
|
265
|
+
*Zernio::ConnectApi* | [**connect_whats_app_embedded_signup**](docs/ConnectApi.md#connect_whats_app_embedded_signup) | **POST** /v1/connect/whatsapp/embedded-signup | Connect WhatsApp from Embedded Signup
|
|
263
266
|
*Zernio::ConnectApi* | [**create_pinterest_board**](docs/ConnectApi.md#create_pinterest_board) | **POST** /v1/accounts/{accountId}/pinterest-boards | Create Pinterest board
|
|
264
267
|
*Zernio::ConnectApi* | [**get_connect_url**](docs/ConnectApi.md#get_connect_url) | **GET** /v1/connect/{platform} | Get OAuth connect URL
|
|
265
268
|
*Zernio::ConnectApi* | [**get_facebook_pages**](docs/ConnectApi.md#get_facebook_pages) | **GET** /v1/accounts/{accountId}/facebook-page | List Facebook pages
|
|
@@ -811,14 +814,17 @@ Class | Method | HTTP request | Description
|
|
|
811
814
|
- [Zernio::ConnectAds200ResponseOneOf1](docs/ConnectAds200ResponseOneOf1.md)
|
|
812
815
|
- [Zernio::ConnectBlueskyCredentials200Response](docs/ConnectBlueskyCredentials200Response.md)
|
|
813
816
|
- [Zernio::ConnectBlueskyCredentialsRequest](docs/ConnectBlueskyCredentialsRequest.md)
|
|
817
|
+
- [Zernio::ConnectDiscordChannelRequest](docs/ConnectDiscordChannelRequest.md)
|
|
814
818
|
- [Zernio::ConnectOpenAIAdsCredentials200Response](docs/ConnectOpenAIAdsCredentials200Response.md)
|
|
815
819
|
- [Zernio::ConnectOpenAIAdsCredentialsRequest](docs/ConnectOpenAIAdsCredentialsRequest.md)
|
|
816
820
|
- [Zernio::ConnectShopifyWithToken200Response](docs/ConnectShopifyWithToken200Response.md)
|
|
817
821
|
- [Zernio::ConnectShopifyWithToken200ResponseAccount](docs/ConnectShopifyWithToken200ResponseAccount.md)
|
|
818
822
|
- [Zernio::ConnectShopifyWithTokenRequest](docs/ConnectShopifyWithTokenRequest.md)
|
|
823
|
+
- [Zernio::ConnectSlackChannelRequest](docs/ConnectSlackChannelRequest.md)
|
|
819
824
|
- [Zernio::ConnectWhatsAppCredentials200Response](docs/ConnectWhatsAppCredentials200Response.md)
|
|
820
825
|
- [Zernio::ConnectWhatsAppCredentials200ResponseAccount](docs/ConnectWhatsAppCredentials200ResponseAccount.md)
|
|
821
826
|
- [Zernio::ConnectWhatsAppCredentialsRequest](docs/ConnectWhatsAppCredentialsRequest.md)
|
|
827
|
+
- [Zernio::ConnectWhatsAppEmbeddedSignupRequest](docs/ConnectWhatsAppEmbeddedSignupRequest.md)
|
|
822
828
|
- [Zernio::Connected](docs/Connected.md)
|
|
823
829
|
- [Zernio::ConnectedAccount](docs/ConnectedAccount.md)
|
|
824
830
|
- [Zernio::ConnectedApp](docs/ConnectedApp.md)
|
data/docs/ConnectApi.md
CHANGED
|
@@ -10,9 +10,12 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
10
10
|
| [**configure_tik_tok_ads_brand_identity**](ConnectApi.md#configure_tik_tok_ads_brand_identity) | **PATCH** /v1/connect/tiktok-ads | Set TikTok brand identity |
|
|
11
11
|
| [**connect_ads**](ConnectApi.md#connect_ads) | **GET** /v1/connect/{platform}/ads | Connect ads for a platform |
|
|
12
12
|
| [**connect_bluesky_credentials**](ConnectApi.md#connect_bluesky_credentials) | **POST** /v1/connect/bluesky/credentials | Connect Bluesky account |
|
|
13
|
+
| [**connect_discord_channel**](ConnectApi.md#connect_discord_channel) | **POST** /v1/connect/discord | Connect a Discord channel |
|
|
13
14
|
| [**connect_open_ai_ads_credentials**](ConnectApi.md#connect_open_ai_ads_credentials) | **POST** /v1/connect/openai-ads/credentials | Connect an OpenAI Ads account |
|
|
14
15
|
| [**connect_shopify_with_token**](ConnectApi.md#connect_shopify_with_token) | **POST** /v1/connect/shopify/token | Connect a Shopify store with a custom-app Admin token |
|
|
16
|
+
| [**connect_slack_channel**](ConnectApi.md#connect_slack_channel) | **POST** /v1/connect/slack | Connect a Slack channel |
|
|
15
17
|
| [**connect_whats_app_credentials**](ConnectApi.md#connect_whats_app_credentials) | **POST** /v1/connect/whatsapp/credentials | Connect WhatsApp via credentials |
|
|
18
|
+
| [**connect_whats_app_embedded_signup**](ConnectApi.md#connect_whats_app_embedded_signup) | **POST** /v1/connect/whatsapp/embedded-signup | Connect WhatsApp from Embedded Signup |
|
|
16
19
|
| [**create_pinterest_board**](ConnectApi.md#create_pinterest_board) | **POST** /v1/accounts/{accountId}/pinterest-boards | Create Pinterest board |
|
|
17
20
|
| [**get_connect_url**](ConnectApi.md#get_connect_url) | **GET** /v1/connect/{platform} | Get OAuth connect URL |
|
|
18
21
|
| [**get_facebook_pages**](ConnectApi.md#get_facebook_pages) | **GET** /v1/accounts/{accountId}/facebook-page | List Facebook pages |
|
|
@@ -487,6 +490,74 @@ end
|
|
|
487
490
|
- **Accept**: application/json
|
|
488
491
|
|
|
489
492
|
|
|
493
|
+
## connect_discord_channel
|
|
494
|
+
|
|
495
|
+
> connect_discord_channel(connect_discord_channel_request)
|
|
496
|
+
|
|
497
|
+
Connect a Discord channel
|
|
498
|
+
|
|
499
|
+
Finalize a Discord connect by binding one channel to a profile. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. One connected account per channel: repeat the call with a different channelId to add another.
|
|
500
|
+
|
|
501
|
+
### Examples
|
|
502
|
+
|
|
503
|
+
```ruby
|
|
504
|
+
require 'time'
|
|
505
|
+
require 'zernio-sdk'
|
|
506
|
+
# setup authorization
|
|
507
|
+
Zernio.configure do |config|
|
|
508
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
509
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
api_instance = Zernio::ConnectApi.new
|
|
513
|
+
connect_discord_channel_request = Zernio::ConnectDiscordChannelRequest.new({guild_id: 'guild_id_example', channel_id: 'channel_id_example', profile_id: 'profile_id_example'}) # ConnectDiscordChannelRequest |
|
|
514
|
+
|
|
515
|
+
begin
|
|
516
|
+
# Connect a Discord channel
|
|
517
|
+
api_instance.connect_discord_channel(connect_discord_channel_request)
|
|
518
|
+
rescue Zernio::ApiError => e
|
|
519
|
+
puts "Error when calling ConnectApi->connect_discord_channel: #{e}"
|
|
520
|
+
end
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
#### Using the connect_discord_channel_with_http_info variant
|
|
524
|
+
|
|
525
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
526
|
+
|
|
527
|
+
> <Array(nil, Integer, Hash)> connect_discord_channel_with_http_info(connect_discord_channel_request)
|
|
528
|
+
|
|
529
|
+
```ruby
|
|
530
|
+
begin
|
|
531
|
+
# Connect a Discord channel
|
|
532
|
+
data, status_code, headers = api_instance.connect_discord_channel_with_http_info(connect_discord_channel_request)
|
|
533
|
+
p status_code # => 2xx
|
|
534
|
+
p headers # => { ... }
|
|
535
|
+
p data # => nil
|
|
536
|
+
rescue Zernio::ApiError => e
|
|
537
|
+
puts "Error when calling ConnectApi->connect_discord_channel_with_http_info: #{e}"
|
|
538
|
+
end
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### Parameters
|
|
542
|
+
|
|
543
|
+
| Name | Type | Description | Notes |
|
|
544
|
+
| ---- | ---- | ----------- | ----- |
|
|
545
|
+
| **connect_discord_channel_request** | [**ConnectDiscordChannelRequest**](ConnectDiscordChannelRequest.md) | | |
|
|
546
|
+
|
|
547
|
+
### Return type
|
|
548
|
+
|
|
549
|
+
nil (empty response body)
|
|
550
|
+
|
|
551
|
+
### Authorization
|
|
552
|
+
|
|
553
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
554
|
+
|
|
555
|
+
### HTTP request headers
|
|
556
|
+
|
|
557
|
+
- **Content-Type**: application/json
|
|
558
|
+
- **Accept**: application/json
|
|
559
|
+
|
|
560
|
+
|
|
490
561
|
## connect_open_ai_ads_credentials
|
|
491
562
|
|
|
492
563
|
> <ConnectOpenAIAdsCredentials200Response> connect_open_ai_ads_credentials(connect_open_ai_ads_credentials_request)
|
|
@@ -625,6 +696,74 @@ end
|
|
|
625
696
|
- **Accept**: application/json
|
|
626
697
|
|
|
627
698
|
|
|
699
|
+
## connect_slack_channel
|
|
700
|
+
|
|
701
|
+
> connect_slack_channel(connect_slack_channel_request)
|
|
702
|
+
|
|
703
|
+
Connect a Slack channel
|
|
704
|
+
|
|
705
|
+
Finalize a Slack connect by creating the per-channel account. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. Send pendingDataToken for a first connect (the nonce from the OAuth redirect) or accountId to add another channel to a workspace already connected.
|
|
706
|
+
|
|
707
|
+
### Examples
|
|
708
|
+
|
|
709
|
+
```ruby
|
|
710
|
+
require 'time'
|
|
711
|
+
require 'zernio-sdk'
|
|
712
|
+
# setup authorization
|
|
713
|
+
Zernio.configure do |config|
|
|
714
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
715
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
api_instance = Zernio::ConnectApi.new
|
|
719
|
+
connect_slack_channel_request = Zernio::ConnectSlackChannelRequest.new({profile_id: 'profile_id_example', channel_id: 'channel_id_example'}) # ConnectSlackChannelRequest |
|
|
720
|
+
|
|
721
|
+
begin
|
|
722
|
+
# Connect a Slack channel
|
|
723
|
+
api_instance.connect_slack_channel(connect_slack_channel_request)
|
|
724
|
+
rescue Zernio::ApiError => e
|
|
725
|
+
puts "Error when calling ConnectApi->connect_slack_channel: #{e}"
|
|
726
|
+
end
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
#### Using the connect_slack_channel_with_http_info variant
|
|
730
|
+
|
|
731
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
732
|
+
|
|
733
|
+
> <Array(nil, Integer, Hash)> connect_slack_channel_with_http_info(connect_slack_channel_request)
|
|
734
|
+
|
|
735
|
+
```ruby
|
|
736
|
+
begin
|
|
737
|
+
# Connect a Slack channel
|
|
738
|
+
data, status_code, headers = api_instance.connect_slack_channel_with_http_info(connect_slack_channel_request)
|
|
739
|
+
p status_code # => 2xx
|
|
740
|
+
p headers # => { ... }
|
|
741
|
+
p data # => nil
|
|
742
|
+
rescue Zernio::ApiError => e
|
|
743
|
+
puts "Error when calling ConnectApi->connect_slack_channel_with_http_info: #{e}"
|
|
744
|
+
end
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
### Parameters
|
|
748
|
+
|
|
749
|
+
| Name | Type | Description | Notes |
|
|
750
|
+
| ---- | ---- | ----------- | ----- |
|
|
751
|
+
| **connect_slack_channel_request** | [**ConnectSlackChannelRequest**](ConnectSlackChannelRequest.md) | | |
|
|
752
|
+
|
|
753
|
+
### Return type
|
|
754
|
+
|
|
755
|
+
nil (empty response body)
|
|
756
|
+
|
|
757
|
+
### Authorization
|
|
758
|
+
|
|
759
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
760
|
+
|
|
761
|
+
### HTTP request headers
|
|
762
|
+
|
|
763
|
+
- **Content-Type**: application/json
|
|
764
|
+
- **Accept**: application/json
|
|
765
|
+
|
|
766
|
+
|
|
628
767
|
## connect_whats_app_credentials
|
|
629
768
|
|
|
630
769
|
> <ConnectWhatsAppCredentials200Response> connect_whats_app_credentials(connect_whats_app_credentials_request)
|
|
@@ -694,6 +833,74 @@ end
|
|
|
694
833
|
- **Accept**: application/json
|
|
695
834
|
|
|
696
835
|
|
|
836
|
+
## connect_whats_app_embedded_signup
|
|
837
|
+
|
|
838
|
+
> connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request)
|
|
839
|
+
|
|
840
|
+
Connect WhatsApp from Embedded Signup
|
|
841
|
+
|
|
842
|
+
Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
|
|
843
|
+
|
|
844
|
+
### Examples
|
|
845
|
+
|
|
846
|
+
```ruby
|
|
847
|
+
require 'time'
|
|
848
|
+
require 'zernio-sdk'
|
|
849
|
+
# setup authorization
|
|
850
|
+
Zernio.configure do |config|
|
|
851
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
852
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
api_instance = Zernio::ConnectApi.new
|
|
856
|
+
connect_whats_app_embedded_signup_request = Zernio::ConnectWhatsAppEmbeddedSignupRequest.new({code: 'code_example', profile_id: 'profile_id_example'}) # ConnectWhatsAppEmbeddedSignupRequest |
|
|
857
|
+
|
|
858
|
+
begin
|
|
859
|
+
# Connect WhatsApp from Embedded Signup
|
|
860
|
+
api_instance.connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request)
|
|
861
|
+
rescue Zernio::ApiError => e
|
|
862
|
+
puts "Error when calling ConnectApi->connect_whats_app_embedded_signup: #{e}"
|
|
863
|
+
end
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
#### Using the connect_whats_app_embedded_signup_with_http_info variant
|
|
867
|
+
|
|
868
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
869
|
+
|
|
870
|
+
> <Array(nil, Integer, Hash)> connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request)
|
|
871
|
+
|
|
872
|
+
```ruby
|
|
873
|
+
begin
|
|
874
|
+
# Connect WhatsApp from Embedded Signup
|
|
875
|
+
data, status_code, headers = api_instance.connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request)
|
|
876
|
+
p status_code # => 2xx
|
|
877
|
+
p headers # => { ... }
|
|
878
|
+
p data # => nil
|
|
879
|
+
rescue Zernio::ApiError => e
|
|
880
|
+
puts "Error when calling ConnectApi->connect_whats_app_embedded_signup_with_http_info: #{e}"
|
|
881
|
+
end
|
|
882
|
+
```
|
|
883
|
+
|
|
884
|
+
### Parameters
|
|
885
|
+
|
|
886
|
+
| Name | Type | Description | Notes |
|
|
887
|
+
| ---- | ---- | ----------- | ----- |
|
|
888
|
+
| **connect_whats_app_embedded_signup_request** | [**ConnectWhatsAppEmbeddedSignupRequest**](ConnectWhatsAppEmbeddedSignupRequest.md) | | |
|
|
889
|
+
|
|
890
|
+
### Return type
|
|
891
|
+
|
|
892
|
+
nil (empty response body)
|
|
893
|
+
|
|
894
|
+
### Authorization
|
|
895
|
+
|
|
896
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
897
|
+
|
|
898
|
+
### HTTP request headers
|
|
899
|
+
|
|
900
|
+
- **Content-Type**: application/json
|
|
901
|
+
- **Accept**: application/json
|
|
902
|
+
|
|
903
|
+
|
|
697
904
|
## create_pinterest_board
|
|
698
905
|
|
|
699
906
|
> <CreatePinterestBoard201Response> create_pinterest_board(account_id, create_pinterest_board_request)
|
|
@@ -1633,7 +1840,7 @@ end
|
|
|
1633
1840
|
|
|
1634
1841
|
Complete OAuth callback
|
|
1635
1842
|
|
|
1636
|
-
Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
|
|
1843
|
+
Exchange the OAuth authorization code for tokens and connect the account to the specified profile. Facebook, Google Business, Snapchat and WhatsApp are not accepted here: their account identity is a destination chosen after OAuth, which this single-shot exchange cannot do. Connect them through the redirect flow from `GET /v1/connect/{platform}`, or, for WhatsApp Embedded Signup, through `POST /v1/connect/whatsapp/embedded-signup`.
|
|
1637
1844
|
|
|
1638
1845
|
### Examples
|
|
1639
1846
|
|
|
@@ -1647,7 +1854,7 @@ Zernio.configure do |config|
|
|
|
1647
1854
|
end
|
|
1648
1855
|
|
|
1649
1856
|
api_instance = Zernio::ConnectApi.new
|
|
1650
|
-
platform = '
|
|
1857
|
+
platform = 'instagram' # String | Social platform to complete the connect for. Discord, Slack and Telegram are absent because they are served by their own dedicated routes, documented separately.
|
|
1651
1858
|
handle_o_auth_callback_request = Zernio::HandleOAuthCallbackRequest.new({code: 'code_example', state: 'state_example', profile_id: 'profile_id_example'}) # HandleOAuthCallbackRequest |
|
|
1652
1859
|
|
|
1653
1860
|
begin
|
|
@@ -1680,7 +1887,7 @@ end
|
|
|
1680
1887
|
|
|
1681
1888
|
| Name | Type | Description | Notes |
|
|
1682
1889
|
| ---- | ---- | ----------- | ----- |
|
|
1683
|
-
| **platform** | **String** | | |
|
|
1890
|
+
| **platform** | **String** | Social platform to complete the connect for. Discord, Slack and Telegram are absent because they are served by their own dedicated routes, documented separately. | |
|
|
1684
1891
|
| **handle_o_auth_callback_request** | [**HandleOAuthCallbackRequest**](HandleOAuthCallbackRequest.md) | | |
|
|
1685
1892
|
|
|
1686
1893
|
### Return type
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ConnectDiscordChannelRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **guild_id** | **String** | Discord server (guild) the channel belongs to | |
|
|
8
|
+
| **channel_id** | **String** | Text, announcement or forum channel to publish to | |
|
|
9
|
+
| **profile_id** | **String** | Profile to connect the channel to | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ConnectDiscordChannelRequest.new(
|
|
17
|
+
guild_id: null,
|
|
18
|
+
channel_id: null,
|
|
19
|
+
profile_id: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::ConnectSlackChannelRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **profile_id** | **String** | | |
|
|
8
|
+
| **channel_id** | **String** | Slack channel id, C... or G... | |
|
|
9
|
+
| **pending_data_token** | **String** | Nonce from the OAuth redirect. Required unless accountId is sent. | [optional] |
|
|
10
|
+
| **account_id** | **String** | Existing Slack account whose workspace token is reused. Required unless pendingDataToken is sent. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::ConnectSlackChannelRequest.new(
|
|
18
|
+
profile_id: null,
|
|
19
|
+
channel_id: null,
|
|
20
|
+
pending_data_token: null,
|
|
21
|
+
account_id: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zernio::ConnectWhatsAppEmbeddedSignupRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **code** | **String** | Authorization code from the WA_EMBEDDED_SIGNUP postMessage | |
|
|
8
|
+
| **profile_id** | **String** | | |
|
|
9
|
+
| **waba_id** | **String** | WhatsApp Business Account id, when the SDK reported one | [optional] |
|
|
10
|
+
| **phone_number_id** | **String** | | [optional] |
|
|
11
|
+
| **is_coexistence** | **Boolean** | Number is also live in the WhatsApp Business app | [optional] |
|
|
12
|
+
| **expected_phone_number** | **String** | Rejects the connect when Meta returns a different number | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zernio-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Zernio::ConnectWhatsAppEmbeddedSignupRequest.new(
|
|
20
|
+
code: null,
|
|
21
|
+
profile_id: null,
|
|
22
|
+
waba_id: null,
|
|
23
|
+
phone_number_id: null,
|
|
24
|
+
is_coexistence: null,
|
|
25
|
+
expected_phone_number: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -457,6 +457,74 @@ module Zernio
|
|
|
457
457
|
return data, status_code, headers
|
|
458
458
|
end
|
|
459
459
|
|
|
460
|
+
# Connect a Discord channel
|
|
461
|
+
# Finalize a Discord connect by binding one channel to a profile. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. One connected account per channel: repeat the call with a different channelId to add another.
|
|
462
|
+
# @param connect_discord_channel_request [ConnectDiscordChannelRequest]
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @return [nil]
|
|
465
|
+
def connect_discord_channel(connect_discord_channel_request, opts = {})
|
|
466
|
+
connect_discord_channel_with_http_info(connect_discord_channel_request, opts)
|
|
467
|
+
nil
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Connect a Discord channel
|
|
471
|
+
# Finalize a Discord connect by binding one channel to a profile. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. One connected account per channel: repeat the call with a different channelId to add another.
|
|
472
|
+
# @param connect_discord_channel_request [ConnectDiscordChannelRequest]
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
475
|
+
def connect_discord_channel_with_http_info(connect_discord_channel_request, opts = {})
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_discord_channel ...'
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'connect_discord_channel_request' is set
|
|
480
|
+
if @api_client.config.client_side_validation && connect_discord_channel_request.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'connect_discord_channel_request' when calling ConnectApi.connect_discord_channel"
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/v1/connect/discord'
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
493
|
+
# HTTP header 'Content-Type'
|
|
494
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
495
|
+
if !content_type.nil?
|
|
496
|
+
header_params['Content-Type'] = content_type
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# form parameters
|
|
500
|
+
form_params = opts[:form_params] || {}
|
|
501
|
+
|
|
502
|
+
# http body (model)
|
|
503
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_discord_channel_request)
|
|
504
|
+
|
|
505
|
+
# return_type
|
|
506
|
+
return_type = opts[:debug_return_type]
|
|
507
|
+
|
|
508
|
+
# auth_names
|
|
509
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
510
|
+
|
|
511
|
+
new_options = opts.merge(
|
|
512
|
+
:operation => :"ConnectApi.connect_discord_channel",
|
|
513
|
+
:header_params => header_params,
|
|
514
|
+
:query_params => query_params,
|
|
515
|
+
:form_params => form_params,
|
|
516
|
+
:body => post_body,
|
|
517
|
+
:auth_names => auth_names,
|
|
518
|
+
:return_type => return_type
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_discord_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
524
|
+
end
|
|
525
|
+
return data, status_code, headers
|
|
526
|
+
end
|
|
527
|
+
|
|
460
528
|
# Connect an OpenAI Ads account
|
|
461
529
|
# Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
|
|
462
530
|
# @param connect_open_ai_ads_credentials_request [ConnectOpenAIAdsCredentialsRequest]
|
|
@@ -593,6 +661,74 @@ module Zernio
|
|
|
593
661
|
return data, status_code, headers
|
|
594
662
|
end
|
|
595
663
|
|
|
664
|
+
# Connect a Slack channel
|
|
665
|
+
# Finalize a Slack connect by creating the per-channel account. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. Send pendingDataToken for a first connect (the nonce from the OAuth redirect) or accountId to add another channel to a workspace already connected.
|
|
666
|
+
# @param connect_slack_channel_request [ConnectSlackChannelRequest]
|
|
667
|
+
# @param [Hash] opts the optional parameters
|
|
668
|
+
# @return [nil]
|
|
669
|
+
def connect_slack_channel(connect_slack_channel_request, opts = {})
|
|
670
|
+
connect_slack_channel_with_http_info(connect_slack_channel_request, opts)
|
|
671
|
+
nil
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Connect a Slack channel
|
|
675
|
+
# Finalize a Slack connect by creating the per-channel account. Served by a dedicated route, so it is not reachable through POST /v1/connect/{platform}. Send pendingDataToken for a first connect (the nonce from the OAuth redirect) or accountId to add another channel to a workspace already connected.
|
|
676
|
+
# @param connect_slack_channel_request [ConnectSlackChannelRequest]
|
|
677
|
+
# @param [Hash] opts the optional parameters
|
|
678
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
679
|
+
def connect_slack_channel_with_http_info(connect_slack_channel_request, opts = {})
|
|
680
|
+
if @api_client.config.debugging
|
|
681
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_slack_channel ...'
|
|
682
|
+
end
|
|
683
|
+
# verify the required parameter 'connect_slack_channel_request' is set
|
|
684
|
+
if @api_client.config.client_side_validation && connect_slack_channel_request.nil?
|
|
685
|
+
fail ArgumentError, "Missing the required parameter 'connect_slack_channel_request' when calling ConnectApi.connect_slack_channel"
|
|
686
|
+
end
|
|
687
|
+
# resource path
|
|
688
|
+
local_var_path = '/v1/connect/slack'
|
|
689
|
+
|
|
690
|
+
# query parameters
|
|
691
|
+
query_params = opts[:query_params] || {}
|
|
692
|
+
|
|
693
|
+
# header parameters
|
|
694
|
+
header_params = opts[:header_params] || {}
|
|
695
|
+
# HTTP header 'Accept' (if needed)
|
|
696
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
697
|
+
# HTTP header 'Content-Type'
|
|
698
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
699
|
+
if !content_type.nil?
|
|
700
|
+
header_params['Content-Type'] = content_type
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
# form parameters
|
|
704
|
+
form_params = opts[:form_params] || {}
|
|
705
|
+
|
|
706
|
+
# http body (model)
|
|
707
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_slack_channel_request)
|
|
708
|
+
|
|
709
|
+
# return_type
|
|
710
|
+
return_type = opts[:debug_return_type]
|
|
711
|
+
|
|
712
|
+
# auth_names
|
|
713
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
714
|
+
|
|
715
|
+
new_options = opts.merge(
|
|
716
|
+
:operation => :"ConnectApi.connect_slack_channel",
|
|
717
|
+
:header_params => header_params,
|
|
718
|
+
:query_params => query_params,
|
|
719
|
+
:form_params => form_params,
|
|
720
|
+
:body => post_body,
|
|
721
|
+
:auth_names => auth_names,
|
|
722
|
+
:return_type => return_type
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
726
|
+
if @api_client.config.debugging
|
|
727
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_slack_channel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
728
|
+
end
|
|
729
|
+
return data, status_code, headers
|
|
730
|
+
end
|
|
731
|
+
|
|
596
732
|
# Connect WhatsApp via credentials
|
|
597
733
|
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) Warning: connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.
|
|
598
734
|
# @param connect_whats_app_credentials_request [ConnectWhatsAppCredentialsRequest]
|
|
@@ -661,6 +797,74 @@ module Zernio
|
|
|
661
797
|
return data, status_code, headers
|
|
662
798
|
end
|
|
663
799
|
|
|
800
|
+
# Connect WhatsApp from Embedded Signup
|
|
801
|
+
# Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
|
|
802
|
+
# @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
|
|
803
|
+
# @param [Hash] opts the optional parameters
|
|
804
|
+
# @return [nil]
|
|
805
|
+
def connect_whats_app_embedded_signup(connect_whats_app_embedded_signup_request, opts = {})
|
|
806
|
+
connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts)
|
|
807
|
+
nil
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
# Connect WhatsApp from Embedded Signup
|
|
811
|
+
# Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
|
|
812
|
+
# @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
|
|
813
|
+
# @param [Hash] opts the optional parameters
|
|
814
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
815
|
+
def connect_whats_app_embedded_signup_with_http_info(connect_whats_app_embedded_signup_request, opts = {})
|
|
816
|
+
if @api_client.config.debugging
|
|
817
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_whats_app_embedded_signup ...'
|
|
818
|
+
end
|
|
819
|
+
# verify the required parameter 'connect_whats_app_embedded_signup_request' is set
|
|
820
|
+
if @api_client.config.client_side_validation && connect_whats_app_embedded_signup_request.nil?
|
|
821
|
+
fail ArgumentError, "Missing the required parameter 'connect_whats_app_embedded_signup_request' when calling ConnectApi.connect_whats_app_embedded_signup"
|
|
822
|
+
end
|
|
823
|
+
# resource path
|
|
824
|
+
local_var_path = '/v1/connect/whatsapp/embedded-signup'
|
|
825
|
+
|
|
826
|
+
# query parameters
|
|
827
|
+
query_params = opts[:query_params] || {}
|
|
828
|
+
|
|
829
|
+
# header parameters
|
|
830
|
+
header_params = opts[:header_params] || {}
|
|
831
|
+
# HTTP header 'Accept' (if needed)
|
|
832
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
833
|
+
# HTTP header 'Content-Type'
|
|
834
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
835
|
+
if !content_type.nil?
|
|
836
|
+
header_params['Content-Type'] = content_type
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
# form parameters
|
|
840
|
+
form_params = opts[:form_params] || {}
|
|
841
|
+
|
|
842
|
+
# http body (model)
|
|
843
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_whats_app_embedded_signup_request)
|
|
844
|
+
|
|
845
|
+
# return_type
|
|
846
|
+
return_type = opts[:debug_return_type]
|
|
847
|
+
|
|
848
|
+
# auth_names
|
|
849
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
850
|
+
|
|
851
|
+
new_options = opts.merge(
|
|
852
|
+
:operation => :"ConnectApi.connect_whats_app_embedded_signup",
|
|
853
|
+
:header_params => header_params,
|
|
854
|
+
:query_params => query_params,
|
|
855
|
+
:form_params => form_params,
|
|
856
|
+
:body => post_body,
|
|
857
|
+
:auth_names => auth_names,
|
|
858
|
+
:return_type => return_type
|
|
859
|
+
)
|
|
860
|
+
|
|
861
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
862
|
+
if @api_client.config.debugging
|
|
863
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_whats_app_embedded_signup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
864
|
+
end
|
|
865
|
+
return data, status_code, headers
|
|
866
|
+
end
|
|
867
|
+
|
|
664
868
|
# Create Pinterest board
|
|
665
869
|
# Creates a new board on the connected Pinterest account. The returned board ID can be used immediately as `platformSpecificData.boardId` when creating a Pinterest post.
|
|
666
870
|
# @param account_id [String]
|
|
@@ -1574,8 +1778,8 @@ module Zernio
|
|
|
1574
1778
|
end
|
|
1575
1779
|
|
|
1576
1780
|
# Complete OAuth callback
|
|
1577
|
-
# Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
|
|
1578
|
-
# @param platform [String]
|
|
1781
|
+
# Exchange the OAuth authorization code for tokens and connect the account to the specified profile. Facebook, Google Business, Snapchat and WhatsApp are not accepted here: their account identity is a destination chosen after OAuth, which this single-shot exchange cannot do. Connect them through the redirect flow from `GET /v1/connect/{platform}`, or, for WhatsApp Embedded Signup, through `POST /v1/connect/whatsapp/embedded-signup`.
|
|
1782
|
+
# @param platform [String] Social platform to complete the connect for. Discord, Slack and Telegram are absent because they are served by their own dedicated routes, documented separately.
|
|
1579
1783
|
# @param handle_o_auth_callback_request [HandleOAuthCallbackRequest]
|
|
1580
1784
|
# @param [Hash] opts the optional parameters
|
|
1581
1785
|
# @return [nil]
|
|
@@ -1585,8 +1789,8 @@ module Zernio
|
|
|
1585
1789
|
end
|
|
1586
1790
|
|
|
1587
1791
|
# Complete OAuth callback
|
|
1588
|
-
# Exchange the OAuth authorization code for tokens and connect the account to the specified profile.
|
|
1589
|
-
# @param platform [String]
|
|
1792
|
+
# Exchange the OAuth authorization code for tokens and connect the account to the specified profile. Facebook, Google Business, Snapchat and WhatsApp are not accepted here: their account identity is a destination chosen after OAuth, which this single-shot exchange cannot do. Connect them through the redirect flow from `GET /v1/connect/{platform}`, or, for WhatsApp Embedded Signup, through `POST /v1/connect/whatsapp/embedded-signup`.
|
|
1793
|
+
# @param platform [String] Social platform to complete the connect for. Discord, Slack and Telegram are absent because they are served by their own dedicated routes, documented separately.
|
|
1590
1794
|
# @param handle_o_auth_callback_request [HandleOAuthCallbackRequest]
|
|
1591
1795
|
# @param [Hash] opts the optional parameters
|
|
1592
1796
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -1598,6 +1802,11 @@ module Zernio
|
|
|
1598
1802
|
if @api_client.config.client_side_validation && platform.nil?
|
|
1599
1803
|
fail ArgumentError, "Missing the required parameter 'platform' when calling ConnectApi.handle_o_auth_callback"
|
|
1600
1804
|
end
|
|
1805
|
+
# verify enum value
|
|
1806
|
+
allowable_values = ["instagram", "twitter", "threads", "linkedin", "youtube", "tiktok", "reddit", "pinterest"]
|
|
1807
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(platform)
|
|
1808
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
1809
|
+
end
|
|
1601
1810
|
# verify the required parameter 'handle_o_auth_callback_request' is set
|
|
1602
1811
|
if @api_client.config.client_side_validation && handle_o_auth_callback_request.nil?
|
|
1603
1812
|
fail ArgumentError, "Missing the required parameter 'handle_o_auth_callback_request' when calling ConnectApi.handle_o_auth_callback"
|