late-sdk 0.0.1547 → 0.0.1548

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1839da1f3eb7befed8c058fb2a2d06e388a664cce708168815b4836bde2afe0c
4
- data.tar.gz: 0b9e1b5ffb6bc74ecfe85cf4e15ca5da9bcde00ef6f9d981a0bc1e1b21f18e56
3
+ metadata.gz: 1de15a233c5f0595c4e5190fda15c57a8bc1feb211f6976fb16db3a10541e65e
4
+ data.tar.gz: aac86aa43b148c27af87a5f2dd3f9eaf639b3d51d79f8dc2902f64e83d2e4574
5
5
  SHA512:
6
- metadata.gz: 6a7c4a15e51c81f27f130f14e6a8200a9ff6a194d0749f68e867378b605384cdddb59da985603738fb956ff1de803938e7640af55742660390a1f7fe200744d2
7
- data.tar.gz: b309ea713138533aa78cdc2ec4b917a102a07ec75a2644f626c2f33267683e5639e4553b80c436147a554aa668be8c7772174a43f041dfc80981df48cbda75fe
6
+ metadata.gz: 58ac57b3187f1bbd1e4bf0f593b7d323d4fe60fb17d912e4e614001975f968e7b3318a5cf6a168901f368d8fa943620860aed871eddb1664345a5ad2703824d7
7
+ data.tar.gz: 12a5248c0dcf862b22e96e7e0b97df249ad639c50f831216a7e2c9ebc0a40271dd544f54dc4fb9b2e0af81d6a68c38d19925d25fe1071e7a97e73297d9473355
data/README.md CHANGED
@@ -741,13 +741,16 @@ Class | Method | HTTP request | Description
741
741
  *Zernio::MessagesApi* | [**accept_conversation_request**](docs/MessagesApi.md#accept_conversation_request) | **POST** /v1/inbox/conversations/{conversationId}/accept | Accept a message request
742
742
  *Zernio::MessagesApi* | [**add_message_reaction**](docs/MessagesApi.md#add_message_reaction) | **POST** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Add reaction
743
743
  *Zernio::MessagesApi* | [**create_inbox_conversation**](docs/MessagesApi.md#create_inbox_conversation) | **POST** /v1/inbox/conversations | Create conversation
744
+ *Zernio::MessagesApi* | [**create_inbox_label**](docs/MessagesApi.md#create_inbox_label) | **POST** /v1/inbox/labels | Create a conversation label
744
745
  *Zernio::MessagesApi* | [**delete_inbox_conversation**](docs/MessagesApi.md#delete_inbox_conversation) | **DELETE** /v1/inbox/conversations/{conversationId} | Delete conversation
746
+ *Zernio::MessagesApi* | [**delete_inbox_label**](docs/MessagesApi.md#delete_inbox_label) | **DELETE** /v1/inbox/labels/{labelId} | Delete a conversation label
745
747
  *Zernio::MessagesApi* | [**delete_inbox_message**](docs/MessagesApi.md#delete_inbox_message) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Delete message
746
748
  *Zernio::MessagesApi* | [**edit_inbox_message**](docs/MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message
747
749
  *Zernio::MessagesApi* | [**get_inbox_conversation**](docs/MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation
748
750
  *Zernio::MessagesApi* | [**get_inbox_conversation_messages**](docs/MessagesApi.md#get_inbox_conversation_messages) | **GET** /v1/inbox/conversations/{conversationId}/messages | List messages
749
751
  *Zernio::MessagesApi* | [**get_message_attachment**](docs/MessagesApi.md#get_message_attachment) | **GET** /v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index} | Resolve message attachment
750
752
  *Zernio::MessagesApi* | [**list_inbox_conversations**](docs/MessagesApi.md#list_inbox_conversations) | **GET** /v1/inbox/conversations | List conversations
753
+ *Zernio::MessagesApi* | [**list_inbox_labels**](docs/MessagesApi.md#list_inbox_labels) | **GET** /v1/inbox/labels | List the Page's conversation labels
751
754
  *Zernio::MessagesApi* | [**mark_conversation_read**](docs/MessagesApi.md#mark_conversation_read) | **POST** /v1/inbox/conversations/{conversationId}/read | Mark a conversation as read
752
755
  *Zernio::MessagesApi* | [**remove_message_reaction**](docs/MessagesApi.md#remove_message_reaction) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Remove reaction
753
756
  *Zernio::MessagesApi* | [**search_inbox_conversations**](docs/MessagesApi.md#search_inbox_conversations) | **GET** /v1/inbox/conversations/search | Search conversations
@@ -1635,6 +1638,8 @@ Class | Method | HTTP request | Description
1635
1638
  - [Zernio::CreateInboxConversationRequestTemplateCardsInner](docs/CreateInboxConversationRequestTemplateCardsInner.md)
1636
1639
  - [Zernio::CreateInboxConversationRequestTemplateCardsInnerButtonsInner](docs/CreateInboxConversationRequestTemplateCardsInnerButtonsInner.md)
1637
1640
  - [Zernio::CreateInboxConversationRequestTemplateCardsInnerHeaderMedia](docs/CreateInboxConversationRequestTemplateCardsInnerHeaderMedia.md)
1641
+ - [Zernio::CreateInboxLabel201Response](docs/CreateInboxLabel201Response.md)
1642
+ - [Zernio::CreateInboxLabelRequest](docs/CreateInboxLabelRequest.md)
1638
1643
  - [Zernio::CreateInviteToken201Response](docs/CreateInviteToken201Response.md)
1639
1644
  - [Zernio::CreateInviteTokenRequest](docs/CreateInviteTokenRequest.md)
1640
1645
  - [Zernio::CreateLeadForm200Response](docs/CreateLeadForm200Response.md)
@@ -2704,6 +2709,8 @@ Class | Method | HTTP request | Description
2704
2709
  - [Zernio::ListInboxConversations200ResponseMetaAccountsSkippedInner](docs/ListInboxConversations200ResponseMetaAccountsSkippedInner.md)
2705
2710
  - [Zernio::ListInboxConversations200ResponseMetaFailedAccountsInner](docs/ListInboxConversations200ResponseMetaFailedAccountsInner.md)
2706
2711
  - [Zernio::ListInboxConversations200ResponsePagination](docs/ListInboxConversations200ResponsePagination.md)
2712
+ - [Zernio::ListInboxLabels200Response](docs/ListInboxLabels200Response.md)
2713
+ - [Zernio::ListInboxLabels200ResponseLabelsInner](docs/ListInboxLabels200ResponseLabelsInner.md)
2707
2714
  - [Zernio::ListInboxMentions200Response](docs/ListInboxMentions200Response.md)
2708
2715
  - [Zernio::ListInboxMentions200ResponseDataInner](docs/ListInboxMentions200ResponseDataInner.md)
2709
2716
  - [Zernio::ListInboxMentions200ResponseMeta](docs/ListInboxMentions200ResponseMeta.md)
@@ -0,0 +1,18 @@
1
+ # Zernio::CreateInboxLabel201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **label** | [**ListInboxLabels200ResponseLabelsInner**](ListInboxLabels200ResponseLabelsInner.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::CreateInboxLabel201Response.new(
15
+ label: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Zernio::CreateInboxLabelRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Facebook social account ID | |
8
+ | **name** | **String** | Label name | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::CreateInboxLabelRequest.new(
16
+ account_id: null,
17
+ name: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Zernio::ListInboxLabels200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **labels** | [**Array<ListInboxLabels200ResponseLabelsInner>**](ListInboxLabels200ResponseLabelsInner.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::ListInboxLabels200Response.new(
15
+ labels: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Zernio::ListInboxLabels200ResponseLabelsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Meta label id | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ListInboxLabels200ResponseLabelsInner.new(
16
+ id: null,
17
+ name: null
18
+ )
19
+ ```
20
+
data/docs/MessagesApi.md CHANGED
@@ -7,13 +7,16 @@ All URIs are relative to *https://zernio.com/api*
7
7
  | [**accept_conversation_request**](MessagesApi.md#accept_conversation_request) | **POST** /v1/inbox/conversations/{conversationId}/accept | Accept a message request |
8
8
  | [**add_message_reaction**](MessagesApi.md#add_message_reaction) | **POST** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Add reaction |
9
9
  | [**create_inbox_conversation**](MessagesApi.md#create_inbox_conversation) | **POST** /v1/inbox/conversations | Create conversation |
10
+ | [**create_inbox_label**](MessagesApi.md#create_inbox_label) | **POST** /v1/inbox/labels | Create a conversation label |
10
11
  | [**delete_inbox_conversation**](MessagesApi.md#delete_inbox_conversation) | **DELETE** /v1/inbox/conversations/{conversationId} | Delete conversation |
12
+ | [**delete_inbox_label**](MessagesApi.md#delete_inbox_label) | **DELETE** /v1/inbox/labels/{labelId} | Delete a conversation label |
11
13
  | [**delete_inbox_message**](MessagesApi.md#delete_inbox_message) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Delete message |
12
14
  | [**edit_inbox_message**](MessagesApi.md#edit_inbox_message) | **PATCH** /v1/inbox/conversations/{conversationId}/messages/{messageId} | Edit message |
13
15
  | [**get_inbox_conversation**](MessagesApi.md#get_inbox_conversation) | **GET** /v1/inbox/conversations/{conversationId} | Get conversation |
14
16
  | [**get_inbox_conversation_messages**](MessagesApi.md#get_inbox_conversation_messages) | **GET** /v1/inbox/conversations/{conversationId}/messages | List messages |
15
17
  | [**get_message_attachment**](MessagesApi.md#get_message_attachment) | **GET** /v1/inbox/conversations/{conversationId}/messages/{messageId}/attachments/{index} | Resolve message attachment |
16
18
  | [**list_inbox_conversations**](MessagesApi.md#list_inbox_conversations) | **GET** /v1/inbox/conversations | List conversations |
19
+ | [**list_inbox_labels**](MessagesApi.md#list_inbox_labels) | **GET** /v1/inbox/labels | List the Page's conversation labels |
17
20
  | [**mark_conversation_read**](MessagesApi.md#mark_conversation_read) | **POST** /v1/inbox/conversations/{conversationId}/read | Mark a conversation as read |
18
21
  | [**remove_message_reaction**](MessagesApi.md#remove_message_reaction) | **DELETE** /v1/inbox/conversations/{conversationId}/messages/{messageId}/reactions | Remove reaction |
19
22
  | [**search_inbox_conversations**](MessagesApi.md#search_inbox_conversations) | **GET** /v1/inbox/conversations/search | Search conversations |
@@ -237,6 +240,75 @@ end
237
240
  - **Accept**: application/json
238
241
 
239
242
 
243
+ ## create_inbox_label
244
+
245
+ > <CreateInboxLabel201Response> create_inbox_label(create_inbox_label_request)
246
+
247
+ Create a conversation label
248
+
249
+ Facebook Messenger only. Creates a custom label on the Page (Graph `POST /{page-id}/custom_labels`). Other platforms answer 400 `platform_not_supported`.
250
+
251
+ ### Examples
252
+
253
+ ```ruby
254
+ require 'time'
255
+ require 'zernio-sdk'
256
+ # setup authorization
257
+ Zernio.configure do |config|
258
+ # Configure Bearer authorization (JWT): bearerAuth
259
+ config.access_token = 'YOUR_BEARER_TOKEN'
260
+ end
261
+
262
+ api_instance = Zernio::MessagesApi.new
263
+ create_inbox_label_request = Zernio::CreateInboxLabelRequest.new({account_id: 'account_id_example', name: 'name_example'}) # CreateInboxLabelRequest |
264
+
265
+ begin
266
+ # Create a conversation label
267
+ result = api_instance.create_inbox_label(create_inbox_label_request)
268
+ p result
269
+ rescue Zernio::ApiError => e
270
+ puts "Error when calling MessagesApi->create_inbox_label: #{e}"
271
+ end
272
+ ```
273
+
274
+ #### Using the create_inbox_label_with_http_info variant
275
+
276
+ This returns an Array which contains the response data, status code and headers.
277
+
278
+ > <Array(<CreateInboxLabel201Response>, Integer, Hash)> create_inbox_label_with_http_info(create_inbox_label_request)
279
+
280
+ ```ruby
281
+ begin
282
+ # Create a conversation label
283
+ data, status_code, headers = api_instance.create_inbox_label_with_http_info(create_inbox_label_request)
284
+ p status_code # => 2xx
285
+ p headers # => { ... }
286
+ p data # => <CreateInboxLabel201Response>
287
+ rescue Zernio::ApiError => e
288
+ puts "Error when calling MessagesApi->create_inbox_label_with_http_info: #{e}"
289
+ end
290
+ ```
291
+
292
+ ### Parameters
293
+
294
+ | Name | Type | Description | Notes |
295
+ | ---- | ---- | ----------- | ----- |
296
+ | **create_inbox_label_request** | [**CreateInboxLabelRequest**](CreateInboxLabelRequest.md) | | |
297
+
298
+ ### Return type
299
+
300
+ [**CreateInboxLabel201Response**](CreateInboxLabel201Response.md)
301
+
302
+ ### Authorization
303
+
304
+ [bearerAuth](../README.md#bearerAuth)
305
+
306
+ ### HTTP request headers
307
+
308
+ - **Content-Type**: application/json
309
+ - **Accept**: application/json
310
+
311
+
240
312
  ## delete_inbox_conversation
241
313
 
242
314
  > <DeleteInboxConversation200Response> delete_inbox_conversation(conversation_id, account_id)
@@ -308,6 +380,77 @@ end
308
380
  - **Accept**: application/json
309
381
 
310
382
 
383
+ ## delete_inbox_label
384
+
385
+ > <UpdateYoutubeDefaultPlaylist200Response> delete_inbox_label(label_id, account_id)
386
+
387
+ Delete a conversation label
388
+
389
+ Facebook Messenger only. Deletes a custom label from the Page (Graph `DELETE /{label-id}`), which also removes it from every conversation. The id must be one of the Page's custom labels, otherwise 404 `resource_not_found`. Other platforms answer 400 `platform_not_supported`.
390
+
391
+ ### Examples
392
+
393
+ ```ruby
394
+ require 'time'
395
+ require 'zernio-sdk'
396
+ # setup authorization
397
+ Zernio.configure do |config|
398
+ # Configure Bearer authorization (JWT): bearerAuth
399
+ config.access_token = 'YOUR_BEARER_TOKEN'
400
+ end
401
+
402
+ api_instance = Zernio::MessagesApi.new
403
+ label_id = 'label_id_example' # String | Meta label id
404
+ account_id = 'account_id_example' # String | Facebook social account ID
405
+
406
+ begin
407
+ # Delete a conversation label
408
+ result = api_instance.delete_inbox_label(label_id, account_id)
409
+ p result
410
+ rescue Zernio::ApiError => e
411
+ puts "Error when calling MessagesApi->delete_inbox_label: #{e}"
412
+ end
413
+ ```
414
+
415
+ #### Using the delete_inbox_label_with_http_info variant
416
+
417
+ This returns an Array which contains the response data, status code and headers.
418
+
419
+ > <Array(<UpdateYoutubeDefaultPlaylist200Response>, Integer, Hash)> delete_inbox_label_with_http_info(label_id, account_id)
420
+
421
+ ```ruby
422
+ begin
423
+ # Delete a conversation label
424
+ data, status_code, headers = api_instance.delete_inbox_label_with_http_info(label_id, account_id)
425
+ p status_code # => 2xx
426
+ p headers # => { ... }
427
+ p data # => <UpdateYoutubeDefaultPlaylist200Response>
428
+ rescue Zernio::ApiError => e
429
+ puts "Error when calling MessagesApi->delete_inbox_label_with_http_info: #{e}"
430
+ end
431
+ ```
432
+
433
+ ### Parameters
434
+
435
+ | Name | Type | Description | Notes |
436
+ | ---- | ---- | ----------- | ----- |
437
+ | **label_id** | **String** | Meta label id | |
438
+ | **account_id** | **String** | Facebook social account ID | |
439
+
440
+ ### Return type
441
+
442
+ [**UpdateYoutubeDefaultPlaylist200Response**](UpdateYoutubeDefaultPlaylist200Response.md)
443
+
444
+ ### Authorization
445
+
446
+ [bearerAuth](../README.md#bearerAuth)
447
+
448
+ ### HTTP request headers
449
+
450
+ - **Content-Type**: Not defined
451
+ - **Accept**: application/json
452
+
453
+
311
454
  ## delete_inbox_message
312
455
 
313
456
  > <UpdateYoutubeDefaultPlaylist200Response> delete_inbox_message(conversation_id, message_id, account_id)
@@ -768,6 +911,75 @@ end
768
911
  - **Accept**: application/json
769
912
 
770
913
 
914
+ ## list_inbox_labels
915
+
916
+ > <ListInboxLabels200Response> list_inbox_labels(account_id)
917
+
918
+ List the Page's conversation labels
919
+
920
+ Facebook Messenger only. Lists the custom labels defined on the Page (Graph `/{page-id}/custom_labels`). Other platforms answer 400 `platform_not_supported`.
921
+
922
+ ### Examples
923
+
924
+ ```ruby
925
+ require 'time'
926
+ require 'zernio-sdk'
927
+ # setup authorization
928
+ Zernio.configure do |config|
929
+ # Configure Bearer authorization (JWT): bearerAuth
930
+ config.access_token = 'YOUR_BEARER_TOKEN'
931
+ end
932
+
933
+ api_instance = Zernio::MessagesApi.new
934
+ account_id = 'account_id_example' # String | Facebook social account ID
935
+
936
+ begin
937
+ # List the Page's conversation labels
938
+ result = api_instance.list_inbox_labels(account_id)
939
+ p result
940
+ rescue Zernio::ApiError => e
941
+ puts "Error when calling MessagesApi->list_inbox_labels: #{e}"
942
+ end
943
+ ```
944
+
945
+ #### Using the list_inbox_labels_with_http_info variant
946
+
947
+ This returns an Array which contains the response data, status code and headers.
948
+
949
+ > <Array(<ListInboxLabels200Response>, Integer, Hash)> list_inbox_labels_with_http_info(account_id)
950
+
951
+ ```ruby
952
+ begin
953
+ # List the Page's conversation labels
954
+ data, status_code, headers = api_instance.list_inbox_labels_with_http_info(account_id)
955
+ p status_code # => 2xx
956
+ p headers # => { ... }
957
+ p data # => <ListInboxLabels200Response>
958
+ rescue Zernio::ApiError => e
959
+ puts "Error when calling MessagesApi->list_inbox_labels_with_http_info: #{e}"
960
+ end
961
+ ```
962
+
963
+ ### Parameters
964
+
965
+ | Name | Type | Description | Notes |
966
+ | ---- | ---- | ----------- | ----- |
967
+ | **account_id** | **String** | Facebook social account ID | |
968
+
969
+ ### Return type
970
+
971
+ [**ListInboxLabels200Response**](ListInboxLabels200Response.md)
972
+
973
+ ### Authorization
974
+
975
+ [bearerAuth](../README.md#bearerAuth)
976
+
977
+ ### HTTP request headers
978
+
979
+ - **Content-Type**: Not defined
980
+ - **Accept**: application/json
981
+
982
+
771
983
  ## mark_conversation_read
772
984
 
773
985
  > <MarkConversationRead200Response> mark_conversation_read(conversation_id, send_typing_indicator_request)
@@ -241,6 +241,74 @@ module Zernio
241
241
  return data, status_code, headers
242
242
  end
243
243
 
244
+ # Create a conversation label
245
+ # Facebook Messenger only. Creates a custom label on the Page (Graph `POST /{page-id}/custom_labels`). Other platforms answer 400 `platform_not_supported`.
246
+ # @param create_inbox_label_request [CreateInboxLabelRequest]
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [CreateInboxLabel201Response]
249
+ def create_inbox_label(create_inbox_label_request, opts = {})
250
+ data, _status_code, _headers = create_inbox_label_with_http_info(create_inbox_label_request, opts)
251
+ data
252
+ end
253
+
254
+ # Create a conversation label
255
+ # Facebook Messenger only. Creates a custom label on the Page (Graph &#x60;POST /{page-id}/custom_labels&#x60;). Other platforms answer 400 &#x60;platform_not_supported&#x60;.
256
+ # @param create_inbox_label_request [CreateInboxLabelRequest]
257
+ # @param [Hash] opts the optional parameters
258
+ # @return [Array<(CreateInboxLabel201Response, Integer, Hash)>] CreateInboxLabel201Response data, response status code and response headers
259
+ def create_inbox_label_with_http_info(create_inbox_label_request, opts = {})
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug 'Calling API: MessagesApi.create_inbox_label ...'
262
+ end
263
+ # verify the required parameter 'create_inbox_label_request' is set
264
+ if @api_client.config.client_side_validation && create_inbox_label_request.nil?
265
+ fail ArgumentError, "Missing the required parameter 'create_inbox_label_request' when calling MessagesApi.create_inbox_label"
266
+ end
267
+ # resource path
268
+ local_var_path = '/v1/inbox/labels'
269
+
270
+ # query parameters
271
+ query_params = opts[:query_params] || {}
272
+
273
+ # header parameters
274
+ header_params = opts[:header_params] || {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
277
+ # HTTP header 'Content-Type'
278
+ content_type = @api_client.select_header_content_type(['application/json'])
279
+ if !content_type.nil?
280
+ header_params['Content-Type'] = content_type
281
+ end
282
+
283
+ # form parameters
284
+ form_params = opts[:form_params] || {}
285
+
286
+ # http body (model)
287
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_inbox_label_request)
288
+
289
+ # return_type
290
+ return_type = opts[:debug_return_type] || 'CreateInboxLabel201Response'
291
+
292
+ # auth_names
293
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
294
+
295
+ new_options = opts.merge(
296
+ :operation => :"MessagesApi.create_inbox_label",
297
+ :header_params => header_params,
298
+ :query_params => query_params,
299
+ :form_params => form_params,
300
+ :body => post_body,
301
+ :auth_names => auth_names,
302
+ :return_type => return_type
303
+ )
304
+
305
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug "API called: MessagesApi#create_inbox_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
308
+ end
309
+ return data, status_code, headers
310
+ end
311
+
244
312
  # Delete conversation
245
313
  # Permanently deletes Zernio's stored copy of one conversation and every message in it, in one transaction, and unlinks the contact channel that pointed at it. Nothing is deleted on the platform (the thread stays in WhatsApp, Messenger or Instagram), and the contact record is kept: call DELETE /v1/contacts/{contactId} to erase the person's name and number as well. A platform re-sync can import the thread again: WhatsApp coexistence numbers receive their messaging history from Meta repeatedly, and a Facebook or Instagram account whose DM history walk has not finished imports it on that walk. Inbound media copies Zernio stored are removed on a best-effort basis.
246
314
  # @param conversation_id [String] Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
@@ -311,6 +379,81 @@ module Zernio
311
379
  return data, status_code, headers
312
380
  end
313
381
 
382
+ # Delete a conversation label
383
+ # Facebook Messenger only. Deletes a custom label from the Page (Graph `DELETE /{label-id}`), which also removes it from every conversation. The id must be one of the Page's custom labels, otherwise 404 `resource_not_found`. Other platforms answer 400 `platform_not_supported`.
384
+ # @param label_id [String] Meta label id
385
+ # @param account_id [String] Facebook social account ID
386
+ # @param [Hash] opts the optional parameters
387
+ # @return [UpdateYoutubeDefaultPlaylist200Response]
388
+ def delete_inbox_label(label_id, account_id, opts = {})
389
+ data, _status_code, _headers = delete_inbox_label_with_http_info(label_id, account_id, opts)
390
+ data
391
+ end
392
+
393
+ # Delete a conversation label
394
+ # Facebook Messenger only. Deletes a custom label from the Page (Graph &#x60;DELETE /{label-id}&#x60;), which also removes it from every conversation. The id must be one of the Page&#39;s custom labels, otherwise 404 &#x60;resource_not_found&#x60;. Other platforms answer 400 &#x60;platform_not_supported&#x60;.
395
+ # @param label_id [String] Meta label id
396
+ # @param account_id [String] Facebook social account ID
397
+ # @param [Hash] opts the optional parameters
398
+ # @return [Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>] UpdateYoutubeDefaultPlaylist200Response data, response status code and response headers
399
+ def delete_inbox_label_with_http_info(label_id, account_id, opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: MessagesApi.delete_inbox_label ...'
402
+ end
403
+ # verify the required parameter 'label_id' is set
404
+ if @api_client.config.client_side_validation && label_id.nil?
405
+ fail ArgumentError, "Missing the required parameter 'label_id' when calling MessagesApi.delete_inbox_label"
406
+ end
407
+ pattern = Regexp.new(/^[0-9]+$/)
408
+ if @api_client.config.client_side_validation && label_id !~ pattern
409
+ fail ArgumentError, "invalid value for 'label_id' when calling MessagesApi.delete_inbox_label, must conform to the pattern #{pattern}."
410
+ end
411
+
412
+ # verify the required parameter 'account_id' is set
413
+ if @api_client.config.client_side_validation && account_id.nil?
414
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling MessagesApi.delete_inbox_label"
415
+ end
416
+ # resource path
417
+ local_var_path = '/v1/inbox/labels/{labelId}'.sub('{' + 'labelId' + '}', CGI.escape(label_id.to_s))
418
+
419
+ # query parameters
420
+ query_params = opts[:query_params] || {}
421
+ query_params[:'accountId'] = account_id
422
+
423
+ # header parameters
424
+ header_params = opts[:header_params] || {}
425
+ # HTTP header 'Accept' (if needed)
426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
427
+
428
+ # form parameters
429
+ form_params = opts[:form_params] || {}
430
+
431
+ # http body (model)
432
+ post_body = opts[:debug_body]
433
+
434
+ # return_type
435
+ return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response'
436
+
437
+ # auth_names
438
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
439
+
440
+ new_options = opts.merge(
441
+ :operation => :"MessagesApi.delete_inbox_label",
442
+ :header_params => header_params,
443
+ :query_params => query_params,
444
+ :form_params => form_params,
445
+ :body => post_body,
446
+ :auth_names => auth_names,
447
+ :return_type => return_type
448
+ )
449
+
450
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: MessagesApi#delete_inbox_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
453
+ end
454
+ return data, status_code, headers
455
+ end
456
+
314
457
  # Delete message
315
458
  # Delete a message from a conversation. Platform support varies: - Telegram: Full delete (bot's own messages anytime, others if admin) - X: Full delete (own DM events only) - Bluesky: Delete for self only (recipient still sees it) - Reddit: Delete from sender's view only - 'iMessage: Unsend (the bubble disappears for the recipient) within 2 minutes of sending (Apple''s limit; 409 `unsend_window_expired` after that). Own outbound messages only.' - Facebook, Instagram, WhatsApp: Not supported (returns 400)
316
459
  # @param conversation_id [String] The conversation ID
@@ -826,6 +969,70 @@ module Zernio
826
969
  return data, status_code, headers
827
970
  end
828
971
 
972
+ # List the Page's conversation labels
973
+ # Facebook Messenger only. Lists the custom labels defined on the Page (Graph `/{page-id}/custom_labels`). Other platforms answer 400 `platform_not_supported`.
974
+ # @param account_id [String] Facebook social account ID
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [ListInboxLabels200Response]
977
+ def list_inbox_labels(account_id, opts = {})
978
+ data, _status_code, _headers = list_inbox_labels_with_http_info(account_id, opts)
979
+ data
980
+ end
981
+
982
+ # List the Page&#39;s conversation labels
983
+ # Facebook Messenger only. Lists the custom labels defined on the Page (Graph &#x60;/{page-id}/custom_labels&#x60;). Other platforms answer 400 &#x60;platform_not_supported&#x60;.
984
+ # @param account_id [String] Facebook social account ID
985
+ # @param [Hash] opts the optional parameters
986
+ # @return [Array<(ListInboxLabels200Response, Integer, Hash)>] ListInboxLabels200Response data, response status code and response headers
987
+ def list_inbox_labels_with_http_info(account_id, opts = {})
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug 'Calling API: MessagesApi.list_inbox_labels ...'
990
+ end
991
+ # verify the required parameter 'account_id' is set
992
+ if @api_client.config.client_side_validation && account_id.nil?
993
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling MessagesApi.list_inbox_labels"
994
+ end
995
+ # resource path
996
+ local_var_path = '/v1/inbox/labels'
997
+
998
+ # query parameters
999
+ query_params = opts[:query_params] || {}
1000
+ query_params[:'accountId'] = account_id
1001
+
1002
+ # header parameters
1003
+ header_params = opts[:header_params] || {}
1004
+ # HTTP header 'Accept' (if needed)
1005
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1006
+
1007
+ # form parameters
1008
+ form_params = opts[:form_params] || {}
1009
+
1010
+ # http body (model)
1011
+ post_body = opts[:debug_body]
1012
+
1013
+ # return_type
1014
+ return_type = opts[:debug_return_type] || 'ListInboxLabels200Response'
1015
+
1016
+ # auth_names
1017
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1018
+
1019
+ new_options = opts.merge(
1020
+ :operation => :"MessagesApi.list_inbox_labels",
1021
+ :header_params => header_params,
1022
+ :query_params => query_params,
1023
+ :form_params => form_params,
1024
+ :body => post_body,
1025
+ :auth_names => auth_names,
1026
+ :return_type => return_type
1027
+ )
1028
+
1029
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1030
+ if @api_client.config.debugging
1031
+ @api_client.config.logger.debug "API called: MessagesApi#list_inbox_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
+ end
1033
+ return data, status_code, headers
1034
+ end
1035
+
829
1036
  # Mark a conversation as read
830
1037
  # Marks all unread incoming messages in the conversation as read. For WhatsApp, this also sends read receipts (blue ticks) to the contact, EXCEPT on coexistence accounts (where the WhatsApp Business app on the customer's phone owns read state and we never override it). For iMessage, this also marks the conversation read with the contact (1:1 conversations only). Best-effort. For Instagram (Instagram Login and Facebook Login) and Facebook Messenger, this also sends a `mark_seen` read receipt to the contact, so they see the conversation as seen. Best-effort: a Meta failure never fails the request. This is the explicit, human-driven counterpart to `GET .../messages`, which is side-effect-free and does NOT mark anything read. Call this when a user actually views the conversation.
831
1038
  # @param conversation_id [String] The conversation ID