@postrun/js 2.22.0 → 2.23.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/index.cjs CHANGED
@@ -920,6 +920,12 @@ var zErrorCode = z__namespace.enum([
920
920
  "google_auth_expired",
921
921
  "google_permission_denied",
922
922
  "google_request_failed",
923
+ "google_conversion_duplicate",
924
+ "google_conversion_invalid_click_id",
925
+ "google_conversion_event_too_old",
926
+ "google_conversion_consent_required",
927
+ "google_conversion_terms_not_signed",
928
+ "google_conversion_rejected",
923
929
  "post_publish_failed",
924
930
  "post_partially_published",
925
931
  "connection_platform_mismatch",
@@ -1364,6 +1370,12 @@ var zPostVariant = z__namespace.union([
1364
1370
  "google_auth_expired",
1365
1371
  "google_permission_denied",
1366
1372
  "google_request_failed",
1373
+ "google_conversion_duplicate",
1374
+ "google_conversion_invalid_click_id",
1375
+ "google_conversion_event_too_old",
1376
+ "google_conversion_consent_required",
1377
+ "google_conversion_terms_not_signed",
1378
+ "google_conversion_rejected",
1367
1379
  "post_publish_failed",
1368
1380
  "post_partially_published",
1369
1381
  "connection_platform_mismatch",
@@ -1553,6 +1565,12 @@ var zPostVariant = z__namespace.union([
1553
1565
  "google_auth_expired",
1554
1566
  "google_permission_denied",
1555
1567
  "google_request_failed",
1568
+ "google_conversion_duplicate",
1569
+ "google_conversion_invalid_click_id",
1570
+ "google_conversion_event_too_old",
1571
+ "google_conversion_consent_required",
1572
+ "google_conversion_terms_not_signed",
1573
+ "google_conversion_rejected",
1556
1574
  "post_publish_failed",
1557
1575
  "post_partially_published",
1558
1576
  "connection_platform_mismatch",
@@ -1708,6 +1726,12 @@ var zPostVariant = z__namespace.union([
1708
1726
  "google_auth_expired",
1709
1727
  "google_permission_denied",
1710
1728
  "google_request_failed",
1729
+ "google_conversion_duplicate",
1730
+ "google_conversion_invalid_click_id",
1731
+ "google_conversion_event_too_old",
1732
+ "google_conversion_consent_required",
1733
+ "google_conversion_terms_not_signed",
1734
+ "google_conversion_rejected",
1711
1735
  "post_publish_failed",
1712
1736
  "post_partially_published",
1713
1737
  "connection_platform_mismatch",
@@ -1877,6 +1901,12 @@ var zPostVariant = z__namespace.union([
1877
1901
  "google_auth_expired",
1878
1902
  "google_permission_denied",
1879
1903
  "google_request_failed",
1904
+ "google_conversion_duplicate",
1905
+ "google_conversion_invalid_click_id",
1906
+ "google_conversion_event_too_old",
1907
+ "google_conversion_consent_required",
1908
+ "google_conversion_terms_not_signed",
1909
+ "google_conversion_rejected",
1880
1910
  "post_publish_failed",
1881
1911
  "post_partially_published",
1882
1912
  "connection_platform_mismatch",
@@ -2040,6 +2070,12 @@ var zPostVariant = z__namespace.union([
2040
2070
  "google_auth_expired",
2041
2071
  "google_permission_denied",
2042
2072
  "google_request_failed",
2073
+ "google_conversion_duplicate",
2074
+ "google_conversion_invalid_click_id",
2075
+ "google_conversion_event_too_old",
2076
+ "google_conversion_consent_required",
2077
+ "google_conversion_terms_not_signed",
2078
+ "google_conversion_rejected",
2043
2079
  "post_publish_failed",
2044
2080
  "post_partially_published",
2045
2081
  "connection_platform_mismatch",
@@ -2931,6 +2967,189 @@ z__namespace.object({
2931
2967
  object: z__namespace.literal("list"),
2932
2968
  data: z__namespace.array(zGoogleAdTreeNode)
2933
2969
  });
2970
+ var zGoogleAdsConversionConsent = z__namespace.object({
2971
+ ad_user_data: z__namespace.enum(["CONSENT_GRANTED", "CONSENT_DENIED"]).optional(),
2972
+ ad_personalization: z__namespace.enum(["CONSENT_GRANTED", "CONSENT_DENIED"]).optional()
2973
+ });
2974
+ var zGoogleAdsConversionUserIdentifier = z__namespace.object({
2975
+ email_address: z__namespace.string().min(1).optional(),
2976
+ phone_number: z__namespace.string().min(1).optional(),
2977
+ address: z__namespace.object({
2978
+ given_name: z__namespace.string().min(1).optional(),
2979
+ family_name: z__namespace.string().min(1).optional(),
2980
+ region_code: z__namespace.string().min(1).optional(),
2981
+ postal_code: z__namespace.string().min(1).optional()
2982
+ }).optional()
2983
+ });
2984
+ var zGoogleAdsConversionEvent = z__namespace.object({
2985
+ event_timestamp: z__namespace.iso.datetime(),
2986
+ order_id: z__namespace.string().optional(),
2987
+ gclid: z__namespace.string().optional(),
2988
+ gbraid: z__namespace.string().optional(),
2989
+ wbraid: z__namespace.string().optional(),
2990
+ user_data: z__namespace.array(zGoogleAdsConversionUserIdentifier).min(1).max(10).optional(),
2991
+ currency: z__namespace.string().length(3).optional(),
2992
+ conversion_value: z__namespace.number().gte(0).optional(),
2993
+ consent: zGoogleAdsConversionConsent.optional()
2994
+ });
2995
+ z__namespace.object({
2996
+ request_id: z__namespace.string().nullable(),
2997
+ status: z__namespace.enum(["accepted", "validated"]),
2998
+ dry_run: z__namespace.boolean(),
2999
+ executed: z__namespace.boolean()
3000
+ });
3001
+ var zGoogleAdsConversionStatusReason = z__namespace.object({
3002
+ reason: z__namespace.string(),
3003
+ count: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
3004
+ code: z__namespace.enum([
3005
+ "unauthorized",
3006
+ "forbidden",
3007
+ "not_found",
3008
+ "conflict",
3009
+ "validation_failed",
3010
+ "rate_limited",
3011
+ "internal_error",
3012
+ "idempotency_key_invalid",
3013
+ "idempotency_key_reused",
3014
+ "idempotency_request_in_progress",
3015
+ "account_not_available",
3016
+ "connection_reauth_required",
3017
+ "connection_not_pending",
3018
+ "not_implemented",
3019
+ "connection_discovery_failed",
3020
+ "tiktok_creator_info_unavailable",
3021
+ "tiktok_cannot_post_now",
3022
+ "media_processing",
3023
+ "media_upload_init_failed",
3024
+ "media_upload_incomplete",
3025
+ "not_publishable",
3026
+ "invalid_connection",
3027
+ "invalid_media",
3028
+ "profile_scope_invalid",
3029
+ "media_unprobeable",
3030
+ "media_too_large",
3031
+ "media_aspect_ratio_unsupported",
3032
+ "media_resolution_too_low",
3033
+ "media_gif_unsupported",
3034
+ "media_format_recompressed",
3035
+ "media_resolution_downscaled",
3036
+ "video_container_unsupported",
3037
+ "video_codec_unsupported",
3038
+ "video_audio_codec_unsupported",
3039
+ "video_too_large",
3040
+ "video_too_small",
3041
+ "video_dimensions_unsupported",
3042
+ "video_dimensions_too_large",
3043
+ "video_fps_unsupported",
3044
+ "video_fps_too_low",
3045
+ "video_aspect_unsupported",
3046
+ "video_duration_too_short",
3047
+ "video_duration_exceeds_max",
3048
+ "video_transform_failed",
3049
+ "media_fetch_failed",
3050
+ "document_format_unsupported",
3051
+ "document_too_large",
3052
+ "document_too_many_pages",
3053
+ "media_format_indeterminate",
3054
+ "media_format_unsupported",
3055
+ "media_count_invalid",
3056
+ "body_too_long",
3057
+ "content_missing",
3058
+ "content_conflict",
3059
+ "content_incomplete",
3060
+ "content_kind_mismatch",
3061
+ "media_type_mismatch",
3062
+ "tag_limit_exceeded",
3063
+ "reel_field_on_non_reel",
3064
+ "field_placement_invalid",
3065
+ "media_not_ready",
3066
+ "media_failed",
3067
+ "media_unsupported",
3068
+ "media_kind_mismatch",
3069
+ "variant_unparseable",
3070
+ "publishing_unavailable",
3071
+ "x_duplicate_content",
3072
+ "x_not_authorized",
3073
+ "x_access_not_permitted",
3074
+ "x_rate_limited",
3075
+ "x_publish_failed",
3076
+ "x_media_upload_failed",
3077
+ "linkedin_duplicate_content",
3078
+ "linkedin_auth_expired",
3079
+ "linkedin_permission_denied",
3080
+ "linkedin_rate_limited",
3081
+ "linkedin_media_processing",
3082
+ "linkedin_media_failed",
3083
+ "linkedin_media_upload_failed",
3084
+ "linkedin_publish_failed",
3085
+ "instagram_media_processing",
3086
+ "instagram_container_expired",
3087
+ "instagram_container_failed",
3088
+ "instagram_rate_limited",
3089
+ "instagram_daily_limit_reached",
3090
+ "instagram_aspect_ratio_unsupported",
3091
+ "instagram_media_unsupported",
3092
+ "instagram_not_authorized",
3093
+ "instagram_publish_failed",
3094
+ "facebook_reel_processing",
3095
+ "facebook_reel_failed",
3096
+ "facebook_rate_limited",
3097
+ "facebook_duplicate_content",
3098
+ "facebook_temporarily_blocked",
3099
+ "facebook_not_authorized",
3100
+ "facebook_publish_failed",
3101
+ "tiktok_privacy_not_allowed",
3102
+ "tiktok_duration_exceeds_max",
3103
+ "tiktok_media_processing",
3104
+ "tiktok_not_authorized",
3105
+ "tiktok_rate_limited",
3106
+ "tiktok_url_ownership_unverified",
3107
+ "tiktok_unaudited_private_only",
3108
+ "tiktok_spam_risk",
3109
+ "tiktok_file_format_invalid",
3110
+ "tiktok_duration_invalid",
3111
+ "tiktok_frame_rate_invalid",
3112
+ "tiktok_resolution_invalid",
3113
+ "tiktok_media_pull_failed",
3114
+ "tiktok_server_error",
3115
+ "tiktok_publish_failed",
3116
+ "google_rate_limited",
3117
+ "google_server_error",
3118
+ "google_auth_expired",
3119
+ "google_permission_denied",
3120
+ "google_request_failed",
3121
+ "google_conversion_duplicate",
3122
+ "google_conversion_invalid_click_id",
3123
+ "google_conversion_event_too_old",
3124
+ "google_conversion_consent_required",
3125
+ "google_conversion_terms_not_signed",
3126
+ "google_conversion_rejected",
3127
+ "post_publish_failed",
3128
+ "post_partially_published",
3129
+ "connection_platform_mismatch",
3130
+ "connection_removed"
3131
+ ]),
3132
+ display_error: z__namespace.string()
3133
+ });
3134
+ var zGoogleAdsConversionWarning = z__namespace.object({
3135
+ reason: z__namespace.string(),
3136
+ count: z__namespace.int().gte(-9007199254740991).lte(9007199254740991)
3137
+ });
3138
+ z__namespace.object({
3139
+ request_id: z__namespace.string(),
3140
+ destinations: z__namespace.array(z__namespace.object({
3141
+ request_status: z__namespace.enum([
3142
+ "REQUEST_STATUS_UNKNOWN",
3143
+ "SUCCESS",
3144
+ "PROCESSING",
3145
+ "FAILED",
3146
+ "PARTIAL_SUCCESS"
3147
+ ]),
3148
+ events_submitted: z__namespace.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3149
+ errors: z__namespace.array(zGoogleAdsConversionStatusReason),
3150
+ warnings: z__namespace.array(zGoogleAdsConversionWarning)
3151
+ }))
3152
+ });
2934
3153
  z__namespace.string().min(1).max(255);
2935
3154
  z__namespace.object({
2936
3155
  limit: z__namespace.int().gte(1).lte(100).optional().default(20),
@@ -3558,6 +3777,12 @@ z__namespace.object({
3558
3777
  "google_auth_expired",
3559
3778
  "google_permission_denied",
3560
3779
  "google_request_failed",
3780
+ "google_conversion_duplicate",
3781
+ "google_conversion_invalid_click_id",
3782
+ "google_conversion_event_too_old",
3783
+ "google_conversion_consent_required",
3784
+ "google_conversion_terms_not_signed",
3785
+ "google_conversion_rejected",
3561
3786
  "post_publish_failed",
3562
3787
  "post_partially_published",
3563
3788
  "connection_platform_mismatch",
@@ -4866,6 +5091,24 @@ z__namespace.object({
4866
5091
  event_snippet: z__namespace.string().nullable()
4867
5092
  }))
4868
5093
  });
5094
+ z__namespace.object({
5095
+ conversion_action_id: z__namespace.string().regex(/^\d+$/),
5096
+ conversions: z__namespace.array(zGoogleAdsConversionEvent).min(1).max(2e3),
5097
+ consent: zGoogleAdsConversionConsent.optional(),
5098
+ dry_run: z__namespace.boolean().optional().default(false)
5099
+ });
5100
+ z__namespace.object({
5101
+ "Idempotency-Key": z__namespace.string().min(1).max(255).optional()
5102
+ });
5103
+ z__namespace.object({
5104
+ connection_id: z__namespace.string()
5105
+ });
5106
+ z__namespace.object({
5107
+ connection_id: z__namespace.string()
5108
+ });
5109
+ z__namespace.object({
5110
+ request_id: z__namespace.string().min(1)
5111
+ });
4869
5112
  z__namespace.object({
4870
5113
  connection_id: z__namespace.string()
4871
5114
  });
@@ -5186,6 +5429,12 @@ z__namespace.object({
5186
5429
  "google_auth_expired",
5187
5430
  "google_permission_denied",
5188
5431
  "google_request_failed",
5432
+ "google_conversion_duplicate",
5433
+ "google_conversion_invalid_click_id",
5434
+ "google_conversion_event_too_old",
5435
+ "google_conversion_consent_required",
5436
+ "google_conversion_terms_not_signed",
5437
+ "google_conversion_rejected",
5189
5438
  "post_publish_failed",
5190
5439
  "post_partially_published",
5191
5440
  "connection_platform_mismatch",
@@ -5340,6 +5589,12 @@ z__namespace.object({
5340
5589
  "google_auth_expired",
5341
5590
  "google_permission_denied",
5342
5591
  "google_request_failed",
5592
+ "google_conversion_duplicate",
5593
+ "google_conversion_invalid_click_id",
5594
+ "google_conversion_event_too_old",
5595
+ "google_conversion_consent_required",
5596
+ "google_conversion_terms_not_signed",
5597
+ "google_conversion_rejected",
5343
5598
  "post_publish_failed",
5344
5599
  "post_partially_published",
5345
5600
  "connection_platform_mismatch",
@@ -5515,6 +5770,12 @@ z__namespace.object({
5515
5770
  "google_auth_expired",
5516
5771
  "google_permission_denied",
5517
5772
  "google_request_failed",
5773
+ "google_conversion_duplicate",
5774
+ "google_conversion_invalid_click_id",
5775
+ "google_conversion_event_too_old",
5776
+ "google_conversion_consent_required",
5777
+ "google_conversion_terms_not_signed",
5778
+ "google_conversion_rejected",
5518
5779
  "post_publish_failed",
5519
5780
  "post_partially_published",
5520
5781
  "connection_platform_mismatch",
@@ -5669,6 +5930,12 @@ z__namespace.object({
5669
5930
  "google_auth_expired",
5670
5931
  "google_permission_denied",
5671
5932
  "google_request_failed",
5933
+ "google_conversion_duplicate",
5934
+ "google_conversion_invalid_click_id",
5935
+ "google_conversion_event_too_old",
5936
+ "google_conversion_consent_required",
5937
+ "google_conversion_terms_not_signed",
5938
+ "google_conversion_rejected",
5672
5939
  "post_publish_failed",
5673
5940
  "post_partially_published",
5674
5941
  "connection_platform_mismatch",
@@ -7157,6 +7424,36 @@ var googleGetConversionAction = (options) => (options.client ?? client).get({
7157
7424
  url: "/google/{connection_id}/conversion-actions/{id}",
7158
7425
  ...options
7159
7426
  });
7427
+ var googleSendConversions = (options) => (options.client ?? client).post({
7428
+ security: [{
7429
+ key: "secretKey",
7430
+ scheme: "bearer",
7431
+ type: "http"
7432
+ }, {
7433
+ key: "frontendToken",
7434
+ scheme: "bearer",
7435
+ type: "http"
7436
+ }],
7437
+ url: "/google/{connection_id}/conversions:send",
7438
+ ...options,
7439
+ headers: {
7440
+ "Content-Type": "application/json",
7441
+ ...options.headers
7442
+ }
7443
+ });
7444
+ var googleGetConversionStatus = (options) => (options.client ?? client).get({
7445
+ security: [{
7446
+ key: "secretKey",
7447
+ scheme: "bearer",
7448
+ type: "http"
7449
+ }, {
7450
+ key: "frontendToken",
7451
+ scheme: "bearer",
7452
+ type: "http"
7453
+ }],
7454
+ url: "/google/{connection_id}/conversions/status",
7455
+ ...options
7456
+ });
7160
7457
  var googleListConversionGoals = (options) => (options.client ?? client).get({
7161
7458
  security: [{
7162
7459
  key: "secretKey",
@@ -7866,6 +8163,7 @@ exports.googleGetAdGroup = googleGetAdGroup;
7866
8163
  exports.googleGetAdTree = googleGetAdTree;
7867
8164
  exports.googleGetCampaign = googleGetCampaign;
7868
8165
  exports.googleGetConversionAction = googleGetConversionAction;
8166
+ exports.googleGetConversionStatus = googleGetConversionStatus;
7869
8167
  exports.googleGetInsights = googleGetInsights;
7870
8168
  exports.googleGetKeyword = googleGetKeyword;
7871
8169
  exports.googleListAdGroupCriteria = googleListAdGroupCriteria;
@@ -7890,6 +8188,7 @@ exports.googleRemoveCampaignCriterion = googleRemoveCampaignCriterion;
7890
8188
  exports.googleRemoveKeyword = googleRemoveKeyword;
7891
8189
  exports.googleRunGaql = googleRunGaql;
7892
8190
  exports.googleSearchGeoTargets = googleSearchGeoTargets;
8191
+ exports.googleSendConversions = googleSendConversions;
7893
8192
  exports.googleSetAdGroupBids = googleSetAdGroupBids;
7894
8193
  exports.googleSetCampaignGeoSettings = googleSetCampaignGeoSettings;
7895
8194
  exports.googleSetCampaignTargetingSetting = googleSetCampaignTargetingSetting;