post-for-me 0.1.0.pre.alpha.3

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 (158) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +32 -0
  4. data/README.md +265 -0
  5. data/SECURITY.md +27 -0
  6. data/lib/post_for_me/client.rb +86 -0
  7. data/lib/post_for_me/errors.rb +214 -0
  8. data/lib/post_for_me/file_part.rb +55 -0
  9. data/lib/post_for_me/internal/transport/base_client.rb +563 -0
  10. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +209 -0
  11. data/lib/post_for_me/internal/type/array_of.rb +168 -0
  12. data/lib/post_for_me/internal/type/base_model.rb +537 -0
  13. data/lib/post_for_me/internal/type/base_page.rb +55 -0
  14. data/lib/post_for_me/internal/type/boolean.rb +77 -0
  15. data/lib/post_for_me/internal/type/converter.rb +327 -0
  16. data/lib/post_for_me/internal/type/enum.rb +131 -0
  17. data/lib/post_for_me/internal/type/file_input.rb +108 -0
  18. data/lib/post_for_me/internal/type/hash_of.rb +188 -0
  19. data/lib/post_for_me/internal/type/request_parameters.rb +42 -0
  20. data/lib/post_for_me/internal/type/union.rb +237 -0
  21. data/lib/post_for_me/internal/type/unknown.rb +81 -0
  22. data/lib/post_for_me/internal/util.rb +914 -0
  23. data/lib/post_for_me/internal.rb +20 -0
  24. data/lib/post_for_me/models/create_social_post.rb +558 -0
  25. data/lib/post_for_me/models/media_create_upload_url_params.rb +14 -0
  26. data/lib/post_for_me/models/media_create_upload_url_response.rb +25 -0
  27. data/lib/post_for_me/models/social_account.rb +110 -0
  28. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +109 -0
  29. data/lib/post_for_me/models/social_account_create_auth_url_response.rb +25 -0
  30. data/lib/post_for_me/models/social_account_disconnect_params.rb +14 -0
  31. data/lib/post_for_me/models/social_account_disconnect_response.rb +109 -0
  32. data/lib/post_for_me/models/social_account_list_params.rb +69 -0
  33. data/lib/post_for_me/models/social_account_list_response.rb +58 -0
  34. data/lib/post_for_me/models/social_account_retrieve_params.rb +14 -0
  35. data/lib/post_for_me/models/social_account_update_params.rb +30 -0
  36. data/lib/post_for_me/models/social_post.rb +114 -0
  37. data/lib/post_for_me/models/social_post_create_params.rb +14 -0
  38. data/lib/post_for_me/models/social_post_delete_params.rb +14 -0
  39. data/lib/post_for_me/models/social_post_delete_response.rb +17 -0
  40. data/lib/post_for_me/models/social_post_list_params.rb +87 -0
  41. data/lib/post_for_me/models/social_post_list_response.rb +58 -0
  42. data/lib/post_for_me/models/social_post_result.rb +87 -0
  43. data/lib/post_for_me/models/social_post_result_list_params.rb +51 -0
  44. data/lib/post_for_me/models/social_post_result_list_response.rb +58 -0
  45. data/lib/post_for_me/models/social_post_result_retrieve_params.rb +14 -0
  46. data/lib/post_for_me/models/social_post_retrieve_params.rb +14 -0
  47. data/lib/post_for_me/models/social_post_update_params.rb +14 -0
  48. data/lib/post_for_me/models/tiktok_configuration.rb +88 -0
  49. data/lib/post_for_me/models.rb +77 -0
  50. data/lib/post_for_me/request_options.rb +77 -0
  51. data/lib/post_for_me/resources/media.rb +94 -0
  52. data/lib/post_for_me/resources/social_accounts.rb +143 -0
  53. data/lib/post_for_me/resources/social_post_results.rb +65 -0
  54. data/lib/post_for_me/resources/social_posts.rb +164 -0
  55. data/lib/post_for_me/version.rb +5 -0
  56. data/lib/post_for_me.rb +82 -0
  57. data/manifest.yaml +15 -0
  58. data/rbi/post_for_me/client.rbi +58 -0
  59. data/rbi/post_for_me/errors.rbi +178 -0
  60. data/rbi/post_for_me/file_part.rbi +37 -0
  61. data/rbi/post_for_me/internal/transport/base_client.rbi +294 -0
  62. data/rbi/post_for_me/internal/transport/pooled_net_requester.rbi +79 -0
  63. data/rbi/post_for_me/internal/type/array_of.rbi +104 -0
  64. data/rbi/post_for_me/internal/type/base_model.rbi +304 -0
  65. data/rbi/post_for_me/internal/type/base_page.rbi +42 -0
  66. data/rbi/post_for_me/internal/type/boolean.rbi +58 -0
  67. data/rbi/post_for_me/internal/type/converter.rbi +216 -0
  68. data/rbi/post_for_me/internal/type/enum.rbi +82 -0
  69. data/rbi/post_for_me/internal/type/file_input.rbi +59 -0
  70. data/rbi/post_for_me/internal/type/hash_of.rbi +104 -0
  71. data/rbi/post_for_me/internal/type/request_parameters.rbi +29 -0
  72. data/rbi/post_for_me/internal/type/union.rbi +128 -0
  73. data/rbi/post_for_me/internal/type/unknown.rbi +58 -0
  74. data/rbi/post_for_me/internal/util.rbi +487 -0
  75. data/rbi/post_for_me/internal.rbi +18 -0
  76. data/rbi/post_for_me/models/create_social_post.rbi +1128 -0
  77. data/rbi/post_for_me/models/media_create_upload_url_params.rbi +30 -0
  78. data/rbi/post_for_me/models/media_create_upload_url_response.rbi +38 -0
  79. data/rbi/post_for_me/models/social_account.rbi +139 -0
  80. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +260 -0
  81. data/rbi/post_for_me/models/social_account_create_auth_url_response.rbi +36 -0
  82. data/rbi/post_for_me/models/social_account_disconnect_params.rbi +30 -0
  83. data/rbi/post_for_me/models/social_account_disconnect_response.rbi +156 -0
  84. data/rbi/post_for_me/models/social_account_list_params.rbi +112 -0
  85. data/rbi/post_for_me/models/social_account_list_response.rbi +107 -0
  86. data/rbi/post_for_me/models/social_account_retrieve_params.rbi +30 -0
  87. data/rbi/post_for_me/models/social_account_update_params.rbi +60 -0
  88. data/rbi/post_for_me/models/social_post.rbi +142 -0
  89. data/rbi/post_for_me/models/social_post_create_params.rbi +27 -0
  90. data/rbi/post_for_me/models/social_post_delete_params.rbi +27 -0
  91. data/rbi/post_for_me/models/social_post_delete_response.rbi +30 -0
  92. data/rbi/post_for_me/models/social_post_list_params.rbi +207 -0
  93. data/rbi/post_for_me/models/social_post_list_response.rbi +107 -0
  94. data/rbi/post_for_me/models/social_post_result.rbi +130 -0
  95. data/rbi/post_for_me/models/social_post_result_list_params.rbi +86 -0
  96. data/rbi/post_for_me/models/social_post_result_list_response.rbi +107 -0
  97. data/rbi/post_for_me/models/social_post_result_retrieve_params.rbi +30 -0
  98. data/rbi/post_for_me/models/social_post_retrieve_params.rbi +30 -0
  99. data/rbi/post_for_me/models/social_post_update_params.rbi +27 -0
  100. data/rbi/post_for_me/models/tiktok_configuration.rbi +109 -0
  101. data/rbi/post_for_me/models.rbi +42 -0
  102. data/rbi/post_for_me/request_options.rbi +59 -0
  103. data/rbi/post_for_me/resources/media.rbi +83 -0
  104. data/rbi/post_for_me/resources/social_accounts.rbi +112 -0
  105. data/rbi/post_for_me/resources/social_post_results.rbi +51 -0
  106. data/rbi/post_for_me/resources/social_posts.rbi +160 -0
  107. data/rbi/post_for_me/version.rbi +5 -0
  108. data/sig/post_for_me/client.rbs +32 -0
  109. data/sig/post_for_me/errors.rbs +110 -0
  110. data/sig/post_for_me/file_part.rbs +21 -0
  111. data/sig/post_for_me/internal/transport/base_client.rbs +131 -0
  112. data/sig/post_for_me/internal/transport/pooled_net_requester.rbs +45 -0
  113. data/sig/post_for_me/internal/type/array_of.rbs +48 -0
  114. data/sig/post_for_me/internal/type/base_model.rbs +102 -0
  115. data/sig/post_for_me/internal/type/base_page.rbs +24 -0
  116. data/sig/post_for_me/internal/type/boolean.rbs +26 -0
  117. data/sig/post_for_me/internal/type/converter.rbs +79 -0
  118. data/sig/post_for_me/internal/type/enum.rbs +32 -0
  119. data/sig/post_for_me/internal/type/file_input.rbs +25 -0
  120. data/sig/post_for_me/internal/type/hash_of.rbs +48 -0
  121. data/sig/post_for_me/internal/type/request_parameters.rbs +19 -0
  122. data/sig/post_for_me/internal/type/union.rbs +52 -0
  123. data/sig/post_for_me/internal/type/unknown.rbs +26 -0
  124. data/sig/post_for_me/internal/util.rbs +185 -0
  125. data/sig/post_for_me/internal.rbs +9 -0
  126. data/sig/post_for_me/models/create_social_post.rbs +398 -0
  127. data/sig/post_for_me/models/media_create_upload_url_params.rbs +15 -0
  128. data/sig/post_for_me/models/media_create_upload_url_response.rbs +16 -0
  129. data/sig/post_for_me/models/social_account.rbs +81 -0
  130. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +105 -0
  131. data/sig/post_for_me/models/social_account_create_auth_url_response.rbs +16 -0
  132. data/sig/post_for_me/models/social_account_disconnect_params.rbs +15 -0
  133. data/sig/post_for_me/models/social_account_disconnect_response.rbs +80 -0
  134. data/sig/post_for_me/models/social_account_list_params.rbs +63 -0
  135. data/sig/post_for_me/models/social_account_list_response.rbs +51 -0
  136. data/sig/post_for_me/models/social_account_retrieve_params.rbs +15 -0
  137. data/sig/post_for_me/models/social_account_update_params.rbs +32 -0
  138. data/sig/post_for_me/models/social_post.rbs +83 -0
  139. data/sig/post_for_me/models/social_post_create_params.rbs +15 -0
  140. data/sig/post_for_me/models/social_post_delete_params.rbs +15 -0
  141. data/sig/post_for_me/models/social_post_delete_response.rbs +13 -0
  142. data/sig/post_for_me/models/social_post_list_params.rbs +100 -0
  143. data/sig/post_for_me/models/social_post_list_response.rbs +51 -0
  144. data/sig/post_for_me/models/social_post_result.rbs +66 -0
  145. data/sig/post_for_me/models/social_post_result_list_params.rbs +49 -0
  146. data/sig/post_for_me/models/social_post_result_list_response.rbs +51 -0
  147. data/sig/post_for_me/models/social_post_result_retrieve_params.rbs +15 -0
  148. data/sig/post_for_me/models/social_post_retrieve_params.rbs +15 -0
  149. data/sig/post_for_me/models/social_post_update_params.rbs +15 -0
  150. data/sig/post_for_me/models/tiktok_configuration.rbs +65 -0
  151. data/sig/post_for_me/models.rbs +37 -0
  152. data/sig/post_for_me/request_options.rbs +34 -0
  153. data/sig/post_for_me/resources/media.rbs +11 -0
  154. data/sig/post_for_me/resources/social_accounts.rbs +40 -0
  155. data/sig/post_for_me/resources/social_post_results.rbs +20 -0
  156. data/sig/post_for_me/resources/social_posts.rbs +51 -0
  157. data/sig/post_for_me/version.rbs +3 -0
  158. metadata +215 -0
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class MediaCreateUploadURLParams < 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::MediaCreateUploadURLParams,
13
+ PostForMe::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ params(request_options: PostForMe::RequestOptions::OrHash).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(request_options: {})
23
+ end
24
+
25
+ sig { override.returns({ request_options: PostForMe::RequestOptions }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class MediaCreateUploadURLResponse < PostForMe::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ PostForMe::Models::MediaCreateUploadURLResponse,
10
+ PostForMe::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The public URL for the media, to use once file has been uploaded
15
+ sig { returns(String) }
16
+ attr_accessor :media_url
17
+
18
+ # The signed upload URL for the client to upload the file
19
+ sig { returns(String) }
20
+ attr_accessor :upload_url
21
+
22
+ sig do
23
+ params(media_url: String, upload_url: String).returns(T.attached_class)
24
+ end
25
+ def self.new(
26
+ # The public URL for the media, to use once file has been uploaded
27
+ media_url:,
28
+ # The signed upload URL for the client to upload the file
29
+ upload_url:
30
+ )
31
+ end
32
+
33
+ sig { override.returns({ media_url: String, upload_url: String }) }
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,139 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class SocialAccount < PostForMe::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(PostForMe::SocialAccount, PostForMe::Internal::AnyHash)
9
+ end
10
+
11
+ # The unique identifier of the social account
12
+ sig { returns(String) }
13
+ attr_accessor :id
14
+
15
+ # The access token of the social account
16
+ sig { returns(String) }
17
+ attr_accessor :access_token
18
+
19
+ # The access token expiration date of the social account
20
+ sig { returns(Time) }
21
+ attr_accessor :access_token_expires_at
22
+
23
+ # The external id of the social account
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :external_id
26
+
27
+ # The metadata of the social account
28
+ sig { returns(T.nilable(T.anything)) }
29
+ attr_accessor :metadata
30
+
31
+ # The platform of the social account
32
+ sig { returns(String) }
33
+ attr_accessor :platform
34
+
35
+ # The refresh token of the social account
36
+ sig { returns(T.nilable(String)) }
37
+ attr_accessor :refresh_token
38
+
39
+ # The refresh token expiration date of the social account
40
+ sig { returns(T.nilable(Time)) }
41
+ attr_accessor :refresh_token_expires_at
42
+
43
+ # Status of the account
44
+ sig { returns(PostForMe::SocialAccount::Status::TaggedSymbol) }
45
+ attr_accessor :status
46
+
47
+ # The platform's id of the social account
48
+ sig { returns(String) }
49
+ attr_accessor :user_id
50
+
51
+ # The platform's username of the social account
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :username
54
+
55
+ sig do
56
+ params(
57
+ id: String,
58
+ access_token: String,
59
+ access_token_expires_at: Time,
60
+ external_id: T.nilable(String),
61
+ metadata: T.nilable(T.anything),
62
+ platform: String,
63
+ refresh_token: T.nilable(String),
64
+ refresh_token_expires_at: T.nilable(Time),
65
+ status: PostForMe::SocialAccount::Status::OrSymbol,
66
+ user_id: String,
67
+ username: T.nilable(String)
68
+ ).returns(T.attached_class)
69
+ end
70
+ def self.new(
71
+ # The unique identifier of the social account
72
+ id:,
73
+ # The access token of the social account
74
+ access_token:,
75
+ # The access token expiration date of the social account
76
+ access_token_expires_at:,
77
+ # The external id of the social account
78
+ external_id:,
79
+ # The metadata of the social account
80
+ metadata:,
81
+ # The platform of the social account
82
+ platform:,
83
+ # The refresh token of the social account
84
+ refresh_token:,
85
+ # The refresh token expiration date of the social account
86
+ refresh_token_expires_at:,
87
+ # Status of the account
88
+ status:,
89
+ # The platform's id of the social account
90
+ user_id:,
91
+ # The platform's username of the social account
92
+ username:
93
+ )
94
+ end
95
+
96
+ sig do
97
+ override.returns(
98
+ {
99
+ id: String,
100
+ access_token: String,
101
+ access_token_expires_at: Time,
102
+ external_id: T.nilable(String),
103
+ metadata: T.nilable(T.anything),
104
+ platform: String,
105
+ refresh_token: T.nilable(String),
106
+ refresh_token_expires_at: T.nilable(Time),
107
+ status: PostForMe::SocialAccount::Status::TaggedSymbol,
108
+ user_id: String,
109
+ username: T.nilable(String)
110
+ }
111
+ )
112
+ end
113
+ def to_hash
114
+ end
115
+
116
+ # Status of the account
117
+ module Status
118
+ extend PostForMe::Internal::Type::Enum
119
+
120
+ TaggedSymbol =
121
+ T.type_alias { T.all(Symbol, PostForMe::SocialAccount::Status) }
122
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
123
+
124
+ CONNECTED =
125
+ T.let(:connected, PostForMe::SocialAccount::Status::TaggedSymbol)
126
+ DISCONNECTED =
127
+ T.let(:disconnected, PostForMe::SocialAccount::Status::TaggedSymbol)
128
+
129
+ sig do
130
+ override.returns(
131
+ T::Array[PostForMe::SocialAccount::Status::TaggedSymbol]
132
+ )
133
+ end
134
+ def self.values
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
@@ -0,0 +1,260 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class SocialAccountCreateAuthURLParams < 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::SocialAccountCreateAuthURLParams,
13
+ PostForMe::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The social account provider
18
+ sig { returns(String) }
19
+ attr_accessor :platform
20
+
21
+ # Additional data needed for the provider
22
+ sig do
23
+ returns(
24
+ T.nilable(PostForMe::SocialAccountCreateAuthURLParams::PlatformData)
25
+ )
26
+ end
27
+ attr_reader :platform_data
28
+
29
+ sig do
30
+ params(
31
+ platform_data:
32
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::OrHash
33
+ ).void
34
+ end
35
+ attr_writer :platform_data
36
+
37
+ sig do
38
+ params(
39
+ platform: String,
40
+ platform_data:
41
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::OrHash,
42
+ request_options: PostForMe::RequestOptions::OrHash
43
+ ).returns(T.attached_class)
44
+ end
45
+ def self.new(
46
+ # The social account provider
47
+ platform:,
48
+ # Additional data needed for the provider
49
+ platform_data: nil,
50
+ request_options: {}
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ platform: String,
58
+ platform_data:
59
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData,
60
+ request_options: PostForMe::RequestOptions
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+
67
+ class PlatformData < PostForMe::Internal::Type::BaseModel
68
+ OrHash =
69
+ T.type_alias do
70
+ T.any(
71
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData,
72
+ PostForMe::Internal::AnyHash
73
+ )
74
+ end
75
+
76
+ # Additional data needed for connecting bluesky accounts
77
+ sig do
78
+ returns(
79
+ T.nilable(
80
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky
81
+ )
82
+ )
83
+ end
84
+ attr_reader :bluesky
85
+
86
+ sig do
87
+ params(
88
+ bluesky:
89
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky::OrHash
90
+ ).void
91
+ end
92
+ attr_writer :bluesky
93
+
94
+ # Additional data for connecting linkedin accounts
95
+ sig do
96
+ returns(
97
+ T.nilable(
98
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin
99
+ )
100
+ )
101
+ end
102
+ attr_reader :linkedin
103
+
104
+ sig do
105
+ params(
106
+ linkedin:
107
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::OrHash
108
+ ).void
109
+ end
110
+ attr_writer :linkedin
111
+
112
+ # Additional data needed for the provider
113
+ sig do
114
+ params(
115
+ bluesky:
116
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky::OrHash,
117
+ linkedin:
118
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::OrHash
119
+ ).returns(T.attached_class)
120
+ end
121
+ def self.new(
122
+ # Additional data needed for connecting bluesky accounts
123
+ bluesky: nil,
124
+ # Additional data for connecting linkedin accounts
125
+ linkedin: nil
126
+ )
127
+ end
128
+
129
+ sig do
130
+ override.returns(
131
+ {
132
+ bluesky:
133
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky,
134
+ linkedin:
135
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin
136
+ }
137
+ )
138
+ end
139
+ def to_hash
140
+ end
141
+
142
+ class Bluesky < PostForMe::Internal::Type::BaseModel
143
+ OrHash =
144
+ T.type_alias do
145
+ T.any(
146
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky,
147
+ PostForMe::Internal::AnyHash
148
+ )
149
+ end
150
+
151
+ # The app password of the account
152
+ sig { returns(String) }
153
+ attr_accessor :app_password
154
+
155
+ # The handle of the account
156
+ sig { returns(String) }
157
+ attr_accessor :handle
158
+
159
+ # Additional data needed for connecting bluesky accounts
160
+ sig do
161
+ params(app_password: String, handle: String).returns(
162
+ T.attached_class
163
+ )
164
+ end
165
+ def self.new(
166
+ # The app password of the account
167
+ app_password:,
168
+ # The handle of the account
169
+ handle:
170
+ )
171
+ end
172
+
173
+ sig { override.returns({ app_password: String, handle: String }) }
174
+ def to_hash
175
+ end
176
+ end
177
+
178
+ class Linkedin < PostForMe::Internal::Type::BaseModel
179
+ OrHash =
180
+ T.type_alias do
181
+ T.any(
182
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin,
183
+ PostForMe::Internal::AnyHash
184
+ )
185
+ end
186
+
187
+ # The type of connection; personal for posting on behalf of the user only,
188
+ # organization for posting on behalf of both an organization and the user
189
+ sig do
190
+ returns(
191
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::OrSymbol
192
+ )
193
+ end
194
+ attr_accessor :connection_type
195
+
196
+ # Additional data for connecting linkedin accounts
197
+ sig do
198
+ params(
199
+ connection_type:
200
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::OrSymbol
201
+ ).returns(T.attached_class)
202
+ end
203
+ def self.new(
204
+ # The type of connection; personal for posting on behalf of the user only,
205
+ # organization for posting on behalf of both an organization and the user
206
+ connection_type:
207
+ )
208
+ end
209
+
210
+ sig do
211
+ override.returns(
212
+ {
213
+ connection_type:
214
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::OrSymbol
215
+ }
216
+ )
217
+ end
218
+ def to_hash
219
+ end
220
+
221
+ # The type of connection; personal for posting on behalf of the user only,
222
+ # organization for posting on behalf of both an organization and the user
223
+ module ConnectionType
224
+ extend PostForMe::Internal::Type::Enum
225
+
226
+ TaggedSymbol =
227
+ T.type_alias do
228
+ T.all(
229
+ Symbol,
230
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType
231
+ )
232
+ end
233
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
234
+
235
+ PERSONAL =
236
+ T.let(
237
+ :personal,
238
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::TaggedSymbol
239
+ )
240
+ ORGANIZATION =
241
+ T.let(
242
+ :organization,
243
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::TaggedSymbol
244
+ )
245
+
246
+ sig do
247
+ override.returns(
248
+ T::Array[
249
+ PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType::TaggedSymbol
250
+ ]
251
+ )
252
+ end
253
+ def self.values
254
+ end
255
+ end
256
+ end
257
+ end
258
+ end
259
+ end
260
+ end
@@ -0,0 +1,36 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class SocialAccountCreateAuthURLResponse < PostForMe::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ PostForMe::Models::SocialAccountCreateAuthURLResponse,
10
+ PostForMe::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The social account provider
15
+ sig { returns(String) }
16
+ attr_accessor :platform
17
+
18
+ # The url to redirect the user to, in order to connect their account
19
+ sig { returns(String) }
20
+ attr_accessor :url
21
+
22
+ sig { params(platform: String, url: String).returns(T.attached_class) }
23
+ def self.new(
24
+ # The social account provider
25
+ platform:,
26
+ # The url to redirect the user to, in order to connect their account
27
+ url:
28
+ )
29
+ end
30
+
31
+ sig { override.returns({ platform: String, url: String }) }
32
+ def to_hash
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class SocialAccountDisconnectParams < 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::SocialAccountDisconnectParams,
13
+ PostForMe::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ params(request_options: PostForMe::RequestOptions::OrHash).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(request_options: {})
23
+ end
24
+
25
+ sig { override.returns({ request_options: PostForMe::RequestOptions }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,156 @@
1
+ # typed: strong
2
+
3
+ module PostForMe
4
+ module Models
5
+ class SocialAccountDisconnectResponse < PostForMe::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ PostForMe::Models::SocialAccountDisconnectResponse,
10
+ PostForMe::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The unique identifier of the social account
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # The access token of the social account
19
+ sig { returns(String) }
20
+ attr_accessor :access_token
21
+
22
+ # The access token expiration date of the social account
23
+ sig { returns(Time) }
24
+ attr_accessor :access_token_expires_at
25
+
26
+ # The external id of the social account
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :external_id
29
+
30
+ # The metadata of the social account
31
+ sig { returns(T.nilable(T.anything)) }
32
+ attr_accessor :metadata
33
+
34
+ # The platform of the social account
35
+ sig { returns(String) }
36
+ attr_accessor :platform
37
+
38
+ # The refresh token of the social account
39
+ sig { returns(T.nilable(String)) }
40
+ attr_accessor :refresh_token
41
+
42
+ # The refresh token expiration date of the social account
43
+ sig { returns(T.nilable(Time)) }
44
+ attr_accessor :refresh_token_expires_at
45
+
46
+ # Status of the account
47
+ sig do
48
+ returns(
49
+ PostForMe::Models::SocialAccountDisconnectResponse::Status::TaggedSymbol
50
+ )
51
+ end
52
+ attr_accessor :status
53
+
54
+ # The platform's id of the social account
55
+ sig { returns(String) }
56
+ attr_accessor :user_id
57
+
58
+ # The platform's username of the social account
59
+ sig { returns(T.nilable(String)) }
60
+ attr_accessor :username
61
+
62
+ sig do
63
+ params(
64
+ id: String,
65
+ access_token: String,
66
+ access_token_expires_at: Time,
67
+ external_id: T.nilable(String),
68
+ metadata: T.nilable(T.anything),
69
+ platform: String,
70
+ refresh_token: T.nilable(String),
71
+ refresh_token_expires_at: T.nilable(Time),
72
+ status:
73
+ PostForMe::Models::SocialAccountDisconnectResponse::Status::OrSymbol,
74
+ user_id: String,
75
+ username: T.nilable(String)
76
+ ).returns(T.attached_class)
77
+ end
78
+ def self.new(
79
+ # The unique identifier of the social account
80
+ id:,
81
+ # The access token of the social account
82
+ access_token:,
83
+ # The access token expiration date of the social account
84
+ access_token_expires_at:,
85
+ # The external id of the social account
86
+ external_id:,
87
+ # The metadata of the social account
88
+ metadata:,
89
+ # The platform of the social account
90
+ platform:,
91
+ # The refresh token of the social account
92
+ refresh_token:,
93
+ # The refresh token expiration date of the social account
94
+ refresh_token_expires_at:,
95
+ # Status of the account
96
+ status:,
97
+ # The platform's id of the social account
98
+ user_id:,
99
+ # The platform's username of the social account
100
+ username:
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ access_token: String,
109
+ access_token_expires_at: Time,
110
+ external_id: T.nilable(String),
111
+ metadata: T.nilable(T.anything),
112
+ platform: String,
113
+ refresh_token: T.nilable(String),
114
+ refresh_token_expires_at: T.nilable(Time),
115
+ status:
116
+ PostForMe::Models::SocialAccountDisconnectResponse::Status::TaggedSymbol,
117
+ user_id: String,
118
+ username: T.nilable(String)
119
+ }
120
+ )
121
+ end
122
+ def to_hash
123
+ end
124
+
125
+ # Status of the account
126
+ module Status
127
+ extend PostForMe::Internal::Type::Enum
128
+
129
+ TaggedSymbol =
130
+ T.type_alias do
131
+ T.all(
132
+ Symbol,
133
+ PostForMe::Models::SocialAccountDisconnectResponse::Status
134
+ )
135
+ end
136
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
137
+
138
+ DISCONNECTED =
139
+ T.let(
140
+ :disconnected,
141
+ PostForMe::Models::SocialAccountDisconnectResponse::Status::TaggedSymbol
142
+ )
143
+
144
+ sig do
145
+ override.returns(
146
+ T::Array[
147
+ PostForMe::Models::SocialAccountDisconnectResponse::Status::TaggedSymbol
148
+ ]
149
+ )
150
+ end
151
+ def self.values
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end