post-for-me 0.1.0.pre.alpha.4 → 0.1.0.pre.alpha.6
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/CHANGELOG.md +24 -0
- data/README.md +11 -9
- data/lib/post_for_me/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/post_for_me/internal/type/base_model.rb +1 -8
- data/lib/post_for_me/internal/util.rb +1 -1
- data/lib/post_for_me/models/bluesky_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/create_social_post.rb +25 -373
- data/lib/post_for_me/models/facebook_configuration_dto.rb +46 -0
- data/lib/post_for_me/models/instagram_configuration_dto.rb +54 -0
- data/lib/post_for_me/models/linkedin_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/pinterest_configuration_dto.rb +40 -0
- data/lib/post_for_me/models/platform_configurations_dto.rb +88 -0
- data/lib/post_for_me/models/social_account.rb +1 -1
- data/lib/post_for_me/models/social_account_create_auth_url_params.rb +10 -4
- data/lib/post_for_me/models/social_account_create_params.rb +105 -0
- data/lib/post_for_me/models/social_post.rb +197 -12
- data/lib/post_for_me/models/social_post_list_params.rb +1 -4
- data/lib/post_for_me/models/threads_configuration_dto.rb +45 -0
- data/lib/post_for_me/models/tiktok_configuration.rb +13 -1
- data/lib/post_for_me/models/twitter_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/youtube_configuration_dto.rb +32 -0
- data/lib/post_for_me/models.rb +20 -0
- data/lib/post_for_me/resources/social_accounts.rb +42 -1
- data/lib/post_for_me/resources/social_posts.rb +2 -2
- data/lib/post_for_me/version.rb +1 -1
- data/lib/post_for_me.rb +10 -0
- data/rbi/post_for_me/errors.rbi +2 -2
- data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/create_social_post.rbi +22 -863
- data/rbi/post_for_me/models/facebook_configuration_dto.rbi +101 -0
- data/rbi/post_for_me/models/instagram_configuration_dto.rbi +109 -0
- data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +64 -0
- data/rbi/post_for_me/models/platform_configurations_dto.rbi +178 -0
- data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +11 -0
- data/rbi/post_for_me/models/social_account_create_params.rbi +185 -0
- data/rbi/post_for_me/models/social_post.rbi +328 -13
- data/rbi/post_for_me/models/threads_configuration_dto.rbi +94 -0
- data/rbi/post_for_me/models/tiktok_configuration.rbi +10 -0
- data/rbi/post_for_me/models/twitter_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/youtube_configuration_dto.rbi +56 -0
- data/rbi/post_for_me/models.rbi +20 -0
- data/rbi/post_for_me/resources/social_accounts.rbi +42 -0
- data/rbi/post_for_me/resources/social_posts.rbi +2 -6
- data/sig/post_for_me/models/bluesky_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/create_social_post.rbs +14 -278
- data/sig/post_for_me/models/facebook_configuration_dto.rbs +42 -0
- data/sig/post_for_me/models/instagram_configuration_dto.rbs +47 -0
- data/sig/post_for_me/models/linkedin_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/pinterest_configuration_dto.rbs +35 -0
- data/sig/post_for_me/models/platform_configurations_dto.rbs +65 -0
- data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +7 -0
- data/sig/post_for_me/models/social_account_create_params.rbs +97 -0
- data/sig/post_for_me/models/social_post.rbs +155 -16
- data/sig/post_for_me/models/threads_configuration_dto.rbs +41 -0
- data/sig/post_for_me/models/tiktok_configuration.rbs +5 -0
- data/sig/post_for_me/models/twitter_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/youtube_configuration_dto.rbs +22 -0
- data/sig/post_for_me/models.rbs +20 -0
- data/sig/post_for_me/resources/social_accounts.rbs +14 -0
- data/sig/post_for_me/resources/social_posts.rbs +2 -2
- metadata +32 -2
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class SocialAccountCreateParams < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
PostForMe::SocialAccountCreateParams,
|
|
13
|
+
PostForMe::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The access token of the social account
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :access_token
|
|
20
|
+
|
|
21
|
+
# The access token expiration date of the social account
|
|
22
|
+
sig { returns(Time) }
|
|
23
|
+
attr_accessor :access_token_expires_at
|
|
24
|
+
|
|
25
|
+
# The platform of the social account
|
|
26
|
+
sig { returns(PostForMe::SocialAccountCreateParams::Platform::OrSymbol) }
|
|
27
|
+
attr_accessor :platform
|
|
28
|
+
|
|
29
|
+
# The user id of the social account
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :user_id
|
|
32
|
+
|
|
33
|
+
# The external id of the social account
|
|
34
|
+
sig { returns(T.nilable(String)) }
|
|
35
|
+
attr_accessor :external_id
|
|
36
|
+
|
|
37
|
+
# The metadata of the social account
|
|
38
|
+
sig { returns(T.nilable(T.anything)) }
|
|
39
|
+
attr_reader :metadata
|
|
40
|
+
|
|
41
|
+
sig { params(metadata: T.anything).void }
|
|
42
|
+
attr_writer :metadata
|
|
43
|
+
|
|
44
|
+
# The refresh token of the social account
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_accessor :refresh_token
|
|
47
|
+
|
|
48
|
+
# The refresh token expiration date of the social account
|
|
49
|
+
sig { returns(T.nilable(Time)) }
|
|
50
|
+
attr_accessor :refresh_token_expires_at
|
|
51
|
+
|
|
52
|
+
# The platform's username of the social account
|
|
53
|
+
sig { returns(T.nilable(String)) }
|
|
54
|
+
attr_accessor :username
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
access_token: String,
|
|
59
|
+
access_token_expires_at: Time,
|
|
60
|
+
platform: PostForMe::SocialAccountCreateParams::Platform::OrSymbol,
|
|
61
|
+
user_id: String,
|
|
62
|
+
external_id: T.nilable(String),
|
|
63
|
+
metadata: T.anything,
|
|
64
|
+
refresh_token: T.nilable(String),
|
|
65
|
+
refresh_token_expires_at: T.nilable(Time),
|
|
66
|
+
username: T.nilable(String),
|
|
67
|
+
request_options: PostForMe::RequestOptions::OrHash
|
|
68
|
+
).returns(T.attached_class)
|
|
69
|
+
end
|
|
70
|
+
def self.new(
|
|
71
|
+
# The access token of the social account
|
|
72
|
+
access_token:,
|
|
73
|
+
# The access token expiration date of the social account
|
|
74
|
+
access_token_expires_at:,
|
|
75
|
+
# The platform of the social account
|
|
76
|
+
platform:,
|
|
77
|
+
# The user id of the social account
|
|
78
|
+
user_id:,
|
|
79
|
+
# The external id of the social account
|
|
80
|
+
external_id: nil,
|
|
81
|
+
# The metadata of the social account
|
|
82
|
+
metadata: nil,
|
|
83
|
+
# The refresh token of the social account
|
|
84
|
+
refresh_token: nil,
|
|
85
|
+
# The refresh token expiration date of the social account
|
|
86
|
+
refresh_token_expires_at: nil,
|
|
87
|
+
# The platform's username of the social account
|
|
88
|
+
username: nil,
|
|
89
|
+
request_options: {}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
override.returns(
|
|
95
|
+
{
|
|
96
|
+
access_token: String,
|
|
97
|
+
access_token_expires_at: Time,
|
|
98
|
+
platform: PostForMe::SocialAccountCreateParams::Platform::OrSymbol,
|
|
99
|
+
user_id: String,
|
|
100
|
+
external_id: T.nilable(String),
|
|
101
|
+
metadata: T.anything,
|
|
102
|
+
refresh_token: T.nilable(String),
|
|
103
|
+
refresh_token_expires_at: T.nilable(Time),
|
|
104
|
+
username: T.nilable(String),
|
|
105
|
+
request_options: PostForMe::RequestOptions
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
def to_hash
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# The platform of the social account
|
|
113
|
+
module Platform
|
|
114
|
+
extend PostForMe::Internal::Type::Enum
|
|
115
|
+
|
|
116
|
+
TaggedSymbol =
|
|
117
|
+
T.type_alias do
|
|
118
|
+
T.all(Symbol, PostForMe::SocialAccountCreateParams::Platform)
|
|
119
|
+
end
|
|
120
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
121
|
+
|
|
122
|
+
FACEBOOK =
|
|
123
|
+
T.let(
|
|
124
|
+
:facebook,
|
|
125
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
126
|
+
)
|
|
127
|
+
INSTAGRAM =
|
|
128
|
+
T.let(
|
|
129
|
+
:instagram,
|
|
130
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
131
|
+
)
|
|
132
|
+
X =
|
|
133
|
+
T.let(
|
|
134
|
+
:x,
|
|
135
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
136
|
+
)
|
|
137
|
+
TIKTOK =
|
|
138
|
+
T.let(
|
|
139
|
+
:tiktok,
|
|
140
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
141
|
+
)
|
|
142
|
+
YOUTUBE =
|
|
143
|
+
T.let(
|
|
144
|
+
:youtube,
|
|
145
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
146
|
+
)
|
|
147
|
+
PINTEREST =
|
|
148
|
+
T.let(
|
|
149
|
+
:pinterest,
|
|
150
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
151
|
+
)
|
|
152
|
+
LINKEDIN =
|
|
153
|
+
T.let(
|
|
154
|
+
:linkedin,
|
|
155
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
156
|
+
)
|
|
157
|
+
BLUESKY =
|
|
158
|
+
T.let(
|
|
159
|
+
:bluesky,
|
|
160
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
161
|
+
)
|
|
162
|
+
THREADS =
|
|
163
|
+
T.let(
|
|
164
|
+
:threads,
|
|
165
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
166
|
+
)
|
|
167
|
+
TIKTOK_BUSINESS =
|
|
168
|
+
T.let(
|
|
169
|
+
:tiktok_business,
|
|
170
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
sig do
|
|
174
|
+
override.returns(
|
|
175
|
+
T::Array[
|
|
176
|
+
PostForMe::SocialAccountCreateParams::Platform::TaggedSymbol
|
|
177
|
+
]
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
def self.values
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -13,7 +13,11 @@ module PostForMe
|
|
|
13
13
|
attr_accessor :id
|
|
14
14
|
|
|
15
15
|
# Account-specific configurations for the post
|
|
16
|
-
sig
|
|
16
|
+
sig do
|
|
17
|
+
returns(
|
|
18
|
+
T.nilable(T::Array[PostForMe::SocialPost::AccountConfiguration])
|
|
19
|
+
)
|
|
20
|
+
end
|
|
17
21
|
attr_accessor :account_configurations
|
|
18
22
|
|
|
19
23
|
# Caption text for the post
|
|
@@ -29,19 +33,27 @@ module PostForMe
|
|
|
29
33
|
attr_accessor :external_id
|
|
30
34
|
|
|
31
35
|
# Array of media URLs associated with the post
|
|
32
|
-
sig { returns(T.nilable(T
|
|
36
|
+
sig { returns(T.nilable(T::Array[PostForMe::SocialPost::Media])) }
|
|
33
37
|
attr_accessor :media
|
|
34
38
|
|
|
35
39
|
# Platform-specific configurations for the post
|
|
36
|
-
sig { returns(T.nilable(
|
|
37
|
-
|
|
40
|
+
sig { returns(T.nilable(PostForMe::PlatformConfigurationsDto)) }
|
|
41
|
+
attr_reader :platform_configurations
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
params(
|
|
45
|
+
platform_configurations:
|
|
46
|
+
T.nilable(PostForMe::PlatformConfigurationsDto::OrHash)
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :platform_configurations
|
|
38
50
|
|
|
39
51
|
# Scheduled date and time for the post
|
|
40
52
|
sig { returns(T.nilable(String)) }
|
|
41
53
|
attr_accessor :scheduled_at
|
|
42
54
|
|
|
43
55
|
# Array of social account IDs for posting
|
|
44
|
-
sig { returns(T::Array[
|
|
56
|
+
sig { returns(T::Array[PostForMe::SocialAccount]) }
|
|
45
57
|
attr_accessor :social_accounts
|
|
46
58
|
|
|
47
59
|
# Current status of the post: draft, processed, scheduled, or processing
|
|
@@ -55,14 +67,18 @@ module PostForMe
|
|
|
55
67
|
sig do
|
|
56
68
|
params(
|
|
57
69
|
id: String,
|
|
58
|
-
account_configurations:
|
|
70
|
+
account_configurations:
|
|
71
|
+
T.nilable(
|
|
72
|
+
T::Array[PostForMe::SocialPost::AccountConfiguration::OrHash]
|
|
73
|
+
),
|
|
59
74
|
caption: String,
|
|
60
75
|
created_at: String,
|
|
61
76
|
external_id: T.nilable(String),
|
|
62
|
-
media: T.nilable(T
|
|
63
|
-
platform_configurations:
|
|
77
|
+
media: T.nilable(T::Array[PostForMe::SocialPost::Media::OrHash]),
|
|
78
|
+
platform_configurations:
|
|
79
|
+
T.nilable(PostForMe::PlatformConfigurationsDto::OrHash),
|
|
64
80
|
scheduled_at: T.nilable(String),
|
|
65
|
-
social_accounts: T::Array[
|
|
81
|
+
social_accounts: T::Array[PostForMe::SocialAccount::OrHash],
|
|
66
82
|
status: PostForMe::SocialPost::Status::OrSymbol,
|
|
67
83
|
updated_at: String
|
|
68
84
|
).returns(T.attached_class)
|
|
@@ -97,14 +113,16 @@ module PostForMe
|
|
|
97
113
|
override.returns(
|
|
98
114
|
{
|
|
99
115
|
id: String,
|
|
100
|
-
account_configurations:
|
|
116
|
+
account_configurations:
|
|
117
|
+
T.nilable(T::Array[PostForMe::SocialPost::AccountConfiguration]),
|
|
101
118
|
caption: String,
|
|
102
119
|
created_at: String,
|
|
103
120
|
external_id: T.nilable(String),
|
|
104
|
-
media: T.nilable(T
|
|
105
|
-
platform_configurations:
|
|
121
|
+
media: T.nilable(T::Array[PostForMe::SocialPost::Media]),
|
|
122
|
+
platform_configurations:
|
|
123
|
+
T.nilable(PostForMe::PlatformConfigurationsDto),
|
|
106
124
|
scheduled_at: T.nilable(String),
|
|
107
|
-
social_accounts: T::Array[
|
|
125
|
+
social_accounts: T::Array[PostForMe::SocialAccount],
|
|
108
126
|
status: PostForMe::SocialPost::Status::TaggedSymbol,
|
|
109
127
|
updated_at: String
|
|
110
128
|
}
|
|
@@ -113,6 +131,303 @@ module PostForMe
|
|
|
113
131
|
def to_hash
|
|
114
132
|
end
|
|
115
133
|
|
|
134
|
+
class AccountConfiguration < PostForMe::Internal::Type::BaseModel
|
|
135
|
+
OrHash =
|
|
136
|
+
T.type_alias do
|
|
137
|
+
T.any(
|
|
138
|
+
PostForMe::SocialPost::AccountConfiguration,
|
|
139
|
+
PostForMe::Internal::AnyHash
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Configuration for the social account
|
|
144
|
+
sig do
|
|
145
|
+
returns(PostForMe::SocialPost::AccountConfiguration::Configuration)
|
|
146
|
+
end
|
|
147
|
+
attr_reader :configuration
|
|
148
|
+
|
|
149
|
+
sig do
|
|
150
|
+
params(
|
|
151
|
+
configuration:
|
|
152
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::OrHash
|
|
153
|
+
).void
|
|
154
|
+
end
|
|
155
|
+
attr_writer :configuration
|
|
156
|
+
|
|
157
|
+
# ID of the social account, you want to apply the configuration to
|
|
158
|
+
sig { returns(String) }
|
|
159
|
+
attr_accessor :social_account_id
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
params(
|
|
163
|
+
configuration:
|
|
164
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::OrHash,
|
|
165
|
+
social_account_id: String
|
|
166
|
+
).returns(T.attached_class)
|
|
167
|
+
end
|
|
168
|
+
def self.new(
|
|
169
|
+
# Configuration for the social account
|
|
170
|
+
configuration:,
|
|
171
|
+
# ID of the social account, you want to apply the configuration to
|
|
172
|
+
social_account_id:
|
|
173
|
+
)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
sig do
|
|
177
|
+
override.returns(
|
|
178
|
+
{
|
|
179
|
+
configuration:
|
|
180
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration,
|
|
181
|
+
social_account_id: String
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
def to_hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
class Configuration < PostForMe::Internal::Type::BaseModel
|
|
189
|
+
OrHash =
|
|
190
|
+
T.type_alias do
|
|
191
|
+
T.any(
|
|
192
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration,
|
|
193
|
+
PostForMe::Internal::AnyHash
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Allow comments on TikTok
|
|
198
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
199
|
+
attr_accessor :allow_comment
|
|
200
|
+
|
|
201
|
+
# Allow duets on TikTok
|
|
202
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
203
|
+
attr_accessor :allow_duet
|
|
204
|
+
|
|
205
|
+
# Allow stitch on TikTok
|
|
206
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
207
|
+
attr_accessor :allow_stitch
|
|
208
|
+
|
|
209
|
+
# Pinterest board IDs
|
|
210
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
211
|
+
attr_accessor :board_ids
|
|
212
|
+
|
|
213
|
+
# Overrides the `caption` from the post
|
|
214
|
+
sig { returns(T.nilable(T.anything)) }
|
|
215
|
+
attr_accessor :caption
|
|
216
|
+
|
|
217
|
+
# Disclose branded content on TikTok
|
|
218
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
219
|
+
attr_accessor :disclose_branded_content
|
|
220
|
+
|
|
221
|
+
# Disclose your brand on TikTok
|
|
222
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
223
|
+
attr_accessor :disclose_your_brand
|
|
224
|
+
|
|
225
|
+
# Flag content as AI generated on TikTok
|
|
226
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
227
|
+
attr_accessor :is_ai_generated
|
|
228
|
+
|
|
229
|
+
# Will create a draft upload to TikTok, posting will need to be completed from
|
|
230
|
+
# within the app
|
|
231
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
232
|
+
attr_accessor :is_draft
|
|
233
|
+
|
|
234
|
+
# Pinterest post link
|
|
235
|
+
sig { returns(T.nilable(String)) }
|
|
236
|
+
attr_accessor :link
|
|
237
|
+
|
|
238
|
+
# Overrides the `media` from the post
|
|
239
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
240
|
+
attr_accessor :media
|
|
241
|
+
|
|
242
|
+
# Post placement for Facebook/Instagram/Threads
|
|
243
|
+
sig do
|
|
244
|
+
returns(
|
|
245
|
+
T.nilable(
|
|
246
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
247
|
+
)
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
attr_accessor :placement
|
|
251
|
+
|
|
252
|
+
# Sets the privacy status for TikTok (private, public)
|
|
253
|
+
sig { returns(T.nilable(String)) }
|
|
254
|
+
attr_accessor :privacy_status
|
|
255
|
+
|
|
256
|
+
# Overrides the `title` from the post
|
|
257
|
+
sig { returns(T.nilable(String)) }
|
|
258
|
+
attr_accessor :title
|
|
259
|
+
|
|
260
|
+
# Configuration for the social account
|
|
261
|
+
sig do
|
|
262
|
+
params(
|
|
263
|
+
allow_comment: T.nilable(T::Boolean),
|
|
264
|
+
allow_duet: T.nilable(T::Boolean),
|
|
265
|
+
allow_stitch: T.nilable(T::Boolean),
|
|
266
|
+
board_ids: T.nilable(T::Array[String]),
|
|
267
|
+
caption: T.nilable(T.anything),
|
|
268
|
+
disclose_branded_content: T.nilable(T::Boolean),
|
|
269
|
+
disclose_your_brand: T.nilable(T::Boolean),
|
|
270
|
+
is_ai_generated: T.nilable(T::Boolean),
|
|
271
|
+
is_draft: T.nilable(T::Boolean),
|
|
272
|
+
link: T.nilable(String),
|
|
273
|
+
media: T.nilable(T::Array[String]),
|
|
274
|
+
placement:
|
|
275
|
+
T.nilable(
|
|
276
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::OrSymbol
|
|
277
|
+
),
|
|
278
|
+
privacy_status: T.nilable(String),
|
|
279
|
+
title: T.nilable(String)
|
|
280
|
+
).returns(T.attached_class)
|
|
281
|
+
end
|
|
282
|
+
def self.new(
|
|
283
|
+
# Allow comments on TikTok
|
|
284
|
+
allow_comment: nil,
|
|
285
|
+
# Allow duets on TikTok
|
|
286
|
+
allow_duet: nil,
|
|
287
|
+
# Allow stitch on TikTok
|
|
288
|
+
allow_stitch: nil,
|
|
289
|
+
# Pinterest board IDs
|
|
290
|
+
board_ids: nil,
|
|
291
|
+
# Overrides the `caption` from the post
|
|
292
|
+
caption: nil,
|
|
293
|
+
# Disclose branded content on TikTok
|
|
294
|
+
disclose_branded_content: nil,
|
|
295
|
+
# Disclose your brand on TikTok
|
|
296
|
+
disclose_your_brand: nil,
|
|
297
|
+
# Flag content as AI generated on TikTok
|
|
298
|
+
is_ai_generated: nil,
|
|
299
|
+
# Will create a draft upload to TikTok, posting will need to be completed from
|
|
300
|
+
# within the app
|
|
301
|
+
is_draft: nil,
|
|
302
|
+
# Pinterest post link
|
|
303
|
+
link: nil,
|
|
304
|
+
# Overrides the `media` from the post
|
|
305
|
+
media: nil,
|
|
306
|
+
# Post placement for Facebook/Instagram/Threads
|
|
307
|
+
placement: nil,
|
|
308
|
+
# Sets the privacy status for TikTok (private, public)
|
|
309
|
+
privacy_status: nil,
|
|
310
|
+
# Overrides the `title` from the post
|
|
311
|
+
title: nil
|
|
312
|
+
)
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
sig do
|
|
316
|
+
override.returns(
|
|
317
|
+
{
|
|
318
|
+
allow_comment: T.nilable(T::Boolean),
|
|
319
|
+
allow_duet: T.nilable(T::Boolean),
|
|
320
|
+
allow_stitch: T.nilable(T::Boolean),
|
|
321
|
+
board_ids: T.nilable(T::Array[String]),
|
|
322
|
+
caption: T.nilable(T.anything),
|
|
323
|
+
disclose_branded_content: T.nilable(T::Boolean),
|
|
324
|
+
disclose_your_brand: T.nilable(T::Boolean),
|
|
325
|
+
is_ai_generated: T.nilable(T::Boolean),
|
|
326
|
+
is_draft: T.nilable(T::Boolean),
|
|
327
|
+
link: T.nilable(String),
|
|
328
|
+
media: T.nilable(T::Array[String]),
|
|
329
|
+
placement:
|
|
330
|
+
T.nilable(
|
|
331
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
332
|
+
),
|
|
333
|
+
privacy_status: T.nilable(String),
|
|
334
|
+
title: T.nilable(String)
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
end
|
|
338
|
+
def to_hash
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Post placement for Facebook/Instagram/Threads
|
|
342
|
+
module Placement
|
|
343
|
+
extend PostForMe::Internal::Type::Enum
|
|
344
|
+
|
|
345
|
+
TaggedSymbol =
|
|
346
|
+
T.type_alias do
|
|
347
|
+
T.all(
|
|
348
|
+
Symbol,
|
|
349
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement
|
|
350
|
+
)
|
|
351
|
+
end
|
|
352
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
353
|
+
|
|
354
|
+
REELS =
|
|
355
|
+
T.let(
|
|
356
|
+
:reels,
|
|
357
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
358
|
+
)
|
|
359
|
+
TIMELINE =
|
|
360
|
+
T.let(
|
|
361
|
+
:timeline,
|
|
362
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
363
|
+
)
|
|
364
|
+
STORIES =
|
|
365
|
+
T.let(
|
|
366
|
+
:stories,
|
|
367
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
override.returns(
|
|
372
|
+
T::Array[
|
|
373
|
+
PostForMe::SocialPost::AccountConfiguration::Configuration::Placement::TaggedSymbol
|
|
374
|
+
]
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
def self.values
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
class Media < PostForMe::Internal::Type::BaseModel
|
|
384
|
+
OrHash =
|
|
385
|
+
T.type_alias do
|
|
386
|
+
T.any(PostForMe::SocialPost::Media, PostForMe::Internal::AnyHash)
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
# Public URL of the media
|
|
390
|
+
sig { returns(String) }
|
|
391
|
+
attr_accessor :url
|
|
392
|
+
|
|
393
|
+
# Timestamp in milliseconds of frame to use as thumbnail for the media
|
|
394
|
+
sig { returns(T.nilable(T.anything)) }
|
|
395
|
+
attr_accessor :thumbnail_timestamp_ms
|
|
396
|
+
|
|
397
|
+
# Public URL of the thumbnail for the media
|
|
398
|
+
sig { returns(T.nilable(T.anything)) }
|
|
399
|
+
attr_accessor :thumbnail_url
|
|
400
|
+
|
|
401
|
+
sig do
|
|
402
|
+
params(
|
|
403
|
+
url: String,
|
|
404
|
+
thumbnail_timestamp_ms: T.nilable(T.anything),
|
|
405
|
+
thumbnail_url: T.nilable(T.anything)
|
|
406
|
+
).returns(T.attached_class)
|
|
407
|
+
end
|
|
408
|
+
def self.new(
|
|
409
|
+
# Public URL of the media
|
|
410
|
+
url:,
|
|
411
|
+
# Timestamp in milliseconds of frame to use as thumbnail for the media
|
|
412
|
+
thumbnail_timestamp_ms: nil,
|
|
413
|
+
# Public URL of the thumbnail for the media
|
|
414
|
+
thumbnail_url: nil
|
|
415
|
+
)
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
sig do
|
|
419
|
+
override.returns(
|
|
420
|
+
{
|
|
421
|
+
url: String,
|
|
422
|
+
thumbnail_timestamp_ms: T.nilable(T.anything),
|
|
423
|
+
thumbnail_url: T.nilable(T.anything)
|
|
424
|
+
}
|
|
425
|
+
)
|
|
426
|
+
end
|
|
427
|
+
def to_hash
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
116
431
|
# Current status of the post: draft, processed, scheduled, or processing
|
|
117
432
|
module Status
|
|
118
433
|
extend PostForMe::Internal::Type::Enum
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class ThreadsConfigurationDto < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
PostForMe::ThreadsConfigurationDto,
|
|
10
|
+
PostForMe::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Overrides the `caption` from the post
|
|
15
|
+
sig { returns(T.nilable(T.anything)) }
|
|
16
|
+
attr_accessor :caption
|
|
17
|
+
|
|
18
|
+
# Overrides the `media` from the post
|
|
19
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
20
|
+
attr_accessor :media
|
|
21
|
+
|
|
22
|
+
# Threads post placement
|
|
23
|
+
sig do
|
|
24
|
+
returns(
|
|
25
|
+
T.nilable(PostForMe::ThreadsConfigurationDto::Placement::OrSymbol)
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
attr_accessor :placement
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
caption: T.nilable(T.anything),
|
|
33
|
+
media: T.nilable(T::Array[String]),
|
|
34
|
+
placement:
|
|
35
|
+
T.nilable(PostForMe::ThreadsConfigurationDto::Placement::OrSymbol)
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Overrides the `caption` from the post
|
|
40
|
+
caption: nil,
|
|
41
|
+
# Overrides the `media` from the post
|
|
42
|
+
media: nil,
|
|
43
|
+
# Threads post placement
|
|
44
|
+
placement: nil
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
override.returns(
|
|
50
|
+
{
|
|
51
|
+
caption: T.nilable(T.anything),
|
|
52
|
+
media: T.nilable(T::Array[String]),
|
|
53
|
+
placement:
|
|
54
|
+
T.nilable(PostForMe::ThreadsConfigurationDto::Placement::OrSymbol)
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Threads post placement
|
|
62
|
+
module Placement
|
|
63
|
+
extend PostForMe::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
TaggedSymbol =
|
|
66
|
+
T.type_alias do
|
|
67
|
+
T.all(Symbol, PostForMe::ThreadsConfigurationDto::Placement)
|
|
68
|
+
end
|
|
69
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
70
|
+
|
|
71
|
+
REELS =
|
|
72
|
+
T.let(
|
|
73
|
+
:reels,
|
|
74
|
+
PostForMe::ThreadsConfigurationDto::Placement::TaggedSymbol
|
|
75
|
+
)
|
|
76
|
+
TIMELINE =
|
|
77
|
+
T.let(
|
|
78
|
+
:timeline,
|
|
79
|
+
PostForMe::ThreadsConfigurationDto::Placement::TaggedSymbol
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
sig do
|
|
83
|
+
override.returns(
|
|
84
|
+
T::Array[
|
|
85
|
+
PostForMe::ThreadsConfigurationDto::Placement::TaggedSymbol
|
|
86
|
+
]
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
def self.values
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -36,6 +36,11 @@ module PostForMe
|
|
|
36
36
|
sig { returns(T.nilable(T::Boolean)) }
|
|
37
37
|
attr_accessor :is_ai_generated
|
|
38
38
|
|
|
39
|
+
# Will create a draft upload to TikTok, posting will need to be completed from
|
|
40
|
+
# within the app
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_accessor :is_draft
|
|
43
|
+
|
|
39
44
|
# Overrides the `media` from the post
|
|
40
45
|
sig { returns(T.nilable(T::Array[String])) }
|
|
41
46
|
attr_accessor :media
|
|
@@ -57,6 +62,7 @@ module PostForMe
|
|
|
57
62
|
disclose_branded_content: T.nilable(T::Boolean),
|
|
58
63
|
disclose_your_brand: T.nilable(T::Boolean),
|
|
59
64
|
is_ai_generated: T.nilable(T::Boolean),
|
|
65
|
+
is_draft: T.nilable(T::Boolean),
|
|
60
66
|
media: T.nilable(T::Array[String]),
|
|
61
67
|
privacy_status: T.nilable(String),
|
|
62
68
|
title: T.nilable(String)
|
|
@@ -77,6 +83,9 @@ module PostForMe
|
|
|
77
83
|
disclose_your_brand: nil,
|
|
78
84
|
# Flag content as AI generated on TikTok
|
|
79
85
|
is_ai_generated: nil,
|
|
86
|
+
# Will create a draft upload to TikTok, posting will need to be completed from
|
|
87
|
+
# within the app
|
|
88
|
+
is_draft: nil,
|
|
80
89
|
# Overrides the `media` from the post
|
|
81
90
|
media: nil,
|
|
82
91
|
# Sets the privacy status for TikTok (private, public)
|
|
@@ -96,6 +105,7 @@ module PostForMe
|
|
|
96
105
|
disclose_branded_content: T.nilable(T::Boolean),
|
|
97
106
|
disclose_your_brand: T.nilable(T::Boolean),
|
|
98
107
|
is_ai_generated: T.nilable(T::Boolean),
|
|
108
|
+
is_draft: T.nilable(T::Boolean),
|
|
99
109
|
media: T.nilable(T::Array[String]),
|
|
100
110
|
privacy_status: T.nilable(String),
|
|
101
111
|
title: T.nilable(String)
|