@postrun/js 2.1.0 → 2.2.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/dist/{chunk-FGI7GS4Z.js → chunk-GOQVIAPL.js} +105 -3
- package/dist/chunk-GOQVIAPL.js.map +1 -0
- package/dist/{chunk-PIGL6PUC.js → chunk-YVCFLH5K.js} +17 -4
- package/dist/chunk-YVCFLH5K.js.map +1 -0
- package/dist/index.cjs +131 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.cjs +104 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +106 -1
- package/dist/schemas/index.d.ts +106 -1
- package/dist/schemas/index.js +1 -1
- package/dist/server.cjs +102 -0
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/{types.gen-BJumr-Nk.d.cts → types.gen-CzxuwPxe.d.cts} +333 -5
- package/dist/{types.gen-BJumr-Nk.d.ts → types.gen-CzxuwPxe.d.ts} +333 -5
- package/package.json +1 -1
- package/dist/chunk-FGI7GS4Z.js.map +0 -1
- package/dist/chunk-PIGL6PUC.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -813,6 +813,7 @@ var zErrorCode = z__namespace.enum([
|
|
|
813
813
|
"connection_not_pending",
|
|
814
814
|
"not_implemented",
|
|
815
815
|
"connection_discovery_failed",
|
|
816
|
+
"tiktok_creator_info_unavailable",
|
|
816
817
|
"media_processing",
|
|
817
818
|
"not_publishable",
|
|
818
819
|
"invalid_connection",
|
|
@@ -868,7 +869,9 @@ var zErrorCode = z__namespace.enum([
|
|
|
868
869
|
"linkedin_duplicate_content",
|
|
869
870
|
"linkedin_auth_expired",
|
|
870
871
|
"linkedin_permission_denied",
|
|
872
|
+
"linkedin_rate_limited",
|
|
871
873
|
"linkedin_media_processing",
|
|
874
|
+
"linkedin_media_failed",
|
|
872
875
|
"linkedin_media_upload_failed",
|
|
873
876
|
"linkedin_publish_failed",
|
|
874
877
|
"instagram_media_processing",
|
|
@@ -888,6 +891,8 @@ var zErrorCode = z__namespace.enum([
|
|
|
888
891
|
"tiktok_not_authorized",
|
|
889
892
|
"tiktok_rate_limited",
|
|
890
893
|
"tiktok_publish_failed",
|
|
894
|
+
"post_publish_failed",
|
|
895
|
+
"post_partially_published",
|
|
891
896
|
"connection_platform_mismatch",
|
|
892
897
|
"connection_removed"
|
|
893
898
|
]);
|
|
@@ -2825,6 +2830,7 @@ z__namespace.object({
|
|
|
2825
2830
|
"connection_not_pending",
|
|
2826
2831
|
"not_implemented",
|
|
2827
2832
|
"connection_discovery_failed",
|
|
2833
|
+
"tiktok_creator_info_unavailable",
|
|
2828
2834
|
"media_processing",
|
|
2829
2835
|
"not_publishable",
|
|
2830
2836
|
"invalid_connection",
|
|
@@ -2880,7 +2886,9 @@ z__namespace.object({
|
|
|
2880
2886
|
"linkedin_duplicate_content",
|
|
2881
2887
|
"linkedin_auth_expired",
|
|
2882
2888
|
"linkedin_permission_denied",
|
|
2889
|
+
"linkedin_rate_limited",
|
|
2883
2890
|
"linkedin_media_processing",
|
|
2891
|
+
"linkedin_media_failed",
|
|
2884
2892
|
"linkedin_media_upload_failed",
|
|
2885
2893
|
"linkedin_publish_failed",
|
|
2886
2894
|
"instagram_media_processing",
|
|
@@ -2900,6 +2908,8 @@ z__namespace.object({
|
|
|
2900
2908
|
"tiktok_not_authorized",
|
|
2901
2909
|
"tiktok_rate_limited",
|
|
2902
2910
|
"tiktok_publish_failed",
|
|
2911
|
+
"post_publish_failed",
|
|
2912
|
+
"post_partially_published",
|
|
2903
2913
|
"connection_platform_mismatch",
|
|
2904
2914
|
"connection_removed"
|
|
2905
2915
|
]),
|
|
@@ -4370,6 +4380,28 @@ z__namespace.object({
|
|
|
4370
4380
|
dry_run: z__namespace.boolean(),
|
|
4371
4381
|
executed: z__namespace.boolean()
|
|
4372
4382
|
});
|
|
4383
|
+
z__namespace.object({
|
|
4384
|
+
id: z__namespace.string()
|
|
4385
|
+
});
|
|
4386
|
+
z__namespace.object({
|
|
4387
|
+
creator: z__namespace.object({
|
|
4388
|
+
nickname: z__namespace.string(),
|
|
4389
|
+
username: z__namespace.string(),
|
|
4390
|
+
avatar_url: z__namespace.string().nullable()
|
|
4391
|
+
}),
|
|
4392
|
+
privacy_options: z__namespace.array(z__namespace.enum([
|
|
4393
|
+
"PUBLIC_TO_EVERYONE",
|
|
4394
|
+
"MUTUAL_FOLLOW_FRIENDS",
|
|
4395
|
+
"FOLLOWER_OF_CREATOR",
|
|
4396
|
+
"SELF_ONLY"
|
|
4397
|
+
])),
|
|
4398
|
+
interaction: z__namespace.object({
|
|
4399
|
+
comment: z__namespace.boolean(),
|
|
4400
|
+
duet: z__namespace.boolean(),
|
|
4401
|
+
stitch: z__namespace.boolean()
|
|
4402
|
+
}),
|
|
4403
|
+
max_video_duration_sec: z__namespace.int().gte(-9007199254740991).lte(9007199254740991)
|
|
4404
|
+
});
|
|
4373
4405
|
z__namespace.object({
|
|
4374
4406
|
limit: z__namespace.int().gte(1).lte(100).optional().default(20),
|
|
4375
4407
|
offset: z__namespace.int().gte(0).lte(9007199254740991).optional().default(0),
|
|
@@ -4432,6 +4464,41 @@ z__namespace.object({
|
|
|
4432
4464
|
request_body: z__namespace.unknown().nullish(),
|
|
4433
4465
|
response_body: z__namespace.unknown().nullish(),
|
|
4434
4466
|
error: z__namespace.unknown().nullish(),
|
|
4467
|
+
outcome: z__namespace.object({
|
|
4468
|
+
status: z__namespace.enum([
|
|
4469
|
+
"draft",
|
|
4470
|
+
"scheduled",
|
|
4471
|
+
"publishing",
|
|
4472
|
+
"partially_published",
|
|
4473
|
+
"published",
|
|
4474
|
+
"failed"
|
|
4475
|
+
]),
|
|
4476
|
+
targets: z__namespace.array(z__namespace.object({
|
|
4477
|
+
variant_id: z__namespace.string(),
|
|
4478
|
+
connection_id: z__namespace.string().nullable(),
|
|
4479
|
+
platform: z__namespace.enum([
|
|
4480
|
+
"x",
|
|
4481
|
+
"linkedin",
|
|
4482
|
+
"facebook_page",
|
|
4483
|
+
"instagram",
|
|
4484
|
+
"tiktok"
|
|
4485
|
+
]),
|
|
4486
|
+
status: z__namespace.enum([
|
|
4487
|
+
"draft",
|
|
4488
|
+
"scheduled",
|
|
4489
|
+
"publishing",
|
|
4490
|
+
"published",
|
|
4491
|
+
"failed"
|
|
4492
|
+
]),
|
|
4493
|
+
platform_post_id: z__namespace.string().nullable(),
|
|
4494
|
+
permalink: z__namespace.string().nullable(),
|
|
4495
|
+
published_at: z__namespace.string().nullable(),
|
|
4496
|
+
error: z__namespace.object({
|
|
4497
|
+
code: z__namespace.string(),
|
|
4498
|
+
message: z__namespace.string()
|
|
4499
|
+
}).nullable()
|
|
4500
|
+
}))
|
|
4501
|
+
}).nullable(),
|
|
4435
4502
|
external_id: z__namespace.string().nullable(),
|
|
4436
4503
|
idempotency_key: z__namespace.string().nullable(),
|
|
4437
4504
|
request_id: z__namespace.string().nullable(),
|
|
@@ -4480,6 +4547,41 @@ z__namespace.object({
|
|
|
4480
4547
|
request_body: z__namespace.unknown().nullish(),
|
|
4481
4548
|
response_body: z__namespace.unknown().nullish(),
|
|
4482
4549
|
error: z__namespace.unknown().nullish(),
|
|
4550
|
+
outcome: z__namespace.object({
|
|
4551
|
+
status: z__namespace.enum([
|
|
4552
|
+
"draft",
|
|
4553
|
+
"scheduled",
|
|
4554
|
+
"publishing",
|
|
4555
|
+
"partially_published",
|
|
4556
|
+
"published",
|
|
4557
|
+
"failed"
|
|
4558
|
+
]),
|
|
4559
|
+
targets: z__namespace.array(z__namespace.object({
|
|
4560
|
+
variant_id: z__namespace.string(),
|
|
4561
|
+
connection_id: z__namespace.string().nullable(),
|
|
4562
|
+
platform: z__namespace.enum([
|
|
4563
|
+
"x",
|
|
4564
|
+
"linkedin",
|
|
4565
|
+
"facebook_page",
|
|
4566
|
+
"instagram",
|
|
4567
|
+
"tiktok"
|
|
4568
|
+
]),
|
|
4569
|
+
status: z__namespace.enum([
|
|
4570
|
+
"draft",
|
|
4571
|
+
"scheduled",
|
|
4572
|
+
"publishing",
|
|
4573
|
+
"published",
|
|
4574
|
+
"failed"
|
|
4575
|
+
]),
|
|
4576
|
+
platform_post_id: z__namespace.string().nullable(),
|
|
4577
|
+
permalink: z__namespace.string().nullable(),
|
|
4578
|
+
published_at: z__namespace.string().nullable(),
|
|
4579
|
+
error: z__namespace.object({
|
|
4580
|
+
code: z__namespace.string(),
|
|
4581
|
+
message: z__namespace.string()
|
|
4582
|
+
}).nullable()
|
|
4583
|
+
}))
|
|
4584
|
+
}).nullable(),
|
|
4483
4585
|
external_id: z__namespace.string().nullable(),
|
|
4484
4586
|
idempotency_key: z__namespace.string().nullable(),
|
|
4485
4587
|
request_id: z__namespace.string().nullable(),
|
|
@@ -5775,6 +5877,19 @@ var googleUploadImageAsset = (options) => (options.client ?? client).post({
|
|
|
5775
5877
|
...options.headers
|
|
5776
5878
|
}
|
|
5777
5879
|
});
|
|
5880
|
+
var tiktokCreatorInfo = (options) => (options.client ?? client).get({
|
|
5881
|
+
security: [{
|
|
5882
|
+
key: "secretKey",
|
|
5883
|
+
scheme: "bearer",
|
|
5884
|
+
type: "http"
|
|
5885
|
+
}, {
|
|
5886
|
+
key: "frontendToken",
|
|
5887
|
+
scheme: "bearer",
|
|
5888
|
+
type: "http"
|
|
5889
|
+
}],
|
|
5890
|
+
url: "/connections/{id}/tiktok/creator-info",
|
|
5891
|
+
...options
|
|
5892
|
+
});
|
|
5778
5893
|
var logsList = (options) => (options?.client ?? client).get({
|
|
5779
5894
|
security: [{
|
|
5780
5895
|
key: "secretKey",
|
|
@@ -5895,6 +6010,20 @@ var tokensMint = (options) => (options.client ?? client).post({
|
|
|
5895
6010
|
var isPublished = (post) => post.status === "published";
|
|
5896
6011
|
var failedVariants = (post) => post.variants.filter((variant) => variant.status === "failed");
|
|
5897
6012
|
|
|
6013
|
+
// src/tiktok.ts
|
|
6014
|
+
function tiktokPrivacyLabel(value) {
|
|
6015
|
+
switch (value) {
|
|
6016
|
+
case "PUBLIC_TO_EVERYONE":
|
|
6017
|
+
return "Everyone";
|
|
6018
|
+
case "MUTUAL_FOLLOW_FRIENDS":
|
|
6019
|
+
return "Friends";
|
|
6020
|
+
case "FOLLOWER_OF_CREATOR":
|
|
6021
|
+
return "Followers";
|
|
6022
|
+
case "SELF_ONLY":
|
|
6023
|
+
return "Only you";
|
|
6024
|
+
}
|
|
6025
|
+
}
|
|
6026
|
+
|
|
5898
6027
|
// src/compose.ts
|
|
5899
6028
|
var ComposeError = class extends Error {
|
|
5900
6029
|
constructor(message) {
|
|
@@ -6167,6 +6296,8 @@ exports.profilesDelete = profilesDelete;
|
|
|
6167
6296
|
exports.profilesGet = profilesGet;
|
|
6168
6297
|
exports.profilesList = profilesList;
|
|
6169
6298
|
exports.profilesUpdate = profilesUpdate;
|
|
6299
|
+
exports.tiktokCreatorInfo = tiktokCreatorInfo;
|
|
6300
|
+
exports.tiktokPrivacyLabel = tiktokPrivacyLabel;
|
|
6170
6301
|
exports.tokensMint = tokensMint;
|
|
6171
6302
|
exports.webhooksCreateEndpoint = webhooksCreateEndpoint;
|
|
6172
6303
|
exports.webhooksCreatePortal = webhooksCreatePortal;
|