posterly-mcp-server 0.24.1 → 0.26.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/README.md +8 -2
- package/dist/generated/platform-manifest.d.ts +24 -24
- package/dist/generated/platform-manifest.js +30 -24
- package/dist/index.js +60 -0
- package/dist/lib/api-client.d.ts +66 -1
- package/dist/lib/api-client.js +26 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/cancel-subscription.d.ts +30 -0
- package/dist/tools/cancel-subscription.js +41 -0
- package/dist/tools/create-api-key.d.ts +3 -3
- package/dist/tools/create-api-key.js +2 -2
- package/dist/tools/create-connect-session.d.ts +2 -2
- package/dist/tools/create-post.d.ts +27 -9
- package/dist/tools/create-post.js +1 -0
- package/dist/tools/create-posts-batch.d.ts +12 -5
- package/dist/tools/downgrade-subscription.d.ts +20 -0
- package/dist/tools/downgrade-subscription.js +23 -0
- package/dist/tools/get-connect-link.d.ts +2 -2
- package/dist/tools/get-platform-schema.d.ts +2 -2
- package/dist/tools/get-subscription.d.ts +8 -0
- package/dist/tools/get-subscription.js +26 -0
- package/dist/tools/get-updates.d.ts +24 -0
- package/dist/tools/get-updates.js +29 -0
- package/dist/tools/list-posts.d.ts +3 -3
- package/dist/tools/pause-subscription.d.ts +16 -0
- package/dist/tools/pause-subscription.js +21 -0
- package/dist/tools/resume-subscription.d.ts +8 -0
- package/dist/tools/resume-subscription.js +11 -0
- package/dist/tools/trigger-platform-helper.d.ts +3 -3
- package/dist/tools/update-post.d.ts +8 -0
- package/dist/tools/update-post.js +1 -0
- package/package.json +1 -1
- package/src/generated/platform-manifest.ts +30 -24
- package/src/index.ts +90 -0
- package/src/lib/api-client.ts +99 -1
- package/src/lib/version.ts +1 -1
- package/src/tools/cancel-subscription.ts +50 -0
- package/src/tools/create-api-key.ts +2 -2
- package/src/tools/create-post.ts +1 -0
- package/src/tools/downgrade-subscription.ts +29 -0
- package/src/tools/get-subscription.ts +31 -0
- package/src/tools/get-updates.ts +41 -0
- package/src/tools/pause-subscription.ts +26 -0
- package/src/tools/resume-subscription.ts +15 -0
- package/src/tools/update-post.ts +1 -0
|
@@ -9,12 +9,12 @@ export declare const createConnectSessionTool: {
|
|
|
9
9
|
auto_start: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
debug: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
platform: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
12
|
+
platform: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter";
|
|
13
13
|
workspace_id?: string | undefined;
|
|
14
14
|
auto_start?: boolean | undefined;
|
|
15
15
|
debug?: boolean | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
platform: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
17
|
+
platform: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter";
|
|
18
18
|
workspace_id?: string | undefined;
|
|
19
19
|
auto_start?: boolean | undefined;
|
|
20
20
|
debug?: boolean | undefined;
|
|
@@ -117,6 +117,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
117
117
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
118
118
|
title: z.ZodOptional<z.ZodString>;
|
|
119
119
|
media_type: z.ZodOptional<z.ZodString>;
|
|
120
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
120
121
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
121
122
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
122
123
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -193,6 +194,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
193
194
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
194
195
|
title: z.ZodOptional<z.ZodString>;
|
|
195
196
|
media_type: z.ZodOptional<z.ZodString>;
|
|
197
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
196
198
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
197
199
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
198
200
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -269,6 +271,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
269
271
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
270
272
|
title: z.ZodOptional<z.ZodString>;
|
|
271
273
|
media_type: z.ZodOptional<z.ZodString>;
|
|
274
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
272
275
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
273
276
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
274
277
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -306,7 +309,7 @@ export declare const platformSettingsSchema: z.ZodObject<{
|
|
|
306
309
|
export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
307
310
|
account_id: z.ZodOptional<z.ZodString>;
|
|
308
311
|
username: z.ZodOptional<z.ZodString>;
|
|
309
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
312
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
310
313
|
caption: z.ZodOptional<z.ZodString>;
|
|
311
314
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
312
315
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -430,6 +433,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
430
433
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
431
434
|
title: z.ZodOptional<z.ZodString>;
|
|
432
435
|
media_type: z.ZodOptional<z.ZodString>;
|
|
436
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
433
437
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
434
438
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
435
439
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -506,6 +510,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
506
510
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
507
511
|
title: z.ZodOptional<z.ZodString>;
|
|
508
512
|
media_type: z.ZodOptional<z.ZodString>;
|
|
513
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
509
514
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
510
515
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
511
516
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -582,6 +587,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
582
587
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
583
588
|
title: z.ZodOptional<z.ZodString>;
|
|
584
589
|
media_type: z.ZodOptional<z.ZodString>;
|
|
590
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
585
591
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
586
592
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
587
593
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -619,7 +625,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
619
625
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
620
626
|
}, "strip", z.ZodTypeAny, {
|
|
621
627
|
workspace_id?: string | undefined;
|
|
622
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
628
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
623
629
|
account_id?: string | undefined;
|
|
624
630
|
scheduled_at?: string | undefined;
|
|
625
631
|
media_url?: string | undefined;
|
|
@@ -691,6 +697,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
691
697
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
692
698
|
title: z.ZodOptional<z.ZodString>;
|
|
693
699
|
media_type: z.ZodOptional<z.ZodString>;
|
|
700
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
694
701
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
695
702
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
696
703
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -727,7 +734,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
727
734
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
728
735
|
}, {
|
|
729
736
|
workspace_id?: string | undefined;
|
|
730
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
737
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
731
738
|
account_id?: string | undefined;
|
|
732
739
|
scheduled_at?: string | undefined;
|
|
733
740
|
media_url?: string | undefined;
|
|
@@ -799,6 +806,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
799
806
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
800
807
|
title: z.ZodOptional<z.ZodString>;
|
|
801
808
|
media_type: z.ZodOptional<z.ZodString>;
|
|
809
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
802
810
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
803
811
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
804
812
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -837,7 +845,7 @@ export declare const createPostPayloadInputSchema: z.ZodObject<{
|
|
|
837
845
|
export declare const createPostInputSchema: z.ZodObject<{
|
|
838
846
|
account_id: z.ZodOptional<z.ZodString>;
|
|
839
847
|
username: z.ZodOptional<z.ZodString>;
|
|
840
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
848
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
841
849
|
caption: z.ZodOptional<z.ZodString>;
|
|
842
850
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
843
851
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -961,6 +969,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
961
969
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
962
970
|
title: z.ZodOptional<z.ZodString>;
|
|
963
971
|
media_type: z.ZodOptional<z.ZodString>;
|
|
972
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
964
973
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
965
974
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
966
975
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1037,6 +1046,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1037
1046
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1038
1047
|
title: z.ZodOptional<z.ZodString>;
|
|
1039
1048
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1040
1050
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1041
1051
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1042
1052
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1113,6 +1123,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1113
1123
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1114
1124
|
title: z.ZodOptional<z.ZodString>;
|
|
1115
1125
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1126
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1116
1127
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1117
1128
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1118
1129
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1153,7 +1164,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1153
1164
|
}, "strip", z.ZodTypeAny, {
|
|
1154
1165
|
confirm: true;
|
|
1155
1166
|
workspace_id?: string | undefined;
|
|
1156
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1167
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1157
1168
|
account_id?: string | undefined;
|
|
1158
1169
|
scheduled_at?: string | undefined;
|
|
1159
1170
|
media_url?: string | undefined;
|
|
@@ -1225,6 +1236,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1225
1236
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1226
1237
|
title: z.ZodOptional<z.ZodString>;
|
|
1227
1238
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1239
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1228
1240
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1229
1241
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1230
1242
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1262,7 +1274,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1262
1274
|
}, {
|
|
1263
1275
|
confirm: true;
|
|
1264
1276
|
workspace_id?: string | undefined;
|
|
1265
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1277
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1266
1278
|
account_id?: string | undefined;
|
|
1267
1279
|
scheduled_at?: string | undefined;
|
|
1268
1280
|
media_url?: string | undefined;
|
|
@@ -1334,6 +1346,7 @@ export declare const createPostInputSchema: z.ZodObject<{
|
|
|
1334
1346
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1335
1347
|
title: z.ZodOptional<z.ZodString>;
|
|
1336
1348
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1337
1350
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1338
1351
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1339
1352
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1378,7 +1391,7 @@ export declare const createPostTool: {
|
|
|
1378
1391
|
inputSchema: z.ZodObject<{
|
|
1379
1392
|
account_id: z.ZodOptional<z.ZodString>;
|
|
1380
1393
|
username: z.ZodOptional<z.ZodString>;
|
|
1381
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
1394
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
1382
1395
|
caption: z.ZodOptional<z.ZodString>;
|
|
1383
1396
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
1384
1397
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1502,6 +1515,7 @@ export declare const createPostTool: {
|
|
|
1502
1515
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1503
1516
|
title: z.ZodOptional<z.ZodString>;
|
|
1504
1517
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1518
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1505
1519
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1506
1520
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1507
1521
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1578,6 +1592,7 @@ export declare const createPostTool: {
|
|
|
1578
1592
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1579
1593
|
title: z.ZodOptional<z.ZodString>;
|
|
1580
1594
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1595
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1581
1596
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1582
1597
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1583
1598
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1654,6 +1669,7 @@ export declare const createPostTool: {
|
|
|
1654
1669
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1655
1670
|
title: z.ZodOptional<z.ZodString>;
|
|
1656
1671
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1657
1673
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1658
1674
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1659
1675
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1694,7 +1710,7 @@ export declare const createPostTool: {
|
|
|
1694
1710
|
}, "strip", z.ZodTypeAny, {
|
|
1695
1711
|
confirm: true;
|
|
1696
1712
|
workspace_id?: string | undefined;
|
|
1697
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1713
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1698
1714
|
account_id?: string | undefined;
|
|
1699
1715
|
scheduled_at?: string | undefined;
|
|
1700
1716
|
media_url?: string | undefined;
|
|
@@ -1766,6 +1782,7 @@ export declare const createPostTool: {
|
|
|
1766
1782
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1767
1783
|
title: z.ZodOptional<z.ZodString>;
|
|
1768
1784
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1785
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1769
1786
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1770
1787
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1771
1788
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1803,7 +1820,7 @@ export declare const createPostTool: {
|
|
|
1803
1820
|
}, {
|
|
1804
1821
|
confirm: true;
|
|
1805
1822
|
workspace_id?: string | undefined;
|
|
1806
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1823
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
1807
1824
|
account_id?: string | undefined;
|
|
1808
1825
|
scheduled_at?: string | undefined;
|
|
1809
1826
|
media_url?: string | undefined;
|
|
@@ -1875,6 +1892,7 @@ export declare const createPostTool: {
|
|
|
1875
1892
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
1876
1893
|
title: z.ZodOptional<z.ZodString>;
|
|
1877
1894
|
media_type: z.ZodOptional<z.ZodString>;
|
|
1895
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
1878
1896
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
1879
1897
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
1880
1898
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -53,6 +53,7 @@ export const platformSettingsSchema = z.object({
|
|
|
53
53
|
allow_stitch: z.boolean().optional(),
|
|
54
54
|
title: z.string().optional(),
|
|
55
55
|
media_type: z.string().optional(), // TikTok: 'PHOTO' forces a photo slideshow; image media is auto-detected when omitted
|
|
56
|
+
video_cover_timestamp_ms: z.number().nonnegative().optional(), // TikTok: millisecond timestamp of the video frame to use as the cover (direct post only)
|
|
56
57
|
is_commercial_content: z.boolean().optional(),
|
|
57
58
|
is_your_brand: z.boolean().optional(),
|
|
58
59
|
is_branded_content: z.boolean().optional(),
|
|
@@ -8,7 +8,7 @@ export declare const createPostsBatchTool: {
|
|
|
8
8
|
posts: z.ZodArray<z.ZodObject<{
|
|
9
9
|
account_id: z.ZodOptional<z.ZodString>;
|
|
10
10
|
username: z.ZodOptional<z.ZodString>;
|
|
11
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
11
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
12
12
|
caption: z.ZodOptional<z.ZodString>;
|
|
13
13
|
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
14
14
|
media_url: z.ZodOptional<z.ZodString>;
|
|
@@ -132,6 +132,7 @@ export declare const createPostsBatchTool: {
|
|
|
132
132
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
title: z.ZodOptional<z.ZodString>;
|
|
134
134
|
media_type: z.ZodOptional<z.ZodString>;
|
|
135
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
135
136
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
136
137
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
137
138
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -208,6 +209,7 @@ export declare const createPostsBatchTool: {
|
|
|
208
209
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
209
210
|
title: z.ZodOptional<z.ZodString>;
|
|
210
211
|
media_type: z.ZodOptional<z.ZodString>;
|
|
212
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
211
213
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
212
214
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
213
215
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -284,6 +286,7 @@ export declare const createPostsBatchTool: {
|
|
|
284
286
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
285
287
|
title: z.ZodOptional<z.ZodString>;
|
|
286
288
|
media_type: z.ZodOptional<z.ZodString>;
|
|
289
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
287
290
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
288
291
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
289
292
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -321,7 +324,7 @@ export declare const createPostsBatchTool: {
|
|
|
321
324
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
322
325
|
}, "strip", z.ZodTypeAny, {
|
|
323
326
|
workspace_id?: string | undefined;
|
|
324
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
327
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
325
328
|
account_id?: string | undefined;
|
|
326
329
|
scheduled_at?: string | undefined;
|
|
327
330
|
media_url?: string | undefined;
|
|
@@ -393,6 +396,7 @@ export declare const createPostsBatchTool: {
|
|
|
393
396
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
394
397
|
title: z.ZodOptional<z.ZodString>;
|
|
395
398
|
media_type: z.ZodOptional<z.ZodString>;
|
|
399
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
396
400
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
397
401
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
398
402
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -429,7 +433,7 @@ export declare const createPostsBatchTool: {
|
|
|
429
433
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
430
434
|
}, {
|
|
431
435
|
workspace_id?: string | undefined;
|
|
432
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
436
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
433
437
|
account_id?: string | undefined;
|
|
434
438
|
scheduled_at?: string | undefined;
|
|
435
439
|
media_url?: string | undefined;
|
|
@@ -501,6 +505,7 @@ export declare const createPostsBatchTool: {
|
|
|
501
505
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
502
506
|
title: z.ZodOptional<z.ZodString>;
|
|
503
507
|
media_type: z.ZodOptional<z.ZodString>;
|
|
508
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
504
509
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
505
510
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
506
511
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -541,7 +546,7 @@ export declare const createPostsBatchTool: {
|
|
|
541
546
|
confirm: true;
|
|
542
547
|
posts: {
|
|
543
548
|
workspace_id?: string | undefined;
|
|
544
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
549
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
545
550
|
account_id?: string | undefined;
|
|
546
551
|
scheduled_at?: string | undefined;
|
|
547
552
|
media_url?: string | undefined;
|
|
@@ -613,6 +618,7 @@ export declare const createPostsBatchTool: {
|
|
|
613
618
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
614
619
|
title: z.ZodOptional<z.ZodString>;
|
|
615
620
|
media_type: z.ZodOptional<z.ZodString>;
|
|
621
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
616
622
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
617
623
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
618
624
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -652,7 +658,7 @@ export declare const createPostsBatchTool: {
|
|
|
652
658
|
confirm: true;
|
|
653
659
|
posts: {
|
|
654
660
|
workspace_id?: string | undefined;
|
|
655
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
661
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
656
662
|
account_id?: string | undefined;
|
|
657
663
|
scheduled_at?: string | undefined;
|
|
658
664
|
media_url?: string | undefined;
|
|
@@ -724,6 +730,7 @@ export declare const createPostsBatchTool: {
|
|
|
724
730
|
allow_stitch: z.ZodOptional<z.ZodBoolean>;
|
|
725
731
|
title: z.ZodOptional<z.ZodString>;
|
|
726
732
|
media_type: z.ZodOptional<z.ZodString>;
|
|
733
|
+
video_cover_timestamp_ms: z.ZodOptional<z.ZodNumber>;
|
|
727
734
|
is_commercial_content: z.ZodOptional<z.ZodBoolean>;
|
|
728
735
|
is_your_brand: z.ZodOptional<z.ZodBoolean>;
|
|
729
736
|
is_branded_content: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient, SubscriptionTierName } from '../lib/api-client.js';
|
|
3
|
+
export declare const downgradeSubscriptionTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
tier: z.ZodOptional<z.ZodEnum<["starter", "pro", "power_user", "agency"]>>;
|
|
8
|
+
confirm: z.ZodLiteral<true>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
confirm: true;
|
|
11
|
+
tier?: "starter" | "pro" | "power_user" | "agency" | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
confirm: true;
|
|
14
|
+
tier?: "starter" | "pro" | "power_user" | "agency" | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
execute(client: PosterlyClient, input: {
|
|
17
|
+
tier?: SubscriptionTierName;
|
|
18
|
+
confirm: true;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { mdKeyValue, mdSection, mdTitle } from '../lib/format.js';
|
|
3
|
+
const TIER_VALUES = ['starter', 'pro', 'power_user', 'agency'];
|
|
4
|
+
function formatDowngraded(result) {
|
|
5
|
+
return [
|
|
6
|
+
mdTitle('Subscription downgrade scheduled'),
|
|
7
|
+
mdSection('Details', mdKeyValue([
|
|
8
|
+
['New tier at next renewal', result.tier],
|
|
9
|
+
])),
|
|
10
|
+
].join('\n\n');
|
|
11
|
+
}
|
|
12
|
+
export const downgradeSubscriptionTool = {
|
|
13
|
+
name: 'downgrade_subscription',
|
|
14
|
+
description: "Downgrade the authenticated user's posterly subscription one tier (or to an explicit lower `tier`) at the next renewal with no proration. Billing action; requires the billing:write scope. Only call after the user explicitly confirms.",
|
|
15
|
+
inputSchema: z.object({
|
|
16
|
+
tier: z.enum(TIER_VALUES).optional().describe('Optional explicit target tier. Omit to drop one tier automatically.'),
|
|
17
|
+
confirm: z.literal(true).describe('Must be true after the user explicitly confirms the downgrade.'),
|
|
18
|
+
}),
|
|
19
|
+
async execute(client, input) {
|
|
20
|
+
const result = await client.downgradeSubscription({ tier: input.tier });
|
|
21
|
+
return formatDowngraded(result);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -11,12 +11,12 @@ export declare const getConnectLinkTool: {
|
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
workspace_id?: string | undefined;
|
|
13
13
|
include_planned?: boolean | undefined;
|
|
14
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
14
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter" | undefined;
|
|
15
15
|
debug?: boolean | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
workspace_id?: string | undefined;
|
|
18
18
|
include_planned?: boolean | undefined;
|
|
19
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
19
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | "meta" | "linkedin_page" | "facebook_instagram" | "facebook_pages" | "instagram_direct" | "linkedin-company" | "linkedin-page" | "linkedin_company" | "linkedin_personal" | "meta_business" | "x_twitter" | undefined;
|
|
20
20
|
debug?: boolean | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
execute(client: PosterlyClient, input: {
|
|
@@ -9,11 +9,11 @@ export declare const getPlatformSchemaTool: {
|
|
|
9
9
|
include_planned: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
include_planned?: boolean | undefined;
|
|
12
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
12
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
13
13
|
account_id?: string | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
include_planned?: boolean | undefined;
|
|
16
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "
|
|
16
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "reddit" | "medium" | "skool" | "whop" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
17
17
|
account_id?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
execute(client: PosterlyClient, input: {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const getSubscriptionTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
execute(client: PosterlyClient): Promise<string>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { formatDateTime, mdKeyValue, mdSection, mdTitle } from '../lib/format.js';
|
|
3
|
+
function formatSubscription(result) {
|
|
4
|
+
const sub = result.subscription;
|
|
5
|
+
return [
|
|
6
|
+
mdTitle('posterly subscription'),
|
|
7
|
+
mdSection('Details', mdKeyValue([
|
|
8
|
+
['Status', sub.status || 'unknown'],
|
|
9
|
+
['Tier', sub.tier || 'unknown'],
|
|
10
|
+
['Cancel at period end', sub.cancel_at_period_end ? 'yes' : 'no'],
|
|
11
|
+
['Current period end', sub.current_period_end ? formatDateTime(sub.current_period_end) : 'n/a'],
|
|
12
|
+
['Trial ends', sub.trial_ends_at ? formatDateTime(sub.trial_ends_at) : 'n/a'],
|
|
13
|
+
['Paused at', sub.paused_at ? formatDateTime(sub.paused_at) : 'n/a'],
|
|
14
|
+
['Pause resumes at', sub.pause_resumes_at ? formatDateTime(sub.pause_resumes_at) : 'n/a'],
|
|
15
|
+
])),
|
|
16
|
+
].join('\n\n');
|
|
17
|
+
}
|
|
18
|
+
export const getSubscriptionTool = {
|
|
19
|
+
name: 'get_subscription',
|
|
20
|
+
description: "Get the authenticated user's posterly subscription: status, tier, cancel-at-period-end, current period end, trial end, and pause state. Read-only. Requires the billing:read scope.",
|
|
21
|
+
inputSchema: z.object({}),
|
|
22
|
+
async execute(client) {
|
|
23
|
+
const result = await client.getSubscription();
|
|
24
|
+
return formatSubscription(result);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const getUpdatesTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
since: z.ZodOptional<z.ZodString>;
|
|
9
|
+
include_content: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
limit?: number | undefined;
|
|
12
|
+
since?: string | undefined;
|
|
13
|
+
include_content?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
since?: string | undefined;
|
|
17
|
+
include_content?: boolean | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
execute(client: PosterlyClient, input: {
|
|
20
|
+
limit?: number;
|
|
21
|
+
since?: string;
|
|
22
|
+
include_content?: boolean;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const getUpdatesTool = {
|
|
3
|
+
name: 'get_updates',
|
|
4
|
+
description: 'Get the latest posterly product updates and news from the updates feed: new features, improvements, and fixes. Requires an active posterly subscription.',
|
|
5
|
+
inputSchema: z.object({
|
|
6
|
+
limit: z.number().int().min(1).max(50).optional().describe('Number of updates to return. Default 10, max 50.'),
|
|
7
|
+
since: z.string().optional().describe('ISO date. Return updates published on or after this date.'),
|
|
8
|
+
include_content: z.boolean().optional().describe('Include the full markdown body of each update. Defaults to false.'),
|
|
9
|
+
}),
|
|
10
|
+
async execute(client, input) {
|
|
11
|
+
const result = await client.getUpdates(input);
|
|
12
|
+
if (result.updates.length === 0) {
|
|
13
|
+
return 'No posterly updates found.';
|
|
14
|
+
}
|
|
15
|
+
const lines = [`Latest posterly updates (${result.updates.length}):`];
|
|
16
|
+
for (const update of result.updates) {
|
|
17
|
+
const meta = [update.date, update.version ? `v${update.version}` : null, update.type]
|
|
18
|
+
.filter(Boolean)
|
|
19
|
+
.join(', ');
|
|
20
|
+
lines.push(`- ${update.title} [${meta}]${update.summary ? `: ${update.summary}` : ''}`);
|
|
21
|
+
if (update.url)
|
|
22
|
+
lines.push(` ${update.url}`);
|
|
23
|
+
if (update.content) {
|
|
24
|
+
lines.push('', update.content.trim(), '');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return lines.join('\n');
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -5,20 +5,20 @@ export declare const listPostsTool: {
|
|
|
5
5
|
description: string;
|
|
6
6
|
inputSchema: z.ZodObject<{
|
|
7
7
|
status: z.ZodOptional<z.ZodString>;
|
|
8
|
-
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
8
|
+
platform: z.ZodOptional<z.ZodEnum<["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"]>>;
|
|
9
9
|
account_id: z.ZodOptional<z.ZodString>;
|
|
10
10
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
11
11
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
status?: string | undefined;
|
|
14
14
|
workspace_id?: string | undefined;
|
|
15
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
15
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
16
16
|
account_id?: string | undefined;
|
|
17
17
|
limit?: number | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
status?: string | undefined;
|
|
20
20
|
workspace_id?: string | undefined;
|
|
21
|
-
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
21
|
+
platform?: "instagram" | "instagram-standalone" | "facebook" | "tiktok" | "twitter" | "threads" | "linkedin" | "youtube" | "pinterest" | "google_business" | "telegram" | "bluesky" | "discord" | "slack" | "mastodon" | "devto" | "hashnode" | "wordpress" | "lemmy" | "gmb" | "google-business" | "google_business_profile" | "x" | undefined;
|
|
22
22
|
account_id?: string | undefined;
|
|
23
23
|
limit?: number | undefined;
|
|
24
24
|
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const pauseSubscriptionTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{
|
|
7
|
+
confirm: z.ZodLiteral<true>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
confirm: true;
|
|
10
|
+
}, {
|
|
11
|
+
confirm: true;
|
|
12
|
+
}>;
|
|
13
|
+
execute(client: PosterlyClient, _input: {
|
|
14
|
+
confirm: true;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { formatDateTime, mdKeyValue, mdSection, mdTitle } from '../lib/format.js';
|
|
3
|
+
function formatPaused(result) {
|
|
4
|
+
return [
|
|
5
|
+
mdTitle('Subscription paused'),
|
|
6
|
+
mdSection('Details', mdKeyValue([
|
|
7
|
+
['Resumes at', result.pause_resumes_at ? formatDateTime(result.pause_resumes_at) : 'n/a'],
|
|
8
|
+
])),
|
|
9
|
+
].join('\n\n');
|
|
10
|
+
}
|
|
11
|
+
export const pauseSubscriptionTool = {
|
|
12
|
+
name: 'pause_subscription',
|
|
13
|
+
description: "Pause the authenticated user's posterly subscription for 30 days (one pause allowed per 90-day cooldown). Billing action; requires the billing:write scope. Only call after the user explicitly confirms.",
|
|
14
|
+
inputSchema: z.object({
|
|
15
|
+
confirm: z.literal(true).describe('Must be true after the user explicitly confirms pausing the subscription.'),
|
|
16
|
+
}),
|
|
17
|
+
async execute(client, _input) {
|
|
18
|
+
const result = await client.pauseSubscription();
|
|
19
|
+
return formatPaused(result);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
export declare const resumeSubscriptionTool: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
execute(client: PosterlyClient): Promise<string>;
|
|
8
|
+
};
|