@postrun/js 2.23.0 → 2.25.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
@@ -931,6 +931,22 @@ var zErrorCode = z__namespace.enum([
931
931
  "connection_platform_mismatch",
932
932
  "connection_removed"
933
933
  ]);
934
+ var zErrorSource = z__namespace.object({
935
+ platform: z__namespace.enum([
936
+ "google",
937
+ "meta",
938
+ "x",
939
+ "linkedin",
940
+ "instagram",
941
+ "facebook",
942
+ "tiktok",
943
+ "youtube"
944
+ ]),
945
+ platform_code: z__namespace.string().optional(),
946
+ field: z__namespace.string().optional(),
947
+ value: z__namespace.string().optional(),
948
+ platform_request_id: z__namespace.string().optional()
949
+ });
934
950
  var zProfile = z__namespace.object({
935
951
  id: z__namespace.string(),
936
952
  name: z__namespace.string(),
@@ -2972,17 +2988,25 @@ var zGoogleAdsConversionConsent = z__namespace.object({
2972
2988
  ad_personalization: z__namespace.enum(["CONSENT_GRANTED", "CONSENT_DENIED"]).optional()
2973
2989
  });
2974
2990
  var zGoogleAdsConversionUserIdentifier = z__namespace.object({
2975
- email_address: z__namespace.string().min(1).optional(),
2976
- phone_number: z__namespace.string().min(1).optional(),
2991
+ email_address: z__namespace.email().optional(),
2992
+ phone_number: z__namespace.string().min(1).regex(/\d/).optional(),
2977
2993
  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()
2994
+ given_name: z__namespace.string().min(1),
2995
+ family_name: z__namespace.string().min(1),
2996
+ region_code: z__namespace.string().regex(/^[A-Za-z]{2}$/),
2997
+ postal_code: z__namespace.string().min(1)
2982
2998
  }).optional()
2983
2999
  });
2984
3000
  var zGoogleAdsConversionEvent = z__namespace.object({
2985
3001
  event_timestamp: z__namespace.iso.datetime(),
3002
+ event_source: z__namespace.enum([
3003
+ "WEB",
3004
+ "APP",
3005
+ "IN_STORE",
3006
+ "PHONE",
3007
+ "MESSAGE",
3008
+ "OTHER"
3009
+ ]),
2986
3010
  order_id: z__namespace.string().optional(),
2987
3011
  gclid: z__namespace.string().optional(),
2988
3012
  gbraid: z__namespace.string().optional(),
@@ -3150,6 +3174,13 @@ z__namespace.object({
3150
3174
  warnings: z__namespace.array(zGoogleAdsConversionWarning)
3151
3175
  }))
3152
3176
  });
3177
+ var zGoogleAdsConversionRequest = z__namespace.object({
3178
+ object: z__namespace.literal("conversion_request"),
3179
+ request_id: z__namespace.string(),
3180
+ conversion_action_id: z__namespace.string().nullable(),
3181
+ event_count: z__namespace.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
3182
+ created_at: z__namespace.string()
3183
+ });
3153
3184
  z__namespace.string().min(1).max(255);
3154
3185
  z__namespace.object({
3155
3186
  limit: z__namespace.int().gte(1).lte(100).optional().default(20),
@@ -3792,22 +3823,7 @@ z__namespace.object({
3792
3823
  hint: z__namespace.string().optional(),
3793
3824
  allowed: z__namespace.array(z__namespace.string()).optional(),
3794
3825
  got: z__namespace.string().optional(),
3795
- source: z__namespace.object({
3796
- platform: z__namespace.enum([
3797
- "google",
3798
- "meta",
3799
- "x",
3800
- "linkedin",
3801
- "instagram",
3802
- "facebook",
3803
- "tiktok",
3804
- "youtube"
3805
- ]),
3806
- platform_code: z__namespace.string().optional(),
3807
- field: z__namespace.string().optional(),
3808
- value: z__namespace.string().optional(),
3809
- platform_request_id: z__namespace.string().optional()
3810
- }).optional(),
3826
+ source: zErrorSource.optional(),
3811
3827
  variant_index: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
3812
3828
  path: z__namespace.array(z__namespace.union([z__namespace.string(), z__namespace.number()])),
3813
3829
  platform: zPostPlatform.optional(),
@@ -4179,7 +4195,7 @@ z__namespace.object({
4179
4195
  z__namespace.object({
4180
4196
  name: z__namespace.string().min(1).max(255),
4181
4197
  channel: z__namespace.enum(["SEARCH", "DISPLAY"]),
4182
- campaign_budget: z__namespace.string().min(1),
4198
+ campaign_budget: z__namespace.string().regex(/^\d+$/),
4183
4199
  bidding: z__namespace.enum([
4184
4200
  "manual_cpc",
4185
4201
  "maximize_conversions",
@@ -4384,7 +4400,7 @@ z__namespace.object({
4384
4400
  });
4385
4401
  z__namespace.object({
4386
4402
  name: z__namespace.string().min(1).max(255),
4387
- campaign: z__namespace.string().min(1),
4403
+ campaign: z__namespace.string().regex(/^\d+$/),
4388
4404
  type: z__namespace.enum(["SEARCH_STANDARD", "DISPLAY_STANDARD"]),
4389
4405
  status: z__namespace.enum(["ENABLED", "PAUSED"]).optional().default("ENABLED"),
4390
4406
  dry_run: z__namespace.boolean().optional().default(false)
@@ -4584,7 +4600,7 @@ z__namespace.object({
4584
4600
  data: z__namespace.array(zGoogleAdsAd)
4585
4601
  });
4586
4602
  z__namespace.object({
4587
- ad_group: z__namespace.string().min(1),
4603
+ ad_group: z__namespace.string().regex(/^\d+$/),
4588
4604
  final_urls: z__namespace.array(z__namespace.url()).min(1),
4589
4605
  headlines: z__namespace.array(z__namespace.object({
4590
4606
  text: z__namespace.string().min(1).max(30),
@@ -4613,7 +4629,7 @@ z__namespace.object({
4613
4629
  id: z__namespace.string().regex(/^\d+~\d+$/)
4614
4630
  });
4615
4631
  z__namespace.object({
4616
- ad_group: z__namespace.string().min(1),
4632
+ ad_group: z__namespace.string().regex(/^\d+$/),
4617
4633
  final_urls: z__namespace.array(z__namespace.url()).min(1),
4618
4634
  marketing_images: z__namespace.array(z__namespace.object({
4619
4635
  asset: z__namespace.string().min(1)
@@ -4703,7 +4719,7 @@ z__namespace.object({
4703
4719
  data: z__namespace.array(zGoogleAdsKeyword)
4704
4720
  });
4705
4721
  z__namespace.object({
4706
- ad_group: z__namespace.string().min(1),
4722
+ ad_group: z__namespace.string().regex(/^\d+$/),
4707
4723
  text: z__namespace.string().min(1).max(80),
4708
4724
  match_type: z__namespace.enum([
4709
4725
  "EXACT",
@@ -5112,6 +5128,21 @@ z__namespace.object({
5112
5128
  z__namespace.object({
5113
5129
  connection_id: z__namespace.string()
5114
5130
  });
5131
+ z__namespace.object({
5132
+ limit: z__namespace.int().gte(1).lte(100).optional().default(20),
5133
+ offset: z__namespace.int().gte(0).lte(9007199254740991).optional().default(0)
5134
+ });
5135
+ z__namespace.object({
5136
+ object: z__namespace.literal("list"),
5137
+ data: z__namespace.array(zGoogleAdsConversionRequest),
5138
+ total: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
5139
+ limit: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
5140
+ offset: z__namespace.int().gte(-9007199254740991).lte(9007199254740991),
5141
+ has_more: z__namespace.boolean()
5142
+ });
5143
+ z__namespace.object({
5144
+ connection_id: z__namespace.string()
5145
+ });
5115
5146
  z__namespace.object({
5116
5147
  object: z__namespace.literal("list"),
5117
5148
  data: z__namespace.array(z__namespace.object({
@@ -7454,6 +7485,19 @@ var googleGetConversionStatus = (options) => (options.client ?? client).get({
7454
7485
  url: "/google/{connection_id}/conversions/status",
7455
7486
  ...options
7456
7487
  });
7488
+ var googleListConversionRequests = (options) => (options.client ?? client).get({
7489
+ security: [{
7490
+ key: "secretKey",
7491
+ scheme: "bearer",
7492
+ type: "http"
7493
+ }, {
7494
+ key: "frontendToken",
7495
+ scheme: "bearer",
7496
+ type: "http"
7497
+ }],
7498
+ url: "/google/{connection_id}/conversions",
7499
+ ...options
7500
+ });
7457
7501
  var googleListConversionGoals = (options) => (options.client ?? client).get({
7458
7502
  security: [{
7459
7503
  key: "secretKey",
@@ -8174,6 +8218,7 @@ exports.googleListCampaignCriteria = googleListCampaignCriteria;
8174
8218
  exports.googleListCampaigns = googleListCampaigns;
8175
8219
  exports.googleListConversionActions = googleListConversionActions;
8176
8220
  exports.googleListConversionGoals = googleListConversionGoals;
8221
+ exports.googleListConversionRequests = googleListConversionRequests;
8177
8222
  exports.googleListKeywords = googleListKeywords;
8178
8223
  exports.googlePauseAd = googlePauseAd;
8179
8224
  exports.googlePauseAdGroup = googlePauseAdGroup;