@postpeer/node 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -3
- package/LICENSE +1 -1
- package/README.md +28 -27
- package/api-promise.js.map +1 -1
- package/client.d.mts +14 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -14
- package/client.d.ts.map +1 -1
- package/client.js +51 -96
- package/client.js.map +1 -1
- package/client.mjs +51 -96
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +6 -6
- package/core/error.js.map +1 -1
- package/core/error.mjs +4 -4
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.ts +3 -3
- package/error.js.map +1 -1
- package/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +5 -5
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +5 -5
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.d.mts.map +1 -1
- package/internal/detect-platform.d.ts.map +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.js +5 -6
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +5 -6
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.js +2 -2
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +2 -2
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +1 -7
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -7
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +2 -1
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +2 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shim-types.d.mts.map +1 -1
- package/internal/shim-types.d.ts.map +1 -1
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +11 -17
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +11 -17
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.ts +4 -4
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -9
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -9
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +4 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +4 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.mjs +6 -6
- package/package.json +4 -4
- package/resource.js.map +1 -1
- package/resources/connect/connect.d.mts +2 -2
- package/resources/connect/connect.d.mts.map +1 -1
- package/resources/connect/connect.d.ts +2 -2
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/connect.mjs.map +1 -1
- package/resources/connect/index.d.mts +1 -1
- package/resources/connect/index.d.mts.map +1 -1
- package/resources/connect/index.d.ts +1 -1
- package/resources/connect/index.d.ts.map +1 -1
- package/resources/connect/index.js +2 -0
- package/resources/connect/index.js.map +1 -1
- package/resources/connect/index.mjs +3 -1
- package/resources/connect/index.mjs.map +1 -1
- package/resources/connect/integrations.d.mts +1 -1
- package/resources/connect/integrations.d.mts.map +1 -1
- package/resources/connect/integrations.d.ts +1 -1
- package/resources/connect/integrations.d.ts.map +1 -1
- package/resources/health.d.mts +1 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts +1 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -0
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -1
- package/resources/index.mjs.map +1 -1
- package/resources/media.d.mts.map +1 -1
- package/resources/media.d.ts.map +1 -1
- package/resources/platforms.d.mts.map +1 -1
- package/resources/platforms.d.ts.map +1 -1
- package/resources/posts/index.d.mts +2 -2
- package/resources/posts/index.d.mts.map +1 -1
- package/resources/posts/index.d.ts +2 -2
- package/resources/posts/index.d.ts.map +1 -1
- package/resources/posts/index.js +2 -0
- package/resources/posts/index.js.map +1 -1
- package/resources/posts/index.mjs +4 -2
- package/resources/posts/index.mjs.map +1 -1
- package/resources/posts/posts.d.mts +97 -262
- package/resources/posts/posts.d.mts.map +1 -1
- package/resources/posts/posts.d.ts +97 -262
- package/resources/posts/posts.d.ts.map +1 -1
- package/resources/posts/posts.js.map +1 -1
- package/resources/posts/posts.mjs +1 -1
- package/resources/posts/posts.mjs.map +1 -1
- package/resources/posts/scheduled.d.mts +3 -9
- package/resources/posts/scheduled.d.mts.map +1 -1
- package/resources/posts/scheduled.d.ts +3 -9
- package/resources/posts/scheduled.d.ts.map +1 -1
- package/resources/posts/scheduled.js.map +1 -1
- package/resources/posts/scheduled.mjs.map +1 -1
- package/src/api-promise.ts +1 -1
- package/src/client.ts +93 -184
- package/src/core/api-promise.ts +5 -10
- package/src/core/error.ts +24 -22
- package/src/core/resource.ts +3 -3
- package/src/error.ts +1 -1
- package/src/index.ts +3 -17
- package/src/internal/builtin-types.ts +9 -14
- package/src/internal/detect-platform.ts +1 -5
- package/src/internal/errors.ts +7 -7
- package/src/internal/headers.ts +2 -2
- package/src/internal/parse.ts +4 -12
- package/src/internal/qs/utils.ts +4 -1
- package/src/internal/request-options.ts +5 -1
- package/src/internal/shim-types.ts +2 -2
- package/src/internal/shims.ts +2 -4
- package/src/internal/to-file.ts +7 -7
- package/src/internal/types.ts +22 -28
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +10 -32
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/query.ts +1 -1
- package/src/internal/utils/uuid.ts +5 -3
- package/src/internal/utils/values.ts +6 -6
- package/src/resource.ts +1 -1
- package/src/resources/connect/connect.ts +3 -7
- package/src/resources/connect/index.ts +2 -6
- package/src/resources/connect/integrations.ts +1 -1
- package/src/resources/health.ts +1 -1
- package/src/resources/index.ts +5 -15
- package/src/resources/media.ts +4 -1
- package/src/resources/platforms.ts +3 -1
- package/src/resources/posts/index.ts +2 -18
- package/src/resources/posts/posts.ts +138 -340
- package/src/resources/posts/scheduled.ts +4 -14
- package/src/uploads.ts +1 -1
- package/src/version.ts +1 -1
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as PostsAPI from "./posts.mjs";
|
|
3
2
|
import * as ScheduledAPI from "./scheduled.mjs";
|
|
4
3
|
import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from "./scheduled.mjs";
|
|
5
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
@@ -50,47 +49,6 @@ export declare class Posts extends APIResource {
|
|
|
50
49
|
*/
|
|
51
50
|
delete(postID: string, options?: RequestOptions): APIPromise<PostDeleteResponse>;
|
|
52
51
|
}
|
|
53
|
-
export interface PostSummary {
|
|
54
|
-
content: string;
|
|
55
|
-
createdAt: string;
|
|
56
|
-
crosspostingEnabled: boolean;
|
|
57
|
-
mediaItems: Array<PostSummary.MediaItem>;
|
|
58
|
-
platforms: Array<PostSummary.Platform>;
|
|
59
|
-
/**
|
|
60
|
-
* MongoDB ObjectId of the Post document
|
|
61
|
-
*/
|
|
62
|
-
postId: string;
|
|
63
|
-
rawRequestBody: {
|
|
64
|
-
[key: string]: unknown;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* ISO 8601 scheduled datetime
|
|
68
|
-
*/
|
|
69
|
-
scheduledFor: string | null;
|
|
70
|
-
status: Status;
|
|
71
|
-
timezone: string;
|
|
72
|
-
updatedAt: string;
|
|
73
|
-
}
|
|
74
|
-
export declare namespace PostSummary {
|
|
75
|
-
interface MediaItem {
|
|
76
|
-
filename: string;
|
|
77
|
-
mimeType: string;
|
|
78
|
-
size: number;
|
|
79
|
-
type: 'image' | 'video' | 'gif';
|
|
80
|
-
url: string;
|
|
81
|
-
}
|
|
82
|
-
interface Platform {
|
|
83
|
-
errorMessage: string | null;
|
|
84
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
85
|
-
platformPostId: string | null;
|
|
86
|
-
/**
|
|
87
|
-
* Direct URL to the published post
|
|
88
|
-
*/
|
|
89
|
-
platformPostUrl: string | null;
|
|
90
|
-
publishedAt: string | null;
|
|
91
|
-
status: PostsAPI.Status;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
52
|
export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
95
53
|
export interface PostCreateResponse {
|
|
96
54
|
platforms: Array<PostCreateResponse.Platform>;
|
|
@@ -98,7 +56,7 @@ export interface PostCreateResponse {
|
|
|
98
56
|
* id of the saved Post document
|
|
99
57
|
*/
|
|
100
58
|
postId: string;
|
|
101
|
-
status:
|
|
59
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
102
60
|
/**
|
|
103
61
|
* false only when every platform failed
|
|
104
62
|
*/
|
|
@@ -123,17 +81,103 @@ export declare namespace PostCreateResponse {
|
|
|
123
81
|
}
|
|
124
82
|
}
|
|
125
83
|
export interface PostRetrieveResponse {
|
|
126
|
-
post:
|
|
84
|
+
post: PostRetrieveResponse.Post;
|
|
127
85
|
success: boolean;
|
|
128
86
|
}
|
|
87
|
+
export declare namespace PostRetrieveResponse {
|
|
88
|
+
interface Post {
|
|
89
|
+
content: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
crosspostingEnabled: boolean;
|
|
92
|
+
mediaItems: Array<Post.MediaItem>;
|
|
93
|
+
platforms: Array<Post.Platform>;
|
|
94
|
+
/**
|
|
95
|
+
* MongoDB ObjectId of the Post document
|
|
96
|
+
*/
|
|
97
|
+
postId: string;
|
|
98
|
+
rawRequestBody: {
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* ISO 8601 scheduled datetime
|
|
103
|
+
*/
|
|
104
|
+
scheduledFor: string | null;
|
|
105
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
106
|
+
timezone: string;
|
|
107
|
+
updatedAt: string;
|
|
108
|
+
}
|
|
109
|
+
namespace Post {
|
|
110
|
+
interface MediaItem {
|
|
111
|
+
filename: string;
|
|
112
|
+
mimeType: string;
|
|
113
|
+
size: number;
|
|
114
|
+
type: 'image' | 'video' | 'gif';
|
|
115
|
+
url: string;
|
|
116
|
+
}
|
|
117
|
+
interface Platform {
|
|
118
|
+
errorMessage: string | null;
|
|
119
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
120
|
+
platformPostId: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Direct URL to the published post
|
|
123
|
+
*/
|
|
124
|
+
platformPostUrl: string | null;
|
|
125
|
+
publishedAt: string | null;
|
|
126
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
129
130
|
export interface PostListResponse {
|
|
130
|
-
posts: Array<
|
|
131
|
+
posts: Array<PostListResponse.Post>;
|
|
131
132
|
success: boolean;
|
|
132
133
|
/**
|
|
133
134
|
* Total matched posts across all pages
|
|
134
135
|
*/
|
|
135
136
|
total: number;
|
|
136
137
|
}
|
|
138
|
+
export declare namespace PostListResponse {
|
|
139
|
+
interface Post {
|
|
140
|
+
content: string;
|
|
141
|
+
createdAt: string;
|
|
142
|
+
crosspostingEnabled: boolean;
|
|
143
|
+
mediaItems: Array<Post.MediaItem>;
|
|
144
|
+
platforms: Array<Post.Platform>;
|
|
145
|
+
/**
|
|
146
|
+
* MongoDB ObjectId of the Post document
|
|
147
|
+
*/
|
|
148
|
+
postId: string;
|
|
149
|
+
rawRequestBody: {
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* ISO 8601 scheduled datetime
|
|
154
|
+
*/
|
|
155
|
+
scheduledFor: string | null;
|
|
156
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
157
|
+
timezone: string;
|
|
158
|
+
updatedAt: string;
|
|
159
|
+
}
|
|
160
|
+
namespace Post {
|
|
161
|
+
interface MediaItem {
|
|
162
|
+
filename: string;
|
|
163
|
+
mimeType: string;
|
|
164
|
+
size: number;
|
|
165
|
+
type: 'image' | 'video' | 'gif';
|
|
166
|
+
url: string;
|
|
167
|
+
}
|
|
168
|
+
interface Platform {
|
|
169
|
+
errorMessage: string | null;
|
|
170
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
171
|
+
platformPostId: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* Direct URL to the published post
|
|
174
|
+
*/
|
|
175
|
+
platformPostUrl: string | null;
|
|
176
|
+
publishedAt: string | null;
|
|
177
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
137
181
|
export interface PostDeleteResponse {
|
|
138
182
|
success: boolean;
|
|
139
183
|
}
|
|
@@ -172,218 +216,12 @@ export declare namespace PostCreateParams {
|
|
|
172
216
|
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
173
217
|
/**
|
|
174
218
|
* Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
|
|
175
|
-
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations
|
|
176
|
-
*
|
|
219
|
+
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
|
|
220
|
+
* schema reference for available fields per platform.
|
|
177
221
|
*/
|
|
178
|
-
platformSpecificData?:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Pass this object in platformSpecificData when posting to Twitter/X, including
|
|
183
|
-
* Community post options.
|
|
184
|
-
*/
|
|
185
|
-
interface TwitterConfigurations {
|
|
186
|
-
/**
|
|
187
|
-
* Community ID to publish this post into.
|
|
188
|
-
*/
|
|
189
|
-
communityId?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Cannot be combined with media or threadItems.
|
|
192
|
-
*/
|
|
193
|
-
poll?: TwitterConfigurations.Poll;
|
|
194
|
-
/**
|
|
195
|
-
* Who can reply to this tweet.
|
|
196
|
-
*/
|
|
197
|
-
replySettings?: 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
|
|
198
|
-
/**
|
|
199
|
-
* Tweet ID to reply to.
|
|
200
|
-
*/
|
|
201
|
-
replyToTweetId?: string;
|
|
202
|
-
/**
|
|
203
|
-
* When posting to a Community, also share the post with followers.
|
|
204
|
-
*/
|
|
205
|
-
shareWithFollowers?: boolean;
|
|
206
|
-
/**
|
|
207
|
-
* Additional tweets to chain as a thread. The root tweet uses post.content.
|
|
208
|
-
*/
|
|
209
|
-
threadItems?: Array<TwitterConfigurations.ThreadItem>;
|
|
210
|
-
}
|
|
211
|
-
namespace TwitterConfigurations {
|
|
212
|
-
/**
|
|
213
|
-
* Cannot be combined with media or threadItems.
|
|
214
|
-
*/
|
|
215
|
-
interface Poll {
|
|
216
|
-
/**
|
|
217
|
-
* Poll duration in minutes (5 min – 7 days).
|
|
218
|
-
*/
|
|
219
|
-
duration_minutes: number;
|
|
220
|
-
/**
|
|
221
|
-
* 2–4 poll options.
|
|
222
|
-
*/
|
|
223
|
-
options: Array<string>;
|
|
224
|
-
}
|
|
225
|
-
interface ThreadItem {
|
|
226
|
-
/**
|
|
227
|
-
* Text of this thread tweet (max 280 chars)
|
|
228
|
-
*/
|
|
229
|
-
content: string;
|
|
230
|
-
mediaItems?: Array<ThreadItem.MediaItem>;
|
|
231
|
-
}
|
|
232
|
-
namespace ThreadItem {
|
|
233
|
-
interface MediaItem {
|
|
234
|
-
type: 'image' | 'video' | 'gif';
|
|
235
|
-
url: string;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Pass this object in platformSpecificData when posting to YouTube.
|
|
241
|
-
*/
|
|
242
|
-
interface YouTubeConfigurations {
|
|
243
|
-
/**
|
|
244
|
-
* YouTube category ID. Defaults to "22" (People & Blogs). Common values: "1" Film
|
|
245
|
-
* & Animation, "10" Music, "20" Gaming, "22" People & Blogs, "27" Education, "28"
|
|
246
|
-
* Science & Technology.
|
|
247
|
-
*/
|
|
248
|
-
categoryId?: string;
|
|
249
|
-
/**
|
|
250
|
-
* AI-generated content disclosure. YouTube is increasingly enforcing this
|
|
251
|
-
* requirement. Defaults to false.
|
|
252
|
-
*/
|
|
253
|
-
containsSyntheticMedia?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Auto-posted comment after the video goes live. Max 10,000 characters. For
|
|
256
|
-
* publishNow posts: posted immediately after upload. For scheduled posts: posted
|
|
257
|
-
* when the video becomes public.
|
|
258
|
-
*/
|
|
259
|
-
firstComment?: string;
|
|
260
|
-
/**
|
|
261
|
-
* COPPA compliance flag. Setting to true permanently disables comments,
|
|
262
|
-
* notification bell, personalized ads, end screens, and cards on the video.
|
|
263
|
-
* Defaults to false.
|
|
264
|
-
*/
|
|
265
|
-
madeForKids?: boolean;
|
|
266
|
-
/**
|
|
267
|
-
* Video tags. Total characters across all tags must be ≤500.
|
|
268
|
-
*/
|
|
269
|
-
tags?: Array<string>;
|
|
270
|
-
/**
|
|
271
|
-
* Video title (max 100 chars, no < or >). Defaults to first 100 chars of content,
|
|
272
|
-
* or "Untitled Video".
|
|
273
|
-
*/
|
|
274
|
-
title?: string;
|
|
275
|
-
/**
|
|
276
|
-
* Who can see the video. Defaults to "public". Scheduled posts upload as private
|
|
277
|
-
* and flip to this value at publish time.
|
|
278
|
-
*/
|
|
279
|
-
visibility?: 'public' | 'private' | 'unlisted';
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Pass this object in platformSpecificData when posting to TikTok.
|
|
283
|
-
*/
|
|
284
|
-
interface TikTokConfigurations {
|
|
285
|
-
/**
|
|
286
|
-
* Automatically add background music to photo carousels. Photo posts only.
|
|
287
|
-
* Defaults to true.
|
|
288
|
-
*/
|
|
289
|
-
auto_add_music?: boolean;
|
|
290
|
-
/**
|
|
291
|
-
* Mark as branded content (paid partnership). Defaults to false.
|
|
292
|
-
*/
|
|
293
|
-
brand_content_toggle?: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Mark as organic brand promotion. Defaults to false.
|
|
296
|
-
*/
|
|
297
|
-
brand_organic_toggle?: boolean;
|
|
298
|
-
/**
|
|
299
|
-
* Disable comments on this post. Defaults to false.
|
|
300
|
-
*/
|
|
301
|
-
disable_comment?: boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Disable duet for this video. Videos only. Defaults to false.
|
|
304
|
-
*/
|
|
305
|
-
disable_duet?: boolean;
|
|
306
|
-
/**
|
|
307
|
-
* Disable stitch for this video. Videos only. Defaults to false.
|
|
308
|
-
*/
|
|
309
|
-
disable_stitch?: boolean;
|
|
310
|
-
/**
|
|
311
|
-
* When true (default), sends content to the creator's TikTok inbox as a draft. Set
|
|
312
|
-
* to false to publish immediately (requires an audited app).
|
|
313
|
-
*/
|
|
314
|
-
draft?: boolean;
|
|
315
|
-
/**
|
|
316
|
-
* AI-generated content disclosure. Defaults to false.
|
|
317
|
-
*/
|
|
318
|
-
is_aigc?: boolean;
|
|
319
|
-
/**
|
|
320
|
-
* 0-indexed position of the cover image in a photo carousel. Photo posts only.
|
|
321
|
-
* Defaults to 0.
|
|
322
|
-
*/
|
|
323
|
-
photo_cover_index?: number;
|
|
324
|
-
/**
|
|
325
|
-
* Who can see this post. Defaults to "SELF_ONLY" (required for unreviewed apps).
|
|
326
|
-
* Upgrade to PUBLIC_TO_EVERYONE after TikTok app review.
|
|
327
|
-
*/
|
|
328
|
-
privacy_level?: 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY';
|
|
329
|
-
/**
|
|
330
|
-
* Timestamp in milliseconds to use as the video cover frame. Videos only. Defaults
|
|
331
|
-
* to 1000ms.
|
|
332
|
-
*/
|
|
333
|
-
video_cover_timestamp_ms?: number;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Pass this object in platformSpecificData when posting to Pinterest.
|
|
337
|
-
*/
|
|
338
|
-
interface PinterestConfigurations {
|
|
339
|
-
/**
|
|
340
|
-
* Target board ID. Retrieve available boards via GET /connect/pinterest/boards.
|
|
341
|
-
*/
|
|
342
|
-
boardId: string;
|
|
343
|
-
/**
|
|
344
|
-
* Accessible image description. Max 500 characters.
|
|
345
|
-
*/
|
|
346
|
-
altText?: string;
|
|
347
|
-
/**
|
|
348
|
-
* Custom cover image URL for video pins.
|
|
349
|
-
*/
|
|
350
|
-
coverImageUrl?: string;
|
|
351
|
-
/**
|
|
352
|
-
* Hex color for the loading placeholder (e.g. "#6E7874").
|
|
353
|
-
*/
|
|
354
|
-
dominantColor?: string;
|
|
355
|
-
/**
|
|
356
|
-
* HTTPS destination URL when the pin is clicked. Important for driving traffic.
|
|
357
|
-
*/
|
|
358
|
-
link?: string;
|
|
359
|
-
/**
|
|
360
|
-
* Pin title. Max 100 characters. Defaults to first line of content.
|
|
361
|
-
*/
|
|
362
|
-
title?: string;
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Pass this object in platformSpecificData when posting to LinkedIn.
|
|
366
|
-
*/
|
|
367
|
-
interface LinkedInConfigurations {
|
|
368
|
-
/**
|
|
369
|
-
* Description for the article preview card. Max 400 characters.
|
|
370
|
-
*/
|
|
371
|
-
article_description?: string;
|
|
372
|
-
/**
|
|
373
|
-
* Title for the article preview card. Max 400 characters.
|
|
374
|
-
*/
|
|
375
|
-
article_title?: string;
|
|
376
|
-
/**
|
|
377
|
-
* URL for an article/link post. When provided, the post becomes a link share with
|
|
378
|
-
* a preview card.
|
|
379
|
-
*/
|
|
380
|
-
article_url?: string;
|
|
381
|
-
/**
|
|
382
|
-
* Post visibility. "PUBLIC" = visible to everyone, "CONNECTIONS" = visible to
|
|
383
|
-
* connections only. Defaults to "PUBLIC".
|
|
384
|
-
*/
|
|
385
|
-
visibility?: 'PUBLIC' | 'CONNECTIONS';
|
|
386
|
-
}
|
|
222
|
+
platformSpecificData?: {
|
|
223
|
+
[key: string]: unknown;
|
|
224
|
+
};
|
|
387
225
|
}
|
|
388
226
|
interface MediaItem {
|
|
389
227
|
type: 'image' | 'video' | 'gif';
|
|
@@ -424,14 +262,11 @@ export interface PostListParams {
|
|
|
424
262
|
* ISO 8601 upper bound on scheduledFor
|
|
425
263
|
*/
|
|
426
264
|
scheduledBefore?: string;
|
|
427
|
-
/**
|
|
428
|
-
* Sort direction by createdAt
|
|
429
|
-
*/
|
|
430
265
|
sort?: 'asc' | 'desc';
|
|
431
|
-
status?:
|
|
266
|
+
status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
432
267
|
}
|
|
433
268
|
export declare namespace Posts {
|
|
434
|
-
export { type
|
|
435
|
-
export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams
|
|
269
|
+
export { type Status as Status, type PostCreateResponse as PostCreateResponse, type PostRetrieveResponse as PostRetrieveResponse, type PostListResponse as PostListResponse, type PostDeleteResponse as PostDeleteResponse, type PostCreateParams as PostCreateParams, type PostListParams as PostListParams };
|
|
270
|
+
export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams };
|
|
436
271
|
}
|
|
437
272
|
//# sourceMappingURL=posts.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,SAAS,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE;OACrH,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIxF;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIpF;;;;;;;;OAQG;IACH,IAAI,CAAC,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAI3G;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGjF;AAED,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE1G,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,QA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