@relayapi/sdk 0.2.2
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.
- package/dist/api-promise.d.ts +2 -0
- package/dist/api-promise.js +18 -0
- package/dist/client.d.ts +225 -0
- package/dist/client.js +552 -0
- package/dist/core/api-promise.d.ts +45 -0
- package/dist/core/api-promise.js +83 -0
- package/dist/core/error.d.ts +45 -0
- package/dist/core/error.js +112 -0
- package/dist/core/resource.d.ts +5 -0
- package/dist/core/resource.js +10 -0
- package/dist/core/uploads.d.ts +2 -0
- package/dist/core/uploads.js +5 -0
- package/dist/error.d.ts +2 -0
- package/dist/error.js +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +26 -0
- package/dist/internal/builtin-types.d.ts +72 -0
- package/dist/internal/builtin-types.js +3 -0
- package/dist/internal/detect-platform.d.ts +14 -0
- package/dist/internal/detect-platform.js +161 -0
- package/dist/internal/errors.d.ts +2 -0
- package/dist/internal/errors.js +40 -0
- package/dist/internal/headers.d.ts +19 -0
- package/dist/internal/headers.js +78 -0
- package/dist/internal/parse.d.ts +11 -0
- package/dist/internal/parse.js +39 -0
- package/dist/internal/request-options.d.ts +74 -0
- package/dist/internal/request-options.js +13 -0
- package/dist/internal/shim-types.d.ts +16 -0
- package/dist/internal/shim-types.js +3 -0
- package/dist/internal/shims.d.ts +23 -0
- package/dist/internal/shims.js +90 -0
- package/dist/internal/to-file.d.ts +44 -0
- package/dist/internal/to-file.js +90 -0
- package/dist/internal/types.d.ts +68 -0
- package/dist/internal/types.js +3 -0
- package/dist/internal/uploads.d.ts +41 -0
- package/dist/internal/uploads.js +140 -0
- package/dist/internal/utils/base64.d.ts +2 -0
- package/dist/internal/utils/base64.js +37 -0
- package/dist/internal/utils/bytes.d.ts +3 -0
- package/dist/internal/utils/bytes.js +30 -0
- package/dist/internal/utils/env.d.ts +8 -0
- package/dist/internal/utils/env.js +21 -0
- package/dist/internal/utils/log.d.ts +36 -0
- package/dist/internal/utils/log.js +84 -0
- package/dist/internal/utils/path.d.ts +14 -0
- package/dist/internal/utils/path.js +78 -0
- package/dist/internal/utils/query.d.ts +4 -0
- package/dist/internal/utils/query.js +22 -0
- package/dist/internal/utils/sleep.d.ts +1 -0
- package/dist/internal/utils/sleep.js +6 -0
- package/dist/internal/utils/uuid.d.ts +4 -0
- package/dist/internal/utils/uuid.js +18 -0
- package/dist/internal/utils/values.d.ts +17 -0
- package/dist/internal/utils/values.js +111 -0
- package/dist/internal/utils.d.ts +7 -0
- package/dist/internal/utils.js +24 -0
- package/dist/resource.d.ts +2 -0
- package/dist/resource.js +18 -0
- package/dist/resources/account-groups.d.ts +52 -0
- package/dist/resources/account-groups.js +37 -0
- package/dist/resources/accounts/accounts.d.ts +148 -0
- package/dist/resources/accounts/accounts.js +101 -0
- package/dist/resources/accounts/facebook-pages.d.ts +48 -0
- package/dist/resources/accounts/facebook-pages.js +21 -0
- package/dist/resources/accounts/gmb-locations.d.ts +48 -0
- package/dist/resources/accounts/gmb-locations.js +21 -0
- package/dist/resources/accounts/health.d.ts +49 -0
- package/dist/resources/accounts/health.js +21 -0
- package/dist/resources/accounts/index.d.ts +8 -0
- package/dist/resources/accounts/index.js +20 -0
- package/dist/resources/accounts/linkedin-organizations.d.ts +52 -0
- package/dist/resources/accounts/linkedin-organizations.js +21 -0
- package/dist/resources/accounts/pinterest-boards.d.ts +48 -0
- package/dist/resources/accounts/pinterest-boards.js +21 -0
- package/dist/resources/accounts/reddit-flairs.d.ts +27 -0
- package/dist/resources/accounts/reddit-flairs.js +15 -0
- package/dist/resources/accounts/reddit-subreddits.d.ts +48 -0
- package/dist/resources/accounts/reddit-subreddits.js +21 -0
- package/dist/resources/accounts.d.ts +1 -0
- package/dist/resources/accounts.js +18 -0
- package/dist/resources/analytics/analytics.d.ts +369 -0
- package/dist/resources/analytics/analytics.js +84 -0
- package/dist/resources/analytics/index.d.ts +2 -0
- package/dist/resources/analytics/index.js +8 -0
- package/dist/resources/analytics/youtube.d.ts +49 -0
- package/dist/resources/analytics/youtube.js +14 -0
- package/dist/resources/analytics.d.ts +1 -0
- package/dist/resources/analytics.js +18 -0
- package/dist/resources/api-keys.d.ts +110 -0
- package/dist/resources/api-keys.js +32 -0
- package/dist/resources/connect/connect.d.ts +188 -0
- package/dist/resources/connect/connect.js +97 -0
- package/dist/resources/connect/facebook/facebook.d.ts +9 -0
- package/dist/resources/connect/facebook/facebook.js +48 -0
- package/dist/resources/connect/facebook/index.d.ts +2 -0
- package/dist/resources/connect/facebook/index.js +8 -0
- package/dist/resources/connect/facebook/pages.d.ts +70 -0
- package/dist/resources/connect/facebook/pages.js +20 -0
- package/dist/resources/connect/facebook.d.ts +1 -0
- package/dist/resources/connect/facebook.js +18 -0
- package/dist/resources/connect/googlebusiness/googlebusiness.d.ts +9 -0
- package/dist/resources/connect/googlebusiness/googlebusiness.js +48 -0
- package/dist/resources/connect/googlebusiness/index.d.ts +2 -0
- package/dist/resources/connect/googlebusiness/index.js +8 -0
- package/dist/resources/connect/googlebusiness/locations.d.ts +70 -0
- package/dist/resources/connect/googlebusiness/locations.js +20 -0
- package/dist/resources/connect/googlebusiness.d.ts +1 -0
- package/dist/resources/connect/googlebusiness.js +18 -0
- package/dist/resources/connect/index.d.ts +8 -0
- package/dist/resources/connect/index.js +20 -0
- package/dist/resources/connect/linkedin/index.d.ts +2 -0
- package/dist/resources/connect/linkedin/index.js +8 -0
- package/dist/resources/connect/linkedin/linkedin.d.ts +9 -0
- package/dist/resources/connect/linkedin/linkedin.js +48 -0
- package/dist/resources/connect/linkedin/organizations.d.ts +85 -0
- package/dist/resources/connect/linkedin/organizations.js +20 -0
- package/dist/resources/connect/linkedin.d.ts +1 -0
- package/dist/resources/connect/linkedin.js +18 -0
- package/dist/resources/connect/pinterest/boards.d.ts +70 -0
- package/dist/resources/connect/pinterest/boards.js +20 -0
- package/dist/resources/connect/pinterest/index.d.ts +2 -0
- package/dist/resources/connect/pinterest/index.js +8 -0
- package/dist/resources/connect/pinterest/pinterest.d.ts +9 -0
- package/dist/resources/connect/pinterest/pinterest.js +48 -0
- package/dist/resources/connect/pinterest.d.ts +1 -0
- package/dist/resources/connect/pinterest.js +18 -0
- package/dist/resources/connect/snapchat/index.d.ts +2 -0
- package/dist/resources/connect/snapchat/index.js +8 -0
- package/dist/resources/connect/snapchat/profiles.d.ts +74 -0
- package/dist/resources/connect/snapchat/profiles.js +20 -0
- package/dist/resources/connect/snapchat/snapchat.d.ts +9 -0
- package/dist/resources/connect/snapchat/snapchat.js +48 -0
- package/dist/resources/connect/snapchat.d.ts +1 -0
- package/dist/resources/connect/snapchat.js +18 -0
- package/dist/resources/connect/telegram.d.ts +122 -0
- package/dist/resources/connect/telegram.js +26 -0
- package/dist/resources/connect/whatsapp.d.ts +92 -0
- package/dist/resources/connect/whatsapp.js +26 -0
- package/dist/resources/connect.d.ts +1 -0
- package/dist/resources/connect.js +18 -0
- package/dist/resources/connections.d.ts +55 -0
- package/dist/resources/connections.js +14 -0
- package/dist/resources/inbox/comments/comments.d.ts +220 -0
- package/dist/resources/inbox/comments/comments.js +83 -0
- package/dist/resources/inbox/comments/hide.d.ts +36 -0
- package/dist/resources/inbox/comments/hide.js +21 -0
- package/dist/resources/inbox/comments/index.d.ts +3 -0
- package/dist/resources/inbox/comments/index.js +10 -0
- package/dist/resources/inbox/comments/like.d.ts +36 -0
- package/dist/resources/inbox/comments/like.js +21 -0
- package/dist/resources/inbox/comments.d.ts +1 -0
- package/dist/resources/inbox/comments.js +18 -0
- package/dist/resources/inbox/inbox.d.ts +17 -0
- package/dist/resources/inbox/inbox.js +56 -0
- package/dist/resources/inbox/index.d.ts +4 -0
- package/dist/resources/inbox/index.js +12 -0
- package/dist/resources/inbox/messages.d.ts +205 -0
- package/dist/resources/inbox/messages.js +40 -0
- package/dist/resources/inbox/reviews/index.d.ts +2 -0
- package/dist/resources/inbox/reviews/index.js +8 -0
- package/dist/resources/inbox/reviews/reply.d.ts +38 -0
- package/dist/resources/inbox/reviews/reply.js +21 -0
- package/dist/resources/inbox/reviews/reviews.d.ts +76 -0
- package/dist/resources/inbox/reviews/reviews.js +54 -0
- package/dist/resources/inbox/reviews.d.ts +1 -0
- package/dist/resources/inbox/reviews.js +18 -0
- package/dist/resources/inbox.d.ts +1 -0
- package/dist/resources/inbox.js +18 -0
- package/dist/resources/index.d.ts +16 -0
- package/dist/resources/index.js +36 -0
- package/dist/resources/media.d.ts +177 -0
- package/dist/resources/media.js +51 -0
- package/dist/resources/posts/index.d.ts +2 -0
- package/dist/resources/posts/index.js +8 -0
- package/dist/resources/posts/logs.d.ts +134 -0
- package/dist/resources/posts/logs.js +31 -0
- package/dist/resources/posts/posts.d.ts +607 -0
- package/dist/resources/posts/posts.js +149 -0
- package/dist/resources/posts.d.ts +1 -0
- package/dist/resources/posts.js +18 -0
- package/dist/resources/queue/index.d.ts +2 -0
- package/dist/resources/queue/index.js +8 -0
- package/dist/resources/queue/queue.d.ts +42 -0
- package/dist/resources/queue/queue.js +60 -0
- package/dist/resources/queue/slots.d.ts +215 -0
- package/dist/resources/queue/slots.js +36 -0
- package/dist/resources/queue.d.ts +1 -0
- package/dist/resources/queue.js +18 -0
- package/dist/resources/reddit.d.ts +186 -0
- package/dist/resources/reddit.js +20 -0
- package/dist/resources/tools/index.d.ts +3 -0
- package/dist/resources/tools/index.js +10 -0
- package/dist/resources/tools/instagram.d.ts +41 -0
- package/dist/resources/tools/instagram.js +22 -0
- package/dist/resources/tools/tools.d.ts +13 -0
- package/dist/resources/tools/tools.js +52 -0
- package/dist/resources/tools/validate.d.ts +689 -0
- package/dist/resources/tools/validate.js +63 -0
- package/dist/resources/tools.d.ts +1 -0
- package/dist/resources/tools.js +18 -0
- package/dist/resources/twitter/bookmark.d.ts +48 -0
- package/dist/resources/twitter/bookmark.js +20 -0
- package/dist/resources/twitter/follow.d.ts +48 -0
- package/dist/resources/twitter/follow.js +20 -0
- package/dist/resources/twitter/index.d.ts +4 -0
- package/dist/resources/twitter/index.js +12 -0
- package/dist/resources/twitter/retweet.d.ts +48 -0
- package/dist/resources/twitter/retweet.js +20 -0
- package/dist/resources/twitter/twitter.d.ts +17 -0
- package/dist/resources/twitter/twitter.js +56 -0
- package/dist/resources/twitter.d.ts +1 -0
- package/dist/resources/twitter.js +18 -0
- package/dist/resources/usage.d.ts +97 -0
- package/dist/resources/usage.js +14 -0
- package/dist/resources/webhooks.d.ts +205 -0
- package/dist/resources/webhooks.js +50 -0
- package/dist/resources/whatsapp/broadcasts.d.ts +291 -0
- package/dist/resources/whatsapp/broadcasts.js +49 -0
- package/dist/resources/whatsapp/business-profile.d.ts +85 -0
- package/dist/resources/whatsapp/business-profile.js +20 -0
- package/dist/resources/whatsapp/contacts.d.ts +250 -0
- package/dist/resources/whatsapp/contacts.js +49 -0
- package/dist/resources/whatsapp/groups.d.ts +87 -0
- package/dist/resources/whatsapp/groups.js +31 -0
- package/dist/resources/whatsapp/index.d.ts +6 -0
- package/dist/resources/whatsapp/index.js +16 -0
- package/dist/resources/whatsapp/templates.d.ts +250 -0
- package/dist/resources/whatsapp/templates.js +39 -0
- package/dist/resources/whatsapp/whatsapp.d.ts +148 -0
- package/dist/resources/whatsapp/whatsapp.js +76 -0
- package/dist/resources/whatsapp.d.ts +1 -0
- package/dist/resources/whatsapp.js +18 -0
- package/dist/resources.d.ts +1 -0
- package/dist/resources.js +17 -0
- package/dist/uploads.d.ts +2 -0
- package/dist/uploads.js +18 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/package.json +28 -0
- package/src/index.ts +22 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
4
|
+
export declare class Validate extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Check character counts against platform limits
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response =
|
|
11
|
+
* await client.tools.validate.checkPostLength({
|
|
12
|
+
* content: 'content',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
checkPostLength(body: ValidateCheckPostLengthParams, options?: RequestOptions): APIPromise<ValidateCheckPostLengthResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a subreddit exists and get its details
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response =
|
|
23
|
+
* await client.tools.validate.retrieveSubreddit({
|
|
24
|
+
* name: 'name',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
retrieveSubreddit(query: ValidateRetrieveSubredditParams, options?: RequestOptions): APIPromise<ValidateRetrieveSubredditResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Validate a media URL for platform compatibility
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.tools.validate.validateMedia({
|
|
35
|
+
* url: 'https://example.com',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
validateMedia(body: ValidateValidateMediaParams, options?: RequestOptions): APIPromise<ValidateValidateMediaResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Validate a post (dry-run without publishing)
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const response = await client.tools.validate.validatePost({
|
|
46
|
+
* scheduled_at: 'now',
|
|
47
|
+
* targets: ['string'],
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
validatePost(body: ValidateValidatePostParams, options?: RequestOptions): APIPromise<ValidateValidatePostResponse>;
|
|
52
|
+
}
|
|
53
|
+
export interface ValidateCheckPostLengthResponse {
|
|
54
|
+
/**
|
|
55
|
+
* Character count per platform
|
|
56
|
+
*/
|
|
57
|
+
platforms: ValidateCheckPostLengthResponse.Platforms;
|
|
58
|
+
}
|
|
59
|
+
export declare namespace ValidateCheckPostLengthResponse {
|
|
60
|
+
/**
|
|
61
|
+
* Character count per platform
|
|
62
|
+
*/
|
|
63
|
+
interface Platforms {
|
|
64
|
+
bluesky?: Platforms.Bluesky;
|
|
65
|
+
discord?: Platforms.Discord;
|
|
66
|
+
facebook?: Platforms.Facebook;
|
|
67
|
+
googlebusiness?: Platforms.Googlebusiness;
|
|
68
|
+
instagram?: Platforms.Instagram;
|
|
69
|
+
linkedin?: Platforms.Linkedin;
|
|
70
|
+
mastodon?: Platforms.Mastodon;
|
|
71
|
+
pinterest?: Platforms.Pinterest;
|
|
72
|
+
reddit?: Platforms.Reddit;
|
|
73
|
+
sms?: Platforms.SMS;
|
|
74
|
+
snapchat?: Platforms.Snapchat;
|
|
75
|
+
telegram?: Platforms.Telegram;
|
|
76
|
+
threads?: Platforms.Threads;
|
|
77
|
+
tiktok?: Platforms.Tiktok;
|
|
78
|
+
twitter?: Platforms.Twitter;
|
|
79
|
+
whatsapp?: Platforms.Whatsapp;
|
|
80
|
+
youtube?: Platforms.Youtube;
|
|
81
|
+
}
|
|
82
|
+
namespace Platforms {
|
|
83
|
+
interface Bluesky {
|
|
84
|
+
/**
|
|
85
|
+
* Character count for this platform
|
|
86
|
+
*/
|
|
87
|
+
count: number;
|
|
88
|
+
/**
|
|
89
|
+
* Character limit for this platform
|
|
90
|
+
*/
|
|
91
|
+
limit: number;
|
|
92
|
+
/**
|
|
93
|
+
* Whether content is within limit
|
|
94
|
+
*/
|
|
95
|
+
within_limit: boolean;
|
|
96
|
+
}
|
|
97
|
+
interface Discord {
|
|
98
|
+
/**
|
|
99
|
+
* Character count for this platform
|
|
100
|
+
*/
|
|
101
|
+
count: number;
|
|
102
|
+
/**
|
|
103
|
+
* Character limit for this platform
|
|
104
|
+
*/
|
|
105
|
+
limit: number;
|
|
106
|
+
/**
|
|
107
|
+
* Whether content is within limit
|
|
108
|
+
*/
|
|
109
|
+
within_limit: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface Facebook {
|
|
112
|
+
/**
|
|
113
|
+
* Character count for this platform
|
|
114
|
+
*/
|
|
115
|
+
count: number;
|
|
116
|
+
/**
|
|
117
|
+
* Character limit for this platform
|
|
118
|
+
*/
|
|
119
|
+
limit: number;
|
|
120
|
+
/**
|
|
121
|
+
* Whether content is within limit
|
|
122
|
+
*/
|
|
123
|
+
within_limit: boolean;
|
|
124
|
+
}
|
|
125
|
+
interface Googlebusiness {
|
|
126
|
+
/**
|
|
127
|
+
* Character count for this platform
|
|
128
|
+
*/
|
|
129
|
+
count: number;
|
|
130
|
+
/**
|
|
131
|
+
* Character limit for this platform
|
|
132
|
+
*/
|
|
133
|
+
limit: number;
|
|
134
|
+
/**
|
|
135
|
+
* Whether content is within limit
|
|
136
|
+
*/
|
|
137
|
+
within_limit: boolean;
|
|
138
|
+
}
|
|
139
|
+
interface Instagram {
|
|
140
|
+
/**
|
|
141
|
+
* Character count for this platform
|
|
142
|
+
*/
|
|
143
|
+
count: number;
|
|
144
|
+
/**
|
|
145
|
+
* Character limit for this platform
|
|
146
|
+
*/
|
|
147
|
+
limit: number;
|
|
148
|
+
/**
|
|
149
|
+
* Whether content is within limit
|
|
150
|
+
*/
|
|
151
|
+
within_limit: boolean;
|
|
152
|
+
}
|
|
153
|
+
interface Linkedin {
|
|
154
|
+
/**
|
|
155
|
+
* Character count for this platform
|
|
156
|
+
*/
|
|
157
|
+
count: number;
|
|
158
|
+
/**
|
|
159
|
+
* Character limit for this platform
|
|
160
|
+
*/
|
|
161
|
+
limit: number;
|
|
162
|
+
/**
|
|
163
|
+
* Whether content is within limit
|
|
164
|
+
*/
|
|
165
|
+
within_limit: boolean;
|
|
166
|
+
}
|
|
167
|
+
interface Mastodon {
|
|
168
|
+
/**
|
|
169
|
+
* Character count for this platform
|
|
170
|
+
*/
|
|
171
|
+
count: number;
|
|
172
|
+
/**
|
|
173
|
+
* Character limit for this platform
|
|
174
|
+
*/
|
|
175
|
+
limit: number;
|
|
176
|
+
/**
|
|
177
|
+
* Whether content is within limit
|
|
178
|
+
*/
|
|
179
|
+
within_limit: boolean;
|
|
180
|
+
}
|
|
181
|
+
interface Pinterest {
|
|
182
|
+
/**
|
|
183
|
+
* Character count for this platform
|
|
184
|
+
*/
|
|
185
|
+
count: number;
|
|
186
|
+
/**
|
|
187
|
+
* Character limit for this platform
|
|
188
|
+
*/
|
|
189
|
+
limit: number;
|
|
190
|
+
/**
|
|
191
|
+
* Whether content is within limit
|
|
192
|
+
*/
|
|
193
|
+
within_limit: boolean;
|
|
194
|
+
}
|
|
195
|
+
interface Reddit {
|
|
196
|
+
/**
|
|
197
|
+
* Character count for this platform
|
|
198
|
+
*/
|
|
199
|
+
count: number;
|
|
200
|
+
/**
|
|
201
|
+
* Character limit for this platform
|
|
202
|
+
*/
|
|
203
|
+
limit: number;
|
|
204
|
+
/**
|
|
205
|
+
* Whether content is within limit
|
|
206
|
+
*/
|
|
207
|
+
within_limit: boolean;
|
|
208
|
+
}
|
|
209
|
+
interface SMS {
|
|
210
|
+
/**
|
|
211
|
+
* Character count for this platform
|
|
212
|
+
*/
|
|
213
|
+
count: number;
|
|
214
|
+
/**
|
|
215
|
+
* Character limit for this platform
|
|
216
|
+
*/
|
|
217
|
+
limit: number;
|
|
218
|
+
/**
|
|
219
|
+
* Whether content is within limit
|
|
220
|
+
*/
|
|
221
|
+
within_limit: boolean;
|
|
222
|
+
}
|
|
223
|
+
interface Snapchat {
|
|
224
|
+
/**
|
|
225
|
+
* Character count for this platform
|
|
226
|
+
*/
|
|
227
|
+
count: number;
|
|
228
|
+
/**
|
|
229
|
+
* Character limit for this platform
|
|
230
|
+
*/
|
|
231
|
+
limit: number;
|
|
232
|
+
/**
|
|
233
|
+
* Whether content is within limit
|
|
234
|
+
*/
|
|
235
|
+
within_limit: boolean;
|
|
236
|
+
}
|
|
237
|
+
interface Telegram {
|
|
238
|
+
/**
|
|
239
|
+
* Character count for this platform
|
|
240
|
+
*/
|
|
241
|
+
count: number;
|
|
242
|
+
/**
|
|
243
|
+
* Character limit for this platform
|
|
244
|
+
*/
|
|
245
|
+
limit: number;
|
|
246
|
+
/**
|
|
247
|
+
* Whether content is within limit
|
|
248
|
+
*/
|
|
249
|
+
within_limit: boolean;
|
|
250
|
+
}
|
|
251
|
+
interface Threads {
|
|
252
|
+
/**
|
|
253
|
+
* Character count for this platform
|
|
254
|
+
*/
|
|
255
|
+
count: number;
|
|
256
|
+
/**
|
|
257
|
+
* Character limit for this platform
|
|
258
|
+
*/
|
|
259
|
+
limit: number;
|
|
260
|
+
/**
|
|
261
|
+
* Whether content is within limit
|
|
262
|
+
*/
|
|
263
|
+
within_limit: boolean;
|
|
264
|
+
}
|
|
265
|
+
interface Tiktok {
|
|
266
|
+
/**
|
|
267
|
+
* Character count for this platform
|
|
268
|
+
*/
|
|
269
|
+
count: number;
|
|
270
|
+
/**
|
|
271
|
+
* Character limit for this platform
|
|
272
|
+
*/
|
|
273
|
+
limit: number;
|
|
274
|
+
/**
|
|
275
|
+
* Whether content is within limit
|
|
276
|
+
*/
|
|
277
|
+
within_limit: boolean;
|
|
278
|
+
}
|
|
279
|
+
interface Twitter {
|
|
280
|
+
/**
|
|
281
|
+
* Character count for this platform
|
|
282
|
+
*/
|
|
283
|
+
count: number;
|
|
284
|
+
/**
|
|
285
|
+
* Character limit for this platform
|
|
286
|
+
*/
|
|
287
|
+
limit: number;
|
|
288
|
+
/**
|
|
289
|
+
* Whether content is within limit
|
|
290
|
+
*/
|
|
291
|
+
within_limit: boolean;
|
|
292
|
+
}
|
|
293
|
+
interface Whatsapp {
|
|
294
|
+
/**
|
|
295
|
+
* Character count for this platform
|
|
296
|
+
*/
|
|
297
|
+
count: number;
|
|
298
|
+
/**
|
|
299
|
+
* Character limit for this platform
|
|
300
|
+
*/
|
|
301
|
+
limit: number;
|
|
302
|
+
/**
|
|
303
|
+
* Whether content is within limit
|
|
304
|
+
*/
|
|
305
|
+
within_limit: boolean;
|
|
306
|
+
}
|
|
307
|
+
interface Youtube {
|
|
308
|
+
/**
|
|
309
|
+
* Character count for this platform
|
|
310
|
+
*/
|
|
311
|
+
count: number;
|
|
312
|
+
/**
|
|
313
|
+
* Character limit for this platform
|
|
314
|
+
*/
|
|
315
|
+
limit: number;
|
|
316
|
+
/**
|
|
317
|
+
* Whether content is within limit
|
|
318
|
+
*/
|
|
319
|
+
within_limit: boolean;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
export interface ValidateRetrieveSubredditResponse {
|
|
324
|
+
/**
|
|
325
|
+
* Whether the subreddit exists
|
|
326
|
+
*/
|
|
327
|
+
exists: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Canonical subreddit name
|
|
330
|
+
*/
|
|
331
|
+
name?: string | null;
|
|
332
|
+
/**
|
|
333
|
+
* Whether NSFW
|
|
334
|
+
*/
|
|
335
|
+
nsfw?: boolean | null;
|
|
336
|
+
/**
|
|
337
|
+
* Allowed post types
|
|
338
|
+
*/
|
|
339
|
+
post_types?: ValidateRetrieveSubredditResponse.PostTypes;
|
|
340
|
+
/**
|
|
341
|
+
* Subscriber count
|
|
342
|
+
*/
|
|
343
|
+
subscribers?: number | null;
|
|
344
|
+
/**
|
|
345
|
+
* Subreddit title
|
|
346
|
+
*/
|
|
347
|
+
title?: string | null;
|
|
348
|
+
}
|
|
349
|
+
export declare namespace ValidateRetrieveSubredditResponse {
|
|
350
|
+
/**
|
|
351
|
+
* Allowed post types
|
|
352
|
+
*/
|
|
353
|
+
interface PostTypes {
|
|
354
|
+
/**
|
|
355
|
+
* Allows image posts
|
|
356
|
+
*/
|
|
357
|
+
image: boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Allows link posts
|
|
360
|
+
*/
|
|
361
|
+
link: boolean;
|
|
362
|
+
/**
|
|
363
|
+
* Allows text posts
|
|
364
|
+
*/
|
|
365
|
+
self: boolean;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
export interface ValidateValidateMediaResponse {
|
|
369
|
+
/**
|
|
370
|
+
* Whether the URL is accessible
|
|
371
|
+
*/
|
|
372
|
+
accessible: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Per-platform size limits
|
|
375
|
+
*/
|
|
376
|
+
platform_limits: ValidateValidateMediaResponse.PlatformLimits;
|
|
377
|
+
/**
|
|
378
|
+
* MIME type
|
|
379
|
+
*/
|
|
380
|
+
content_type?: string | null;
|
|
381
|
+
/**
|
|
382
|
+
* File size in bytes
|
|
383
|
+
*/
|
|
384
|
+
size?: number | null;
|
|
385
|
+
}
|
|
386
|
+
export declare namespace ValidateValidateMediaResponse {
|
|
387
|
+
/**
|
|
388
|
+
* Per-platform size limits
|
|
389
|
+
*/
|
|
390
|
+
interface PlatformLimits {
|
|
391
|
+
bluesky?: PlatformLimits.Bluesky;
|
|
392
|
+
discord?: PlatformLimits.Discord;
|
|
393
|
+
facebook?: PlatformLimits.Facebook;
|
|
394
|
+
googlebusiness?: PlatformLimits.Googlebusiness;
|
|
395
|
+
instagram?: PlatformLimits.Instagram;
|
|
396
|
+
linkedin?: PlatformLimits.Linkedin;
|
|
397
|
+
mastodon?: PlatformLimits.Mastodon;
|
|
398
|
+
pinterest?: PlatformLimits.Pinterest;
|
|
399
|
+
reddit?: PlatformLimits.Reddit;
|
|
400
|
+
sms?: PlatformLimits.SMS;
|
|
401
|
+
snapchat?: PlatformLimits.Snapchat;
|
|
402
|
+
telegram?: PlatformLimits.Telegram;
|
|
403
|
+
threads?: PlatformLimits.Threads;
|
|
404
|
+
tiktok?: PlatformLimits.Tiktok;
|
|
405
|
+
twitter?: PlatformLimits.Twitter;
|
|
406
|
+
whatsapp?: PlatformLimits.Whatsapp;
|
|
407
|
+
youtube?: PlatformLimits.Youtube;
|
|
408
|
+
}
|
|
409
|
+
namespace PlatformLimits {
|
|
410
|
+
interface Bluesky {
|
|
411
|
+
/**
|
|
412
|
+
* Maximum file size in bytes
|
|
413
|
+
*/
|
|
414
|
+
max_size: number;
|
|
415
|
+
/**
|
|
416
|
+
* Whether file size is within limit
|
|
417
|
+
*/
|
|
418
|
+
within_limit: boolean;
|
|
419
|
+
}
|
|
420
|
+
interface Discord {
|
|
421
|
+
/**
|
|
422
|
+
* Maximum file size in bytes
|
|
423
|
+
*/
|
|
424
|
+
max_size: number;
|
|
425
|
+
/**
|
|
426
|
+
* Whether file size is within limit
|
|
427
|
+
*/
|
|
428
|
+
within_limit: boolean;
|
|
429
|
+
}
|
|
430
|
+
interface Facebook {
|
|
431
|
+
/**
|
|
432
|
+
* Maximum file size in bytes
|
|
433
|
+
*/
|
|
434
|
+
max_size: number;
|
|
435
|
+
/**
|
|
436
|
+
* Whether file size is within limit
|
|
437
|
+
*/
|
|
438
|
+
within_limit: boolean;
|
|
439
|
+
}
|
|
440
|
+
interface Googlebusiness {
|
|
441
|
+
/**
|
|
442
|
+
* Maximum file size in bytes
|
|
443
|
+
*/
|
|
444
|
+
max_size: number;
|
|
445
|
+
/**
|
|
446
|
+
* Whether file size is within limit
|
|
447
|
+
*/
|
|
448
|
+
within_limit: boolean;
|
|
449
|
+
}
|
|
450
|
+
interface Instagram {
|
|
451
|
+
/**
|
|
452
|
+
* Maximum file size in bytes
|
|
453
|
+
*/
|
|
454
|
+
max_size: number;
|
|
455
|
+
/**
|
|
456
|
+
* Whether file size is within limit
|
|
457
|
+
*/
|
|
458
|
+
within_limit: boolean;
|
|
459
|
+
}
|
|
460
|
+
interface Linkedin {
|
|
461
|
+
/**
|
|
462
|
+
* Maximum file size in bytes
|
|
463
|
+
*/
|
|
464
|
+
max_size: number;
|
|
465
|
+
/**
|
|
466
|
+
* Whether file size is within limit
|
|
467
|
+
*/
|
|
468
|
+
within_limit: boolean;
|
|
469
|
+
}
|
|
470
|
+
interface Mastodon {
|
|
471
|
+
/**
|
|
472
|
+
* Maximum file size in bytes
|
|
473
|
+
*/
|
|
474
|
+
max_size: number;
|
|
475
|
+
/**
|
|
476
|
+
* Whether file size is within limit
|
|
477
|
+
*/
|
|
478
|
+
within_limit: boolean;
|
|
479
|
+
}
|
|
480
|
+
interface Pinterest {
|
|
481
|
+
/**
|
|
482
|
+
* Maximum file size in bytes
|
|
483
|
+
*/
|
|
484
|
+
max_size: number;
|
|
485
|
+
/**
|
|
486
|
+
* Whether file size is within limit
|
|
487
|
+
*/
|
|
488
|
+
within_limit: boolean;
|
|
489
|
+
}
|
|
490
|
+
interface Reddit {
|
|
491
|
+
/**
|
|
492
|
+
* Maximum file size in bytes
|
|
493
|
+
*/
|
|
494
|
+
max_size: number;
|
|
495
|
+
/**
|
|
496
|
+
* Whether file size is within limit
|
|
497
|
+
*/
|
|
498
|
+
within_limit: boolean;
|
|
499
|
+
}
|
|
500
|
+
interface SMS {
|
|
501
|
+
/**
|
|
502
|
+
* Maximum file size in bytes
|
|
503
|
+
*/
|
|
504
|
+
max_size: number;
|
|
505
|
+
/**
|
|
506
|
+
* Whether file size is within limit
|
|
507
|
+
*/
|
|
508
|
+
within_limit: boolean;
|
|
509
|
+
}
|
|
510
|
+
interface Snapchat {
|
|
511
|
+
/**
|
|
512
|
+
* Maximum file size in bytes
|
|
513
|
+
*/
|
|
514
|
+
max_size: number;
|
|
515
|
+
/**
|
|
516
|
+
* Whether file size is within limit
|
|
517
|
+
*/
|
|
518
|
+
within_limit: boolean;
|
|
519
|
+
}
|
|
520
|
+
interface Telegram {
|
|
521
|
+
/**
|
|
522
|
+
* Maximum file size in bytes
|
|
523
|
+
*/
|
|
524
|
+
max_size: number;
|
|
525
|
+
/**
|
|
526
|
+
* Whether file size is within limit
|
|
527
|
+
*/
|
|
528
|
+
within_limit: boolean;
|
|
529
|
+
}
|
|
530
|
+
interface Threads {
|
|
531
|
+
/**
|
|
532
|
+
* Maximum file size in bytes
|
|
533
|
+
*/
|
|
534
|
+
max_size: number;
|
|
535
|
+
/**
|
|
536
|
+
* Whether file size is within limit
|
|
537
|
+
*/
|
|
538
|
+
within_limit: boolean;
|
|
539
|
+
}
|
|
540
|
+
interface Tiktok {
|
|
541
|
+
/**
|
|
542
|
+
* Maximum file size in bytes
|
|
543
|
+
*/
|
|
544
|
+
max_size: number;
|
|
545
|
+
/**
|
|
546
|
+
* Whether file size is within limit
|
|
547
|
+
*/
|
|
548
|
+
within_limit: boolean;
|
|
549
|
+
}
|
|
550
|
+
interface Twitter {
|
|
551
|
+
/**
|
|
552
|
+
* Maximum file size in bytes
|
|
553
|
+
*/
|
|
554
|
+
max_size: number;
|
|
555
|
+
/**
|
|
556
|
+
* Whether file size is within limit
|
|
557
|
+
*/
|
|
558
|
+
within_limit: boolean;
|
|
559
|
+
}
|
|
560
|
+
interface Whatsapp {
|
|
561
|
+
/**
|
|
562
|
+
* Maximum file size in bytes
|
|
563
|
+
*/
|
|
564
|
+
max_size: number;
|
|
565
|
+
/**
|
|
566
|
+
* Whether file size is within limit
|
|
567
|
+
*/
|
|
568
|
+
within_limit: boolean;
|
|
569
|
+
}
|
|
570
|
+
interface Youtube {
|
|
571
|
+
/**
|
|
572
|
+
* Maximum file size in bytes
|
|
573
|
+
*/
|
|
574
|
+
max_size: number;
|
|
575
|
+
/**
|
|
576
|
+
* Whether file size is within limit
|
|
577
|
+
*/
|
|
578
|
+
within_limit: boolean;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
export interface ValidateValidatePostResponse {
|
|
583
|
+
/**
|
|
584
|
+
* Blocking errors
|
|
585
|
+
*/
|
|
586
|
+
errors: Array<ValidateValidatePostResponse.Error>;
|
|
587
|
+
/**
|
|
588
|
+
* Whether the post is valid for all targets
|
|
589
|
+
*/
|
|
590
|
+
valid: boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Non-blocking warnings
|
|
593
|
+
*/
|
|
594
|
+
warnings: Array<ValidateValidatePostResponse.Warning>;
|
|
595
|
+
}
|
|
596
|
+
export declare namespace ValidateValidatePostResponse {
|
|
597
|
+
interface Error {
|
|
598
|
+
/**
|
|
599
|
+
* Error code
|
|
600
|
+
*/
|
|
601
|
+
code: string;
|
|
602
|
+
/**
|
|
603
|
+
* Human-readable error message
|
|
604
|
+
*/
|
|
605
|
+
message: string;
|
|
606
|
+
/**
|
|
607
|
+
* Target identifier (account ID, platform, or field name)
|
|
608
|
+
*/
|
|
609
|
+
target: string;
|
|
610
|
+
}
|
|
611
|
+
interface Warning {
|
|
612
|
+
/**
|
|
613
|
+
* Error code
|
|
614
|
+
*/
|
|
615
|
+
code: string;
|
|
616
|
+
/**
|
|
617
|
+
* Human-readable error message
|
|
618
|
+
*/
|
|
619
|
+
message: string;
|
|
620
|
+
/**
|
|
621
|
+
* Target identifier (account ID, platform, or field name)
|
|
622
|
+
*/
|
|
623
|
+
target: string;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
export interface ValidateCheckPostLengthParams {
|
|
627
|
+
/**
|
|
628
|
+
* Post content to check
|
|
629
|
+
*/
|
|
630
|
+
content: string;
|
|
631
|
+
}
|
|
632
|
+
export interface ValidateRetrieveSubredditParams {
|
|
633
|
+
/**
|
|
634
|
+
* Subreddit name (without r/ prefix)
|
|
635
|
+
*/
|
|
636
|
+
name: string;
|
|
637
|
+
}
|
|
638
|
+
export interface ValidateValidateMediaParams {
|
|
639
|
+
/**
|
|
640
|
+
* Media URL to validate
|
|
641
|
+
*/
|
|
642
|
+
url: string;
|
|
643
|
+
}
|
|
644
|
+
export interface ValidateValidatePostParams {
|
|
645
|
+
/**
|
|
646
|
+
* Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
|
|
647
|
+
* an ISO 8601 timestamp to schedule.
|
|
648
|
+
*/
|
|
649
|
+
scheduled_at: string;
|
|
650
|
+
/**
|
|
651
|
+
* Account IDs or platform names to publish to
|
|
652
|
+
*/
|
|
653
|
+
targets: Array<string>;
|
|
654
|
+
/**
|
|
655
|
+
* Post text. Optional if target_options provide per-target content.
|
|
656
|
+
*/
|
|
657
|
+
content?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Media attachments
|
|
660
|
+
*/
|
|
661
|
+
media?: Array<ValidateValidatePostParams.Media>;
|
|
662
|
+
/**
|
|
663
|
+
* Per-target customizations keyed by target value (account ID or platform name)
|
|
664
|
+
*/
|
|
665
|
+
target_options?: {
|
|
666
|
+
[key: string]: {
|
|
667
|
+
[key: string]: unknown;
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
/**
|
|
671
|
+
* IANA timezone for scheduling
|
|
672
|
+
*/
|
|
673
|
+
timezone?: string;
|
|
674
|
+
}
|
|
675
|
+
export declare namespace ValidateValidatePostParams {
|
|
676
|
+
interface Media {
|
|
677
|
+
/**
|
|
678
|
+
* Public URL of the media file
|
|
679
|
+
*/
|
|
680
|
+
url: string;
|
|
681
|
+
/**
|
|
682
|
+
* Media type. Inferred from URL extension if omitted.
|
|
683
|
+
*/
|
|
684
|
+
type?: 'image' | 'video' | 'gif' | 'document';
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
export declare namespace Validate {
|
|
688
|
+
export { type ValidateCheckPostLengthResponse as ValidateCheckPostLengthResponse, type ValidateRetrieveSubredditResponse as ValidateRetrieveSubredditResponse, type ValidateValidateMediaResponse as ValidateValidateMediaResponse, type ValidateValidatePostResponse as ValidateValidatePostResponse, type ValidateCheckPostLengthParams as ValidateCheckPostLengthParams, type ValidateRetrieveSubredditParams as ValidateRetrieveSubredditParams, type ValidateValidateMediaParams as ValidateValidateMediaParams, type ValidateValidatePostParams as ValidateValidatePostParams, };
|
|
689
|
+
}
|