@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
package/src/resources/index.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Connect, type ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams } from './connect/connect'
|
|
4
|
-
export { Health, type HealthCheckResponse, type HealthVerifyAccessKeyResponse } from './health'
|
|
5
|
-
export { Media, type MediaUploadResponse, type MediaUploadParams } from './media'
|
|
6
|
-
export { Platforms, type PlatformListResponse } from './platforms'
|
|
7
|
-
export {
|
|
8
|
-
Posts,
|
|
9
|
-
type PostSummary,
|
|
10
|
-
type Status,
|
|
11
|
-
type PostCreateResponse,
|
|
12
|
-
type PostRetrieveResponse,
|
|
13
|
-
type PostListResponse,
|
|
14
|
-
type PostDeleteResponse,
|
|
15
|
-
type PostCreateParams,
|
|
16
|
-
type PostListParams,
|
|
17
|
-
} from './posts/posts';
|
|
3
|
+
export { Connect, type ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams } from './connect/connect';;
|
|
4
|
+
export { Health, type HealthCheckResponse, type HealthVerifyAccessKeyResponse } from './health';;
|
|
5
|
+
export { Media, type MediaUploadResponse, type MediaUploadParams } from './media';;
|
|
6
|
+
export { Platforms, type PlatformListResponse } from './platforms';;
|
|
7
|
+
export { Posts, type Status, type PostCreateResponse, type PostRetrieveResponse, type PostListResponse, type PostDeleteResponse, type PostCreateParams, type PostListParams } from './posts/posts';;
|
package/src/resources/media.ts
CHANGED
|
@@ -34,5 +34,8 @@ export interface MediaUploadParams {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export declare namespace Media {
|
|
37
|
-
export {
|
|
37
|
+
export {
|
|
38
|
+
type MediaUploadResponse as MediaUploadResponse,
|
|
39
|
+
type MediaUploadParams as MediaUploadParams
|
|
40
|
+
};
|
|
38
41
|
}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
type PostSummary,
|
|
6
|
-
type Status,
|
|
7
|
-
type PostCreateResponse,
|
|
8
|
-
type PostRetrieveResponse,
|
|
9
|
-
type PostListResponse,
|
|
10
|
-
type PostDeleteResponse,
|
|
11
|
-
type PostCreateParams,
|
|
12
|
-
type PostListParams,
|
|
13
|
-
} from './posts';
|
|
14
|
-
export {
|
|
15
|
-
Scheduled,
|
|
16
|
-
type ScheduledListResponse,
|
|
17
|
-
type ScheduledCancelResponse,
|
|
18
|
-
type ScheduledRescheduleResponse,
|
|
19
|
-
type ScheduledRescheduleParams,
|
|
20
|
-
} from './scheduled';
|
|
3
|
+
export { Posts, type Status, type PostCreateResponse, type PostRetrieveResponse, type PostListResponse, type PostDeleteResponse, type PostCreateParams, type PostListParams } from './posts';;
|
|
4
|
+
export { Scheduled, type ScheduledListResponse, type ScheduledCancelResponse, type ScheduledRescheduleResponse, type ScheduledRescheduleParams } from './scheduled';;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as PostsAPI from './posts';
|
|
5
4
|
import * as ScheduledAPI from './scheduled';
|
|
6
|
-
import {
|
|
7
|
-
Scheduled,
|
|
8
|
-
ScheduledCancelResponse,
|
|
9
|
-
ScheduledListResponse,
|
|
10
|
-
ScheduledRescheduleParams,
|
|
11
|
-
ScheduledRescheduleResponse,
|
|
12
|
-
} from './scheduled';
|
|
5
|
+
import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from './scheduled';
|
|
13
6
|
import { APIPromise } from '../../core/api-promise';
|
|
14
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
15
8
|
import { path } from '../../internal/utils/path';
|
|
@@ -56,10 +49,7 @@ export class Posts extends APIResource {
|
|
|
56
49
|
* const posts = await client.posts.list();
|
|
57
50
|
* ```
|
|
58
51
|
*/
|
|
59
|
-
list(
|
|
60
|
-
query: PostListParams | null | undefined = {},
|
|
61
|
-
options?: RequestOptions,
|
|
62
|
-
): APIPromise<PostListResponse> {
|
|
52
|
+
list(query: PostListParams | null | undefined = {}, options?: RequestOptions): APIPromise<PostListResponse> {
|
|
63
53
|
return this._client.get('/v1/posts/', { query, ...options });
|
|
64
54
|
}
|
|
65
55
|
|
|
@@ -76,68 +66,7 @@ export class Posts extends APIResource {
|
|
|
76
66
|
}
|
|
77
67
|
}
|
|
78
68
|
|
|
79
|
-
export
|
|
80
|
-
content: string;
|
|
81
|
-
|
|
82
|
-
createdAt: string;
|
|
83
|
-
|
|
84
|
-
crosspostingEnabled: boolean;
|
|
85
|
-
|
|
86
|
-
mediaItems: Array<PostSummary.MediaItem>;
|
|
87
|
-
|
|
88
|
-
platforms: Array<PostSummary.Platform>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* MongoDB ObjectId of the Post document
|
|
92
|
-
*/
|
|
93
|
-
postId: string;
|
|
94
|
-
|
|
95
|
-
rawRequestBody: { [key: string]: unknown };
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* ISO 8601 scheduled datetime
|
|
99
|
-
*/
|
|
100
|
-
scheduledFor: string | null;
|
|
101
|
-
|
|
102
|
-
status: Status;
|
|
103
|
-
|
|
104
|
-
timezone: string;
|
|
105
|
-
|
|
106
|
-
updatedAt: string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export namespace PostSummary {
|
|
110
|
-
export interface MediaItem {
|
|
111
|
-
filename: string;
|
|
112
|
-
|
|
113
|
-
mimeType: string;
|
|
114
|
-
|
|
115
|
-
size: number;
|
|
116
|
-
|
|
117
|
-
type: 'image' | 'video' | 'gif';
|
|
118
|
-
|
|
119
|
-
url: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface Platform {
|
|
123
|
-
errorMessage: string | null;
|
|
124
|
-
|
|
125
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
126
|
-
|
|
127
|
-
platformPostId: string | null;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Direct URL to the published post
|
|
131
|
-
*/
|
|
132
|
-
platformPostUrl: string | null;
|
|
133
|
-
|
|
134
|
-
publishedAt: string | null;
|
|
135
|
-
|
|
136
|
-
status: PostsAPI.Status;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
69
|
+
export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial'
|
|
141
70
|
|
|
142
71
|
export interface PostCreateResponse {
|
|
143
72
|
platforms: Array<PostCreateResponse.Platform>;
|
|
@@ -147,7 +76,7 @@ export interface PostCreateResponse {
|
|
|
147
76
|
*/
|
|
148
77
|
postId: string;
|
|
149
78
|
|
|
150
|
-
status:
|
|
79
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
151
80
|
|
|
152
81
|
/**
|
|
153
82
|
* false only when every platform failed
|
|
@@ -179,13 +108,76 @@ export namespace PostCreateResponse {
|
|
|
179
108
|
}
|
|
180
109
|
|
|
181
110
|
export interface PostRetrieveResponse {
|
|
182
|
-
post:
|
|
111
|
+
post: PostRetrieveResponse.Post;
|
|
183
112
|
|
|
184
113
|
success: boolean;
|
|
185
114
|
}
|
|
186
115
|
|
|
116
|
+
export namespace PostRetrieveResponse {
|
|
117
|
+
export interface Post {
|
|
118
|
+
content: string;
|
|
119
|
+
|
|
120
|
+
createdAt: string;
|
|
121
|
+
|
|
122
|
+
crosspostingEnabled: boolean;
|
|
123
|
+
|
|
124
|
+
mediaItems: Array<Post.MediaItem>;
|
|
125
|
+
|
|
126
|
+
platforms: Array<Post.Platform>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* MongoDB ObjectId of the Post document
|
|
130
|
+
*/
|
|
131
|
+
postId: string;
|
|
132
|
+
|
|
133
|
+
rawRequestBody: { [key: string]: unknown };
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* ISO 8601 scheduled datetime
|
|
137
|
+
*/
|
|
138
|
+
scheduledFor: string | null;
|
|
139
|
+
|
|
140
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
141
|
+
|
|
142
|
+
timezone: string;
|
|
143
|
+
|
|
144
|
+
updatedAt: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export namespace Post {
|
|
148
|
+
export interface MediaItem {
|
|
149
|
+
filename: string;
|
|
150
|
+
|
|
151
|
+
mimeType: string;
|
|
152
|
+
|
|
153
|
+
size: number;
|
|
154
|
+
|
|
155
|
+
type: 'image' | 'video' | 'gif';
|
|
156
|
+
|
|
157
|
+
url: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface Platform {
|
|
161
|
+
errorMessage: string | null;
|
|
162
|
+
|
|
163
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
164
|
+
|
|
165
|
+
platformPostId: string | null;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Direct URL to the published post
|
|
169
|
+
*/
|
|
170
|
+
platformPostUrl: string | null;
|
|
171
|
+
|
|
172
|
+
publishedAt: string | null;
|
|
173
|
+
|
|
174
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
187
179
|
export interface PostListResponse {
|
|
188
|
-
posts: Array<
|
|
180
|
+
posts: Array<PostListResponse.Post>;
|
|
189
181
|
|
|
190
182
|
success: boolean;
|
|
191
183
|
|
|
@@ -195,6 +187,69 @@ export interface PostListResponse {
|
|
|
195
187
|
total: number;
|
|
196
188
|
}
|
|
197
189
|
|
|
190
|
+
export namespace PostListResponse {
|
|
191
|
+
export interface Post {
|
|
192
|
+
content: string;
|
|
193
|
+
|
|
194
|
+
createdAt: string;
|
|
195
|
+
|
|
196
|
+
crosspostingEnabled: boolean;
|
|
197
|
+
|
|
198
|
+
mediaItems: Array<Post.MediaItem>;
|
|
199
|
+
|
|
200
|
+
platforms: Array<Post.Platform>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* MongoDB ObjectId of the Post document
|
|
204
|
+
*/
|
|
205
|
+
postId: string;
|
|
206
|
+
|
|
207
|
+
rawRequestBody: { [key: string]: unknown };
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* ISO 8601 scheduled datetime
|
|
211
|
+
*/
|
|
212
|
+
scheduledFor: string | null;
|
|
213
|
+
|
|
214
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
215
|
+
|
|
216
|
+
timezone: string;
|
|
217
|
+
|
|
218
|
+
updatedAt: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export namespace Post {
|
|
222
|
+
export interface MediaItem {
|
|
223
|
+
filename: string;
|
|
224
|
+
|
|
225
|
+
mimeType: string;
|
|
226
|
+
|
|
227
|
+
size: number;
|
|
228
|
+
|
|
229
|
+
type: 'image' | 'video' | 'gif';
|
|
230
|
+
|
|
231
|
+
url: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface Platform {
|
|
235
|
+
errorMessage: string | null;
|
|
236
|
+
|
|
237
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
238
|
+
|
|
239
|
+
platformPostId: string | null;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Direct URL to the published post
|
|
243
|
+
*/
|
|
244
|
+
platformPostUrl: string | null;
|
|
245
|
+
|
|
246
|
+
publishedAt: string | null;
|
|
247
|
+
|
|
248
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
198
253
|
export interface PostDeleteResponse {
|
|
199
254
|
success: boolean;
|
|
200
255
|
}
|
|
@@ -242,263 +297,10 @@ export namespace PostCreateParams {
|
|
|
242
297
|
|
|
243
298
|
/**
|
|
244
299
|
* Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
|
|
245
|
-
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
platformSpecificData?:
|
|
249
|
-
| Platform.TwitterConfigurations
|
|
250
|
-
| Platform.YouTubeConfigurations
|
|
251
|
-
| Platform.TikTokConfigurations
|
|
252
|
-
| Platform.PinterestConfigurations
|
|
253
|
-
| Platform.LinkedInConfigurations;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export namespace Platform {
|
|
257
|
-
/**
|
|
258
|
-
* Pass this object in platformSpecificData when posting to Twitter/X, including
|
|
259
|
-
* Community post options.
|
|
260
|
-
*/
|
|
261
|
-
export interface TwitterConfigurations {
|
|
262
|
-
/**
|
|
263
|
-
* Community ID to publish this post into.
|
|
264
|
-
*/
|
|
265
|
-
communityId?: string;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Cannot be combined with media or threadItems.
|
|
269
|
-
*/
|
|
270
|
-
poll?: TwitterConfigurations.Poll;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Who can reply to this tweet.
|
|
274
|
-
*/
|
|
275
|
-
replySettings?: 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Tweet ID to reply to.
|
|
279
|
-
*/
|
|
280
|
-
replyToTweetId?: string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* When posting to a Community, also share the post with followers.
|
|
284
|
-
*/
|
|
285
|
-
shareWithFollowers?: boolean;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Additional tweets to chain as a thread. The root tweet uses post.content.
|
|
289
|
-
*/
|
|
290
|
-
threadItems?: Array<TwitterConfigurations.ThreadItem>;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export namespace TwitterConfigurations {
|
|
294
|
-
/**
|
|
295
|
-
* Cannot be combined with media or threadItems.
|
|
296
|
-
*/
|
|
297
|
-
export interface Poll {
|
|
298
|
-
/**
|
|
299
|
-
* Poll duration in minutes (5 min – 7 days).
|
|
300
|
-
*/
|
|
301
|
-
duration_minutes: number;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* 2–4 poll options.
|
|
305
|
-
*/
|
|
306
|
-
options: Array<string>;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export interface ThreadItem {
|
|
310
|
-
/**
|
|
311
|
-
* Text of this thread tweet (max 280 chars)
|
|
312
|
-
*/
|
|
313
|
-
content: string;
|
|
314
|
-
|
|
315
|
-
mediaItems?: Array<ThreadItem.MediaItem>;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export namespace ThreadItem {
|
|
319
|
-
export interface MediaItem {
|
|
320
|
-
type: 'image' | 'video' | 'gif';
|
|
321
|
-
|
|
322
|
-
url: string;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Pass this object in platformSpecificData when posting to YouTube.
|
|
329
|
-
*/
|
|
330
|
-
export interface YouTubeConfigurations {
|
|
331
|
-
/**
|
|
332
|
-
* YouTube category ID. Defaults to "22" (People & Blogs). Common values: "1" Film
|
|
333
|
-
* & Animation, "10" Music, "20" Gaming, "22" People & Blogs, "27" Education, "28"
|
|
334
|
-
* Science & Technology.
|
|
335
|
-
*/
|
|
336
|
-
categoryId?: string;
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* AI-generated content disclosure. YouTube is increasingly enforcing this
|
|
340
|
-
* requirement. Defaults to false.
|
|
341
|
-
*/
|
|
342
|
-
containsSyntheticMedia?: boolean;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Auto-posted comment after the video goes live. Max 10,000 characters. For
|
|
346
|
-
* publishNow posts: posted immediately after upload. For scheduled posts: posted
|
|
347
|
-
* when the video becomes public.
|
|
348
|
-
*/
|
|
349
|
-
firstComment?: string;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* COPPA compliance flag. Setting to true permanently disables comments,
|
|
353
|
-
* notification bell, personalized ads, end screens, and cards on the video.
|
|
354
|
-
* Defaults to false.
|
|
355
|
-
*/
|
|
356
|
-
madeForKids?: boolean;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Video tags. Total characters across all tags must be ≤500.
|
|
360
|
-
*/
|
|
361
|
-
tags?: Array<string>;
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Video title (max 100 chars, no < or >). Defaults to first 100 chars of content,
|
|
365
|
-
* or "Untitled Video".
|
|
366
|
-
*/
|
|
367
|
-
title?: string;
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Who can see the video. Defaults to "public". Scheduled posts upload as private
|
|
371
|
-
* and flip to this value at publish time.
|
|
372
|
-
*/
|
|
373
|
-
visibility?: 'public' | 'private' | 'unlisted';
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Pass this object in platformSpecificData when posting to TikTok.
|
|
300
|
+
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
|
|
301
|
+
* schema reference for available fields per platform.
|
|
378
302
|
*/
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Automatically add background music to photo carousels. Photo posts only.
|
|
382
|
-
* Defaults to true.
|
|
383
|
-
*/
|
|
384
|
-
auto_add_music?: boolean;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Mark as branded content (paid partnership). Defaults to false.
|
|
388
|
-
*/
|
|
389
|
-
brand_content_toggle?: boolean;
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Mark as organic brand promotion. Defaults to false.
|
|
393
|
-
*/
|
|
394
|
-
brand_organic_toggle?: boolean;
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Disable comments on this post. Defaults to false.
|
|
398
|
-
*/
|
|
399
|
-
disable_comment?: boolean;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Disable duet for this video. Videos only. Defaults to false.
|
|
403
|
-
*/
|
|
404
|
-
disable_duet?: boolean;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Disable stitch for this video. Videos only. Defaults to false.
|
|
408
|
-
*/
|
|
409
|
-
disable_stitch?: boolean;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* When true (default), sends content to the creator's TikTok inbox as a draft. Set
|
|
413
|
-
* to false to publish immediately (requires an audited app).
|
|
414
|
-
*/
|
|
415
|
-
draft?: boolean;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* AI-generated content disclosure. Defaults to false.
|
|
419
|
-
*/
|
|
420
|
-
is_aigc?: boolean;
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* 0-indexed position of the cover image in a photo carousel. Photo posts only.
|
|
424
|
-
* Defaults to 0.
|
|
425
|
-
*/
|
|
426
|
-
photo_cover_index?: number;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Who can see this post. Defaults to "SELF_ONLY" (required for unreviewed apps).
|
|
430
|
-
* Upgrade to PUBLIC_TO_EVERYONE after TikTok app review.
|
|
431
|
-
*/
|
|
432
|
-
privacy_level?: 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY';
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Timestamp in milliseconds to use as the video cover frame. Videos only. Defaults
|
|
436
|
-
* to 1000ms.
|
|
437
|
-
*/
|
|
438
|
-
video_cover_timestamp_ms?: number;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Pass this object in platformSpecificData when posting to Pinterest.
|
|
443
|
-
*/
|
|
444
|
-
export interface PinterestConfigurations {
|
|
445
|
-
/**
|
|
446
|
-
* Target board ID. Retrieve available boards via GET /connect/pinterest/boards.
|
|
447
|
-
*/
|
|
448
|
-
boardId: string;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Accessible image description. Max 500 characters.
|
|
452
|
-
*/
|
|
453
|
-
altText?: string;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Custom cover image URL for video pins.
|
|
457
|
-
*/
|
|
458
|
-
coverImageUrl?: string;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Hex color for the loading placeholder (e.g. "#6E7874").
|
|
462
|
-
*/
|
|
463
|
-
dominantColor?: string;
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* HTTPS destination URL when the pin is clicked. Important for driving traffic.
|
|
467
|
-
*/
|
|
468
|
-
link?: string;
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Pin title. Max 100 characters. Defaults to first line of content.
|
|
472
|
-
*/
|
|
473
|
-
title?: string;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Pass this object in platformSpecificData when posting to LinkedIn.
|
|
478
|
-
*/
|
|
479
|
-
export interface LinkedInConfigurations {
|
|
480
|
-
/**
|
|
481
|
-
* Description for the article preview card. Max 400 characters.
|
|
482
|
-
*/
|
|
483
|
-
article_description?: string;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Title for the article preview card. Max 400 characters.
|
|
487
|
-
*/
|
|
488
|
-
article_title?: string;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* URL for an article/link post. When provided, the post becomes a link share with
|
|
492
|
-
* a preview card.
|
|
493
|
-
*/
|
|
494
|
-
article_url?: string;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Post visibility. "PUBLIC" = visible to everyone, "CONNECTIONS" = visible to
|
|
498
|
-
* connections only. Defaults to "PUBLIC".
|
|
499
|
-
*/
|
|
500
|
-
visibility?: 'PUBLIC' | 'CONNECTIONS';
|
|
501
|
-
}
|
|
303
|
+
platformSpecificData?: { [key: string]: unknown };
|
|
502
304
|
}
|
|
503
305
|
|
|
504
306
|
export interface MediaItem {
|
|
@@ -550,26 +352,22 @@ export interface PostListParams {
|
|
|
550
352
|
*/
|
|
551
353
|
scheduledBefore?: string;
|
|
552
354
|
|
|
553
|
-
/**
|
|
554
|
-
* Sort direction by createdAt
|
|
555
|
-
*/
|
|
556
355
|
sort?: 'asc' | 'desc';
|
|
557
356
|
|
|
558
|
-
status?:
|
|
357
|
+
status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
559
358
|
}
|
|
560
359
|
|
|
561
360
|
Posts.Scheduled = Scheduled;
|
|
562
361
|
|
|
563
362
|
export declare namespace Posts {
|
|
564
363
|
export {
|
|
565
|
-
type PostSummary as PostSummary,
|
|
566
364
|
type Status as Status,
|
|
567
365
|
type PostCreateResponse as PostCreateResponse,
|
|
568
366
|
type PostRetrieveResponse as PostRetrieveResponse,
|
|
569
367
|
type PostListResponse as PostListResponse,
|
|
570
368
|
type PostDeleteResponse as PostDeleteResponse,
|
|
571
369
|
type PostCreateParams as PostCreateParams,
|
|
572
|
-
type PostListParams as PostListParams
|
|
370
|
+
type PostListParams as PostListParams
|
|
573
371
|
};
|
|
574
372
|
|
|
575
373
|
export {
|
|
@@ -577,6 +375,6 @@ export declare namespace Posts {
|
|
|
577
375
|
type ScheduledListResponse as ScheduledListResponse,
|
|
578
376
|
type ScheduledCancelResponse as ScheduledCancelResponse,
|
|
579
377
|
type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
|
|
580
|
-
type ScheduledRescheduleParams as ScheduledRescheduleParams
|
|
378
|
+
type ScheduledRescheduleParams as ScheduledRescheduleParams
|
|
581
379
|
};
|
|
582
380
|
}
|
|
@@ -43,11 +43,7 @@ export class Scheduled extends APIResource {
|
|
|
43
43
|
* );
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
reschedule(
|
|
47
|
-
postID: string,
|
|
48
|
-
body: ScheduledRescheduleParams,
|
|
49
|
-
options?: RequestOptions,
|
|
50
|
-
): APIPromise<ScheduledRescheduleResponse> {
|
|
46
|
+
reschedule(postID: string, body: ScheduledRescheduleParams, options?: RequestOptions): APIPromise<ScheduledRescheduleResponse> {
|
|
51
47
|
return this._client.patch(path`/v1/posts/scheduled/${postID}`, { body, ...options });
|
|
52
48
|
}
|
|
53
49
|
}
|
|
@@ -92,15 +88,9 @@ export namespace ScheduledListResponse {
|
|
|
92
88
|
|
|
93
89
|
export namespace Post {
|
|
94
90
|
export interface Platform {
|
|
95
|
-
|
|
96
|
-
* Platform name (twitter, instagram, youtube)
|
|
97
|
-
*/
|
|
98
|
-
platform: string;
|
|
91
|
+
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin';
|
|
99
92
|
|
|
100
|
-
|
|
101
|
-
* Current status of this platform target
|
|
102
|
-
*/
|
|
103
|
-
status: string;
|
|
93
|
+
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
export interface MediaItem {
|
|
@@ -148,6 +138,6 @@ export declare namespace Scheduled {
|
|
|
148
138
|
type ScheduledListResponse as ScheduledListResponse,
|
|
149
139
|
type ScheduledCancelResponse as ScheduledCancelResponse,
|
|
150
140
|
type ScheduledRescheduleResponse as ScheduledRescheduleResponse,
|
|
151
|
-
type ScheduledRescheduleParams as ScheduledRescheduleParams
|
|
141
|
+
type ScheduledRescheduleParams as ScheduledRescheduleParams
|
|
152
142
|
};
|
|
153
143
|
}
|
package/src/uploads.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @deprecated Import from ./core/uploads instead */
|
|
2
|
-
export * from
|
|
2
|
+
export * from "./core/uploads"
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.5.0';// x-release-please-version
|
package/uploads.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA8B"}
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,OAAO,CAAC,CAAA,2BAA2B"}
|