@postrun/js 2.22.0 → 2.24.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,197 @@ 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.email().optional(),
2976
+ phone_number: z__namespace.string().min(1).regex(/\d/).optional(),
2977
+ address: z__namespace.object({
2978
+ given_name: z__namespace.string().min(1),
2979
+ family_name: z__namespace.string().min(1),
2980
+ region_code: z__namespace.string().regex(/^[A-Za-z]{2}$/),
2981
+ postal_code: z__namespace.string().min(1)
2982
+ }).optional()
2983
+ });
2984
+ var zGoogleAdsConversionEvent = z__namespace.object({
2985
+ event_timestamp: z__namespace.iso.datetime(),
2986
+ event_source: z__namespace.enum([
2987
+ "WEB",
2988
+ "APP",
2989
+ "IN_STORE",
2990
+ "PHONE",
2991
+ "MESSAGE",
2992
+ "OTHER"
2993
+ ]),
2994
+ order_id: z__namespace.string().optional(),
2995
+ gclid: z__namespace.string().optional(),
2996
+ gbraid: z__namespace.string().optional(),
2997
+ wbraid: z__namespace.string().optional(),
2998
+ user_data: z__namespace.array(zGoogleAdsConversionUserIdentifier).min(1).max(10).optional(),
2999
+ currency: z__namespace.string().length(3).optional(),
3000
+ conversion_value: z__namespace.number().gte(0).optional(),
3001
+ consent: zGoogleAdsConversionConsent.optional()
3002
+ });
3003
+ z__namespace.object({
3004
+ request_id: z__namespace.string().nullable(),
3005
+ status: z__namespace.enum(["accepted", "validated"]),
3006
+ dry_run: z__namespace.boolean(),
3007
+ executed: z__namespace.boolean()
3008
+ });
3009
+ var zGoogleAdsConversionStatusReason = z__namespace.object({
3010
+ reason: z__namespace.string(),
3011
+ count: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
3012
+ code: z__namespace.enum([
3013
+ "unauthorized",
3014
+ "forbidden",
3015
+ "not_found",
3016
+ "conflict",
3017
+ "validation_failed",
3018
+ "rate_limited",
3019
+ "internal_error",
3020
+ "idempotency_key_invalid",
3021
+ "idempotency_key_reused",
3022
+ "idempotency_request_in_progress",
3023
+ "account_not_available",
3024
+ "connection_reauth_required",
3025
+ "connection_not_pending",
3026
+ "not_implemented",
3027
+ "connection_discovery_failed",
3028
+ "tiktok_creator_info_unavailable",
3029
+ "tiktok_cannot_post_now",
3030
+ "media_processing",
3031
+ "media_upload_init_failed",
3032
+ "media_upload_incomplete",
3033
+ "not_publishable",
3034
+ "invalid_connection",
3035
+ "invalid_media",
3036
+ "profile_scope_invalid",
3037
+ "media_unprobeable",
3038
+ "media_too_large",
3039
+ "media_aspect_ratio_unsupported",
3040
+ "media_resolution_too_low",
3041
+ "media_gif_unsupported",
3042
+ "media_format_recompressed",
3043
+ "media_resolution_downscaled",
3044
+ "video_container_unsupported",
3045
+ "video_codec_unsupported",
3046
+ "video_audio_codec_unsupported",
3047
+ "video_too_large",
3048
+ "video_too_small",
3049
+ "video_dimensions_unsupported",
3050
+ "video_dimensions_too_large",
3051
+ "video_fps_unsupported",
3052
+ "video_fps_too_low",
3053
+ "video_aspect_unsupported",
3054
+ "video_duration_too_short",
3055
+ "video_duration_exceeds_max",
3056
+ "video_transform_failed",
3057
+ "media_fetch_failed",
3058
+ "document_format_unsupported",
3059
+ "document_too_large",
3060
+ "document_too_many_pages",
3061
+ "media_format_indeterminate",
3062
+ "media_format_unsupported",
3063
+ "media_count_invalid",
3064
+ "body_too_long",
3065
+ "content_missing",
3066
+ "content_conflict",
3067
+ "content_incomplete",
3068
+ "content_kind_mismatch",
3069
+ "media_type_mismatch",
3070
+ "tag_limit_exceeded",
3071
+ "reel_field_on_non_reel",
3072
+ "field_placement_invalid",
3073
+ "media_not_ready",
3074
+ "media_failed",
3075
+ "media_unsupported",
3076
+ "media_kind_mismatch",
3077
+ "variant_unparseable",
3078
+ "publishing_unavailable",
3079
+ "x_duplicate_content",
3080
+ "x_not_authorized",
3081
+ "x_access_not_permitted",
3082
+ "x_rate_limited",
3083
+ "x_publish_failed",
3084
+ "x_media_upload_failed",
3085
+ "linkedin_duplicate_content",
3086
+ "linkedin_auth_expired",
3087
+ "linkedin_permission_denied",
3088
+ "linkedin_rate_limited",
3089
+ "linkedin_media_processing",
3090
+ "linkedin_media_failed",
3091
+ "linkedin_media_upload_failed",
3092
+ "linkedin_publish_failed",
3093
+ "instagram_media_processing",
3094
+ "instagram_container_expired",
3095
+ "instagram_container_failed",
3096
+ "instagram_rate_limited",
3097
+ "instagram_daily_limit_reached",
3098
+ "instagram_aspect_ratio_unsupported",
3099
+ "instagram_media_unsupported",
3100
+ "instagram_not_authorized",
3101
+ "instagram_publish_failed",
3102
+ "facebook_reel_processing",
3103
+ "facebook_reel_failed",
3104
+ "facebook_rate_limited",
3105
+ "facebook_duplicate_content",
3106
+ "facebook_temporarily_blocked",
3107
+ "facebook_not_authorized",
3108
+ "facebook_publish_failed",
3109
+ "tiktok_privacy_not_allowed",
3110
+ "tiktok_duration_exceeds_max",
3111
+ "tiktok_media_processing",
3112
+ "tiktok_not_authorized",
3113
+ "tiktok_rate_limited",
3114
+ "tiktok_url_ownership_unverified",
3115
+ "tiktok_unaudited_private_only",
3116
+ "tiktok_spam_risk",
3117
+ "tiktok_file_format_invalid",
3118
+ "tiktok_duration_invalid",
3119
+ "tiktok_frame_rate_invalid",
3120
+ "tiktok_resolution_invalid",
3121
+ "tiktok_media_pull_failed",
3122
+ "tiktok_server_error",
3123
+ "tiktok_publish_failed",
3124
+ "google_rate_limited",
3125
+ "google_server_error",
3126
+ "google_auth_expired",
3127
+ "google_permission_denied",
3128
+ "google_request_failed",
3129
+ "google_conversion_duplicate",
3130
+ "google_conversion_invalid_click_id",
3131
+ "google_conversion_event_too_old",
3132
+ "google_conversion_consent_required",
3133
+ "google_conversion_terms_not_signed",
3134
+ "google_conversion_rejected",
3135
+ "post_publish_failed",
3136
+ "post_partially_published",
3137
+ "connection_platform_mismatch",
3138
+ "connection_removed"
3139
+ ]),
3140
+ display_error: z__namespace.string()
3141
+ });
3142
+ var zGoogleAdsConversionWarning = z__namespace.object({
3143
+ reason: z__namespace.string(),
3144
+ count: z__namespace.int().gte(-9007199254740991).lte(9007199254740991)
3145
+ });
3146
+ z__namespace.object({
3147
+ request_id: z__namespace.string(),
3148
+ destinations: z__namespace.array(z__namespace.object({
3149
+ request_status: z__namespace.enum([
3150
+ "REQUEST_STATUS_UNKNOWN",
3151
+ "SUCCESS",
3152
+ "PROCESSING",
3153
+ "FAILED",
3154
+ "PARTIAL_SUCCESS"
3155
+ ]),
3156
+ events_submitted: z__namespace.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3157
+ errors: z__namespace.array(zGoogleAdsConversionStatusReason),
3158
+ warnings: z__namespace.array(zGoogleAdsConversionWarning)
3159
+ }))
3160
+ });
2934
3161
  z__namespace.string().min(1).max(255);
2935
3162
  z__namespace.object({
2936
3163
  limit: z__namespace.int().gte(1).lte(100).optional().default(20),
@@ -3558,6 +3785,12 @@ z__namespace.object({
3558
3785
  "google_auth_expired",
3559
3786
  "google_permission_denied",
3560
3787
  "google_request_failed",
3788
+ "google_conversion_duplicate",
3789
+ "google_conversion_invalid_click_id",
3790
+ "google_conversion_event_too_old",
3791
+ "google_conversion_consent_required",
3792
+ "google_conversion_terms_not_signed",
3793
+ "google_conversion_rejected",
3561
3794
  "post_publish_failed",
3562
3795
  "post_partially_published",
3563
3796
  "connection_platform_mismatch",
@@ -4866,6 +5099,24 @@ z__namespace.object({
4866
5099
  event_snippet: z__namespace.string().nullable()
4867
5100
  }))
4868
5101
  });
5102
+ z__namespace.object({
5103
+ conversion_action_id: z__namespace.string().regex(/^\d+$/),
5104
+ conversions: z__namespace.array(zGoogleAdsConversionEvent).min(1).max(2e3),
5105
+ consent: zGoogleAdsConversionConsent.optional(),
5106
+ dry_run: z__namespace.boolean().optional().default(false)
5107
+ });
5108
+ z__namespace.object({
5109
+ "Idempotency-Key": z__namespace.string().min(1).max(255).optional()
5110
+ });
5111
+ z__namespace.object({
5112
+ connection_id: z__namespace.string()
5113
+ });
5114
+ z__namespace.object({
5115
+ connection_id: z__namespace.string()
5116
+ });
5117
+ z__namespace.object({
5118
+ request_id: z__namespace.string().min(1)
5119
+ });
4869
5120
  z__namespace.object({
4870
5121
  connection_id: z__namespace.string()
4871
5122
  });
@@ -5186,6 +5437,12 @@ z__namespace.object({
5186
5437
  "google_auth_expired",
5187
5438
  "google_permission_denied",
5188
5439
  "google_request_failed",
5440
+ "google_conversion_duplicate",
5441
+ "google_conversion_invalid_click_id",
5442
+ "google_conversion_event_too_old",
5443
+ "google_conversion_consent_required",
5444
+ "google_conversion_terms_not_signed",
5445
+ "google_conversion_rejected",
5189
5446
  "post_publish_failed",
5190
5447
  "post_partially_published",
5191
5448
  "connection_platform_mismatch",
@@ -5340,6 +5597,12 @@ z__namespace.object({
5340
5597
  "google_auth_expired",
5341
5598
  "google_permission_denied",
5342
5599
  "google_request_failed",
5600
+ "google_conversion_duplicate",
5601
+ "google_conversion_invalid_click_id",
5602
+ "google_conversion_event_too_old",
5603
+ "google_conversion_consent_required",
5604
+ "google_conversion_terms_not_signed",
5605
+ "google_conversion_rejected",
5343
5606
  "post_publish_failed",
5344
5607
  "post_partially_published",
5345
5608
  "connection_platform_mismatch",
@@ -5515,6 +5778,12 @@ z__namespace.object({
5515
5778
  "google_auth_expired",
5516
5779
  "google_permission_denied",
5517
5780
  "google_request_failed",
5781
+ "google_conversion_duplicate",
5782
+ "google_conversion_invalid_click_id",
5783
+ "google_conversion_event_too_old",
5784
+ "google_conversion_consent_required",
5785
+ "google_conversion_terms_not_signed",
5786
+ "google_conversion_rejected",
5518
5787
  "post_publish_failed",
5519
5788
  "post_partially_published",
5520
5789
  "connection_platform_mismatch",
@@ -5669,6 +5938,12 @@ z__namespace.object({
5669
5938
  "google_auth_expired",
5670
5939
  "google_permission_denied",
5671
5940
  "google_request_failed",
5941
+ "google_conversion_duplicate",
5942
+ "google_conversion_invalid_click_id",
5943
+ "google_conversion_event_too_old",
5944
+ "google_conversion_consent_required",
5945
+ "google_conversion_terms_not_signed",
5946
+ "google_conversion_rejected",
5672
5947
  "post_publish_failed",
5673
5948
  "post_partially_published",
5674
5949
  "connection_platform_mismatch",
@@ -7157,6 +7432,36 @@ var googleGetConversionAction = (options) => (options.client ?? client).get({
7157
7432
  url: "/google/{connection_id}/conversion-actions/{id}",
7158
7433
  ...options
7159
7434
  });
7435
+ var googleSendConversions = (options) => (options.client ?? client).post({
7436
+ security: [{
7437
+ key: "secretKey",
7438
+ scheme: "bearer",
7439
+ type: "http"
7440
+ }, {
7441
+ key: "frontendToken",
7442
+ scheme: "bearer",
7443
+ type: "http"
7444
+ }],
7445
+ url: "/google/{connection_id}/conversions:send",
7446
+ ...options,
7447
+ headers: {
7448
+ "Content-Type": "application/json",
7449
+ ...options.headers
7450
+ }
7451
+ });
7452
+ var googleGetConversionStatus = (options) => (options.client ?? client).get({
7453
+ security: [{
7454
+ key: "secretKey",
7455
+ scheme: "bearer",
7456
+ type: "http"
7457
+ }, {
7458
+ key: "frontendToken",
7459
+ scheme: "bearer",
7460
+ type: "http"
7461
+ }],
7462
+ url: "/google/{connection_id}/conversions/status",
7463
+ ...options
7464
+ });
7160
7465
  var googleListConversionGoals = (options) => (options.client ?? client).get({
7161
7466
  security: [{
7162
7467
  key: "secretKey",
@@ -7866,6 +8171,7 @@ exports.googleGetAdGroup = googleGetAdGroup;
7866
8171
  exports.googleGetAdTree = googleGetAdTree;
7867
8172
  exports.googleGetCampaign = googleGetCampaign;
7868
8173
  exports.googleGetConversionAction = googleGetConversionAction;
8174
+ exports.googleGetConversionStatus = googleGetConversionStatus;
7869
8175
  exports.googleGetInsights = googleGetInsights;
7870
8176
  exports.googleGetKeyword = googleGetKeyword;
7871
8177
  exports.googleListAdGroupCriteria = googleListAdGroupCriteria;
@@ -7890,6 +8196,7 @@ exports.googleRemoveCampaignCriterion = googleRemoveCampaignCriterion;
7890
8196
  exports.googleRemoveKeyword = googleRemoveKeyword;
7891
8197
  exports.googleRunGaql = googleRunGaql;
7892
8198
  exports.googleSearchGeoTargets = googleSearchGeoTargets;
8199
+ exports.googleSendConversions = googleSendConversions;
7893
8200
  exports.googleSetAdGroupBids = googleSetAdGroupBids;
7894
8201
  exports.googleSetCampaignGeoSettings = googleSetCampaignGeoSettings;
7895
8202
  exports.googleSetCampaignTargetingSetting = googleSetCampaignTargetingSetting;