mailhub-sdk 0.1.0
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 +7 -0
- data/.fern/metadata.json +11 -0
- data/.fernignore +3 -0
- data/.rubocop.yml +103 -0
- data/CONTRIBUTING.md +120 -0
- data/README.md +159 -0
- data/Rakefile +20 -0
- data/custom.gemspec.rb +18 -0
- data/lib/Mailhub/campaign/client.rb +730 -0
- data/lib/Mailhub/campaign/types/add_campaign_media_by_code_request.rb +13 -0
- data/lib/Mailhub/campaign/types/cancel_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/catch_up_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/create_campaign_by_code_request.rb +27 -0
- data/lib/Mailhub/campaign/types/delete_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaign_activity_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaign_analytics_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaign_link_stats_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaign_media_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaign_rendered_preview_by_code_request.rb +21 -0
- data/lib/Mailhub/campaign/types/get_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/get_campaigns_request.rb +19 -0
- data/lib/Mailhub/campaign/types/pause_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/preview_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/remove_campaign_media_request.rb +13 -0
- data/lib/Mailhub/campaign/types/schedule_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/send_campaign_request.rb +11 -0
- data/lib/Mailhub/campaign/types/test_campaign_by_code_request.rb +23 -0
- data/lib/Mailhub/campaign/types/update_campaign_by_code_request.rb +29 -0
- data/lib/Mailhub/client.rb +55 -0
- data/lib/Mailhub/contact/client.rb +385 -0
- data/lib/Mailhub/contact/types/block_contact_request.rb +11 -0
- data/lib/Mailhub/contact/types/block_contacts_by_guid_request.rb +11 -0
- data/lib/Mailhub/contact/types/create_contact_request.rb +15 -0
- data/lib/Mailhub/contact/types/delete_contact_request.rb +11 -0
- data/lib/Mailhub/contact/types/delete_contacts_by_guid_request.rb +11 -0
- data/lib/Mailhub/contact/types/get_contact_request.rb +11 -0
- data/lib/Mailhub/contact/types/get_contacts_request.rb +21 -0
- data/lib/Mailhub/contact/types/get_import_job_request.rb +11 -0
- data/lib/Mailhub/contact/types/import_contacts_request.rb +9 -0
- data/lib/Mailhub/contact/types/update_contact_request.rb +17 -0
- data/lib/Mailhub/custom_field/client.rb +188 -0
- data/lib/Mailhub/custom_field/types/create_custom_field_request.rb +15 -0
- data/lib/Mailhub/custom_field/types/delete_custom_field_request.rb +11 -0
- data/lib/Mailhub/custom_field/types/get_custom_field_request.rb +11 -0
- data/lib/Mailhub/custom_field/types/update_custom_field_request.rb +15 -0
- data/lib/Mailhub/errors/api_error.rb +8 -0
- data/lib/Mailhub/errors/client_error.rb +17 -0
- data/lib/Mailhub/errors/redirect_error.rb +8 -0
- data/lib/Mailhub/errors/response_error.rb +42 -0
- data/lib/Mailhub/errors/server_error.rb +11 -0
- data/lib/Mailhub/errors/timeout_error.rb +8 -0
- data/lib/Mailhub/internal/errors/constraint_error.rb +10 -0
- data/lib/Mailhub/internal/errors/type_error.rb +10 -0
- data/lib/Mailhub/internal/http/base_request.rb +51 -0
- data/lib/Mailhub/internal/http/raw_client.rb +248 -0
- data/lib/Mailhub/internal/iterators/cursor_item_iterator.rb +28 -0
- data/lib/Mailhub/internal/iterators/cursor_page_iterator.rb +63 -0
- data/lib/Mailhub/internal/iterators/item_iterator.rb +65 -0
- data/lib/Mailhub/internal/iterators/offset_item_iterator.rb +30 -0
- data/lib/Mailhub/internal/iterators/offset_page_iterator.rb +103 -0
- data/lib/Mailhub/internal/json/request.rb +41 -0
- data/lib/Mailhub/internal/json/serializable.rb +25 -0
- data/lib/Mailhub/internal/multipart/multipart_encoder.rb +141 -0
- data/lib/Mailhub/internal/multipart/multipart_form_data.rb +78 -0
- data/lib/Mailhub/internal/multipart/multipart_form_data_part.rb +51 -0
- data/lib/Mailhub/internal/multipart/multipart_request.rb +40 -0
- data/lib/Mailhub/internal/types/array.rb +47 -0
- data/lib/Mailhub/internal/types/boolean.rb +34 -0
- data/lib/Mailhub/internal/types/enum.rb +56 -0
- data/lib/Mailhub/internal/types/hash.rb +36 -0
- data/lib/Mailhub/internal/types/model/field.rb +38 -0
- data/lib/Mailhub/internal/types/model.rb +208 -0
- data/lib/Mailhub/internal/types/type.rb +35 -0
- data/lib/Mailhub/internal/types/union.rb +161 -0
- data/lib/Mailhub/internal/types/unknown.rb +15 -0
- data/lib/Mailhub/internal/types/utils.rb +116 -0
- data/lib/Mailhub/media/client.rb +241 -0
- data/lib/Mailhub/media/types/delete_media_request.rb +11 -0
- data/lib/Mailhub/media/types/download_media_request.rb +11 -0
- data/lib/Mailhub/media/types/get_media_request.rb +11 -0
- data/lib/Mailhub/media/types/get_medias_request.rb +19 -0
- data/lib/Mailhub/media/types/update_media_request.rb +13 -0
- data/lib/Mailhub/media/types/upload_media_request.rb +9 -0
- data/lib/Mailhub/message/client.rb +201 -0
- data/lib/Mailhub/message/types/cancel_message_request.rb +11 -0
- data/lib/Mailhub/message/types/get_message_events_request.rb +11 -0
- data/lib/Mailhub/message/types/get_message_request.rb +11 -0
- data/lib/Mailhub/message/types/get_messages_request.rb +21 -0
- data/lib/Mailhub/message/types/send_message_request.rb +23 -0
- data/lib/Mailhub/segment/client.rb +377 -0
- data/lib/Mailhub/segment/types/create_segment_request.rb +13 -0
- data/lib/Mailhub/segment/types/delete_segment_request.rb +11 -0
- data/lib/Mailhub/segment/types/delete_segments_by_code_request.rb +13 -0
- data/lib/Mailhub/segment/types/get_segment_contacts_request.rb +15 -0
- data/lib/Mailhub/segment/types/get_segment_preview_request.rb +11 -0
- data/lib/Mailhub/segment/types/get_segment_request.rb +11 -0
- data/lib/Mailhub/segment/types/get_segments_request.rb +19 -0
- data/lib/Mailhub/segment/types/get_segments_union_preview_by_code_request.rb +11 -0
- data/lib/Mailhub/segment/types/sync_segment_request.rb +11 -0
- data/lib/Mailhub/segment/types/update_segment_request.rb +15 -0
- data/lib/Mailhub/template/client.rb +301 -0
- data/lib/Mailhub/template/types/create_template_request.rb +13 -0
- data/lib/Mailhub/template/types/delete_template_request.rb +11 -0
- data/lib/Mailhub/template/types/get_template_rendered_preview_request.rb +11 -0
- data/lib/Mailhub/template/types/get_template_request.rb +11 -0
- data/lib/Mailhub/template/types/get_templates_request.rb +19 -0
- data/lib/Mailhub/template/types/preview_template_request.rb +11 -0
- data/lib/Mailhub/template/types/update_template_request.rb +15 -0
- data/lib/Mailhub/types/api_error.rb +16 -0
- data/lib/Mailhub/types/api_error_detail.rb +12 -0
- data/lib/Mailhub/types/campaign_activity_point_model.rb +18 -0
- data/lib/Mailhub/types/campaign_analytics_model.rb +30 -0
- data/lib/Mailhub/types/campaign_link_stat_model.rb +14 -0
- data/lib/Mailhub/types/campaign_media_model.rb +24 -0
- data/lib/Mailhub/types/campaign_model.rb +52 -0
- data/lib/Mailhub/types/campaign_model_paged_result.rb +16 -0
- data/lib/Mailhub/types/campaign_segment_model.rb +14 -0
- data/lib/Mailhub/types/campaign_status.rb +17 -0
- data/lib/Mailhub/types/campaign_type.rb +12 -0
- data/lib/Mailhub/types/contact_import_job_model.rb +22 -0
- data/lib/Mailhub/types/contact_import_model.rb +10 -0
- data/lib/Mailhub/types/contact_import_status.rb +14 -0
- data/lib/Mailhub/types/contact_model.rb +26 -0
- data/lib/Mailhub/types/contact_model_cursor_paged_result.rb +18 -0
- data/lib/Mailhub/types/contact_model_paged_result.rb +16 -0
- data/lib/Mailhub/types/contact_segment_model.rb +14 -0
- data/lib/Mailhub/types/contact_status.rb +13 -0
- data/lib/Mailhub/types/custom_field_model.rb +20 -0
- data/lib/Mailhub/types/custom_field_type.rb +14 -0
- data/lib/Mailhub/types/import_contact_error_model.rb +12 -0
- data/lib/Mailhub/types/media_model.rb +28 -0
- data/lib/Mailhub/types/media_model_paged_result.rb +16 -0
- data/lib/Mailhub/types/message_event_model.rb +16 -0
- data/lib/Mailhub/types/message_event_type.rb +18 -0
- data/lib/Mailhub/types/message_model.rb +36 -0
- data/lib/Mailhub/types/message_model_cursor_paged_result.rb +18 -0
- data/lib/Mailhub/types/preview_segment_model.rb +10 -0
- data/lib/Mailhub/types/running_campaign_stats_model.rb +32 -0
- data/lib/Mailhub/types/segment_filter_group_model.rb +12 -0
- data/lib/Mailhub/types/segment_filter_model.rb +10 -0
- data/lib/Mailhub/types/segment_filter_rule_model.rb +14 -0
- data/lib/Mailhub/types/segment_model.rb +32 -0
- data/lib/Mailhub/types/segment_model_paged_result.rb +16 -0
- data/lib/Mailhub/types/segment_sync_status.rb +14 -0
- data/lib/Mailhub/types/template_expression_model.rb +14 -0
- data/lib/Mailhub/types/template_model.rb +20 -0
- data/lib/Mailhub/types/template_model_paged_result.rb +16 -0
- data/lib/Mailhub/version.rb +5 -0
- data/lib/Mailhub.rb +145 -0
- data/reference.md +3691 -0
- metadata +193 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
module ContactImportStatus
|
|
6
|
+
extend Mailhub::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PENDING = "Pending"
|
|
9
|
+
PROCESSING = "Processing"
|
|
10
|
+
COMPLETED = "Completed"
|
|
11
|
+
FAILED = "Failed"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 연락처 정보
|
|
6
|
+
class ContactModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :guid, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :email, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :status, -> { Mailhub::Types::ContactStatus }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :segments, -> { Internal::Types::Array[Mailhub::Types::ContactSegmentModel] }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :fields, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
20
|
+
|
|
21
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
22
|
+
|
|
23
|
+
field :updated_at, -> { String }, optional: true, nullable: false, api_name: "updatedAt"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 커서 기반 페이지네이션 목록 결과
|
|
6
|
+
class ContactModelCursorPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
8
|
+
|
|
9
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
10
|
+
|
|
11
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::ContactModel] }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :next_cursor, -> { String }, optional: true, nullable: false, api_name: "nextCursor"
|
|
14
|
+
|
|
15
|
+
field :has_more, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "hasMore"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 페이지네이션 목록 결과
|
|
6
|
+
class ContactModelPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_index, -> { Integer }, optional: true, nullable: false, api_name: "pageIndex"
|
|
8
|
+
|
|
9
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
10
|
+
|
|
11
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
12
|
+
|
|
13
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::ContactModel] }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 연락처가 속한 세그먼트 정보
|
|
6
|
+
class ContactSegmentModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :code, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 커스텀 필드 정보
|
|
6
|
+
class CustomFieldModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :key, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :type, -> { Mailhub::Types::CustomFieldType }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
16
|
+
|
|
17
|
+
field :updated_at, -> { String }, optional: true, nullable: false, api_name: "updatedAt"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 연락처 가져오기 중 발생한 행 단위 오류
|
|
6
|
+
class ImportContactErrorModel < Internal::Types::Model
|
|
7
|
+
field :row, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :message, -> { String }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 미디어 정보
|
|
6
|
+
class MediaModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :guid, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :code, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :provider, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :original_file_name, -> { String }, optional: true, nullable: false, api_name: "originalFileName"
|
|
16
|
+
|
|
17
|
+
field :stored_file_name, -> { String }, optional: true, nullable: false, api_name: "storedFileName"
|
|
18
|
+
|
|
19
|
+
field :content_type, -> { String }, optional: true, nullable: false, api_name: "contentType"
|
|
20
|
+
|
|
21
|
+
field :size, -> { Integer }, optional: true, nullable: false
|
|
22
|
+
|
|
23
|
+
field :storage_path, -> { String }, optional: true, nullable: false, api_name: "storagePath"
|
|
24
|
+
|
|
25
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 페이지네이션 목록 결과
|
|
6
|
+
class MediaModelPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_index, -> { Integer }, optional: true, nullable: false, api_name: "pageIndex"
|
|
8
|
+
|
|
9
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
10
|
+
|
|
11
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
12
|
+
|
|
13
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::MediaModel] }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 메시지 타임라인의 이벤트 하나
|
|
6
|
+
class MessageEventModel < Internal::Types::Model
|
|
7
|
+
field :type, -> { Mailhub::Types::MessageEventType }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :occurred_at, -> { String }, optional: true, nullable: false, api_name: "occurredAt"
|
|
10
|
+
|
|
11
|
+
field :url, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :detail, -> { String }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
module MessageEventType
|
|
6
|
+
extend Mailhub::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
SCHEDULED = "Scheduled"
|
|
9
|
+
SENT = "Sent"
|
|
10
|
+
DELIVERED = "Delivered"
|
|
11
|
+
OPENED = "Opened"
|
|
12
|
+
CLICKED = "Clicked"
|
|
13
|
+
BOUNCED = "Bounced"
|
|
14
|
+
FAILED = "Failed"
|
|
15
|
+
HELD = "Held"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 발송 이력 모델
|
|
6
|
+
class MessageModel < Internal::Types::Model
|
|
7
|
+
field :guid, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :to_email, -> { String }, optional: true, nullable: false, api_name: "toEmail"
|
|
10
|
+
|
|
11
|
+
field :from_email, -> { String }, optional: true, nullable: false, api_name: "fromEmail"
|
|
12
|
+
|
|
13
|
+
field :subject, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :body, -> { String }, optional: true, nullable: false
|
|
16
|
+
|
|
17
|
+
field :status, -> { String }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :scheduled_at, -> { String }, optional: true, nullable: false, api_name: "scheduledAt"
|
|
20
|
+
|
|
21
|
+
field :error_message, -> { String }, optional: true, nullable: false, api_name: "errorMessage"
|
|
22
|
+
|
|
23
|
+
field :bounce_reason, -> { String }, optional: true, nullable: false, api_name: "bounceReason"
|
|
24
|
+
|
|
25
|
+
field :provider_message_id, -> { String }, optional: true, nullable: false, api_name: "providerMessageId"
|
|
26
|
+
|
|
27
|
+
field :attempt_count, -> { Integer }, optional: true, nullable: false, api_name: "attemptCount"
|
|
28
|
+
|
|
29
|
+
field :last_attempted_at, -> { String }, optional: true, nullable: false, api_name: "lastAttemptedAt"
|
|
30
|
+
|
|
31
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
32
|
+
|
|
33
|
+
field :sent_at, -> { String }, optional: true, nullable: false, api_name: "sentAt"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 커서 기반 페이지네이션 목록 결과
|
|
6
|
+
class MessageModelCursorPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
8
|
+
|
|
9
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
10
|
+
|
|
11
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::MessageModel] }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :next_cursor, -> { String }, optional: true, nullable: false, api_name: "nextCursor"
|
|
14
|
+
|
|
15
|
+
field :has_more, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "hasMore"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 발송 중인 캠페인의 실시간 통계
|
|
6
|
+
class RunningCampaignStatsModel < Internal::Types::Model
|
|
7
|
+
field :campaign_id, -> { Integer }, optional: true, nullable: false, api_name: "campaignId"
|
|
8
|
+
|
|
9
|
+
field :campaign_code, -> { String }, optional: true, nullable: false, api_name: "campaignCode"
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :status, -> { Mailhub::Types::CampaignStatus }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :to_send, -> { Integer }, optional: true, nullable: false, api_name: "toSend"
|
|
16
|
+
|
|
17
|
+
field :sent, -> { Integer }, optional: true, nullable: false
|
|
18
|
+
|
|
19
|
+
field :send_rate, -> { Integer }, optional: true, nullable: false, api_name: "sendRate"
|
|
20
|
+
|
|
21
|
+
field :send_rate_per_minute, -> { Integer }, optional: true, nullable: false, api_name: "sendRatePerMinute"
|
|
22
|
+
|
|
23
|
+
field :remaining, -> { Integer }, optional: true, nullable: false
|
|
24
|
+
|
|
25
|
+
field :estimated_remaining_seconds, -> { Integer }, optional: true, nullable: false, api_name: "estimatedRemainingSeconds"
|
|
26
|
+
|
|
27
|
+
field :runtime_reason, -> { String }, optional: true, nullable: false, api_name: "runtimeReason"
|
|
28
|
+
|
|
29
|
+
field :runtime_message, -> { String }, optional: true, nullable: false, api_name: "runtimeMessage"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 세그먼트 필터의 규칙 그룹 (그룹 내 규칙은 AND로 결합)
|
|
6
|
+
class SegmentFilterGroupModel < Internal::Types::Model
|
|
7
|
+
field :operator, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :rules, -> { Internal::Types::Array[Mailhub::Types::SegmentFilterRuleModel] }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 세그먼트 필터 (그룹 간은 OR로 결합)
|
|
6
|
+
class SegmentFilterModel < Internal::Types::Model
|
|
7
|
+
field :groups, -> { Internal::Types::Array[Mailhub::Types::SegmentFilterGroupModel] }, optional: true, nullable: false
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 세그먼트 필터의 단일 조건 규칙
|
|
6
|
+
class SegmentFilterRuleModel < Internal::Types::Model
|
|
7
|
+
field :field, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :operator, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :value, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 세그먼트 정보
|
|
6
|
+
class SegmentModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :code, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :filter, -> { Mailhub::Types::SegmentFilterModel }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :contact_count, -> { Integer }, optional: true, nullable: false, api_name: "contactCount"
|
|
16
|
+
|
|
17
|
+
field :last_synced_at, -> { String }, optional: true, nullable: false, api_name: "lastSyncedAt"
|
|
18
|
+
|
|
19
|
+
field :sync_status, -> { Mailhub::Types::SegmentSyncStatus }, optional: true, nullable: false, api_name: "syncStatus"
|
|
20
|
+
|
|
21
|
+
field :sync_started_at, -> { String }, optional: true, nullable: false, api_name: "syncStartedAt"
|
|
22
|
+
|
|
23
|
+
field :sync_completed_at, -> { String }, optional: true, nullable: false, api_name: "syncCompletedAt"
|
|
24
|
+
|
|
25
|
+
field :sync_error, -> { String }, optional: true, nullable: false, api_name: "syncError"
|
|
26
|
+
|
|
27
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
28
|
+
|
|
29
|
+
field :updated_at, -> { String }, optional: true, nullable: false, api_name: "updatedAt"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 페이지네이션 목록 결과
|
|
6
|
+
class SegmentModelPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_index, -> { Integer }, optional: true, nullable: false, api_name: "pageIndex"
|
|
8
|
+
|
|
9
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
10
|
+
|
|
11
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
12
|
+
|
|
13
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::SegmentModel] }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 템플릿에서 사용 가능한 치환 표현식 정보
|
|
6
|
+
class TemplateExpressionModel < Internal::Types::Model
|
|
7
|
+
field :key, -> { String }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :label, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :description, -> { String }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 템플릿 정보
|
|
6
|
+
class TemplateModel < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: true, nullable: false
|
|
8
|
+
|
|
9
|
+
field :name, -> { String }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :code, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :body, -> { String }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
16
|
+
|
|
17
|
+
field :updated_at, -> { String }, optional: true, nullable: false, api_name: "updatedAt"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mailhub
|
|
4
|
+
module Types
|
|
5
|
+
# 페이지네이션 목록 결과
|
|
6
|
+
class TemplateModelPagedResult < Internal::Types::Model
|
|
7
|
+
field :page_index, -> { Integer }, optional: true, nullable: false, api_name: "pageIndex"
|
|
8
|
+
|
|
9
|
+
field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
|
|
10
|
+
|
|
11
|
+
field :total_count, -> { Integer }, optional: true, nullable: false, api_name: "totalCount"
|
|
12
|
+
|
|
13
|
+
field :items, -> { Internal::Types::Array[Mailhub::Types::TemplateModel] }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|