@postpeer/node 0.4.0 → 0.6.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 +35 -0
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +14 -3
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/connect/connect.d.mts +3 -3
- package/resources/connect/connect.d.mts.map +1 -1
- package/resources/connect/connect.d.ts +3 -3
- package/resources/connect/connect.d.ts.map +1 -1
- package/resources/connect/connect.js.map +1 -1
- package/resources/connect/connect.mjs +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.map +1 -1
- package/resources/connect/index.mjs.map +1 -1
- package/resources/connect/integrations.d.mts +21 -4
- package/resources/connect/integrations.d.mts.map +1 -1
- package/resources/connect/integrations.d.ts +21 -4
- package/resources/connect/integrations.d.ts.map +1 -1
- package/resources/connect/integrations.js +3 -3
- package/resources/connect/integrations.js.map +1 -1
- package/resources/connect/integrations.mjs +3 -3
- package/resources/connect/integrations.mjs.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.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/platforms.d.mts +1 -1
- package/resources/platforms.d.mts.map +1 -1
- package/resources/platforms.d.ts +1 -1
- package/resources/platforms.d.ts.map +1 -1
- package/resources/posts/index.d.mts +1 -1
- package/resources/posts/index.d.mts.map +1 -1
- package/resources/posts/index.d.ts +1 -1
- package/resources/posts/index.d.ts.map +1 -1
- package/resources/posts/index.js.map +1 -1
- package/resources/posts/index.mjs.map +1 -1
- package/resources/posts/posts.d.mts +106 -264
- package/resources/posts/posts.d.mts.map +1 -1
- package/resources/posts/posts.d.ts +106 -264
- package/resources/posts/posts.d.ts.map +1 -1
- package/resources/posts/posts.js.map +1 -1
- package/resources/posts/posts.mjs.map +1 -1
- package/resources/posts/scheduled.d.mts +2 -8
- package/resources/posts/scheduled.d.mts.map +1 -1
- package/resources/posts/scheduled.d.ts +2 -8
- package/resources/posts/scheduled.d.ts.map +1 -1
- package/src/client.ts +15 -5
- package/src/internal/types.ts +6 -8
- package/src/resources/connect/connect.ts +8 -2
- package/src/resources/connect/index.ts +1 -0
- package/src/resources/connect/integrations.ts +31 -4
- package/src/resources/index.ts +0 -1
- package/src/resources/platforms.ts +1 -1
- package/src/resources/posts/index.ts +0 -1
- package/src/resources/posts/posts.ts +146 -329
- package/src/resources/posts/scheduled.ts +2 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as PostsAPI from "./posts.js";
|
|
3
2
|
import * as ScheduledAPI from "./scheduled.js";
|
|
4
3
|
import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from "./scheduled.js";
|
|
5
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
@@ -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
|
*/
|
|
@@ -110,7 +68,7 @@ export interface PostCreateResponse {
|
|
|
110
68
|
}
|
|
111
69
|
export declare namespace PostCreateResponse {
|
|
112
70
|
interface Platform {
|
|
113
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
71
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
114
72
|
success: boolean;
|
|
115
73
|
/**
|
|
116
74
|
* Error message when success is false
|
|
@@ -120,20 +78,113 @@ export declare namespace PostCreateResponse {
|
|
|
120
78
|
* Direct URL to the published post
|
|
121
79
|
*/
|
|
122
80
|
platformPostUrl?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Warning message when the post published but a non-critical follow-up action
|
|
83
|
+
* failed
|
|
84
|
+
*/
|
|
85
|
+
warningMessage?: string;
|
|
123
86
|
}
|
|
124
87
|
}
|
|
125
88
|
export interface PostRetrieveResponse {
|
|
126
|
-
post:
|
|
89
|
+
post: PostRetrieveResponse.Post;
|
|
127
90
|
success: boolean;
|
|
128
91
|
}
|
|
92
|
+
export declare namespace PostRetrieveResponse {
|
|
93
|
+
interface Post {
|
|
94
|
+
content: string;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
crosspostingEnabled: boolean;
|
|
97
|
+
mediaItems: Array<Post.MediaItem>;
|
|
98
|
+
platforms: Array<Post.Platform>;
|
|
99
|
+
/**
|
|
100
|
+
* MongoDB ObjectId of the Post document
|
|
101
|
+
*/
|
|
102
|
+
postId: string;
|
|
103
|
+
rawRequestBody: {
|
|
104
|
+
[key: string]: unknown;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* ISO 8601 scheduled datetime
|
|
108
|
+
*/
|
|
109
|
+
scheduledFor: string | null;
|
|
110
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
111
|
+
timezone: string;
|
|
112
|
+
updatedAt: string;
|
|
113
|
+
}
|
|
114
|
+
namespace Post {
|
|
115
|
+
interface MediaItem {
|
|
116
|
+
filename: string;
|
|
117
|
+
mimeType: string;
|
|
118
|
+
size: number;
|
|
119
|
+
type: 'image' | 'video' | 'gif';
|
|
120
|
+
url: string;
|
|
121
|
+
}
|
|
122
|
+
interface Platform {
|
|
123
|
+
errorMessage: string | null;
|
|
124
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
125
|
+
platformPostId: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Direct URL to the published post
|
|
128
|
+
*/
|
|
129
|
+
platformPostUrl: string | null;
|
|
130
|
+
publishedAt: string | null;
|
|
131
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
132
|
+
warningMessage: string | null;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
129
136
|
export interface PostListResponse {
|
|
130
|
-
posts: Array<
|
|
137
|
+
posts: Array<PostListResponse.Post>;
|
|
131
138
|
success: boolean;
|
|
132
139
|
/**
|
|
133
140
|
* Total matched posts across all pages
|
|
134
141
|
*/
|
|
135
142
|
total: number;
|
|
136
143
|
}
|
|
144
|
+
export declare namespace PostListResponse {
|
|
145
|
+
interface Post {
|
|
146
|
+
content: string;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
crosspostingEnabled: boolean;
|
|
149
|
+
mediaItems: Array<Post.MediaItem>;
|
|
150
|
+
platforms: Array<Post.Platform>;
|
|
151
|
+
/**
|
|
152
|
+
* MongoDB ObjectId of the Post document
|
|
153
|
+
*/
|
|
154
|
+
postId: string;
|
|
155
|
+
rawRequestBody: {
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* ISO 8601 scheduled datetime
|
|
160
|
+
*/
|
|
161
|
+
scheduledFor: string | null;
|
|
162
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
163
|
+
timezone: string;
|
|
164
|
+
updatedAt: string;
|
|
165
|
+
}
|
|
166
|
+
namespace Post {
|
|
167
|
+
interface MediaItem {
|
|
168
|
+
filename: string;
|
|
169
|
+
mimeType: string;
|
|
170
|
+
size: number;
|
|
171
|
+
type: 'image' | 'video' | 'gif';
|
|
172
|
+
url: string;
|
|
173
|
+
}
|
|
174
|
+
interface Platform {
|
|
175
|
+
errorMessage: string | null;
|
|
176
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
177
|
+
platformPostId: string | null;
|
|
178
|
+
/**
|
|
179
|
+
* Direct URL to the published post
|
|
180
|
+
*/
|
|
181
|
+
platformPostUrl: string | null;
|
|
182
|
+
publishedAt: string | null;
|
|
183
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
184
|
+
warningMessage: string | null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
137
188
|
export interface PostDeleteResponse {
|
|
138
189
|
success: boolean;
|
|
139
190
|
}
|
|
@@ -169,221 +220,15 @@ export declare namespace PostCreateParams {
|
|
|
169
220
|
* Integration.\_id — find yours via GET /connect/integrations
|
|
170
221
|
*/
|
|
171
222
|
accountId: string;
|
|
172
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
223
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
173
224
|
/**
|
|
174
225
|
* Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
|
|
175
|
-
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations
|
|
176
|
-
*
|
|
177
|
-
*/
|
|
178
|
-
platformSpecificData?: Platform.TwitterConfigurations | Platform.YouTubeConfigurations | Platform.TikTokConfigurations | Platform.PinterestConfigurations | Platform.LinkedInConfigurations;
|
|
179
|
-
}
|
|
180
|
-
namespace Platform {
|
|
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.
|
|
226
|
+
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
|
|
227
|
+
* schema reference for available fields per platform.
|
|
283
228
|
*/
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
}
|
|
229
|
+
platformSpecificData?: {
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
};
|
|
387
232
|
}
|
|
388
233
|
interface MediaItem {
|
|
389
234
|
type: 'image' | 'video' | 'gif';
|
|
@@ -415,7 +260,7 @@ export interface PostListParams {
|
|
|
415
260
|
/**
|
|
416
261
|
* Filter by platform (repeatable — OR logic)
|
|
417
262
|
*/
|
|
418
|
-
platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin'>;
|
|
263
|
+
platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky'>;
|
|
419
264
|
/**
|
|
420
265
|
* ISO 8601 lower bound on scheduledFor
|
|
421
266
|
*/
|
|
@@ -424,14 +269,11 @@ export interface PostListParams {
|
|
|
424
269
|
* ISO 8601 upper bound on scheduledFor
|
|
425
270
|
*/
|
|
426
271
|
scheduledBefore?: string;
|
|
427
|
-
/**
|
|
428
|
-
* Sort direction by createdAt
|
|
429
|
-
*/
|
|
430
272
|
sort?: 'asc' | 'desc';
|
|
431
|
-
status?:
|
|
273
|
+
status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
432
274
|
}
|
|
433
275
|
export declare namespace Posts {
|
|
434
|
-
export { type
|
|
276
|
+
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, };
|
|
435
277
|
export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
|
|
436
278
|
}
|
|
437
279
|
//# sourceMappingURL=posts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC5B;OACM,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,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UA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WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;IAExG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;CAChG;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,qEAA4C;AAC5C,8CAMqB;AAGrB,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2D/E,CAAC;IAzDC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AA5DD,sBA4DC;AA+SD,KAAK,CAAC,SAAS,GAAG,qBAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.mjs","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"posts.mjs","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,GAKV;OAGM,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2D/E,CAAC;IAzDC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AA+SD,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -66,14 +66,8 @@ export declare namespace ScheduledListResponse {
|
|
|
66
66
|
}
|
|
67
67
|
namespace Post {
|
|
68
68
|
interface Platform {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
platform: string;
|
|
73
|
-
/**
|
|
74
|
-
* Current status of this platform target
|
|
75
|
-
*/
|
|
76
|
-
status: string;
|
|
69
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
70
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
77
71
|
}
|
|
78
72
|
interface MediaItem {
|
|
79
73
|
type: 'image' | 'video' | 'gif';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled.d.mts","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjE;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIrF;;;;;;;;;;OAUG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB,SAAS,EAAE,MAAM,CAAC;QAElB,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhC;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACpC;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,QAAQ;YACvB
|
|
1
|
+
{"version":3,"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,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;SAC/F;QAED,UAAiB,SAAS;YACxB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;YAEhC,GAAG,EAAE,MAAM,CAAC;YAEZ;;;eAGG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;KACF;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -66,14 +66,8 @@ export declare namespace ScheduledListResponse {
|
|
|
66
66
|
}
|
|
67
67
|
namespace Post {
|
|
68
68
|
interface Platform {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
platform: string;
|
|
73
|
-
/**
|
|
74
|
-
* Current status of this platform target
|
|
75
|
-
*/
|
|
76
|
-
status: string;
|
|
69
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
70
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
77
71
|
}
|
|
78
72
|
interface MediaItem {
|
|
79
73
|
type: 'image' | 'video' | 'gif';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../src/resources/posts/scheduled.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjE;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIrF;;;;;;;;;;OAUG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,IAAI;QACnB;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB,SAAS,EAAE,MAAM,CAAC;QAElB,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhC;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACpC;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,QAAQ;YACvB
|
|
1
|
+
{"version":3,"file":"sche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,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;SAC/F;QAED,UAAiB,SAAS;YACxB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;YAEhC,GAAG,EAAE,MAAM,CAAC;YAEZ;;;eAGG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB;KACF;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAEhB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAEhB,YAAY,EAAE,MAAM,CAAC;IAErB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/src/client.ts
CHANGED
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
PostListParams,
|
|
29
29
|
PostListResponse,
|
|
30
30
|
PostRetrieveResponse,
|
|
31
|
-
PostSummary,
|
|
32
31
|
Posts,
|
|
33
32
|
Status,
|
|
34
33
|
} from './resources/posts/posts';
|
|
@@ -142,7 +141,7 @@ export class Postpeer {
|
|
|
142
141
|
* API Client for interfacing with the Postpeer API.
|
|
143
142
|
*
|
|
144
143
|
* @param {string | undefined} [opts.apiKey=process.env['POSTPEER_API_KEY'] ?? undefined]
|
|
145
|
-
* @param {string} [opts.baseURL=process.env['POSTPEER_BASE_URL'] ?? https://api.
|
|
144
|
+
* @param {string} [opts.baseURL=process.env['POSTPEER_BASE_URL'] ?? https://api.postpeer.dev] - Override the default base URL for the API.
|
|
146
145
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
147
146
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
148
147
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -164,7 +163,7 @@ export class Postpeer {
|
|
|
164
163
|
const options: ClientOptions = {
|
|
165
164
|
apiKey,
|
|
166
165
|
...opts,
|
|
167
|
-
baseURL: baseURL || `https://api.
|
|
166
|
+
baseURL: baseURL || `https://api.postpeer.dev`,
|
|
168
167
|
};
|
|
169
168
|
|
|
170
169
|
this.baseURL = options.baseURL!;
|
|
@@ -182,6 +181,18 @@ export class Postpeer {
|
|
|
182
181
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
183
182
|
this.#encoder = Opts.FallbackEncoder;
|
|
184
183
|
|
|
184
|
+
const customHeadersEnv = readEnv('POSTPEER_CUSTOM_HEADERS');
|
|
185
|
+
if (customHeadersEnv) {
|
|
186
|
+
const parsed: Record<string, string> = {};
|
|
187
|
+
for (const line of customHeadersEnv.split('\n')) {
|
|
188
|
+
const colon = line.indexOf(':');
|
|
189
|
+
if (colon >= 0) {
|
|
190
|
+
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
194
|
+
}
|
|
195
|
+
|
|
185
196
|
this._options = options;
|
|
186
197
|
|
|
187
198
|
this.apiKey = apiKey;
|
|
@@ -210,7 +221,7 @@ export class Postpeer {
|
|
|
210
221
|
* Check whether the base URL is set to its default.
|
|
211
222
|
*/
|
|
212
223
|
#baseURLOverridden(): boolean {
|
|
213
|
-
return this.baseURL !== 'https://api.
|
|
224
|
+
return this.baseURL !== 'https://api.postpeer.dev';
|
|
214
225
|
}
|
|
215
226
|
|
|
216
227
|
protected defaultQuery(): Record<string, string | undefined> | undefined {
|
|
@@ -761,7 +772,6 @@ export declare namespace Postpeer {
|
|
|
761
772
|
|
|
762
773
|
export {
|
|
763
774
|
Posts as Posts,
|
|
764
|
-
type PostSummary as PostSummary,
|
|
765
775
|
type Status as Status,
|
|
766
776
|
type PostCreateResponse as PostCreateResponse,
|
|
767
777
|
type PostRetrieveResponse as PostRetrieveResponse,
|