post-for-me 0.1.0.pre.alpha.8 → 0.1.0.pre.alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/lib/post_for_me/errors.rb +25 -11
  5. data/lib/post_for_me/file_part.rb +10 -7
  6. data/lib/post_for_me/internal/transport/base_client.rb +11 -7
  7. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +7 -10
  8. data/lib/post_for_me/internal/type/base_page.rb +1 -1
  9. data/lib/post_for_me/internal/type/file_input.rb +7 -4
  10. data/lib/post_for_me/internal/util.rb +3 -2
  11. data/lib/post_for_me/models/bluesky_configuration_dto.rb +87 -1
  12. data/lib/post_for_me/models/create_social_post.rb +221 -2
  13. data/lib/post_for_me/models/facebook_configuration_dto.rb +106 -2
  14. data/lib/post_for_me/models/instagram_configuration_dto.rb +104 -2
  15. data/lib/post_for_me/models/linkedin_configuration_dto.rb +87 -1
  16. data/lib/post_for_me/models/pinterest_configuration_dto.rb +87 -1
  17. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +43 -1
  18. data/lib/post_for_me/models/social_post.rb +221 -2
  19. data/lib/post_for_me/models/threads_configuration_dto.rb +87 -1
  20. data/lib/post_for_me/models/tiktok_configuration.rb +96 -2
  21. data/lib/post_for_me/models/twitter_configuration_dto.rb +180 -2
  22. data/lib/post_for_me/models/youtube_configuration_dto.rb +87 -1
  23. data/lib/post_for_me/version.rb +1 -1
  24. data/rbi/post_for_me/errors.rbi +29 -2
  25. data/rbi/post_for_me/file_part.rbi +1 -1
  26. data/rbi/post_for_me/internal/transport/base_client.rbi +4 -5
  27. data/rbi/post_for_me/internal/type/base_page.rbi +1 -1
  28. data/rbi/post_for_me/internal/util.rbi +1 -1
  29. data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +180 -0
  30. data/rbi/post_for_me/models/create_social_post.rbi +424 -0
  31. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +198 -0
  32. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +205 -3
  33. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +182 -0
  34. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +184 -0
  35. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +104 -0
  36. data/rbi/post_for_me/models/social_post.rbi +414 -0
  37. data/rbi/post_for_me/models/threads_configuration_dto.rbi +180 -0
  38. data/rbi/post_for_me/models/tiktok_configuration.rbi +180 -0
  39. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +390 -2
  40. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +180 -0
  41. data/sig/post_for_me/errors.rbs +7 -0
  42. data/sig/post_for_me/file_part.rbs +1 -1
  43. data/sig/post_for_me/models/bluesky_configuration_dto.rbs +73 -1
  44. data/sig/post_for_me/models/create_social_post.rbs +180 -1
  45. data/sig/post_for_me/models/facebook_configuration_dto.rbs +83 -1
  46. data/sig/post_for_me/models/instagram_configuration_dto.rbs +86 -4
  47. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +73 -1
  48. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +73 -1
  49. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +37 -0
  50. data/sig/post_for_me/models/social_post.rbs +180 -1
  51. data/sig/post_for_me/models/threads_configuration_dto.rbs +73 -1
  52. data/sig/post_for_me/models/tiktok_configuration.rbs +78 -1
  53. data/sig/post_for_me/models/twitter_configuration_dto.rbs +163 -4
  54. data/sig/post_for_me/models/youtube_configuration_dto.rbs +73 -1
  55. metadata +2 -2
@@ -63,6 +63,14 @@ module PostForMe
63
63
  sig { returns(String) }
64
64
  attr_accessor :url
65
65
 
66
+ # List of tags to attach to the media
67
+ sig do
68
+ returns(
69
+ T.nilable(T::Array[PostForMe::LinkedinConfigurationDto::Media::Tag])
70
+ )
71
+ end
72
+ attr_accessor :tags
73
+
66
74
  # Timestamp in milliseconds of frame to use as thumbnail for the media
67
75
  sig { returns(T.nilable(T.anything)) }
68
76
  attr_accessor :thumbnail_timestamp_ms
@@ -74,6 +82,12 @@ module PostForMe
74
82
  sig do
75
83
  params(
76
84
  url: String,
85
+ tags:
86
+ T.nilable(
87
+ T::Array[
88
+ PostForMe::LinkedinConfigurationDto::Media::Tag::OrHash
89
+ ]
90
+ ),
77
91
  thumbnail_timestamp_ms: T.nilable(T.anything),
78
92
  thumbnail_url: T.nilable(T.anything)
79
93
  ).returns(T.attached_class)
@@ -81,6 +95,8 @@ module PostForMe
81
95
  def self.new(
82
96
  # Public URL of the media
83
97
  url:,
98
+ # List of tags to attach to the media
99
+ tags: nil,
84
100
  # Timestamp in milliseconds of frame to use as thumbnail for the media
85
101
  thumbnail_timestamp_ms: nil,
86
102
  # Public URL of the thumbnail for the media
@@ -92,6 +108,10 @@ module PostForMe
92
108
  override.returns(
93
109
  {
94
110
  url: String,
111
+ tags:
112
+ T.nilable(
113
+ T::Array[PostForMe::LinkedinConfigurationDto::Media::Tag]
114
+ ),
95
115
  thumbnail_timestamp_ms: T.nilable(T.anything),
96
116
  thumbnail_url: T.nilable(T.anything)
97
117
  }
@@ -99,6 +119,168 @@ module PostForMe
99
119
  end
100
120
  def to_hash
101
121
  end
122
+
123
+ class Tag < PostForMe::Internal::Type::BaseModel
124
+ OrHash =
125
+ T.type_alias do
126
+ T.any(
127
+ PostForMe::LinkedinConfigurationDto::Media::Tag,
128
+ PostForMe::Internal::AnyHash
129
+ )
130
+ end
131
+
132
+ # Facebook User ID, Instagram Username or Instagram product id to tag
133
+ sig { returns(String) }
134
+ attr_accessor :id
135
+
136
+ # The platform for the tags
137
+ sig do
138
+ returns(
139
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::OrSymbol
140
+ )
141
+ end
142
+ attr_accessor :platform
143
+
144
+ # The type of tag, user to tag accounts, product to tag products (only supported
145
+ # for instagram)
146
+ sig do
147
+ returns(
148
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::OrSymbol
149
+ )
150
+ end
151
+ attr_accessor :type
152
+
153
+ # Percentage distance from left edge of the image, Not required for videos or
154
+ # stories
155
+ sig { returns(T.nilable(Float)) }
156
+ attr_reader :x
157
+
158
+ sig { params(x: Float).void }
159
+ attr_writer :x
160
+
161
+ # Percentage distance from top edge of the image, Not required for videos or
162
+ # stories
163
+ sig { returns(T.nilable(Float)) }
164
+ attr_reader :y_
165
+
166
+ sig { params(y_: Float).void }
167
+ attr_writer :y_
168
+
169
+ sig do
170
+ params(
171
+ id: String,
172
+ platform:
173
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::OrSymbol,
174
+ type:
175
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::OrSymbol,
176
+ x: Float,
177
+ y_: Float
178
+ ).returns(T.attached_class)
179
+ end
180
+ def self.new(
181
+ # Facebook User ID, Instagram Username or Instagram product id to tag
182
+ id:,
183
+ # The platform for the tags
184
+ platform:,
185
+ # The type of tag, user to tag accounts, product to tag products (only supported
186
+ # for instagram)
187
+ type:,
188
+ # Percentage distance from left edge of the image, Not required for videos or
189
+ # stories
190
+ x: nil,
191
+ # Percentage distance from top edge of the image, Not required for videos or
192
+ # stories
193
+ y_: nil
194
+ )
195
+ end
196
+
197
+ sig do
198
+ override.returns(
199
+ {
200
+ id: String,
201
+ platform:
202
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::OrSymbol,
203
+ type:
204
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::OrSymbol,
205
+ x: Float,
206
+ y_: Float
207
+ }
208
+ )
209
+ end
210
+ def to_hash
211
+ end
212
+
213
+ # The platform for the tags
214
+ module Platform
215
+ extend PostForMe::Internal::Type::Enum
216
+
217
+ TaggedSymbol =
218
+ T.type_alias do
219
+ T.all(
220
+ Symbol,
221
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform
222
+ )
223
+ end
224
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
225
+
226
+ FACEBOOK =
227
+ T.let(
228
+ :facebook,
229
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::TaggedSymbol
230
+ )
231
+ INSTAGRAM =
232
+ T.let(
233
+ :instagram,
234
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::TaggedSymbol
235
+ )
236
+
237
+ sig do
238
+ override.returns(
239
+ T::Array[
240
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Platform::TaggedSymbol
241
+ ]
242
+ )
243
+ end
244
+ def self.values
245
+ end
246
+ end
247
+
248
+ # The type of tag, user to tag accounts, product to tag products (only supported
249
+ # for instagram)
250
+ module Type
251
+ extend PostForMe::Internal::Type::Enum
252
+
253
+ TaggedSymbol =
254
+ T.type_alias do
255
+ T.all(
256
+ Symbol,
257
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type
258
+ )
259
+ end
260
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
261
+
262
+ USER =
263
+ T.let(
264
+ :user,
265
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::TaggedSymbol
266
+ )
267
+ PRODUCT =
268
+ T.let(
269
+ :product,
270
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::TaggedSymbol
271
+ )
272
+
273
+ sig do
274
+ override.returns(
275
+ T::Array[
276
+ PostForMe::LinkedinConfigurationDto::Media::Tag::Type::TaggedSymbol
277
+ ]
278
+ )
279
+ end
280
+ def self.values
281
+ end
282
+ end
283
+ end
102
284
  end
103
285
  end
104
286
  end
@@ -81,6 +81,16 @@ module PostForMe
81
81
  sig { returns(String) }
82
82
  attr_accessor :url
83
83
 
84
+ # List of tags to attach to the media
85
+ sig do
86
+ returns(
87
+ T.nilable(
88
+ T::Array[PostForMe::PinterestConfigurationDto::Media::Tag]
89
+ )
90
+ )
91
+ end
92
+ attr_accessor :tags
93
+
84
94
  # Timestamp in milliseconds of frame to use as thumbnail for the media
85
95
  sig { returns(T.nilable(T.anything)) }
86
96
  attr_accessor :thumbnail_timestamp_ms
@@ -92,6 +102,12 @@ module PostForMe
92
102
  sig do
93
103
  params(
94
104
  url: String,
105
+ tags:
106
+ T.nilable(
107
+ T::Array[
108
+ PostForMe::PinterestConfigurationDto::Media::Tag::OrHash
109
+ ]
110
+ ),
95
111
  thumbnail_timestamp_ms: T.nilable(T.anything),
96
112
  thumbnail_url: T.nilable(T.anything)
97
113
  ).returns(T.attached_class)
@@ -99,6 +115,8 @@ module PostForMe
99
115
  def self.new(
100
116
  # Public URL of the media
101
117
  url:,
118
+ # List of tags to attach to the media
119
+ tags: nil,
102
120
  # Timestamp in milliseconds of frame to use as thumbnail for the media
103
121
  thumbnail_timestamp_ms: nil,
104
122
  # Public URL of the thumbnail for the media
@@ -110,6 +128,10 @@ module PostForMe
110
128
  override.returns(
111
129
  {
112
130
  url: String,
131
+ tags:
132
+ T.nilable(
133
+ T::Array[PostForMe::PinterestConfigurationDto::Media::Tag]
134
+ ),
113
135
  thumbnail_timestamp_ms: T.nilable(T.anything),
114
136
  thumbnail_url: T.nilable(T.anything)
115
137
  }
@@ -117,6 +139,168 @@ module PostForMe
117
139
  end
118
140
  def to_hash
119
141
  end
142
+
143
+ class Tag < PostForMe::Internal::Type::BaseModel
144
+ OrHash =
145
+ T.type_alias do
146
+ T.any(
147
+ PostForMe::PinterestConfigurationDto::Media::Tag,
148
+ PostForMe::Internal::AnyHash
149
+ )
150
+ end
151
+
152
+ # Facebook User ID, Instagram Username or Instagram product id to tag
153
+ sig { returns(String) }
154
+ attr_accessor :id
155
+
156
+ # The platform for the tags
157
+ sig do
158
+ returns(
159
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::OrSymbol
160
+ )
161
+ end
162
+ attr_accessor :platform
163
+
164
+ # The type of tag, user to tag accounts, product to tag products (only supported
165
+ # for instagram)
166
+ sig do
167
+ returns(
168
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::OrSymbol
169
+ )
170
+ end
171
+ attr_accessor :type
172
+
173
+ # Percentage distance from left edge of the image, Not required for videos or
174
+ # stories
175
+ sig { returns(T.nilable(Float)) }
176
+ attr_reader :x
177
+
178
+ sig { params(x: Float).void }
179
+ attr_writer :x
180
+
181
+ # Percentage distance from top edge of the image, Not required for videos or
182
+ # stories
183
+ sig { returns(T.nilable(Float)) }
184
+ attr_reader :y_
185
+
186
+ sig { params(y_: Float).void }
187
+ attr_writer :y_
188
+
189
+ sig do
190
+ params(
191
+ id: String,
192
+ platform:
193
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::OrSymbol,
194
+ type:
195
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::OrSymbol,
196
+ x: Float,
197
+ y_: Float
198
+ ).returns(T.attached_class)
199
+ end
200
+ def self.new(
201
+ # Facebook User ID, Instagram Username or Instagram product id to tag
202
+ id:,
203
+ # The platform for the tags
204
+ platform:,
205
+ # The type of tag, user to tag accounts, product to tag products (only supported
206
+ # for instagram)
207
+ type:,
208
+ # Percentage distance from left edge of the image, Not required for videos or
209
+ # stories
210
+ x: nil,
211
+ # Percentage distance from top edge of the image, Not required for videos or
212
+ # stories
213
+ y_: nil
214
+ )
215
+ end
216
+
217
+ sig do
218
+ override.returns(
219
+ {
220
+ id: String,
221
+ platform:
222
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::OrSymbol,
223
+ type:
224
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::OrSymbol,
225
+ x: Float,
226
+ y_: Float
227
+ }
228
+ )
229
+ end
230
+ def to_hash
231
+ end
232
+
233
+ # The platform for the tags
234
+ module Platform
235
+ extend PostForMe::Internal::Type::Enum
236
+
237
+ TaggedSymbol =
238
+ T.type_alias do
239
+ T.all(
240
+ Symbol,
241
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform
242
+ )
243
+ end
244
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
245
+
246
+ FACEBOOK =
247
+ T.let(
248
+ :facebook,
249
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::TaggedSymbol
250
+ )
251
+ INSTAGRAM =
252
+ T.let(
253
+ :instagram,
254
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::TaggedSymbol
255
+ )
256
+
257
+ sig do
258
+ override.returns(
259
+ T::Array[
260
+ PostForMe::PinterestConfigurationDto::Media::Tag::Platform::TaggedSymbol
261
+ ]
262
+ )
263
+ end
264
+ def self.values
265
+ end
266
+ end
267
+
268
+ # The type of tag, user to tag accounts, product to tag products (only supported
269
+ # for instagram)
270
+ module Type
271
+ extend PostForMe::Internal::Type::Enum
272
+
273
+ TaggedSymbol =
274
+ T.type_alias do
275
+ T.all(
276
+ Symbol,
277
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type
278
+ )
279
+ end
280
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
281
+
282
+ USER =
283
+ T.let(
284
+ :user,
285
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::TaggedSymbol
286
+ )
287
+ PRODUCT =
288
+ T.let(
289
+ :product,
290
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::TaggedSymbol
291
+ )
292
+
293
+ sig do
294
+ override.returns(
295
+ T::Array[
296
+ PostForMe::PinterestConfigurationDto::Media::Tag::Type::TaggedSymbol
297
+ ]
298
+ )
299
+ end
300
+ def self.values
301
+ end
302
+ end
303
+ end
120
304
  end
121
305
  end
122
306
  end
@@ -102,6 +102,24 @@ module PostForMe
102
102
  end
103
103
  attr_writer :bluesky
104
104
 
105
+ # Additional data for connecting instagram accounts
106
+ sig do
107
+ returns(
108
+ T.nilable(
109
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram
110
+ )
111
+ )
112
+ end
113
+ attr_reader :instagram
114
+
115
+ sig do
116
+ params(
117
+ instagram:
118
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::OrHash
119
+ ).void
120
+ end
121
+ attr_writer :instagram
122
+
105
123
  # Additional data for connecting linkedin accounts
106
124
  sig do
107
125
  returns(
@@ -125,6 +143,8 @@ module PostForMe
125
143
  params(
126
144
  bluesky:
127
145
  PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky::OrHash,
146
+ instagram:
147
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::OrHash,
128
148
  linkedin:
129
149
  PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::OrHash
130
150
  ).returns(T.attached_class)
@@ -132,6 +152,8 @@ module PostForMe
132
152
  def self.new(
133
153
  # Additional data needed for connecting bluesky accounts
134
154
  bluesky: nil,
155
+ # Additional data for connecting instagram accounts
156
+ instagram: nil,
135
157
  # Additional data for connecting linkedin accounts
136
158
  linkedin: nil
137
159
  )
@@ -142,6 +164,8 @@ module PostForMe
142
164
  {
143
165
  bluesky:
144
166
  PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky,
167
+ instagram:
168
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram,
145
169
  linkedin:
146
170
  PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin
147
171
  }
@@ -186,6 +210,86 @@ module PostForMe
186
210
  end
187
211
  end
188
212
 
213
+ class Instagram < PostForMe::Internal::Type::BaseModel
214
+ OrHash =
215
+ T.type_alias do
216
+ T.any(
217
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram,
218
+ PostForMe::Internal::AnyHash
219
+ )
220
+ end
221
+
222
+ # The type of connection; instagram for using login with instagram, facebook for
223
+ # using login with facebook.
224
+ sig do
225
+ returns(
226
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::OrSymbol
227
+ )
228
+ end
229
+ attr_accessor :connection_type
230
+
231
+ # Additional data for connecting instagram accounts
232
+ sig do
233
+ params(
234
+ connection_type:
235
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::OrSymbol
236
+ ).returns(T.attached_class)
237
+ end
238
+ def self.new(
239
+ # The type of connection; instagram for using login with instagram, facebook for
240
+ # using login with facebook.
241
+ connection_type:
242
+ )
243
+ end
244
+
245
+ sig do
246
+ override.returns(
247
+ {
248
+ connection_type:
249
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::OrSymbol
250
+ }
251
+ )
252
+ end
253
+ def to_hash
254
+ end
255
+
256
+ # The type of connection; instagram for using login with instagram, facebook for
257
+ # using login with facebook.
258
+ module ConnectionType
259
+ extend PostForMe::Internal::Type::Enum
260
+
261
+ TaggedSymbol =
262
+ T.type_alias do
263
+ T.all(
264
+ Symbol,
265
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType
266
+ )
267
+ end
268
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
269
+
270
+ INSTAGRAM =
271
+ T.let(
272
+ :instagram,
273
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::TaggedSymbol
274
+ )
275
+ FACEBOOK =
276
+ T.let(
277
+ :facebook,
278
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::TaggedSymbol
279
+ )
280
+
281
+ sig do
282
+ override.returns(
283
+ T::Array[
284
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType::TaggedSymbol
285
+ ]
286
+ )
287
+ end
288
+ def self.values
289
+ end
290
+ end
291
+ end
292
+
189
293
  class Linkedin < PostForMe::Internal::Type::BaseModel
190
294
  OrHash =
191
295
  T.type_alias do